## Phase 166: Neith Spatial Computing & visionOS Runtime — Unity PolySpatial / Apple visionOS + RealityKit / Meta Quest Presence Platform / Google ARCore Scene Semantics / Snap Lens Studio Parity

Closes the spatial-computing sovereignty gap. Phase 73 ships an immersive VR
production studio. Phase 42 includes XR runtime. Phase 166 focuses specifically
on the **mixed-reality / spatial-computing application runtime** — the visionOS
/ PolySpatial / Quest Presence Platform class layer that blends virtual content
with the user's physical room, hands, gaze, and environment in a shared or
immersive space.

Sovereign replacement for Apple visionOS + RealityKit + ARKit + Scene
Understanding, Unity PolySpatial + PolySpatial XR + visionOS simulator, Meta
Quest Presence Platform (Scene API, Interaction SDK, Voice SDK), Google ARCore
Scene Semantics + Geospatial, Microsoft HoloLens / Mixed Reality Toolkit, Snap
Lens Studio (AR), Niantic Lightship ARDK, and Magic Leap 2 runtime layer.

---

### 166.1 @neith/spatial-core — Session, Scene & World Anchors

- [x] **166.1.1** Spatial session manager (cold-start / warm-resume)
- [x] **166.1.2** World-anchor persistence across sessions
- [x] **166.1.3** Cloud-anchor share (multi-user collocated)
- [x] **166.1.4** Scene-mesh reconstruction (room-scan)
- [x] **166.1.5** Semantic segmentation (floor / wall / ceiling / table / seat /
      door / window)
- [x] **166.1.6** Dynamic object detection (human / pet / furniture moved)
- [x] **166.1.7** Occlusion mesh with per-frame depth
- [x] **166.1.8** Lighting estimation (colour temperature + intensity +
      spherical harmonics)
- [x] **166.1.9** Plane detection (horizontal / vertical)
- [x] **166.1.10** Bounding-box anchor
- [x] **166.1.11** Image-target tracking
- [x] **166.1.12** Object-target tracking (2D + 3D)
- [x] **166.1.13** Geospatial anchor (Earth-scale)
- [x] **166.1.14** VPS (Visual Positioning System) sovereign pipeline
- [x] **166.1.15** Privacy-preserving world data (on-device only)

---

### 166.2 @neith/spatial-volumes — Volumes, Immersive Spaces & Shared Spaces

- [x] **166.2.1** Bounded volume (fixed-size slot in shared space)
- [x] **166.2.2** Unbounded / immersive space
- [x] **166.2.3** Full-space takeover mode
- [x] **166.2.4** Shared-space with other apps
- [x] **166.2.5** Multi-app compositing
- [x] **166.2.6** Side-by-side 2D window + 3D volume
- [x] **166.2.7** Passthrough / mixed-reality blend
- [x] **166.2.8** Portal / window-into-virtual
- [x] **166.2.9** Virtual environment skybox
- [x] **166.2.10** Progressive immersion dial
- [x] **166.2.11** Auto-resize volume to fit room
- [x] **166.2.12** Multi-volume single app
- [x] **166.2.13** Privacy-aware passthrough masking
- [x] **166.2.14** Capture-to-2D mirror for spectators
- [x] **166.2.15** Accessibility zoom / magnify mode

---

### 166.3 @neith/spatial-input — Gaze, Pinch, Hand & Voice Input

- [x] **166.3.1** Eye-tracking gaze ray
- [x] **166.3.2** Gaze-hover highlight
- [x] **166.3.3** Gaze + pinch primary gesture
- [x] **166.3.4** Two-hand pinch for scale / rotate
- [x] **166.3.5** Hand skeleton tracking (27 joints / hand)
- [x] **166.3.6** Direct touch on virtual content
- [x] **166.3.7** Poke / poke-through interactions
- [x] **166.3.8** Grab / drag / throw physics
- [x] **166.3.9** Pose recognition (thumbs-up / fist / open-palm / peace)
- [x] **166.3.10** Custom gesture recogniser
- [x] **166.3.11** Voice wake-word + commands
- [x] **166.3.12** Dictation with language-model post-edit
- [x] **166.3.13** Spatial keyboard with hover-type
- [x] **166.3.14** Controller support (Quest / Magic Leap / custom)
- [x] **166.3.15** Accessibility alt-input (head-tracking / switch)

