v0.7.0 · feature/lewm-worldmodel · 11 ADRs

LeWM under the DAG

JEPA as a sub-layer of CMVG

ADR-048 → ADR-058 · SIGReg isotropic-Gaussian manifold

↓ scroll to descend

Diagram ① · architecture

Sensor plane · wire · consumers · ExoChain.

One direction of flow. The sensor network is primary; the world model is one additive subscriber. ExoChain is the attestation spine that lets standby and peer services catch up from replay alone.

❶ SENSOR PLANERGB-D · IMU · Proprio · LiDARCOLLECTgateAGGREGATEfusionENCODE ★SIGRegz_t ∈ ℝ¹⁹² · N(0, I) · per-frame Ed25519ADR-056 Pipeline Service · ADR-057 edge intelligenceemit · 10 Hz❷ OBSERVATION WIRE · mesh.sensor.v1.*encoded · primary · 10 Hz · CBOR + Ed25519consensus · conditional · z_cluster, ẑ_{t+1}control · drift · surprise · plans (multi-pub)ExoChain-indexed · ADR-053❸ LOCAL CONSUMERS · authoritativehnsw_eml · ECC Causal Graph · CMVG forestStructureTag::LatentWorldModel · LatentHandle in metadataHYPOTHESIZEOBSERVEEVALUATEADJUSTDEMOCRITUS · 1 kHz servo · 1 ms tick (ADR-047)❹ WORLDMODELSERVICE · optional · additiveFusion Transformer · Predictor pred_φ · LatentPlannerExposes LatticeApi (ADR-052) · ServiceUnavailable ⇒ local fallbackSingle · Raft-standby · Peer-to-peer (ADR-054)CEM default · MPPI warm-start · gradient-shooting

“The right move is not to replace ECC with LeWM — it is to put LeWM under ECC as a subsymbolic sensor substrate.”

— synthesis.md, Round 1

Two timescales, one loop: the causal graph learns what the right variables are (slow, symbolic); the predictor learns how they evolve (fast, differentiable). The sensor network is primary and self-sufficient. The world model is an additive consumer.

ADR-058 · The Constitutional Invariant

We inverted it.

First-revision framing

A lattice fed by observers. Sensors point inward at a shared world-model. Coupling everywhere.

Decoupling invariant

A self-sufficient sensor pipeline with the world model as one optional subscriber. Data flows one-way.

  1. 01Senders are observational-only. No gradient semantics on the wire.
  2. 02World-model disappearance does not degrade sensor-network functionality.
  3. 03Sensor disappearance degrades the world model gracefully, not catastrophically.
  4. 04`LatticeApi` callers must handle `ServiceUnavailable`.
  5. 05Smaller agents have local-only fallback paths.
Diagram ③ · sensor lab

Five sensors, one manifold.

Each sensor class runs its own three-step pipeline. All emit onto the same SIGReg-regularized isotropic-Gaussian latent so any consumer can subscribe uniformly.

↓ scroll · pan →
Sensor 01 / 5 · depth16 · YUV420 → patch tokens

RGB-D camera

depth + color stream — primary spatial sensor for grasp planning, free-space, and object identity.

  • rate30 fps · 320 × 180
  • collectnovelty gate · MAD on depth Δ
  • aggregatepatch tokens · 16×9 grid
  • encodeViT-tiny · 6L · 192d
  • fallbackgraceful · proprio + lidar fill
ADR-056ADR-057
live preview · depth16 · YUV420 → patch tokens
RGB-D · 30 fps · 320×180 → 192d
collect→aggregate→encode → z_t ∈ ℝ¹⁹²
Sensor 02 / 5 · float32 · 6-axis → 1d temporal tokens

IMU · 6-axis

fast inertial sensor — drives the 1 kHz servo loop and bootstraps every prediction.

  • rate1 kHz · 6-axis (acc + gyro)
  • collectring buffer 100 ms · raw
  • aggregatetemporal align with vision
  • encodetemporal-CNN → 192d
  • fallbacknever drops · servo critical
