Skip to content

The self-describing ontology

The outputs of the design process are not documents about the ontology — they are part of the ontology, written into the repo under the ontology/ namespace using a conventional suite of Shapes. Shapes are Things, so contracts are Assertions about the Shapes they govern, version-bound to the exact schema revision. The result is a self-documenting repo: an agent can read the charter, the questions, every type’s identity test, every predicate’s direction and naming recipe, the adversarial cases, and the evaluation record — all by query, no out-of-band documents.

ShapeKindAboutRole (stage that produces it)
OntologyCharterThing—mission, non-goals, binding commitments, dependencies (Stage 0)
CompetencyQuestionThing—a question the ontology must answer (Stage 1)
SemanticContractAssertiona Shapedefinition, identity test, counterexamples (Stage 2)
PredicateDeclarationAssertiona predicate Shapedirection, member patterns, subject-name recipe, cardinality, anti-inferences (Stage 3)
NamingContractAssertiona Shapename template, segment semantics, globs, identity-stability test (Stage 4)
GoldenCaseThing—adversarial case pointing at live exemplar wrefs (Stage 5)
OntologyDecisionThing—consequential open/resolved choice with alternatives and reopening evidence (all stages)
release SetCollection—the versioned set of contract assertions = one ontology release (Stage 9/10)
CompetencyEvaluationAssertiona CompetencyQuestiona specific release answers this question — carries release: wref, the query, and the result digest (Stage 9/10)

Full field-level specifications are in the Ontology Shape reference. Conventions:

  • Instances live under ontology/<kind>/... names, one kind segment per Shape: ontology/questions/..., ontology/contracts/..., ontology/predicates/..., ontology/naming-contracts/..., ontology/golden-cases/..., ontology/decisions/..., and ontology/evaluations/.... The name does not give an instance its Shape; each instance declares its Shape in shapes, for example "shapes": ["CompetencyQuestion"] on ontology/questions/water/001. See naming as navigation.
  • Two instances keep fixed historical names instead: the charter, OntologyCharter/ontology/charter, and the release Set, Set/ontology/release. External tools fetch them by these exact names (see the Ontology Shape reference). Their first segment does not select a Shape either, and ontology/** does not match them, so read them by name.
  • The ontology description is repo-scoped. The ontology/ namespace and the two fixed names describe only the ontology within its repo: the charter charters this repo; contracts are asserted only about Shapes this repo owns; releases pin this repo’s contracts. A repo’s steward cannot bind other repos, and must not try.
  • Cross-repo relationships are dependency declarations, not membership. An ontology that composes over upstream repos records them in OntologyCharter.dependsOn — ideally pinned to the upstream ontology’s release Set, like a lockfile. Contracts about upstream Shapes belong to the upstream steward; what a consumer owns is its dependency, its bridges, and its own derived contracts.
  • Multi-owner arrangements need no special case: a “hub” is simply another repo whose ontology is a composition ontology — its charter declares dependencies on the member ontologies, described repo-scoped like everything else.

The ten stages produce these instances directly — the worked example fills them in as it goes.