---

### 166.4 @neith/spatial-avatars — Personas, Avatars & Presence

- [x] **166.4.1** Persona capture (face + voice signature)
- [x] **166.4.2** Avatar rig from Phase 162 MetaHuman pipeline
- [x] **166.4.3** Stylised / abstract avatars
- [x] **166.4.4** Gaze + expression streaming to others
- [x] **166.4.5** Lip-sync from mic
- [x] **166.4.6** Body / pose tracking from upper-body cams
- [x] **166.4.7** Leg inferencer for seated / standing
- [x] **166.4.8** Spatial audio attenuation by avatar distance
- [x] **166.4.9** Self-avatar mirror
- [x] **166.4.10** Pronoun / identity settings
- [x] **166.4.11** Avatar wardrobe (Phase 162 + Phase 165 marketplace)
- [x] **166.4.12** Shared-session multi-user presence
- [x] **166.4.13** Cross-platform (headset ↔ phone AR ↔ desktop) presence
- [x] **166.4.14** Privacy controls (mute / hide avatar)
- [x] **166.4.15** Safety zone / bubble

---

### 166.5 @neith/spatial-render — Stereoscopic & Foveated Render

- [x] **166.5.1** Stereo per-eye rendering
- [x] **166.5.2** Fixed foveated rendering (FFR)
- [x] **166.5.3** Eye-tracked dynamic foveation
- [x] **166.5.4** Motion reprojection (timewarp / spacewarp)
- [x] **166.5.5** Low-latency compositor
- [x] **166.5.6** Per-eye depth for late-latching
- [x] **166.5.7** 90 / 120 Hz rendering target
- [x] **166.5.8** Reduced-resolution screen-scale with upscaler (Phase 154)
- [x] **166.5.9** Variable rate shading
- [x] **166.5.10** HDR passthrough compositing
- [x] **166.5.11** Power-aware downshift on thermal throttle
- [x] **166.5.12** Per-eye IPD calibration
- [x] **166.5.13** Geometric distortion (Zernike polynomial) correction
- [x] **166.5.14** Chromatic aberration correction
- [x] **166.5.15** Stereo 3D test-pattern suite

---

### 166.6 @neith/spatial-physics — Physics in Passthrough

- [x] **166.6.1** Virtual-to-real collision with scene mesh
- [x] **166.6.2** Gravity alignment with real up-vector
- [x] **166.6.3** Object-resting-on-real-table simulation
- [x] **166.6.4** Hand-push-object physics
- [x] **166.6.5** Real-to-virtual occlusion + shadow
- [x] **166.6.6** Real-world lighting-to-virtual shading
- [x] **166.6.7** Dynamic occluder update as objects move
- [x] **166.6.8** Virtual object falls off table realistically
- [x] **166.6.9** Magnet / snap-to-plane helper
- [x] **166.6.10** Safety zone enforcement (prevent fly-through-wall)

---

### 166.7 @neith/spatial-audio — Spatial Audio Integration

- [x] **166.7.1** HRTF binaural rendering
- [x] **166.7.2** Room-acoustics from scene mesh
- [x] **166.7.3** Occlusion / obstruction filtering
- [x] **166.7.4** Reverberation per-room
- [x] **166.7.5** Ambisonics ingest + render (Phase 167 reuse)
- [x] **166.7.6** Voice call spatialisation
- [x] **166.7.7** Directional pickup for mic
- [x] **166.7.8** Near / far field distinction
- [x] **166.7.9** Personalised HRTF calibration
- [x] **166.7.10** Passthrough audio blend

