Critical and uncompromising review of work done
| Template | Usage |
|---|---|
templates/quick_checklist.md |
Quick validation checklist |
templates/review_report.md |
Detailed review report |
Fundamental rule: Never accept mediocre code. Be your own harshest critic.
.unwrap()?After each implementation, self-evaluate honestly:
| Criterion | Score | Description |
|---|---|---|
| Readability | 1-5 | Does the code read like prose? |
| Robustness | 1-5 | Does it handle all edge cases? |
| Testability | 1-5 | Are tests complete and relevant? |
| Maintainability | 1-5 | Could another dev modify it easily? |
| Performance | 1-5 | Is the code efficient? |
Minimum acceptable score: 3/5 on each criterion
// ❌ RED FLAG: unwrap without context
let value = some_option.unwrap();
// ❌ RED FLAG: potential hidden panic
let index = vec[user_input];
// ❌ RED FLAG: f64 for money
let total: f64 = price * quantity;
// ❌ RED FLAG: excessive clone
for item in collection.clone() { ... }
// ❌ RED FLAG: function too long (>50 lines)
fn do_everything() { /* 200 lines */ }
// ❌ RED FLAG: comment explaining obscure code
// This does X because Y (code should be self-explanatory)
| Anti-pattern | Symptom | Solution |
|---|---|---|
| God class | File >500 lines | Decompose into modules |
| Spaghetti | Circular dependencies | Invert dependencies |
| Anemic domain | Entities without behavior | Enrich domain model |
| Leaky abstraction | Implementation details exposed | Encapsulate correctly |
Before considering work as complete:
.unwrap() in productionf64 for monetary calculationsAfter a review, document findings:
## Critical Review - [Feature/Module]
### Positive points
- ...
### Points to improve
- **P0 (blocking)**: ...
- **P1 (important)**: ...
- **P2 (desirable)**: ...
### Technical debt identified
- ...
### Score: X/5
For an in-depth analysis of the complete project, see:
.agent/CRITICAL_ANALYSIS_PROMPT.md