ultrathink: Perform a thorough code review by first reading all relevant code and guidelines, then providing specific, actionable feedback.
Your Task
Review: $ARGUMENTS
Context
- Current directory: !
pwd
- Git status: !
git status --short 2>/dev/null | head -20
Guidelines to Apply
Read and apply these standards from the guidelines directory ($GUIDELINES_DIR):
$GUIDELINES_DIR/foundation/code-philosophy.md
$GUIDELINES_DIR/practices/clean-code-practices.md
$GUIDELINES_DIR/practices/design-principles.md
$GUIDELINES_DIR/practices/testing.md
$GUIDELINES_DIR/practices/error-handling.md
Instructions
Phase 1: Load Guidelines
First, read ALL the guideline files above. Understand:
- Code philosophy: predictable, boring, declarative, immutable
- Clean code: small functions, descriptive naming, early returns, no magic numbers
- Design: KISS, single responsibility, dependency injection, composition
- Testing: classical school, behavior-focused, AAA pattern, stubs over mocks
- Errors: fail fast, don't hide failures, validate at boundaries
Phase 2: Read the Code
Thoroughly read the code to review:
- Read all relevant files in the target area
- Understand the context - what does this code do?
- Trace dependencies - what does it interact with?
- Check tests - are behaviors well-tested?
Phase 3: Evaluate Against Guidelines
For each issue found:
- Identify the specific guideline being violated
- Quote the relevant code with file:line reference
- Explain why it matters - what's the risk or cost?
- Suggest a fix - be specific and actionable
Phase 4: Provide Summary
Organize your review:
- Critical issues - must fix, violates core principles
- Improvements - should fix, better aligns with guidelines
- Nitpicks - optional, minor style preferences
- Praise - what's done well (briefly)
Output Format
For each issue:
### [Critical/Improvement/Nitpick]: Brief title
**Location**: `path/to/file.swift:42`
**Guideline**: [Quote relevant guideline]
**Issue**: [What's wrong]
**Suggestion**: [How to fix]
Critical Rules
- DO NOT make changes - this is review only
- Cite specific guidelines - not just "this is bad"
- Be actionable - every issue should have a clear fix
- Include file:line - make issues easy to find
1---2name: review3description: Review code against coding guidelines and best practices4---56ultrathink: Perform a thorough code review by first reading all relevant code and guidelines, then providing specific, actionable feedback.78## Your Task910Review: $ARGUMENTS1112## Context1314- Current directory: !`pwd`15- Git status: !`git status --short 2>/dev/null | head -20`1617## Guidelines to Apply1819Read and apply these standards from the guidelines directory (`$GUIDELINES_DIR`):20- `$GUIDELINES_DIR/foundation/code-philosophy.md`21- `$GUIDELINES_DIR/practices/clean-code-practices.md`22- `$GUIDELINES_DIR/practices/design-principles.md`23- `$GUIDELINES_DIR/practices/testing.md`24- `$GUIDELINES_DIR/practices/error-handling.md`2526## Instructions2728### Phase 1: Load Guidelines2930First, read ALL the guideline files above. Understand:31- Code philosophy: predictable, boring, declarative, immutable32- Clean code: small functions, descriptive naming, early returns, no magic numbers33- Design: KISS, single responsibility, dependency injection, composition34- Testing: classical school, behavior-focused, AAA pattern, stubs over mocks35- Errors: fail fast, don't hide failures, validate at boundaries3637### Phase 2: Read the Code3839Thoroughly read the code to review:401. **Read all relevant files** in the target area412. **Understand the context** - what does this code do?423. **Trace dependencies** - what does it interact with?434. **Check tests** - are behaviors well-tested?4445### Phase 3: Evaluate Against Guidelines4647For each issue found:481. **Identify the specific guideline** being violated492. **Quote the relevant code** with file:line reference503. **Explain why it matters** - what's the risk or cost?514. **Suggest a fix** - be specific and actionable5253### Phase 4: Provide Summary5455Organize your review:561. **Critical issues** - must fix, violates core principles572. **Improvements** - should fix, better aligns with guidelines583. **Nitpicks** - optional, minor style preferences594. **Praise** - what's done well (briefly)6061## Output Format6263For each issue:64```65### [Critical/Improvement/Nitpick]: Brief title6667**Location**: `path/to/file.swift:42`68**Guideline**: [Quote relevant guideline]69**Issue**: [What's wrong]70**Suggestion**: [How to fix]71```7273## Critical Rules7475- **DO NOT make changes** - this is review only76- **Cite specific guidelines** - not just "this is bad"77- **Be actionable** - every issue should have a clear fix78- **Include file:line** - make issues easy to find