reviewing は何をしますか?
Find the gaps in a change and leave every one with a written outcome. A finding is a gap in correctness or in what was asked: the spec, or the repository's written rules, which the owner set for every change. Anything else a reviewer notices (a preference, a doc that could say more, formatting no rule names) is a remark: said once in the review, marked optional, and carried nowhere else. The narrow definition is deliberate: a reviewer told to find gaps finds some even in sound work, and remarks carried into a tracker become the list nobody reads.
Every finding leaves with one of four dispositions, and the disposition is the routing:
- fix now: a gap in this change whose recommended fix fails the test
in
~/.claude/skills/ticketing/references/tracker.md'sneeds-decisionrow. Goes to the fix pass (step 4). Where the fix chooses between options, apply the one you recommend (a fix, or the code kept as built) and name it in the ledger as the reviewer's choice with the options passed over, so the owner can reverse it from there. - needs decision: the recommended fix passes that test, or the recommendation keeps the code as built and the fix it declines would pass it, since declining a gated fix decides it as surely as making it. Goes to the owner checkpoint (step 5) with the options and a recommended answer.
- defer: real, but not this change's: it predates the branch or sits outside what the spec covers. Goes to the tracker as a brief.
- drop: does not hold, or is not a gap. Kept with its reason in the ledger.
There is no severity grade: the disposition already says where a finding goes, and a grade beside it becomes a second routing table that disagrees with the first.
Two entries. A branch, diff or PR to review runs every step. Findings that arrive from elsewhere (a human reviewer's PR comments, another tool's list, "Apply these N code-review findings") start at step 3: each one is a claim to check on the current tree, whoever made it. In a set that arrives with fixes already applied, each one marked fixed is checked for a change at its location (none means it is fix now again), and every other finding goes through step 3 like any arrival.
Steps
-
Pin the range and find the spec. The range is
git -C <path> diff <base>...HEADplusgit -C <path> diff HEADfor uncommitted work, run in the worktree that holds the branch; for a PR, its base and head fromgh pr view. Confirm both refs resolve and the diff is non-empty before anything is dispatched. Find the spec the way~/.claude/skills/ticketing/references/tracker.mdsays a spec is recorded, starting from the tickets the commits or the PR body name. When there is none (a diff from outside this workflow), ask the owner once; if there is still none, the Spec axis reads the PR description and commit messages as the claim and says so. Collect the Standards sources: the agent file (AGENTS.md, CLAUDE.md), CONTRIBUTING, any coding standards, the owner's global agent file (~/.claude/CLAUDE.md) for its rules about code, which bind every change the owner's agents make, and the linter and hook config that says what is already enforced. Where the global file and the repository's own disagree, the repository's wins. Then write in one sentence what the change claims, from the spec's problem and decided trade-offs: this sets Attack's depth. Done when the diff is non-empty, the spec path or its absence is known, and the claim is written. -
Run the three axes together. Three fresh-context subagents in one message, each given the range, the commit list (
git log <base>..HEAD --oneline) and its brief, with the common tail below appended. None gets this session's history, so each reads the work rather than the author's account of it.- Spec reads the spec and the tickets cut from it, then the code itself rather than any report or commit message about it, since a report describes what its author meant to build. It reports what the spec asked for that is missing or partial, behaviour nobody asked for, and what looks implemented but wrong, quoting the spec line for each. A deviation from an interface the spec names is reported so the owner can say whether it was meant; a problem with the spec itself is reported as one.
- Standards reads the sources from step 1 and the diff. A breach of
a written rule is a finding, quoted with its file and rule. On top it
looks for three smells: Mysterious Name, Duplicated Code
(helpers duplicated across tickets included, since implementers in
separate worktrees cannot see each other's), Speculative
Generality. Each is a finding when it is a gap of its own (a name
that says something false about the value, a copy that already
disagrees with its twin, generality the spec did not ask for) and a
remark otherwise; a written rule that endorses what a smell would flag
wins. Three, because each names a later failure: a misleading name
invites the wrong edit, a copy stays wrong when its twin is fixed, an
unasked abstraction must be maintained. The rest of the smell
catalogue prompts refactors, and a refactor is an architecture round's
business. Where the change moves a seam or reshapes an interface, it
judges that in
codebase-designvocabulary (depth, seam, adapter), the same words the spec named it in. It skips what the linters and hooks enforce, which catch it every time without a reviewer. - Attack hunts concrete failure scenarios at the depth the claim sets. Read references/attack.md for the depth and the brief, and fill in the claim from step 1.
The common tail, appended to every brief. Every axis reads the decided trade-offs, because each of them, not only Spec, would otherwise report a chosen tolerance or a carried-over function as a defect:
Spec: <spec path, or "none" and the tickets the commits name>. Read its decided trade-offs, or with none the choices recorded on those tickets, before the diff. A choice recorded there (a tolerance, an approximation, logic carried over unchanged, an earlier "keep as is") is the design: report it only where the code departs from the entry, and what an entry says is owed later is not owed by this diff. One finding per entry: file:line; the gap in one sentence; what backs it (the failure scenario, or the spec line or rule it breaks); CONFIRMED (you traced it holding) or PLAUSIBLE (you could not); and a proposed disposition (fix now / needs decision / defer / drop) with its reason. An entry whose fix chooses between options adds them and the one you recommend. After the findings, remarks: one line each, marked optional.Done when all three reports are back.
-
Settle each finding's disposition. Merge the reports; one gap raised by two axes is one finding. Confirm or change each proposed disposition against the definitions above. Then reconcile the needs-decision findings, since you alone hold all three reports and an item put as one axis framed it reaches the owner without the others' context: trace each to the spec section or decided trade-off it touches and name the cause (the spec is silent there, contradicts itself, or states a fact the environment refutes), merge those that touch one section into one item, and settle any the spec already decides by that entry, which takes it out of needs decision. Done when every finding carries exactly one disposition, every finding whose fix chooses between options carries them and a recommended answer, and every needs-decision item names the spec section it would amend, where there is a spec. The remarks are listed once, after the findings, marked optional.
-
The fix pass. For each fix-now finding, first confirm it holds on the current tree. A CONFIRMED finding whose scenario you can see at the cited line is fixed. A PLAUSIBLE one, or one you cannot see holding, is reproduced first with a test, a command or a trace; one that does not reproduce becomes drop, pushed back in writing: what was claimed, what the code does instead, the command that shows it. Why first: a finding was written against a tree its reviewer read once, some were never true (a function reported as raising returns a value), and a fix for a non-bug changes behaviour nobody asked to change. A fix that turns out to pass the
needs-decisiontest moves to needs decision. Fix with the smallest edit that removes the failure scenario, run each fix's own check as you go, then the project's full test command once after the last fix of the set. All fixes land in one commit whose body has one line per finding (location, what changed). Name every fix that touches a gate (an invariant, a limit, a kill path, an access check) and send it to a fresh Attack subagent once more, whose findings return through step 3 like any arrival: a fix to an integrity mechanism is the change most likely to open a new hole in it. A gate fix's second re-attack is its last: a fix for what that one finds is made with its own check and not attacked again, so the chain ends. A finding from a GitHub inline comment is answered in its thread (gh api repos/{owner}/{repo}/pulls/<pr>/comments/<id>/replies -f body='<outcome>'), so the outcome sits beside the finding. Done when every fix-now finding is fixed with its check, kept as built by choice, or pushed back in writing, every re-attack has reported, and the full test run after the last fix passed with its output in this turn. -
One owner checkpoint. Put every needs-decision item to the owner in one numbered list, each as a proposed amendment: the spec section, what it says now, what it would say, why, and the code it touches, worded so a one-word yes accepts it; with no spec, the finding and the change you recommend. The list goes once per branch under review. Where tickets land one by one, each on its own pull request, it goes once per phase boundary instead: hold the items in the tracker as
needs-decision, naming the pull request, and put them in the same batch asimplementing's held questions rather than beside it. Batched, because each checkpoint raised alone costs the owner a context switch and the items often share an answer. A pull request whose item questions the code it carries waits for the answer, since landing it puts on the default branch what nobody agreed; the others land. Apply each answer: an accepted amendment is committed to the spec, a keep as is into its decided trade-offs (the choice, what it gives up, why, and the review it was kept at), so the next review reads it as the design instead of raising it again, and with no spec the ticket it touches carries it, or the ledger line where there is none; a fix it calls for goes through step 4; a defer goes to the tracker as below. Once this session has ended, the fix goes to an implementer as a follow-up the wayimplementing's phase boundary routes one, on the pull request's own branch while that pull request waits, and is checked as step 4 checks a fix, a gate fix's re-attack included, with its ledger line updated, sincelandingruns only the project's checks. Whoever applies the answer to an item held in the tracker, this session or the controller after it, flips the item toclosed @<short sha>of the last commit that applied it (the flip's own, when the answer commits nothing), since an item left inneeds-decisionreturns at the next boundary as unanswered and stops its pull request atlanding. An issue is closed by hand naming that commit, not byResolveswhen a branch lands, sincelandingwould read it open and stop the very pull request that waits on it. An item that applying an answer raises goes to the owner as one follow-up list, the same way. With no needs-decision items there is no checkpoint. Done when every item is held in the tracker for the phase boundary, or has the owner's answer applied and, if it was held, its item closed. -
Write the ledger. Every finding gets one line: location, the gap, the outcome (fixed in
<sha>, or kept as built, marked as the reviewer's choice where it chose; dropped, and why; kept as is, now in decided trade-offs; deferred, with its issue number or ticket; held for the owner, with its tracker reference). Deferred findings enter the tracker asneeds-triagein the brief shape that~/.claude/skills/ticketing/references/tracker.mdgives a deferred finding, naming this review, the commit under review and any run that already hit it, as that file defines a run; one no run has hit also carries theunseentag that file defines. They are read back attriage, which is user-invoked, so opening that sitting is the owner's. A review that raises more unseen tickets than the tickets the reviewed change delivers is a stopping signal, since the review is then feeding the next review rather than the work: report it as one entry in the ledger and to the owner, with the two counts, the unseen tickets, and the recommendation to land the branch and let a run of the changed work, rather than another review round, pick what comes next. The ledger is a## Reviewsection in the PR body, or in the merge commit's body when there is no PR; an open PR gets it now withgh pr edit, otherwiselandingwrites it there. An outcome said only in chat leaves with the scrollback, and a finding dropped without a written reason returns at the next review. Done when every finding's outcome is in the ledger, every deferred one is in the tracker with the tag where no run has hit it, the stopping signal is reported when its counts call for it, and every keep is in the spec.
Hand-off: landing, when the branch is this session's to land and no
held item questions its code.