Skip to content
Apple Development Foundation
Esc
navigateopen⌘Jpreview
On this page

Session workflow

End-to-end loop for agent sessions using foundation skills and XcodeBuildMCP.

A reliable agent session follows a fixed loop. Skip steps only when the task is clearly narrower than the loop.

Loop

  1. Orient

    • Read always-on rules: repo AGENTS.md (when working in this foundation repo) or the consumer app’s agent instructions (AGENTS.md template if missing).
    • Identify the active workspace (consumer app vs this skills reference).
    • See Consumer workspace.
  2. Route skills

    • Broad Apple-platform task or new chat: invoke $apple-development-foundation.
    • Known task: invoke the specific skill ($codex-bootstrap, $swift-concurrency-review, …).
    • Details: Skill routing.
  3. Plan only when needed

    • Use $apple-platform-planner for multi-platform or multi-feature scope before writing files.
    • Do not plan-for-planning on one-off screens.
  4. Implement in the consumer workspace

    • Prefer Swift 6, SwiftUI, native observation, structured concurrency, focused views.
    • Chain authoring skills (tabs → design system → components → platform adaptation) as the bootstrap skill describes.
  5. Establish MCP session context

    • Before first build/run/test: session_show_defaults (then session_set_defaults if needed).
    • discover_projs only when defaults are missing or wrong — not in parallel with show-defaults.
    • Prefer build_run_sim for simulator launch. Use CLI only when active policy explicitly permits it.
  6. Review before ship

    • Shared UI: $apple-accessibility-review
    • Async/actors: $swift-concurrency-review
    • Files, logging, permissions: $apple-security-privacy-review
  7. Verify

    • Meaningful code change: $swift-testing-verification + XcodeBuildMCP build/test.
    • UI flows: $maestro-apple-app-testing with XcodeBuildMCP for simulators.
    • Skill/manifest change in this repo: ./Scripts/verify-skills.sh (and installer tests if install behavior changed).
  8. Report

    • Active project/workspace, scheme, configuration, exact simulator/device, what ran, and residual risk; report blocked when no authorized verification path exists.
    • Which skills were applied and which to run next.

Do not

Anti-pattern Instead
Expand archive/Sources/ in this repo by default Work in the consumer app unless the user asked for package work
Infer fallback permission from a missing MCP tool Follow the capability ladder: explicitly permitted XcodeBuildMCP CLI, then authorized repository-native tooling, otherwise report blocked
Treat $apple-development-foundation as an automatic audit Audits and installer verification are explicit requests only
Copy business branding into skills Keep skills neutral and reusable
Skip a11y / security review on shared components Run the review skills before calling work done

Was this page helpful?