fabio-rovai/open-ontologies

▲ 110 stars today★ 903⑂ 113

Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.

About fabio-rovai/open-ontologies

fabio-rovai/open-ontologies is an open-source project on GitHub, mainly written in Rust. Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check. It currently holds 903 stars and 113 forks with 20 open issues, and was last pushed on 2026-10-01 (repository created 2026-03-09).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #41 with 110 new stars today.

GitHub Repository Details

Repository fabio-rovai/open-ontologies · default branch main · size 232020 KB · watchers 12 · source: GitHub REST API and repository README

README

https://github.com/fabio-rovai/open-ontologies/blob/HEAD/Open Ontologies

Open Ontologies

Plan a change to a production ontology. See every consequence before you apply it.
Then give the reviewer a proof that they can check without trust in you.

Open Ontologies is written in Rust. It ships as one binary.

tesseractsemantics.com

https://github.com/fabio-rovai/open-ontologies/blob/HEAD/Tesseract Semantics https://github.com/fabio-rovai/open-ontologies/blob/HEAD/Stars https://github.com/fabio-rovai/open-ontologies/blob/HEAD/MIT https://github.com/fabio-rovai/open-ontologies/blob/HEAD/GHCR https://github.com/fabio-rovai/open-ontologies/blob/HEAD/Sponsors

English · 简体中文

https://github.com/fabio-rovai/open-ontologies/blob/HEAD/Try it in the browser

Put in one spreadsheet. Get one ontology, with the evidence for each line. Then change one cell, and see the shape find the error. The page runs the released binary.

Look for enterprise support? tesseractsemantics.com
The engine is MIT, and it stays MIT. The platform is the hosted version of the engine.

---

https://github.com/fabio-rovai/open-ontologies/blob/HEAD/A hand-drawn animation of ies-core.ttl. A person asserts the grey edges. The engine derives the green edges, and Lean 4 checks the one certificate that holds them. Four provers read the clauses and give opinions. A forged red line is refused, and a question the file cannot be asked comes back unasked.

426 asserted, 259 certified, 1 rejected. The engine derived the green edges. A Lean 4 checker then proved them. One certificate holds all 259, and one run of the checker accepts it. The red edge is a forged line. The same checker refused that line, gave exit 1, and named the rule. The run supplies each count. Nobody writes a count into the caption.

https://github.com/fabio-rovai/open-ontologies/blob/HEAD/HQDM as two shipped files side by side. Left, the RDFS rendering: 23 terms used as a class but never declared drawn as hollow red rings and 12 rdfs:range declarations naming a relation drawn as red edges. Right, the OWL rendering: 195 named classes this engine found satisfiable, 39 it could not decide drawn amber, and a red ring on the 39 of those that HermiT calls unsatisfiable.

The same machinery, on a file from a different group, two times. HQDM ships as two files. hqdmTop/hqdmFramework publishes an RDFS file. MagmaCore keeps a copy of that file, byte for byte. gchq/HQDM publishes an OWL file. The two files fail different checks. The RDFS file has no owl: term and no disjointness axiom. Thus no named class in that file can be unsatisfiable. But the file has 23 terms that it uses as a class and never declares. It has 12 rdfs:range declarations that name a relation and not a class. It also has 13 pairs of names that differ by one final underscore. Three of those pairs have the same domain and the same range. The OWL file passes all three checks, and the OWL file is not coherent. The tableaux of this engine finds 195 of its named classes satisfiable. The tableaux cannot decide 39. HermiT calls exactly those 39 unsatisfiable, and HermiT is an opinion in the vocabulary of this repository. This figure proves nothing, and the figure does not claim a proof. A test computes each count again, and the test also computes that intersection. For the source and the method, read docs/assets/hqdm/PROVENANCE.md.

One triple. Nothing added, nothing removed, blast radius zero. 901 consequences that were not there before.

$ printf 'load base.ttl\nplan proposed.ttl\n' | open-ontologies batch -

the whole change: ex:hasParent rdfs:domain ex:Person

