AXM  Protocol
Genesis kernel Core hub
Chat spoke Show spoke Embodied spoke Fleet spoke SFN 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.0.0rc1
SPEC v1.0.0 (RFC 0002)
SUITE axm-hybrid1
GOLD SHARD fm21-11-hemorrhage-v2
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/SPECIFICATION.md is normative and sealed at the v1.0.0 tag. Changes require an RFC in rfcs/; a breaking change means a new major format, never a mutation of this one. Profiles and extensions add; the kernel never changes.

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

Hybrid post-quantum. One suite: axm-hybrid1 — Ed25519 ‖ ML-DSA-44 (FIPS 204), and verification succeeds only if both components verify. A future break of either algorithm, quantum or cryptanalytic, leaves the other holding.

§ 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 Tree

One construction, forever: domain-separated with RFC 6962 odd-node promotion. Leaf: BLAKE3(0x00 ‖ path ‖ 0x00 ‖ bytes). Node: BLAKE3(0x01 ‖ left ‖ right). Sorted by UTF-8 path. Empty root: BLAKE3(0x01).

Hybrid Signatures

The axm-hybrid1 suite: Ed25519 ‖ ML-DSA-44 (FIPS 204). pk = 1344 B, sig = 2484 B, and both components must verify over the domain-separated message "axm-genesis/v1/manifest" ‖ 0x00 ‖ manifest.

Canonical JSONL Tables

All graph and evidence tables are canonical JSONL — one canonical-JSON record per line, sorted bytewise by primary key, reproducible byte-for-byte in any language. Parquet is demoted to a derived, local query cache outside the shard.

Lineage + References

Supersession chains via ext/lineage@1.jsonl. Cross-shard claim links via ext/references@1.jsonl, binding to derived sh1_ shard identities. Both are Merkle-covered extension tables — optional, additive, and verifiable.

Content-Addressed IDs

Every entity, claim, provenance row, and span is named by the full SHA-256 of its canonical preimage — base32, 52 chars, versioned prefixes e1_ c1_ p1_ s1_. Shard identity is sh1_ + BLAKE3 of the manifest bytes, derived, never stored.

Profiles

Named, versioned check-sets over content/ and ext/ — e.g. embodied@1 for hot-stream continuity. Declared in the signed manifest; verifiers report them checked or unchecked, and unchecked never impersonates passed.

§ 03

Shard Format

<shard>/ ← identity: sh1_ + BLAKE3(manifest)
  manifest.json ← merkle root + suite
  sig/
    manifest.sig ← Ed25519 ‖ ML-DSA-44 (2484 B)
    publisher.pub ← hybrid key (1344 B)
  content/
    source.txt ← byte-addressable
  graph/
    entities.jsonl
    claims.jsonl
    provenance.jsonl
  evidence/
    spans.jsonl
  ext/ ← optional, Merkle-covered
    lineage@1.jsonl
    references@1.jsonl
    locators@1.jsonl
    temporal@1.jsonl

Gold Shard

The reference shard fm21-11-hemorrhage-v2, extracted from FM 21-11 (US Army first aid field manual) and minted under axm-hybrid1, 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, suite (required: axm-hybrid1), metadata, publisher, license.spdx, sources (a bijection with content/, each file with its SHA-256), integrity.merkle_root, statistics — a closed key set, byte-exact canonical JSON. There is no shard_id field: identity is derived from the manifest hash.

Claims Schema (Frozen)

claim_id · subject · predicate · object · object_type · tier. All identifiers are stable and content-addressed, derived from canonical UTF-8 NFC-normalized inputs; evidence links live in the provenance and spans tables.

Evidence Byte Offsets

Every claim traces to exact bytes in content. spans.jsonl 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>.<suffix> — any format; AXM-defined extensions use canonical JSONL. The @<version> suffix is part of the name. The kernel treats ext/ as opaque — extensions never affect core verification.

Profiles — e.g. embodied@1

Domain checks live outside the kernel. Shards declare "profiles": ["embodied@1"] in the signed manifest; that profile enforces a gap-free AXLF/AXLR frame sequence in content/cam_latents.bin (E_BUFFER_DISCONTINUITY). Verifiers report unimplemented profiles as unchecked — never as passed.

§ 04

