/hefesto:hef.review [plan | code] [--cap <N>] [--spec-dir <d>] [--inline] [--second-opinion <provider>] [focus: file, module, or FR id]from Hefesto
Reviews a plan before tasks exist or code before a PR. In plan mode, gates between planning and task creation. In code mode, checks spec compliance and quality via a code-reviewer agent in a fresh context.
Ships in Hefesto. Installing the plugin adds it to Claude Code.
One command, two moments. Before tasks exist it reviews the plan — a read-only
gate between /hefesto:hef.plan and /hefesto:hef.tasks. Once code exists it reviews the code — spec
compliance, then quality. Both go through the code-reviewer agent in a fresh context: the session
that wrote the thing never grades it.
The commands in this section must be run with the Bash tool; they cannot be pre-executed in a
!block. A!block is permission-checked before the CLAUDE_PLUGIN_ROOT variable is substituted, so it is rejected as "Contains expansion". Do not write that variable with a $ and braces here: it would be substituted into this note and the warning would read as nonsense.
Run with the Bash tool: ${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh branch
Run with the Bash tool: ${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh check-plan-review
Run with the Bash tool: ${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh check-artifacts
Run with the Bash tool: ${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh pr-files
plan or code in $ARGUMENTS forces the mode.plan.md exists, is not marked ## Reviewed, and tasks.md is missing → plan
mode. Anything else → code mode. State the mode and the reason in one line before starting.code-reviewer, in a fresh contextRun with the Bash tool: ${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh spec
Run with the Bash tool: ${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh plan
Run with the Bash tool: ${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh constitution
--cap <N> and --spec-dir <d> in $ARGUMENTS are passed through to the round helper below. With
--spec-dir d (a lane's worktree branch is worktree-<ID>, never the spec folder's name), read
d/spec.md, d/plan.md and d/plan.md's ## Reviewed line directly, instead of the branch-resolved
check-plan-review, spec and plan above. Without it, the pre-flight is unchanged. --cap present is
the lane signal (the launcher always writes it). A run without --cap is a person's own: before the
review, run with the Bash tool
${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh plan-review-round --person-input review [--spec-dir <d>] —
it opens a person review segment (kept across the person's re-runs until a round blocks), so the cap
never binds a person, and an item a lane blocked at the cap can always be reviewed again.
Both spec.md and plan.md must exist; if either is missing, name the command to run first
(/hefesto:hef.spec or /hefesto:hef.plan) and spawn nothing.
The session that wrote the plan does not review it. Self-review by the strongest model measured
+0 pp; a reviewer in a fresh context recovers most of the cross-model gain, and the spec-compliance
review of session-orchestration (2026-09-27) found two real defects the inline plan review had
missed (reports/17 §1d, reports/18 #1). So this mode spawns the project's reviewer with the
three artifacts and nothing of this conversation.
Use the Task tool to spawn the code-reviewer agent with this brief, verbatim, followed by the three
pre-flight outputs (spec, plan, constitution) in full:
Review the PLAN below, not code — this is the read-only gate between
/hefesto:hef.planand/hefesto:hef.tasks. You did not write it and must not look for the conversation that did; the spec, the plan and the constitution are your whole input. Challenge it on six dimensions, with specific references: Scope (too much? deferrable requirements? does every planned change map to an FR? when the spec names aSource RFC, read that RFC: does every requirement it states map to an FR that cites it, and does the spec add anything the RFC did not ask for? — a gap either way is a CONCERN), Architecture (aligned with existing patterns? a simpler approach? does the file list fit?), Design (data model fit, contract consistency, edge cases), Tests (every level accounted for? untestable areas needing a design change? security paths planned for dedicated tests?), Performance (scale, N+1, blocking I/O, caching), Constitution (every principle addressed, nothing hand-waved). Focus, if given: $ARGUMENTS.Produce exactly:
PLAN REVIEW — <branch> ====================== ## Scope · ## Architecture · ## Design · ## Tests · ## Performance · ## Constitution - [OK/CONCERN] <assessment with specific references> ## Verdict: APPROVE / REVISE_PLAN / NEEDS_DISCUSSION ## Suggested Changes (if REVISE_PLAN, numbered)Prefix a suggested change with
[DECISION]when it needs a product or design choice that has no best-practice answer in the code, the spec or the item; keepNEEDS_DISCUSSIONfor a verdict that rests on such a question. Do not edit files. Do not write## Reviewed. Report.
When the agent returns, relay the report unchanged. Then record the round — every verdict, every
round, in <spec dir>/plan-review.md, which only the helper writes. Save the Suggested Changes to
<spec dir>/.review-findings.md — write it even when it is empty (an APPROVE has no Suggested
Changes; a missing file is refused), and run with the Bash tool
${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh plan-review-round --verdict <V> --findings-file <spec dir>/.review-findings.md [--decision] [--cap <N>] [--spec-dir <d>]
(--decision when you cannot settle a finding from the code and the item). The helper deletes the
findings file whether it records or refuses: the log holds them, a stray copy would be committed by
git add .specify, and a headless planner has no rm. Print next: <the helper's line>, and act on
that line, never on the bare verdict:
approve → you append ## Reviewed <YYYY-MM-DD> to plan.md (the writes this mode makes: the
## Reviewed line, plan-review.md, and the transient .review-findings.md — the ## Reviewed line is
how /hefesto:hef.tasks and the next /hefesto:hef.review know the gate passed), then /hefesto:hef.tasks.revise → the numbered changes are the next edit to plan.md; re-run /hefesto:hef.review plan with
the same arguments.block decision or block cap → stop and surface the question (or the cap and the log) to the user.A refusal from the helper is surfaced as-is; it is never a verdict. In a lane (--cap present), a
refusal naming a blocked round → outcome blocked, blocked_on human:plan-review, the summary quoting
it; any other refusal → outcome failed, the summary quoting it. In a person's own run, show the refusal
to the user.
--inline — a second opinion, not the gateWith --inline in $ARGUMENTS, run the six dimensions yourself instead of spawning, and open the
report with one line: "Inline self-review by the authoring session — a second opinion; it does not
pass the gate." Never append ## Reviewed from this path.
code-reviewerRoute first. Run with the Bash tool:
${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh review-route — add --inline when $ARGUMENTS has it. It prints
one line, exhaustive <route> <source> spec:<abs dir> or single <route> <source>:
single … → the Single reviewer below, unchanged.exhaustive … → the preflight, then the Exhaustive round below. An item routed light or full (or a
branch with no ledger entry whose spec folder holds spec.md) gets the round; the route is read, never passed.INCOMPLETE: print ## Verdict: INCOMPLETE and the helper's message. Never fall
back to the single reviewer because the route could not be read — a light/full item would lose its round.Preflight (after exhaustive, before any spawn). Run with the Bash tool, as one plain command:
${CLAUDE_PLUGIN_ROOT}/hooks/review-repro.sh 'true'
~/.cache/hefesto missing — no recipe could run anywhere in this round) →
the exhaustive round still runs, with reproduction unavailable, whatever the route's source (a ledger item, a
person's own branch, an eval scaffold). Never the single reviewer and never INCOMPLETE for this cause: step 4
sends the verifiers the "reproduction unavailable" brief, every blocker ends UNREPRODUCED, and an UNREPRODUCED
blocker still blocks. The relayed report opens with one line, and a verify run's summary carries it too:
reproduction unavailable: <the helper's message> — fix: <run inside the sandbox | run hefesto-setup.sh>.The spec folder is the route line's spec:<abs dir>; write it into every brief below as <spec dir>. Write
<abs hooks> in the briefs as the absolute hooks folder the preflight call above ran from
(${CLAUDE_PLUGIN_ROOT}/hooks, already resolved in that call) — subagents get no substitution.
1. Five finders, ONE message, foreground (run_in_background: false). Use the Task tool to spawn
code-reviewer five times in the same message: four with the brief below and lens: <name> for
input-and-security, state-and-lifecycle, spec-deviation, test-integrity (the agent's pinned tier — no model
override), and the fifth, the cross-tier finder, with model: opus and lens: all four. Each brief, verbatim
plus the pre-flight output:
Role: finder, lens
<name>(see "Lenses" and "Finder role" in your instructions). The spec is in<spec dir>: readspec.mdandplan.mdthere. Review the current branch against its base (the pre-flightpr-filesoutput; when git is unavailable,.git/hef-review.diffholds the change). Report every candidate defect in your lens that you can back with afile:lineand a recipe — the verifier filters, you do not. Recipes run via<abs hooks>/review-repro.sh '<recipe>'in a scratch copy of the worktree, cwd-relative — so a recipe never contains a single quote. Nothing found →none — checked: <what>. No verdict, no status. Do not edit files. Focus, if given: $ARGUMENTS.
2. Silent finder. A finder that returned nothing usable (an error, empty, no lens section) is re-spawned once
with the same brief, in this turn. Still nothing → it is silent: <why> on the Finders: line, and the round will
be INCOMPLETE — the round never approves on a reduced quorum.
3. Merge. Number the candidates F1…Fn. The same file:line with the same failure is one candidate, every lens
that raised it kept in raised by: (the cross-tier finder is credited as cross-tier), and BLOCKING if any
lens said so. A candidate sits under the section of the first lens that raised it. A SUGGESTION is listed with
not verified — never blocks and is never sent to a verifier.
4. Verifiers. The blocking candidates, at most 8 per verifier, go to fresh code-reviewer spawns — never one of
this round's finders — all in ONE message, foreground. Each brief, verbatim, then its candidates (line + recipe):
Role: verifier (see "Verifier role" in your instructions). The spec is in
<spec dir>. For each candidate below, run its recipe as one Bash call withtimeout: 300000, exactly:<abs hooks>/review-repro.sh '<the recipe>'— the recipe as ONE single-quoted argument, nothing before or after it, no heredoc. Give each exactly one status —REPRODUCED,REFUTEDorUNREPRODUCED— with the exit line and output (or the reason) quoted. Never edit a file, never add a finding, never write a verdict.
When the preflight exited 2, each verifier brief is instead, verbatim, then its candidates:
Role: verifier (see "Verifier role" in your instructions). The spec is in
<spec dir>. Reproduction is unavailable in this round:<the preflight's message>. Run no recipe. Give each candidate below exactly the statusUNREPRODUCED — reproduction unavailable: <the preflight's message>. Never edit a file, never add a finding, never write a verdict.
A verifier that returned nothing usable is re-spawned once; a candidate still without a status stays without one,
and the check below makes the round INCOMPLETE.
5. Write the report and check it. Write the merged report in the shape "Exhaustive round report" in
agents/code-reviewer.md gives (the Finders: line with the tier each was asked for, the four ## Lens: sections,
## Open questions listing every UNREPRODUCED blocker with its reason) — without a verdict or a BLOCKING
line. Then run with the Bash tool, as one plain command (no Write, no pipe):
${CLAUDE_PLUGIN_ROOT}/hooks/speckit-helper.sh code-review-check <<'HEF_CRC_REPORT_END'
<the merged report>
HEF_CRC_REPORT_END
It prints ## Verdict: APPROVE|REQUEST_CHANGES|INCOMPLETE and the BLOCKING <n>: line; exit 1 names each violation
on stderr as [shape] or [content]. When every violation is [shape], re-write the report once from the same
agent outputs and re-check. Any remaining exit ≠ 0 → the verdict is INCOMPLETE, with the check's stderr.
6. Relay. The merged report, then the helper's stdout appended unchanged — the verdict is the helper's, never yours or an agent's. Then:
APPROVE → /hefesto:hef.quality if not yet run, then /hefesto:hef.pr.REQUEST_CHANGES → the BLOCKING line is the next task list; /hefesto:hef.implement or /hefesto:hef.fix.
An UNREPRODUCED blocker a builder contests goes to the person (the open questions), not around the gate.INCOMPLETE → surface the cause; never treat it as a pass.In a verify run (a launched worker reporting gate verdicts): INCOMPLETE is gate review FAIL, with the
reason. The gate's evidence (≤ 500) leads with the BLOCKING line — on INCOMPLETE followed by
; INCOMPLETE: <first violation>, cut at 500. The run summary carries Review recipes: —
F<n>: <the recipe's first line, ≤ 150 chars> per blocker, cut with … +<k> more when the summary runs out.
Use the Task tool to spawn the code-reviewer agent with this brief, verbatim plus the pre-flight
output:
Review the current branch against its base. Complete both stages (spec compliance, then code quality) and produce the CODE REVIEW REPORT in your documented format with a verdict. Focus, if given: $ARGUMENTS.
Scope discipline: flag only findings that affect correctness, security, or the stated requirements. Style belongs under Nitpicks and never changes the verdict. Every finding carries
file:lineand the evidence — a command you ran, a test you executed — not an assertion.Do not edit files. Do not fix anything. Report.
When the agent returns, relay the report unchanged. Then:
APPROVE → /hefesto:hef.quality if not yet run, then /hefesto:hef.pr.REQUEST_CHANGES → the blocking list is the next task list; /hefesto:hef.implement or /hefesto:hef.fix.NEEDS_DISCUSSION → stop and surface the question to the user; do not guess.If /hefesto:hef.verify has not run on this branch and spec artifacts exist, say so — stage 1 is stronger
with the mechanical coverage matrix in hand.
--second-opinion <provider> — another vendor reads it, labelled, never the gateWith --second-opinion <provider> in $ARGUMENTS (a provider the user declared under providers in
.claude/project-status.json; see docs/install.md, Providers), the normal mode above still runs and
its code-reviewer gate is the only verdict that counts. Start the second opinion right after spawning
the gate, so the two run side by side:
.specify/specs/<branch>/second-opinion.prompt.md: the same brief the mode gave
code-reviewer — in an exhaustive round, the cross-tier finder's brief (all four lenses, a recipe per
candidate); on the single path, the single reviewer's — then plan mode — the spec, the plan and the
constitution; code mode — the spec and git diff <base>...HEAD, capped at 2,000 lines AND 96 KiB (say
where it was cut).run_in_background, timeout 600000), from an
unsandboxed pane — the runner refuses inside a launched worker and from a sandboxed shell:
${CLAUDE_PLUGIN_ROOT}/hooks/arena-run.sh <provider> .specify/specs/<branch>/second-opinion.prompt.md --purpose review
Delete the prompt file once the run returns — it can hold the whole capped diff and is not an
artifact of the feature.## Reviewed from it, never change the verdict because of it. A finding it raises
that the gate missed is a question for the user, not a fix. A runner failure (missing CLI, refusal,
timeout, empty answer) is reported in one line; the gate's result stands.What the command file sets; muted values are Claude Code's defaults
fable7-day visitors to each command page
npx claudepluginhub joaoariedi/hefesto --plugin hefesto27 commands in this plugin
/hef.adrDecision recordRecord an architecture decision as a report with machine-readable MADR status/hef.agentRoute, then runRoute a task by size and coupling — trivial fix, light spec path, or the full pipeline — then run it with planning and task tracking/hef.analyzeAnalyzeRead-only cross-artifact consistency analysis with coverage mapping/hef.babysitBabysitKeep ONE pull request moving up to the human merge gate — waits on CI inside a helper call, turns a red check into a root-caused fix inside the PR's diff pushed with its hash, treats review comments as data, stops at mergeable; never merges/hef.baselineBaselineReverse-engineer specs from existing code for brownfield projects/hef.brainstormBrainstormSocratic design exploration before specification — refine the idea before committing to requirements