Grand Diomande Research · Full HTML Reader

Comp-Core Architecture Overview

**Version**: 2.4.0 **Last Updated**: 2026-01-03 **Schema Version**: 1.0.0 **Implementation Status**: Production Ready **Maintainer**: Computational Choreography Team

Embodied Trajectory Systems architecture technical paper candidate score 54 .md

Full Public Reader

Comp-Core Architecture Overview

Version: 2.4.0
Last Updated: 2026-01-03
Schema Version: 1.0.0
Implementation Status: Production Ready
Maintainer: Computational Choreography Team

---

Implementation Status Matrix

ComponentStatusLocationTestsDeploymentNotes
cc-relay (Rust)✅ Production`core/cc-relay`11 passDO VPSTLV parser, circuit breaker, Prometheus
cc-protocol✅ Production`core/cc-protocol`176 passCrate27-bone skeleton, MessagePack serialization
cc-collection✅ Production`core/cc-collection`24 passCrateEKF sensor fusion, occlusion handling
cc-anticipation✅ Production`core/cc-anticipation`50 passCrateCommitment/uncertainty kernel
cc-gesture✅ Production`core/cc-gesture`81 passCrateNeighbor voting classifier
DELL✅ Production`core/cc-echelon/crates/dell`343 passGCP VMDual-equilibrium latent learning
cc-conductor✅ Production`core/cc-echelon/crates/cc-conductor`31 passCrateBeat-quantized scheduling
cc-mcs-headless✅ Production`backend/cc-mcs/src-tauri`-GCP VMHeadless daemon
RAG++ Core✅ Production`core/cc-rag-plus-plus/crates/core`36 passCrate5D trajectory, HNSW, IRCP
RAG++ Python✅ Production`core/cc-rag-plus-plus/rag_plusplus`-Cloud RunCognitiveTwin, FastAPI
Graph Kernel✅ Production`core/cc-graph-kernel`140 passCloud RunContext slicing, HMAC tokens
Orbit✅ Production`apps/trajectory/trajectory-orbit`-Cloud RunSession orchestration
Agent SDK✅ Production`core/cc-agent-sdk`-npmClaude agent wrapper, MCP tools
mocopi-simulator✅ Production`core/cc-relay/src/bin/mocopi_simulator.rs`6 passCLIMotion pattern generator

Deployment Endpoints

ServiceEndpointProtocolPurpose
DO Relay`[ip]:12351`UDPMocopi packet ingestion
DO Metrics`[ip]:9090`HTTPPrometheus metrics
GCP VM`[ip]:8765`HTTPHeadless daemon API
GCP VM WS`[ip]:8766`WebSocketReal-time visualization
Orbit`orbit-server-*.run.app`HTTPSSession management
RAG++`rag-plusplus-*.run.app`HTTPSMemory service
Graph Kernel`graph-kernel-*.run.app`HTTPSAdmissibility authority

---

Executive Summary

Comp-Core is a production-grade motion-to-meaning pipeline that transforms embodied human movement into musical expression. The system processes real-time sensor data from:

  • Sony Mocopi: 6-12 IMU sensors (Base Kit / Pro Kit) → 27-bone skeleton
  • iPhone/Apple Watch: CoreMotion IMU data via WebSocket
  • MediaPipe: Camera-based pose estimation (33 landmarks)

The pipeline converts raw motion into anticipatory signals (commitment, uncertainty, transition pressure), gesture classifications, and ultimately sound control signals.

Latency Budget (End-to-End: < 10ms)

Mocopi UDP → TLV Parse (50μs) → EKF Fusion (100μs) → Anticipation (2ms) → Gesture (500μs) → Audio (1ms)

---

Conceptual Hierarchy

The architecture is organized around three conceptual layers that represent different questions about motion:

┌─────────────────────────────────────────────────────────────┐
│                                                             │
│              COMPUTATIONAL CHOREOGRAPHY                     │
│                    The Discipline                           │
│                                                             │
│   "What does movement mean, and how can we compute it?"     │
│                                                             │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│                    TrajectoryOS                             │
│               The Operating System                          │
│                                                             │
│  "What does this moment mean in the context of             │
│   everything else, and where does it sit in the            │
│   long arc?"                                                │
│                                                             │
│  Time Scale: Hours → Years                                  │
│  Operates on: Sessions, projects, creative arcs            │
│  Output: Context, memory, style                             │
│                                                             │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│                      Echelon                                │
│                The Real-Time Engine                         │
│                                                             │
│  "What is happening now, in the body, and how do we        │
│   keep this moment coherent?"                              │
│                                                             │
│  Time Scale: Milliseconds → Seconds                         │
│  Operates on: Continuous motion dynamics                    │
│  Output: Control signals, gestures, audio                   │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Document Links

