spec:review
Review a finished spec branch with adversarial reviewers, then check each finding with a blind verifier.
Inputs
Section titled “Inputs”| Name | Type | Required | Description |
|---|---|---|---|
spec-name |
string | yes | The spec whose branch diff is reviewed |
Outputs
Section titled “Outputs”review/metrics.md, one file per reviewer, frozen reproductions inreview/repro/,review/verdicts.jsonlandreview/rollup.mdreview/docs.mdandreview/docs-waivers.mdwhen the docs root holds docsreview/decisions.jsonl, the owner’s decision history- Fix tickets added to the plan for the findings the owner picks, with a fresh
goal-prompt.mdfor them
How it runs
Section titled “How it runs”- Start clean. Every ticket in the plan must be Done or Blocked; otherwise it points to the goal run and stops. It commits any Blocked rows a goal run left in the plan with
guard commit-plan, and the working tree must be clean. - Metrics.
guard metricsreports duplication, dead code and complexity for the files the spec changed. A tool that isn’t installed means its check did not run, which proves nothing either way; with no tool at all it exits 3. Attended, the command shows each missing tool with its install hint and asks whether to go on; in a goal run it goes on and lists them first in its report. The code reviewer is told which checks did not run, and no refactor fix ticket relies on one. - Panel. Reviewer subagents read the diff without commit messages:
code-reviewerandtest-masteralways,code-documenterwhenever the project has docs, others when the diff touches their area.code-documenterchecks the docs the spec touched against the code, every doc the diff added or changed included: stale claims, broken citations, a fact repeated across docs, one-sidedrelated:links. It also rules on every doc a ticket marked “checked, no change” and every doc changed by only a few words, so a goal run can’t excuse its own stale docs;guard gatestays closed until each has a ruling. Each writes only its own file inreview/. - Verification. Each blocking or warning finding goes to a fresh verifier in a scratch worktree. It sees the claim, the code and the ticket’s acceptance criteria, never who raised the finding or why. Behavioral claims need a run; a reproduction that fails to run makes the verdict unresolved, never rejected. Reproductions are kept, frozen, in
review/repro/. The verifiers start together, and the command waits for their reports; it never schedules a wakeup or loop as a fallback. - Rollup.
guard rollupbuildsreview/rollup.mdwith every finding, its verdict and the verifier’s token and minute cost. - Your triage. You pick fixes and record won’t-fix or accepted rejections with
guard decide.guard decide <row> revokewithdraws a decision, so the gate judges the row afresh; a row you had decided and now want fixed is revoked before it becomes a ticket. Fixes become tickets in the plan, each typedtest,test-gap,stand-inorrefactor, with a fresh goal prompt.
Rerun it after the fix tickets land: it rechecks each fix against its frozen reproduction instead of starting a new panel.
Inside a goal run it stops after the rollup, records no decisions, adds no fix tickets and ends with BLOCKED: spec:review triage needs the owner.
Next Steps
Section titled “Next Steps”Run the fix tickets through ticket:execute or the printed goal run, then rerun spec:review <spec-name> for the recheck. Run spec:complete once guard gate <spec-name> would pass.