Review
Purpose
Parallel specialized code review. Dispatches 8 review agents, each analyzing the same code from a different angle. Every agent argues AGAINST its own findings (self-challenge). Cross-agent corroboration filters noise from signal.
When to Use
- Before merging a PR
- After completing a feature (pre-commit review)
- When reviewing someone else's code
- Periodic architecture review
Process
- Explore first -- run
/ai-explore on the changed files to build architectural context
- Dispatch reviewers -- follow
handlers/review.md (8 parallel specialized agents)
- Aggregate findings -- correlate, deduplicate, confidence-score
- Self-challenge -- each finding is argued against by its own agent
- Filter -- drop solo findings below 40% confidence
- Report -- produce review summary with actionable findings
See handlers/review.md for the full review workflow, handlers/find.md for finding existing reviews, and handlers/learn.md for the continuous improvement loop.
Quick Reference
| Mode |
What it does |
review |
Full parallel review (default) |
find |
Find and summarize existing review comments on a PR |
learn |
Extract lessons from past reviews for future improvement |
The 8 Review Agents
| Agent |
Focus |
Looks for |
| Security |
OWASP, injection, auth |
SQL injection, XSS, auth bypass, secret exposure |
| Performance |
Speed, memory, I/O |
N+1 queries, O(n^2), memory leaks, blocking I/O |
| Correctness |
Logic, edge cases |
Off-by-one, null handling, race conditions, missing cases |
| Maintainability |
Readability, complexity |
God functions, deep nesting, unclear naming, magic numbers |
| Testing |
Coverage, quality |
Missing tests, weak assertions, testing implementation |
| Compatibility |
Breaking changes, API |
Public API changes, backward compat, deprecation |
| Architecture |
Boundaries, patterns |
Layer violations, circular deps, pattern inconsistency |
| Frontend |
UX, a11y, rendering |
Missing aria labels, layout shifts, unhandled states |
Confidence Scoring
Each finding gets a confidence score (20-100%):
| Score |
Meaning |
Action |
| 80-100% |
High confidence, clear evidence |
Must address |
| 60-79% |
Moderate confidence |
Should address |
| 40-59% |
Low confidence, single agent |
Consider |
| 20-39% |
Solo finding, uncertain |
Dropped unless critical severity |
Corroboration bonus: when 2+ agents flag the same issue, confidence increases by 20%.
Solo penalty: single-agent findings below 40% are dropped from the report.
Self-Challenge Protocol
For each finding, the reviewing agent must:
- State the finding (what is wrong)
- Argue against it (why this might be acceptable)
- Resolve (finding stands, confidence adjusted, or finding withdrawn)
Example:
Finding: Function handles 5 different concerns (god function)
Counter: This is a CLI command handler -- some breadth is expected in the entry point
Resolution: Finding stands but severity reduced to minor. The handler delegates
to helpers for the complex logic. Confidence: 55%
Common Mistakes
- Reviewing without architectural context (always explore first)
- Treating all findings equally (use confidence scoring)
- Not self-challenging (every finding must be argued against)
- Reviewing only the diff without understanding the surrounding code
- Flagging style preferences as bugs
Integration
- Called by: user directly,
/ai-pr (pre-merge review)
- Calls:
/ai-explore (context), handlers/review.md, handlers/find.md, handlers/learn.md
- Read-only: never modifies code -- produces review findings
$ARGUMENTS
1---2name: review-443description: Use when reviewing code changes (PRs, diffs, or files) with parallel specialized agents. 8-agent review with self-challenge protocol and cross-agent corroboration.4---5
6
7
8# Review
9
10## Purpose
11
12Parallel specialized code review. Dispatches 8 review agents, each analyzing the same code from a different angle. Every agent argues AGAINST its own findings (self-challenge). Cross-agent corroboration filters noise from signal.
13
14## When to Use
15
16- Before merging a PR
17- After completing a feature (pre-commit review)
18- When reviewing someone else's code
19- Periodic architecture review
20
21## Process
22
231. **Explore first** -- run `/ai-explore` on the changed files to build architectural context
242. **Dispatch reviewers** -- follow `handlers/review.md` (8 parallel specialized agents)
253. **Aggregate findings** -- correlate, deduplicate, confidence-score
264. **Self-challenge** -- each finding is argued against by its own agent
275. **Filter** -- drop solo findings below 40% confidence
286. **Report** -- produce review summary with actionable findings
29
30See `handlers/review.md` for the full review workflow, `handlers/find.md` for finding existing reviews, and `handlers/learn.md` for the continuous improvement loop.
31
32## Quick Reference
33
34| Mode | What it does |
35|------|-------------|
36| `review` | Full parallel review (default) |
37| `find` | Find and summarize existing review comments on a PR |
38| `learn` | Extract lessons from past reviews for future improvement |
39
40## The 8 Review Agents
41
42| Agent | Focus | Looks for |
43|-------|-------|-----------|
44| Security | OWASP, injection, auth | SQL injection, XSS, auth bypass, secret exposure |
45| Performance | Speed, memory, I/O | N+1 queries, O(n^2), memory leaks, blocking I/O |
46| Correctness | Logic, edge cases | Off-by-one, null handling, race conditions, missing cases |
47| Maintainability | Readability, complexity | God functions, deep nesting, unclear naming, magic numbers |
48| Testing | Coverage, quality | Missing tests, weak assertions, testing implementation |
49| Compatibility | Breaking changes, API | Public API changes, backward compat, deprecation |
50| Architecture | Boundaries, patterns | Layer violations, circular deps, pattern inconsistency |
51| Frontend | UX, a11y, rendering | Missing aria labels, layout shifts, unhandled states |
52
53## Confidence Scoring
54
55Each finding gets a confidence score (20-100%):
56
57| Score | Meaning | Action |
58|-------|---------|--------|
59| 80-100% | High confidence, clear evidence | Must address |
60| 60-79% | Moderate confidence | Should address |
61| 40-59% | Low confidence, single agent | Consider |
62| 20-39% | Solo finding, uncertain | Dropped unless critical severity |
63
64**Corroboration bonus**: when 2+ agents flag the same issue, confidence increases by 20%.
65**Solo penalty**: single-agent findings below 40% are dropped from the report.
66
67## Self-Challenge Protocol
68
69For each finding, the reviewing agent must:
70
711. **State the finding** (what is wrong)
722. **Argue against it** (why this might be acceptable)
733. **Resolve** (finding stands, confidence adjusted, or finding withdrawn)
74
75Example:
76```
77Finding: Function handles 5 different concerns (god function)
78Counter: This is a CLI command handler -- some breadth is expected in the entry point
79Resolution: Finding stands but severity reduced to minor. The handler delegates
80 to helpers for the complex logic. Confidence: 55%
81```
82
83## Common Mistakes
84
85- Reviewing without architectural context (always explore first)
86- Treating all findings equally (use confidence scoring)
87- Not self-challenging (every finding must be argued against)
88- Reviewing only the diff without understanding the surrounding code
89- Flagging style preferences as bugs
90
91## Integration
92
93- **Called by**: user directly, `/ai-pr` (pre-merge review)
94- **Calls**: `/ai-explore` (context), `handlers/review.md`, `handlers/find.md`, `handlers/learn.md`
95- **Read-only**: never modifies code -- produces review findings
96
97$ARGUMENTS