LayerDocumentDescription
Philosophy[01-COMPUTATIONAL_CHOREOGRAPHY.md](01-COMPUTATIONAL_CHOREOGRAPHY.md)Core principles and vocabulary
TrajectoryOS[02-TRAJECTORY_OS.md](02-TRAJECTORY_OS.md)Long-horizon operating system
Echelon[03-ECHELON.md](03-ECHELON.md)Real-time engine architecture

---

Architecture Diagram

mermaid
flowchart TB
    subgraph Philosophy [Computational Choreography]
        CC[Motion as Meaning<br/>The Discipline]
    end

    subgraph TrajectoryOS [TrajectoryOS - Long Horizon OS]
        direction TB
        subgraph Memory [Memory Layer]
            RAG[RAG++ Memory Fabric<br/>5D Trajectory Coordinates]
            CT[CognitiveTwin<br/>Style Signature]
            HNSW[HNSW Index<br/>O(log n) ANN]
        end
        subgraph Orchestration [Orchestration Layer]
            Orbit[Orbit Server<br/>Axum/Rust]
            Sessions[Session Manager<br/>Supabase]
        end
        subgraph Trajectory [Trajectory Layer]
            TC[5D Coordinates<br/>temporal, semantic, depth, homogeneity, salience]
            IRCP[I-RCP Propagator<br/>Attention Weights]
        end
    end

    subgraph Echelon [Echelon - Real-Time Engine]
        direction TB
        subgraph Sensor [Layer 0-1: Sensor Input]
            Mocopi[Mocopi 27-Bone<br/>UDP 12351]
            Relay[cc-relay<br/>Rust Binary]
            Collection[cc-collection<br/>Extended Kalman Filter]
        end
        subgraph Semantic [Layer 2-3: Semantic]
            Aligner[cc-window-aligner<br/>50 Hz Windows]
            Anticipation[cc-anticipation<br/>Commitment, Uncertainty]
            Gesture[cc-gesture<br/>Neighbor Voting]
        end
        subgraph DELL [Layer 3.5: DELL]
            DELLCoord[DELLCoordinator]
            Fast[Fast Equilibrium<br/>60Hz]
            Slow[Slow Equilibrium<br/>~2.5Hz]
        end
        subgraph Audio [Layer 4-7: Audio]
            Brain[cc-brain<br/>Latent Updater]
            Conductor[cc-conductor<br/>Beat Scheduler]
            DSP[Real-Time DSP<br/>Lock-Free]
        end
    end

    CC --> TrajectoryOS
    CC --> Echelon
    Mocopi --> Relay --> Collection --> Aligner --> Anticipation
    Anticipation --> Gesture --> Brain
    Anticipation --> DELLCoord --> Fast --> Slow
    DELLCoord --> Brain --> Conductor --> DSP
    Echelon -->|Trajectory Segments| TrajectoryOS
    TrajectoryOS -->|Context Window| Echelon

---

Data Flow Pipeline

Complete Pipeline (Sensor to Audio)

mermaid
flowchart LR
    subgraph Input [Sensor Input Layer]
        M[Mocopi UDP<br/>12351<br/>30-60 Hz]
        I[iPhone/Watch<br/>WebSocket<br/>60 Hz]
        C[MediaPipe<br/>WebSocket<br/>30 Hz]
    end

    subgraph Relay [cc-relay]
        TLV[TLV Parser<br/>Zero-Copy]
        Batch[Frame Batching<br/>30 frames]
        Sync[Cloud Sync<br/>Circuit Breaker]
    end

    subgraph Fusion [cc-collection]
        EKF[Extended Kalman Filter<br/>13-dim state per limb]
        Occ[Occlusion Handler<br/>Exponential Decay]
    end

    subgraph Window [cc-window-aligner]
        WA[Temporal Alignment<br/>Clock Skew Correction]
        MW[MotionWindow<br/>50 Hz Canonical]
    end

    subgraph Anticipation [cc-anticipation]
        Kernel[Anticipation Kernel<br/>7 Scalars + 3 Vectors]
        Phrase[Phrase Library<br/>HNSW Neighbors]
    end

    subgraph Gesture [cc-gesture]
        Class[Gesture Classifier<br/>Neighbor Voting]
        Hand[Hand Kernel<br/>iPhone/Watch]
    end

    subgraph Brain [cc-brain]
        Latent[Latent Updater<br/>State Machine]
        Lex[Lexicon<br/>Expressive Controls]
    end

    subgraph Output [Output Layer]
        Audio[Audio Engine<br/>48kHz, < 1ms]
        Viz[Visualization<br/>WebSocket]
        DJ[DJ Control<br/>MIDI/OSC]
    end

    M --> TLV --> Batch --> Sync --> EKF
    I --> EKF
    C --> EKF
    EKF --> Occ --> WA --> MW --> Kernel
    Kernel --> Phrase --> Class
    Hand --> Class
    Class --> Latent --> Lex
    Lex --> Audio
    Lex --> Viz
    Class --> DJ

