Context-aware routing to code review guidelines. Use when reviewing pull requests, providing code feedback, or discussing review standards.
Context-aware routing to code review guidelines. Helps you conduct thorough, actionable code reviews following project standards.
Loc constants?ONLY include sections if issues exist:
If clean:
ā
**Approved** - No issues found
CRITICAL: When approving, output ONLY the line above. NO additional explanation, NO listing what the PR does, NO praise. Just the approval line.
If issues found:
## Bugs/Issues
**ChatView.swift:45**
Potential race condition when...
---
ā ļø **Minor Issues** - Fix race condition
Scenario: PR removes a menu button but leaves the menu parameter
ā WRONG:
"The menu parameter is now unused and should be removed"
ā CORRECT:
Check if menu is used elsewhere:
- Long-press context menu?
- Dual UX pattern (button + long-press)?
- Multiple consumers?
Example:
// menu() is used in BOTH places
.toolbar { Menu { menu() } } // Visible button (removed)
.contextMenu { menu() } // Long-press (still there!)
Before suggesting removal:
Scenario: Component has allowMenuContent and allowContextMenuItems
ā WRONG:
"These flags serve the same purpose, consolidate them"
ā CORRECT:
They control DIFFERENT UI elements:
- allowMenuContent: Visible button
- allowContextMenuItems: Long-press menu
- Can be independently enabled/disabled
Scenario: A PR includes changes to a generated file (e.g., Generated/FeatureFlags.swift).
ā WRONG:
"Edited generated file instead of running code generation"
(Assuming any change to a generated file is a violation)
ā CORRECT: Check if the corresponding SOURCE file is also in the PR diff:
| Generated File | Source File |
|---|---|
Generated/FeatureFlags.swift |
FeatureDescription+Flags.swift |
Generated/Strings.swift |
.xcstrings files |
Generated/ImageAssets.swift |
Assets.xcassets folders |
Modules/*/Generated/ |
Templates or annotated source files |
Proper Workflow Pattern:
PR contains:
āāā FeatureDescription+Flags.swift (source - CHANGED)
āāā Generated/FeatureFlags.swift (generated - ALSO CHANGED)
ā This is CORRECT! Developer edited source and ran `make generate`
Actual Violation Pattern:
PR contains:
āāā Generated/FeatureFlags.swift (generated - CHANGED)
(No corresponding source file changes)
ā This is WRONG! Developer manually edited generated file
Before flagging generated file edits:
Logic errors, potential bugs that need fixing
Format:
**FileName.swift:123**
Description of the bug and why it's a problem.
Violations of Swift/SwiftUI conventions or CLAUDE.md guidelines (code quality only, not design)
Format:
**FileName.swift:45**
Using hardcoded strings instead of Loc constants.
Actual performance problems (not theoretical)
Format:
**ViewModel.swift:89**
N+1 query in loop - will cause performance issues with large datasets.
Real security vulnerabilities
Format:
**AuthService.swift:34**
Storing credentials in UserDefaults - should use Keychain.
End with ONE sentence with status emoji:
ā
**Approved** - Clean implementation following guidelines
ā ļø **Minor Issues** - Fix hardcoded strings and race condition
šØ **Major Issues** - Critical security vulnerability in auth flow
Before finalizing your review:
Full Guide: .claude/CODE_REVIEW_GUIDE.md
For comprehensive coverage of:
CI/Automation: .github/workflows/pr-review-automation.md
For GitHub Actions integration:
gh CLIFrom CLAUDE.md:
Loc constants)// Generated using...)Code Quality:
ā
**Approved** - No issues found
That's it! Absolutely nothing else. Not even in comments posted to GitHub.
ā WRONG (too verbose):
ā
**Approved** - No issues found
The PR correctly implements per-chat notification overrides:
- Added force list properties with proper subscription keys
- effectiveNotificationMode(for:) method correctly prioritizes...
ā CORRECT:
ā
**Approved** - No issues found
## Best Practices
**ChatView.swift:34**
Using hardcoded string "Send Message" instead of localization constant.
Should be: `Text(Loc.sendMessage)`
**ChatViewModel.swift:89**
Tests not updated after renaming `sendMessage()` to `send()`.
Update `ChatViewModelTests.swift` to use new method name.
---
ā ļø **Minor Issues** - Fix hardcoded string and update tests
## Bugs/Issues
**AuthService.swift:45**
Storing password in UserDefaults (line 45). This is a security vulnerability.
Should use Keychain instead: `KeychainService.store(password, for: key)`
---
šØ **Major Issues** - Fix password storage security vulnerability
IOS_DEVELOPMENT_GUIDE.md - Swift/iOS patterns to check againstLOCALIZATION_GUIDE.md - Verify no hardcoded stringsCODE_GENERATION_GUIDE.md - Verify no generated file editsNavigation: This is a smart router. For detailed review standards and common mistakes, always refer to .claude/CODE_REVIEW_GUIDE.md.
For CI/automation: See .github/workflows/pr-review-automation.md for GitHub Actions integration.