Review the given spec document by analyzing both the spec AND the referenced codebase.
Process
- Read the spec - Understand goals, phases, and proposed changes
- Explore the codebase - Read files and code mentioned in the spec
- Analyze patterns - Identify existing patterns, conventions, and architecture
- Validate the plan - Ensure proposals align with codebase reality
- Identify issues - Find gaps, risks, and improvement opportunities
Review Dimensions
Evaluate across these areas (focus on what's relevant):
- Architecture: Component boundaries, data flow, API contracts, separation of concerns
- Feasibility: Implementation complexity, technology trade-offs, effort estimation
- Reliability: Error handling, retries, idempotency, graceful degradation
- Performance: Bottlenecks, caching, query patterns, scaling approach
- Security: Auth, data protection, input validation, audit logging
- Edge Cases: Null handling, limits, timeouts, race conditions, partial failures
- Testing: Testability, integration strategy, rollback considerations
Output Format
For each finding:
### [Finding Title]
**Category**: Architecture | Feasibility | Reliability | Performance | Security | Edge Case | Testing
**Severity**: Critical | High | Medium | Low
**Section**: [Spec section or phase]
**Issue**: [Clear problem description]
**Recommendation**: [Specific, actionable change]
**Rationale**: [Technical justification]
Guidelines
- Verify against code - Don't trust the spec blindly; check actual implementations
- Follow existing patterns - Recommendations should align with codebase conventions
- Be specific - Reference exact files, functions, and line numbers
- Prioritize - Order findings by severity and impact
- Challenge assumptions - Question decisions that lack justification
1---2name: review-spec-23description: Review a spec document against codebase reality, identifying gaps and ensuring sound, robust implementations.4---56Review the given spec document by analyzing both the spec AND the referenced codebase.78## Process9101. **Read the spec** - Understand goals, phases, and proposed changes112. **Explore the codebase** - Read files and code mentioned in the spec123. **Analyze patterns** - Identify existing patterns, conventions, and architecture134. **Validate the plan** - Ensure proposals align with codebase reality145. **Identify issues** - Find gaps, risks, and improvement opportunities1516## Review Dimensions1718Evaluate across these areas (focus on what's relevant):1920- **Architecture**: Component boundaries, data flow, API contracts, separation of concerns21- **Feasibility**: Implementation complexity, technology trade-offs, effort estimation22- **Reliability**: Error handling, retries, idempotency, graceful degradation23- **Performance**: Bottlenecks, caching, query patterns, scaling approach24- **Security**: Auth, data protection, input validation, audit logging25- **Edge Cases**: Null handling, limits, timeouts, race conditions, partial failures26- **Testing**: Testability, integration strategy, rollback considerations2728## Output Format2930For each finding:3132```33### [Finding Title]3435**Category**: Architecture | Feasibility | Reliability | Performance | Security | Edge Case | Testing36**Severity**: Critical | High | Medium | Low37**Section**: [Spec section or phase]3839**Issue**: [Clear problem description]40**Recommendation**: [Specific, actionable change]41**Rationale**: [Technical justification]42```4344## Guidelines4546- **Verify against code** - Don't trust the spec blindly; check actual implementations47- **Follow existing patterns** - Recommendations should align with codebase conventions48- **Be specific** - Reference exact files, functions, and line numbers49- **Prioritize** - Order findings by severity and impact50- **Challenge assumptions** - Question decisions that lack justification