Schema

Schema

Describe data structures using verified schema evidence.

Status: Partial implementation reference — Code-confirmed; operational validation pending

Last reviewed: 2026-10-19

Scope

Entities, fields, types, relationships, validation and schema evolution. The source-confirmed baseline below covers part of this scope; remaining operational details are unknown.

Current implementation baseline

The Corpus clean-install schema defines conversations, messages, immutable changes, message tags/agent references, FTS5, relationships/retractions, active relationship keys, retry records, archive membership, corpus identity and public archive certificates. It also defines immutable selective-import provenance and singleton fork-ancestry records. Legacy segment/index tables coexist; their presence does not make them recovery authorities.

Messages store optional content and JSON text in structured_payload; SQL NULL denotes absence, while the JSON text null is a present payload. Schema name/version are paired; service-generated validation status describes validation against an exact catalogue version. See the accepted payload contract.

The Registration schema separately defines agents. Existing Corpus lineage/archive migrations are in migrations; they are not a complete automatic upgrade plan for every earlier schema. Do not apply the clean-install schema to an existing corpus. See lineage recovery guidance.