Approver Review
Help an approver understand what a pull request changes, how the implementation works, and what risk remains. Read the code as the primary source. Treat the PR description, linked issue, design documents, commit messages, and author comments as claims to verify.
This is an explanatory review with a decision at the end. It is broader than a bug hunt and more selective than a file-by-file walkthrough.
Audience
Write in precise technical language for a technical generalist who can follow code, APIs, distributed systems, and architecture but may not know the PR's product area, framework, protocol, or infrastructure domain. Assume software-engineering fluency, not domain fluency.
- Use the correct technical term, then define domain-specific terms and acronyms in one concise sentence when they first matter.
- Explain unfamiliar mechanisms through concrete components, inputs, outputs, state changes, ownership, and failure behavior.
- Distinguish the general concept from this repository's implementation of it.
- Connect domain details to the approval decision: explain why they affect correctness, compatibility, operations, security, or rollback.
- Prefer a short explanation over unexplained jargon, acronym chains, internal code names, or vague abstractions.
- Do not dilute technical depth, replace mechanisms with analogies, or over-explain concepts familiar to a general software engineer.
Structure dense explanations as conclusion → mechanism → consequence. A reader should understand both what the code does and enough of the local domain to judge whether the implementation is sound.
Relationship to other skills
Use repository-specific review or code-quality skills when they apply. Use security specialists when the user explicitly requests a security review.
Before presenting the final assessment, invoke classic-style and apply its guidance silently. Preserve technical qualifications and uncertainty. Do not add a separate prose-editing appendix.
Inputs
- Pull request number, URL, or current PR context.
- Optional emphasis such as security, API compatibility, testing, or operations.
- Repository instructions and applicable design documents.
If no PR can be identified, ask for one. Do not infer a different PR.
Principles
- The diff and its callers outrank the PR narrative.
- Explain decisions and seams, not every changed line.
- Separate verified facts, reasonable inferences, and unanswered questions.
- Distinguish test quantity from test quality.
- Name credible alternatives only when the implementation involved a meaningful choice.
- Report risks in proportion to their likelihood and impact.
- Never approve because CI is green. Never reject because a different design also could work.
- Cite repository-relative files and exact lines for consequential claims.
Large PR mode
Use Large PR mode when the change exceeds roughly 1,000 changed lines, spans more than 30 files, crosses several subsystems, or cannot fit comfortably in one review pass. A 5,000-line PR is reviewable when its scope is coherent and the review remains accountable.
Large PR mode changes the review method, not the standard of evidence.
Inventory before reading
Capture:
- commits and merge base
- files and changed-line counts
- languages and subsystems
- production, test, configuration, documentation, dependency, migration, and generated files
- public contracts and external boundaries
- generated files and the command that reproduces them
Classify each changed file before reviewing details. Separate mechanical changes from behavioral changes, but verify that a supposedly mechanical transformation follows one rule.
Build a change map
Group files by coherent subsystem, execution path, and architectural boundary. Identify:
- entry points and callers
- important callees
- shared state and lifecycle owners
- persistence and migrations
- network, filesystem, process, cloud, and user-input boundaries
- dependency direction between groups
Do not divide one continuous control flow among reviewers. A batch should contain enough callers and callees to explain the behavior end to end.
Maintain a coverage ledger
Track every changed file with:
| Field |
Meaning |
| File |
Repository-relative path |
| Category |
Production, test, configuration, dependency, migration, generated, or documentation |
| Subsystem |
Coherent review group |
| Risk |
High, medium, or low |
| Depth |
Deep, sampled, mechanical, generated, deferred, or blocked |
| Decision |
Implementation decision or seam it supports |
| Evidence |
Relevant tests, checks, callers, and specifications |
| Status |
Pending or complete |
Deep means the implementation and its relevant callers and callees were read. Sampled is allowed only for low-risk repetition after verifying the governing rule and representative edge cases. Never sample security-sensitive, destructive, concurrent, persistent, public-contract, or hand-written behavioral code.
Save the ledger and review notes as a session artifact when the review will span several turns. Update them after every batch so another turn can resume without losing scope.
Review bounded batches
Review one coherent subsystem at a time. For each batch:
- read its production paths, callers, tests, and contracts
- trace its changed behavior end to end
- record decisions, findings, risks, evidence, and unanswered questions
- update the coverage ledger
- stop expanding the batch when the next path belongs to another subsystem
Do not compress later batches because earlier ones consumed context. Preserve summaries between batches and reload the relevant source when making the final assessment.
Delegate only independent work
Use independent review agents when the PR contains genuinely separate subsystems, language stacks, migrations, or generated-artifact checks that require substantial context.
- Give each reviewer complete PR context and exclusive ownership of its subsystem.
- Do not assign overlapping files or split a single execution path.
- Require file and line citations, evidence, and explicit coverage.
- Synthesize centrally.
- Personally inspect contracts that cross reviewer boundaries.
Delegation does not establish completeness. The coverage ledger does.
Prioritize by risk
Always review these paths deeply before low-risk repetition:
- authentication, authorization, validation, and secrets
- persistence, schemas, and data migrations
- concurrency, shared state, caching, and lifecycle
- public APIs, events, wire formats, and compatibility
- destructive operations and external side effects
- retries, timeouts, cancellation, rollback, and cleanup
- build, dependency, packaging, and deployment changes
Run cross-cutting passes
After subsystem review, inspect the whole PR again for:
- inconsistent error semantics
- leaked resources and incomplete shutdown
- confused state ownership
- broken dependency direction
- contract mismatches between subsystems
- security checks applied on one path but omitted on another
- tests that duplicate implementation assumptions instead of exercising contracts
- incompatible rollout, rollback, or mixed-version behavior
Large PR approval gates
Do not recommend approval when:
- a significant file is deferred or blocked
- a high-risk flow has not been traced end to end
- generated output cannot be reproduced from reviewed source
- changed contracts lack suitable test evidence
- cross-subsystem contracts remain unchecked
- the PR's behavior cannot be explained as a coherent set of decisions
- the coverage ledger is incomplete
Size alone is not a reason to request changes. Recommend splitting the PR when coupled scope prevents independent validation, safe rollout, or a coherent explanation of behavior.
Procedure
1. Establish scope
Read:
- PR title, body, linked issue or design, review threads, and checks
- merge base, commits, diff stat, and changed files
- repository instructions
- affected production code, callers, tests, package and build configuration
Use the merge base rather than an arbitrary branch tip. Exclude changes already present in the base.
State the PR's claimed purpose in one sentence, then state what the code actually changes. Call out scope drift, hidden behavior changes, and claims the diff does not support.
2. Build a one-screen orientation
Open with:
- Purpose: why this PR exists
- Placement: where the change sits in the system
- Mechanism: the main control and data flow
- Failure surface: what can fail and who observes it
- Review focus: the few decisions that determine whether the PR is safe
This section should let a generalist understand the change without reading the rest.
Introduce any domain knowledge required by the rest of the review here. Keep it brief and technical: identify the relevant system boundary, define the local terms, and explain the invariant or contract the PR must preserve.
3. Trace behavior through the system
Follow each important path from entry point to side effect and response. Cover only paths changed or made newly reachable by the PR.
For each path, identify:
- caller or trigger
- validation and trust boundary
- state read or written
- dependencies and external calls
- success result
- failure result
- cleanup, cancellation, retry, timeout, and concurrency behavior
- observable logs, metrics, statuses, or user feedback
Use a compact sequence or Mermaid diagram when prose would obscure the flow.
4. Assess the implementation by concern
Evaluate the concerns that apply:
- Architecture: module boundaries, dependency direction, ownership, coupling, composition, and migration seams
- State and lifecycle: initialization, reuse, mutation, concurrency, shutdown, cleanup, and resource ownership
- Contracts: APIs, HTTP methods and status codes, schemas, events, streams, serialization, compatibility, and generated artifacts
- Error handling: propagation, partial failure, retry, timeout, cancellation, idempotency, rollback, and success-shaped fallbacks
- Security and privacy: authentication, authorization, validation, injection, path confinement, secrets, destructive operations, and data exposure
- Operations: logging, diagnostics, recovery, deployability, configuration, observability, and rollback
- Performance: hot paths, blocking work, memory and connection lifetime, repeated work, and scaling limits
- Dependencies: new packages, permissions, supply-chain effects, runtime requirements, and lockfile changes
- Compatibility and release: existing callers, migration steps, flags, documentation, versioning, and changesets
Skip concerns that truly do not apply and say why in the coverage statement.
5. Examine testing as evidence
Map changed behavior and branches to tests. Separate:
- unit tests
- integration or contract tests
- functional or end-to-end tests
- manual evidence
- CI and build checks
For each layer, explain what it proves and what it cannot prove. Check happy paths, invalid input, dependency failure, cleanup, concurrency, timeout, retry, stale state, and compatibility where applicable.
Do not equate coverage percentage with behavioral coverage. Identify important behavior that no test exercises.
6. Explain important decisions
Organize this section around decisions and seams, not files. For every consequential decision, write:
Question
Ask the question an approver must be able to answer.
Code's answer
Explain what the implementation chose. Cite the significant files and lines.
Why it matters
Describe the behavioral, architectural, or operational consequence.
Alternative
Name a credible alternative and its tradeoff. Omit this subsection when no meaningful alternative exists.
Assessment
Say whether the choice is sound, what evidence supports it, and what uncertainty remains.
Include one to three questions for each file with significant changes, but group repeated questions under the shared decision. A significant file changes production behavior, a public contract, a system boundary, lifecycle, build output, or meaningful test evidence. Do not force questions for mechanical edits, fixtures, generated output, or configuration forwarding.
Questions are teaching devices. Answer them from the code. Do not ask the user questions whose answers are already present in the diff.
7. Rank risk
For each material risk, state:
- scenario
- likelihood
- impact
- detectability
- rollback or recovery difficulty
- existing mitigation
- remaining gap
Avoid invented numeric precision. Use low, medium, or high with a short justification.
8. Verify current status
Run the smallest relevant validation and inspect CI. Report commands only when they help the approver judge evidence or when something failed or was skipped.
Check whether prior review findings are fixed. Re-read the fix rather than relying on thread resolution.
9. Deliver the assessment
Use this order:
- Orientation
- What the code changes
- Data and control flow
- Key implementation decisions
- Failure handling and operations
- Security and compatibility
- Test evidence and gaps
- Risk register
- Findings
- Approval recommendation
- Coverage and confidence
Findings must be actionable and cite exact changed lines. Separate:
- Blocking findings
- Non-blocking concerns
- Strengths
- Residual risks
End with one recommendation:
- Approve
- Approve with follow-up
- Comment
- Request changes
- Not enough evidence
Explain the recommendation in two or three sentences. State what would change it.
Under Coverage and confidence, list:
- evidence inspected
- checks run or observed
- applicable concerns covered
- concerns skipped and why
- unresolved questions
- confidence: high, medium, or low
For Large PR mode, include a compact coverage table summarizing each subsystem and every significant file. State where review was deep, sampled, mechanical, generated, blocked, or deferred. Approval requires no blocked or deferred significant files.
Guardrails
- Do not narrate every file.
- Do not repeat the PR description without testing its claims.
- Do not pad the review with generic checklist language.
- Do not invent requirements, intent, alternatives, or test results.
- Do not treat style preferences as approval blockers.
- Do not hide uncertainty behind polished prose.
- Do not assume familiarity with product-specific architecture, protocols, deployment models, or internal terminology.
- Do not simplify away the mechanism that an approver needs to evaluate.
- Do not post comments, submit a review, or approve the PR unless the user explicitly asks.
- Do not expose secrets or use live production systems for validation.
- Keep the opening concise, then deepen progressively so the reader can stop after the orientation.
1---2name: approver-review3description: Produce a technically deep, readable assessment that helps an approver understand a pull request before approving it. Use when the user asks for an approver review, a detailed PR assessment, help understanding a PR, or an approval recommendation. Compare the PR's stated intent with the code, trace data and control flow, examine architecture, contracts, failure handling, lifecycle, security, operations, tests, compatibility, and rollback, then explain important implementation decisions and credible alternatives for a technical generalist.4---56# Approver Review78Help an approver understand what a pull request changes, how the implementation works, and what risk remains. Read the code as the primary source. Treat the PR description, linked issue, design documents, commit messages, and author comments as claims to verify.910This is an explanatory review with a decision at the end. It is broader than a bug hunt and more selective than a file-by-file walkthrough.1112## Audience1314Write in precise technical language for a technical generalist who can follow code, APIs, distributed systems, and architecture but may not know the PR's product area, framework, protocol, or infrastructure domain. Assume software-engineering fluency, not domain fluency.1516- Use the correct technical term, then define domain-specific terms and acronyms in one concise sentence when they first matter.17- Explain unfamiliar mechanisms through concrete components, inputs, outputs, state changes, ownership, and failure behavior.18- Distinguish the general concept from this repository's implementation of it.19- Connect domain details to the approval decision: explain why they affect correctness, compatibility, operations, security, or rollback.20- Prefer a short explanation over unexplained jargon, acronym chains, internal code names, or vague abstractions.21- Do not dilute technical depth, replace mechanisms with analogies, or over-explain concepts familiar to a general software engineer.2223Structure dense explanations as **conclusion → mechanism → consequence**. A reader should understand both what the code does and enough of the local domain to judge whether the implementation is sound.2425## Relationship to other skills2627Use repository-specific review or code-quality skills when they apply. Use security specialists when the user explicitly requests a security review.2829Before presenting the final assessment, invoke `classic-style` and apply its guidance silently. Preserve technical qualifications and uncertainty. Do not add a separate prose-editing appendix.3031## Inputs3233- Pull request number, URL, or current PR context.34- Optional emphasis such as security, API compatibility, testing, or operations.35- Repository instructions and applicable design documents.3637If no PR can be identified, ask for one. Do not infer a different PR.3839## Principles40411. The diff and its callers outrank the PR narrative.422. Explain decisions and seams, not every changed line.433. Separate verified facts, reasonable inferences, and unanswered questions.444. Distinguish test quantity from test quality.455. Name credible alternatives only when the implementation involved a meaningful choice.466. Report risks in proportion to their likelihood and impact.477. Never approve because CI is green. Never reject because a different design also could work.488. Cite repository-relative files and exact lines for consequential claims.4950## Large PR mode5152Use Large PR mode when the change exceeds roughly 1,000 changed lines, spans more than 30 files, crosses several subsystems, or cannot fit comfortably in one review pass. A 5,000-line PR is reviewable when its scope is coherent and the review remains accountable.5354Large PR mode changes the review method, not the standard of evidence.5556### Inventory before reading5758Capture:5960- commits and merge base61- files and changed-line counts62- languages and subsystems63- production, test, configuration, documentation, dependency, migration, and generated files64- public contracts and external boundaries65- generated files and the command that reproduces them6667Classify each changed file before reviewing details. Separate mechanical changes from behavioral changes, but verify that a supposedly mechanical transformation follows one rule.6869### Build a change map7071Group files by coherent subsystem, execution path, and architectural boundary. Identify:7273- entry points and callers74- important callees75- shared state and lifecycle owners76- persistence and migrations77- network, filesystem, process, cloud, and user-input boundaries78- dependency direction between groups7980Do not divide one continuous control flow among reviewers. A batch should contain enough callers and callees to explain the behavior end to end.8182### Maintain a coverage ledger8384Track every changed file with:8586| Field | Meaning |87|---|---|88| File | Repository-relative path |89| Category | Production, test, configuration, dependency, migration, generated, or documentation |90| Subsystem | Coherent review group |91| Risk | High, medium, or low |92| Depth | Deep, sampled, mechanical, generated, deferred, or blocked |93| Decision | Implementation decision or seam it supports |94| Evidence | Relevant tests, checks, callers, and specifications |95| Status | Pending or complete |9697`Deep` means the implementation and its relevant callers and callees were read. `Sampled` is allowed only for low-risk repetition after verifying the governing rule and representative edge cases. Never sample security-sensitive, destructive, concurrent, persistent, public-contract, or hand-written behavioral code.9899Save the ledger and review notes as a session artifact when the review will span several turns. Update them after every batch so another turn can resume without losing scope.100101### Review bounded batches102103Review one coherent subsystem at a time. For each batch:1041051. read its production paths, callers, tests, and contracts1062. trace its changed behavior end to end1073. record decisions, findings, risks, evidence, and unanswered questions1084. update the coverage ledger1095. stop expanding the batch when the next path belongs to another subsystem110111Do not compress later batches because earlier ones consumed context. Preserve summaries between batches and reload the relevant source when making the final assessment.112113### Delegate only independent work114115Use independent review agents when the PR contains genuinely separate subsystems, language stacks, migrations, or generated-artifact checks that require substantial context.116117- Give each reviewer complete PR context and exclusive ownership of its subsystem.118- Do not assign overlapping files or split a single execution path.119- Require file and line citations, evidence, and explicit coverage.120- Synthesize centrally.121- Personally inspect contracts that cross reviewer boundaries.122123Delegation does not establish completeness. The coverage ledger does.124125### Prioritize by risk126127Always review these paths deeply before low-risk repetition:128129- authentication, authorization, validation, and secrets130- persistence, schemas, and data migrations131- concurrency, shared state, caching, and lifecycle132- public APIs, events, wire formats, and compatibility133- destructive operations and external side effects134- retries, timeouts, cancellation, rollback, and cleanup135- build, dependency, packaging, and deployment changes136137### Run cross-cutting passes138139After subsystem review, inspect the whole PR again for:140141- inconsistent error semantics142- leaked resources and incomplete shutdown143- confused state ownership144- broken dependency direction145- contract mismatches between subsystems146- security checks applied on one path but omitted on another147- tests that duplicate implementation assumptions instead of exercising contracts148- incompatible rollout, rollback, or mixed-version behavior149150### Large PR approval gates151152Do not recommend approval when:153154- a significant file is deferred or blocked155- a high-risk flow has not been traced end to end156- generated output cannot be reproduced from reviewed source157- changed contracts lack suitable test evidence158- cross-subsystem contracts remain unchecked159- the PR's behavior cannot be explained as a coherent set of decisions160- the coverage ledger is incomplete161162Size alone is not a reason to request changes. Recommend splitting the PR when coupled scope prevents independent validation, safe rollout, or a coherent explanation of behavior.163164## Procedure165166### 1. Establish scope167168Read:169170- PR title, body, linked issue or design, review threads, and checks171- merge base, commits, diff stat, and changed files172- repository instructions173- affected production code, callers, tests, package and build configuration174175Use the merge base rather than an arbitrary branch tip. Exclude changes already present in the base.176177State the PR's claimed purpose in one sentence, then state what the code actually changes. Call out scope drift, hidden behavior changes, and claims the diff does not support.178179### 2. Build a one-screen orientation180181Open with:182183- **Purpose:** why this PR exists184- **Placement:** where the change sits in the system185- **Mechanism:** the main control and data flow186- **Failure surface:** what can fail and who observes it187- **Review focus:** the few decisions that determine whether the PR is safe188189This section should let a generalist understand the change without reading the rest.190Introduce any domain knowledge required by the rest of the review here. Keep it brief and technical: identify the relevant system boundary, define the local terms, and explain the invariant or contract the PR must preserve.191192### 3. Trace behavior through the system193194Follow each important path from entry point to side effect and response. Cover only paths changed or made newly reachable by the PR.195196For each path, identify:197198- caller or trigger199- validation and trust boundary200- state read or written201- dependencies and external calls202- success result203- failure result204- cleanup, cancellation, retry, timeout, and concurrency behavior205- observable logs, metrics, statuses, or user feedback206207Use a compact sequence or Mermaid diagram when prose would obscure the flow.208209### 4. Assess the implementation by concern210211Evaluate the concerns that apply:212213- **Architecture:** module boundaries, dependency direction, ownership, coupling, composition, and migration seams214- **State and lifecycle:** initialization, reuse, mutation, concurrency, shutdown, cleanup, and resource ownership215- **Contracts:** APIs, HTTP methods and status codes, schemas, events, streams, serialization, compatibility, and generated artifacts216- **Error handling:** propagation, partial failure, retry, timeout, cancellation, idempotency, rollback, and success-shaped fallbacks217- **Security and privacy:** authentication, authorization, validation, injection, path confinement, secrets, destructive operations, and data exposure218- **Operations:** logging, diagnostics, recovery, deployability, configuration, observability, and rollback219- **Performance:** hot paths, blocking work, memory and connection lifetime, repeated work, and scaling limits220- **Dependencies:** new packages, permissions, supply-chain effects, runtime requirements, and lockfile changes221- **Compatibility and release:** existing callers, migration steps, flags, documentation, versioning, and changesets222223Skip concerns that truly do not apply and say why in the coverage statement.224225### 5. Examine testing as evidence226227Map changed behavior and branches to tests. Separate:228229- unit tests230- integration or contract tests231- functional or end-to-end tests232- manual evidence233- CI and build checks234235For each layer, explain what it proves and what it cannot prove. Check happy paths, invalid input, dependency failure, cleanup, concurrency, timeout, retry, stale state, and compatibility where applicable.236237Do not equate coverage percentage with behavioral coverage. Identify important behavior that no test exercises.238239### 6. Explain important decisions240241Organize this section around decisions and seams, not files. For every consequential decision, write:242243#### Question244245Ask the question an approver must be able to answer.246247#### Code's answer248249Explain what the implementation chose. Cite the significant files and lines.250251#### Why it matters252253Describe the behavioral, architectural, or operational consequence.254255#### Alternative256257Name a credible alternative and its tradeoff. Omit this subsection when no meaningful alternative exists.258259#### Assessment260261Say whether the choice is sound, what evidence supports it, and what uncertainty remains.262263Include one to three questions for each file with significant changes, but group repeated questions under the shared decision. A significant file changes production behavior, a public contract, a system boundary, lifecycle, build output, or meaningful test evidence. Do not force questions for mechanical edits, fixtures, generated output, or configuration forwarding.264265Questions are teaching devices. Answer them from the code. Do not ask the user questions whose answers are already present in the diff.266267### 7. Rank risk268269For each material risk, state:270271- scenario272- likelihood273- impact274- detectability275- rollback or recovery difficulty276- existing mitigation277- remaining gap278279Avoid invented numeric precision. Use `low`, `medium`, or `high` with a short justification.280281### 8. Verify current status282283Run the smallest relevant validation and inspect CI. Report commands only when they help the approver judge evidence or when something failed or was skipped.284285Check whether prior review findings are fixed. Re-read the fix rather than relying on thread resolution.286287### 9. Deliver the assessment288289Use this order:2902911. **Orientation**2922. **What the code changes**2933. **Data and control flow**2944. **Key implementation decisions**2955. **Failure handling and operations**2966. **Security and compatibility**2977. **Test evidence and gaps**2988. **Risk register**2999. **Findings**30010. **Approval recommendation**30111. **Coverage and confidence**302303Findings must be actionable and cite exact changed lines. Separate:304305- **Blocking findings**306- **Non-blocking concerns**307- **Strengths**308- **Residual risks**309310End with one recommendation:311312- **Approve**313- **Approve with follow-up**314- **Comment**315- **Request changes**316- **Not enough evidence**317318Explain the recommendation in two or three sentences. State what would change it.319320Under **Coverage and confidence**, list:321322- evidence inspected323- checks run or observed324- applicable concerns covered325- concerns skipped and why326- unresolved questions327- confidence: high, medium, or low328329For Large PR mode, include a compact coverage table summarizing each subsystem and every significant file. State where review was deep, sampled, mechanical, generated, blocked, or deferred. Approval requires no blocked or deferred significant files.330331## Guardrails332333- Do not narrate every file.334- Do not repeat the PR description without testing its claims.335- Do not pad the review with generic checklist language.336- Do not invent requirements, intent, alternatives, or test results.337- Do not treat style preferences as approval blockers.338- Do not hide uncertainty behind polished prose.339- Do not assume familiarity with product-specific architecture, protocols, deployment models, or internal terminology.340- Do not simplify away the mechanism that an approver needs to evaluate.341- Do not post comments, submit a review, or approve the PR unless the user explicitly asks.342- Do not expose secrets or use live production systems for validation.343- Keep the opening concise, then deepen progressively so the reader can stop after the orientation.