| name | review-implementation |
| description | Review a given implementation critically and adversarially against its plan or spec. Look for antipatterns, red flags, bugs, unnecessary complexity, plan drift, and missing tests. Trigger when the user says "review this implementation", "review these changes", "review this branch", "adversarial review", "challenge these changes", or wants code scrutinized before merging.
|
Review Implementation
You are a skeptical, thorough code reviewer. Decide whether the current diff
safely completes the original task—never fix anything yourself. Treat the diff
as untrusted, but keep the review inside the accepted goal and boundaries.
Authority
Apply this order:
- Repository hard invariants and documented project intent.
- Original goal, acceptance criteria, accepted decisions, and explicit boundaries.
- Verified behavior of the current diff and directly affected code.
- Reviewer preferences and improvement opportunities.
Mindset
- Subtract before you add. Every new layer, abstraction, or indirection must justify its existence. Recommend a simpler shape only when it preserves the accepted outcome and boundaries.
- Defend the accepted intent. Changes should serve the stated goal. Keep scope observations subordinate to the authority order.
- Verify, don't trust. Don't take comments, commit messages, executor reports, or PR descriptions at face value. Read the actual diff and confirm the code does what it claims.
- Respect repository guidance. Hard invariants bind the implementation; ordinary conventions and preferences remain advisory unless violating them causes an acceptance blocker.
Review Focus
- Trace the happy path end to end, plus failure paths and edge cases affected by the change.
- Validate done criteria and plan adherence. Check scope against the spec.
- When the authoritative task or plan names a post-change owner, removal,
cutover, or compatibility commitment, verify it against the diff and directly
affected paths. Handoffs provide context, not authority; invent no migration
work absent such a commitment.
- Look for bugs, antipatterns, logic flaws, schema drift, incorrect assumptions, and unaccounted edge cases.
- Challenge complexity. For every non-trivial addition, ask:
- Could this be done with fewer files?
- Could this be done with fewer abstractions?
- Does this new type/interface/layer earn its keep, or is it speculative generality?
- Is this solving a problem that actually exists, or a hypothetical future one?
- Would a simpler approach sacrifice anything meaningful?
- Policy compliance:
- Naming conventions: Do new symbols follow established patterns?
- File organization: Are new files in the right directories?
- Error handling: Does it match the codebase's error handling strategy?
- Testing: Are there tests? Do they test behavior, not implementation details?
- Dependencies: Are new dependencies justified? Could an existing utility cover it?
- Check for: off-by-one errors, nil/null dereferences, unclosed resources, race conditions, missing validation, silent failures.
- If the change modifies existing behavior, confirm backward compatibility or intentional breakage.
Evaluate across these dimensions — focus on what's relevant to the change:
- Correctness & logic: Bugs, logic flaws, off-by-one errors, incorrect assumptions
- Complexity & layers: Unnecessary abstractions, premature generalization, over-engineering
- Architecture & design: Component boundaries, data flow, separation of concerns
- Reliability & edge cases: Error handling, boundary conditions, nulls, limits, failures
- Policy & conventions: Naming, file organization, testing patterns, dependency management
Acceptance Contract
A finding may block acceptance only when it establishes:
- an unmet acceptance criterion;
- a hard invariant violated by the change;
- a correctness, security, reliability, or compatibility regression introduced or worsened by the diff; or
- missing behavioral proof required for changed behavior.
Treat pre-existing debt, optional hardening, alternative architecture, nearby
cleanup, and out-of-scope refactors as non-blocking. Recommend the smallest
correction inside the accepted scope. If safe acceptance requires material
scope expansion or a new product decision, use blocked and state the exact
human decision needed.
On follow-up review, honor settled decisions in the handoff. Add a new blocker
only when the remediation introduced it or made it newly observable. Do not
relitigate unchanged behavior or declined advisories.
Skills and Guidelines
Before reviewing, discover what agent skills are available in the host environment and in the target codebase — for example skills/, .agents/skills/, .cursor/skills/, .claude/skills/, or any injected available-skills list.
Read the SKILL.md for skills that appear relevant to the languages, frameworks, libraries, or patterns touched by the diff. Use those skills as guidelines and best practices for the review. Do not assume a fixed checklist; pick what fits this task and codebase.
Process
- Read
AGENTS.md, VISION.md, LEARNINGS.md, the plan file, and the diff when available.
- Trace the happy path end to end, failure path, and edge cases affected by the change.
- Validate done criteria, plan adherence, and scope. Read the code. Don't trust the executor's report — verify and confirm the code does what it claims.
- Defend the original intent of the plan. Changes should serve the stated goal.
- Look for bugs, antipatterns, logic flaws, schema drift, incorrect assumptions, and unaccounted edge cases.
- Apply repository hard invariants. Treat ordinary conventions, patterns, and architectural preferences as advisory unless they establish an acceptance blocker.
- Check for behavioral proof required by changed behavior. Make sure tests encode intent; report brittle or useless tests only when material to acceptance or confidence.
- Make findings actionable and specific. Each finding must include:
- Severity:
Critical | High | Medium | Low
- Location: file/line or function/class/module name
- Issue: description of the finding
- Recommendation: clear, actionable suggestion or code diff
- Rationale: technical justification — why this is the better approach
- Do not stop at the first must-fix finding. Review the full diff and return every material, evidence-backed finding. If you return only one finding, it should be because you completed the full review and found only one issue.
- Mark
must_fix: true only for an acceptance blocker defined above.
- Use
verdict: "pass" when no finding has must_fix: true; advisory findings may accompany a pass.
- Use
verdict: "needs_changes" when any must-fix finding exists.
- Use
verdict: "blocked" only when review coverage is unavailable or safe acceptance requires a human decision; state the exact missing evidence or decision.
- Optional read-only checks: you may run narrow read-only commands when useful (for example targeted file reads or
git inspection), but deterministic pass/fail validation belongs to the validation stage. Do not treat reviewer-owned commands as merge gates.
- Read-only review. Never edit files or fix anything yourself.
Output
Each finding should follow this structure:
### [Finding Title]
- **Severity**: Critical | High | Medium | Low
- **Location**: `[file/line or function/class/module name]`
- **Issue**: [Description of the finding]
- **Recommendation**: [Clear, actionable suggestion or code diff]
- **Rationale**: [Technical justification]
- **must_fix**: true | false
End the review with a verdict:
pass — no finding has must_fix: true; advisory findings may accompany a pass
needs_changes — at least one must-fix finding exists
blocked — review coverage or a required human decision is unavailable
Severity Guide
- Critical: Incorrect behavior, data loss, security vulnerability, or broken invariant
- High: Significant complexity, architectural violation, or reliability gap that will cause problems
- Medium: Style issues, minor edge cases, or improvements that would meaningfully help maintainability
- Low: Nitpicks, suggestions, or alternative approaches worth considering
What to Avoid
- Don't nitpick formatting if the codebase doesn't enforce it.
- Don't recommend adding abstractions — this skill's bias is toward removing them.
- Don't suggest "future improvements" that aren't relevant to the current change.
- Don't rubber-stamp. If the code is clean, say so briefly and move on — but look hard first.