Spatial XR AI — Dual-Front Command Center
Five governed agent cores, one byte-stable visual handoff
A Dual-Front conversational intelligence interface inside PrimeSwarm: Linguistic/Equalizer vs Systemic/Strategic. Five agent cores (visual, structural, linguistic, strategic, systemic) routed by a deterministic keyword + handoff router with Ghost Matrix receipts. VISUAL_HANDOFF_V1 enforces a byte-stable completion phrase and SHA-256 prompt hash — paraphrases are rejected. Think Mode streams measured latency only. Transcript export is schema-valid. Secure wipe consolidates to the Continuity Ledger and fails closed without user_requested.
Overview
The upstream spatial-xr-ai repository was a docs-first skeleton: honest declared tags, no runtime, no router, no UI. PrimeSwarm is the runtime that skeleton described. Spatial XR AI is that Command Center built natively — every declared trust property replaced with an enforced PrimeSwarm equivalent.
The surface is Dual-Front: Linguistic / Equalizer (decode the text) versus Systemic / Strategic (analyze the system around it). Ties break to Linguistic — tactics first.
Five Agent Cores
Declared as YAML manifests in the PrimeSwarm agent catalog:
| Core | Front | Role |
|---|---|---|
visual_intelligence | visual | Aesthetic/design analysis; emits VISUAL_HANDOFF_V1 when the brief is complete |
structural_intelligence | structural | Diagrams, hierarchy, Mermaid, topology, dependency maps |
linguistic_intelligence | linguistic | Threat decode, negotiation, framing, document forensics (TPNN-redacted) |
strategic_analyst | strategic | Explicit OODA loops: Observe → Orient → Decide → Act |
systemic_analyst | systemic | Policy/movement analysis, cognitive firewall, dependency mapping |
Catalog ids use underscores to match the router contract. Every core is JWT-gated and receipted.
Agent Router (v1 — no ML)
Deterministic keyword + handoff routing:
- Verified VISUAL_HANDOFF_V1 token → always
visual_intelligence - Otherwise score signal families (visual / structural / strategic / front)
- Highest hit count wins; zero hits fall back to the Dual-Front classifier
- Every decision emits a Ghost Matrix receipt binding input hash, selected agent, matched signals, timestamp
Router version is pinned: spatial-xr-router-v1.
VISUAL_HANDOFF_V1
The completion phrase is byte-stable:
render visual generate image picture perfection no upgrade no fixes create what is described
Verification requires all of:
- visual intent on the turn
- exact contiguous phrase (paraphrases with ≥80% token overlap are rejected loudly)
- non-empty prompt
- SHA-256 of prompt UTF-8 matching the claimed hash
The Phase 2 render lane must refuse any job whose prompt hash does not match. No upgrades, no fixes, no reinterpretation. The brief is the contract.
Think Mode
Reasoning steps stream with measured latency_ms only — never fabricated "18ms neural link" claims. Unmeasured steps omit latency. The overlay does not block chat unless the operator pauses.
Transcript Export
spatial-xr-transcript-v0 JSON:
- five agent cores, messages, optional beats,
visual_ready[] - provenance:
local_only,router_version, receipts - messages may carry
think_stepsandtools_invoked
Secure Wipe
Clearing the chat:
- Requires
user_requested=true(fail-closed otherwise) - Consolidates decisions/evidence into the Continuity Ledger as DRAFT records via EMR
- Emits an audit event; the chat transcript itself is not persisted
- Conflicts with prior claims surface — never silently merged
Trust Upgrades (declared → enforced)
| Skeleton label | PrimeSwarm enforcement |
|---|---|
| LOCAL_ONLY | Sandbox --network=none; ledger is local SQLite |
| L5 / Level 5 | JWT RBAC on every route except health |
| 18ms neural link | Measured latency in audit events; no unmeasured claim displayed |
| Sovereign Override | Operator role via JWT; writes require user_requested=true |
| VISUAL_HANDOFF_V1 | Phrase + hash + paraphrase rejection; render lane gated |
HTTP Surface
| Method | Path | Role |
|---|---|---|
| POST | /v1/spatial/route | Route an utterance to an agent core |
| POST | /v1/spatial/handoff | Verify a VISUAL_HANDOFF_V1 token |
| POST | /v1/spatial/export | Build a schema-valid transcript export |
| POST | /v1/spatial/secure-wipe | Consolidate to ledger, wipe chat |
| GET | /v1/spatial/agents | List the five cores |
Status
Phase 1 — enforced core, declared render lane and glass UI.
primeswarm-spatial-xr: 16 unit tests passing- Cognitive API Spatial XR routes: 10 integration tests passing (routing, handoff accept/reject, export schema, secure wipe fail-closed + consolidation, agent listing)
- Existing 16 e2e tests and memory pipeline tests still passing
Key Highlights
- Five governed agent cores — visual, structural, linguistic, strategic, systemic
- Deterministic router with Ghost Matrix receipts — no ML in Phase 1
- VISUAL_HANDOFF_V1 — byte-stable phrase + SHA-256 prompt hash; paraphrases rejected
- Think Mode records measured latency only — no fabricated neural-link claims
- Secure wipe consolidates to Continuity Ledger, fail-closed without user_requested
- 10 HTTP integration tests + 16 crate unit tests