meta-reviewing-reviewing · diff
git:20260809.afe7ad9 to git:20261016.63d2b02
137 added, 207 removed. Audit A to A.
---
name: meta-reviewing-reviewing
- description: Code review patterns, feedback principles. Use when reviewing PRs, implementations, or making approval/rejection decisions. Covers self-correction, progress tracking, feedback principles, severity levels.
+ description: Code review process — reading order, findings, severity, scope and the approval decision. Load when reviewing a diff or PR, writing review comments, or deciding whether to approve or request changes.
---
- # Reviewing Patterns
+ # Code Review Patterns
- > **Quick Guide:** Read ALL files completely before commenting. Provide specific file:line references for every issue. Distinguish severity (Must Fix vs Should Fix vs Nice to Have). Explain WHY, not just WHAT. Suggest solutions following existing patterns. Acknowledge good work - positive reinforcement teaches what to repeat.
+ > **Quick Guide:** A review is worth what the author can act on. Start from the diff's purpose and the file the change is about — a design problem there leads the review. Must Fix blocks approval, Should Fix is strongly recommended, Nice to Have is optional, and a finding that earns none of them is not written. Approve once the diff meets its success criteria and leaves the code healthier, even where you would have written it differently; a clean diff gets a short approval, not manufactured findings.
+ **Detailed Resources:**
+
+ - [examples/core.md](examples/core.md) — worked findings, labelled and unlabelled reviews, scope findings, the verdict's evidence, praise, a complete clean review
+ - [reference.md](reference.md) — inline comment prefixes, and how verdicts map to platform review states
+
---
<critical_requirements>
- ## CRITICAL: Before Any Review
+ ## Before writing a review
- **(You MUST read ALL files mentioned in the PR/spec completely before providing feedback)**
+ **Read the specification or description, then every changed file in full, before writing a finding.** The purpose is the yardstick for every judgement, and a finding written from a partial read is about code you have not seen — the check it calls missing may sit below where you stopped.
- **(You MUST provide specific file:line references for every issue found)**
+ **Judge the diff against its purpose, not against an ideal codebase.** The author can act on what the diff changed; a finding about code it never touched, or a refactor its specification never asked for, is work with nothing to weigh it against.
- **(You MUST distinguish severity: Must Fix vs Should Fix vs Nice to Have)**
+ **Give every finding a `file:line`, the consequence of leaving it, and a fix pointed at an existing pattern where the codebase has one.** Without the location the author hunts for it, and without the consequence it is weighed as a style note.
- **(You MUST explain WHY something is an issue, not just WHAT is wrong)**
+ **Label every finding with its severity, and leave unwritten anything that earns none.** Authors read unlabelled comments as mandatory, so a typo and an injection compete for the same round and the trivia buries the defect.
- **(You MUST verify success criteria are met with evidence before approving)**
+ **Verify each success criterion with evidence before approving.** An approval that skips them ratifies whatever shipped.
- **(You MUST acknowledge what was done well - not just issues)**
+ **Name what the diff did well, specifically and sincerely.** Praise that names a choice tells the author what to repeat; generic praise tells them nothing and reads as filler.
</critical_requirements>
---
- **Auto-detection:** code review, PR review, pull request, review code, check implementation, verify changes
-
- **When to use:**
-
- - Reviewing any code changes (PRs, implementations, specs)
- - Providing structured feedback on code quality
- - Making approval/rejection decisions
- - Ensuring codebase standards are maintained
-
- **When NOT to use:**
-
- - When implementing code (use developer skills instead)
- - For automated linting/type-checking (use CI/CD tooling)
- - For deep security audits (use dedicated security review)
- - For high-level architecture decisions (use planning/PM workflows)
+ **Auto-detection:** code review, review this PR, pull request review, review the diff, review comments, approve, request changes, LGTM, nit:, blocking, non-blocking, Must Fix, Should Fix, Nice to Have, success criteria, review verdict
- **Key patterns covered:**
+ **Applies to:**
- - Self-correction checkpoints for reviewers
- - Post-action reflection after reviews
- - Progress tracking for multi-file reviews
- - Feedback principles (specific, explain why, suggest solutions, severity, acknowledge good)
- - Decision framework for approval/rejection
- - Review-specific anti-patterns (scope creep, refactoring, not using utilities)
+ - Reviewing a diff, PR or implementation against the specification it was written to
+ - Deciding a finding's severity, and whether it is worth writing at all
+ - Writing a finding the author can act on without a follow-up question
+ - Choosing between approve, request changes and major revisions
- **Detailed Resources:**
+ **Handled elsewhere:**
- - [examples/core.md](examples/core.md) - All examples: progress tracking, feedback patterns, anti-patterns
+ - What to look for in a particular kind of code — UI, server, command-line, model-calling or infrastructure — is a domain checklist's job; this skill decides what a finding from any of them is worth and how it is written
+ - Formatting, lint and type errors belong to the tools that report them; a review restating their output spends the author's attention on what a machine already said
+ - Auditing a whole system's security — threat models, penetration tests — is its own discipline; this skill catches the security defects a diff makes visible
+ - Choosing an architecture before code exists — a review judges the design a diff carries, not the one a specification should have picked
---
<philosophy>
## Philosophy
- Code review is about **improving code quality while teaching good patterns**. Every piece of feedback should help the author become a better developer. Be direct but constructive.
-
- **When reviewing code:**
-
- - Always read the full context before commenting
- - Base feedback on facts, not assumptions
- - Distinguish blocking issues from improvements
- - Teach through your feedback - explain the "why"
- - Recognize good work to reinforce patterns
-
- **When NOT to be harsh:**
-
- - Don't nitpick style when code is functionally correct
- - Don't request changes for personal preference
- - Don't block PRs for minor issues that can be follow-ups
- - Don't forget that the author worked hard on this
+ Review exists to keep a codebase getting healthier while changes keep landing. That makes it a filter rather than an audit: the bar is "better than before and fit for its purpose", not "how I would have written it", because there is no perfect code to hold a diff against — only better code.
- **Core principles:**
+ **Restraint is part of rigour.** A speculative suggestion sends the author to work the diff's purpose never asked for, as surely as a missed bug does by omission, and a review padded with them teaches authors to skim the next one, including the finding that matters.
- - **Evidence-based**: Base all feedback on what you actually read
- - **Actionable**: Every issue should have a clear path to resolution
- - **Proportional**: Match feedback severity to actual impact
- - **Educational**: Help authors understand WHY, not just WHAT
- - **Balanced**: Acknowledge good work alongside issues
+ **The reviewer reports; the author fixes.** A finding names the problem and the pattern that solves it, and leaves the change to the person who owns it.
</philosophy>
---
- <patterns>
-
- ## Core Patterns
-
- ### Pattern 1: Self-Correction Triggers
-
- These checkpoints prevent review drift and ensure thorough analysis. Check yourself throughout the review process.
-
- **Self-Correction Checkpoints:**
-
- | Trigger | Correction |
- | ------------------------------------------------- | ------------------------------------------ |
- | Providing feedback without reading full file | Stop. Read the complete file first. |
- | Saying "this needs improvement" without specifics | Stop. Provide file:line references. |
- | Approving without checking success criteria | Stop. Verify each criterion with evidence. |
- | Focusing only on issues | Stop. Add positive feedback. |
- | Making assumptions about code behavior | Stop. Read the actual implementation. |
- | Flagging issues without explaining WHY | Stop. Add rationale for each issue. |
- | Reviewing code outside your domain | Stop. Defer to specialist reviewer. |
-
- ---
-
- ### Pattern 2: Post-Action Reflection
-
- After completing your review, verify quality before finalizing.
-
- **Reflection Questions:**
+ <decision_framework>
- 1. Did I read all relevant files completely before commenting?
- 2. Did I check against all success criteria in the spec?
- 3. Are my issues specific (file:line) and actionable?
- 4. Did I distinguish severity correctly (blocker vs improvement)?
- 5. Did I acknowledge what was done well?
- 6. Should any part go to a specialist reviewer?
- 7. Is my recommendation (approve/request changes) justified?
+ ## How severe is this finding?
- **Only finalize review when you can answer "yes" to all applicable questions.**
+ ```
+ Would leaving it break something — behaviour, security, data, a critical
+ performance problem, a required success criterion, or a major violation of
+ a convention the codebase documents?
+ ├─ YES → MUST FIX
+ └─ NO → Is it an improvement to code the diff changed?
+ ├─ YES → Is the churn worth the diff's purpose, and does the spec ask for it?
+ │ ├─ NO to either → don't write it
+ │ └─ YES → Is the cost concrete in this diff — an edge case the spec implies,
+ │ a swallowed error, a measured slowdown, a minor convention
+ │ deviation in the changed lines?
+ │ ├─ YES → SHOULD FIX
+ │ └─ NO → don't write it — it is speculation
+ └─ NO → Is it an addition the author may take or leave — tests beyond adequate,
+ documentation, a clearly labelled future idea?
+ ├─ YES → NICE TO HAVE
+ └─ NO → don't write it — a style preference, a wording preference, an unrequested refactor
+ ```
- ---
+ ## Which verdict
- ### Pattern 3: Progress Tracking
+ **Approve** — every success criterion met with evidence, tests adequate for what changed and passing, no Must Fix. Should Fix findings travel with the approval as strong recommendations, and a minor one can become a follow-up rather than hold the merge.
- For multi-file reviews, track your progress to maintain orientation.
+ **Request changes** — a Must Fix exists, or a criterion is unmet or unevidenced, and the fixes are patches to this approach.
- **Track These Elements:**
+ **Major revisions needed** — the approach itself has to change: a design that cannot meet the spec, a systemic security flaw, existing behaviour broken.
- 1. **Files Examined:** [list of files read completely]
- 2. **Success Criteria Status:** [checked/unchecked for each criterion]
- 3. **Issues Found:** [categorized by severity]
- 4. **Positive Patterns Noted:** [what was done well]
- 5. **Deferred Items:** [what needs specialist review]
+ **Unsure?** Request changes with the specific question that would settle it. That resolves in one round, where blocking indefinitely and approving on hope both cost more.
- For tracking examples, see [examples/core.md](examples/core.md).
+ </decision_framework>
---
- ### Pattern 4: Feedback Principles
-
- All feedback should follow these principles for maximum effectiveness.
-
- #### Be Specific
+ <patterns>
- Every issue needs a precise location and actionable detail.
+ ## Core patterns
- #### Explain Why
+ ### Pattern 1: Purpose first, then the core of the change
- Don't just say what's wrong -- explain the impact so authors learn.
+ Read the description and its criteria, find the file the rest of the diff exists to serve, and judge its design before anything else. A design problem there leads the review, alone if need be — line comments on code about to be rewritten are wasted on both sides.
- #### Suggest Solutions
+ ```text
+ 1. Purpose — does the description make sense; what are the success criteria?
+ 2. Core — the file or two the change is about. Is it designed to meet them?
+ 3. If not → that finding leads; line-level detail waits for the redesign.
+ 4. If so → the rest, in an order that builds understanding — tests are often the clearest way in.
+ ```
- Point to existing patterns when possible.
+ Full code: [examples/core.md](examples/core.md#pattern-1-purpose-first-then-the-core-of-the-change)
- #### Distinguish Severity
+ ### Pattern 2: The finding
- Use clear markers to communicate priority:
+ Location, problem, consequence, and a fix pointed at the codebase's own pattern — written about the code, never about the author.
- | Marker | Category | Examples |
- | ---------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------- |
- | **Must Fix** | Blockers - cannot approve until fixed | Security vulnerabilities, breaks functionality, missing required criteria, major convention violations |
- | **Should Fix** | Improvements - strongly recommended | Performance optimizations, minor convention deviations, missing edge case handling, code simplification |
- | **Nice to Have** | Suggestions - optional enhancements | Additional tests, documentation, future enhancements |
+ ```markdown
+ **Must Fix — failed save reported as success** · `src/profile/save-profile.ts:42`
- #### Acknowledge Good Work
+ The `put` call has no rejection path, and `profile-form.tsx:88` shows "Saved"
+ unconditionally, so a failed save reads as success and the edit is lost on reload.
+ Map the rejection to the form's error state, as `settings/save-settings.ts:31` does.
+ ```
- Always include positive feedback alongside issues.
+ Full code: [examples/core.md](examples/core.md#pattern-2-the-finding)
- For detailed examples of each principle with rationale, see [examples/core.md](examples/core.md).
+ ### Pattern 3: Labelled severity
- </patterns>
+ Group findings under their severity, or prefix each inline comment, so the author can tell what blocks from what does not without asking.
- ---
+ ```markdown
+ **Must Fix**
- <decision_framework>
+ - `search.ts:24` — the search term is interpolated into SQL, so any caller can read the whole table
- ## Decision Framework
+ **Nice to Have**
- ```
- Is this a blocking issue?
- ├─ YES → Does it affect security, functionality, or required criteria?
- │ ├─ Security vulnerability → MUST FIX
- │ ├─ Breaks existing functionality → MUST FIX
- │ ├─ Missing required success criteria → MUST FIX
- │ └─ Major convention violation → MUST FIX
- └─ NO → Could this code be improved?
- ├─ YES → Is the churn worth the diff's purpose? Does the spec ask for it?
- │ ├─ NO to either → DON'T MENTION
- │ └─ YES → What is the impact?
- │ ├─ Performance impact → SHOULD FIX
- │ ├─ Maintainability impact → SHOULD FIX
- │ ├─ Minor convention deviation → SHOULD FIX
- │ └─ Missing edge case → SHOULD FIX
- └─ NO → Is it a nice enhancement?
- ├─ Better documentation → NICE TO HAVE
- ├─ Additional tests → NICE TO HAVE
- ├─ Future improvement → NICE TO HAVE
- ├─ Further refactoring the spec did not ask for → DON'T MENTION
- └─ Style preference → DON'T MENTION
+ - nit: `rows` → `matchingUsers` at `search.ts:30`; three lists are in scope there
```
- ### Approval Decisions
-
- **APPROVE when:**
-
- - All success criteria are met with evidence
- - Code follows existing conventions
- - No critical security or performance issues
- - Tests are adequate and passing
- - Changes are within scope
+ Full code: [examples/core.md](examples/core.md#pattern-3-labelled-severity) · prefix vocabularies: [reference.md](reference.md#inline-comment-prefixes)
- **REQUEST CHANGES when:**
+ ### Pattern 4: Scope against the spec
- - Success criteria not fully met
- - Convention violations exist
- - Quality issues need addressing
- - Test coverage inadequate
+ Compare what the diff does with what was asked. A change to something the spec fenced off blocks; an unrequested feature or refactor is asked into its own change; a reinvented utility is pointed at the existing one. Code the diff never touched is not this review's subject.
- **MAJOR REVISIONS NEEDED when:**
+ ```text
+ Spec: email validation, name and bio editing, save.
+ Diff: + phone validation, avatar upload → Should Fix: split into their own change
+ ~ src/auth/session.ts → question first — dependency or stray edit?
+ (spec: "leave auth unchanged") a stray edit is Must Fix
+ + validateEmail() in profile-form.ts → Should Fix: lib/validation.ts already exports it
+ ```
- - Critical security vulnerabilities
- - Breaks existing functionality
- - Major convention violations
- - Fundamental approach issues
+ Full code: [examples/core.md](examples/core.md#pattern-4-scope-against-the-spec)
- **When uncertain:** Request changes with specific questions rather than blocking indefinitely.
+ ### Pattern 5: Evidence for the verdict
- </decision_framework>
+ Each success criterion with its status and the evidence that settles it, plus one line naming what was not reviewed — an approval is read as covering everything it does not exclude.
- ---
+ ```markdown
+ | Criterion | Status | Evidence |
+ | -------------------------------- | ------ | ----------------------------------- |
+ | Edit form rejects invalid emails | MET | `profile-form.test.ts:41` |
+ | A failed save shows an error | UNMET | `save-profile.ts:42` — see Must Fix |
- <red_flags>
+ Not reviewed: `src/api/generated/*` — regenerated from the schema; one file spot-checked.
+ ```
- ## RED FLAGS
+ Full code: [examples/core.md](examples/core.md#pattern-5-evidence-for-the-verdict)
- **High Priority Issues:**
+ ### Pattern 6: Specific praise
- - Providing feedback without reading the full file
- - No file:line references in issue descriptions
- - Approving without verifying success criteria
- - Only negative feedback, no acknowledgment of good work
- - Reviewing code outside your domain expertise
- - Blocking PRs for personal style preferences
+ Name the choice and why it was right. Look for something sincere; where nothing stands out, say less rather than invent it.
- **Medium Priority Issues:**
+ ```markdown
+ - Reuses `formatOutput` instead of adding a second serializer, so `--json` and the
+ table view cannot drift apart (`status.ts:31`)
+ ```
- - Missing severity distinctions (all issues look equal)
- - No suggested solutions for identified issues
- - Vague feedback ("this needs improvement")
- - Not checking for existing patterns before flagging "new code"
- - Incomplete review (not all files examined)
+ Full code: [examples/core.md](examples/core.md#pattern-6-specific-praise)
- **Common Mistakes:**
+ ### Pattern 7: The clean review
- - Assuming code behavior without reading implementation
- - Flagging valid patterns as "wrong" because unfamiliar
- - Missing obvious issues while focusing on minor ones
- - Not acknowledging improvement over previous versions
- - Providing contradictory feedback (fix X, but also don't change Y)
+ A diff with nothing wrong gets a short approval: the criteria with their evidence, what was done well, the verdict. Zero findings is a complete review, not an unfinished one.
- **Gotchas & Edge Cases:**
+ ```markdown
+ **Verdict:** Approve — both criteria met (table below); no findings.
+ ```
- - Some "duplication" is intentional for clarity - verify before flagging
- - Performance optimizations may not be needed for low-traffic code
- - "Convention violations" may be new patterns not yet documented
- - Test coverage percentages don't guarantee quality tests
- - "Out of scope" changes may be necessary dependencies
+ Full code: [examples/core.md](examples/core.md#pattern-7-the-clean-review)
- </red_flags>
+ </patterns>
---
- <critical_reminders>
-
- ## CRITICAL REMINDERS
+ <red_flags>
- **(You MUST read ALL files mentioned in the PR/spec completely before providing feedback)**
+ ## Red flags
- **(You MUST provide specific file:line references for every issue found)**
+ **Costs the author a round:**
- **(You MUST distinguish severity: Must Fix vs Should Fix vs Nice to Have)**
+ - Two findings that contradict — "extract this helper", "leave the existing helper alone" — the author can satisfy one, and the next round reopens the other.
+ - Asking for an abstraction "in case it's needed later" — the diff grows, the next review is harder, and the purpose has not moved; the problem worth solving is the one the code has now.
+ - Blocking on a style point no guide or linter states — where the code is consistent with its surroundings, the author's choice stands.
- **(You MUST explain WHY something is an issue, not just WHAT is wrong)**
+ **Misleads the verdict:**
- **(You MUST verify success criteria are met with evidence before approving)**
+ - Approving without naming what was not read — the approval is taken to cover it.
+ - Asserting what code does without reading it, including a helper or callee outside the diff that the change relies on — the finding rests on an assumption rather than on the code. Read it, or put the finding as a question.
+ - Flagging an unfamiliar pattern as wrong before searching the codebase for it — it may be the convention.
+ - Applying a domain checklist from memory — a remembered checklist is where invented findings come from; load that domain's checklist, or review on correctness, security and convention grounds and say so.
+ - Polishing minor findings while the core of the change goes unread — the blocker ships under a list of nits.
- **(You MUST acknowledge what was done well - not just issues)**
+ **Surprising behaviour:**
- **Failure to follow these rules will produce low-quality reviews that waste author time and miss important issues.**
+ - Some duplication is deliberate — two call sites that will change for different reasons; check before flagging it.
+ - A performance finding with no measured or evident cost in this diff is speculation, and low-traffic code rarely needs the optimisation.
+ - A "convention violation" may be the newer pattern the codebase is moving to — check recent changes before flagging it.
+ - High coverage is easy to reach with weak tests; read whether the assertions would fail if the code broke.
+ - A file outside the spec's scope may be a dependency the change needed — ask before flagging it.
+ - A second-round review that does not say which earlier findings are resolved leaves the author guessing which still stand.
- </critical_reminders>
+ </red_flags>