Swift ui architect

From pproenca/dot-skills · View interactive version

Swift ui architect is an AI agent skill from the GitHub repository pproenca/dot-skills. Opinionated SwiftUI architecture enforcement for iOS 26 / Swift 6.2 clinic modular MVVM-C apps using local SPM package boundaries. Enforces App-target `DependencyContainer` + route shells, @Observable ViewModels/coordinators, Domain repository/coordinator/error-routing protocols, Data-owned I/O, sta

How to use this skill

Skill file

SwiftUI Modular MVVM-C Architecture

Opinionated architecture enforcement for SwiftUI clinic-style apps. This skill aligns to the iOS 26 / Swift 6.2 clinic architecture: modular MVVM-C in local SPM packages, concrete coordinators and route shells in the App target, pure Domain protocols, and Data as the only I/O layer.

Mandated Architecture Stack

┌───────────────────────────────────────────────────────────────┐
│ App target: DependencyContainer, Coordinators, Route Shells   │
├───────────────┬───────────────┬───────────────┬──────────────┤
│ Feature* SPM  │ Feature* SPM  │ Feature* SPM  │ Feature* SPM │
│ View + VM     │ View + VM     │ View + VM     │ View + VM    │
├───────────────────────────────────────────────────────────────┤
│ Data SPM: repository impls, remote/local, retry, sync queue   │
├───────────────────────────────────────────────────────────────┤
│ Domain SPM: models, repository protocols, coordinator protocols│
│ and ErrorRouting/AppError                                      │
├───────────────────────────────────────────────────────────────┤
│ Shared SPMs: DesignSystem, SharedKit                           │
└───────────────────────────────────────────────────────────────┘

Dependency Rule: Feature modules import Domain + DesignSystem only. Features never import Data or other features. App target is the only convergence point.

Clinic Architecture Contract (iOS 26 / Swift 6.2)

All guidance in this skill assumes the clinic modular MVVM-C architecture:

When to Apply

Reference these guidelines when:

Non-Negotiable Constraints (iOS 26 / Swift 6.2)

Rule Categories by Priority

| Priority | Category | Impact | Prefix | Rules |

|----------|----------|--------|--------|-------|

| 1 | View Identity & Diffing | CRITICAL | diff- | 6 |

| 2 | State Architecture | CRITICAL | state- | 7 |

| 3 | View Composition | HIGH | view- | 6 |

| 4 | Navigation & Coordination | HIGH | nav- | 5 |

| 5 | Layer Architecture | HIGH | layer- | 6 |

| 6 | Dependency Injection | MEDIUM-HIGH | di- | 4 |

| 7 | List & Collection Performance | MEDIUM | list- | 4 |

| 8 | Async & Data Flow | MEDIUM | data- | 5 |

Quick Reference

1. View Identity & Diffing (CRITICAL)

2. State Architecture (CRITICAL)

3. View Composition (HIGH)

4. Navigation & Coordination (HIGH)

5. Layer Architecture (HIGH)

6. Dependency Injection (MEDIUM-HIGH)

7. List & Collection Performance (MEDIUM)

8. Async & Data Flow (MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

| File | Description |

|------|-------------|

| references/_sections.md | Category definitions and ordering |

| assets/templates/_template.md | Template for new rules |

| metadata.json | Version and reference information |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.