---

Crate Dependency Graph

mermaid
flowchart BT
    subgraph Protocol [Protocol Layer]
        Protocol[cc-protocol<br/>Types, Schemas, Serialization]
    end

    subgraph Input [Input Layer]
        Relay[cc-relay<br/>TLV Parser, UDP]
        Collection[cc-collection<br/>Kalman Fusion]
    end

    subgraph Semantic [Semantic Layer]
        WindowAligner[cc-window-aligner<br/>Temporal Alignment]
        Anticipation[cc-anticipation<br/>Commitment, Uncertainty]
        Gesture[cc-gesture<br/>Classification]
    end

    subgraph Engine [Engine Layer]
        Brain[cc-brain<br/>Latent Equilibrium]
        DELL[dell<br/>Dual Timescale]
        Conductor[cc-conductor<br/>Beat Scheduling]
        AudioEngine[audio-engine<br/>DSP]
    end

    subgraph Memory [Memory Layer]
        RAGCore[rag_plusplus_core<br/>HNSW, IRCP, 5D]
    end

    Protocol --> Relay
    Protocol --> Collection
    Collection --> WindowAligner
    WindowAligner --> Anticipation
    Anticipation --> Gesture
    RAGCore --> Anticipation
    Gesture --> Brain
    Anticipation --> DELL
    DELL --> Brain
    Brain --> Conductor --> AudioEngine

---

Key Invariants

These invariants are NEVER violated. Violation indicates a bug.

IDInvariantEnforcementChecked At
INV-001Deterministic replayNo random seeds, same input → same outputAll kernels
INV-002Quaternion wxyz orderAll quaternions use scalar-first conventionParsing, fusion
INV-003Coverage thresholdWindows with coverage < 0.9 are rejectedKernel entry
INV-004Scalar boundscommitment, uncertainty ∈ [0, 1]Packet creation
INV-005Bone countMocopi skeleton = 27 bones (0-26)Frame creation
INV-006No hot-path allocationPre-allocated buffers in kernelRuntime
INV-007Schema versioningAnticipationPacket.schema_version = "0.1.0"Deserialization
INV-GK-001Slice boundary`turn_id ∈ slice.turn_ids` enforcedSlice retrieval
INV-GK-002Provenance completenessAll provenance fields requiredSlice export
INV-GK-003No phantom authorityMissing [sensitive field redacted]

See: [13-DATA_CONTRACTS.md](13-DATA_CONTRACTS.md), [15-GRAPH_KERNEL.md](15-GRAPH_KERNEL.md) for frozen schemas and admissibility.

---

Performance Targets

ComponentTarget LatencyMeasuredNotes
TLV Parsing< 50μs~30μsZero-copy parsing
Kalman Update< 100μs~50μsPer-limb filter
Anticipation Kernel< 2ms~1.5msFull window processing
DELL Fast Equilibrium< 500μs~300μsPer-frame
Gesture Classification< 500μs~200μsWith neighbor lookup
Audio Scheduling< 1ms~500μsBeat-quantized
End-to-end< 10ms~8msSensor to audio

See: [14-TEST_SUITE.md](14-TEST_SUITE.md) for benchmark commands.

---

Documentation Index

