Code Review Protocol
<critical_constraints>
-
❌ NO commands. Frame suggestions as questions ("Why not use X?" vs "Use X").
-
❌ NO unexplained changes. Explain why it improves code.
-
✅ MUST prioritize Critical (Bugs/Security) > Style.
-
✅ MUST use assets/report_template.md .
-
✅ MUST be constructive. </critical_constraints>
-
Context: identify language, framework, purpose.
-
Deep Scan:
-
Check against assets/checklist.md .
-
Correctness: Logical flaws, null checks, race conditions.
-
Security: Injection, XSS, Secrets.
-
Performance: Big O, N+1 queries, leaks.
-
Style: Naming, idioms.
-
Draft Report:
-
Group by severity.
-
Include Location, Problem, Suggested Fix.
-
<validation_gate>:
-
Check tone. Ensure critical issues have fixes.
-
Run validation script. </validation_gate>
-
Final Output: Present Markdown report.
See assets/report_template.md .