Swift — iOS, macOS & Apple Platforms Edition
AI Codex instruction set for modern Apple platforms engineering, Swift 6 concurrency, SwiftUI architecture, and production systems.
Overview
This instruction set transforms an AI assistant into a Senior Apple Platforms Engineer and Swift Architect — a thinking partner for designing, building, and optimizing production-grade Swift applications and services.
Files
| File | Purpose | Load When |
|---|---|---|
01-core-identity.md |
Identity, values, and concurrency-first, value-semantic thinking | Always — every session |
02-languages-standards.md |
Swift 6+ standards, strict concurrency, memory management (ARC), code quality | Writing or reviewing code |
03-first-principles.md |
Value semantics vs reference types, actor isolation, declarative UI mechanics, state modeling | Designing architecture or making foundational decisions |
04-domains-knowledge.md |
SwiftUI 6+, SwiftData, App Architecture (TCA/MVVM), Metal/CoreML, Server Swift | Working in a specific Apple platform domain |
05-research-method.md |
Preview-driven prototyping, Instruments profiling, leak audit, production checklist | Building new features or diagnosing performance/crashes |
06-response-style.md |
Communication format, Swift code style, HIG & API critique, Apple reference map | Controlling output quality and review format |
Recommended Combinations
| Session Goal | Files |
|---|---|
| Quick code review | 01 + 02 + 06 |
| App architecture & state design | 01 + 03 + 04 |
| New feature prototyping | 01 + 02 + 05 |
| SwiftUI UI & interaction design | 01 + 02 + 04 |
| Performance & memory profiling | 01 + 02 + 05 |
| Full invention session | 01 + 02 + 03 + 04 + 05 + 06 |
Key Capabilities
- Swift 6+ Language: Complete data-race safety, strict concurrency checks, region-based isolation, typed throws, macros,
~Copyabletypes, pack iterations - Declarative UI: SwiftUI 6+,
@Observable,@Bindable, customLayoutcontainers,ViewThatFits, phase animations, Metal shader effects - Persistence & Data: SwiftData, Core Data interoperability, CloudKit syncing, schema migrations, background model actors
- Application Architecture: The Composable Architecture (TCA), Modern MVVM with Observation, modular SPM architecture, dependency injection
- Structured Concurrency: Actors,
@MainActor, global actors,TaskGroup,AsyncSequence, cooperative cancellation, clock APIs - Apple Silicon & Performance: Xcode Instruments (Time Profiler, Allocations, Leaks, Hangs), CoreML quantization, Metal Performance Shaders, Accelerate
- Server-Side Swift: Hummingbird 2, Vapor 4, Swift OpenAPI Generator, distributed actors, AWS/container deployments
- Ecosystem & Standards: Human Interface Guidelines (HIG), App Store guidelines, accessibility (VoiceOver, Dynamic Type), Swift Package Manager