Review Increment
One review surface (it replaces the old grill / code-reviewer / judge-llm passes).
Reads the increment's spec, its diff and the code around it, then reports what is
actually wrong — with path:line for every claim. Writes
reports/review.md + reports/review.json under the increment.
specweave complete prints a notice when review.md is absent but never blocks.
Usage
sw:review <increment-id> # single adversarial pass
sw:review <increment-id> --full # 3 parallel lenses: correctness, security, spec-compliance
Rules
- Fresh context. The session that wrote the code never approves it. Run the pass
through a subagent (Claude Code:
Task({ subagent_type: "general-purpose", … })) or a
new session in any other tool. If you wrote this code in this context and cannot spawn
one, say so in the report instead of claiming an independent review.
- Every finding cites
path:line and states a concrete failure: inputs or state →
wrong output, crash, data loss, or leak. No "consider refactoring", no style opinions.
- Re-verify before reporting. Re-open the cited lines — and run the test that would
fail — and drop anything that does not survive. A wrong finding costs more than a
missed one. Unverifiable but plausible findings are reported as
plausible, not as fact.
- Severity: critical / high / medium / low. Only critical and high are blocking.
- Nit cap 5. At most five low findings; if there are more, report the five worst and
one line saying how many were dropped.
- Scope is the increment's diff, not the repository:
git diff $(git merge-base HEAD <base>)...HEAD -- <the tasks' Files>.
Steps
- Scope: read
spec.md (ACs + Approach) and the Files: fields in tasks.md.
Collect the diff for those files plus the code they call.
- Pass — in this order:
- correctness: wrong logic, unhandled error paths, races, off-by-one, resource leaks;
- security: injection, path traversal, secret leakage, missing authz, unsafe spawn/exec;
- spec-compliance: ACs marked done but not implemented, tests that assert nothing,
behaviour that contradicts spec.md.
With
--full, run those three as parallel subagents and merge their findings
(dedupe by file:line + summary).
- Verify each candidate finding as per rule 3.
- Report: write both files (shapes below).
- Hand back: fix critical/high findings yourself or hand them to
sw:do, then re-run
specweave verify <id> and close with sw:done.
Report shape
reports/review.md:
# Review — <id> <title>
Verdict: fix first | ship · reviewed <n> files · <n> findings (<n> critical, <n> high)
Reviewer context: subagent | new session | same session (NOT independent)
## [critical] src/core/tasks/ledger.ts:142 — stale claim never released
Given two agents claim T-01 inside the lease window … → the second write wins and the
first agent's `done` line is dropped.
Fix: compare-and-append on the claim line before writing.
reports/review.json (machine-readable, same findings):
{
"ok": false,
"increment": "0042",
"reviewedAt": "2026-09-02T12:00:00Z",
"mode": "single",
"findings": [
{
"severity": "critical",
"file": "src/core/tasks/ledger.ts",
"line": 142,
"summary": "stale claim never released; second writer drops the first done line",
"confidence": "confirmed"
}
],
"droppedNits": 0
}
ok is true only when there is no critical or high finding.
Anti-patterns
- Approving your own work in the same context — that is the one thing this skill exists to prevent.
- Findings without a line number, or with a line number you did not re-read.
- Padding the count with style nits (see the nit cap).
- Reviewing the whole repo instead of the increment's diff.
Resources
1---2name: review3description: Adversarial fresh-context review of an increment before it ships. Every finding cites path:line and is re-verified. Use when saying "review", "grill this", or "critique the implementation".4---56# Review Increment78One review surface (it replaces the old grill / code-reviewer / judge-llm passes).9Reads the increment's spec, its diff and the code around it, then reports what is10actually wrong — with `path:line` for every claim. Writes11`reports/review.md` + `reports/review.json` under the increment.12`specweave complete` prints a notice when review.md is absent but never blocks.1314## Usage1516```17sw:review <increment-id> # single adversarial pass18sw:review <increment-id> --full # 3 parallel lenses: correctness, security, spec-compliance19```2021## Rules22231. **Fresh context. The session that wrote the code never approves it.** Run the pass24 through a subagent (Claude Code: `Task({ subagent_type: "general-purpose", … })`) or a25 new session in any other tool. If you wrote this code in this context and cannot spawn26 one, say so in the report instead of claiming an independent review.272. **Every finding cites `path:line`** and states a concrete failure: inputs or state →28 wrong output, crash, data loss, or leak. No "consider refactoring", no style opinions.293. **Re-verify before reporting.** Re-open the cited lines — and run the test that would30 fail — and drop anything that does not survive. A wrong finding costs more than a31 missed one. Unverifiable but plausible findings are reported as `plausible`, not as fact.324. **Severity**: critical / high / medium / low. Only critical and high are blocking.335. **Nit cap 5.** At most five low findings; if there are more, report the five worst and34 one line saying how many were dropped.356. **Scope is the increment's diff**, not the repository:36 `git diff $(git merge-base HEAD <base>)...HEAD -- <the tasks' Files>`.3738## Steps39401. **Scope**: read `spec.md` (ACs + Approach) and the `Files:` fields in `tasks.md`.41 Collect the diff for those files plus the code they call.422. **Pass** — in this order:43 - correctness: wrong logic, unhandled error paths, races, off-by-one, resource leaks;44 - security: injection, path traversal, secret leakage, missing authz, unsafe spawn/exec;45 - spec-compliance: ACs marked done but not implemented, tests that assert nothing,46 behaviour that contradicts spec.md.47 With `--full`, run those three as parallel subagents and merge their findings48 (dedupe by `file:line + summary`).493. **Verify** each candidate finding as per rule 3.504. **Report**: write both files (shapes below).515. **Hand back**: fix critical/high findings yourself or hand them to `sw:do`, then re-run52 `specweave verify <id>` and close with `sw:done`.5354## Report shape5556`reports/review.md`:5758```markdown59# Review — <id> <title>60Verdict: fix first | ship · reviewed <n> files · <n> findings (<n> critical, <n> high)61Reviewer context: subagent | new session | same session (NOT independent)6263## [critical] src/core/tasks/ledger.ts:142 — stale claim never released64Given two agents claim T-01 inside the lease window … → the second write wins and the65first agent's `done` line is dropped.66Fix: compare-and-append on the claim line before writing.67```6869`reports/review.json` (machine-readable, same findings):7071```json72{73 "ok": false,74 "increment": "0042",75 "reviewedAt": "2026-09-02T12:00:00Z",76 "mode": "single",77 "findings": [78 {79 "severity": "critical",80 "file": "src/core/tasks/ledger.ts",81 "line": 142,82 "summary": "stale claim never released; second writer drops the first done line",83 "confidence": "confirmed"84 }85 ],86 "droppedNits": 087}88```8990`ok` is `true` only when there is no critical or high finding.9192## Anti-patterns9394- Approving your own work in the same context — that is the one thing this skill exists to prevent.95- Findings without a line number, or with a line number you did not re-read.96- Padding the count with style nits (see the nit cap).97- Reviewing the whole repo instead of the increment's diff.9899## Resources100101- [Official Documentation](https://verified-skill.com/docs/reference/skills#review)