ADR-047ADR-056
live preview · float32 · 6-axis → 1d temporal tokens
axayazIMU · 1 kHz · 6-axis → 192d
collect→aggregate→encode → z_t ∈ ℝ¹⁹²
Sensor 03 / 5 · float32 · 24-channel → joint tokens

Proprioception

12 joint angles + torques — DEMOCRITUS reads here every millisecond.

  • rate1 kHz · 12 joints (θ + τ)
  • collectalways-on · authoritative
  • aggregatekinematic chain projection
  • encodeGNN over chain → 192d
  • fallbacklocal-only fallback path
ADR-047ADR-053
live preview · float32 · 24-channel → joint tokens
hip_lhip_rknee_lknee_rank_lank_rsho_lsho_relb_lelb_rwri_lwri_rProprio · 1 kHz · 12 joints → 192d
collect→aggregate→encode → z_t ∈ ℝ¹⁹²
Sensor 04 / 5 · compressed pointcloud → voxel tokens

LiDAR · 96-beam

spatial truth — long-range geometry that anchors the visual world model.

  • rate20 Hz · 96 beams · 360°
  • collectvoxel hash · 10 cm³
  • aggregatesparse-conv · radial bins
  • encodePointTransformer-S → 192d
  • fallbackdepth-only mode degraded
ADR-056ADR-058
live preview · compressed pointcloud → voxel tokens
LiDAR · 20 Hz · 96-beam → 192d
collect→aggregate→encode → z_t ∈ ℝ¹⁹²
Sensor 05 / 5 · 16-bit PCM → log-mel spectrogram

Audio · 48-mel

event sensor — surprise spikes, voice commands, environment classification.

  • rate16 kHz · 48-mel · 25 ms hop
  • collectVAD gate · energy threshold
  • aggregatemel windows · 1 s context
  • encodeaudio-ViT-nano → 192d
  • fallbackoptional · world-model only
ADR-053ADR-057
live preview · 16-bit PCM → log-mel spectrogram
Audio · 16 kHz · 48-mel → 192d
collect→aggregate→encode → z_t ∈ ℝ¹⁹²
00
05
Diagram ④ · pipeline internals

Inside one sensor pipeline.

Three small models per sensor class. Each is RVF-hosted, separately versioned, separately attested, and hot-swappable at tick alignment with 30-second SIGReg rollback.

rgb-dimupropriolidaraudioCOLLECT · transmit-gatering buffer · 100 msnovelty gate · MADdrop-redundant≈ 7× bandwidth reductiontrained per sensor classRVF segment ① · ADR-056AGGREGATE · multi-sensor fusionper-modality tokenizertemporal align · 100 mscross-modal attentionsensor-drop gracefulRVF segment ② · ADR-056ENCODE · SIGReg ViT-tinyViT-tiny · 6L · 192dSIGReg · isotropic GaussVICReg variance + invarianceCBOR · Ed25519 · ExoChain idxRVF segment ③ · ADR-057z_t ∈ ℝ¹⁹²→ mesh.sensor.v1.encoded
① collect
A trained transmit-gate decides what is worth sending. MAD-novelty + saturation gate cut bandwidth ~7× without losing rare-event sensitivity.
② aggregate
Per-modality tokenizers feed a temporal-aligned cross-modal block. Sensor-drop is a contract, not an error: missing modalities degrade quality smoothly.
③ encode
A 6-layer ViT-tiny projects to 192d under SIGReg + VICReg. The output is contract-checked against an isotropic Gaussian so any consumer can subscribe uniformly.

Three RVF segments · three independent rollback domains · one shared latent contract.

ADR-050 · the latent contract

zt ∈ ℝ¹⁹² regularized to N(0, I).

SIGReg + VICReg pull every encoder’s output toward an isotropic Gaussian. That is what makes the wire universal — any subscriber can read from any sensor class without bespoke decoding.

The contract is versioned, ExoChain-attested, and degrades — never crashes. If a new edge model drifts off the manifold, sigreg_health drops, and the four-condition rollback engages within 30 seconds.

  • · VICReg variance term · per-dim σ ≥ 1
  • · VICReg covariance · off-diagonal → 0
  • · KL to N(0, I) · soft prior
  • · temporal-straightening · zt → zt+1 linear
