AXM  Protocol
Genesis kernel Core hub
Chat spoke Show spoke Embodied spoke Fleet spoke SFN spoke
AXM Ecosystem  ·  Robotics Spoke  ·  v2.0.0

Embodied.No Gaps.
No Exceptions.
No Motion Without Proof.

axm-embodied is two layers on one kernel. Flash Freeze: a forensic flight recorder that seals what a robot perceived, predicted, and chose into a Genesis shard. The Shadow Runtime: enforcement of a signed safety envelope, in the loop — it arms only under governance-trusted, verifier-clean bounds, kills motors the instant physics leaves the envelope, and seals the incident into a shard that cryptographically cites the exact law it broke.

Format
AXLF / AXLR / AXRR
Profile
embodied@1
On Gap
E_BUFFER_DISCONTINUITY
On Breach
ESTOP + Flash Freeze
§01

Why Non-Selective Recording

An embodied system that selects which sensor frames to record is not trustworthy. The value of a verifiable record depends entirely on its completeness. A record that contains only the moments the system chose to preserve is worthless as evidence.

Robots today produce narrative logs. Narrative can lie: a robot can log I stopped while physically accelerating. axm-embodied records the physics (Actus Reus) and the model's choices (Mens Rea) side by side, then seals both — and beyond the recorder, it acts on the sealed law in real time.

Rule I

Record everything, then seal. The hot stream appends one AXLR frame per sensor tick, fsync'd before the frame is acknowledged. The cold stream holds a pre-window ring buffer that hits disk only when a Tier-1 trigger fires. The compiler seals both into a Genesis shard. Nothing is selected.

Rule II

A gap is a failure, not an omission. E_BUFFER_DISCONTINUITY is not a warning. It is a hard verification failure — the same exit code as a bad cryptographic signature. A missing frame means deliberate deletion or unrecovered corruption. The profile does not accommodate either.

Rule III

Disk is truth. StrictJudge scans the binary artifacts directly. It does not trust the event log's offsets: if the log says a record exists at a given offset and the binary disagrees, the binary wins and the compile dies. Verification is offline, deterministic, stateless — no vendor code, no runtime access.

Rule IV

No proof, no motion. The Shadow Runtime arms only under an envelope that verifies against a key enrolled in the robot's own governance directory. An action class with no signed bound is forbidden motion, not a free pass. Non-finite sensor values can never be "in bounds". Unsigned law never moves a motor.

§02

The Loop — Beyond the Flight Recorder

The flight recorder proves what happened after the fact. The Shadow Runtime acts on the proof while it still matters. The two share one chain of custody: every incident shard cites, by derived shard id, the exact signed envelope that was in force at the moment the motors died.

┌─ DRONE SCHOOL ────────────────────────────┐
  safe training capsules ← gap-free recordings
    │ axm-bounds: p99 L∞ × 1.1 margin
    
  bounds shard ← signed law (Tier 0)
└───────────────────────────────────────────┘
    │ axm-runtime enroll (governance)
    
┌─ ARMED FLIGHT ────────────────────────────┐
  Law Gate clearance ← verify + trust store
  per-frame guard ← latent L∞ vs signed bound
└───────────────────────────────────────────┘
    │ physics leaves the envelope
    
┌─ BREACH ──────────────────────────────────┐
  ESTOP ← motors killed on the breach frame
  Flash Freeze ← residual pre-window → disk
  incident shard ← cites the envelope id
└───────────────────────────────────────────┘
The envelope is compiled, not configured

axm-bounds ingests cryptographically identified safe capsules, takes the 99th-percentile latent L∞ per action class, applies a 1.1× margin, and emits Tier-0 claims in a signed shard. The training manifest names every ingested capsule by SHA-256 — the provenance chain reaches the raw training bytes. Not a hand-tweaked YAML file.

The breach is sinister by design

In the demo fault, the physics spike while the VLA confidently keeps selecting maintain_speed. The narrative log alone says everything is fine. The Shadow Runtime reads the physics, not the narrative — and the sealed record shows both: the breach frame's latents AND the model's oblivious confidence distribution, one line apart.

Citation closes the chain of custody