---

### 166.8 @neith/spatial-sdk — Developer SDK & Tooling

- [x] **166.8.1** Swift / Objective-C native bindings
- [x] **166.8.2** C++ / Rust native runtime
- [x] **166.8.3** Unity / Unreal / Godot plug-ins
- [x] **166.8.4** Web (WebXR) parity layer
- [x] **166.8.5** RealityKit / USDZ compatibility
- [x] **166.8.6** Scene-authoring tool (Reality Composer-class)
- [x] **166.8.7** Simulator with room presets
- [x] **166.8.8** Record-and-replay of spatial session
- [x] **166.8.9** Debug overlay (mesh / anchors / frustum)
- [x] **166.8.10** Perf analyzer (Phase 160 integration)
- [x] **166.8.11** Sample gallery (Phase 138.11 asset library)
- [x] **166.8.12** Declarative UI DSL (SwiftUI-class / UI Toolkit)
- [x] **166.8.13** Imperative 3D scene graph API
- [x] **166.8.14** Hybrid 2D+3D UI
- [x] **166.8.15** Deep-link from 2D app to 3D volume

---

### 166.9 @neith/spatial-anchors-collab — Multi-User Collocated Sessions

- [x] **166.9.1** Peer discovery on LAN
- [x] **166.9.2** Cloud-relay fallback
- [x] **166.9.3** Shared anchor network protocol
- [x] **166.9.4** Room-scan sharing
- [x] **166.9.5** CRDT for shared scene state
- [x] **166.9.6** Voice chat bridge (Phase 159 voice reuse)
- [x] **166.9.7** Gesture / gaze broadcast
- [x] **166.9.8** Latency optimisation for room-scale
- [x] **166.9.9** Permission / roles in session
- [x] **166.9.10** Recording of multi-user for replay

---

### 166.10 @neith/spatial-os — Spatial OS Integration Shell

- [x] **166.10.1** Integrate with Phase 45 sovereign OS spatial shell
- [x] **166.10.2** Window manager for 3D volumes
- [x] **166.10.3** Multitasking (apps side-by-side in space)
- [x] **166.10.4** Home / launcher spatial view
- [x] **166.10.5** App install store (Phase 165)
- [x] **166.10.6** System gestures vs app gestures
- [x] **166.10.7** Recentering + space reset
- [x] **166.10.8** Guardian / chaperone boundary
- [x] **166.10.9** Accessibility features (Voice Over, zoom, captions)
- [x] **166.10.10** Shared clipboard 2D ↔ 3D

---

### 166.11 Testing & Validation

Local implementation and external-gate evidence:
[`phase-166-evidence.md`](phase-166-evidence.md).

- [x] **166.11.1** Motion-to-photon latency ≤ 12 ms
- [x] **166.11.2** Eye-tracking calibration accuracy ≤ 1°
- [x] **166.11.3** Hand-tracking jitter benchmark
- [x] **166.11.4** Room-mesh accuracy on 50 test rooms
- [x] **166.11.5** Occlusion fidelity score
- [ ] **166.11.6** Battery life target on target hardware — the live-device
      endurance grader and `spatial-validate battery` gate are complete. Needs a
      two-hour capture on the target spatial headset (Apple Vision Pro /
      visionOS device); the fleet has none (stated 2026-09-18).
      `blocked:hardware`
- [x] **166.11.7** Thermal throttling gracefully
- [x] **166.11.8** Multi-user collocated drift ≤ 2 cm / 10 min
- [x] **166.11.9** WCAG-XR accessibility conformance
- [ ] **166.11.10** Dogfood: Phase 73 VR production + Phase 166 MR mode — the
      cross-phase session grader and `spatial-validate dogfood` gate are
      complete. Needs a live headset session on the target device; the fleet has
      no headset (stated 2026-09-18). `blocked:hardware`
