/dev-process-toolkit:spec-review [requirement-id or 'all']from dev-process-toolkit
Audits implementation against project specifications to find deviations, missing features, or inconsistencies. Delegates audit work to a forked subagent and renders a user-facing report.
Ships in dev-process-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Audit the implementation against the project specifications for: $ARGUMENTS
The orchestrator runs in the main context (no context: fork) so it can parse arguments, resolve scope, drive the fork, parse the returned spec-review-result fenced block, and render the user-facing report. The actual audit work — reading FRs, tracing ACs to code/tests, classifying Done/Missing/Partial, scanning for cross-cutting drift — happens inside the forked spec-reviewer subagent via the spec-review-audit child skill. This isolates the read-only audit pass from the orchestrator's argument-parsing + report-rendering surface (second canonical instance of the audit-fix loop pattern after /tdd).
Tracker-mode probe — Before any other step:
docs/patterns.md § Tracker Mode Probe). If CLAUDE.md has no ## Task Tracking section, mode is none and ACs are read from specs/frs/*.md. If a tracker mode is active, AC traversal pulls the canonical AC list from the active adapter's pull_acs(ticket_id) instead of parsing local specs; local specs/ still provides FR titles, descriptions, and traceability context (Path B). See docs/spec-review-tracker-mode.md for the full tracker-mode flow.Parse arguments + resolve scope — $ARGUMENTS is one of:
STE-NNN, ULID, or specs/frs/<id>.md path)M<N>)all (audit every live FR)Resolve to a list of FR file path(s) under specs/frs/ (excluding archive/) and the changed-files surface to scan. This is the per-invocation input the audit fork needs — the orchestrator does not read the FR bodies itself; it hands the paths to the fork.
Those paths settle which checkout is in scope. Record the run against it, before the fork is dispatched, with bun run "${CLAUDE_PLUGIN_ROOT}/adapters/_shared/src/gate_receipt.ts" spec-review "<that checkout root>". If it refuses, stop and report its block verbatim — the PR gate reads that receipt inside the repository the PR is opened for, so without it gh pr create is refused later with no explanation.
Only if that call also printed outcome: on, after the audit result is parsed record its verdict with bun run "${CLAUDE_PLUGIN_ROOT}/adapters/_shared/src/gate_receipt.ts" outcome spec-review "<that checkout root>" <pass|fail>: pass when drift_count is 0 and every traceability row is done, else fail.
Only if that receipt call also printed review_findings: on, after the audit result is parsed write the fork's full output to a temp file and record its counts with bun run "${CLAUDE_PLUGIN_ROOT}/adapters/_shared/src/review_findings_receipt.ts" record "<that checkout root>" spec-review "<that file>".
Dispatch the audit fork — Invoke Skill('dev-process-toolkit:spec-review-audit') with the rendered prompt body:
The child skill carries context: fork + user-invocable: false + agent: spec-reviewer. It runs in an isolated context with a read-only toolset (Read, Grep, Glob); it cannot Write, Edit, run Bash, or spawn nested Agents. It does the trace + classify + drift-scan work and ends its turn with exactly one fenced ```spec-review-result block.
Parse the fenced block — Call parseSpecReviewResultBlock(stdout) from adapters/_shared/src/spec_review_result.ts on the child's full output. The parser returns { ok: true, block } on conforming output or { ok: false, reason } on a format violation. The block payload is:
block.traceability // one row per AC: { ac, impl, test, status }
block.advisory_findings // bullet entries from `## Findings`
block.drift_entries // bullet entries from `## Drift hints`
block.drift_count // == drift_entries.length (sentinel `(none)` excluded)
Re-check the tree before rendering. Re-check each file-existence claim in the audit result (a file exists, is absent, or was deleted) against the tree with one Glob per claimed path. A contradicted claim is dropped from the traceability rows and findings before the report is rendered; a claim is contradicted when Glob finds a file the audit called absent or deleted, or finds nothing where it said a file exists. The report says so in one line: dropped <N> file-existence claim(s) the tree contradicts: <path>, ….
Render the user-facing report — Emit, in this order:
a. Traceability map — one line per AC, format AC-X.Y → file:line, test-file:line (or (not found) for status: missing):
AC-HG95V1.1 → src/feature.ts:42, tests/feature.test.ts:10
AC-HG95V1.2 → (not found)
AC-HG95TY.1 → src/service.ts:15, tests/service.test.ts:8
BOUNDED, and inside the fence. One line per AC does not fit above the fence — a typical FR carries 6–9 ACs and a milestone audit many more. The map rides inside the block as an ACs audited: <N> — <D> done, <Mi> missing, <P> partial summary: row, then at most the first 3 AC rows as first 3 of <N> — except that every missing and partial AC is named in full, ahead of the done rows and never bounded away: a gap is what the operator must act on. The total <N> is always stated, so the bound is never a silent truncation, and block.traceability still carries every row for a caller that needs them all. Authoring shape: docs/stage-status-block.md § How a stage FITS.
b. Status table — the same rows in tabular form. Superseded for the CLOSING report by the bounded map above: it is reference material to render inline when the operator asks for the full audit, not verbatim content the closing report reproduces above the fence.
| Requirement | Status | Implementation | Notes |
|---|---|---|---|
| AC-HG95V1.1 | ✓ Done | src/feature.ts:42 | |
| AC-HG95V1.2 | ✗ Missing | — | Not implemented |
| AC-HG95V1.3 | ⚠ Partial | src/feature.ts:15 | Missing edge case |
c. Drift hint (see § Live-spec drift refresh hint below — fed by block.drift_count).
d. Summary — Overall completion %, critical gaps, recommended next steps.
If — and only if — the user's query references a milestone ID, tracker ref, or short-ULID tail that is not present in the live specs/plan/ or specs/frs/ tree, look it up directly in specs/frs/archive/<name>.md (where <name> is the tracker-ID or short-ULID stem) or specs/plan/archive/<M#>.md (for an archived milestone). There is no rolling index file — the filename encodes the identifier. If the target file does not exist, skip silently — do not error.
Never read archived content during a normal review — only live spec files count. Archives are historical context for explicit queries, not a drift source.
parseSpecReviewResultBlock returns { ok: false, reason } when the child's output is missing the fence, carries multiple fences, has a wrong role: line, is missing one of the required sections (## Traceability map, ## Findings, ## Drift hints), or has a malformed traceability row.
On the first format violation, the orchestrator performs a single bounded retry per the audit-fork mode-D pattern: re-invoke Skill('dev-process-toolkit:spec-review-audit') with the narrow retry prompt "re-emit your last message with a valid spec-review-result fenced block at the end of your turn." No semantic re-prompt — the retry budget is one round, format-only, and runs independently of any semantic-failure budget (mirroring /tdd's mode-D contract).
On the second format violation, the orchestrator halts with the NFR-10 canonical refusal shape — a single file:line — reason note naming the offending part of the child's output (carried from the parser's reason string), followed by a remedy line pointing the operator at the audit-fork contract (agents/spec-reviewer.md + skills/spec-review-audit/SKILL.md). The halt is a real failure surfacing, not a routine pause; the orchestrator does not silently emit a partial report.
After the verdict line is rendered (before the closing summary at step 4d), feed block.drift_count to formatDriftHint(count) from adapters/_shared/src/spec_review_drift_hint.ts. The helper owns the threshold (>= 2) and the literal line shape — the orchestrator emits the helper's return value verbatim when it is non-null:
Live-spec refresh suggested — N drift(s) found in cross-cutting specs; consider rerunning /spec-write before next /implement.
When drift_count is 0 or 1, formatDriftHint returns null and the orchestrator omits the hint entirely — the verdict line stands alone. The status block supersedes the closing shape this section formerly mandated; when the hint fires it is a single line of the prose lead-in above the fence, never a block reproduced beneath it.
Threshold rationale (>= 2, not > 0). /implement routinely produces single-line cosmetic drifts during normal /implement churn (e.g., a stale <!-- TODO --> comment, a placeholder line whose path was just renamed). Surfacing a refresh hint on every single-drift audit would train operators to ignore it. >= 2 means "drift is accumulating" — actionable, worth interrupting for.
The threshold + literal-line shape live in adapters/_shared/src/spec_review_drift_hint.ts (formatDriftHint(count)) so the rule is integration-testable across 0 / 1 / 2 / 4 drift fixtures (tests/spec-review-drift-hint.test.ts). Per the migration split: the audit fork emits the count (so drift_count >= 2 is the canonical threshold check), main emits the line — both halves of the rule remain testable, and bypassing the helper string and re-deriving the line inline is a contract violation caught by the doc-conformance test.
Closing summary — the status block. /spec-review closes with exactly one stage-status-block fence as the LAST thing in its report, with at most 12 lines of prose lead-in above it — the block replaces the narration this contract formerly mandated rather than riding beneath it. Fixed section order, the - (none found) fallback and the caps live in docs/stage-status-block.md; adoption is graded by adapters/_shared/src/stage_block_adoption.ts. Skip this block when the invocation body carries the driven-run marker: the orchestrator drives the next step in the same turn.
stage: spec-review # then milestone, status, summary, gate, drive, e2e, follow_ups in fixed order — docs/stage-status-block.md
spec-review-result is the only return channel from the fork.Read, Grep, Glob).formatDriftHint(block.drift_count).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nesquikm/dev-process-toolkit --plugin dev-process-toolkit29 skills in this plugin
/best-practicesManage the project best-practices manifest at `specs/best-practices.yaml`. Add, edit, delete, or list entries cataloguing house best-practices docs with scope globs and topics that feed guidance retrieval into planning and implementation./brainstormSocratic design session for greenfield features with open solution spaces. Clarifies goals one question at a time, proposes 2-3 approaches with tradeoffs, gets design approval, then feeds into /spec-write./debugStructured debugging protocol for failed gate checks, failing tests, unexpected behavior, or a reported bug. Use when /gate-check or /tdd fails and the cause is unclear, or when a reported bug (a symptom, a ticket, a bug FR) needs its cause found and a test that proves the fix. Phases: Root Cause → Pattern Analysis → Hypothesis Testing → Implementation./deliverFull delivery pipeline orchestrator — takes a feature request from idea through specs to shipped, merged milestones by chaining the toolkit's phase skills end-to-end./depsManage the sibling-package dependency manifest at `specs/deps.yaml`. Add, edit, delete, list, or sync entries that feed topic-aware retrieval into /brainstorm and /spec-write via the deps-researcher fork./deps-researchInternal research fork — invoked exclusively by /brainstorm and /spec-write via context:fork pairing with the deps-researcher subagent. Returns topic-aware sibling-package retrieval as a ≤25-line block. Do not invoke directly.Other plugins' skills for the same job