Knowledge Model
Declare meaning, containment, and relationships independently.
Ontology specifies the kinds and fields a corpus permits. Topology specifies containment and tier shape. A graph consists of actual nodes and edges, with declared sources and readers. These axes are orthogonal: a graph can be structurally valid yet semantically invalid, or the reverse. Conformance compares authored declarations to instances in both directions.
Ontology
Kinds and their required properties
An ontology declares which kinds of node exist and what fields or relationships each kind requires. Kinds are explicit data, not guessed from directory depth. Validation can therefore report missing properties, unknown kinds, and disallowed relationships. In racecar the architecture and lexicon trees each declare their own schema, enabling the system to check the corpus against rules authored separately from the instances.
Topology
Permitted containment and tier shape
Topology describes where nodes may occur and which kinds may contain others. It is orthogonal to ontology: the same kinds can be arranged in a permitted or forbidden shape. The lexicon's simple rule permits nouns to contain nouns and verbs, while verbs contain nothing. The architecture tree has its own parent and peer rules. A topology check inspects structure rather than prose.
Graph
Instances, edges, provenance, and readers
The graph is the actual corpus: nodes and edges with identities, properties, and relationships. A graph declaration identifies its node, edge, source, and reader. Readers are named for the mechanism by which they read, not for a single graph they happen to serve. Materialization makes edges, orphans, and coverage inspectable. The manifest is a queryable projection of the authored graph, not a substitute for it.
Declared Graphs
Explicit sources and independent readers
The declared-graph inventory enumerates graphs from docs/graphs/declared/. Each declaration states the node, edge, source, and reader contract. Reader implementations are generic to a mechanism. This avoids embedding a new bespoke parser in every graph declaration and allows the same check machinery to validate distinct corpora. Source completeness and provenance matter: the graph must account for the source it claims to represent.