DocumentDescriptionKey Topics
[00-OVERVIEW.md](00-OVERVIEW.md)This documentArchitecture summary
[01-COMPUTATIONAL_CHOREOGRAPHY.md](01-COMPUTATIONAL_CHOREOGRAPHY.md)Philosophy and disciplineAnticipation model, vocabulary
[02-TRAJECTORY_OS.md](02-TRAJECTORY_OS.md)Long-horizon OSRAG++, Orbit, CognitiveTwin
[03-ECHELON.md](03-ECHELON.md)Real-time engineDELL, cc-brain, audio
[04-SENSOR_INPUT.md](04-SENSOR_INPUT.md)Mocopi, IMU, MediaPipeTLV protocol, bone IDs
[05-SENSOR_FUSION.md](05-SENSOR_FUSION.md)Extended Kalman FilterFusion algorithm, weights
[06-ANTICIPATION.md](06-ANTICIPATION.md)Anticipation kernelScalars, vectors, neighbors
[07-GESTURE_RECOGNITION.md](07-GESTURE_RECOGNITION.md)Gesture classificationNeighbor voting, gating
[08-RAG_PLUS_PLUS.md](08-RAG_PLUS_PLUS.md)Memory and retrieval5D coordinates, HNSW
[09-ORBIT.md](09-ORBIT.md)Orchestration layerProject/session management
[10-AUDIO_ENGINE.md](10-AUDIO_ENGINE.md)Beat scheduling and DSPConductor, DJ integration
[11-VISUALIZATION.md](11-VISUALIZATION.md)3D topology renderingThree.js, WebSocket
[12-DEPLOYMENT.md](12-DEPLOYMENT.md)InfrastructureGCP, Cloud Run, VPS relay
[13-DATA_CONTRACTS.md](13-DATA_CONTRACTS.md)Frozen schemasVersioning policy
[14-TEST_SUITE.md](14-TEST_SUITE.md)Testing guideE2E, benchmarks, CI
[15-GRAPH_KERNEL.md](15-GRAPH_KERNEL.md)Graph KernelAdmissibility, context slicing
[16-GRAPH_KERNEL_INTEGRATION.md](16-GRAPH_KERNEL_INTEGRATION.md)Integration guideClient wrappers, RAG++ integration
[17-AGENT_SDK.md](17-AGENT_SDK.md)Agent SDKClaude wrapper, MCP tools, hooks

---

Quick Start

1. Test Without Hardware (Mocopi Simulator)

bash
# Build and run the simulator
cd core/cc-relay
cargo run --release --bin mocopi-simulator -- \
    --target [ip]:12351 \
    --motion dance \
    --duration 30 \
    --fps 50

# Available motion patterns: idle, walk, dance, wave, expressive

2. Verify Data Flow

bash
# Check relay metrics (Prometheus)
curl -s http://[ip]:9090/metrics | grep cc_relay

# Check GCP VM health
curl http://[ip]:8765/health

# Check frame count
curl http://[ip]:8765/mocopi-state | jq '.count'

# Get latest moment
curl http://[ip]:8765/moment | jq

3. Run Locally

bash
# Terminal 1: Rust relay
cd core/cc-relay && cargo run --release

# Terminal 2: Headless daemon
cd backend/cc-mcs/src-tauri && cargo run --bin cc-mcs-headless

# Terminal 3: RAG++ service
cd core/cc-rag-plus-plus && python -m rag_plusplus.service.app

# Terminal 4: Orbit server
cd apps/trajectory/trajectory-orbit && cargo run

4. Run Tests

bash
# Full test suite
cargo test --workspace --all-features

# Run cc-echelon tests specifically
cd core/cc-echelon && cargo test --workspace

# Run E2E local test
./scripts/test_e2e_local.sh quick

# Run benchmarks
cargo bench --workspace

---

Audit Status

Last audit: 2025-01-01

PriorityFindingLocationStatus
HighNo HTTPS on VMDeployment⚠️ Add Caddy
HighSession cleanupOrbit⚠️ Add TTL job
MediumHand pipeline immaturecc-gesturePlanned
MediumSalience weights untunedRAG++Needs data
Low70/30 blend hardcodedAnticipationMake configurable
LowMobile viz performanceFrontendReduce complexity

See: [13-DATA_CONTRACTS.md](13-DATA_CONTRACTS.md) for consolidated audit findings.

---

Contributing

1. Read the relevant architecture document before making changes
2. Ensure invariants are maintained (especially INV-001, INV-002, INV-005)
3. Run the full test suite: `cargo test --workspace --all-features`
4. Update documentation if public APIs change
5. Add tests for new functionality

Code Style

  • Rust: `cargo fmt` and `cargo clippy`
  • Python: `black` and `ruff`
  • TypeScript: `prettier` and `eslint`

---

Version History

VersionDateChanges
2.4.02026-01-03Added Agent SDK documentation, updated component matrix
2.3.02026-01-02Added Graph Kernel production deployment, admissibility tokens
2.2.02025-01-01Added DELL, comprehensive test suite, Rust relay
2.1.02024-12-15Added mocopi-simulator, updated deployment
2.0.02024-12-01Echelon/TrajectoryOS split, RAG++ integration
1.0.02024-11-01Initial architecture documentation

Promotion Decision

Promote into a technical note or architecture paper with implementation anchors.

Source Anchor

Comp-Core/docs/architecture/00-OVERVIEW.md

Detected Structure

Method · Evaluation · Code Anchors · Architecture