LinkedIn Post · Tony Seale · 2026

Ontology IS Code

An ontology is not a database artefact — it is logic. Formal, expressive, versioned. Your ontology is source code for your meaning.

Author: Tony Seale 3 Core Principles 6 Commentator Insights 12 FAQs · 10 Glossary Terms · 7 HowTo Steps

Three Principles of Ontology as Code

Tony Seale argues that every ontology should satisfy three non-negotiable engineering criteria.

1
⚙️

Ontologies Should Compile

Syntax must be valid, all classes satisfiable, and all entailments exactly as expected. An absent entailment is a test failure. Shipping an ontology that contradicts itself is equivalent to shipping application code that crashes on import.

→ Build System Parallel
2
📄

Ontologies Should Live in Plain Text

Plain text files give you diffs, branches, blame, pull requests, and review in context. Critical now that LLMs are in the loop: you want the LLM to read, navigate, and edit ontology source directly — not only through an API or MCP server.

→ Version Control Parallel
3
🏛️

Ontologies Should Be Governed Like Code

Branches, pull requests, reviews, automated checks, releases. Engineering organisations already do all of this. The artefact deciding what the organisation means by a customer, an order, or a risk should not be governed less rigorously than the CSS on the marketing site.

→ DevOps Parallel

Software Engineering Parallels

Each ontology-as-code principle maps directly to an established software engineering practice.

Ontology Practice SE Parallel Equivalent Tooling
Satisfiability + Entailment Checks Build System HermiT / ELK reasoner as compiler; failed satisfiability = build error; missing entailment = failing unit test
Plain-Text RDF Turtle Files Version Control (Git) diff, branch, blame, pull request, review — exactly as for application code; LLMs read/edit directly
Branch / PR / Release Workflow DevOps / CI-CD GitHub Actions / GitLab CI with reasoner validation, semantic versioning (MAJOR.MINOR.PATCH)

Commentator Perspectives

Practitioners from the knowledge graph and semantic web community responded with complementary insights, caveats, and extensions.

JS
Juan Sequeda Principal Data Strategist, ServiceNow

Caution About New Ontology Tool Vendors — Everyone should be very careful with new tools and vendors reframing themselves as ontology tools. Vendor claims should be scrutinised against the compile-branch-govern standard.

NM
Nicolas Matentzoglu Independent Consultant — Semantic Technology

Highly Regular Ontologies May Tolerate Table-Driven Curation — For large (>10K entity) highly regular ontologies such as anatomy or chemistry, it is sometimes acceptable to curate in a table and map each row to a design pattern — provided the mapping generates compilable Turtle.

RS
Robert Sanderson Senior Director Digital Cultural Heritage, Yale University

Vocabulary vs Ontology Distinction Matters — Raises whether vocabularies and taxonomies should also be treated as code, noting that large regular knowledge bases may be closer to vocabularies than full ontologies.

VH
Veronika Heimsbakk Knowledge Graph Specialist, Author, Speaker

Four Lines of Python to Migrate from Table to Turtle — Migrating an ontology from an EAV table to RDF Turtle can require as few as four lines of Python. Shares the RDF Vendor Landscape resource for tooling overview.

Ontology as Typed Python Objects — Executable Ubiquitous Language — Proposes projecting ontology as typed Python objects using @kgbo decorators so engineers interact with familiar programming models. Ontology remains governed logic; developer experience feels like engineering with types, diffs, and PRs.

KG Explorer

Interactive D3.js force-directed graph derived from the companion RDF/Turtle artifact. Click nodes to resolve via URIBurner. Click into graph area to activate zoom.

27 nodes · 35 links

Density

Node Types

Search

Graph Settings

Scroll to zoom · Click outside to release

SPARQL Query Examples

All queries target the named graph at the URIBurner DAV path. No Sponger pragma required — data must be pre-loaded.

Q1 · Ontology Principles and Descriptions

Endpoint: linkeddata.uriburner.com/sparql · Type: SELECT · Format: text/x-html+tr

PREFIX schema: <http://schema.org/>
PREFIX : <https://www.linkedin.com/posts/tonyseale_did-you-start-building-your-ontology-as-a-share-7463353332565356545-jY54/#>

SELECT ?principle ?name ?description
FROM <https://linkeddata.uriburner.com/DAV/demos/daas/tony-seale-ontology-is-code-claude_sonnet4.ttl>
WHERE {
  ?principle a :OntologyPrinciple ;
             schema:name ?name ;
             schema:description ?description .
}
ORDER BY ?name
▶ Run live query
Q2 · Persons and Organizational Affiliations

Endpoint: linkeddata.uriburner.com/sparql · Type: SELECT · Format: text/x-html+tr

PREFIX schema: <http://schema.org/>

SELECT ?person ?name ?title ?org
FROM <https://linkeddata.uriburner.com/DAV/demos/daas/tony-seale-ontology-is-code-claude_sonnet4.ttl>
WHERE {
  ?person a schema:Person ;
          schema:name ?name .
  OPTIONAL { ?person schema:jobTitle ?title . }
  OPTIONAL { ?person schema:worksFor ?orgNode . ?orgNode schema:name ?org . }
}
ORDER BY ?name
▶ Run live query
Q3 · Commentator Insights

Endpoint: linkeddata.uriburner.com/sparql · Type: SELECT · Format: text/x-html+tr

PREFIX schema: <http://schema.org/>
PREFIX : <https://www.linkedin.com/posts/tonyseale_did-you-start-building-your-ontology-as-a-share-7463353332565356545-jY54/#>

SELECT ?insight ?name ?authorName
FROM <https://linkeddata.uriburner.com/DAV/demos/daas/tony-seale-ontology-is-code-claude_sonnet4.ttl>
WHERE {
  ?insight a :CommentatorInsight ;
           schema:name ?name ;
           schema:author ?author .
  ?author schema:name ?authorName .
}
ORDER BY ?authorName
▶ Run live query
Q4 · Engineering Parallels

Endpoint: linkeddata.uriburner.com/sparql · Type: SELECT · Format: text/x-html+tr

PREFIX schema: <http://schema.org/>
PREFIX : <https://www.linkedin.com/posts/tonyseale_did-you-start-building-your-ontology-as-a-share-7463353332565356545-jY54/#>

SELECT ?parallel ?name ?description
FROM <https://linkeddata.uriburner.com/DAV/demos/daas/tony-seale-ontology-is-code-claude_sonnet4.ttl>
WHERE {
  ?parallel a :EngineeringParallel ;
            schema:name ?name ;
            schema:description ?description .
}
ORDER BY ?name
▶ Run live query

Frequently Asked Questions

12 common questions about ontology-as-code practice.

What does 'Ontology IS Code' mean?
Answer: It means an ontology should be treated as a first-class software engineering artefact: written in plain text, compiled to check correctness, version-controlled with Git, governed through pull requests and automated checks, and released with semantic versioning — not stored as rows in a custom database table.
Why do software engineers instinctively put ontologies in databases?
Answer: Because software engineers have spent careers modelling customers, orders, and events as database rows. The instinct is understandable but wrong: an ontology is logic, not data.
What does it mean for an ontology to compile?
Answer: Running a reasoner that verifies: all syntax is valid, all classes are satisfiable, and all expected entailments hold. An absent entailment is a test failure. Two contradictory axioms should break the build, exactly as a type error breaks compilation of application code.
Why should an ontology live in plain text files?
Answer: Plain text gives you diffs, branches, line-level blame, pull requests, and review in context. Especially important with LLMs in the loop: you want the LLM to read, navigate, and edit ontology source directly.
How should ontologies be governed?
Answer: With branches, pull requests, code review, automated CI checks (syntax validation, reasoner runs, regression tests), and formal releases. Engineering organisations already do all of this for application code.
What role should LLMs play in ontology development?
Answer: LLMs should have direct access to ontology source files — to read, navigate, and edit them — not only indirect access through APIs. Plain-text RDF (Turtle, OWL/Manchester) is human-readable shorthand that LLMs handle well.
How is an absent entailment like a test failure?
Answer: If you state axioms and expect the reasoner to derive a conclusion, and it does not, that gap reveals a logic error — a missing axiom, wrong domain/range, or incorrect subclass chain. Equivalent to a failing unit test discovered by a customer.
What is the difference between an ontology and a database schema?
Answer: A database schema defines storage structure and constraints for rows. An ontology declares what kinds of things exist, how they relate, and what cannot both be true — it is formal logic that admits automated reasoning.
Can large highly regular ontologies still use table-driven curation?
Answer: For ontologies with >10K highly regular entities (anatomy, biological traits, chemistry), it is sometimes acceptable to curate in a table and map each row to a design pattern — provided the mapping generates compilable Turtle and the result is governed as code.
What is the 'CSS on your marketing site' analogy?
Answer: The artefact deciding what an organisation means by a customer, order, or risk should not be governed less rigorously than the styling on the company website. CSS has branches, PRs, and CI; the core ontology often does not — and that imbalance is indefensible.
What RDF serialisation is best for treating ontologies as code?
Answer: RDF Turtle is most recommended for ontology-as-code workflows because it is human-readable, diff-friendly, and plays well with SDLC tools. OWL/Manchester Syntax is an alternative for heavily axiom-rich models.
What does 'your ontology is source code for your meaning' imply?
Answer: The ontology is the primary authoritative specification of what concepts mean in an organisation — not documentation, not a data dictionary, but executable, versioned, tested code that drives downstream systems.

Ontology Engineering Glossary

10 key terms defined in the knowledge graph.

Ontology

A formal specification of concepts within a domain, the relationships among them, and the constraints that cannot simultaneously hold — expressed as axioms amenable to automated reasoning.

Axiom

A formal logical statement that asserts a fact or constraint about the domain model, e.g. that every Person has exactly one birthdate.

Entailment

A conclusion that logically follows from a set of axioms. An absent expected entailment is treated as a test failure in ontology-as-code practice.

Satisfiability

A class is satisfiable if it could have at least one instance. An unsatisfiable class indicates contradictory axioms and should break the ontology build.

Version Control

A system (typically Git) for tracking changes to files over time, enabling branches, diffs, blame, and pull requests — the foundation ontologies should adopt.

OWL (Web Ontology Language)

The W3C standard language for authoring ontologies, built on Description Logic. Supports rich axiom expressivity and decidable automated reasoning.

RDF Turtle

A compact, human-readable plain-text serialisation of RDF triples. Diff-friendly, well-supported by LLMs, and compatible with standard SDLC tooling.

Reasoner

Software (e.g., HermiT, Pellet, ELK) that applies Description Logic rules to derive implicit facts and check satisfiability. Acts as the "compiler" in ontology-as-code pipelines.

Pull Request

A mechanism in Git-based workflows for proposing, reviewing, discussing, and merging changes — bringing peer review to ontology development exactly as for application code.

Formal Logic

A precise system of rules for deriving valid conclusions. OWL ontologies are grounded in Description Logic, a decidable fragment of first-order logic.

How to Treat Your Ontology as Source Code

Seven steps to adopting ontology-as-code practice within an engineering organisation.

1

Choose a Plain-Text RDF Notation

Select RDF Turtle (.ttl) or OWL/Manchester Syntax as your canonical format. Both are human-readable, diff-friendly, and well-supported by LLMs.

2

Initialise a Git Repository for the Ontology

Create a dedicated Git repository containing only ontology source files. Commit the initial TTL, add a .gitignore for reasoner cache artefacts, and push to a shared remote.

3

Add a CI Pipeline with Reasoner Validation

Configure a CI workflow that runs on every commit: validate Turtle syntax, run a reasoner to check satisfiability, and assert all expected entailments are present. Fail the build on any violation.

4

Define a Branching Strategy

Adopt a branching convention: main for released versions, feature branches for new terms or axioms. Protect main with required CI passes and at least one reviewer approval.

5

Establish a Pull Request and Review Process

Require pull requests for all changes. Reviewers check logical correctness, naming conventions, documentation completeness, and test coverage.

6

Integrate LLM Tooling for Assisted Authoring

Give your LLM direct read/write access to ontology source files — not just an API or MCP wrapper. The LLM can propose new terms, spot duplicate concepts, and draft axioms within the same file-edit workflow.

7

Define a Release and Semantic Versioning Policy

Tag releases using semantic versioning (MAJOR.MINOR.PATCH). Publish a CHANGELOG with each release. A MAJOR bump signals breaking changes; MINOR adds terms backwards-compatibly.