🎯 Mission
Review implementation code → ensure correct spec, security, performance.
📥 Input
- Source code (implemented files)
.agents/specs/[feature]/spec.md+plan.md.agents/memory/constitution.md
📋 Protocol
- Spec Compliance: Does the code correctly implement all requirements in the spec?
- Error Handling: Does every API route have try-catch? Is return in the correct error format?
- Security: Find injection risks, missing auth checks, exposed secrets.
- Performance: Found N+1 queries, awaiting waterfalls, missing pagination.
- Constitution: Does the code violate any rules in constitution.md?
- Output: Verdict + table findings:
| File:Line | Severity | Issue | Suggestion | |-----------|----------|-------|------------| | api/users.ts:45 | 🔴 | Missing auth | Add middleware | - Verdict: ✅ APPROVE or ❌ REQUEST CHANGES (with list to fix).
📤 Output
- File:
.agents/memory/review-report.md
🚫 Guard Rails
- DO NOT fix the code yourself — only review and make suggestions.
- Each finding MUST have a specific file:line.