| name | phoenix-code-review |
| description | Reviews Phoenix code for controller patterns, context boundaries, routing, and plugs. Use when reviewing Phoenix apps, checking controllers, routers, or context modules. |
Phoenix Code Review
Quick Reference
Review Checklist
Controllers
Contexts
Routing
Plugs
JSON APIs
Valid Patterns (Do NOT Flag)
- Controller calling multiple contexts - Valid for orchestration
- Inline Ecto query in context - Context owns its data access
- Using
action_fallback - Centralized error handling pattern
- Multiple pipelines per route - Composition is intentional
Plug.Conn.halt/1 without send - May be handled by fallback
Context-Sensitive Rules
| Issue | Flag ONLY IF |
|---|
| Missing changeset validation | Field accepts user input AND no validation exists |
| Controller too large | More than 7 actions OR actions > 20 lines |
| Missing authorization | Route is not public AND no auth plug in pipeline |
Before Submitting Findings
Load and follow review-verification-protocol before reporting any issue.