| name | ff-review |
| description | Mandatory pre-commit code review gate. Checks constraint violations, cross-module consistency, and implementation quality. Trigger proactively when changes span multiple files or touch shared infrastructure. Trigger: 'review', 'check before commit'. |
Code Review Workflow
Process Overview
1. Capture changes → git diff
2. Load constraints → .agents/knowledge/constraints.md
3. Review against constraints and architecture
4. Route by verdict:
✓ Safe → Proceed with commit
⚠ Needs-attention → Fix issues, then commit
✗ Risky → Halt and report
Step 1: Capture Changes
git diff HEAD
git status
Step 2: Load Context
- Read
.agents/knowledge/constraints.md — All hard constraints
- Reference
.agents/knowledge/architecture.md — Module dependencies
- Identify which modules are affected by the changes
Step 3: Review Checklist
Constraint Compliance
Cross-Module Consistency
Implementation Quality
Code Style
Documentation
Step 4: Route by Verdict
✓ Safe
No issues found. Proceed with commit.
⚠ Needs-Attention
Issues found but fixable:
- List each issue with file and line
- Fix identified problems
- Re-stage and re-review
✗ Risky
Potential breaking changes:
- Halt commit
- Report findings with severity
- Await explicit user approval
After Commit
- Run
black --check src/ && isort --check src/ to confirm formatting compliance.
- Verify PR title follows
[{modules}] {type}: {description} format.
- If this was a bug fix, follow
topics/fix_patterns.md archival process.
Pre-Review Reading
Before reviewing, always read Tier 1: constraints.md, architecture.md, philosophy.md.
Additionally, read based on diff scope:
| Diff touches... | Also read |
|---|
models/ | topics/adapter_conventions.md, topics/parity_testing.md |
trainers/ | topics/train_inference_consistency.md |
scheduler/ | topics/train_inference_consistency.md, topics/dtype_precision.md |
| New adapter | topics/adapter_conventions.md, topics/parity_testing.md |
| dtype/precision | topics/dtype_precision.md |
Common Issues Found in Review
- Registry path stale — Class moved but registry not updated
- Config field renamed — YAML examples still use old name
- New config field not in examples — Users won't discover it; add with default value and
# Options: comment
- Base class change not propagated — Subclass override now has wrong signature
- Missing
wait_for_everyone() — Distributed deadlock risk
- Reward shape mismatch — Pointwise returning wrong batch dim
- License header missing — New files without Apache 2.0 header