Code Analyzer (Read-Only)
Instructions
Perform comprehensive code analysis without modifying any files.
Review Checklist
1. Code Organization and Structure
- Follows project directory conventions
- Proper separation of concerns
- Appropriate file naming
- Logical grouping of related code
2. Error Handling Patterns
- Uses typed errors (LocalizedError)
- Proper error propagation
- User-facing error messages are clear
- No silent failures
3. Performance Considerations
- No N+1 query patterns
- Appropriate use of lazy loading
- Memory-efficient data structures
- Proper use of MainActor isolation
4. Security Concerns
- No hardcoded secrets
- Proper data validation
- Secure storage for sensitive data (Keychain)
- Input sanitization
5. Test Coverage Gaps
- Critical paths have tests
- Edge cases considered
- Mock dependencies properly
6. Swift Best Practices
- Swift 6 concurrency compliance
- Proper use of optionals
- Value types over reference types where appropriate
- API design guidelines followed
Output Format
Provide detailed feedback organized by category with:
- Issue description
- Location (file:line)
- Severity (Critical/Warning/Suggestion)
- Recommended fix