The incident shard's ext/references@1.jsonl carries relation_type: cites → sh1_<envelope> on the breach claim. Training capsules → signed envelope → armed flight → sealed incident: every link verifiable offline, no link deniable after the fact.

Exit codes are the API

axm-runtime fly returns 0 for a clean flight (cold stream stays at zero bytes), 3 for a breach (incident sealed, evidence on disk), 1 when the Law Gate refuses to arm. A tampered envelope never flies; a corrupted incident never verifies.

§03

One Incident, Two Stories — Only One Survives Verification

This is a real mission from this repo's simulator, run through the real Shadow Runtime: 100 frames, wheel slip injected at frame 50. Every number below — shard ids, bounds, latent norms, the timestamp — came out of the actual toolchain, and the incident shard verifies with axm-verify today. Toggle between what the robot's narrative log claims and what the sealed disk proves.

FRAME TABLE — BREACH WINDOW (44–56)
frameeventVLA actionconflatent L∞boundverdict

WHAT THE DEFENSE READS FROM THE SAME SHARD

"The operator complied with signed Tier-0 law. The envelope was compiled from three cryptographically identified training runs and enrolled through governance. The runtime detected the excursion on the frame it occurred and killed actuation in that same frame. Recording never stopped."

Due diligence is not asserted — it is the verifier's exit code.

WHAT THE PLAINTIFF READS FROM THE SAME SHARD

"At the moment physics exceeded the certified envelope by 18×, the vision-language model was selecting maintain_speed at 77% confidence. The machine did not know it was failing. Here is the frame, the norm, the bound, and the model's own distribution."

Mens Rea, sealed one line after the Actus Reus.

§04

Shard Format

The embodied shard is structurally identical to every other AXM v1 shard. Same manifest.json. Same canonical JSONL core tables. Same Merkle tree. Same axm-hybrid1 signature (Ed25519 + ML-DSA-44 — both must verify). The embodied-specific additions are the binary streams in content/ and the stream index in ext/.

shard/ ← id derived: sh1_ + BLAKE3(manifest)
  manifest.json ← merkle root, suite, profiles
  sig/
    manifest.sig ← axm-hybrid1, 2484 B
    publisher.pub ← 1344 B
  content/
    source.txt ← events.jsonl, byte-authoritative
    cam_latents.bin ← hot stream, embodied@1 applies
    cam_residuals.bin ← cold stream, if Flash Freeze fired
  graph/
    entities.jsonl ← canonical JSONL
    claims.jsonl
    provenance.jsonl
  evidence/
    spans.jsonl
  ext/ ← opaque to kernel, Merkle-covered
    streams@1.jsonl ← StrictJudge byte index
    references@1.jsonl ← incident → envelope citation
manifest.json — same as all spokes

spec_version, suite, metadata, publisher, license, sources, integrity.merkle_root, statistics, profiles. The sources array is a bijection with content/: every binary stream's SHA-256 is declared, and every content file is a Merkle leaf. There is no shard_id field — identity is derived from the manifest bytes, never stored.

source.txt — the event log is the source document

Newline-delimited JSON: one record per frame with selected_action, the full VLA action_distribution (Mens Rea), and advisory stream offsets. Every claim in graph/ cites an exact byte span of this document; the spans are re-checked by the verifier.

cam_latents.bin — hot stream (profile embodied@1)

AXLF file magic, then back-to-back AXLR records in frame_id order: gap-free, monotone, no padding, fsync'd at write time. Any missing frame triggers E_BUFFER_DISCONTINUITY. Sealed as a raw-bytes Merkle leaf and listed in sources.

ext/streams@1.jsonl — StrictJudge's testimony

One row per verified stream record: byte offset, length, status, SHA-256 of the payload. Latents are asserted by strict offset math; residuals are discovered by scanning the cold stream, never trusted from the log. Canonical JSONL sorted by (stream, frame_id, offset).

§05

AXLF / AXLR / AXRR Binary Format

cam_latents.bin is a simple binary container: a 4-byte AXLF file magic, then a sequence of AXLR records in frame_id ascending order. No index. No random access. Scanned linearly by the verifier. cam_residuals.bin uses the same 13-byte header with AXRR magic and variable payloads, no file header. The layout is frozen in the kernel's profile document spec/profiles/embodied@1.md.

