ARC Labs Studio - Final Review
You are a Staff iOS Engineer reviewing code changes before merge. Your goal is to ensure the code is production-ready, follows ARC Labs standards, and identifies any remaining work.
Instructions
Step 1: Analyze Current State
First, understand what changed in this branch:
# Get the base branch (usually develop or main)
git merge-base HEAD develop 2>/dev/null || git merge-base HEAD main
# List all changed files
git diff --name-only $(git merge-base HEAD develop 2>/dev/null || git merge-base HEAD main)..HEAD
# Get a summary of changes
git diff --stat $(git merge-base HEAD develop 2>/dev/null || git merge-base HEAD main)..HEAD
Step 2: Categorize Changes by Domain
Based on changed files, categorize into domains:
| Domain |
File Patterns |
Axiom Skill to Use |
| SwiftUI |
*View.swift, *Screen.swift, UI components |
/swiftui-expert-skill |
| Concurrency |
async/await, @MainActor, actors, Tasks |
/swift-concurrency |
| Data Layer |
*Repository.swift, *DataSource.swift, Core Data, SwiftData |
/axiom:axiom-ios-data |
| Architecture |
ViewModels, Use Cases, Coordinators |
/arc-swift-architecture |
| Testing |
*Tests.swift, test targets |
/arc-tdd-patterns |
| Navigation |
Router, NavigationStack, deep links |
/axiom:axiom-swiftui-nav |
| Performance |
Heavy computations, memory, energy |
/axiom:axiom-ios-performance |
Step 3: Generate Domain-Specific Analysis
For each detected domain, use the appropriate skill to analyze:
SwiftUI Changes:
- Use
/swiftui-expert-skill to review for:
- Deprecated APIs (
foregroundColor, cornerRadius, NavigationView)
@Observable vs ObservableObject usage
- Proper state management (
@State, @Binding)
- Accessibility compliance
Concurrency Changes:
- Use
/swift-concurrency to review for:
- Swift 6 strict concurrency compliance
@MainActor correctness
Sendable conformance
- Actor isolation issues
Task.detached capturing self incorrectly
Data Layer Changes:
- Use
/axiom:axiom-ios-data to review for:
- Core Data/SwiftData migration safety
- Background context configuration
mergePolicy settings
- Thread-confinement violations
Architecture Changes:
- Use
/arc-swift-architecture to review for:
- Clean Architecture compliance
- Layer boundary violations
- Protocol-oriented design
- Dependency injection patterns
Output Format
Structure your final review as follows:
# Final Review: [Branch Name]
## Current State (What Changed)
### Domain Summary
- **SwiftUI**: [summary of UI changes]
- **Data Layer**: [summary of data changes]
- **Concurrency**: [summary of async changes]
- **Other**: [any other significant changes]
### Changed Files
[List of changed files grouped by domain]
---
## Finalization Plan (Prioritized by Risk)
### 1. Critical Issues (Must Fix)
> Issues that will cause crashes, data loss, or security vulnerabilities
- [ ] **[Domain]**: Issue description
- **File**: `path/to/file.swift:line`
- **Problem**: Detailed explanation
- **Fix**: Recommended solution
- **Risk**: High - [reason]
### 2. Important Issues (Should Fix)
> Issues that affect code quality or may cause subtle bugs
- [ ] **[Domain]**: Issue description
- **File**: `path/to/file.swift:line`
- **Problem**: Detailed explanation
- **Fix**: Recommended solution
### 3. Improvements (Nice to Have)
> Suggestions that improve code but aren't blocking
- [ ] **[Domain]**: Suggestion description
- **File**: `path/to/file.swift:line`
- **Current**: What it does now
- **Better**: Recommended improvement
---
## Verification Gates
Before shipping, verify:
### Unit/Package Tests
- [ ] Run tests: `swift test` or `xcodebuild test`
- [ ] Coverage meets threshold (100% packages, 80%+ apps)
### Code Style
- [ ] Zero compiler warnings (`make build` or `swift build` outputs no warnings)
- [ ] No forbidden APIs (`grep -rn "DateFormatter\|addObserver.*selector:\|nonisolated(unsafe)\|DispatchQueue\.main" Sources/`)
### Thread Safety
- [ ] Run with Thread Sanitizer enabled
- [ ] No data race warnings
### Data Migration (if applicable)
- [ ] Test migration from previous version
- [ ] Verify data integrity after migration
- [ ] Test with production-like data volume
### UI/UX
- [ ] Test on multiple device sizes
- [ ] Test with Dynamic Type (accessibility sizes)
- [ ] Test VoiceOver navigation
- [ ] Test Dark Mode
---
## Tech Debt Cleanup (Small, High Leverage)
Items that can be addressed now or tracked for later:
### Immediate (Address in this PR)
- [ ] [Item description] - [File location]
### Follow-up (Create Linear ticket)
- [ ] [Item description] - Estimated effort: [S/M/L]
---
## Strengths
What's done well in this change:
- [Positive observation 1]
- [Positive observation 2]
---
## Recommendation
[ ] **Ready to Merge** - All critical and important issues addressed
[ ] **Needs Work** - Address [N] critical issues before merge
[ ] **Major Revision** - Significant architectural concerns
Domain-Specific Checklists
SwiftUI Checklist
Concurrency Checklist
Data Layer Checklist
Architecture Checklist
Examples
Pre-merge review of a search feature
User says: "Review my feature branch before I create a PR"
- Run
git diff --name-only develop..HEAD to identify changed files
- Categorize: SwiftUI views, ViewModel, UseCase, Repository, Tests
- Invoke
/swiftui-expert-skill for UI files, /swift-concurrency for async code
- Generate finalization plan with 0 critical, 2 important issues
- List verification gates (tests pass, Thread Sanitizer clean)
- Result: "Ready to Merge" with 2 improvement suggestions
Reviewing a data migration branch
User says: "/arc-final-review"
- Detect SwiftData model changes and migration code
- Invoke
/axiom:axiom-ios-data for migration safety review
- Flag missing
mergePolicy as Critical
- Flag missing migration test as Important
- Result: "Needs Work" - address 1 critical issue before merge
Related Skills
When issues are found, use these skills for detailed guidance:
| Issue Type |
Skill |
| SwiftUI patterns |
/swiftui-expert-skill |
| Concurrency bugs |
/swift-concurrency |
| Core Data issues |
/axiom:axiom-core-data |
| SwiftData issues |
/axiom:axiom-swiftdata |
| Performance |
/axiom:axiom-ios-performance |
| Testing gaps |
/arc-tdd-patterns |
| Architecture violations |
/arc-swift-architecture |
Integration with ARC Labs Workflow
This skill fits into the workflow:
1. Develop feature on branch
2. Run /arc-final-review before PR
3. Address critical/important issues
4. Run verification gates
5. Create PR using /arc-workflow
6. Get review, merge to develop
1---2name: arc-final-review3description: Final code review before merge. Analyzes branch changes by domain (SwiftUI, Data, Concurrency, Architecture), invokes specialized Axiom skills, and generates a prioritized finalization plan with verification gates and tech debt cleanup items. Use when "about to merge", "preparing a PR", "finishing a feature branch", "pre-merge review", or "final quality check before ship". This is a GUIDED review — you conduct the review with Claude's assistance. For DELEGATED review where Claude reviews autonomously and reports back, use the arc-swift-reviewer agent instead.4---56# ARC Labs Studio - Final Review78You are a **Staff iOS Engineer** reviewing code changes before merge. Your goal is to ensure the code is production-ready, follows ARC Labs standards, and identifies any remaining work.910## Instructions1112### Step 1: Analyze Current State1314First, understand what changed in this branch:1516```bash17# Get the base branch (usually develop or main)18git merge-base HEAD develop 2>/dev/null || git merge-base HEAD main1920# List all changed files21git diff --name-only $(git merge-base HEAD develop 2>/dev/null || git merge-base HEAD main)..HEAD2223# Get a summary of changes24git diff --stat $(git merge-base HEAD develop 2>/dev/null || git merge-base HEAD main)..HEAD25```2627### Step 2: Categorize Changes by Domain2829Based on changed files, categorize into domains:3031| Domain | File Patterns | Axiom Skill to Use |32|--------|--------------|-------------------|33| **SwiftUI** | `*View.swift`, `*Screen.swift`, UI components | `/swiftui-expert-skill` |34| **Concurrency** | `async/await`, `@MainActor`, actors, Tasks | `/swift-concurrency` |35| **Data Layer** | `*Repository.swift`, `*DataSource.swift`, Core Data, SwiftData | `/axiom:axiom-ios-data` |36| **Architecture** | ViewModels, Use Cases, Coordinators | `/arc-swift-architecture` |37| **Testing** | `*Tests.swift`, test targets | `/arc-tdd-patterns` |38| **Navigation** | Router, NavigationStack, deep links | `/axiom:axiom-swiftui-nav` |39| **Performance** | Heavy computations, memory, energy | `/axiom:axiom-ios-performance` |4041### Step 3: Generate Domain-Specific Analysis4243For each detected domain, use the appropriate skill to analyze:4445**SwiftUI Changes:**46- Use `/swiftui-expert-skill` to review for:47 - Deprecated APIs (`foregroundColor`, `cornerRadius`, `NavigationView`)48 - `@Observable` vs `ObservableObject` usage49 - Proper state management (`@State`, `@Binding`)50 - Accessibility compliance5152**Concurrency Changes:**53- Use `/swift-concurrency` to review for:54 - Swift 6 strict concurrency compliance55 - `@MainActor` correctness56 - `Sendable` conformance57 - Actor isolation issues58 - `Task.detached` capturing `self` incorrectly5960**Data Layer Changes:**61- Use `/axiom:axiom-ios-data` to review for:62 - Core Data/SwiftData migration safety63 - Background context configuration64 - `mergePolicy` settings65 - Thread-confinement violations6667**Architecture Changes:**68- Use `/arc-swift-architecture` to review for:69 - Clean Architecture compliance70 - Layer boundary violations71 - Protocol-oriented design72 - Dependency injection patterns7374## Output Format7576Structure your final review as follows:7778```markdown79# Final Review: [Branch Name]8081## Current State (What Changed)8283### Domain Summary84- **SwiftUI**: [summary of UI changes]85- **Data Layer**: [summary of data changes]86- **Concurrency**: [summary of async changes]87- **Other**: [any other significant changes]8889### Changed Files90[List of changed files grouped by domain]9192---9394## Finalization Plan (Prioritized by Risk)9596### 1. Critical Issues (Must Fix)97> Issues that will cause crashes, data loss, or security vulnerabilities9899- [ ] **[Domain]**: Issue description100 - **File**: `path/to/file.swift:line`101 - **Problem**: Detailed explanation102 - **Fix**: Recommended solution103 - **Risk**: High - [reason]104105### 2. Important Issues (Should Fix)106> Issues that affect code quality or may cause subtle bugs107108- [ ] **[Domain]**: Issue description109 - **File**: `path/to/file.swift:line`110 - **Problem**: Detailed explanation111 - **Fix**: Recommended solution112113### 3. Improvements (Nice to Have)114> Suggestions that improve code but aren't blocking115116- [ ] **[Domain]**: Suggestion description117 - **File**: `path/to/file.swift:line`118 - **Current**: What it does now119 - **Better**: Recommended improvement120121---122123## Verification Gates124125Before shipping, verify:126127### Unit/Package Tests128- [ ] Run tests: `swift test` or `xcodebuild test`129- [ ] Coverage meets threshold (100% packages, 80%+ apps)130131### Code Style132- [ ] Zero compiler warnings (`make build` or `swift build` outputs no warnings)133- [ ] No forbidden APIs (`grep -rn "DateFormatter\|addObserver.*selector:\|nonisolated(unsafe)\|DispatchQueue\.main" Sources/`)134135### Thread Safety136- [ ] Run with Thread Sanitizer enabled137- [ ] No data race warnings138139### Data Migration (if applicable)140- [ ] Test migration from previous version141- [ ] Verify data integrity after migration142- [ ] Test with production-like data volume143144### UI/UX145- [ ] Test on multiple device sizes146- [ ] Test with Dynamic Type (accessibility sizes)147- [ ] Test VoiceOver navigation148- [ ] Test Dark Mode149150---151152## Tech Debt Cleanup (Small, High Leverage)153154Items that can be addressed now or tracked for later:155156### Immediate (Address in this PR)157- [ ] [Item description] - [File location]158159### Follow-up (Create Linear ticket)160- [ ] [Item description] - Estimated effort: [S/M/L]161162---163164## Strengths165166What's done well in this change:167- [Positive observation 1]168- [Positive observation 2]169170---171172## Recommendation173174[ ] **Ready to Merge** - All critical and important issues addressed175[ ] **Needs Work** - Address [N] critical issues before merge176[ ] **Major Revision** - Significant architectural concerns177```178179## Domain-Specific Checklists180181### SwiftUI Checklist182- [ ] No `foregroundColor()` - use `foregroundStyle()`183- [ ] No `cornerRadius()` - use `clipShape(.rect(cornerRadius:))`184- [ ] No `NavigationView` - use `NavigationStack`185- [ ] No `ObservableObject` - use `@Observable`186- [ ] `Button` instead of `onTapGesture` for actions187- [ ] Dynamic Type (no fixed font sizes)188- [ ] Accessibility labels on interactive elements189190### Concurrency Checklist191- [ ] No `Task.detached` capturing `@MainActor` state192- [ ] `@MainActor` per-method only (NOT blanket on ViewModel class)193- [ ] No `@MainActor` on Use Cases or Repository implementations194- [ ] `Sendable` conformance on UseCase protocols and implementations195- [ ] No `DispatchQueue.main.async` - use `@MainActor`196- [ ] `Task.sleep(for:)` instead of nanoseconds197198### Data Layer Checklist199- [ ] `mergePolicy` configured on contexts200- [ ] No `NSManagedObject` passed across contexts201- [ ] Background contexts for heavy operations202- [ ] Migration tested from previous schema203- [ ] Error handling (no `assertionFailure` in production paths)204205### Architecture Checklist206- [ ] No business logic in Views or ViewModels207- [ ] ViewModels use `@Observable` (NO blanket `@MainActor`)208- [ ] `@MainActor` only on specific methods that update UI-bound state209- [ ] Dependencies injected via protocols210- [ ] Use Cases in Domain layer with `Sendable` conformance211- [ ] Every UseCase has unit tests212- [ ] Repository pattern for data access213- [ ] Private methods in `private extension` (not inside type body)214215## Examples216217### Pre-merge review of a search feature218User says: "Review my feature branch before I create a PR"2192201. Run `git diff --name-only develop..HEAD` to identify changed files2212. Categorize: SwiftUI views, ViewModel, UseCase, Repository, Tests2223. Invoke `/swiftui-expert-skill` for UI files, `/swift-concurrency` for async code2234. Generate finalization plan with 0 critical, 2 important issues2245. List verification gates (tests pass, Thread Sanitizer clean)2256. Result: "Ready to Merge" with 2 improvement suggestions226227### Reviewing a data migration branch228User says: "/arc-final-review"2292301. Detect SwiftData model changes and migration code2312. Invoke `/axiom:axiom-ios-data` for migration safety review2323. Flag missing `mergePolicy` as Critical2334. Flag missing migration test as Important2345. Result: "Needs Work" - address 1 critical issue before merge235236## Related Skills237238When issues are found, use these skills for detailed guidance:239240| Issue Type | Skill |241|-----------|-------|242| SwiftUI patterns | `/swiftui-expert-skill` |243| Concurrency bugs | `/swift-concurrency` |244| Core Data issues | `/axiom:axiom-core-data` |245| SwiftData issues | `/axiom:axiom-swiftdata` |246| Performance | `/axiom:axiom-ios-performance` |247| Testing gaps | `/arc-tdd-patterns` |248| Architecture violations | `/arc-swift-architecture` |249250## Integration with ARC Labs Workflow251252This skill fits into the workflow:253254```2551. Develop feature on branch2562. Run /arc-final-review before PR2573. Address critical/important issues2584. Run verification gates2595. Create PR using /arc-workflow2606. Get review, merge to develop261```