Code Review Standards
The full rubric behind code-critic's adversarial review. This is the
reference the agent loads before reviewing any diff — the agent body stays
lean; the standard lives here.
Reviewer Framing
Before reviewing any code, ask: "What would someone who has seen this exact
type of code fail in production know to check that a first-time implementer
wouldn't think to look for?" Generic checklist-walking produces generic
findings; experience-grounded scrutiny produces the findings that matter.
Review the code against the spec, not against the implementer's stated
intent. If dispatch context includes implementer reasoning — "I did X
because…", commit messages, design notes — ignore it. An LLM critic that sees
the implementer's reasoning tends to agree with it (anchoring bias); a critic
that sees only the spec and the code judges whether the code actually meets
the spec, which is the job.
Severity Taxonomy
| Severity |
Definition |
Examples |
| CRITICAL |
Security vulnerability, data loss, production crash, broken contract |
SQL injection, unbounded recursion on user input, unwrap() on a fallible I/O call in library code, a postcondition that no longer holds |
| HIGH |
Significant correctness issue, missing error handling, likely regression |
Unhandled error path, off-by-one in a boundary condition, race condition in concurrent code, silently swallowed exception |
| MEDIUM |
Code smell, missing test coverage, maintainability concern |
Duplicated logic across >2 call sites, a public function with no tests, a 200-line function doing five unrelated things |
| LOW |
Style preference, naming, minor inefficiency |
Inconsistent brace style, a variable name that could be clearer, an allocation that could be avoided but isn't on a hot path |
Guard rail — style preferences never outrank LOW. Whitespace, naming
aesthetics, brace placement, import ordering, and other pure style
preferences are LOW at most, never MEDIUM, HIGH, or CRITICAL, regardless
of how strongly the reviewer feels about them. Inflating a style nit to HIGH
to make the review look more rigorous is itself a review defect.
The 80% Confidence Filter
For every candidate finding, ask: can I assert this is a real issue with
more than 80% confidence? If not:
- Downgrade the severity, or
- Drop the finding entirely.
A review full of speculative "this might be a problem" findings is worse than
a shorter review of confirmed issues — it forces the reader to re-triage the
critic's own uncertainty. When genuinely uncertain, say so explicitly in the
Notes section rather than asserting a severity you can't back up.
Finding Disposition
Every finding ends in exactly one of three states, and the review STATES which
one. The default is the framework's existing rule: a review finding is
fixed in the surfacing PR, or dropped. Promote is the narrow third exit
that rule leaves implicit — work that is genuinely separable, not a home for
every LOW or MEDIUM finding that doesn't obviously fit the first two.
Fix here — corrected in the surfacing PR. The default for correctness,
security, acceptance criteria, regression coverage, and any small in-scope
repair.
Parent — kept with the work already in flight, as a PR comment or a
checklist item on the parent issue. No durable artifact is created.
Promote — reserved for a defect that is genuinely separable work
someone would schedule on its own, never the default landing spot for a
LOW finding that just doesn't feel worth fixing right now. The critic only
recommends Promote — it does not file the issue itself and does not
instruct anyone else to file one. Whether it is filed is decided by the
Ticket-Promotion Gate in tm-ticketing, and the PM or user makes the
prioritization call. Do not re-derive that gate's criteria here.
An APPROVE verdict does not generate tickets. Approving means zero CRITICAL
and zero HIGH findings; the MEDIUM/LOW observations that remain default to
Fix here or Parent. Promote on an approved review is a recommendation for
someone else to decide, never an instruction to file.
Review Process
- Work the rubric top-to-bottom: CRITICAL first, then HIGH, MEDIUM, LOW.
- For each finding:
- Cite the exact file + line number.
- Quote the offending code snippet.
- Explain why it is a problem — what actually breaks in production, not a
generic "this is bad practice."
- Provide the fix: concrete code or a specific, actionable change. Never
stop at "this needs to be fixed."
- Assign the disposition:
Fix here, Parent, or Promote.
- Apply the 80% confidence filter to every candidate finding.
- Compute the verdict from the finding set (see Verdict Protocol below).
Output Format
## Verdict: <APPROVE|WARN|BLOCK>
## Findings
| Severity | File | Line | Issue | Fix | Disposition |
|----------|------|------|-------|-----|-------------|
| CRITICAL | path/to/file.ext | 42 | <one-line description> | <concrete fix> | Fix here |
| HIGH | path/to/file.ext | 87 | ... | ... | Parent |
| LOW | path/to/file.ext | 96 | ... | ... | Promote |
## Required Changes (only if WARN or BLOCK)
1. <numbered list of changes required before re-review>
## Notes (optional, for context the PM should know)
<caveats, scope assumptions, things explicitly not flagged and why>
Every row carries exactly one Disposition token — Fix here, Parent, or
Promote. A findings table with a blank or missing Disposition cell is an
incomplete review: a reader of the posted verdict must be able to tell, per
finding, which of the three was chosen without asking anyone.
A zero-finding APPROVE omits the Findings table entirely and states: "No
issues found at >80% confidence. APPROVED for next pipeline stage." It has no
rows, so there are no dispositions to state. A clean APPROVE is a valid,
correct, and complete outcome — do not manufacture findings to look thorough.
Verdict Protocol
- APPROVE — zero CRITICAL, zero HIGH findings. Proceeds to the next
pipeline stage.
- WARN — zero CRITICAL, one or more HIGH findings. Code proceeds, but
findings must be tracked: attach the finding table to the next handoff
(typically Documentation) rather than discarding it.
- BLOCK — any CRITICAL finding. Halt immediately. Surface the verdict and
finding table to the user verbatim and await explicit direction
(fix-and-retry, override, abandon). Never auto-re-delegate back to the
implementer without that direction.
What NOT To Do
- Do not inflate severity to appear rigorous. Calibrate strictly to the
taxonomy above.
- Do not flag unchanged code unless it contains a CRITICAL security issue.
- Do not consolidate findings into vague summaries — every finding needs
file + line + fix, individually.
- Do not skip the 80% confidence filter to manufacture findings where none
exist.
- Do not flag style preferences (whitespace, naming aesthetic, import order)
as HIGH or CRITICAL — see the guard rail above. LOW at most.
- Do not leave a finding without a disposition. "Noted" is not one of the
three.
- Do not default LOW/MEDIUM polish to
Promote because it's easier than
deciding — the default is Fix here or dropped; Promote is for defects
that are genuinely separable, schedulable work, not a catch-all.
- Do not file an issue yourself, under any disposition, and do not instruct
anyone else to file one.
Promote is a recommendation to the PM — never an
action the critic takes.
- A zero-finding APPROVE is correct and complete. Do not feel pressure to
find issues that aren't there.
Handoff Protocol
- APPROVE → report verdict to the PM; PM proceeds to the next stage
(typically Security). Any
Promote rows go to the PM as recommendations,
not as filed issues.
- WARN → report verdict + findings to the PM; PM proceeds AND attaches
the finding table, dispositions included, to the Documentation handoff.
- BLOCK → report verdict + findings to the PM; PM halts the pipeline and
surfaces to the user. Do not auto-route back to the implementer.
1---2name: code-review-standards-23description: Adversarial code review rubric — severity taxonomy, the 80% confidence filter, and the APPROVE/WARN/BLOCK verdict protocol. Loaded by the code-critic agent as its primary review reference.4---56# Code Review Standards78The full rubric behind `code-critic`'s adversarial review. This is the9reference the agent loads before reviewing any diff — the agent body stays10lean; the standard lives here.1112## Reviewer Framing1314Before reviewing any code, ask: *"What would someone who has seen this exact15type of code fail in production know to check that a first-time implementer16wouldn't think to look for?"* Generic checklist-walking produces generic17findings; experience-grounded scrutiny produces the findings that matter.1819Review the code against the **spec**, not against the implementer's stated20intent. If dispatch context includes implementer reasoning — "I did X21because…", commit messages, design notes — ignore it. An LLM critic that sees22the implementer's reasoning tends to agree with it (anchoring bias); a critic23that sees only the spec and the code judges whether the code actually meets24the spec, which is the job.2526## Severity Taxonomy2728| Severity | Definition | Examples |29|---|---|---|30| **CRITICAL** | Security vulnerability, data loss, production crash, broken contract | SQL injection, unbounded recursion on user input, `unwrap()` on a fallible I/O call in library code, a postcondition that no longer holds |31| **HIGH** | Significant correctness issue, missing error handling, likely regression | Unhandled error path, off-by-one in a boundary condition, race condition in concurrent code, silently swallowed exception |32| **MEDIUM** | Code smell, missing test coverage, maintainability concern | Duplicated logic across >2 call sites, a public function with no tests, a 200-line function doing five unrelated things |33| **LOW** | Style preference, naming, minor inefficiency | Inconsistent brace style, a variable name that could be clearer, an allocation that could be avoided but isn't on a hot path |3435**Guard rail — style preferences never outrank LOW.** Whitespace, naming36aesthetics, brace placement, import ordering, and other pure style37preferences are **LOW at most**, never MEDIUM, HIGH, or CRITICAL, regardless38of how strongly the reviewer feels about them. Inflating a style nit to HIGH39to make the review look more rigorous is itself a review defect.4041## The 80% Confidence Filter4243For every candidate finding, ask: *can I assert this is a real issue with44more than 80% confidence?* If not:45- Downgrade the severity, or46- Drop the finding entirely.4748A review full of speculative "this might be a problem" findings is worse than49a shorter review of confirmed issues — it forces the reader to re-triage the50critic's own uncertainty. When genuinely uncertain, say so explicitly in the51Notes section rather than asserting a severity you can't back up.5253## Finding Disposition5455Every finding ends in exactly one of three states, and the review STATES which56one. **The default is the framework's existing rule: a review finding is57fixed in the surfacing PR, or dropped.** `Promote` is the narrow third exit58that rule leaves implicit — work that is genuinely separable, not a home for59every LOW or MEDIUM finding that doesn't obviously fit the first two.60611. **`Fix here`** — corrected in the surfacing PR. The default for correctness,62 security, acceptance criteria, regression coverage, and any small in-scope63 repair.642. **`Parent`** — kept with the work already in flight, as a PR comment or a65 checklist item on the parent issue. No durable artifact is created.663. **`Promote`** — reserved for a defect that is genuinely separable work67 someone would schedule on its own, never the default landing spot for a68 LOW finding that just doesn't feel worth fixing right now. The critic only69 *recommends* `Promote` — it does not file the issue itself and does not70 instruct anyone else to file one. Whether it is filed is decided by the71 Ticket-Promotion Gate in `tm-ticketing`, and the PM or user makes the72 prioritization call. Do not re-derive that gate's criteria here.7374**An APPROVE verdict does not generate tickets.** Approving means zero CRITICAL75and zero HIGH findings; the MEDIUM/LOW observations that remain default to76`Fix here` or `Parent`. `Promote` on an approved review is a recommendation for77someone else to decide, never an instruction to file.7879## Review Process80811. Work the rubric top-to-bottom: CRITICAL first, then HIGH, MEDIUM, LOW.822. For each finding:83 - Cite the exact file + line number.84 - Quote the offending code snippet.85 - Explain why it is a problem — what actually breaks in production, not a86 generic "this is bad practice."87 - Provide the fix: concrete code or a specific, actionable change. Never88 stop at "this needs to be fixed."89 - Assign the disposition: `Fix here`, `Parent`, or `Promote`.903. Apply the 80% confidence filter to every candidate finding.914. Compute the verdict from the finding set (see Verdict Protocol below).9293## Output Format9495```96## Verdict: <APPROVE|WARN|BLOCK>9798## Findings99100| Severity | File | Line | Issue | Fix | Disposition |101|----------|------|------|-------|-----|-------------|102| CRITICAL | path/to/file.ext | 42 | <one-line description> | <concrete fix> | Fix here |103| HIGH | path/to/file.ext | 87 | ... | ... | Parent |104| LOW | path/to/file.ext | 96 | ... | ... | Promote |105106## Required Changes (only if WARN or BLOCK)1071081. <numbered list of changes required before re-review>109110## Notes (optional, for context the PM should know)111112<caveats, scope assumptions, things explicitly not flagged and why>113```114115**Every row carries exactly one Disposition token — `Fix here`, `Parent`, or116`Promote`.** A findings table with a blank or missing Disposition cell is an117incomplete review: a reader of the posted verdict must be able to tell, per118finding, which of the three was chosen without asking anyone.119120A zero-finding APPROVE omits the Findings table entirely and states: "No121issues found at >80% confidence. APPROVED for next pipeline stage." It has no122rows, so there are no dispositions to state. A clean APPROVE is a valid,123correct, and complete outcome — do not manufacture findings to look thorough.124125## Verdict Protocol126127- **APPROVE** — zero CRITICAL, zero HIGH findings. Proceeds to the next128 pipeline stage.129- **WARN** — zero CRITICAL, one or more HIGH findings. Code proceeds, but130 findings must be tracked: attach the finding table to the next handoff131 (typically Documentation) rather than discarding it.132- **BLOCK** — any CRITICAL finding. Halt immediately. Surface the verdict and133 finding table to the user verbatim and await explicit direction134 (fix-and-retry, override, abandon). Never auto-re-delegate back to the135 implementer without that direction.136137## What NOT To Do138139- Do not inflate severity to appear rigorous. Calibrate strictly to the140 taxonomy above.141- Do not flag unchanged code unless it contains a CRITICAL security issue.142- Do not consolidate findings into vague summaries — every finding needs143 file + line + fix, individually.144- Do not skip the 80% confidence filter to manufacture findings where none145 exist.146- Do not flag style preferences (whitespace, naming aesthetic, import order)147 as HIGH or CRITICAL — see the guard rail above. LOW at most.148- Do not leave a finding without a disposition. "Noted" is not one of the149 three.150- Do not default LOW/MEDIUM polish to `Promote` because it's easier than151 deciding — the default is `Fix here` or dropped; `Promote` is for defects152 that are genuinely separable, schedulable work, not a catch-all.153- Do not file an issue yourself, under any disposition, and do not instruct154 anyone else to file one. `Promote` is a recommendation to the PM — never an155 action the critic takes.156- A zero-finding APPROVE is correct and complete. Do not feel pressure to157 find issues that aren't there.158159## Handoff Protocol160161- **APPROVE** → report verdict to the PM; PM proceeds to the next stage162 (typically Security). Any `Promote` rows go to the PM as recommendations,163 not as filed issues.164- **WARN** → report verdict + findings to the PM; PM proceeds AND attaches165 the finding table, dispositions included, to the Documentation handoff.166- **BLOCK** → report verdict + findings to the PM; PM halts the pipeline and167 surfaces to the user. Do not auto-route back to the implementer.