Grand Diomande Research · Full HTML Reader

cc-anticipation: Project Charter

**Document Version**: 0.1.0 **Created**: 2025-12-26 **Status**: Phase Zero - Active **Canonical Input**: [Anchor.md](../../../../docs/Anchor.md)

Agents That Account for Themselves research note experiment writeup candidate score 26 .md

Full Public Reader

cc-anticipation: Project Charter

Document Version: 0.1.0
Created: 2025-12-26
Status: Phase Zero - Active
Canonical Input: [Anchor.md](../../../../docs/Anchor.md)

---

1. Mission Statement

cc-anticipation converts stabilized motion state into actionable anticipatory signals. It answers one question: "What futures are cheap vs expensive given what's happening now?"

It does not generate motion. It does not generate sound. It does not decide policy.
It measures the geometry of possibility around the present moment.

---

2. Scope Boundaries

2.1 In Scope

ResponsibilityDescription
MotionWindow consumptionAccept aligned, canonical motion windows from cc-window-aligner
Kinematic feature computationCompute velocity, acceleration, jerk, coordination from skeleton
Latent dynamics computationCompute dz/dt, d²z/dt² from LIM-RPS latent stream
Regime embeddingMap motion window to regime embedding (64-256 dims)
Scalar signal emissionEmit commitment, uncertainty, transition_pressure, recovery_margin, phase_stiffness, novelty, stability
Constraint proximityCompute balance margin, joint limit proximity, rotation commitment
AnticipationPacket emissionEmit frozen-schema packets every frame, deterministically
Neighbor-based uncertaintyUse continuation dispersion from MotionPhrase library
Deterministic replaySame input → same output, always

2.2 Out of Scope

ExcludedRationale
Raw sensor ingestionHandled by cc-mcs-headless, mocopi-udp-ingest
Time alignmentHandled by cc-window-aligner
Policy decisionsHandled by Conductor
Motion generationHandled by cc-motiongen
Audio generationHandled by MotionStrudel, EchelonDiT
Semantic labelingNo "spin coming" labels; only actionable scalars

2.3 Interface Contracts

INPUT:  MotionWindow (from cc-window-aligner)
        ├── SkeletonFrame[] (optional)
        ├── LatentFrame[] (optional)
        ├── fps, window_length, coverage
        └── window_id (deterministic hash)

OUTPUT: AnticipationPacket
        ├── scalars: commitment, uncertainty, transition_pressure,
        │            recovery_margin, phase_stiffness, novelty, stability
        ├── vectors: regime_embedding, constraint_vector, derivative_summary
        └── debug: raw_features, neighbor_ids, intermediate_scores

---

3. Success Criteria

3.1 Determinism (Non-Negotiable)

  • [ ] Same MotionWindow + same config → identical AnticipationPacket bytes
  • [ ] Replay of recorded session produces checksum-identical packets
  • [ ] No floating-point nondeterminism in feature computation

3.2 Behavioral Tests

TestCriterion
Stillnessmotion_energy ≈ 0 for 1s → commitment↓, transition_pressure≈0, stability↑
Intentional commitTurn/sweep → commitment↑, uncertainty↓ BEFORE visual peak
BranchingAmbiguous feints → uncertainty↑
RepetitionSame move repeated → novelty↓ across repeats

3.3 Integration Tests

  • [ ] AnticipationPacket feeds Conductor policy signals correctly
  • [ ] regime_embedding queries RAG++ MotionPhrase index successfully
  • [ ] coverage < threshold → packet refused or marked degraded

---

4. Architecture Position

Sensors → cc-mcs-headless → cc-window-aligner → [cc-anticipation] → Conductor
                                     ↓                    ↓
                              (MotionWindow)      (AnticipationPacket)
                                                         ↓
                                               RAG++ / MotionGen / MotionStrudel

4.1 Upstream Dependencies

ModuleProvides
cc-window-alignerMotionWindow with canonical fps, aligned frames
cc-mcs-headlessLIM-RPS latent stream, device fusion
mocopi-udp-ingestSkeletonFrame stream

4.2 Downstream Consumers