SIGREG_HEALTH0.94 ✓VARIANCE σ²0.998z_t ∈ ℝ¹⁹² · regularized to N(0, I) · ADR-050
Diagram ⑥ · ADR-055 · streaming-merge guardrail

Four-condition AND rollback, in one trace.

SIGReg health · probing accuracy · VoE surprise differentiation · temporal-straightening score. Any single dip can be tolerated; the conjunction is what triggers an automatic rollback to the last attested checkpoint.

t+0st+3st+6st+9st+12st+15st+18st+21st+24st+27st+30ssigreg_health 0.85ROLLBACK · t+22sVoE surpriseSIGReg health
Diagram ⑤ · ADR-054

Three deployment topologies.

The world-model contract is identical. The deployment shape adapts to fleet size, mesh quality, and trust boundaries — every variant is observationally equivalent to local ECC consumers.

Single primary

1–10 nodes
s0s1s2s3s4PRIMARY

One WorldModelService for the entire fleet. Local ECC consumers fall back cleanly when it is unreachable. Simplest to operate, the right default for small teams.

  • · lowest operational overhead
  • · ServiceUnavailable on outage
  • · best for early deployments

Raft-elected primary + standby

10–500 nodes
s0s1s2s3s4PRIMARYSTANDBYraft

Active primary with a hot standby trained off the same ExoChain replay. Failover is a leader election, not a re-train. Standby promotes within seconds.

  • · subsecond failover
  • · standby trains off replay
  • · one authoritative writer

Peer-to-peer mesh

500+ nodes · low-trust
w0w1w2w3w4

Every node runs its own WorldModelService and gossips checkpoints over mesh. No central authority. Used when fleets cross trust boundaries or partition tolerance dominates.

  • · no central writer
  • · gossip-checkpointed
  • · partition-tolerant by construction
❶

Sensor Plane

per node · always-on

RGB-D · IMU · Proprio · LiDAR · Audio stream into a three-step learned pipeline:

Collect (transmit-gate) → Aggregate (multi-sensor fusion) → Encode (SIGReg-manifold ViT-tiny).

Three trainable RVF-hosted small models per sensor class. Hot-swap at tick alignment. Auto-rollback on sigreg_health < 0.85 for 30 s.

ADR-056ADR-057
❷

Observation Wire

mesh.sensor.v1.* · CBOR + Ed25519

Three topics under mesh.sensor.v1.*: encoded (primary, 10 Hz, burstable 100 Hz), consensus (conditional, world-model output), control (drift / surprise / plans).

Packets are observational-only. No gradient proxies. No consumer-specific framing.

Every frame Ed25519-signed, ExoChain-indexed. Replay is the single source of truth.

ADR-053ADR-022
❸

Local Consumers

authoritative · per node

hnsw_eml (ruvector) · ECC Causal Graph (causal.rs, 3417 LOC) · CMVG forest with StructureTag::LatentWorldModel.

LatentHandle(Uuid) lives in CausalNode.metadata — no schema break.

DEMOCRITUS runs the 1 kHz servo off an ArcSwap<ActionPlan>. The 1 ms cognitive tick never runs the planner inline.

ADR-048ADR-046
❹

WorldModelService

cluster · optional · additive

Fusion Transformer → Predictor pred_φ → LatentPlanner (CEM default · MPPI warm-start · gradient-shooting).

Exposes LatticeApi as a first-class ServiceApi. observe · predict · plan · recall · subscribe_surprise · subscribe_drift.

Three deployment topologies: single primary · Raft-elected primary + standby · peer-to-peer.

ServiceUnavailable is a contract value. Callers fall back to local-ECC-only paths.

ADR-052ADR-054
❺

Training Layer

two surfaces · decoupled cadences

Edge intelligence: offline, per-sensor-class. Weights bundled as RVF segments. Hot-swap safe because the SIGReg manifold is contract, not implementation.

World-model streaming merge: online, in-service. Importance-weighted replay per sensor class — rare-event sensors retain long residency.

Four-condition AND rollback: SIGReg health · probing accuracy · VoE surprise differentiation · temporal-straightening score.

ADR-055ADR-057
❻

ExoChain

attestation & replay spine

