app-development-workflow
Project Context
- Recent commits: !
git log --oneline -5 2>/dev/null || echo "no git history" - Project files: !
ls *.xcodeproj 2>/dev/null || ls Package.swift 2>/dev/null || echo "no project file found"
App Development Workflow
End-to-end lifecycle for building Apple apps with this toolkit. Each phase tells you what to do, which skills to load, and where to go next.
Lifecycle Overview
Phase 0: Scaffold → Phase 1: Architecture → Phase 2: Design → Phase 3: Implement → Phase 4: Build → Phase 5: Review → Phase 6: Test
Phase 0 — Scaffold
When: Starting a new app or major feature from scratch.
Load: apple-app-architect:macos-development (read app-planner/ module)
Steps:
- Define the app's purpose, target users, and core features
- Use
/brainstormto explore approaches and constraints - Use
/write-planto create a detailed implementation plan - Identify app archetype (document-based, library+editor, utility, menu-bar, pro tool)
- Scaffold the project: Use
/scaffold-projectcommand (preferred)- Loads
apple-app-architect:swift-project-scaffoldskill automatically - Detects XcodeGen (primary) or falls back to XcodeBuildMCP scaffold tools
- Creates
project.yml, app entry point, ContentView, .gitignore - Configures Swift 6.2, strict concurrency, correct deployment target
- Fallback: use
scaffold_macos_project/scaffold_ios_projectMCP tools directly, orapple-app-builder:xcodebuildmcp-cliskill
- Loads
Next phase → Load apple-app-architect:macos-development architecture-patterns module for Phase 1.
Phase 1 — Architecture
When: Designing system structure, navigation, state management, data model.
Load: apple-app-architect:macos-development (read architecture-patterns/ module)
Agent: macos-architect — consult for architecture decisions
Steps:
- Choose navigation pattern (
NavigationSplitView,TabView, etc.) - Design state management (
@Observable, SwiftData, actor isolation) - Plan module boundaries (Swift Package Manager local packages)
- Define data model and persistence strategy (
apple-app-architect:swift-actor-persistencefor lightweight JSON, SwiftData for relational/CloudKit) - Map command structure (menus, keyboard shortcuts)
Next phase → Load apple-design-system:macos-app-design for UI design in Phase 2.
Phase 2 — Design
When: Designing the UI layer — HIG compliance, Liquid Glass, layout decisions.
Load: apple-design-system:macos-app-design, apple-design-system:apple-liquid-glass-design
Steps:
- Review Mac Citizen Checklist from
apple-design-system:macos-app-design - Identify which surfaces get Liquid Glass treatment
- Plan information architecture (sidebar structure, toolbar groups)
- Define accessibility plan (VoiceOver, keyboard nav, Reduce Motion)
- Produce deliverables: app archetype, IA, command map, state model, a11y plan
Next phase → Load apple-design-system:swiftui-components + apple-design-system:swiftui-ui-patterns for Phase 3. For autonomous UI loop, load apple-app-builder:autonomous-ui-workflow.
Phase 3 — Implement
When: Writing SwiftUI views and business logic.
Load: apple-design-system:swiftui-components, apple-design-system:swiftui-ui-patterns, apple-app-architect:swift-actor-persistence (if feature needs local storage)
Agent: ui-developer — autonomous implementation with build verification
API References: Load as needed from the research table:
| Need | Skill |
|---|---|
| Glass effects, floating controls | apple-design-system:apple-liquid-glass-design |
| Icons, SF Symbols | apple-design-system:swiftui-iconography-api |
| Background materials, shapes | apple-design-system:swiftui-material-api |
| Text fields, pickers, forms | apple-design-system:swiftui-input-api |
| Font choices, text styling | apple-design-system:swiftui-typography-api |
| Colors, gradients, tint | apple-design-system:swiftui-colors-api |
| Blur, shadow, opacity | apple-design-system:swiftui-effects-api |
| Sheets, popovers, alerts | apple-design-system:swiftui-presentation-api |
| Local storage, caching | apple-app-architect:swift-actor-persistence |
Steps:
- Read existing similar views for pattern consistency
- Apply templates from
apple-design-system:swiftui-components/templates/ - Follow
apple-design-system:swiftui-ui-patternscore guidelines for state, APIs, composition - Use
#Previewblocks for every view - Run
/implement-componentfor scaffolding
Next phase → Build and verify in Phase 4.
Phase 4 — Build
When: Compiling, verifying builds, iterating on errors.
Load: apple-app-builder:xcodebuildmcp or apple-app-builder:xcodebuildmcp-cli
Also: apple-app-builder:autonomous-ui-workflow covers phases 5-8 (Build → Preview → Validate → Iterate)
Xcode MCP (Primary Interface):
When XcodeBuildMCP MCP server is available, it is the primary interface for ALL file operations, builds, and tests. Load the apple-app-builder:xcodebuildmcp skill for:
- File ops:
XcodeRead/XcodeUpdate/XcodeWrite(notRead/Edit/Write) - Build: BuildFix Loop (max 5 iterations with Issue Navigator diagnostics)
- Test: TestFix Loop (with crash detection and CLI fallback)
- Preview:
RenderPreviewfor visual verification
Steps:
- Build via XcodeBuildMCP tools or CLI (
/build) - Fix build errors (
/fix-build) — read full error, fix, rebuild - Preview with
RenderPreviewto verify visual correctness - Validate against project rules (see
apple-app-builder:autonomous-ui-workflowPhase 7) - Iterate until build is green and preview matches intent
Next phase → When build is green, proceed to Phase 5. Load apple-app-quality:swiftui-view-refactor.
Phase 5 — Review (iterative)
When: Build is green, code needs quality review and refactoring.
Exit criterion: No CRITICAL or MAJOR findings remain. Grade A- or better (0 FAIL sections in code-analyzer output, 0 CRITICAL findings from swift-reviewer).
Load: apple-app-quality:code-analyzer, apple-design-system:swiftui-ui-patterns (review checklist), apple-app-quality:swiftui-view-refactor, apple-app-builder:swift-concurrency (review checklist)
Optional deep-dive: apple-app-quality:audit-context-building for security audit or architectural review
Agents: swift-reviewer, code-reviewer (dispatched via /review command)
Steps:
- Run review swarm:
/reviewdispatchesswift-reviewer+code-reviewerin parallel - Triage findings: Classify each as CRITICAL (fix now), MAJOR (fix now), MINOR (fix later), SUGGESTION (backlog)
- Fix CRITICAL and MAJOR findings — apply fixes one category at a time (security → concurrency → API → accessibility)
- Rebuild:
/buildto verify fixes compile - Re-run review swarm — repeat steps 1-4 until exit criterion met
- Apply optional polish:
/refactor-viewfor view structure,/swift-stylefor conventions - Grade check: 0 FAIL + 0 CRITICAL = A- (proceed). Otherwise loop back to step 2.
Grading scale:
| Grade | Criteria | Action |
|---|---|---|
| A- or better | 0 FAIL, 0 CRITICAL | Proceed to Phase 6 |
| B | 0 FAIL, 1-2 CRITICAL | Fix CRITICALs, re-review |
| C or below | 1+ FAIL | Fix all FAILs and CRITICALs, re-review |
Next phase → When review grade is A- or better, proceed to Phase 6. Load apple-app-quality:ios-testing.
Phase 6 — Test
When: Code is reviewed, ready for test coverage.
Load: apple-app-quality:ios-testing
Steps:
- Write unit tests with XCTest or Swift Testing framework
- Test @Observable models with in-memory
ModelContainer - Follow Arrange/Act/Assert pattern
- Target 80%+ coverage for critical paths
- Run tests via
/testor XcodeBuildMCPtest_macos/test_sim
Choosing Your Entry Point
| Situation | Start At |
|---|---|
| Brand new app | Phase 0 (Scaffold) |
| New feature in existing app | Phase 1 or 2 |
| Building a specific view | Phase 3 (load apple-app-builder:autonomous-ui-workflow) |
| Build is broken | Phase 4 |
| Code review | Phase 5 |
| Adding tests | Phase 6 |
Related Skills
apple-app-builder:autonomous-ui-workflow— The inner UI development loop (Spec → Build → Validate). Lives within Phases 2-4.apple-app-architect:macos-development— Comprehensive macOS reference modules. Spans Phases 0-1.apple-design-system:macos-app-design— macOS HIG and design system. Phase 2.apple-design-system:apple-liquid-glass-design— Liquid Glass API reference. Phases 2-3.apple-app-architect:swift-actor-persistence— Actor-based JSON persistence with in-memory cache. Phase 3.