# 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) `pkill`s. **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 # exit 4 when CRITICAL+HIGH > 0 ``` Files: `${XDG_RUNTIME_DIR:-/tmp}/review-loop//-r-{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 `spec` template excludes the "symbol does not exist yet" class for spec-ahead specs; `tests` adds `Bash(python3 -m pytest *)`; `verify` adds `git show`). - Default reading set per kind from `best-practices/` + the project's `memory/gotchas-*.md`; absent files are skipped and reported in `--dryrun`. - Launch is a generated `-launch.sh` run under `setsid nohup`; the stdout file ends with `exit=N`. Kill by PID from the launch script's process, never by pattern. - `counts` parses table rows, `- **SEV:** n` lists, 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. - `counts` heuristics 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).