review-changes
Review Changes
Review changed code with explicit severity and confidence.
Process
Follow this sequence to produce a thorough, efficient review:
- Understand intent. Read the PR description, commit messages, and any linked issues. Know what the change is trying to do before judging how well it does it.
- Scan for scope. Skim the full diff to understand what areas it touches โ files, modules, layers. This determines which lenses to load.
- Select lenses. Use the table below to pick the relevant reviewer lenses. Load only what applies; skip the rest.
- Review each file. Walk the diff file by file. Pull in adjacent unchanged code only when it is necessary to explain impact or verify whether an issue is real.
- Synthesize. After the file-by-file pass, look for groupable root causes. Multiple symptoms in different files may share one underlying problem โ present those as a grouped finding instead of separate entries.
- Write up findings using the format and presentation rules below.
- Produce a verdict in the summary section.
Lens Selection
Use this table to decide which lenses to load based on what the diff touches. Readability is always worth loading as a baseline.
| If the diff touchesโฆ | Load these lenses |
|---|---|
| User input, auth, networking, secrets | Security |
| Public APIs, module boundaries | Architecture |
| CLI output, error messages, defaults | UX |
| Hot paths, loops, queries, large data | Performance |
| New features, bug fixes, branching logic | Tests |
| Docs, README, docstrings, examples | Documentation |
| Existing GitHub review comments | GitHub review threads |
| Anything else | Readability (always on) |
Scope
Focus on the changed code and behavior introduced by the diff. Pull in adjacent unchanged code only when it is necessary to explain impact or verify whether an issue is real.
Rating
Rate impact separately from certainty.
| Severity | Emoji | Meaning |
|---|---|---|
| P1 | ๐ด | Critical: security flaws, data loss, crashes, or release blockers |
| P2 | ๐ | Important: broken features, serious regressions, or major correctness gaps |
| P3 | ๐ก | Should fix: smaller bugs, coverage gaps, or usability problems |
| P4 | โช | Nice to have: low-impact polish or consistency issues |
Report findings with confidence โฅ 80. For findings between 60โ79, mention them briefly in a "Lower-confidence observations" section at the end, clearly marked as uncertain. Below 60, drop them entirely.
Finding Format
Each finding must include:
File: location with line numbersIssue: one-sentence problem statementReasoning: why the behavior is wrong or riskyEvidence: concrete code, types, behavior, or reviewer commentSuggestion: a specific fix or next action
Use this header format:
### ๐ P2 ยท ๐ก๏ธ SEC-1 ยท Missing authorization check ยท 92%
Use these prefixes:
SEC: securityARC: architectureTST: testsUXD: user experienceRDY: readabilityDOC: documentationPRF: performanceGIT: GitHub review feedback
Use these category icons when presenting a review summary:
| Prefix | Emoji | Category |
|---|---|---|
SEC |
๐ก๏ธ | security |
ARC |
๐๏ธ | architecture |
TST |
๐งช | tests |
UXD |
๐จ | user experience |
RDY |
๐๏ธ | readability |
DOC |
๐ | documentation |
PRF |
๐ | performance |
GIT |
๐ฌ | GitHub feedback |
GRP |
๐ฆ | grouped findings |
Review Presentation
When summarizing findings for a human, present them in an emoji-led format:
{severity_emoji} {severity} ยท {category_emoji} {id} ยท {title} ({confidence}%) ยท {file}:{line}
Examples:
๐ด P1 ยท ๐ก๏ธ SEC-1 ยท SQL injection vulnerability (95%) ยท src/db.ts:45
๐ P2 ยท ๐๏ธ ARC-1 ยท Circular dependency (88%) ยท src/modules/a.ts:12
๐ก P3 ยท ๐งช TST-2 ยท Missing edge case test (82%) ยท tests/api.test.ts:78
For GitHub findings, append the author when available:
๐ P2 ยท ๐ฌ GIT-1 ยท Consider using constants (90%) ยท src/config.ts:23 (@reviewer)
If multiple findings collapse into one root cause, you may present a grouped summary:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ ๐ P2 ยท ๐ฆ GRP-1 ยท Inconsistent error handling (3 findings) โ
โฐโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โโ ๐ P2 ยท ๐๏ธ RDY-1 ยท Missing error check (85%) ยท src/api.ts:23
โโ ๐ก P3 ยท ๐๏ธ RDY-2 ยท Silent failure (82%) ยท src/api.ts:45
โโ ๐ก P3 ยท ๐๏ธ RDY-3 ยท No error logging (80%) ยท src/api.ts:67
Sort summaries by severity first, then by confidence. Include a legend when the review is long enough that readers would benefit from one.
Actionability
Prefer findings that are specific, reproducible, and cheap enough to act on in the current change. Cap output at roughly 8 findings for a normal-sized diff โ prioritize ruthlessly rather than dumping everything.
Avoid:
- Speculative concerns without concrete evidence in the diff.
- Style preferences that linters or formatters already enforce.
- Suggesting rewrites of working code unless there's a clear maintainability or correctness risk.
- Flagging pre-existing TODO/FIXME comments that aren't part of this change.
- Issues outside the review scope (e.g., unrelated files, hypothetical future requirements).
Summary
End every review with:
- A bordered summary that includes only the severity counts.
- A verdict label.
- One to three short, action-oriented bullets that explain the TL;DR.
Use this format:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ ๐ด P1: 0 ๐ P2: 1 ๐ก P3: 2 โช P4: 1 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
**Needs changes**:
- Fix the inconsistent error handling in `src/api.ts`, `src/jobs.ts`, and `src/worker.ts`.
- Add a retry-path test so this regression does not recur.
- Merge after the P2 issue is resolved.
The verdict label should be one of:
- Ship it: no findings, or only P4 nits.
- Ship with fixes: P3 or below; nothing blocking.
- Needs changes: at least one P2 that should be resolved before merge.
- Blocked: at least one P1; do not merge.
Write the bullets as a call to action. Prefer concrete next steps over vague summaries.
Good:
Add the missing authorization check in the admin route.Update the docs to mention the new default timeout.Merge after the flaky retry test is fixed.
Avoid:
Authorization issue.Docs need work.Some tests are missing.
If cross-cutting themes emerged (for example, "error handling is inconsistent across three files"), use one bullet to name the theme and the remaining bullets to say what should happen next.
Reviewer Lenses
Load only the lenses that matter for the current diff: