A knowledge base about building knowledge bases. It’s the single source of truth for:
- the method (8 steps, with guiding questions and “done when” checklists)
- the vocabulary a beginner needs (glossary concepts, in plain language)
- principles and decision guides for judgment calls
- the rules
okb validateenforces and the ontology-review skill asks about - the file format okb ontologies use (node/edge type registry)
It’s itself a labeled property graph (LPG). The files are data/nodes.json and data/edges.json (file format). You can load them into the same graph database as your domain KBs.
Grounding#
Every non-toolkit claim is tied to a SourceLocation: a verbatim quote with section and PDF page number, checked word-for-word against the PDF by pnpm verify:quotes.
- Ontology 101: Noy, N.F. & McGuinness, D.L. (2001). Ontology Development 101: A Guide to Creating Your First Ontology. Stanford. The method, rules and wine examples.
- Gruber 1993: Gruber, T.R. A Translation Approach to Portable Ontology Specifications. Knowledge Acquisition 5(2). The definition of an ontology, the “knowledge level” principle, and documentation strings. Page numbers are PDF pages (the PDF has a cover page, so they’re one more than the printed numbers).
Each rule states its basis:
direct: the cited passage states the rule.interpretive: it follows from a cited definition;rationaleexplains the step.operational: a toolkit convention with no source. Says so plainly and cites nothing.
…and its modality, taken from the passage’s own wording (“must”/“should always”/“wrong” → MUST; “should” or an imperative guideline → SHOULD; “consider”/“may”/“can” → MAY). Where the toolkit treats a rule more strictly or leniently than its modality suggests, severity is overridden with a written severityReason (for example hier-no-cycles is SHOULD NOT in the paper but an error here, because okb has no way to declare intended equivalence).
Schema#
| Node | Key properties | Edges |
|---|---|---|
MetaKB |
version, formatVersion |
|
Source |
title, authors, year, url |
|
SourceLocation |
section, page, quote, deepLink |
PART_OF → Source |
Principle |
name, statement, plainLanguage |
CITES → SourceLocation |
Concept |
name, aliases, definition, plainLanguage, example, inThisToolkit, origin |
DEFINED_IN → SourceLocation |
Rule |
key, modality, basis, check, severity, severityReason, fromStep, statement, plainLanguage, review, fix |
JUSTIFIED_BY → Rationale, GOVERNS → Concept |
Rationale |
explanation |
CITES → SourceLocation |
Step |
order, name, goal, whyItMatters, guidingQuestions, outputs, doneWhen, tips, wine, commands |
PRECEDES → Step, APPLIES → Rule, INTRODUCES → Concept, USES → Decision, CITES → SourceLocation |
Decision |
name, whenYouFaceIt, tests[{ask, ifYes, ifNo}], note, wine |
CITES → SourceLocation |
NodeType, EdgeType |
the okb file-format registry; origin is ontology101 or operational |
MODELS → Concept |
Editing#
- Edit
packages/okb/src/*.yaml. Quotes must be copied exactly; use...for a deliberate gap. pnpm verify:quotes: compilesdata/, re-checks every quote againstsources/*.pdf, and fails on any inconsistency (see the header ofbuild.tsfor the full list).- If you added a mechanical/heuristic rule, add a check with the same id to
packages/okb/src/checks.tsand a fixture topackages/okb/tests/checks.test.ts. The build and the test suite both fail until you do. pnpm run docs && pnpm test.- Bump
VERSIONinbuild.tswhen rules change meaning or a shipped skill’s instructions change (a patch version for skill-only changes), and update the**Version X.Y.Z.**line at the top of eachpackages/okb/skills/*/SKILL.mdto match. Add an entry to the changelog. Ontologies record the meta-KB version they were created with (okb.json).
Changelog#
What changed in each version, from the first draft to now, is in the changelog, which also lists the package releases. How the package and meta-KB versions relate is in Releases.