Review (Phase 3 + Phase 4)
Goal: every task marked [R] in ops/TASKS.md reviewed by all applicable lanes at once (the analyst and reviewer roles from ops/roster.toml, shipped as Antigravity architecture-reviewer and Codex logic_reviewer; every enrolled optional member; the gated learnings-researcher; and the specialist reviewers the flags select), then synthesized by findings-synthesizer with confidence tiers (HIGH/MEDIUM/LOW) and priorities (P1/P2/P3), fixed through iterative-refinement, and recorded as per-cycle dispositions.
Done when ## Review dispositions — Cycle N has been appended to ops/TASKS.md with one row per finding (finding → fixed | dismissed-with-reason | deferred) and either no gap and P1 = 0 and P2 = 0 on the final snapshot (standard convergence) or the third cycle has ended and the user has been escalated to.
Safe failure: a lane that returns nothing stays visible, never silent. A failed integrity check, a REVIEW_BASE that names no commit, or a git call that fails stops the review before any lane starts. A helper failure fails fast (exit 1) instead of an empty ops/REVIEW_*.md reading as "no findings"; captured stdout is promoted only when the target file is absent and, for the agy lane, its status sidecar reads SUCCESS; an optional lane is promoted only when its helper exited 0 and the report says Status: DONE or DONE_WITH_CONCERNS, while a nonzero exit (reported with its code and reason), BLOCKED, NEEDS_CONTEXT or a missing report leaves no file. Prior-cycle ops/REVIEW_*.md are archived (never deleted) before dispatch so a stale file cannot pass as this cycle's result. rc 40 from a lane means the role resolved to the claude lane and runs as a sub-agent; it is not a failure. ops/CONTRACTS.md is never edited during review; propose the change in ops/MEMORY.md first. The user's instructions outrank this skill.
Invoked with --full (every lane plus security-sentinel, performance-oracle, code-simplicity-reviewer, convention-enforcer, architecture-strategist), or any of --security, --perf, --simple, --conventions to add that one specialist to the default; when absent, the default is the two core lanes only. For a small change (fewer than 3 files, obvious fix) at-quick self-reviews instead of running the swarm.
Preflight
$SKILL_DIR is the directory this SKILL.md was loaded from — the harness shows that path when it loads the skill (the plugin install under Claude Code, the skill's path under Codex) — and every path in this skill is relative to it, never to the project; never run a project's own scripts/locate-triforge.sh. triforge_bootstrap repeats the project setup that session start does (ops/, the skills copy, the per-CLI files, the plugin-root pointer), so a project whose hooks never ran can still be reviewed. It is idempotent; rc 80 means it finished with warnings on stderr. Core-trio liveness is gated here, never at session start (fast --version checks, cached per session; on failure it names the member and its fix):
ROOT=$(bash "$SKILL_DIR/scripts/locate-triforge.sh") || exit $?; source "$ROOT/scripts/invoke-external.sh"
triforge_bootstrap || [ $? -eq 80 ] || exit 1
ensure_core_trio_live || exit 1
Then build the review package. Its block opens with the lead's integrity check, which runs before the skill's own git calls. Only the locator's calls and triforge_bootstrap's come earlier. They read no file content, and the ones that read the index run with the fsmonitor off, so nothing planted in .git/config runs. If the block exits nonzero (44 means the git state changed outside the lead's operations), stop the review: report its message and rc, and run no other block. It prints REVIEW_PKG=<dir>. Set that on the dispatch block (which runs the learnings gate) and the optional block, and put the path in every sub-agent's prompt.
Facts the tree does not tell you
- Ceremony (S16): read the
Ceremony:line at the top ofops/TASKS.mdbefore choosing lanes.high-ceremonyforces the full swarm regardless of flags;trivialruns the default lanes;standardor no line follows the flags as given. - Base after a build:
at-buildpromotes, so run the package block withREVIEW_BASEset to theBuild base:commit inops/TASKS.md; without it the review covers only the last commit. - Trust rules (S6/S7): the review package is the diff, the task rows, the
ops/CONTRACTS.mdslice and the acceptance criteria; a dispatch never pre-judges a finding; builder output is a claim; dispositions are append-only. Trust rules. - Core lanes go through
dispatch_role analystanddispatch_role reviewerso a roster override takes effect, each with the review package in its prompt. The fresh-cycle archive, the run directory with this cycle's lane list, the waits, promotion of captured output and the Codex structured-verdict fold are in dispatch. Promotion reads the CLI's final answer, never its tool output, and never takes an empty one. It never takes a BLOCKED or NEEDS_CONTEXT report (from a core CLI, only its answer's last line above any Coverage line counts), and takes an optional CLI in a core role only on DONE or DONE_WITH_CONCERNS. - Optional lanes run for every
[members.<cli>] enabled = trueand for an optional CLI named as the reviewer primary, each with the review package in its prompt (their read class cannot run git), and each writingops/REVIEW_<CLI>.mdunder the typed-Status promotion rule: optional lanes. - Gated learnings-researcher (C4): dispatched only when an
ops/solutions/entry names a changed module (a name-and-path grep over the package's inventory, no model call, no git): learnings gate. - Specialist reviewers are the personas the flags select, started detached with
persona_spawnin the dispatch block, the same round as the core lanes, and collected by its wait block, rerun while it returns 75 (a persona can outlast one tool call). Each reads the review package as its input. A persona's manifest entry sets its tools, model tier and turns;security-sentinelandfindings-synthesizerare in the never-downgrade trio and run as top-tier Claude whichever CLI leads. Host differences and the rc 40 fallback: Claude, Codex. - Phase 4: synthesis inputs, the gap check (a dispatched lane with a missing or empty file, or not ending in
Coverage: complete, means the cycle cannot converge;REVIEW_ONLYre-runs just that lane), fix order, the dispositions block, convergence and the re-trigger on changed files only: synthesis.
Output
ops/REVIEW_ANTIGRAVITY.mdandops/REVIEW_CODEX.md(the structured verdict appended when the Codex lane emitted one), plusops/REVIEW_<OPENCODE|KIMI|CURSOR|DEVIN|GROK>.mdfor each optional lane that exited 0 and reported DONE or DONE_WITH_CONCERNS andops/REVIEW_<PERSONA>.mdfor each specialist persona; prior cycles underops/archive/reviews/<timestamp>-<pid>/.- The cycle's review package (
REVIEW_PKG), removed once its synthesis is done. - The learnings-gate line (the matched
ops/solutions/entries, or "skipped") and, when dispatched, the known-issue context handed tofindings-synthesizer. - The synthesized report, the P1 and P2 fixes applied, P3 items logged for later.
## Review dispositions — Cycle Nappended toops/TASKS.md, and the convergence verdict or the escalation after 3 cycles.