AXM  Protocol
Genesis kernel Core hub
Chat spoke Show spoke Embodied spoke
AXM Ecosystem · Kernel Layer

AXM Genesis

The immutable cryptographic foundation. Every shard sealed. Every claim provable. Nothing changes here without a frozen-spec RFC.

VERSION 1.2.0
SPEC v1.0.0 FROZEN
SUITE axm-blake3-mldsa44
GOLD SHARD fm21-11-hemorrhage-v1
LICENSE Apache-2.0
§ 01

What Genesis Is

Genesis is the only package in the AXM ecosystem with write access to the signed shard format. Everything else reads. This boundary is the invariant that makes long-term verification possible.

Tamper-evident by construction. Every byte in a shard is covered by a BLAKE3 Merkle tree. The root is signed post-quantum. Tamper any byte — content, graph, evidence, or extension — and verification fails. There is no escape hatch.

The spec is frozen. spec/v1.0/SPECIFICATION.md is normative and sealed. Changes require an RFC in rfcs/, a new spec version, and a migration path. Minor versions add; they never remove.

The gold shard is the definition of correctness. fm21-11-hemorrhage-v1 is never recompiled. A verifier change that breaks the gold shard is rejected — the gold shard wins. CI enforces this on every commit.

Post-quantum by default. New shards use ML-DSA-44 (FIPS 204). Ed25519 shards remain valid indefinitely — backward compatibility is a hard requirement. Cryptographic agility is handled through suite identifiers, not protocol breaks.

§ 02

Frozen Primitives

Six cryptographic and structural primitives are frozen across all axm-genesis >= 1.x releases. A spoke built against any of these will continue to work without modification.

BLAKE3 Merkle Trees

Two constructions: legacy duplicate-odd-leaf (Ed25519) and domain-separated RFC 6962 odd-leaf promotion (ML-DSA-44). Leaf: BLAKE3(0x00 ‖ path ‖ 0x00 ‖ bytes). Node: BLAKE3(0x01 ‖ left ‖ right). Sorted by UTF-8 path.

ML-DSA-44 Signatures

FIPS 204 post-quantum signature (Dilithium2). Deterministic: same key and message always produce the same signature. pk=1312 B, sig=2420 B. Identified by suite field axm-blake3-mldsa44 in manifest.

Parquet + DuckDB

All graph, evidence, and extension tables are Apache Parquet with explicit Arrow schemas. Deterministically written — sorted, compressed with zstd. DuckDB queries extensions at query time with no central registry.

Lineage + References

Supersession chains via ext/lineage@1.parquet. Cross-shard claim links via ext/references@1.parquet. Both are Merkle-covered extension tables — optional, additive, and verifiable.

Episodic Index

Universal base pass produced by axm-chat distill: topic tags, named people, tools, project references, question text, resolution state, tone — written to ext/episodes@1.parquet. DuckDB-queryable without an LLM.

Engineering Lens

Gated second pass for technical conversations. Extracts problem statement, graveyard of failed attempts, working solution, and architectural rules — written to ext/engineering@1.parquet.

§ 03

Shard Format

shard_blake3_<merkle_root>/
  manifest.json ← merkle root + suite
  sig/
    manifest.sig ← ML-DSA-44 or Ed25519
    publisher.pub
  content/
    source.txt ← byte-addressable
  graph/
    entities.parquet
    claims.parquet
    provenance.parquet
  evidence/
    spans.parquet
  ext/ ← optional, Merkle-covered
    episodes@1.parquet
    engineering@1.parquet
    lineage@1.parquet
    references@1.parquet
    temporal@1.parquet

Gold Shard

The reference shard fm21-11-hemorrhage-v1, extracted from FM 21-11 (US Army first aid field manual), is the definition of correctness. Any verifier that accepts it and rejects all invalid test vectors in tests/vectors/shards/invalid/ is conformant.

Manifest Fields (Frozen)

