Definition
The schema declares names and types only — it does not carry values. The same schema is referenced by every document that conforms to it and every circuit that proves against it. This is the contract layer between issuer, verifier, and AI consumer.
Because a circuit's constraint system depends on the exact hash representation of the inputs, the schema must pin not just the typed fields but the normalization pipeline (the WASM module hash) that produces those inputs. Changing the normalization changes the constraint, which changes the verifying key — so a new normalize artifact is a new schema id.
Versioning is by id (for example "age-over-eighteen.v2"), not by mutation. Old schemas remain queryable so existing documents and proofs stay verifiable forever; new schemas are independent ids that can coexist.
Lemma implementation
A schema is registered against a scope via schemas.register in the SDK. The payload is a SchemaMeta with id, optional description, and a required NormalizeArtifact (WASM URL + hash + ABI).
Downstream artifacts — generators, circuits, and documents — reference the schema by id. AI agents querying through MCP or x402 use the schema id to know what attributes a verified document exposes.
For verifiable AI workflows such as provenance-tracked RAG, the schema serves as the contract between issuer and retriever: the issuer signs documents to fit the schema, and the retriever validates that the returned document's docHash binds to the same normalize artifact the schema declares.