1
0

arms-matrix.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env bash
  2. # Drive the tool-surface ablation across the chosen repos × arms (A–E).
  3. # Arms A–D ask the canonical FLOW question; arm E asks a NON-flow survey
  4. # question (the control probe — should degrade without explore+context).
  5. # Output: /tmp/arms/<repo>/<arm>-r<n>.jsonl (parse with parse-arms.mjs).
  6. set -uo pipefail
  7. HARNESS="$(cd "$(dirname "$0")" && pwd)"
  8. RUNS="${RUNS:-2}"
  9. C="${CORPUS:-/tmp/codegraph-corpus}"
  10. NFQ='What are the main modules/components of this codebase and what does each one do? Give an overview of how it is organized.'
  11. # repo-path|flow-question (2 small, 2 medium, 2 large — spans the size range)
  12. ROWS=(
  13. "$C/flutter-samples/add_to_app/books/flutter_module_books|How does the books UI build and what child widgets does it show?"
  14. "$C/aspnet-realworld|How is creating an article handled? Trace the controller to the service."
  15. "$C/spring-mall|How is a product-list request handled? Trace the controller to the service."
  16. "$C/vapor-spi|How is a package-show request handled? Name the route and controller."
  17. "$C/excalidraw|How does updating an element re-render the canvas on screen? Trace the flow."
  18. "$C/spring-halo|How is publishing a post handled? Trace the controller to the service."
  19. )
  20. echo "### ARMS MATRIX START $(date) RUNS=$RUNS"
  21. for row in "${ROWS[@]}"; do
  22. repo="${row%%|*}"; q="${row#*|}"
  23. for arm in A B C D; do
  24. for r in $(seq 1 "$RUNS"); do
  25. bash "$HARNESS/run-arms.sh" "$repo" "$q" "$arm" "$r"
  26. done
  27. done
  28. done
  29. # E: non-flow control probe on two repos (must degrade without explore+context)
  30. for repo in "$C/excalidraw" "$C/spring-mall"; do
  31. for r in $(seq 1 "$RUNS"); do
  32. bash "$HARNESS/run-arms.sh" "$repo" "$NFQ" E "$r"
  33. done
  34. done
  35. echo "### ARMS MATRIX COMPLETE $(date)"