ConsumerUses
Conductorscalars (commitment, uncertainty, transition_pressure, etc.)
RAG++regime_embedding for neighbor retrieval
MotionGenuncertainty → variance control
MotionStrudeltransition_pressure → event gating

---

5. Implementation Phases

### Phase v0: Deterministic Rule-Grounded Anticipator
- Kinematic features from skeleton (FK, keypoints, derivatives)
- Latent dynamics from LIM-RPS (dz/dt, d²z/dt²)
- Fixed projection for regime_embedding (no learning)
- Heuristic-based scalar computation
- Full replay determinism
- Behavioral test suite

### Phase v1: Learned Residuals
- Train encoder on MotionPhrase library
- Learn continuation dispersion → uncertainty
- Personalized "tells" from user's movement vocabulary
- Same packet schema, improved accuracy

### Phase v2: RAG++ Integration
- Query MotionPhrase neighbors using regime_embedding
- Retrieved continuation statistics sharpen priors
- Memory-augmented anticipation

---

6. Frozen Schemas

These schemas are immutable once defined. Changes require version bump.

6.1 MotionWindow (Input)

typescript
interface MotionWindow {
  window_id: string;           // deterministic hash
  t_start: number;             // canonical time
  t_end: number;
  fps: number;                 // e.g., 50
  frames: (SkeletonFrame | LatentFrame)[];
  coverage: number;            // 0-1
  device_offset: Record<string, number>;
  dropped_reason?: string;
}

6.2 AnticipationPacket (Output)

typescript
interface AnticipationPacket {
  // Scalars (control-ready)
  commitment: number;          // 0-1, irreversibility
  uncertainty: number;         // 0-1, continuation dispersion
  transition_pressure: number; // d(commitment)/dt - d(uncertainty)/dt
  recovery_margin: number;     // distance to balance/attractor loss
  phase_stiffness: number;     // how locked to internal metronome
  novelty: number;             // distance from recent regimes
  stability: number;           // local stationarity

  // Vectors (query/conditioning)
  regime_embedding: Float32Array;  // 64-256 dims
  constraint_vector: Float32Array; // ~8 dims
  derivative_summary: Float32Array; // ~8 dims

  // Debug/Telemetry
  debug: {
    raw_features: Record<string, number>;
    neighbor_ids?: string[];
    intermediate_scores: Record<string, number>;
  };

  // Provenance
  window_id: string;
  timestamp: number;
  schema_version: string;
}

---

7. Technology Decisions

DecisionChoiceRationale
Primary languageRust (cc-core-rs pattern)Performance, determinism, PyO3 bindings
Python bindingsPyO3/maturinInterop with cc-core, dashboard
Ring bufferLockFreeRingBuffer from cc-core-rsAlready proven, zero-copy
FilteringOneEuroFilter, SlewLimiter from cc-core-rsExisting infrastructure
ANN searchHNSW from rag_plusplusRegime embedding queries
StatisticsWelford/OutcomeStats from rag_plusplusRunning mean/variance

---

8. Risk Register

RiskMitigation
Floating-point nondeterminismUse deterministic math, avoid parallel reductions
Latency in kernel pathProfile early, no allocations in hot path
Skeleton FK errorsValidate bone hierarchy, unit tests
Regime embedding driftFreeze projection matrix, version embeddings
Undefined behavior at boundariesExplicit coverage checks, refuse low-quality windows

---

9. References

  • [Anchor.md](../../../../docs/Anchor.md) - Canonical specification
  • [cc-core-rs](../../cc-core-rs/) - Ring buffers, filters, equilibrium solvers
  • [rag_plusplus](../../rag_plusplus/) - HNSW index, OutcomeStats
  • [RAG_PLUS_PLUS.md](../../cc-trajectory/docs/guides/RAG_PLUS_PLUS.md) - RAG++ architecture

---

Next Document: [GLOSSARY.md](./GLOSSARY.md)

Promotion Decision

Attach run IDs, datasets, metrics, and reproduction commands.

Source Anchor

anticipation-geometry/crates/anticipation/docs/PROJECT_CHARTER.md

Detected Structure

Method · Evaluation · References · Architecture