rules/common/code-review.md
Code review ensures quality, security, and maintainability before code is merged. This rule defines when and how to conduct code reviews.
MANDATORY review triggers:
Pre-Review Requirements:
Before requesting review, ensure:
Before marking code complete:
STOP and use security-reviewer agent when:
| Level | Meaning | Action |
|---|---|---|
| CRITICAL | Security vulnerability or data loss risk | BLOCK - Must fix before merge |
| HIGH | Bug or significant quality issue | WARN - Should fix before merge |
| MEDIUM | Maintainability concern | INFO - Consider fixing |
| LOW | Style or minor suggestion | NOTE - Optional |
Use these agents for code review:
| Agent | Purpose |
|---|---|
| code-reviewer | General code quality, patterns, best practices |
| security-reviewer | Security vulnerabilities, OWASP Top 10 |
| typescript-reviewer | TypeScript/JavaScript specific issues |
| python-reviewer | Python specific issues |
| go-reviewer | Go specific issues |
| rust-reviewer | Rust specific issues |
1. Run git diff to understand changes
2. Check security checklist first
3. Review code quality checklist
4. Run relevant tests
5. Verify coverage >= 80%
6. Use appropriate agent for detailed review
This rule works with: