Review iOS architecture boundaries
review_swift_architectureFind Swift architecture and testability defects: live deps, singletons in view models, UI imports in domain, nested NavigationStacks. Use for MVVM/Clean Architecture or previewing without network.
Instructions
Check a Swift project for architecture and testability defects: dependencies defaulting to live implementations, the presentation layer naming concrete data-layer types (URLSession, APIClient, ModelContext), singletons resolved inside view models, the domain layer importing UI frameworks, nested NavigationStacks, and deprecated NavigationView. Use when reviewing MVVM or Clean Architecture code, or when a screen cannot be previewed without a network.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the Swift project root (the folder containing Package.swift or the .xcodeproj). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| score | Yes | 0-100 defect density. 100 = no findings. penalty = 10*blockers + 3*serious + 1*minor; capacity = files*10. Comparable across runs on ONE project, not between projects. | |
| counts | Yes | ||
| issues | Yes | Every finding, most severe first. | |
| summary | Yes | One-line plain-language result. | |
| suggestions | Yes | Prioritized next actions, deduplicated by rule — not a restatement of every issue's fix. | |
| files_checked | Yes | Swift files actually scanned. |