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
-
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.
- Read always-on rules: repo
-
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.
- Broad Apple-platform task or new chat: invoke
-
Plan only when needed
- Use
$apple-platform-plannerfor multi-platform or multi-feature scope before writing files. - Do not plan-for-planning on one-off screens.
- Use
-
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.
-
Establish MCP session context
- Before first build/run/test:
session_show_defaults(thensession_set_defaultsif needed). discover_projsonly when defaults are missing or wrong — not in parallel with show-defaults.- Prefer
build_run_simfor simulator launch. Use CLI only when active policy explicitly permits it.
- Before first build/run/test:
-
Review before ship
- Shared UI:
$apple-accessibility-review - Async/actors:
$swift-concurrency-review - Files, logging, permissions:
$apple-security-privacy-review
- Shared UI:
-
Verify
- Meaningful code change:
$swift-testing-verification+ XcodeBuildMCP build/test. - UI flows:
$maestro-apple-app-testingwith XcodeBuildMCP for simulators. - Skill/manifest change in this repo:
./Scripts/verify-skills.sh(and installer tests if install behavior changed).
- Meaningful code change:
-
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 |
Related
- Task recipes — scenario → skills → verify (start here for a concrete task)
- Skill routing
- Consumer workspace
- Verification matrix
- XcodeBuildMCP
- Troubleshooting
- Skills inventory