mcpField
S
spatial-app-architecture

spatial-app-architecture

github.com/tomkrikorianDevelopment6696 installsUpdated 19w ago
Repository

About spatial-app-architecture

A skill for planning visionOS spatial app architecture, aimed at developers deciding surfaces, state ownership, and SwiftUI file or module structure. It connects architectural choices to implementation handoffs and behavior-preserving refactors.

Key features

  1. 01Surface model selection
  2. 02State ownership mapping
  3. 03File and module planning
  4. 04Refactor sequencing
  5. 05Implementation skill handoff

Use cases

  1. 01Choosing between windows, volumes, and immersive spaces
  2. 02Assigning state across app, scene, and views
  3. 03Planning a SwiftUI module structure
  4. 04Refactoring while preserving behavior

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tomkrikorian/visionosagents --skill spatial-app-architecture

After installing, type/spatial-app-architecturein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
anti-patterns.md
file-layouts.md
refactor-playbook.md
state-ownership.md
surface-selection.md

Details

From the project README

Spatial App Architecture

Quick Start

Use this skill for architecture questions, not API questions.

Use it when:

  • you need to choose the right surface: window, volume, immersive space, or a mixed flow
  • you are deciding which state is app-wide, scene-scoped, immersive-scoped, or view-local
  • a root file owns too many concerns and needs a refactor plan
  • you need a file or module plan before writing or splitting SwiftUI code

Load References When

ReferenceWhen to Use
references/surface-selection.mdWhen choosing window vs volume vs immersive space and their lifecycle boundaries.
references/state-ownership.mdWhen deciding what belongs to the app, scene, feature coordinator, RealityKit owner, or view.
references/file-layouts.mdWhen proposing a layered or feature-sliced file and module shape.
references/refactor-playbook.mdWhen the app already exists and the main task is refactoring without breaking behavior.
references/anti-patterns.mdWhen you need to call out structural smells or explain why an approach is wrong.

Workflow

  1. Classify the feature by user job and current or intended surface.
  2. Choose the owning surface model: window, volume, immersive space, or a combination.
  3. Assign state ownership boundaries: app, scene, immersive, feature, view.
  4. Choose a file/module shape that matches the ownership model.
  5. Define the implementation handoff: SwiftUI, RealityKit, ARKit, SharePlay, or build/debug.
  6. If this is a refactor, sequence the extraction so behavior stays stable.
  7. Verify the structure with build-run-debug after the first usable slice.

When To Switch Skills

  • Switch to spatial-swiftui-developer when the surface and ownership model are already chosen and the next step is implementing SwiftUI APIs.
  • Switch to realitykit-visionos-developer when the work is mainly about entities, components, systems, or RealityKit runtime behavior.
  • Switch to arkit-visionos-developer when the architecture choice depends on provider constraints, anchors, or tracked-world behavior.
  • Switch to shareplay-developer when the app structure is driven by group activity or shared immersive presence.
  • Switch to build-run-debug after the first usable architectural slice exists and needs validation.

Guardrails

  • Do not choose immersion by novelty alone.
  • Do not let transient views own long-lived immersive lifecycle or RealityKit mutation.
  • Preserve strong repo conventions when they are already coherent.

Output Expectations

Provide:

  • the chosen surface model and why
  • the ownership map: app, scene, feature model/coordinator, reality owner, view
  • the proposed file/module shape
  • the refactor slices, if this is brownfield work
  • the next implementation handoff: spatial-swiftui-developer, realitykit-visionos-developer, arkit-visionos-developer, shareplay-developer, or build-run-debug

Comments

Markdown supported