spec_version, shard_id, metadata, publisher, sources (with SHA-256 content hashes), integrity.merkle_root, statistics, and optional suite. Field names and types are frozen. New optional fields may be added in minor versions.

Claims Schema (Frozen)

claim_id · subject · predicate · object · object_type · tier · confidence · speaker · source_span_id. All values are stable, content-addressed identifiers derived from canonical UTF-8 NFC-normalized inputs.

Evidence Byte Offsets

Every claim traces to exact bytes in content. spans.parquet records byte_start, byte_end, and text. Verification confirms content_bytes[start:end].decode("utf-8") == text for each span.

Extension Naming

Extensions follow the convention ext/<name>@<version>.parquet. The @<version> suffix is part of the name. Old verifiers treat ext/ as opaque — extensions never affect core verification.

REQ 5 — Non-Selective Recording

Embodied spokes maintaining content/cam_latents.bin must preserve a gap-free AXLF/AXLR binary frame sequence. Any gap triggers E_BUFFER_DISCONTINUITY. Document shards pass silently.

§ 04

Cryptographic Suites

Suite-aware since v1.1.0 (RFC 0001). The suite field in manifest.json selects the signing algorithm and Merkle construction. Absent means Ed25519 legacy.

Suite Identifier Algorithm Key Signature Merkle Status
(absent) or ed25519 Ed25519 32 B 64 B Duplicate odd-leaf Stable
axm-blake3-mldsa44 ML-DSA-44 (FIPS 204) 1312 B 2420 B RFC 6962 odd-leaf promotion Post-Quantum Default

Domain Separation (axm-blake3-mldsa44)

Leaf  = BLAKE3( 0x00 ‖ relpath ‖ 0x00 ‖ file_bytes )
Node  = BLAKE3( 0x01 ‖ left ‖ right )
Odd   = promote unchanged — no duplication (RFC 6962, CVE-2012-2459 safe)
Empty = BLAKE3( 0x01 ) = 48fc721f... ← frozen constant
§ 05

Three-Layer Architecture

All three layers use the same Genesis container format. The distinction is semantic — enforced by convention, not by protocol. Genesis seals layers 1 and 2. It never touches layer 3.

§ 06

Verification Pipeline

The reference verifier axm-verify runs seven checks in sequence. A failure at any step halts the pipeline. Exit 0 = PASS, Exit 1 = FAIL, Exit 2 = malformed layout.

1

Layout Validation

Required root items: manifest.json, sig/, content/, graph/, evidence/. Optional: ext/. Unexpected items trigger E_LAYOUT_DIRTY. Symlinks, dotfiles rejected unconditionally.

2

Manifest Parse + Schema

manifest.json is read once — the same bytes are used for both Merkle verification and signature verification to prevent TOCTOU swaps. Bounded by 256 KiB limit.

3

Trusted Key Anchor + Signature

Requires --trusted-key. The shard's publisher.pub must match the trusted key exactly. Then the manifest signature is verified against that key using the suite-appropriate algorithm.

4

Merkle Root Computation

All shard files except manifest.json and sig/ are hashed using the suite-specific Merkle construction. Computed root must match manifest.integrity.merkle_root exactly.

5

Parquet Schema Validation

Column names, types, and counts for entities, claims, provenance, and spans are checked against frozen Arrow schemas. Row counts bounded by policy limit. Null values in required columns fail.

6

Reference + Byte-Range Integrity

Every claim subject and entity-type object must exist in entities. Every provenance and span must reference a content file whose SHA-256 is in sources. Byte ranges are validated and span text is confirmed against file bytes.

7

Hot Stream Continuity (REQ 5)

If content/cam_latents.bin is present: file magic AXLF verified, then AXLR records scanned for gap-free monotone frame_id sequence. Any gap emits E_BUFFER_DISCONTINUITY. Absent = silent pass.

§ 07

AXM Compatibility Requirements

