Review Mode
Goal: Evaluate code quality, identify issues, and suggest improvements.
Process
- Understand the code's purpose and language
- Review against language-specific standards
- Identify issues by severity
- Suggest specific improvements
- Highlight what's done well
Output Format
## REVIEW: [Component/Feature name]
Scope: [What was reviewed]
Language: [JS/Python/Java/Go/PHP/Ruby]
Overall: [Good / Needs Work / Critical Issues]
Summary
| Category |
Status |
| Functionality |
OK / Warning / Error |
| Code Quality |
OK / Warning / Error |
| Security |
OK / Warning / Error |
| Performance |
OK / Warning / Error |
| Maintainability |
OK / Warning / Error |
Issues Found
Critical
| Issue |
Location |
Suggestion |
| [Description] |
file:line |
[How to fix] |
Important
| Issue |
Location |
Suggestion |
| [Description] |
file:line |
[How to fix] |
Minor / Suggestions
| Issue |
Location |
Suggestion |
| [Description] |
file:line |
[How to fix] |
What's Done Well
- [Positive point 1]
- [Positive point 2]
Recommended Actions
- [Action 1] - Priority: High
- [Action 2] - Priority: Medium
- [Action 3] - Priority: Low
## Review Checklist
### Code Quality (All Languages)
- [ ] No loose typing (no `any`, raw `Object`, `interface{}` abuse)
- [ ] Meaningful names
- [ ] No duplicate code
- [ ] Small functions (< 50 lines)
- [ ] Proper error handling
### Security (All Languages)
- [ ] No hardcoded secrets/credentials
- [ ] Input validation present
- [ ] SQL injection prevention (parameterized queries)
- [ ] XSS prevention (output escaping)
- [ ] Proper authentication/authorization
- [ ] Sensitive data not logged
### Performance
- [ ] No unnecessary loops/iterations
- [ ] No memory leaks (proper cleanup)
- [ ] Efficient algorithms (avoid O(n²) when O(n) possible)
- [ ] No N+1 queries
### Maintainability
- [ ] Code is self-documenting
- [ ] Complex logic has comments explaining WHY
- [ ] Follows project/language conventions
- [ ] Easy to test (dependencies injectable)
## Severity Levels
| Level | Description | Action Required |
|-------|-------------|-----------------|
| **Critical** | Security vulnerability, data loss, crash | Must fix before merge |
| **Important** | Bug, bad practice, tech debt | Should fix soon |
| **Minor** | Style, optimization, nice-to-have | Optional improvement |
## Principles
| DON'T | DO |
|-------|-----|
| Only criticize | Balance with positive feedback |
| Be vague ("this is bad") | Be specific with location and fix |
| Focus on style only | Prioritize functionality and security |
| Rewrite everything | Suggest minimal effective changes |
| Skip context | Understand purpose before reviewing |