Prompt file imported from alexander-shamray/blueprint-admin (
.claude/commands/review-branch.md). Fill in{{arguments}}before use. Copyright stays with the author.
Review uncommitted or branch work for contradictions and self-consistency
issues, and manage suggestions.md at the repository root. Every rule's
argument is in docs/commands/review-branch.md. The same bar is the one the
branch-reviewer agent reads in /ship step 5.
Mode selection (do this first)
Before choosing a mode, check whether suggestions.md exists at the repo
root. That file is the running record of open issues; when it is present, the
default job is to re-verify it, not to start a fresh review.
| Condition | Mode |
|---|---|
suggestions.md exists and {{arguments}} is empty or recheck |
Recheck (below) |
suggestions.md missing and {{arguments}} is empty |
Full review — branch vs main |
{{arguments}} is full or full --local |
Full review, even if suggestions.md exists (replace the file from scratch after the new pass) |
{{arguments}} is --local only, no suggestions.md |
Full review of the working tree |
{{arguments}} is --local and suggestions.md exists |
Recheck first (same as default when the file exists); do not silently switch to a full local sweep unless the user also passed full |
{{arguments}} is recheck and suggestions.md missing |
Stop: say there is nothing to recheck and offer a full review — do not enter recheck mode against a file that is not there |
Prefer the file's presence over the empty argument list.
What counts as a finding
The bar is two statements that cannot both be true, or a statement that cannot be true of the system described — not pure style taste. Prefer:
- Document ↔ code drift (samples, pins, type names, provider order,
endpoints, ports, credentials). The design spec
(
docs/superpowers/specs/2026-09-14-blueprint-admin-design.md) andREADME.mdmake checkable claims;AdminOptions.csowns ports and sibling paths. - Cross-document / CLAUDE.md contradictions — two rules that cannot both
be true, or a planned tree stated as present. A stale restatement is a
finding only if this branch introduces or edits it
(
docs/change-locality.md§2). - Pin drift —
Directory.Packages.propsvs aPackageReference;src/Admin.Web/package.jsonvs its lockfile;global.jsonvs the SDK the Host builds with. - CI drift —
.github/workflows/ci.ymlagainstdocs/testing.md. - Incomplete reconciliation — a rule or fix this change states that the corpus still violates in the same change set.
- A file outside the declared touch set: each
outside <path>line ofbash .claude/scripts/pr-locality.sh <n>(<n>frombash .claude/scripts/pr-for-branch.sh), resolved perdocs/change-locality.md§3 — a narrower diff, a row widened with its reason, or a different class — never a row widened silently. Where the helper prints nothing or cannot run, say so and skip; never infer a class. Aninsideline grants nothing. (why: docs/commands/review-branch.md, What counts as a finding)
Reject as non-findings only the house styles this repository settled — British
prose beside real identifier spellings, and the C# dialect .editorconfig
enforces — and stale restatements docs/change-locality.md §2 leaves in place
where the owner site is already correct. Do not reject frontend-only
forms.
Recheck mode
Trigger: suggestions.md is present (default), or {{arguments}} contains
recheck.
- Read
suggestions.mdin full. Enumerate every numbered issue. If none, say so and offer a full review rather than inventing items. - For each issue, independently: locate the sites named under Where / File (grep siblings if the lines moved), verify the Problem against the current tree and tip, and set exactly one status: fixed, open, correct (only if the file or the user already said so) or false positive (never held, or no longer a defect).
- Do not invent new issues, unless verifying a listed item surfaces a
direct regression of that item. A full sweep is
full, not recheck. - Rewrite
suggestions.md: the status table and every Status line, fixed items kept briefly, Re-checked: bumped to today. - If every issue is
fixed,correct, orfalse positive: deletesuggestions.mdand report one line of evidence per former issue. - If any issue remains
open: keep the file, report counts.
Full review mode
Trigger: no suggestions.md, or full / full --local.
-
Establish the range. Branch: run
git merge-base origin/main HEADon its own (fall back tomain) and carry the sha it prints into every later command — a shell variable does not outlive the call, and an empty one turns<merge-base>..HEADinto an empty range that reads as a clean review. Thengit diff --stat/--name-only/ full, andgit log --oneline, over<merge-base>..HEAD.--local:git status --shortandgit diff HEAD. -
Read the change, starting from its blast radius. Run
codebase-index diff-impact --base <merge-base> --jsonfirst, or--base HEADunder--local; its list is where the search starts, not where it stops, since it names no absences. Prefer full source of load-bearing files over the diff; Grepsrc/,e2e/anddocs/for every touched symbol and the one spec section that owns a rule the change moved. Never tour the corpus for a value. -
Run cheap gates when the range touches them:
bash .claude/scripts/host-checks.sh [all|fast]andbash .claude/scripts/npm-checks.sh [all|fast|lint|test|build]forsrc/or toolchain files;bash .claude/scripts/harness-checks.shfor.claude/**,.github/locality-gate/**ortools/**. The Playwright suite is CI'ssmokejob: say it was not run, never imply it was. -
Author findings only when verified. Quote the conflicting sites. Severity: bug | suggestion | nit.
-
Write
suggestions.mdat the repo root when any issue is open:# Suggestions — branch vs `main` # or "local uncommitted" **Reviewed:** <ISO date> **Branch:** <name> **Base:** origin/main @ <short sha> **Scope:** <one line> **Diff:** <N files, +/- lines> ## Overall <2–4 sentences> | # | Severity | Item | Status | |---|---|---|---| | **1** | bug | … | open | ## Bugs / Suggestions / Nits ### 1. … | | | |---|---| | **Where** | … | | **Status** | open | **Problem.** … **Suggestion.** … ## What looks good (no action) … ## Recommended fix order … -
If the review finds nothing open, create no file; under
full, delete an old one when clean, replace it when not. -
suggestions.mdis working state. Never commit it or add it to the index; say so if the user is about to ship.
Report (chat)
Always end with: the mode actually run (and branch/base or local); whether
suggestions.md was present at start; issue counts by status; its path if
kept, or that it was deleted or not created; one line per top remaining
finding.
Never fix findings in this command unless the user asks to apply them after
the review. That is enforced by the frontmatter's disallowed-tools, which
path-scopes Edit away from every tracked tree and root file and denies the
toolchain's auto-loaded names; a redirection on a granted Bash command is a
residual the hook bounds from the other side. (why:
docs/commands/review-branch.md, The frontmatter denies, and what stays open)
