Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
55325ee
Reporting: find every defect in one review; leave capping to the host
James-Chapman Nov 24, 2026
61bc98e
Review feedback: Plausible tier, sweep scope, host contract, limit owner
James-Chapman Nov 24, 2026
57cda1d
Review feedback: NIT row follows host threshold; one bar for unattend…
James-Chapman Nov 24, 2026
a3f2a40
Review feedback: keep NITs out of Also noted in human reports
James-Chapman Nov 24, 2026
9683876
Review feedback: bound unattended verifier spend per review
James-Chapman Nov 24, 2026
772afec
Review feedback: past-budget findings post now; P1/P2 always in full
James-Chapman Nov 24, 2026
6b4ef60
Review feedback: one consistent verifier-budget rule across the skill
James-Chapman Nov 24, 2026
13b444d
Remove accidentally committed skill zip
James-Chapman Nov 24, 2026
3b9ca5e
Review feedback: scope the P1/P2 self-check rule; NIT default for dir…
James-Chapman Nov 24, 2026
c219bf7
Review feedback: budget counts verifier runs; define self-checked rep…
James-Chapman Nov 24, 2026
4752c70
Review feedback: budget scope in Mode paragraph, report count, search…
James-Chapman Nov 24, 2026
05775ea
Review feedback: evidence standard holds for past-budget self-checks
James-Chapman Nov 24, 2026
f9ce101
Review feedback: verifier-run budget covers retries; configured thres…
James-Chapman Nov 24, 2026
d59fa89
Review feedback: self-checked marker in host formats; budget only whe…
James-Chapman Nov 24, 2026
d39afbc
Review feedback: set aside a retry run per in-flight budget candidate
James-Chapman Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions skills/code-change-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Review a code change (local diff, staged changes, branch, commit ra

# Code Change Review

Review a change the way a strong senior engineer would: find the defects that matter, prove each one, and report them so the author can act quickly. A short review with three real bugs beats a long one with thirty maybes, because every false positive teaches the reader to skim.
Review a change the way a strong senior engineer would: find the defects that matter, prove each one, and report them so the author can act quickly. A short review with three real bugs beats a long one with thirty maybes, because every false positive teaches the reader to skim. That is a bar on evidence, not on effort: find every defect the change introduces, depends on or makes worse in one review, then report only the ones the evidence supports: Confirmed findings, and Plausible ones that name the deciding fact you could not reach (step 5 has the grades, and `references/verification.md` the stricter rule for unattended posting). A second review of unchanged code should not turn up anything the first one could have found.

## Workflow

Expand Down Expand Up @@ -124,27 +124,30 @@ Work from the top of this list down. A bug in tier 1 matters more than any numbe

Apply the loaded language file's checks within these angles. They are the specific forms these problems take in that language.

**Exhaust the change before reporting.** Don't stop at the first serious findings. After working through the angles, sweep every hunk you fully reviewed again and ask what is still wrong that you have not raised; repeat until a sweep adds nothing. Where step 1's triage limited coverage, record the skimmed and unreviewed files in the coverage note rather than claiming a full sweep. In Quick mode, one sweep is enough. Ranking decides the order findings are reported in, not whether lower-ranked ones are looked for. An issue the author first hears about after fixing the earlier ones costs a whole extra review round.

### 5. Verify every finding before reporting it

Choose review depth by user request: **Standard** by default (independently verify serious or uncertain findings when subagents exist); **Quick** for requested fast reviews (self-check only); **Deep** for thorough or unattended reviews (independently verify every reported finding when subagents exist). Never silently downgrade an unattended review. Limit simultaneous verification agents to four unless the user authorizes a higher budget. Log how many candidates were checked, refuted and dropped, and any limitations. See `references/verification.md` for the detailed rules and fallback.
Choose review depth by user request: **Standard** by default (independently verify serious or uncertain findings when subagents exist); **Quick** for requested fast reviews (self-check only); **Deep** for thorough or unattended reviews (independently verify every reported finding when subagents exist). Never silently downgrade an unattended review. Limit simultaneous verification agents to four unless the user authorizes a higher concurrency limit. Reviews that post findings without a human in the loop also have a per-review verifier-run budget for `[P3]`–`[P5]` candidates: past it, those get the self-check instead, while every `[P1]`/`[P2]` still gets a fresh verifier (`references/verification.md`, "Posting without a human in the loop"). Log how many candidates were checked, refuted and dropped, and any limitations. See `references/verification.md` for the detailed rules and fallback.

Most false positives rest on one fact the reviewer assumed instead of checking. **Read `references/verification.md` before reporting**: it has the full procedure and a table of false-positive patterns with the check that catches each. For each candidate finding:

- **For a defect, write the failure scenario:** concrete input or state, then the wrong outcome. For a quality finding, instead document an observable maintenance, consistency, or operability cost; do not invent a failure.
- **List its load-bearing facts** (what a type is, what a callee does, who calls it with what, that something is absent, what the language or spec says) and **settle each one by reading or running something you can cite**. A name, an idiom or "the likely design" settles nothing. Before claiming something is missing or unused, search the whole repository.
- **Argue against it.** Look for the guard, counterpart, caller, test, spec section or decision record that would make it wrong. Evidence against the finding (tests pass, it works in production) counts against it; don't explain it away.
- **Grade confidence:** *Confirmed* (every load-bearing fact settled) or *Plausible* (the deciding fact is out of reach, such as production config or another service). If you could check the deciding fact with the tools you have, check it: it is not Plausible. Drop anything else, or ask it as a question that names the unsettled fact.
- **Independently disprove findings at the selected depth.** In Standard mode, verify every `[P1]`/`[P2]` and any uncertain finding with a fresh agent when available; Deep mode verifies every reported finding; Quick mode uses a separate self-check. Never fork the reviewing agent's context into a verifier or reuse a verifier for multiple claims. Provide only the claim, location and change locator, not your supporting scenario. Use a concurrency limit and do not run untrusted code outside an authorized sandbox. `references/verification.md` has the brief and verdict handling.
- **Independently disprove findings at the selected depth.** In Standard mode, verify every `[P1]`/`[P2]` and any uncertain finding with a fresh agent when available; Deep mode verifies every reported finding, apart from that posting budget above; Quick mode uses a separate self-check. Never fork the reviewing agent's context into a verifier or reuse a verifier for multiple claims. Provide only the claim, location and change locator, not your supporting scenario. Use a concurrency limit and do not run untrusted code outside an authorized sandbox. `references/verification.md` has the brief and verdict handling.

### 6. Report

Use `references/reporting.md` for the severity tags, the comment format and the output template. In short:

- Lead with a one-line verdict: whether it is safe to merge, and the biggest issue if any.
- **Every finding starts with its severity label: `[P1] CRITICAL`, `[P2] MAJOR`, `[P3] MINOR (Defect)`, `[P4] MINOR (Quality)` or `[P5] NIT`**, where the `[Pn]` rank comes first and `[P1]` is the most severe, then a one-line claim and its `file:line`. The body explains, in this order, what the issue is, why it is a problem (the concrete failure scenario), and a suggested fix or improvement wherever you can offer one.
- List findings with the most severe first. Default cap of about 10. Mention how many lower-severity items you left out, and list them if the user asks.
- Keep `[P5] NIT` findings out unless there are no real defects, or the user asked for a thorough pass.
- Say how the findings were verified: review mode, number sent to fresh verifiers, refutations, and any lack of independent verification.
- List findings with the most severe first. In a report a person reads, show every `[P1]`/`[P2]` in full, since they block the merge, then fill the report from `[P3]`/`[P4]` up to about 10 full findings in total, counting the `[P1]`/`[P2]`. Put the remaining `[P3]`/`[P4]` findings under **Also noted**, one line each; `[P5] NIT` follows the next bullet.
- In that report, count `[P5] NIT` findings instead of listing them unless there are no real defects or the user asked for a thorough pass; list them if the user asks.
Comment thread
James-Chapman marked this conversation as resolved.
Resolved
- **When a host sets the output** (a review bot, CI job or structured findings tool with its own format, severity threshold or comment limit), those two display limits do not apply. Return every finding that meets the evidence bar (for a host that posts without a human in the loop, the stricter bar in `references/verification.md`), down to the host's severity threshold, most severe first, and let the host apply any comment limit. Where the host leaves something unset, don't ask (an unattended host has no one to answer): with no severity threshold, report down to `[P5] NIT` and let the host filter (when you post unattended yourself with no host in between, `references/verification.md` stops at `[P4]` instead); with no format, use `references/reporting.md`. A finding you hold back is lost, and surfaces as "new" in the next review after the author fixes the rest.
- Say how the findings were verified: review mode, number sent to fresh verifiers, refutations, how many were self-checked only past the verifier-run budget, and any lack of independent verification.
- End with explicit coverage (files fully reviewed / skimmed / unavailable), checks run safely, and what you did *not* cover. An honest scope note is part of the review.

Use the same label-first format for comments posted on a pull request, so a finding reads the same in the report and on the PR. Post to the PR only when the user asks, or when an explicitly authorized review bot is configured to post; `references/reporting.md` shows how to post them as one review with inline comments and recheck the pinned revision. When findings are posted with no human reviewing them first (a review bot or CI job), apply the stricter bar in `references/verification.md`.
Expand Down
7 changes: 4 additions & 3 deletions skills/code-change-review/references/reporting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Severity is a priority rank from `[P1]` (most severe) to `[P5]` (least severe),
| `[P2] MAJOR` | Wrong behaviour that users or operators will hit, or a serious risk under realistic conditions. Fix before merging. | Race causing duplicate charges, unhandled error on a common path, breaking API change, N+1 on a hot endpoint |
| `[P3] MINOR (Defect)` | Wrong behaviour in edge cases or uncommon conditions, with limited impact. Fix in this change; need not block the merge. | Missing timeout, edge-case off-by-one, error swallowed on a rare path |
| `[P4] MINOR (Quality)` | No wrong behaviour today, but a real maintainability or operability cost, or a clear improvement with small impact. Fix when convenient. | Missing test for new logic that works, wrong-altitude fix, misleading log message, small duplication, avoidable complexity |
| `[P5] NIT` | Style or taste; no behavioural effect. Omit unless there are no real defects, or the user asked for a thorough pass. | Formatting the linter missed, naming, wording |
| `[P5] NIT` | Style or taste; no behavioural effect. In a report a person reads, count rather than list them unless there are no real defects or the user asked for a thorough pass. When a host sets the output, report them if its severity threshold reaches `[P5]` or it sets none. When you post to a pull request yourself, unattended and with no threshold configured, leave them out (`references/verification.md`). | Formatting the linter missed, naming, wording |

`[P1]` and `[P2]` block the merge; `[P3]` to `[P5]` do not.

Expand Down Expand Up @@ -53,6 +53,7 @@ Use this for every finding, in reports and on PRs alike:
- **Suggest a fix whenever you can.** Keep it minimal and in the codebase's style. If several fixes are reasonable, give the one you'd pick and name the trade-off in a sentence. If you can't propose one, replace the fix section with **Next step:** saying what to check or decide, or ask a question.
- **One defect per comment.** If the same bug appears in five places, make one finding that lists the locations (on a PR, comment on the first and list the rest).
- **Pre-existing problems** add `(pre-existing)` after the full label, for example `[P3] MINOR (Defect) (pre-existing) …`, and only appear if the change depends on them or makes them worse.
- **Self-checked findings** posted past the unattended verifier-run budget (`references/verification.md`) add `(self-checked)` after the full label the same way, for example `[P4] MINOR (Quality) (self-checked) …`. Where a host's format keeps the label in a separate field, follow that format and put `(self-checked)` wherever it allows: at the start of the title, or else at the start of the body. Never drop the marker.
- **Questions are fine** when a finding hinges on something you can't see: `[P2] MAJOR Can user_id be null here?` followed by what breaks if it can.

Example:
Expand Down Expand Up @@ -97,15 +98,15 @@ The helper requires an unchanged head. If only the base tip advanced, it queries

**Coverage:** <N fully inspected, N skimmed, N unavailable; any truncated or binary files and known gaps>.

**Verification:** <mode and safe checks run>; <"N findings checked by fresh verifiers; M refuted and dropped." | "Not independently verified: <reason, e.g. no subagents available>.">
**Verification:** <mode and safe checks run>; <"N findings checked by fresh verifiers; M refuted and dropped." | "N findings checked by fresh verifiers; M refuted and dropped; K self-checked only, past the verifier-run budget." | "Not independently verified: <reason, e.g. no subagents available>.">

### Findings

<Each finding in the comment format above, most severe first, separated by a blank line or `---`.>

### Also noted

[P3] MINOR (Defect) <lower-severity item held back from the main list: claim and `file:line` on one line>
[P3] MINOR (Defect) <item held back by the display limit: claim and `file:line` on one line>

[P4] MINOR (Quality) <another held-back item; one per line, most severe first, each starting with its own full label, blank line between them>

Expand Down
Loading