File Header (once, offset 0)
0x00–0x03 AXLF magic 4 bytes — that's the whole header
0x04–… records record fid starts at 4 + fid × 269
REC_HEADER_FMT = "<4sBII"  ·  REC_HEADER_LEN = 13  ·  LATENT_DIM = 256  ·  LATENT_REC_LEN = 269
AXLR Record (per frame)
+0x00–0x03 AXLR magic 4 bytes (AXRR for residuals)
+0x04 version uint8 = 1
+0x05–0x08 frame_id uint32 LE 0,1,2,… no gaps
+0x09–0x0C payload_len uint32 LE 256 for latents
+0x0D–… payload 64 × float32 latent vector
axm_embodied/recorder.py — the recorder in a control loop
from axm_embodied.recorder import CapsuleRecorder
from axm_embodied.gate import LawGate
from axm_embodied.runtime import ShadowRuntime

# No proof, no motion: arming requires a governance clearance.
clearance = LawGate("governance/").authorize("bounds_shard/")
recorder  = CapsuleRecorder("flight/", robot_id="unit-7")
runtime   = ShadowRuntime(clearance, recorder)

for frame in sensor_loop():                    # your perception stack
    decision = runtime.guard(
        frame.latents,                          # 256 bytes, fsync'd
        frame.selected_action,                  # what the VLA chose
        frame.action_distribution,              # Mens Rea, every frame
        residual=frame.residual,                # cold-stream ring buffer
    )
    if not decision.permitted:
        motors.kill()                           # ESTOP — recording continues

# Breach? Seal the incident shard citing the envelope's sh1_ id.
incident = runtime.seal(shard_out="incident/", secret_key=key)
§06

Profile embodied@1 — Non-Selective Recording

What began as this spoke's private REQ 5 is now a frozen kernel profile. A shard declares "embodied@1" in its manifest profiles array — covered by the signature — and every conforming verifier must run the hot-stream continuity check and report it in profiles_checked. Unchecked ≠ passed. Document shards without cam_latents.bin pass vacuously; the profile fires only when the file is present.

E_BUFFER_DISCONTINUITY
Frame gap, bad magic, or truncation in cam_latents.bin

Triggered when: (1) the AXLF file magic is absent or wrong, (2) any record has magic or version mismatch, (3) any frame_id skips, repeats, or reorders, (4) the file truncates mid-header or mid-payload, (5) the stream cannot be read or exceeds the verifier's resource limit (cannot-verify is a failure, not a pass). All conditions produce the same profile error code and the same outcome: FAIL, exit 1 — identical in weight to a bad signature.

axm-genesis · src/axm_verify/profiles/embodied_v1.py — the kernel check
# spec/profiles/embodied@1.md §6 — the entire normative check set
expected_fid = 0
with latents_path.open("rb") as f:
    if f.read(4) != b"AXLF":
        return _err(errors, "invalid file magic")
    while True:
        header = f.read(13)
        if len(header) == 0: break       # clean EOF — check passes
        magic, ver, fid, dlen = struct.unpack("<4sBII", header)
        if magic != b"AXLR" or ver != 1:
            return _err(errors, "bad record magic/version")
        if fid != expected_fid:
            return _err(errors, f"frame gap: expected {expected_fid}")
        f.read(dlen)                        # truncated payload → error
        expected_fid += 1
tests/test_flight_recorder.py — spoliation dies in daylight
def test_frame_gap_fails_profile_verification(tmp_path, robot_keys):
    """Cutting a frame out of the hot stream is spoliation: the sealed
    shard can never pass the embodied@1 continuity check."""
    cap = record_mission(tmp_path, fault_at=25)
    compile_capsule(cap, out, key)

    # Excise frame 10's record from the SEALED shard's hot stream
    raw = bytearray(sealed.read_bytes())
    del raw[start:start + LATENT_REC_LEN]
    sealed.write_bytes(bytes(raw))

    result = verify_shard(out, trusted_key_path=pub)
    assert result["status"] == "FAIL"

PASSED · test_frame_gap_fails_profile_verification
PASSED · test_corrupted_latents_kill_the_compile
PASSED · test_safe_run_keeps_cold_stream_empty
§07

Law Gate — Governance-Aware Arming

