Ontology & Type Mesh
The ontology layer describes relationships between documents, accounts, transactions, tax categories, evidence references, workflow tags, and Xero entities. The type mesh describes how Rust values move through pipeline stages without losing identity or auditability.
Ontology Role
Ontology operations are exposed through ledgerr_ontology:
query_path: follow relationships between entitiesexport_snapshot: produce a serializable graph snapshotupsert_entities: add or update typed entitiesupsert_edges: add or update relationships
fn document_record() -> ontology_entity
fn account_record() -> ontology_entity
fn transaction() -> ontology_entity
fn xero_contact() -> ontology_entity
fn ontology_entity() -> evidence_path
fn evidence_path() -> tax_assist
flowchart TD
document_record["document_record"]
ontology_entity["ontology_entity"]
account_record["account_record"]
transaction["transaction"]
xero_contact["xero_contact"]
evidence_path["evidence_path"]
tax_assist["tax_assist"]
document_record --> ontology_entity
account_record --> ontology_entity
transaction --> ontology_entity
xero_contact --> ontology_entity
ontology_entity --> evidence_path
evidence_path --> tax_assist
Type Mesh Role
The type mesh answers a different question: which Rust values are compatible between stages, and what bridge is responsible for transforming them?
Examples:
TransactionInputbecomesIngestedTransaction,JournalTransaction, andSampleTransaction.ClassificationOutcomebecomesClassifiedTransactionand review flags.LegalRule + TransactionFactsbecomesZ3Result.VendorConstraintSetbecomesConstraintEvaluation.
Related Tables
The detailed tables are generated:
Update generated tables through the repo tooling rather than hand-editing those chapters.