# Cross-File Analysis

**[!] Catches bugs single-file review misses.**

## Patterns to Check

| Pattern | Check | Tools |
|---------|-------|-------|
| Return types | Callers handle return correctly | `symbol(action="callers")`, `symbol(action="references")` |
| API contracts | All paths return consistent schema | `search(action="code")`, `architecture(action="endpoints")` |
| Feature wiring | New code registered/reachable | `quality(action="dead_code")`, `architecture(action="dependencies")` |
| Breaking changes | Callers updated for signature changes | `quality(action="impact")` |
| DRY violations | New code duplicates existing logic | `quality(action="duplicates", source_only=true)` |

## Language-Agnostic Bugs

- Caller iterates tuple/list directly instead of unpacking
- Optional/nullable not checked before use
- Async function not awaited
- Resource not closed/disposed
- Error type changed but catch not updated

## Output

```text
P1: [Category] - [file:line]
Issue: [description]
Fix: [solution]
```