added_classes 0 removed_classes 0 blast_radius 0 triples affected risk_score low ──────────────────────────────────────────── conservativity not_conservative_under_rule_table new consequences 901 rule table owl-rl, in 0.04s

Each number from a shape diff tells you that this change is safe. But the change gave a new type to each individual that the property already had. The tool closes this gap. A text diff cannot show you the gap. The change is one correct line, and the text diff is one line long.

Then give the reviewer the proof. The run writes a certificate. A different person re-verifies months later. That person needs no instance of this software and no network. The command is oo-cert asserted.tsv derivations.tsv. The exit code is 0, and the theorem OOCert.certificate_sound covers the result.

The checker also refuses a forged proof. Write a false conclusion into the derivation file. The same checker exits 1 and names the rule that does not hold. This is the red edge in the figure above. This refusal, and not the headline, is the part that survives examination.

This is not an ontology editor. Use Protégé to draw class hierarchies. You
run Open Ontologies on the change, before the change goes to production.
> The tool is like Terraform, and this is on purpose. But the plan is semantic,
not syntactic. A text diff is git diff, and you have git diff already.

You do not need a JVM. You do not need Protégé. The engine speaks MCP to Claude, to Cursor, and to other clients of that protocol.

See the engine at work

https://github.com/fabio-rovai/open-ontologies/blob/HEAD/A terminal runs the Lean certificate checker while a supplier graph lights up beside it: three asserted edges in grey, three derived edges in green that the checker accepts, then one conclusion forged and the same checker refusing it in red

Three triples go in, and three triples come out. A person asserted only that ex:Northwind is in a sanctioned jurisdiction. The engine derived the need for enhanced due diligence. A different person can check that derivation. That person does not have to trust you, or this engine, or the model that wrote the ontology.

Watch the last seconds. Somebody forges one conclusion, and leaves the two premises exactly as they were. The same checker refuses the conclusion and names the rule. oo-horn printed each line in that terminal for the fixtures in tests/fixtures/horn/supplier/. A test runs the checker again. The test fails if the figure and the checker do not agree.

With a proof, and without a proof

| | An ordinary reasoner | Open Ontologies | | --- | --- | --- | | The answer | Northwind needs enhanced due diligence | the same answer | | Why the answer holds | "the reasoner says so" | a certificate that names each rule and each premise | | Who can check the answer | a second implementation can agree, and some reasoners give an explanation. No verified checker accepts either one | anybody, with a checker that shares no code with the engine | | If the engine has a defect | a second implementation can disagree. Then you know only that one of the two is wrong | the checker refuses the answer, exit 1 | | If a person edits the output | you cannot find the edit | the checker refuses it, and names the line and the rule | | If a rule was yours, not the standard's | the report is the same | a different verdict word, and a test holds that word | | What an auditor receives | a screenshot | a file that the auditor can check again | | Guarantee on an unsatisfiability answer | asserted | none, and the tool says so |

If the tool measures a property, the tool says measured. If a prover gives an opinion, that opinion never takes the vocabulary of the checker. Read what the tool proves, and what it does not prove.

What the tool does

| Capability | What you get | | --- | --- | | Reason over OWL and RDFS | Materialised inferences and a derivation certificate that a proved checker accepts | | Use your own rules | SWRL, RIF Core or a Horn table, evaluated, with a verdict word that says the rules were yours | | Validate against SHACL | A report from an evaluator with a measurement against the W3C suite, not an assertion of success | | Ask if something is satisfiable | A finite model, replayed and checked, and not only a yes | | Ask if something is inconsistent | A refutation, if one is certifiable. If not, an honest opinion from the engine | | Retrieve a slice for RAG | Entailment preservation for each claim, because 99% coverage can still lose the one triple that mattered | | Change an ontology in production | Plan, blast radius, risk score, locked IRIs, apply, monitor, drift, rollback | | Load real data | CSV, JSON, XML, YAML, XLSX, Parquet, PostgreSQL and DuckDB into RDF | | Give the problem to a prover | TPTP, CLIF, SMT-LIB and LADR from one translation. The tool names and counts what it cannot export | | Work from an assistant | An MCP server, so Claude or Cursor operates all of it in conversation |

