/sdlc:review [issue-key] [--lens=<single>] [--against=<ref>]from sdlc
Gate 2.5 — paired-lens post-implementation diff review. Spawns two reviewer agents in parallel (lens=adherence + lens=quality), each writing to its own spec phase section. Joins verdicts; the lower wins. Verdict PASS/PASS_WITH_NOTES clears Gate 2.5; REVISE triggers implementer fix.
Ships in sdlc. Installing the plugin adds it to Claude Code.
Gate 2.5 — post-implementation diff review with two parallel lenses. Spawns the reviewer agent twice in parallel:
target=<diff>, against=<spec-path>, lens=adherence → "Did we build what we said?"target=<diff>, against=<quality-canvas>, lens=quality → "Is this well-built?" (spec-blind by construction)Each writes verdict + findings to its own spec phase section (Diff Review — Adherence and Diff Review — Quality respectively). This command joins the two verdicts and emits the combined outcome.
The two-lens shape is load-bearing: a single reviewer with mixed lens systematically collapses one of these into the other. Real findings live in the gap between "what we said" and "what's well-built." See the critique skill § "Lens taxonomy" for the rationale.
Workflow judgment — for halt recovery from REVISE, see the
sdlc-loopskill.
Branch: !git branch --show-current 2>/dev/null || echo "(not a git repository)"
Status: !git status --short 2>/dev/null || echo "(not a git repository)"
Recent: !git log --oneline -5 2>/dev/null || echo "(no git history)"
/sdlc:review <ISSUE-KEY> [--lens=<single>] [--against=<ref>]
$1: tracker issue key (e.g. ABC-101).
Flags:
--lens=<single>: run a single reviewer (lens=adherence | quality | logic | scope | mixed) instead of the paired default. Use for spot checks.--against=<ref>: override the against reference for the single-lens form. Ignored under the paired default (paired runs always use spec + quality-canvas).| Component | Type | Purpose |
|---|---|---|
task-management/{value} | primitive | Issue resolution, envelope post routing |
reviewer | agent | Spawned twice in parallel under paired mode |
critique | skill | The discipline (loaded by each reviewer) |
canvases/spec | canvas | Defines the Diff Review phase sections |
canvases/quality-checks | canvas | Input to the quality lens (when present) |
Read .claude/sdlc.yml. Resolve the spec path per artifact_paths (stack-co-located preferred). If no spec exists, halt. You do not need to read phases — the phase-tuning PreToolUse hook applies per-phase model/effort/turn tuning to both reviewer spawns in Step 3 automatically.
Resolve the diff ref:
git diff main...HEAD on the current branch--lens=<single> is set → single-lens mode (one reviewer, no join).For each phase section the run will write to (Diff Review — Adherence and/or Diff Review — Quality), detect first-run vs re-run by inspecting current content:
_Awaiting adherence review._ / _Awaiting quality review._) → rerun = false.**Verdict:** line → rerun = true. The implementer presumably addressed prior findings; we're re-checking.Pass rerun: <true|false> per-reviewer to the spawned agents in Steps 3a/3b.
Both reviewers Edit the same spec file (different sections, but same file). The Claude Code harness does not guarantee atomic Edit serialization across parallel subagents, so spawn sequentially to avoid TOCTOU races — Adherence first, then Quality:
Per-phase tuning: don't pass model: on either spawn — the phase-tuning PreToolUse hook injects sdlc.yml's phases.reviewer tuning (model / effort / …) at the spawn boundary (frontmatter default stands when unset).
Agent A (first; await completion before spawning B):
subagent_type: "reviewer"
description: "Adherence review on <$1> diff"
prompt: "
target: <diff-ref>
against: <resolved-spec-path>
lens: adherence
issue: $1
phase_section: Diff Review — Adherence
skip_tracker_post: true # /sdlc:review posts the joined envelope
rerun: <per Step 2 detection for adherence section>
"
Agent B (after A returns):
subagent_type: "reviewer"
description: "Quality review on <$1> diff"
prompt: "
target: <diff-ref>
against: quality-canvas # symbolic; reviewer resolves to canvas file
lens: quality
issue: $1
phase_section: Diff Review — Quality
skip_tracker_post: true # /sdlc:review posts the joined envelope
rerun: <per Step 2 detection for quality section>
"
Critical invariant: Reviewer B's prompt MUST NOT include the spec path. The quality lens is structurally spec-blind. The reviewer agent enforces this at parse-time (halts if lens=quality + against looks like a spec); this command pre-enforces it by passing quality-canvas symbolically (which the reviewer resolves to the canvas file).
Why sequential, not parallel: Both reviewers Edit <spec-path> — different sections, but same file. The Claude Code harness does not document atomic Edit serialization across concurrent subagents, so a TOCTOU race is possible. Sequential spawn costs ~1 extra minute of wall time and eliminates the race entirely. If the platform later guarantees Edit serialization, this command can switch to parallel — until then, A→B sequential is the contract.
Agent({
subagent_type: "reviewer",
description: "Review on <$1> diff (<lens>)",
prompt: "
target: <diff-ref>
against: <--against value, or default for lens>
lens: <--lens value>
issue: $1
"
})
If --against was omitted, default per lens:
adherence → spec pathquality → quality canvaslogic → spec path (cited references read from there)scope → plan.yaml for the stackmixed → spec pathWhen both reviewers return, read both envelopes. Join:
joined_verdict = min(A.verdict, B.verdict)
# order: PASS > PASS_WITH_NOTES > REVISE > BLOCK
joined_findings = A.findings ∪ B.findings
# de-duplicated by (location, description) — same finding
# may surface under both lenses
Print:
Review complete on <$1>: <joined-verdict>
Adherence: <A.verdict> · <A.findings_count.blockers> blockers
Quality: <B.verdict> · <B.findings_count.blockers> blockers
Spec phase sections written:
- <spec-path>#diff-review-adherence
- <spec-path>#diff-review-quality
Branch on joined verdict:
PASS / PASS_WITH_NOTES → print Gate 2.5 cleared. Next: validator (or merge under gate_mode: auto-all).REVISE → print Implementation needs revision. Next: /sdlc:develop <$1>.BLOCK → print Architectural conflict — human arbitration required.Emit a joined envelope (not the individual reviewer envelopes — those went to the phase sections). The joined envelope reuses the reviewer phase shape with an additional joined: true field rather than introducing a new phase mapping:
phase: reviewer (same as individual; envelope canvas doesn't need a new mapping)joined: true (top-level field — present means this is the multi-lens join, not a single reviewer's output)verdict: the joined verdictfindings_count: summed across lenses (de-duplicated)lenses_run: [adherence, quality] (or [<single>] in single-lens mode)artifact.paths: array of both spec phase section paths (instead of singular artifact.path)| After Step | Gate | Approval Criteria |
|---|---|---|
| Joined verdict computed | Gate 2.5 (paired review) | Joined verdict ≠ REVISE/BLOCK |
| (downstream) | Gate 2 (PR review, if applicable) | Per gate_mode: human PR review under interactive, skipped under auto-all |
Review complete on ABC-101: PASS_WITH_NOTES
Adherence: PASS · 0 blockers
Quality: PASS_WITH_NOTES · 0 blockers · 8 notes
Spec phase sections written:
- .ai-docs/stacks/foo/specs/abc-101.md#diff-review-adherence
- .ai-docs/stacks/foo/specs/abc-101.md#diff-review-quality
Gate 2.5 cleared. Next: validator (or merge under gate_mode: auto-all).
/design first.gate_mode: auto-all).REVISE cycle, to re-check the fixed implementation.--lens=quality on a WIP commit to catch craft issues early)./sdlc:critique (Gate 1.5).validator, not the reviewer.What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub pattern-stack/claudecode-patterns --plugin sdlc13 commands in this plugin
/answer/answer — the answer, on its ownDriving mode — deliver the answer to the work just finished as a message of its own, headline pushed to the phone first, so the user hears the answer without the working notes. Claude queues this on itself through Herdr at the end of a working turn; it is rarely typed./browse/browse — Browser InteractionInteract with the user's browser — navigate, click, type, inspect, or anything else/canvas=== Project SDLC overlay ===Author / tune / validate / reverse-engineer / explain a canvas (a template + instructions pair under .claude/canvases/<name>/) via the canvas-author agent. Probing schema-aware dialog; never writes without confirmation. v1 ships tune + validate./critique/sdlc:critiqueGate 1.5 — single-reviewer spec critique. Spawns the reviewer agent with lens=mixed against cited code; writes verdict + findings to the spec's Spec Review phase section. Verdict PASS/PASS_WITH_NOTES clears Gate 1.5; REVISE triggers specifier re-run; BLOCK halts for human arbitration./design/designGenerate the implementation strategy for a tracker issue and post it. In strict mode (default) sets state:awaiting-strategy-review and halts; in auto mode (per gate:auto label) sets state:strategy-approved directly and completes. Resolution by gate:* label → sdlc.yml.gate1_default./develop/developTopology A — work one issue end-to-end with a flat team of split-pane teammates. Composes the team from sdlc.yml develop_team plus the issue's needs:* labels. Accepts a tracker issue key OR an approved spec path.Other plugins' commands for the same job