Cryptographic Suites

One suite (RFC 0002). The suite field in manifest.json is required and must equal axm-hybrid1; there is no suite negotiation and no detection by key size.

Suite Identifier Algorithm Key Signature Merkle Status
axm-hybrid1 Ed25519 ‖ ML-DSA-44 (FIPS 204) — both must verify 1344 B 2484 B RFC 6962 odd-node promotion Hybrid PQ Only suite

Domain Separation (axm-hybrid1)

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
Msg   = "axm-genesis/v1/manifest"0x00 ‖ manifest_bytes ← both components sign this
§ 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 + Full Schema

manifest.json is read once — the same bytes are used for signature verification and identity to prevent TOCTOU swaps. Byte-exact canonical encoding, every required field validated (spec_version, suite, created_at format, sources bijection, statistics), closed key set, no shard_id.

3

Trusted Key Anchor + Hybrid Signature

Requires --trusted-key. The shard's publisher.pub must match the trusted key exactly. Then both hybrid components — Ed25519 and ML-DSA-44 — must verify over the domain-separated message.

4

Merkle Root Computation

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

5

Core Table Validation (JSONL)

Each line of entities, claims, provenance, and spans must be canonical JSON with the exact frozen key set and types; rows sorted bytewise by primary key, no duplicates, no nulls, no floats. Entity and claim IDs are recomputed from their preimages.

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

Profiles

Every profile the manifest declares and the verifier implements is run (e.g. embodied@1E_BUFFER_DISCONTINUITY); the rest are reported in profiles_unchecked. Unchecked is not passed.

§ 07

AXM Compatibility Requirements

Spokes that produce shards must satisfy the four kernel requirements; domain checks (the former REQ 5) live in profiles. Run the conformance suite with pytest tests/test_conformance.py -v.

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 Traceable lineage — all references valid, no nulls in required fields E_REF_ORPHAN
E_SCHEMA_NULL
REQ 4 Proof bundle — valid hybrid signature from a trusted publisher key E_SIG_INVALID
E_SIG_MISSING
embodied@1 Non-selective recording — a profile, not a kernel requirement: no gaps in the binary hot stream, for shards declaring it 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_INVALIDEither hybrid component fails to verify, trusted-key mismatch, or wrong key/signature length
Integrity
E_MERKLE_MISMATCHComputed Merkle root does not match stored value in manifest
Core tables
E_SCHEMA_READTable unreadable, malformed or non-canonical JSON line, rows out of order, or duplicate primary key
E_SCHEMA_MISSINGRequired core table (.jsonl) absent
E_SCHEMA_TYPEUnexpected key in a record, or a value of the wrong JSON type
E_SCHEMA_NULLRequired field missing from a record, or null
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
Profile: embodied@1
E_BUFFER_DISCONTINUITYFrame gap, bad magic, or truncation in cam_latents.bin (profile code — shards declaring embodied@1 only)
§ 09

Quick Start

Install + Verify Gold Shard bash
$ pip install -e ".[dev]"
 
# Verify the gold shard against its publisher key
$ axm-verify shard shards/gold/fm21-11-hemorrhage-v2/ \
    --trusted-key keys/gold-v2-provisional.pub
{"shard":"...","status":"PASS","error_count":0,"errors":[],
 "profiles_checked":[],"profiles_unchecked":[]}
 
# Run the conformance suite
$ python -m pytest tests/test_conformance.py -v
test_baseline_gold_shard_passes ................... PASSED
test_req1_manifest_byte_flip_detected ............. PASSED
 
# Generate a hybrid keypair, then build a shard
$ axm-build keygen keys-out/ --name me
$ axm-build compile candidates.jsonl content/ out/my-shard/ \
    --private-key keys-out/me.key
Reimplementation Requirements any language
# Canonical UTF-8 (NFC normalization)
# Canonical JSON / JSONL (sorted keys, no whitespace)
# BLAKE3 for Merkle tree + shard identity, SHA-256 for content + IDs
# Ed25519 + ML-DSA-44 hybrid signatures (both must verify)
# No Parquet, no Arrow, no database — plain text primitives
 
# Correctness is defined by the gold shard.
# A reimplementation that accepts it and rejects the
# invalid test vectors is conformant.