HATS Record v1
Related · tier-1 reading. For the evidence chain that supports the claim, see Claims Evidence.
The canonical specification binding the H33 cryptographic stack into a single deterministically verifiable artifact. Eight layers from the H33-74 substrate up through tenant and spine binding.
Contents
- Abstract
- Goals and non-goals
- Terminology
- Layered architecture
- Layer 0 — H33-74 substrate
- Layer 1 — Upstream cryptographic engine
- Layer 2 — Q-Sign / Agent-Zero / CIP orchestration
- Layer 3 — HATS record
- Layer 4 — Replay bundle
- Layer 5 — Signed verification report
- Layer 6 — Chain anchor
- Layer 7 — Tenant and spine binding
- Cross-cutting elements
- Canonical encoding and hash discipline
- PQ signature envelope
- Verification protocol
- Replay protocol
- Verifier identity binding
- Regulatory mapping
- Conformance corpus
- Boundary discipline (public vs. proprietary)
- Security considerations
- Privacy considerations
- Reference implementations
- Patent linkage
- Versioning and change control
- Appendix A — Example HATS record
- Appendix B — Example signed verification report
- Appendix C — Regulatory crosswalk index
§1Abstract
This specification defines HATS Record v1, the canonical artifact produced by an implementation of the H33 AI Trust Standard. A HATS record is a deterministically verifiable, post-quantum signed envelope that binds eight layers of the H33 cryptographic stack — from the 74-byte substrate primitive at the base, through upstream cryptographic engines and orchestration patents, to chain anchors and tenant bindings at the top — into a single artifact that any independent verifier can replay years later without trusting the issuer.
The record is chain-portable, engine-portable, and vendor-portable. It is signed under three independent post-quantum signature families. It can be anchored to multiple chains simultaneously. It can be replayed deterministically against a published canonical replay frame. Its verification answer is identical across any conformant implementation.
This document is normative for HATS implementations and is the authoritative source for the layer schemas, encoding rules, and verification protocol referenced elsewhere in the H33 documentation set.
§2Goals and non-goals
Goals
- Bind the full H33 stack into a single artifact whose verification answer is deterministic across independent implementations.
- Survive chain migrations, vendor changes, operator failure, and future cryptographic engine changes without re-issuance.
- Enable an auditor, regulator, or counterparty to verify the record using only the published specification and the open-source verifier — no trust in H33, no dependence on H33 infrastructure, no requirement that the original issuer remain online.
- Provide post-quantum verification guarantees against current and future cryptanalytic developments by using three independent NIST-standardized signature families in parallel.
- Maintain a clear public/proprietary boundary: verification artifacts and protocols are public; signing pipelines and computation engines may remain proprietary.
Non-goals
- This specification does not define the upstream cryptographic engines themselves (STARK, FHE, ZK-SNARK, biometric fusion). It defines how their outputs are bound into the record.
- This specification does not mandate a particular chain or set of chains for anchoring. Anchor presence is optional and pluralistic.
- This specification does not standardize the production-side signing pipeline. Implementations may sign through any path that produces a conformant envelope.
- This specification does not define record completeness semantics. A conformant verification of a HATS record asserts that the record is bit-identical to what was signed at issuance; it does not assert that the record represents every event the underlying case ever had.
§3Terminology
- HATS record
- The canonical artifact defined by this specification. The full eight-layer envelope.
- Substrate
- The 74-byte post-quantum signed receipt at the base of the stack. Layer 0.
- Upstream engine
- Any cryptographic engine that produces an output bound into the substrate. STARK, BFV/CKKS FHE, ML-DSA signing pipelines, biometric fusion, and conformance vector emitters are all upstream engines.
- Canonical replay frame
- The deterministic structure against which any independent verifier evaluates a record. The canonical replay frame is published as part of this specification and is the basis for verifier equivalence.
- Independent verifier implementation
- Any implementation of the verification protocol defined in §16 that produces the same per-check verdicts as the reference implementation on every record in the immutable conformance corpus.
- Structured rejection semantics
- Every verification outcome is typed. A PASS or FAIL is accompanied by a structured per-check verdict array. There are no untyped failures.
- Replay-grade attestation
- An attestation whose verification can be reproduced deterministically by an independent verifier at any future time using only the published artifact, the published specification, and the open-source verifier.
- Deterministic conformance verification
- The property that, given the same record and the same conformance vector, every independent verifier implementation produces the same per-check verdict.
- Three-family PQ signature envelope
- The signature wrapper used at every layer of the stack. Composed of an ML-DSA-65 signature, a FALCON-512 signature, and an SLH-DSA-128f signature, all over the same canonical payload.
- Conformance corpus
- The immutable set of canonical records and expected verdicts against which conformant implementations are validated.
- Boundary
- The public-versus-proprietary delineation defined in §21. The verification side of the protocol is fully public; the computation side may be proprietary.
Throughout this specification, the key words MUST, MUST NOT, SHOULD, and MAY are used per RFC 2119 semantics.
§4Layered architecture
A HATS record is composed of eight conceptual layers. Layers 0 through 2 are foundational and apply to every H33 artifact. Layer 3 is the HATS-specific envelope. Layers 4 through 7 are the operational, verification, and binding wrappers that turn a record into something a third party can replay.
| Layer | Name | Purpose |
|---|---|---|
| 0 | H33-74 substrate | The 74-byte post-quantum signed primitive |
| 1 | Upstream engine | The cryptographic engine that produced the underlying output |
| 2 | Orchestration | Q-Sign authority objects, Agent-Zero embodiments, CIP interop |
| 3 | HATS record | The AI-specific structured envelope |
| 4 | Replay bundle | The operational unit consumed by the replay verifier |
| 5 | Signed verification report | The auditor-facing artifact emitted by the verifier |
| 6 | Chain anchor | Optional notarization surface — one or many |
| 7 | Tenant and spine binding | Operational binding into the H33 spine schema |
Each layer is independently verifiable. A conformant verification proceeds layer-by-layer; a failure at any layer produces a structured rejection that names the layer, the field, and the check that failed.
§5Layer 0 — H33-74 substrate
The H33-74 substrate is the atomic unit of the stack. It is the same 74 bytes on every chain, in every product surface, and at every layer above. It is the only primitive that crosses every boundary in the specification.
Field schema
- commitment
(32 bytes) - SHA3-256 over the canonical bundle payload. The commitment is the content address of the record.
- pq_receipt
(42 bytes) - Three-family signature envelope: ML-DSA-65 + FALCON-512 + SLH-DSA-128f, all over the commitment. The 42-byte form is the packed binding header; the full per-family signatures are carried in the bundle, not in the substrate.
- substrate_version
- Always
1for HATS Record v1. The substrate version MUST NOT be bumped to widen the primitive; extensions bind off-chain viaverification_hash. - signing_message
- Off-chain extension table key. The signing_message indexes into the canonical extension store and binds the substrate to actor, tenant, epoch, and engine context.
- verification_hash
- Off-chain extension hash. Binds actor and tenant context without modifying the 74-byte primitive.
- epoch_id
- The PQ public-key rotation epoch under which the receipt was signed. Required for verifier key-resolution.
h33-substrate SPEC v1.2; binary bundle format h33-substrate-bundle-v1 (content-addressable by SHA3, approximately 21 KB nominal); public-key registry format h33-substrate-pubkeys-v1 (JSON, epoch-keyed). The substrate format is patented (Substrate patent family). Verifier code under Apache-2.0 in github.com/H33ai/h33-replay-verifier.
Substrate invariants
- The substrate MUST be exactly 74 bytes wire-format.
- The substrate version MUST NOT be modified to extend the primitive. Extensions MUST bind via the off-chain
verification_hashmechanism. - The commitment MUST be SHA3-256, not SHA-2 or BLAKE-family.
- The substrate MUST be reproducible byte-for-byte given the same canonical payload and the same epoch key set.
§6Layer 1 — Upstream cryptographic engine
An H33 record may carry the output of any cryptographic engine, but every engine MUST identify itself, declare its verification key, and ship a determinism vector. The substrate is engine-portable by construction: the same 74 bytes signs a STARK proof, an FHE-attested computation, a ZK proof of identity, or a biometric fusion outcome.
Field schema
- engine_id
- SHA3-256 over the canonical engine descriptor (circuit, program, parameter set). The engine_id is the engine's content address.
- engine_family
- One of
stark,halo2,plonk,bfv,ckks,tfhe,seal,biometric_fusion,conformance_emitter, or an explicitly registered extension token. Engine families map to the attested-routing patent (H33006). - input_commitments
- Array of commitments (Pedersen or SHA3) to private inputs. Each commitment is itself replay-grade.
- public_inputs
- The public statement the engine asserts. For example, "age ≥ 18 in jurisdiction X" or "transferred-attack success rate is 0.196 ± 0.041".
- verification_key
- The engine's VK as published. Hash MUST be reproducible.
- determinism_vector
- The replay-grade determinism vector defined by the conformance-vector patent (positive form). Reserved negative form, when populated, MUST be marked.
- proof_artifact
- The engine's native proof output, as bytes. Format is engine-family-specific and defined by the engine's own published specification.
crypto-integration-orchestrator.service.js in the Digital SCIF code base bridges ML-DSA / FALCON / SLH-DSA signing into upstream engines; fhe-core/ in the same code base hosts BFV / CKKS / TFHE engines. Engine-family identifiers and VKs are published in the engine's own normative document; this specification only requires that they be hashed and bound into the record.
Upstream invariants
- Every engine MUST publish a normative description of its inputs, outputs, and VK format.
- Every engine MUST emit a determinism vector that allows an independent verifier to reproduce the public-input commitments deterministically.
- An engine MAY change versions; every version change MUST produce a distinct
engine_id. Records signed under different engine_ids are distinct records, never the same record under two interpretations.
§7Layer 2 — Q-Sign / Agent-Zero / CIP orchestration
Layer 2 is where the H33 patent family converts a signed engine output into an authority object that can carry policy, lifecycle, and continuity semantics. Q-Sign defines the authority object schema; Agent-Zero defines the autonomous-agent embodiment; the CIP defines the cross-implementation interop bindings.
Q-Sign elements
- authority_object
- The seven primitives defined by H33-Q-Key: time-bound authority, negative proofs, state-scoped semantics, multi-party continuity, computation-bound execution, trust scoring, and survivability.
- canonical_replay_frame
- The published deterministic structure against which an independent verifier evaluates this record. Required for verifier equivalence.
- structured_rejection_semantics
- Per-check verdicts MUST be typed. There are no untyped failures.
- conformance_vector_membership
- If the record is part of the immutable conformance corpus, its corpus identifier MUST be present.
Agent-Zero elements
- decision_finality_fallback
- The Agent-Zero embodiment that defines how a record becomes final under partial-state conditions.
- cryptographic_engine_portability_descriptor
- Agent-Zero's highest-priority patent claim: a portable descriptor that lets an authority object move across engine families without redefining the underlying engine.
- replay_grade_determinism
- The independent-claim formulation of replay-grade determinism reserved for the Agent-Zero continuation. Records that instantiate this claim MUST mark the field present.
- ai_llm_embodiment_hook
- The AI / transformer / LLM embodiment hook used when the authority object governs an AI agent. Optional unless the record is AI-specific (see §8).
CIP elements
- attestation_interface
- The CIP attestation interface descriptor binding the record to an external attestation surface.
- session_lifecycle_manager
- The CIP session lifecycle manager binding. Carries session state semantics across the boundary.
_WORKING.docx; never edit the canonical filing in place). CIP in H33_CIP_RESTRUCTURED_WORKING.docx.
§8Layer 3 — HATS record (AI-specific structured envelope)
Layer 3 is the HATS-specific envelope. It is what makes a generic H33 record into a HATS record. The schema below is the v1 schema and is normative for all HATS records, including replayable adversarial resilience records, AI decision provenance records, and AI compliance records.
Field schema
- record_id
- The 74-byte commitment from Layer 0, rendered as the record's primary identifier.
- record_kind
- One of
adversarial_resilience,decision_provenance,training_attestation,inference_attestation,red_team_outcome, or an explicitly registered extension token. v1 normatively defines the five baseline kinds; extensions MUST be registered via the conformance corpus before use. - target_model_identity
- An object containing the model's weight hash, version, pre-production timestamp, and jurisdiction tag. The weight hash is SHA3-256 of the canonical-form serialized model weights.
- surrogate_set_M1
- For adversarial-resilience records: array of surrogate model descriptors in the high-CKA band (~0.55 and above). Each element carries
model_name,CKA_score,transfer_rate, andrationale. - surrogate_set_M2
- For adversarial-resilience records: array of surrogate model descriptors in the low-CKA band (~0.35). Same element shape as M1.
- attack_corpus
- For adversarial-resilience records: object describing the attack ensemble (e.g., AutoAttack: APGD + FAB + Square), the configuration parameters, and the RNG seed required for reproducibility.
- per_surrogate_outcomes
- Array of per-surrogate, per-attack outcomes:
{surrogate_id, attack_id, success_count, sample_count}. - risk_estimate
- For adversarial-resilience records: object containing
mean,std,ci_95_low,ci_95_high, andestimator_metadata. The estimator MUST be documented inestimator_metadatasufficiently for an independent verifier to reproduce the estimate from the per-surrogate outcomes. - verifier_binding
- Object containing
hats_verify_cli_version,container_digest, andidentity_fingerprint. Binds the record to the specific verifier instance that was used at issuance time. - regulatory_mapping
- Array of
{framework_id, articles, mapping_notes}entries. v1 framework_ids:eu_ai_act,nist_ai_rmf,owasp_ai_exchange,iso_42001,cmmc_2_0. Extensions MUST be registered. - pq_signature_envelope
- The three-family PQ signature envelope as defined in §15.
- chain_anchors
- Array of chain anchor descriptors. See §10.
- extension_fields
- A reserved object for forward-compatible extension fields. Unknown extension fields MUST be preserved through round-trip but MUST NOT participate in the canonical commitment hash unless explicitly registered.
§9Layer 4 — Replay bundle
A replay bundle is the operational unit that the open-source replay verifier consumes. It contains the events that produced the record, the substrate bindings for each event, the canonical frame references, and the tenant / agent / continuity bindings that make the record replayable.
Field schema
- bundle_schema_version
- Always
h33-replay-bundle-v0.2for HATS Record v1. - events
- Immutable, ordered array of events. Every event MUST be substrate-attested via its own Layer 0 receipt. Events MUST be ordered by their canonical sequence number; gaps are not permitted within a single bundle.
- continuity_root_id
- The cryptographic root that binds the events to a single case or session. The continuity root MUST be reproducible from the event hashes.
- case_id, tenant_id, agent_id
- Spine schema fields. v010-plus spine discipline requires every table to attach to
case_id/agent_id/continuity_root_id. There are no orphan rows in a conformant bundle. - frame_refs
- References to canonical replay frames against which the events are evaluated.
- substrate_bindings
- Array of per-event H33-74 receipts. There is one substrate binding per event.
- hash_algorithms_declared
- The hash algorithms used within the bundle, declared up front. Each algorithm MUST be in the recognized allowlist; SHA3-256 is the canonical default. Bundles declaring unknown algorithms fail the corresponding verifier check.
- bound_to_replay
- Boolean. Required for v012-plus join discipline. A bundle whose join tables do not all have
bound_to_replay = trueis non-conformant.
github.com/H33ai/h33-replay-verifier/blob/main/spec/h33-replay-bundle-v0.2.md. Reference implementation: h33-replay-verify CLI and its compiled-to-WASM browser variant at /verify-the-story/playground/.
§10Layer 5 — Signed verification report
A signed verification report is what an independent verifier emits when it verifies a HATS record. It is the artifact an auditor or regulator consumes. It is signed under a single ML-DSA-65 key — the verifier's per-instance identity — and is independently verifiable against any FIPS-204-conformant ML-DSA implementation.
Field schema
- transcript_schema_version
- Always
h33-signed-verify-report-v0.1for HATS Record v1. - bundle_hash
- SHA3-256 of the replay bundle (Layer 4) that was verified.
- verifier_version
- Semver of the verifier implementation that produced the report.
- verifier_identity_fingerprint
- SHA3-256 of the verifier's ML-DSA-65 public key. This is the verifier's stable identity.
- verifier_public_key
- The verifier's ML-DSA-65 public key, embedded for self-contained verification.
- per_check_verdicts
- The structured array of per-check results from the §16 verification protocol. Each verdict is a
{check_id, result, detail}triple. - timestamp_utc
- UTC timestamp at which the verifier produced the report. ISO 8601.
- detached_signature
- ML-DSA-65 detached signature over the canonical payload of the report.
github.com/H33ai/h33-replay-verifier/blob/main/spec/h33-signed-verify-report-v0.1.md. Reference implementation: h33-verify v0.2.0, per-instance keypair at ~/.config/h33-verify/identity.json.
§11Layer 6 — Chain anchor
A HATS record MAY be anchored to one or more chains. Anchors are optional. A record without any chain anchor is still verifiable; chain anchors provide independent third-party notarization, not the record's source of truth. A record MAY be re-anchored to new chains at any time without modifying the record itself.
Field schema (per anchor)
- chain_id
- Canonical chain identifier. v1 known values:
bitcoin,ethereum,polygon,solana,zcash,cosmos,hedera,avalanche,arbitrum,base,optimism. - anchor_transport
- The
AnchorTransporttrait identifier. Required from chain #3 onward in any implementation. Pre-trait per-chain implementations MUST be migrated into a single trait before scaling beyond two notarization surfaces. - block_number
- The block at which the anchor was confirmed.
- block_hash
- The canonical block hash for that chain at
block_number. - tx_hash
- The transaction hash that wrote the anchor payload.
- anchor_payload
- What was written on chain. For Bitcoin, this is the Taproot anchor format (Taproot leads; OP_RETURN is a supported alternative but never leads). For EVM chains, this is the EAS-compatible attestation format. For Solana, this is the program-call payload to the H33-Solana program. For Zcash, this is the shielded-pool-native anchor.
- verified_at_utc
- UTC timestamp at which an authority observed the anchor confirmed on the chain.
- anchor_status
- One of
confirmed,pending,failed.
AnchorTransport trait and the universal anchor receipt format are normative gates for any implementation that supports more than two chains. See /h33-74/chain-portability/ for the operational discussion.
Anchor invariants
- The set of anchors on a record MAY change over time. A record that gains a new anchor remains the same record.
- The absence of any anchor does NOT invalidate a record. The substrate is the source of truth.
- An anchor's verification MUST be independent of H33 infrastructure. A verifier validates the anchor by querying the chain directly.
§12Layer 7 — Tenant and spine binding
Layer 7 binds a HATS record into the operational spine schema. This is where tenancy, case scoping, and replay-binding live. Layer 7 MUST be enforced at the database layer in conformant implementations; soft application-only enforcement is non-conformant.
Field schema
- tenant_id
- The tenant that owns the record.
- insurer_id
- For insurance-oriented records (V005 schema). Optional for general records.
- insured_organization_id
- For insurance-oriented records (V005 schema). Optional.
- agent_id
- The agent identity that produced the record.
- continuity_root_id
- Reference to the continuity root carried in the replay bundle.
- case_id
- The case identifier the record is bound to.
- insurance_policy_id
- For policy-bound records. Optional.
- bound_to_replay
- Boolean. v012-plus join discipline requires this for all join-table participation.
- spine_route_membership
- The record's spine route assignment. MUST be a member of the canonical
SPINE_ROUTESregistry (24 routes in v1.1). The spine v1.1 routing surface is frozen; new routes appear under fresh version bumps, never via silent extension.
~/scif-backend/docs/api/spine-auth-matrix.md; ~/h33-platform/docs/V100-MIGRATION-PLAYBOOK.md. Cross-tenant and cross-case joins MUST be structurally impossible at the DB level (composite FK or trigger). Soft app-only integrity is non-conformant.
§13Cross-cutting elements
The following elements appear at every layer above Layer 0 and are normative for conformant implementations.
- PQ signature envelope
- The three-family envelope (ML-DSA-65 + FALCON-512 + SLH-DSA-128f) wraps every layer's canonical payload. The envelope is independently verifiable per family; a record passes the envelope check if and only if all three families verify.
- PQ epoch identifier
- Every signed layer carries the epoch_id under which it was signed, sourced from
h33-substrate-pubkeys-v1. Key rotation is monotonic; epochs are never reused. - Boundary marker
- Every artifact carries a boundary marker declaring its public-versus-proprietary status, per
BOUNDARY.md. Verification-side artifacts are public; computation-side artifacts may be proprietary. - Conformance corpus membership
- If the record is a member of the immutable conformance corpus, its corpus identifier MUST be present and MUST resolve in the published corpus index.
- Patent family reference
- Every layer carries a reference to the patent family invariants document section that defines its behavior. Implementations MAY use this reference for compliance traceability.
§14Canonical encoding and hash discipline
Canonical JSON
All layers serialize to JSON in canonical form for hashing. Canonical form requires:
- Object keys sorted lexicographically by code point at every nesting level.
- No insignificant whitespace.
- Strings encoded UTF-8, with all non-ASCII characters escaped via
\uXXXXonly where required to produce valid JSON. - Numbers serialized in their shortest round-trip form; no trailing zeros, no leading plus sign, no exponential notation for integers.
- Boolean and null literals lowercase.
Canonical CBOR
Implementations MAY additionally serialize to CBOR per RFC 8949 deterministic encoding rules. Where both encodings exist for the same record, they MUST produce the same commitment hash when canonicalized through their respective rules.
Hash function
The canonical hash function for HATS Record v1 is SHA3-256 (FIPS 202). SHA-2 family hashes are NOT canonical; their use in upstream-engine outputs is permitted only when the engine's normative specification mandates them and they are subsequently bound through a SHA3-256 commitment at the substrate.
§15PQ signature envelope
The three-family PQ signature envelope is the wrapper that secures every signed layer. The envelope consists of three independent signatures over the same canonical payload, computed with three independent NIST-standardized post-quantum signature schemes.
| Family | Standard | Role |
|---|---|---|
| ML-DSA-65 | FIPS 204 | Lattice-based, NIST primary recommendation |
| FALCON-512 | NIST PQC Round 3 | NTRU-lattice-based, compact signatures, NIST alternate |
| SLH-DSA-128f | FIPS 205 | Hash-based, defense-in-depth against future lattice attacks |
A record verifies under the envelope if and only if all three signatures verify under their respective schemes against the same canonical payload using public keys resolved from the epoch registry at the record's epoch_id.
The use of three families is defense in depth: a future cryptanalytic advance against any single family does not invalidate the envelope, because the other two families remain unaffected. A conformant implementation MUST verify all three; partial verification (e.g., "ML-DSA only") is non-conformant.
§16Verification protocol
A conformant verifier evaluates a HATS record against the following ordered, ten-check protocol. The check identifiers are stable and form the basis of the structured rejection semantics defined in §3.
| Check | Name | What it verifies |
|---|---|---|
| CHK-01 | schema_parses | Bundle parses against schema h33-replay-bundle-v0.2 with no extension violations |
| CHK-02 | timeline_orders | Events are sequentially ordered with no gaps and no reordering |
| CHK-03 | chain_hashes_recompute | Every event hash recomputes deterministically from its declared inputs |
| CHK-04 | frame_refs_resolve | Every canonical frame reference resolves against the published frame registry |
| CHK-05 | continuity_consistent | The continuity root is reproducible from the event sequence |
| CHK-06 | no_orphans | No event is orphaned from case_id / agent_id / continuity_root_id |
| CHK-07 | hash_algos_recognized | All declared hash algorithms appear in the recognized allowlist |
| CHK-08 | no_cross_tenant_rows | No row in any join table crosses tenant boundaries |
| CHK-09 | substrate_bindings_recompute | Every per-event H33-74 substrate binding recomputes deterministically |
| CHK-10 | bit_identical | The bundle is bit-identical to what was recorded at export time |
HATS records additionally MUST pass HATS-specific extension checks defined by their record_kind. For adversarial_resilience records, the extension checks include:
- CHK-AR-01: CKA scores fall within their declared band (M1 high, M2 low).
- CHK-AR-02: Attack corpus configuration is reproducible from the declared RNG seed and parameter set.
- CHK-AR-03: Risk estimate is reproducible from per-surrogate outcomes via the declared estimator.
- CHK-AR-04: Regulatory mapping entries each resolve against the framework registry.
A conformant verifier emits a signed verification report (Layer 5) for every record it evaluates, regardless of pass or fail.
§17Replay protocol
Replay is the deterministic re-evaluation of a HATS record against the canonical replay frame published with this specification. Replay is the primitive that gives this specification its name: a HATS record can be replayed years later, by any party, with any conformant implementation, and the verdict will be the same.
The replay protocol proceeds in four phases:
- Resolve. The verifier resolves the canonical replay frame, the engine descriptor, the conformance vector, and the epoch keys.
- Recompute. The verifier recomputes every declared hash, every commitment, every continuity root, and every substrate binding.
- Re-evaluate. The verifier re-evaluates the verification protocol (§16) against the recomputed values.
- Report. The verifier emits a signed verification report (Layer 5) with per-check verdicts.
Two conformant verifiers replaying the same record against the same canonical frame and the same epoch keys MUST produce per-check verdicts that are byte-identical. This is the deterministic conformance verification property and it is what makes the verifier independent of H33.
§18Verifier identity binding
Every conformant verifier instance carries its own ML-DSA-65 keypair stored at a well-known path (~/.config/h33-verify/identity.json in the reference implementation). The verifier's public key fingerprint (SHA3-256) is its stable identity for purposes of signed verification reports.
A signed verification report (Layer 5) does NOT prove that a particular verifier identity belongs to a particular natural person or organization. That binding is established out of band — via an allow-list, a regulator-published registry, or a verifier identity certificate issued by a third party. The signed report only proves that some verifier with this public-key fingerprint produced this verdict on this bundle at this time.
Implementations SHOULD publish their verifier identity fingerprints alongside the reports they emit so that consumers can independently validate against a registry of their choice.
§19Regulatory mapping
HATS records are designed to map cleanly to existing regulatory frameworks. v1 defines normative mappings for the following frameworks; extensions may be registered via the conformance corpus.
| Framework | ID | Primary articles | HATS surface |
|---|---|---|---|
| EU AI Act | eu_ai_act | Articles 12, 15 | Automatic logging + accuracy/robustness/cybersecurity |
| NIST AI RMF | nist_ai_rmf | TEVV functions | Testing, evaluation, verification, validation |
| OWASP AI Exchange | owasp_ai_exchange | Adversarial risk control | Community-aligned threat mapping |
| ISO/IEC 42001 | iso_42001 | Clauses 6, 8, 9 | AI management system controls |
| CMMC 2.0 | cmmc_2_0 | Level 2 controls | Defense industrial base AI applications |
| SOX | sox | Sections 302, 404 | Internal controls over AI-touched financial reporting |
| DORA | dora | Articles 5, 24 | ICT risk + digital operational resilience |
| HIPAA | hipaa | Security Rule | Healthcare AI evidence |
| PCI-DSS | pci_dss | v4.0 | AI-touched cardholder data flows |
| GDPR | gdpr | Article 22 | Automated decision-making evidence |
§20Conformance corpus
The conformance corpus is the immutable set of canonical HATS records and expected per-check verdicts against which conformant implementations are validated.
- The corpus is append-only. Records once admitted cannot be removed or modified.
- Every corpus record carries a stable corpus identifier referenced in records that claim corpus membership.
- Conformant implementations MUST produce the published per-check verdicts on every corpus record. Implementations that diverge on any verdict are non-conformant.
- Positive conformance vectors are published openly. Negative conformance vectors are reserved for a separate continuation per patent strategy and are released through controlled channels.
§21Boundary discipline (public vs. proprietary)
The H33 stack maintains a strict boundary between verification artifacts (public) and computation artifacts (proprietary). This boundary is normative for HATS implementations and is documented in the BOUNDARY.md governance document.
Public (verification side)
- This specification
- Wire formats (bundle, signed report, substrate)
- Verifier source (Apache-2.0)
- Conformance corpus (positive vectors)
- Public-key registry format
- Replay protocol
Proprietary (computation side)
- Production signing pipeline
- FHE engine internals
- STARK prover internals
- Orchestration runtime
- Biometric capture pipeline
- Production infrastructure
Cross-boundary moves require explicit governance approval; implementations that opaquely shift artifacts across the boundary are non-conformant.
§22Security considerations
Cryptographic assumptions
HATS Record v1 relies on the security of SHA3-256, ML-DSA-65, FALCON-512, and SLH-DSA-128f. Use of three independent post-quantum signature families is intentional defense in depth against future cryptanalytic developments. A break of any single family does not break the envelope.
Verifier independence
The protocol is designed so that an independent verifier can validate a record using only the published specification, the open-source verifier source, and the public-key registry. No trust in H33 infrastructure is required. Implementations MUST NOT introduce verifier behaviors that depend on H33-hosted services.
Epoch key compromise
If an epoch key is compromised, the affected epoch is revoked via a normative revocation entry in the public-key registry. Records signed under a revoked epoch MUST be flagged by conformant verifiers. The conformance corpus retains the record for historical replay but marks the epoch revoked.
Engine compromise
If an upstream engine is found to produce unsound outputs (e.g., a STARK soundness break), records depending on that engine MUST be re-evaluated. The conformance corpus preserves the original verdicts; consumers SHOULD additionally consult the engine's security advisory channel.
Replay attack resistance
Records are bound to their epoch, their canonical frame, and their bundle hash. Replay of a record against a different epoch or frame produces a verdict failure at CHK-04 or CHK-09. Cross-record substitution is structurally impossible at CHK-10.
§23Privacy considerations
HATS records do NOT carry PII by design. Sensitive payloads are bound by commitment and stored off the record. The record carries the commitment and the metadata necessary for verification; the payload itself remains under whatever access control the issuer applies.
For records produced by privacy-preserving engines (STARK proofs of KYC/OFAC/age on Solana, Bitcoin, Polygon, or Zcash), the public inputs MUST be limited to the regulatory category being proven. The underlying private inputs MUST NOT be derivable from the record.
Conformant implementations MUST NOT include personally identifying information in the regulatory mapping notes or in extension fields. Regulatory mappings reference framework articles; they do not summarize personal data.
§24Reference implementations
- h33-replay-verify — Rust CLI implementing §16 verification protocol. Compiled to WASM for browser use. Source at
github.com/H33ai/h33-replay-verifier, Apache-2.0. - h33-verify v0.2.0 — Signed verification report producer (Layer 5). Per-instance ML-DSA-65 keypair at
~/.config/h33-verify/identity.json. 31 tests at release. - verify-the-story playground — Browser-resident WASM verifier with ML-DSA-65 transcript verification via
@noble/post-quantum. Hosted at/verify-the-story/playground/. Zero network calls after page load. - tokenize the world — Scenes 1 and 2 of the canonical operating-model walk-through, also running the same WASM verifier core. Hosted at
/tokenize/and/tokenize/replay/. - h33-Solana — On-chain STARK + PQ-signed proof of regulatory category on Solana mainnet. Program ID
5eAwAv59YqpnSBMj59KeXhDdLqmn99HBYSjrb6jcLbC5. Hosted try-it at/solana-privacy/.
§25Patent linkage
This specification instantiates claims from the following H33 patent filings. The list is informative; the normative constitution is the family architecture invariants document.
| Filing | Subject | Layer linkage |
|---|---|---|
| Substrate patent | 74-byte post-quantum receipt primitive | Layer 0 |
| H33003 (19/645,499) | PQ attestation of FHE outputs | Layer 1 (BFV / CKKS engines) |
| H33004 (19/656,024) | Transform-persistent FHE acceleration | Layer 1 (engine internals) |
| H33005 (19/661,294) | Encrypted AI infrastructure | Layer 1 (AI engines), Layer 3 |
| H33006 (19/669,799) | Attested routing across heterogeneous crypto engines | Layer 1 (engine portability), Layer 2 (orchestration) |
| Agent-Zero (complete spec) | Cryptographic engine portability descriptor; replay-grade determinism | Layer 2 (orchestration) |
| Q-Sign / Q-Key continuation | Authority objects; conformance vectors | Layer 2 (orchestration), Layer 3 (HATS envelope) |
| CIP filing | Attestation interface; session lifecycle manager | Layer 2 (interop) |
The family architecture invariants document is load-bearing for this specification. Implementations MUST consult it for any cross-patent semantic question.
§26Versioning and change control
Semantic versioning
This specification follows semantic versioning. The current version is v1.0.0. Breaking changes increment the major version. Additive, backward-compatible changes increment the minor. Editorial changes increment the patch.
Change control
- Cross-boundary changes (moving an artifact between public and proprietary) require explicit governance approval per
BOUNDARY.md. - Substrate version bumps are NEVER permitted as a mechanism to widen the 74-byte primitive. Extensions MUST bind off-chain via
verification_hash. - Spine v1.1 routing is frozen. New routes appear under fresh version bumps, never via silent extension.
- Conformance corpus admissions are append-only and require explicit standards-group review.
Errata
Editorial errata against v1.0.0 will be published at /hats/spec/hats-record-v1/errata.md as discovered. Errata never change normative requirements; normative changes require a minor or major version bump.
§AAppendix A — Example HATS record
The following is an example HATS record of record_kind: adversarial_resilience in canonical JSON form. The example is illustrative; values are placeholder.
// HATS Record v1 — example adversarial_resilience record { "agent_id": "agt_01HZQYNB3X...", "attack_corpus": { "ensemble": "AutoAttack", "members": ["APGD", "FAB", "Square"], "config": { "epsilon": 0.03, "norm": "Linf" }, "rng_seed": "0x9f8a..." }, "bound_to_replay": true, "case_id": "case_2026_05_30_a", "chain_anchors": [ { "chain_id": "polygon", "anchor_status": "confirmed", "block_number": 62318441, "tx_hash": "0x4af..." }, { "chain_id": "bitcoin", "anchor_status": "confirmed", "block_number": 911022, "tx_hash": "e3b0..." }, { "chain_id": "ethereum", "anchor_status": "confirmed", "block_number": 21558109, "tx_hash": "0xc7a..." } ], "continuity_root_id": "crt_01HZQYNC5...", "epoch_id": 17, "per_surrogate_outcomes": [ { "surrogate_id": "densenet201", "attack_id": "autoattack_v1", "success_count": 412, "sample_count": 2000 }, { "surrogate_id": "vgg19", "attack_id": "autoattack_v1", "success_count": 438, "sample_count": 2000 }, { "surrogate_id": "resnet152", "attack_id": "autoattack_v1", "success_count": 479, "sample_count": 2000 }, { "surrogate_id": "mobilenetv2", "attack_id": "autoattack_v1", "success_count": 198, "sample_count": 2000 }, { "surrogate_id": "efficientnet_b0", "attack_id": "autoattack_v1", "success_count": 221, "sample_count": 2000 } ], "pq_signature_envelope": { "ml_dsa_65": "...", "falcon_512": "...", "slh_dsa_128f": "..." }, "record_id": "0x5a7c9d3b...74-byte...", "record_kind": "adversarial_resilience", "regulatory_mapping": [ { "framework_id": "eu_ai_act", "articles": ["12", "15"] }, { "framework_id": "nist_ai_rmf", "articles": ["TEVV"] }, { "framework_id": "owasp_ai_exchange", "articles": ["adversarial_risk"] } ], "risk_estimate": { "mean": 0.196, "std": 0.041, "ci_95_low": 0.116, "ci_95_high": 0.276, "estimator_metadata": { "family": "bayesian_regression", "prior": "beta(1,1)" } }, "spine_route_membership": "hats.adversarial", "substrate_version": 1, "surrogate_set_M1": [ { "model_name": "DenseNet-201", "cka_score": 0.587, "transfer_rate": 0.206 }, { "model_name": "VGG-19", "cka_score": 0.612, "transfer_rate": 0.219 }, { "model_name": "ResNet-152", "cka_score": 0.694, "transfer_rate": 0.240 } ], "surrogate_set_M2": [ { "model_name": "MobileNetV2", "cka_score": 0.298, "transfer_rate": 0.099 }, { "model_name": "EfficientNet-B0", "cka_score": 0.331, "transfer_rate": 0.111 } ], "target_model_identity": { "model_name": "ResNet-50", "dataset": "ImageNet-1K", "weight_hash": "0x4e1b...", "version": "v1.0", "stage": "pre-production" }, "tenant_id": "tnt_01HZ...", "verifier_binding": { "hats_verify_cli_version": "v0.2.0", "container_digest": "sha256:9af...", "identity_fingerprint": "0xb31f..." } }
§BAppendix B — Example signed verification report
// h33-signed-verify-report-v0.1 — example { "bundle_hash": "0x5a7c9d3b...32 bytes...", "detached_signature": "ML-DSA-65 signature bytes...", "per_check_verdicts": [ { "check_id": "CHK-01", "result": "pass" }, { "check_id": "CHK-02", "result": "pass" }, { "check_id": "CHK-03", "result": "pass" }, { "check_id": "CHK-04", "result": "pass" }, { "check_id": "CHK-05", "result": "pass" }, { "check_id": "CHK-06", "result": "pass" }, { "check_id": "CHK-07", "result": "pass" }, { "check_id": "CHK-08", "result": "pass" }, { "check_id": "CHK-09", "result": "pass" }, { "check_id": "CHK-10", "result": "pass" }, { "check_id": "CHK-AR-01", "result": "pass" }, { "check_id": "CHK-AR-02", "result": "pass" }, { "check_id": "CHK-AR-03", "result": "pass" }, { "check_id": "CHK-AR-04", "result": "pass" } ], "timestamp_utc": "2026-05-30T23:50:00Z", "transcript_schema_version": "h33-signed-verify-report-v0.1", "verifier_identity_fingerprint": "0xb31f...32 bytes...", "verifier_public_key": "ML-DSA-65 public key bytes...", "verifier_version": "v0.2.0" }
§CAppendix C — Regulatory crosswalk index
§DAppendix D — HATS-V-CHECK / HATS-G code registry
The H33 governance specification defines structured codes that name every check, constraint, and discipline an implementation must satisfy. Verifiers emit these codes in their structured output so a developer hitting a failure can cross-reference exactly what the implementation evaluated. This appendix mirrors the codes from the backend governance specification — meanings are reproduced verbatim from the source where possible.
Source: scif-backend/docs/HATS-GOVERNANCE-SPEC-v1.md. Total codes: 164. Families: 33. The verifier status column reflects the current production verifier implementation in scif-backend/src/bin/h33_verifier.rs as of the May 30 honesty patch.
Codes whose Verifier status reads NOT_PERFORMED are documented checks the bundle format h33-replay-bundle-v0.2 cannot satisfy alone. See the verification model for the paired-archive path that elevates verdicts to FULLY_REPLAYABLE.
V-CHECK — Verifier check codes — what the verifier evaluates against a bundle
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-V-CHECK-001 |
All nodes have valid `canonical_hash` (recomputed and matched) | NOT_PERFORMED Receipt-level canonical_hash recompute requires the paired receipts archive (Level 2). |
HATS-V-CHECK-002 |
All parent references point to existing nodes | Enforced classify_errors → HATS_ERR_ORPHAN_REF |
HATS-V-CHECK-003 |
No cycles in the graph | Enforced classify_errors → HATS_ERR_CYCLE |
HATS-V-CHECK-004 |
No cross-tenant contamination | Enforced classify_errors → HATS_ERR_CROSS_TENANT |
HATS-V-CHECK-005 |
Consistent transcript version | Enforced classify_errors → HATS_ERR_TRANSCRIPT_INCOMPATIBLE |
HATS-V-CHECK-006 |
StateTransition nodes have >= 4 parents | Enforced classify_errors → HATS_ERR_MISSING_LINEAGE |
HATS-V-CHECK-007 |
Signatures verify against declared public keys | NOT_PERFORMED Receipt-level signature verification requires the paired receipts archive (Level 2). |
HATS-V-CHECK-008 |
Timestamps are monotonic within signer | Enforced classify_timestamp_violations → HATS_ERR_IMPOSSIBLE_ORDER |
HATS-V-CHECK-009 |
Child timestamps >= parent timestamps | Enforced classify_timestamp_violations → HATS_ERR_CLOCK_ROLLBACK / HATS_ERR_CLOCK_REPLAY |
HATS-V-CHECK-010 |
No duplicate `canonical_hash` values | Enforced at load Duplicate canonical_hash detected at load_bundle; rejected before verify() |
G — Graph structural constraints — required invariants for governance graphs
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-G-001 |
The governance graph MUST be acyclic. Implementations MUST reject graphs containing cycles. | Documented in spec |
HATS-G-002 |
Every `parent_ref` in a node MUST reference a node that exists in the graph (no orphan references). | Documented in spec |
HATS-G-003 |
The graph MUST NOT contain nodes where a tenanted child references a parent with a different `tenant_id_hash` (cross-tenant contamination). | Documented in spec |
HATS-G-004 |
All nodes within a governance graph MUST share the same `transcript_version`, unless the graph spans a documented version migration. | Documented in spec |
HATS-G-005 |
StateTransition nodes MUST have at least 4 parent references (Route, Policy, Result, Event). Fewer indicates incomplete governance lineage. | Documented in spec |
HATS-G-006 |
The graph root hash MUST be computed by sorting all nodes by `(node_type, canonical_hash)` and hashing the sorted sequence with a domain separator. | Documented in spec |
HATS-G-007 |
The graph root hash MUST be deterministic: identical logical graphs MUST produce identical root hashes regardless of node insertion order. | Documented in spec |
HATS-G-008 |
The graph Merkle root MUST be computed over the sorted `canonical_hash` values using a binary Merkle tree with a domain separator. Non-power-of-two counts MUST be padded with zero hashes. | Documented in spec |
R — Receipt format requirements — canonical hashing rules for each receipt type
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-R-001 |
The `receipt_hash` MUST be computed using Canonical Serialization (Section 5). | Documented in spec |
HATS-R-002 |
The `pq_signature` MUST be computed over the raw `receipt_hash` bytes, not over a serialized representation. | Documented in spec |
HATS-R-003 |
Every Route Decision Receipt MUST include at least one rejected engine OR document that only one engine was eligible. | Documented in spec |
HATS-R-004 |
A Denied policy decision MUST NOT produce a successful execution event in the same governance lineage. | Documented in spec |
HATS-R-005 |
A Failed result MUST NOT be bound to a successful governed execution event. | Documented in spec |
HATS-R-006 |
Within a namespace, transition N+1's `prior_state_commitment` MUST equal transition N's `new_state_commitment`. | Documented in spec |
HATS-R-007 |
Duplicate `mutation_id` values within the same namespace MUST be rejected. | Documented in spec |
HATS-R-008 |
Every enforcement decision MUST itself be signed and auditable. Enforcement operates within the governance chain, not outside it. | Documented in spec |
D — Determinism requirements — replay-grade reproducibility
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-D-001 |
Given identical governance graph content and identical replay target (timestamp or checkpoint hash), compliant Replay-Grade implementations MUST produce identical frame hashes. | Documented in spec |
HATS-D-002 |
Given identical governance graph content, compliant implementations MUST produce identical graph root hashes regardless of node insertion order. | Documented in spec |
HATS-D-003 |
Given identical receipt fields, compliant implementations MUST produce identical `receipt_hash` values. | Documented in spec |
HATS-D-004 |
Given identical input to a deterministic router, compliant implementations MUST produce identical routing decisions and identical stage1 determinism hashes. | Documented in spec |
HATS-D-005 |
Determinism MUST be tested using the HATS Conformance Suite test vectors. An implementation that produces different hashes from the test vectors is NOT HATS-Conformant. | Documented in spec |
HATS-D-006 |
Floating-point arithmetic MUST NOT be used in any hash computation or canonical serialization path. All values MUST be integer or fixed-point. | Documented in spec |
S — Canonical serialization rules — deterministic encoding required for hashes
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-S-001 |
Implementations MUST use the canonical serialization rules defined in this section for all hash computations. | Documented in spec |
HATS-S-002 |
All integers MUST be encoded in little-endian byte order. | Documented in spec |
HATS-S-003 |
Strings MUST be encoded as a Uint32 length prefix followed by UTF-8 bytes. | Documented in spec |
HATS-S-004 |
Strings MUST be NFC-normalized (Unicode Normalization Form C) before encoding. | Documented in spec |
HATS-S-005 |
Empty strings MUST be encoded as a Uint32 zero length prefix (4 zero bytes). Empty is NOT the same as absent. | Documented in spec |
HATS-S-006 |
Fixed-size byte arrays (e.g., Byte[32]) MUST be encoded as raw bytes without a length prefix. | Documented in spec |
HATS-S-007 |
Variable-size byte arrays MUST be encoded as a Uint32 length prefix followed by the raw bytes. | Documented in spec |
HATS-S-008 |
Booleans MUST be encoded as a single byte: `0x00` for false, `0x01` for true. | Documented in spec |
HATS-S-009 |
Optional fields that are present MUST be preceded by a presence byte `0x01` followed by the encoded value. | Documented in spec |
HATS-S-010 |
Optional fields that are absent MUST be encoded as a single byte `0x00`. | Documented in spec |
HATS-S-011 |
Arrays MUST be encoded as a Uint32 element count followed by each element in order. | Documented in spec |
HATS-S-012 |
Maps MUST be encoded as a Uint32 entry count followed by key-value pairs sorted by the canonical byte encoding of the key (lexicographic byte order). | Documented in spec |
HATS-S-013 |
Struct fields MUST be encoded in declaration order as specified in this document. Field order is part of the canonical format. | Documented in spec |
HATS-S-014 |
Every hash computation MUST begin with a domain separator string that identifies the object type. Domain separators are NOT length-prefixed — they are raw ASCII bytes. | Documented in spec |
HATS-S-015 |
All timestamps MUST be encoded as Uint64 milliseconds since Unix epoch (1970-01-01T00:00:00Z). Microsecond or nanosecond precision MUST NOT be used in canonical serialization. | Documented in spec |
TM — Time and clock semantics — ordering, monotonicity, rollback detection
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-TM-001 |
Implementations SHOULD document the timestamp source (local clock, external TSA, anchor-derived). | Documented in spec |
HATS-TM-002 |
Timestamps MUST be in UTC. Timezone-aware timestamps MUST be converted to UTC before canonical serialization. | Documented in spec |
HATS-TM-003 |
Within a single signer, timestamps MUST be monotonically increasing. A timestamp that is less than or equal to the previous timestamp from the same signer indicates a rollback or replay. | Documented in spec |
HATS-TM-004 |
Implementations SHOULD detect and report timestamp rollbacks as integrity warnings. | Documented in spec |
HATS-TM-005 |
A child node's timestamp MUST be greater than or equal to all of its parents' timestamps. A child timestamp before a parent timestamp indicates impossible ordering. | Documented in spec |
HATS-TM-006 |
Implementations MUST detect impossible ordering during replay and report it as an integrity violation. | Documented in spec |
HATS-TM-007 |
Implementations SHOULD tolerate clock skew of up to 5 seconds between federated nodes. Skew beyond 5 seconds SHOULD be reported as a warning. | Documented in spec |
ID — Identifier and tenant scoping rules
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-ID-001 |
The `canonical_hash` of a governance node is its permanent identity. Once computed and committed, it MUST NOT change. | Documented in spec |
HATS-ID-002 |
If a governance node's content changes (for any reason), it becomes a new node with a new `canonical_hash`. The original node remains in the graph. | Documented in spec |
HATS-ID-003 |
When the transcript version changes, existing governance nodes retain their original `canonical_hash` computed under the original transcript version. They are NOT rehashed. | Documented in spec |
HATS-ID-004 |
New nodes created after a transcript version change MUST use the new version. A governance graph spanning a migration contains nodes with two different transcript versions. | Documented in spec |
HATS-ID-005 |
Verifiers MUST accept graphs containing a documented transcript version migration. The migration MUST be recorded as a governance node (type: Migration, reserved type ID 99). | Documented in spec |
HATS-ID-006 |
If the Cryptographic Profile changes (e.g., SHA3-256 to BLAKE3), existing nodes retain their original hashes. New nodes use the new profile. The migration is documented via transcript version increment. | Documented in spec |
HATS-ID-007 |
Implementations MUST NOT support hash aliasing (one node having multiple canonical hashes). A node has exactly one identity. | Documented in spec |
PR — Replay and subgraph export protocols
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-PR-001 |
Implementations MUST support exporting a subgraph: given a set of root node hashes, return all nodes reachable via parent references. | Documented in spec |
HATS-PR-002 |
A partial graph export MUST be a valid HATS governance graph in its own right, with its own root hash. | Documented in spec |
HATS-PR-003 |
Scoped replay MUST support filtering by: tenant, namespace, policy hash, route hash, and transcript version. | Documented in spec |
HATS-PR-004 |
Infrastructure nodes (those with `tenant_id_hash = null`) MUST be included in tenant-scoped replay unless explicitly excluded. | Documented in spec |
HATS-PR-005 |
Replay MUST support resuming from a checkpoint. Given a checkpoint hash, the replay engine MUST produce the same frame as replaying from the beginning to the checkpoint's timestamp. | Documented in spec |
HATS-PR-006 |
Implementations MUST report when a scoped replay encounters parent references that point outside the scope. These MUST be reported as "missing lineage" warnings, not silent omissions. | Documented in spec |
FQ — Federation quorum semantics — multi-party checkpoint requirements
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-FQ-001 |
A federation quorum requires a minimum number of participating nodes to submit valid checkpoints within a staleness window. | Documented in spec |
HATS-FQ-002 |
The quorum threshold and staleness window MUST be declared in the federation configuration. | Documented in spec |
HATS-FQ-003 |
Quorum is satisfied when: `active_checkpoints >= quorum_threshold` AND all active checkpoints have `age <= max_staleness_ms`. | Documented in spec |
HATS-FQ-004 |
Implementations MUST report quorum status as: `HEALTHY` (quorum met), `DEGRADED` (quorum met but stale nodes exist), or `FAILED` (quorum not met). | Documented in spec |
HATS-FQ-005 |
If a federation node submits two different checkpoints for the same time window, this constitutes equivocation. Implementations MUST detect and report equivocation. | Documented in spec |
HATS-FQ-006 |
Upon equivocation detection, the equivocating node's checkpoints MUST be excluded from quorum calculation. The node MUST be flagged for investigation. | Documented in spec |
HATS-FQ-007 |
If a federation splits (partition), each partition MUST maintain independent replay capability. Replay frames from one partition MUST NOT be presented as representing the full federation. | Documented in spec |
HATS-FQ-008 |
When partitions rejoin, implementations MUST perform a reconciliation that detects and reports any divergent state transitions. | Documented in spec |
HATS-FQ-009 |
If all federation nodes become stale (no checkpoints within the staleness window), the federation status MUST be `FAILED` and enforcement MUST trigger at minimum `WARNING` level. | Documented in spec |
TD — Transcript and dialogue requirements
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-TD-001 |
Nodes with different `tenant_id_hash` values MUST NOT appear in the same governance lineage (parent-child chain). | Documented in spec |
HATS-TD-002 |
Infrastructure nodes (`tenant_id_hash = null`) MAY appear in any lineage. They are not tenant-bound. | Documented in spec |
HATS-TD-003 |
Signer keys SHOULD be associated with a trust domain (e.g., "production", "staging", "gov-cleared"). | Documented in spec |
HATS-TD-004 |
Implementations SHOULD reject receipts signed by keys outside the expected trust domain for the deployment context. | Documented in spec |
HATS-TD-005 |
Federation checkpoints MUST aggregate only checkpoints from nodes within the same trust federation. Cross-federation aggregation MUST be documented via anchor records. | Documented in spec |
HATS-TD-006 |
Staging and production governance lineage MUST be separated. A staging signer MUST NOT sign production governance nodes. | Documented in spec |
AIR — AI envelope requirements (HATS Layer 3)
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-AIR-001 |
Reserved AI node types MUST follow the standard GovernanceNode envelope (Section 2.1). | Documented in spec |
HATS-AIR-002 |
AI governance lineage MUST maintain the same replay determinism guarantees as standard governance. | Documented in spec |
HATS-AIR-003 |
MemoryMutationNode and MemoryAccessNode MUST enforce tenant isolation. Cross-tenant memory access MUST be detectable and rejectable. | Documented in spec |
HATS-AIR-004 |
AutonomousActionNode MUST reference both an InferenceNode and a PolicyNode, ensuring that autonomous actions are both inference-traced and policy-governed. | Documented in spec |
T — Transcript classification
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-T-001 |
Every governance node MUST carry a `transcript_version` field. | Documented in spec |
HATS-T-002 |
Incrementing the transcript version constitutes a breaking change. All nodes in a graph MUST share the same transcript version unless a migration is documented. | Documented in spec |
HATS-T-003 |
Verifiers MUST reject bundles containing mixed transcript versions unless the bundle includes a migration record documenting the version transition. | Documented in spec |
HATS-T-004 |
The current HATS transcript version is `2`. | Documented in spec |
BE — Bundle export rules
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-BE-001 |
Implementations MUST encode governance nodes in exactly this byte order for graph root hash computation. | Documented in spec |
HATS-BE-002 |
The graph root hash MUST be computed by sorting nodes by `(node_type as u16, canonical_hash)` in ascending order, then feeding each node's binary encoding through the hash function sequentially. | Documented in spec |
HATS-BE-003 |
Implementations MUST provide a reference binary encoding function that accepts structured input and produces the canonical byte sequence. This function MUST be tested against the parity vectors in Appendix E. | Documented in spec |
HATS-BE-004 |
Any two HATS-Conformant implementations given the same logical governance node MUST produce byte-identical canonical encodings. Failure to produce identical bytes constitutes a conformance failure. | Documented in spec |
RP — Replay protocol rules
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-RP-001 |
A Replay Frame MUST include: timestamp, integrity root, active transcript versions, active signers, active policies, namespace states, node counts, total nodes, integrity checks, and frame hash. | Documented in spec |
HATS-RP-002 |
The frame hash MUST be computed using Canonical Serialization over all frame fields in the order specified in HATS-RP-001. | Documented in spec |
HATS-RP-003 |
Forward and reverse replay of the same time range MUST produce the same set of frames (in reversed order). | Documented in spec |
HATS-RP-004 |
A Replay Diff MUST include: from/to timestamps, policies added/removed, state changes, new routes, signers added/removed, transcript version changes, integrity divergence flag, and diff hash. | Documented in spec |
HATS-RP-005 |
Diffing the same timestamp against itself MUST produce an empty diff with `integrity_diverged = false`. | Documented in spec |
N — Node-type semantics
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-N-001 |
Every governance node MUST contain all REQUIRED fields. | Documented in spec |
HATS-N-002 |
The `canonical_hash` MUST be computed using the Canonical Serialization rules (Section 5) and the active Cryptographic Profile (Section 6). | Documented in spec |
HATS-N-003 |
The `signer_key_id` MUST be the hash of the signer's public key using the active hash function. | Documented in spec |
HATS-N-004 |
Implementations MAY define additional node types using the extension namespace (Section 21). Extended node types MUST use type IDs >= 100. | Documented in spec |
HATS-N-005 |
StateTransition nodes MUST have at least 4 parent references (Route, Policy, Result, Event). | Documented in spec |
FP — Federation participation rules
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-FP-001 |
Deprecated fields MUST continue to be accepted for at least 2 major versions after deprecation. | Documented in spec |
HATS-FP-002 |
Deprecated fields MUST be documented with: deprecation date, removal target version, and migration guidance. | Documented in spec |
HATS-FP-003 |
Transcript version migrations MUST provide a minimum 12-month overlap window where both versions are accepted. | Documented in spec |
HATS-FP-004 |
If the REQUIRED hash or signature algorithm is found to be insecure, the following process MUST be followed: | Documented in spec |
HATS-FP-005 |
Receipt schemas MUST NOT be deleted. Retired schemas MUST remain in the registry with status `RETIRED` and continue to be parseable by verifiers. | Documented in spec |
EC — Evidence and conformance corpus
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-EC-001 |
Every explanation or enforcement decision MUST cite evidence by `canonical_hash` references to governance nodes. | Documented in spec |
HATS-EC-002 |
Evidence references MUST include: node type, canonical hash, verification status, and timestamp. | Documented in spec |
HATS-EC-003 |
Implementations MUST NOT present UNVERIFIED evidence as VERIFIED. | Documented in spec |
HATS-EC-004 |
Explanations SHOULD include replay frame references so that cited evidence can be placed in temporal context. | Documented in spec |
HATS-EC-005 |
Evidence chains SHOULD include the full governance ancestry (upstream lineage) of the cited node, enabling independent traversal from the cited node to the governance root. | Documented in spec |
RW — Read/write boundary discipline
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-RW-001 |
A Replay Witness MUST include the frame hash, integrity root, graph root, Merkle root, node count, and scope at the witnessed timestamp. | Documented in spec |
HATS-RW-002 |
A Replay Witness MUST be signed by a key in the governance trust domain. | Documented in spec |
HATS-RW-003 |
Implementations MUST declare the witness completeness level. A `HASH_ONLY` witness proves that a frame existed but does not prove its contents. | Documented in spec |
HATS-RW-004 |
When replaying a subgraph, the witness MUST include a flag indicating partial scope and MUST list the scope filters applied. | Documented in spec |
HATS-RW-005 |
A partial replay witness MUST NOT be presented as a complete replay proof. Implementations MUST distinguish between `FULL_REPLAY` and partial witnesses. | Documented in spec |
CMP — Compatibility profiles
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-CMP-001 |
Policy profiles MUST use namespaced identifiers. Standard profiles use the `HATS:` prefix. | Documented in spec |
HATS-CMP-002 |
Custom compliance profiles MUST use the vendor namespace (Section 21). | Documented in spec |
HATS-CMP-003 |
Compliance profiles MAY inherit from other profiles. A child profile inherits all requirements of the parent and MAY add stricter constraints. | Documented in spec |
HATS-CMP-004 |
When multiple profiles apply to the same operation, the STRICTEST requirement MUST prevail. | Documented in spec |
HATS-CMP-005 |
Compliance profiles MUST specify minimum replay retention periods. Replay data MUST be retained for at least the specified period. | Documented in spec |
COMPAT — Backward-compatibility policy
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-COMPAT-001 |
Every receipt schema MUST have a schema ID and version number. | Documented in spec |
HATS-COMPAT-002 |
A schema registry MUST track minimum compatible versions. A verifier MUST reject receipts with schema versions below the minimum compatible version. | Documented in spec |
HATS-COMPAT-003 |
The following constitute breaking changes: | Documented in spec |
HATS-COMPAT-004 |
Breaking changes MUST increment the transcript version. | Documented in spec |
C — Compliance / capability claims
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-C-001 |
Every HATS governance artifact MUST declare its Cryptographic Profile. | Documented in spec |
HATS-C-002 |
All HATS-Compliant implementations MUST support `HATS-PROFILE-PQ-SHA3-256-v1`. | Documented in spec |
HATS-C-003 |
Implementations MAY define additional profiles using the extension namespace (Section 21). Custom profiles MUST use the prefix `x-hats-profile-`. | Documented in spec |
HATS-C-004 |
When a verifier encounters a bundle using an unsupported profile, it MUST reject the bundle with error `UNSUPPORTED_PROFILE` rather than silently degrading. | Documented in spec |
HATS-C-005 |
Profile migration within a governance graph MUST be documented via a transcript version increment. | Documented in spec |
V — Verifier behavior (general; see V-CHECK for the numbered checks)
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-V-001 |
The verification input MUST be a self-contained bundle: an array of governance nodes plus public keys. No external data sources or network access REQUIRED. | Documented in spec |
HATS-V-002 |
A HATS-Compliant verifier MUST perform these checks: | Documented in spec |
HATS-V-003 |
The verification output MUST include: valid (boolean), nodes_verified (count), errors (array of strings), warnings (array of strings), graph root hash, and Merkle root. | Documented in spec |
HATS-V-004 |
Verifiers MUST NOT silently succeed on partial verification. If any FATAL check fails, the overall result MUST be `valid = false`. | Documented in spec |
SR — Service / runtime rules
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-SR-001 |
Each HATS specification release MUST include: | Documented in spec |
HATS-SR-002 |
The spec hash MUST be computed over the raw UTF-8 bytes of the specification document, excluding the signature block itself. | Documented in spec |
HATS-SR-003 |
Signed releases MUST be published at a stable URL and MUST remain available for at least 10 years after publication. | Documented in spec |
HATS-SR-004 |
HATS versions follow semantic versioning: | Documented in spec |
GC — Governance change discipline
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-GC-001 |
All HATS-Compliant implementations MUST support `NONE` (uncompressed) mode. | Documented in spec |
HATS-GC-002 |
Compressed governance graphs MUST include a decompression witness that allows verification without decompression. | Documented in spec |
HATS-GC-003 |
A compressed graph's root hash MUST be derivable from the uncompressed graph's root hash. Compression MUST NOT change the logical root. | Documented in spec |
HATS-GC-004 |
Compressed bundles MUST include a compression attestation: the compression mode, the original node count, the compressed size, and a signature over the compression parameters. | Documented in spec |
NS — Negative-space / corpus discipline
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-NS-001 |
The following namespaces are reserved: | Documented in spec |
HATS-NS-002 |
Vendor extensions MUST NOT conflict with HATS normative definitions. If a vendor extension is later adopted into the standard, the vendor MUST migrate to the HATS namespace. | Documented in spec |
HATS-NS-003 |
Extension node types MUST use type IDs >= 100. | Documented in spec |
ERR — Error code classification
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-ERR-001 |
All HATS verifier errors MUST use the `HATS_ERR_` prefix. | Documented in spec |
HATS-ERR-002 |
Implementations MUST include the error code, a human-readable message, and the canonical hash of the affected node (when applicable) in every error report. | Documented in spec |
HATS-ERR-003 |
Vendor-specific error codes MUST use the `HATS_ERR_VENDOR_{NAME}_` prefix. | Documented in spec |
EL — Eligibility and licensing
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-EL-001 |
Enforcement severity MUST use the following levels: | Documented in spec |
HATS-EL-002 |
Implementations MUST support at least levels 0, 1, and 4. | Documented in spec |
HATS-EL-003 |
Severity MUST be monotonically increasing per incident. An incident at level 4 MUST NOT be downgraded to level 2 without explicit authorized resolution. | Documented in spec |
RI — Replay-integrity classification levels
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-RI-001 |
Implementations MUST report replay integrity at one of the following levels: | Documented in spec |
HATS-RI-002 |
Each level implies all lower levels. `FULLY_REPLAYABLE` implies `CRYPTOGRAPHICALLY_VALID` implies `STRUCTURALLY_VALID`. | Documented in spec |
E — Evidence binding
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-E-001 |
Enforcement decisions MUST be recorded as governance nodes within the graph. Enforcement operates within the governance chain, not outside it. | Documented in spec |
HATS-E-002 |
Every enforcement decision MUST be signed and produce a verifiable receipt. | Documented in spec |
CP — Conformance profile rules
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-CP-001 |
An implementation MUST declare which Capability Profile(s) it supports. | Documented in spec |
HATS-CP-002 |
Each profile includes all requirements of its parent. `HATS-Federation` includes all of `HATS-Enforcement`, which includes all of `HATS-Replay`, which includes all of `HATS-Core`. | Documented in spec |
AI — AI-specific record_kind extensions
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-AI-001 |
AI governance nodes MUST follow the same envelope format as standard governance nodes (Section 2.1). | Documented in spec |
HATS-AI-002 |
AI governance lineage MUST be replayable using the same replay semantics as standard governance (Section 8). | Documented in spec |
TV — Test vector discipline
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-TV-001 |
Every HATS-Conformant implementation MUST produce identical `root_hash`, `merkle_root`, and `frame_hash` values for every test vector in the corpus. | Documented in spec |
PROFILE-BLAKE — Optional BLAKE3 hash profile (alternative to SHA3-256)
| Code | Meaning | Severity / Verifier status |
|---|---|---|
HATS-PROFILE-BLAKE3 |
v1` | BLAKE3 | ML-DSA-65 | OPTIONAL | | Documented in spec |
Cross-references
- Implementation registry:
scif-backend/src/bin/h33_verifier.rsclassify_errors()+classify_timestamp_violations()— the canonical code-emission sites. - Public verifier playground: /verify-the-story/playground/ — drag-and-drop a bundle; the JSON output names every code emitted.
- Verification model: /standards/verification-model/ — defines the two verdict classes (
STRUCTURALLY_VALID,FULLY_REPLAYABLE) and theNOT_PERFORMEDreason codes. - Open-source verifier: github.com/H33ai/h33-verifier — the WASM verifier referenced above.
Generated 164 codes from scif-backend/docs/HATS-GOVERNANCE-SPEC-v1.md. The registry is normative for verifier interop; meanings preserved from the backend specification.