The gate answers one question: is this robot allowed to move under this envelope? Trust is decided by the robot's own governance directory, never by the shard. The shard's publisher.pub only names a publisher; verifying a shard against its own embedded key would merely prove the shard agrees with itself.

governance/
  trust_store.json ← sha256 fingerprints, ships EMPTY
  local_policy.json ← {"max_actuation_tier": 0}
  trusted_keys/
    drone_school.pub ← enrolled anchor, 1344 B
Enrollment is deliberate, twofold, auditable

A key is an anchor only when the .pub file exists in trusted_keys/ AND its SHA-256 fingerprint is listed in trust_store.json. Dropping a file into the directory is not enrollment. An empty trust store means the robot cannot arm at all — there is no default trusted publisher, exactly as there is no default signing key.

Tier policy bounds what law may actuate

Envelope constraints are Tier-0 claims: formal invariants derived from identified training runs. local_policy.json's max_actuation_tier caps the tier the robot may move under; advisory claims can never arm motors on a Tier-0 policy.

Every refusal is specific

Unenrolled publisher fingerprint. Merkle mismatch after a one-byte tamper. A widened bound re-signed by the wrong key. Constraint tier above policy. Each produces a distinct GateError before a single frame is guarded — and the runtime without a Clearance object cannot be constructed at all.

§08

Verification Pipeline

axm-verify (from the axm-genesis kernel) runs its frozen stage sequence; the embodied@1 profile check runs whenever the manifest declares it. A failure at any stage returns exit 1; a malformed shard returns exit 2. The machine-readable JSON result always lists profiles_checked and profiles_unchecked — unchecked is never passed.

Stage Name Pass Condition Error Code Scope
01 Layout Closed root item set; no symlinks, no dotfiles anywhere E_LAYOUT_MISSING
E_LAYOUT_DIRTY
Kernel
02 Manifest Canonical JSON, closed key set, no shard_id field E_MANIFEST_SCHEMA Kernel
03 Hybrid Signature publisher.pub == trusted key; Ed25519 AND ML-DSA-44 both verify E_SIG_INVALID Kernel
04 Sources Bijection sources ↔ content/ exactly; every SHA-256 matches (binary streams included) E_MANIFEST_SCHEMA
E_REF_READ
Kernel
05 Merkle Root Domain-separated BLAKE3 root == manifest.integrity.merkle_root E_MERKLE_MISMATCH Kernel
06 Core Tables Canonical JSONL, exact schemas, bytewise sort, identities recompute E_TABLE_ENCODING
E_ID_MISMATCH
Kernel
07 References Every claim's evidence span resolves to exact source bytes E_REF_ORPHAN
E_REF_SOURCE
Kernel
08 Profile embodied@1 cam_latents.bin absent OR AXLF valid AND all frame_ids gap-free E_BUFFER_DISCONTINUITY Embodied
§09

Quick Start — Close the Loop

Install + Keys
pip install -e .   # pulls the axm-genesis kernel

# No default keys. Ever.
axm-build keygen keys --name drone_school
axm-build keygen keys --name robot_unit7
School + Envelope
# Record safe training missions
axm-runtime record-training training/ --runs 3

# Compile the signed safety envelope
axm-bounds training/ bounds_shard/ \
  --key keys/drone_school.key

# Enroll the publisher in the robot's governance
axm-runtime enroll keys/drone_school.pub \
  --governance governance/
Fly
# Clean mission: exit 0, cold stream stays empty
axm-runtime fly bounds_shard/ flight/ \
  --governance governance/

# Physics excursion: ESTOP + Flash Freeze, exit 3
axm-runtime fly bounds_shard/ flight/ \
  --governance governance/ --inject-fault \
  --key keys/robot_unit7.key

ESTOP at frame 50: latent L∞ 15.85 exceeds bound 0.88
incident shard cites envelope sh1_e9f2f7d1…
Verify + Demo
# Anyone, offline, no vendor code:
axm-verify shard flight/incident-shard \
  --trusted-key keys/robot_unit7.pub
{"status":"PASS","profiles_checked":["embodied@1"]}

# The whole story + two tamper tests:
./scripts/board_demo.sh
ALL STEPS PASSED — the loop is closed