| name | code-review |
| description | Review a diff against project rules and acceptance criteria before merging |
| when_to_use | After completing a task, implementing a feature, or before any merge to main |
Code Review
Check the diff against project conventions and the ticket's acceptance criteria. Flag gaps before merge.
When to Review
- After each feature task or bugfix
- Before any merge to main
- When stuck (fresh perspective)
- After fixing a complex pipeline bug
The Checklist
Run git diff or git show and verify every item below.
1. Project Structure Rules (from .claude/project-rules.md)
2. Architecture and DRY
3. Code Quality
4. Encoding / ROM Safety
5. Tests
6. Commit Format
type(scope): description courte
Description détaillée si nécessaire.
- Point 1
- Point 2
Types: feat, fix, refactor, docs, test, chore
How to Review
git diff HEAD~1
git diff --stat HEAD~1
pytest tests/ -v
pytest --cov=src tests/
Output Format
Report findings as:
Critical (blocks merge): wrong file location, skipped test, hardcoded offset fix, ROM modified without backup, missing 0xFF terminator
Important (fix before proceeding): missing docstring, missing type hint, duplicated code that should be in src/core/, magic number
Minor (note for later): naming inconsistency, comment clarity, overly long function
Assessment: Ready / Fix critical issues / Fix important issues
Red Flags
- Script at repo root → block merge
- Skipped test → block merge
pytest tests/ shows failures → block merge
- Hardcoded
if offset == 0xABCDEF → block merge (project-rules.md: forbidden)
- Missing backup before ROM write → block merge