Run the checker yourself

The repository holds the three files. The output shows only the important fields.

$ cd lean && lake build            # builds the checkers, core Lean 4, no Mathlib
$ F=../tests/fixtures/horn

$ lake exe oo-horn check $F/builtin_rules.tsv $F/asserted.tsv $F/good.tsv {"ok":true,"verdict":"entailed","theorem":"OOCert.entails_of_builtin_horn", "means":"every conclusion is true in every model of the asserted graph"}

$ lake exe oo-horn check $F/builtin_rules.tsv $F/asserted.tsv $F/bad_conclusion.tsv {"ok":false} # one IRI in the conclusion changed. exit 1.

$ lake exe oo-horn check $F/user_rules.tsv $F/asserted.tsv $F/good.tsv {"ok":true,"verdict":"entailed_under_supplied_rules","theorem":"OOCert.horn_certificate_sound"}

The third line is the important one. The inference is the same. But you wrote one of the rules. Thus the rule is an assumption that the certificate carries, and it is not a fact that the certificate establishes. The verdict word changes. A test fails if that word stops changing.

flowchart LR
  E["Untrusted engine
Rust, or the pure-Python one"] -->|certificate| C["Verified checker
core Lean 4"] I["Isabelle/HOL
independent second kernel"] -.->|same bytes| C C -->|built-in rules| A["entailed"] C -->|your rules| B["entailed_under_supplied_rules"] C -->|forged| X["refused, exit 1"]

Run the tool on your own ontology

The repository ships those fixtures. Now do the same steps with a file that you write. These steps take one minute.

mkdir /tmp/oo-demo && cd /tmp/oo-demo
cat > coffee.ttl <<'EOF'
@prefix ex:    .
@prefix rdfs:  .

ex:Espresso rdfs:subClassOf ex:Coffee . ex:Coffee rdfs:subClassOf ex:Drink . ex:myCup a ex:Espresso . EOF

export OPEN_ONTOLOGIES_STORAGE_MODE=persistent # in-memory by default, see below open-ontologies --data-dir /tmp/oo-demo/store load coffee.ttl open-ontologies --data-dir /tmp/oo-demo/store reason --profile rdfs --certificate ./cert

Three triples go in, and three triples come out. The cup is a Coffee. The cup is a Drink. Espresso is a subclass of Drink. Each RDFS reasoner can do this much. The directory that the run wrote is the difference.

lake exe oo-cert /tmp/oo-demo/cert/asserted.tsv /tmp/oo-demo/cert/derivations.tsv
{"ok":true,"asserted":3,"derivations":3,"theorem":"OOCert.certificate_sound"}

Now tell the checker a lie. Keep the premises, and forge one conclusion. The forged conclusion says that the cup is a Beer:

cp -r /tmp/oo-demo/cert /tmp/oo-demo/forged
sed -i '' 's|example.org/Drink>\t|example.org/Beer>\t|' \
  /tmp/oo-demo/forged/derivations.tsv     # GNU sed: drop the '' after -i
lake exe oo-cert /tmp/oo-demo/forged/asserted.tsv /tmp/oo-demo/forged/derivations.tsv
{"ok":false,"asserted":3,"derivations":3,"first_rejected":2,"rule":"rdfs9",
 "conclusion":" <...#type> ",
 "premises":[" <...#type> ",
             " <...#subClassOf> "]}

The exit code is 1. The output gives the number of the bad line. It names the rule. It also shows the premises, so that you can see that the premises do not support the conclusion.

What the proof contains

The proof is two tab-separated files. For the run above, the two files are 1.3 KB. asserted.tsv holds your claims:

                
        
      

derivations.tsv holds one line for each step. Each line gives the rule, then the conclusion, then the premises for that conclusion.

rdfs9                                
rdfs11               
rdfs9                                   

That is the full proof. It needs no model, no network and no vendor.

A checker reads each line. For each line, the checker derives the conclusion again from the premises of that line, under the rule that the line names. The checker then confirms that each premise is asserted, or that an earlier line concluded it. Anybody can write such a checker. This checker has a soundness theorem.

Who checks the certificate, and when

The certificate is a file. Thus the person who holds the file can check it, at any time that they choose.

| Who | When | What they run | | --- | --- | --- | | You, in the loop | at each run, before you trust an answer | lake exe oo-cert, next to the reasoner | | A reviewer | when a change lands | the same command in CI, on the artefact that the run wrote | | An auditor, months later | long after the engine moved on | the same command, on the archived files | | A different agent | when it receives a claim from an agent that it does not trust | the same command, before it acts on the claim |

The tool streams nothing, and the tool calls no home server. The engine and the checker share bytes on a disk, and they share no protocol. This is what makes the last two rows possible. An auditor who checks a claim next year needs the two files and a Lean build. That auditor does not need an instance of this software.

The certificate records a digest of the assertions that the run used. The file asserted.sha256 holds that digest, next to the two other files. A holder of a store runs certificate-check . The command reads the digest, computes the same digest from the store, and reports whether the two agree.

That answer has a limit, and the command states the limit. A digest binds a certificate to bytes. It does not bind a certificate to a state of the world. A store that changed and then changed back gives the same answer. The type-level form of this work is decision 0010, and that work is open.

One case needs a word, because you will meet it. reason writes its inferences into the store by default. A check after such a run finds more triples in the store than the certificate lists. The report names that cause, and it does not call the store a different graph. It says different graph only when a triple in the store is not a conclusion of the run.

Two defaults can cause you trouble. First, storage is in-memory, unless you set OPEN_ONTOLOGIES_STORAGE_MODE=persistent. Thus a load and then a reason starts from an empty store, and certifies nothing. The tool gives a warning, and you can miss that warning easily. Second, --data-dir is a flag and not an environment variable. Thus a demonstration without that flag writes into ~/.open-ontologies, next to your real work.

The discipline behind this work has a cost, and the discipline has earned that cost: what the rules are, and what each rule caught.

Three claims that used to travel on trust

Three claims, each one checked against a real run

A crosswalk states a match type. Nothing checked that statement. The engine now reasons over each side alone. It compares what each side entails, through the mapping itself. It then reports the tightest match type the evidence supports.

An exactMatch that the entailments do not support comes back downgraded. The report gives the reason. It also names every term the crosswalk does not carry. That second list is the one that disappears from most crosswalk files. The output is valid SSSOM, so your tools read it today.

A second question is sharper than a downgrade. The engine carries the translated claims into the target and reasons again. A clash means the target denies what the mapping carried in. That is a disagreement, and a person must settle it.

Contexts can disagree. Birds fly. Penguins are birds, and penguins do not fly. One graph that holds both is inconsistent, and this engine finds the clash. Each module reasons alone instead. A fact earns "true everywhere" when k modules of n entail it.

A number can now carry a certificate. oo-matcert recomputes a matrix product from the definition. It prints MatCert.mul_of_check when it accepts. Integers only, and that is the condition for the sentence to hold. Freivalds costs less and gives a probability, so it stays an opinion with its bound printed. Floating point reports a tolerance, because a proof over the real numbers says nothing about IEEE-754.

open-ontologies batch plan.json   # crosswalk-certify, modules --threshold k, matcert

What the tool proves

| You ask | You get back | Checked against | | --- | --- | --- | | Reason over OWL | A derivation certificate | OOCert.certificate_sound | | Reason with rules that you wrote | A certificate, and a different verdict word | OOCert.horn_certificate_sound | | Is this satisfiable | A finite model | Dl.satisfiable_of_checkModel | | Is the model of a solver real | The model, replayed | Fol.satisfiable_of_check | | Is this inconsistent | A refutation | OOCert.refutation_sound | | Does this data fit the shapes | A validation report | Shacl.validate_spec | | Does a retrieval slice still support the answer | Preservation for each claim | OOCert.certificate_sound |

A retrieval slice with 99% coverage can lose the one triple that an answer needs. A slice with 60% coverage can keep each claim that matters. Coverage is a proxy, and the proxy rises as the slice grows.

Thus a retriever that you tune on coverage learns to fetch more, and not to fetch the correct triples. Entailment preservation is the property that you want. The tool can decide that property here, and it gives one certificate for each claim. See decision 0007.

A measurement of the loss is the second-best answer. The best answer is a subset that can lose nothing. onto_module_extract computes such a subset. It computes a syntactic locality module over a signature. Each entailment of the full ontology over those terms is also an entailment of the subset.

That guarantee is a theorem of Cuenca Grau, Horrocks, Kazakov and Sattler, JAIR 31 (2008). The tool CITES that theorem, and no machine checks it here. No file under lean/ is about locality, and the report says exactly that.

The report names no theorem of this project. It offers a measurement instead. It reasons over the ontology and over the module to a fixpoint. It then reports each conclusion over the signature that the module does not reach. On the pizza ontology of this repository, the module is 238 of 1,345 axioms.

The run lost zero conclusions out of 2,583 differences. onto_conservative_check uses the same machinery for the lifecycle. It answers one question: does the addition of these axioms change any consequence over the names that the ontology already used? See decision 0011.

Install

# macOS (Apple Silicon)
curl -LO https://github.com/fabio-rovai/open-ontologies/releases/latest/download/open-ontologies-aarch64-apple-darwin
chmod +x open-ontologies-aarch64-apple-darwin && mv open-ontologies-aarch64-apple-darwin /usr/local/bin/open-ontologies

Linux (x86_64)

curl -LO https://github.com/fabio-rovai/open-ontologies/releases/latest/download/open-ontologies-x86_64-unknown-linux-gnu chmod +x open-ontologies-x86_64-unknown-linux-gnu && mv open-ontologies-x86_64-unknown-linux-gnu /usr/local/bin/open-ontologies

Docker

docker pull ghcr.io/fabio-rovai/open-ontologies:latest

From source (Rust 1.85+)

cargo build --release --features embeddings,plugins,sql

For Intel macOS, for native Windows and for other systems, read docs/quickstart.md and docs/windows.md.

The serve command starts an MCP server. That server speaks JSON-RPC on stdin and stdout. Thus, at start, the server looks as if it stopped, while it waits for a client. This behaviour is correct. From a terminal, use the CLI subcommands instead, for example open-ontologies validate .

Connect the tool to Claude

For Claude Code, add this block to ~/.claude/settings.json. For Claude Desktop, add the block to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "open-ontologies": {
      "command": "/path/to/open-ontologies",
      "args": ["serve"]
    }
  }
}