Every sensor frame · every checkpoint · every RVF segment activation · every rollback · every governance topology change · every LatticeApi capability grant.

Standby and peer WorldModelServices catch up from replay. Training data comes from ExoChain, never from the live bus.

ADR-022ADR-033
❶ SENSOR PLANERGB-D · IMU · Proprio · LiDARCOLLECTgateAGGREGATEfusionENCODE ★SIGRegz_t ∈ ℝ¹⁹² · N(0, I) · per-frame Ed25519ADR-056 Pipeline Service · ADR-057 edge intelligenceemit · 10 Hz❷ OBSERVATION WIRE · mesh.sensor.v1.*encoded · primary · 10 Hz · CBOR + Ed25519consensus · conditional · z_cluster, ẑ_{t+1}control · drift · surprise · plans (multi-pub)ExoChain-indexed · ADR-053❸ LOCAL CONSUMERS · authoritativehnsw_eml · ECC Causal Graph · CMVG forestStructureTag::LatentWorldModel · LatentHandle in metadataHYPOTHESIZEOBSERVEEVALUATEADJUSTDEMOCRITUS · 1 kHz servo · 1 ms tick (ADR-047)❹ WORLDMODELSERVICE · optional · additiveFusion Transformer · Predictor pred_φ · LatentPlannerExposes LatticeApi (ADR-052) · ServiceUnavailable ⇒ local fallbackSingle · Raft-standby · Peer-to-peer (ADR-054)CEM default · MPPI warm-start · gradient-shooting

the architecture · now · the cycle it thinks through ↓

Diagram ②

The cycle the world-model trains through

Three timescales run concurrently: 1 ms DEMOCRITUS servo tick · 10 Hz planner + predictor + HNSW insert · continuous streaming-merge checkpoints. Scroll to set the cycle speed.

HYPOTHESIZEOBSERVEEVALUATEADJUSTECC · continuousnever batched
  • HYPOTHESIZE — Causal graph proposes do(a_t) intervention
  • OBSERVE — Predictor pred_φ runs · new z_{t+1} arrives on wire
  • EVALUATE — VoE surprise · Δλ_Fiedler shift · SIGReg health update
  • ADJUST — CausalCollapseModel · edge-weight regression · predictor online step
eleven decisions · one spine

ADR-048 → ADR-058

  1. ADR-048

    JEPA as CMVG sub-layer

    Causal graph stays authoritative · latent world model publishes impulses

    01 / 11
  2. ADR-049

    Adopt candle, write the model

    Framework: candle · Model: ours · EmlBackend trait for swap

    02 / 11
  3. ADR-050

    SIGReg + isotropic-Gaussian latent contract

    Versioned · ExoChain-attested · degrade not crash

    03 / 11
  4. ADR-051

    LatentPlanner trait

    CEM default · MPPI feature-gated · per-node advertised

    04 / 11
  5. ADR-052

    LatticeApi as ServiceApi

    observe · predict · plan · recall · surprise · drift

    05 / 11
  6. ADR-053

    Observation wire protocol

    mesh.sensor.v1.* · CBOR · Ed25519 · observational-only

    06 / 11
  7. ADR-054

    WorldModelService consumer split

    Single · hot-standby · peer-to-peer · ServiceUnavailable

    07 / 11
  8. ADR-055

    Training-packet consumer contract

    Streaming merge · importance-weighted replay · 4-condition AND rollback

    08 / 11
  9. ADR-056

    Pipeline Service first-class

    In-process · separate-process · delegated-key attestation

    09 / 11
  10. ADR-057

    Edge intelligence contract

    RVF-hosted · hot-swap at tick · 30 s SIGReg rollback

    10 / 11
  11. ADR-058

    Sensor ↔ world-model decoupling invariant

    Sensor network primary · world model additive · the constitution

    11 / 11

The sensor network is a self-sufficient three-step learned pipeline whose emissions live on a SIGReg manifold so any consumer, including an optional world model, can subscribe uniformly.

ADR-058 — the constitutional invariant — is what makes every other decision on this page consistent.

Read the synthesisInspect the ADRsBrowse the workspace

weftos.weavelogic.ai · feature/lewm-worldmodel · 2026-04-22