# ASTP — AI State Tree Protocol — Documentation

> ASTP is an open protocol for **cognitive persistence** and **verifiable
> cognition** in multi-agent systems: it records that an agent reasoned, what
> state resulted, and makes that record cryptographically verifiable and
> re-interpretable. Bring your own cognitive architecture.

Most ASTP implementations are done by AI coding agents. This file, the
companion AGENTS.md, and the ASTP Docs MCP server exist so those agents
implement the protocol from its normative text instead of guessing (which
produces non-conforming adapters).

## Implementing the protocol

- Prefer the **ASTP Docs MCP server** for exact lookups — it returns
  governance rules, conformance vectors, sections, and hash preimages verbatim
  with citations: `search_spec`, `get_governance_rule` (G-1..G-43),
  `get_conformance_vectors` (e.g. RP-009 or a family like RP), `get_section`,
  `get_hash_preimage`, `get_test_vectors` (the machine-readable expected digests),
  `get_license_terms` (the licensing documents, verbatim), `corpus_info`.
- Hash preimages, field order, and governance rules are **normative and exact**
  — read them, do not infer them. A wrong field set or order produces a
  different content hash and a non-conforming implementation.

## Normative documents (open corpus)

- SPEC.md — the canonical protocol specification, 6.0.2 (§1–§22; governance G-1..G-43)
- PROTOCOL-CONFORMANCE.md — what a Conforming Implementation is: the profiles, the governance rules each carries, and how conformance is claimed (draft, pending ratification)
- CONFORMANCE-REPRODUCIBILITY.md — seal constructions and reproducibility (RP-*), with vectors/5.0.0/seal-constructions.json
- GLOSSARY.md — every term, reconciled with the SPEC
- GOVERNANCE.md / VERSIONING.md — how the protocol changes; Episodes of Record
- CONFORMANCE-CONTEXT.md — §4.8–§4.9, §5.7.3 context commitment and erasure (CM-*), with vectors/6.0.0/context-commitment.json; IMPLEMENTATION-CONTEXT.md is its implementation guide
- docs/RATIFICATION-5.0.0.md / docs/RATIFICATION-6.0.0.md — the 5.0.0 and 6.0.0 Episode of Record statements
- CONFORMANCE-BFM.md — §19 branch/fork/merge, asides, soliloquies
- CONFORMANCE-CROSS-EPISODE-LINKING.md — §20 cross-episode linking and grouping
- CONFORMANCE-LAYER3.md — §21 Workflow & Execution DAG
- IMPLEMENTATION-PHASE3.md / CONFORMANCE-TRUST.md — §16 trust infrastructure (keys, anchoring, witnesses, chain proofs)

The protocol names storage roles, not providers (SPEC §12.1). Storage-layout guides for §19–§21 are a deployment's, not the protocol's, and ship with the reference deployment's adapter rather than in this corpus.
- GLOSSARY.md, CHANGELOG.md, VERSIONING.md

## Licensing (served verbatim, never indexed)

- LICENSE.txt — the Apache License, Version 2.0
- NOTICE — copyright; the protocol-name policy ("ASTP" is free to use as a name, and using it does not by itself assert conformance); the trademark position
- PATENTS.md — a patent pledge to Conforming Implementations, separate from and in addition to the Apache license

Get all three, whole, with the get_license_terms tool (or GET /license-terms). They are not in search results, and the chat head does not summarise them: read the text, not a paraphrase. Not legal advice.

## Optional

- A public web assistant (Clotho-lite) answers questions grounded in these same
  documents, citing the same passages the MCP server returns.
