PR Code Review
Pre-landing code review that analyzes the current branch's diff for structural issues that tests don't catch.
Specialists
| Specialist | Focus | File |
|---|---|---|
| api-contract | API contract review | specialists/api-contract.md |
| data-migration | Data migration safety | specialists/data-migration.md |
| maintainability | Code maintainability | specialists/maintainability.md |
| performance | Performance review | specialists/performance.md |
| red-team | Adversarial review | specialists/red-team.md |
| security | Security deep-dive | specialists/security.md |
| testing | Test coverage review | specialists/testing.md |
Workflow
- Check branch: Verify current branch and base branch
- Get the diff:
git diffagainst base branch - Critical pass: Check for CRITICAL and INFORMATIONAL issues from checklist
- Specialist dispatch: Detect stack/scope from diff, select relevant specialists (adaptive gating), dispatch in parallel, collect and merge findings with fingerprint dedup
- Fix-first review: Classify AUTO-FIX vs ASK items, auto-fix AUTO-FIX items, batch-ask ASK items
- TODOS cross-reference: Check if findings relate to existing TODOS items
- Documentation staleness: Flag any docs that may be out of date after this diff
- Output: Structured review with severity, confidence, fingerprint per finding
Output Format
Each finding includes:
- Severity: CRITICAL / WARNING / INFO
- Confidence: 0-10
- Fingerprint: unique identifier for dedup
- File and line range
- Description and recommended fix