Repository navigation
v0.12.0 — Pre-ship code review
Added
-
An optional code-review gate in the ship step. The agents that wrote a feature cannot review it — they are inside their own reasoning.
/sf:phaseclose-out now offers one independent pass over the finished diff, in a context that never wrote a line of it, immediately before the commit.config.phase.codeReviewdecides whether it runs. Three states, because the default is a question rather than a behaviour:ask(default —/sf:phaseasks yes/no once per ship),always(no prompt),off(skip entirely).init-projectback-fills the key into existing configs without changing behaviour, since absent already read asask.review-scopecomputes the scope deterministically: the base branch,<base>...HEAD(null when branching is off, when you are on base, or when the base ref will not resolve — never a bogus range), the files the executors actually wrote fromfile-links.json, and the repo roots on a multi-repo feature, where those files are the only reliable scope. It also reports a prior verdict and whether HEAD has moved past it, so an unchanged tip re-uses its review instead of paying for a second pass.- The reviewer is a sub-agent, read-only, pinned by
config.models.codeReviewer(defaultsonnet). It reports — it never fixes. Fixing is a decision the user makes afterwards, and a post-review fix re-enters the verification gates. - The gate is built against its real failure mode, which is a noisy reviewer rather than a lazy one. A model handed a bare diff cannot tell a defect from a deliberate decision, so it reports both at the same severity, and after two such reviews the user declines forever and the gate is dead. So
review-scopealso returns acontextPack— the SD,CONTEXT.md, the checklist,VERIFICATION.md(including gaps already known and accepted),project-author.mdand the trace — and the step's standing rules make the reviewer check every critical/high against the spec before writing it, cap taste atlow, and name the inputs and wrong result that a blocking finding produces. Acritical/highmust carrycheckedAgainst(the FR or TC it was tested against);review-collectreturns any that do not asuncheckedBlocking, and/sf:phasesends those back for a re-rate instead of halting a ship on an unchecked claim. review-collectturns the findings intospecs/<feature>/CODE-REVIEW.mdand a deterministic verdict:clean,advisory, orblockingon any critical/high. Blocking halts the ship and hands the user three choices — fix now, ship anyway, or abort.review-accept --noterecords a human's "ship anyway" on disk. Without it the override would live only in a transcript, and the next session would read an unresolved blocker./sf:statussurfaces an unaccepted blocking verdict in its next step.- Codex: the
code-reviewskill is a Claude Code built-in and is not part of the package. The Codex runtime contract tells the host to perform the review itself against the same output contract when it has no equivalent, and keeps the gate's shape either way — a review that was performed but never collected did not happen.
-
/sf:doctornow catches a stale local plugin install (plugin-source-sync). A plugin installed from a local directory marketplace does not run from the source repo: Claude Code copies it into~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/and runs that. The cache path is keyed by version, so while the version string holds still — exactly what a careful maintainer does between releases — edits to the source never reach the running plugin. The failure is silent and total: a new engine command answersUNKNOWN_COMMAND, an edited command doc is simply the old one. Nothing in doctor said so, and finding it by hand costs a session. The check compares the runtime surface (bin,lib,commands,agents,skills,templates,hooks) by content hash, names the differing files, explains why/plugin updatewill not fix it, and hands over a copy-pasteablersync. It is silent for a normal github install, and for a contributor running the engine straight from a checkout.
Notes
- The gate is optional; the hard gates are unchanged.
verify-code, the regression sweep, andVERIFICATION.md: status: passedstill guard the ship on their own, and declining the review is a silent, recorded-nowhere no-op rather than a clean verdict.