diff --git a/MEMORY.md b/MEMORY.md index ecfd4b5..953cf5a 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -39,6 +39,7 @@ - [/spawn-session](memory/skill-spawn-session.md) — Spawn a new detached tmux Claude Code session with Remote Control, named after a project (wraps claude-tmux) - [/review-minimax](memory/skill-review-minimax.md) — First-pass MiniMax code review of agent branches; findings file adjudicated in-session; pre-filter before /code-review - [/review-loop](memory/skill-review-loop.md) — Supervised delivery loop: discover → plan → spec → Sonnet tests → MiniMax worktree code → integrate → deploy → verify live, MiniMax-reviewed at every stage +- [review-loop-run](memory/script-review-loop-run.md) — Launch/track detached MiniMax reviews of review-loop artefacts (verify/plan/spec/tests/code) from per-kind prompt templates; `counts` exits 4 on CRITICAL/HIGH - [/ci-triage-minimax](memory/skill-ci-triage-minimax.md) — MiniMax triage of failed Gitea Actions runs via gac; failing step + cause file; after `gac tail` exits 1 ## References diff --git a/memory/script-review-loop-run.md b/memory/script-review-loop-run.md new file mode 100644 index 0000000..a2f807b --- /dev/null +++ b/memory/script-review-loop-run.md @@ -0,0 +1,30 @@ +# 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). diff --git a/memory/skill-review-loop.md b/memory/skill-review-loop.md index 286dd86..f23092c 100644 --- a/memory/skill-review-loop.md +++ b/memory/skill-review-loop.md @@ -8,7 +8,7 @@ `/review-loop [ …] [--from discover|plan|spec|tests|code|integrate|deploy]` -Requires: MiniMax profile, `mm-worktree-task` (small-scripts), `ask-minimax-run`, `cp-cli` context for the project, `gac`, cluster access for the deploy stage. +Requires: MiniMax profile, `mm-worktree-task` and `review-loop-run` (small-scripts), `cp-cli` context for the project, `gac`, cluster access for the deploy stage. ## How it works