1.9 KiB
1.9 KiB
review-loop-run
Purpose: Launch and track detached MiniMax M3 reviews of /review-loop artefacts (verify / plan / spec / tests / code) from a fixed prompt template per kind, so sessions stop hand-writing prompt files, launcher scripts and (fatally) pkills.
Location: small-scripts/scripts/review-loop-run → ~/sbin/review-loop-run; spec small-scripts/specs/review-loop-run.spec.md; test tests/test-review-loop-run.sh.
Usage
review-loop-run launch --kind spec --name spec-BC --round 2 --file /tmp/x/spec-BC.diff --context "…"
review-loop-run status --name spec-BC
review-loop-run counts <result.md> # exit 4 when CRITICAL+HIGH > 0
Files: ${XDG_RUNTIME_DIR:-/tmp}/review-loop/<repo>/<tag>-r<N>-{prompt.txt,launch.sh,stdout.txt,result.md}. Round ≥2 auto-adds the previous round's result and the "do not re-raise adjudicated findings" paragraph.
How it works
- One task template per kind (the
spectemplate excludes the "symbol does not exist yet" class for spec-ahead specs;testsaddsBash(python3 -m pytest *);verifyaddsgit show). - Default reading set per kind from
best-practices/+ the project'smemory/gotchas-*.md; absent files are skipped and reported in--dryrun. - Launch is a generated
<tag>-launch.shrun undersetsid nohup; the stdout file ends withexit=N. Kill by PID from the launch script's process, never by pattern. countsparses table rows,- **SEV:** nlists, or heading counts as a last resort.
Gotchas
pkill -f 'MiniMax-M3'kills the invoking shell — the reason this script exists. Never reintroduce it.- MiniMax reviews take 5–10 min for ~15 input files; schedule a wakeup rather than polling.
countsheuristics depend on the reviewer honouring "end with a count by severity"; the prompt asks for it, but spot-check the result on the first round of a new kind.
Used by: /review-loop (custom-claude-skills).