Multi-Pass Review Architecture
CoreDesign multi-instance and multi-pass review architectures · Difficulty 4/5
Explanation
Multi-pass review splits large reviews into focused passes to avoid attention dilution and contradictory findings.
The Attention Dilution Problem
Reviewing a large codebase (14+ files) in one pass causes the model to miss issues in the middle of long contexts. Findings may also contradict each other when the model loses track of cross-file dependencies.
Multi-Pass Architecture
Pass 1 -- Per-File Local Analysis:
- Each file gets focused, independent analysis
- Catches local issues: bugs, style violations, security problems
- Each pass has the model's full attention on one file
Pass 2 -- Cross-File Integration:
- Separate pass focused on interactions between files
- Catches: data flow issues, API contract mismatches, dependency problems
- Uses summaries from Pass 1 as context
Benefits
- No attention dilution: Each file gets full attention
- No contradictions: Cross-file issues resolved in integration pass
- Parallelizable: Per-file passes can run concurrently
- Scalable: Works for any number of files
Combined with Independent Review
For maximum quality:
- Generator instance produces code
- Per-file review passes catch local issues
- Cross-file integration pass catches interactions
- All review passes use independent instances (no generator context)
Key Takeaways
- Split large reviews into per-file local passes plus cross-file integration passes
- Per-file passes avoid attention dilution; integration passes catch cross-file issues
- Per-file passes are parallelizable for efficiency
- Combine multi-pass with independent instances for maximum review quality
Related Concepts
Test Yourself
1 / 1Your team uses Claude Code to generate code suggestions, but subtle issues — performance optimizations that break edge cases, cleanups that change behavior unexpectedly — only surface when a different team member reviews the PR. Claude's reasoning during generation shows it considered these cases but concluded its approach was correct. Which approach directly addresses the root cause?