Start the client again, and the onto_* tools are available. For Cursor, for Windsurf, for Zed and for VS Code, read docs/quickstart.md.

Stars

https://github.com/fabio-rovai/open-ontologies/blob/HEAD/Star history

What the box contains

One loop: `

GitHub Stars & Activity

903Stars
113Forks
20Open issues
RustLanguage

GitHub Popularity

GitHub stars903
Forks113
Open issues20
Primary languageRust
LicenseMIT
Stars gained today110
Created2026-03-09
Last pushed2026-10-01

Trending History

Daily boardrank #41 · ▲ 110 stars

Related GitHub Projects

1

tinyhumansai / openhuman

Rust★ 41,565⑂ 4,094▲ 495 stars
→
2

emilk / egui

Rust★ 30,966⑂ 2,171▲ 43 stars
→
3

trycua / cua

Rust★ 28,691⑂ 2,037▲ 229 stars
→
4

GraphiteEditor / Graphite

Rust★ 27,492⑂ 1,281▲ 51 stars
→
5

AprilNEA / OpenLogi

Rust★ 23,081⑂ 771▲ 105 stars
→
6

xingkongliang / skills-manager

Rust★ 5,692⑂ 482▲ 71 stars
→
7

storytold / artcraft

Rust★ 4,493⑂ 573▲ 1,403 stars
→
8

martin-olivier / airgorah

Rust★ 3,891⑂ 674▲ 55 stars
→

More Trending Repositories