Spokes that produce shards must satisfy all five requirements. Run the conformance suite with pytest tests/test_conformance.py -v — all 13 tests must pass.

REQDescriptionError Codes
REQ 1 Manifest integrity — byte-exact signature over the manifest E_SIG_INVALID
E_MERKLE_MISMATCH
REQ 2 Content identity — all content files covered by Merkle tree E_MERKLE_MISMATCH
E_REF_SOURCE
REQ 3 Lineage events — all references valid, no nulls in required columns E_REF_ORPHAN
E_SCHEMA_NULL
REQ 4 Proof bundle — valid signature from a trusted publisher key E_SIG_INVALID
E_SIG_MISSING
REQ 5 Non-selective recording — no gaps in binary hot stream (embodied spokes) E_BUFFER_DISCONTINUITY
§ 08

Error Codes

All error codes are prefixed E_ and defined in axm_verify/const.py. Existing codes are never renamed or removed — only new codes are added in minor versions.

CodeMeaning
Layout
E_LAYOUT_MISSINGRequired directory or file absent from shard root
E_LAYOUT_DIRTYUnexpected file or directory found at shard root or in required subdirectory
E_DOTFILEDotfile found anywhere in the shard tree
Manifest
E_MANIFEST_SYNTAXmanifest.json is not valid JSON
E_MANIFEST_SCHEMAmanifest.json missing required field or field has wrong type
Signature
E_SIG_MISSINGsig/manifest.sig or sig/publisher.pub not found
E_SIG_INVALIDSignature does not verify, key mismatch, or wrong key size for suite
Integrity
E_MERKLE_MISMATCHComputed Merkle root does not match stored value in manifest
Schema
E_SCHEMA_READParquet file unreadable or exceeds size / row-count limit
E_SCHEMA_MISSINGRequired Parquet file absent
E_SCHEMA_TYPEWrong column name, type, or count in a required table
E_SCHEMA_NULLNull value found in a required column
E_SCHEMA_ENUMInvalid object_type or tier value
Identity
E_ID_ENTITYentity_id does not match recomputed hash from namespace + label
E_ID_CLAIMclaim_id does not match recomputed hash from subject + predicate + object
References
E_REF_ORPHANClaim subject or entity-type object not found in entities table
E_REF_SOURCEspan or provenance source_hash not in content/, or byte range out of bounds
E_REF_READContent file unreadable during span byte-range verification
Stream Continuity (REQ 5)
E_BUFFER_DISCONTINUITYFrame gap, bad magic, or truncation in cam_latents.bin (embodied spokes only)
§ 09

Quick Start

Install + Verify Gold Shard bash
$ pip install -e ".[dev]"
 
# Verify the gold shard against the canonical test key
$ axm-verify shard shards/gold/fm21-11-hemorrhage-v1/ \
    --trusted-key keys/canonical_test_publisher.pub
{"shard":"...","status":"PASS","error_count":0,"errors":[]}
 
# Run the full conformance suite (13 tests)
$ python -m pytest tests/test_conformance.py -v
test_baseline_gold_shard_passes ................... PASSED
test_req1_manifest_byte_flip_detected ............. PASSED
test_req5_buffer_gap_detected ..................... PASSED
13 passed in 0.84s
 
# Build a new shard from candidates.jsonl + source
$ axm-build compile candidates.jsonl content/ out/my-shard/ \
    --suite axm-blake3-mldsa44 --private-key keys/my.sk
Reimplementation Requirements any language
# Canonical UTF-8 (NFC normalization)
# Deterministic JSON (sorted keys, no whitespace)
# BLAKE3 for Merkle hashing, SHA-256 for content hashing
# Ed25519 or ML-DSA-44 for signatures
# Parquet with explicit schemas + deterministic row ordering
 
# Correctness is defined by the gold shard.
# A reimplementation that accepts it and rejects the
# invalid test vectors is conformant.