Skip to content

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

docs: add data extension tools to CLAUDE.md and README.md

FABIOTESSee5b983f9908
diff --git a/CLAUDE.md b/CLAUDE.md
index d73a2511..cb4e348f 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -57,6 +57,40 @@ Claude dynamically decides the next tool call based on what the previous tool re
| `onto_version` | To save a named snapshot before making changes |
| `onto_history` | To list saved version snapshots |
| `onto_rollback` | To restore a previous version if something goes wrong |
+| `onto_ingest` | To parse structured data (CSV, JSON, NDJSON, XML, YAML, XLSX, Parquet) into RDF and load into the store |
+| `onto_map` | To generate a mapping config from data schema + loaded ontology for review |
+| `onto_shacl` | To validate loaded data against SHACL shapes (cardinality, datatypes, classes) |
+| `onto_reason` | To run RDFS or OWL-RL inference, materializing inferred triples |
+| `onto_extend` | To run the full pipeline: ingest → SHACL validate → reason in one call |
+
+## Data Extension Workflow
+
+When applying an ontology to external data:
+
+### Inspect and Map
+
+1. Call `onto_map` with the data file — it returns field names, ontology classes/properties, and a suggested mapping
+2. Review the mapping — adjust predicates, set the class, mark lookup fields
+3. Optionally save the mapping to a file for reuse
+
+### Ingest
+
+4. Call `onto_ingest` with the data file and mapping — it generates RDF triples and loads them into the store
+5. Call `onto_stats` to verify triple counts match expectations
+
+### Validate
+
+6. Call `onto_shacl` with SHACL shapes to validate the data against constraints
+7. Fix any violations (adjust mapping or data), re-ingest if needed
+
+### Reason
+
+8. Call `onto_reason` with profile `rdfs` or `owl-rl` to infer new triples
+9. Call `onto_query` to verify inferred knowledge is correct
+
+### Or use the convenience pipeline
+
+10. Call `onto_extend` to run ingest → SHACL → reason in one call
## Enforcer Rules (Optional)
diff --git a/README.md b/README.md
index a938fd8c..a2f603f0 100644
--- a/README.md
+++ b/README.md
@@ -17,11 +17,11 @@ You can ask Claude to generate an ontology in a single prompt — and it will. C
| No scale | Claude's context window can hold ~2,000 triples. Real ontologies (IES4: 10,000+ triples) need an actual triple store. |
| No integration | You can't push to a SPARQL endpoint, pull from a remote ontology, or resolve owl:imports chains. |
-**Open Ontologies solves every one of these.** It's a proper RDF/SPARQL engine (Oxigraph) exposed as 16 ontology MCP tools that Claude calls automatically. Generate → validate → load → query → iterate → persist.
+**Open Ontologies solves every one of these.** It's a proper RDF/SPARQL engine (Oxigraph) exposed as 21 MCP tools that Claude calls automatically. Generate → validate → load → query → iterate → persist.
## What is it?
-Open Ontologies is a standalone MCP server for AI-native ontology engineering. It exposes 16 tools that let Claude validate, query, diff, lint, version, and persist RDF/OWL ontologies using an in-memory Oxigraph triple store.
+Open Ontologies is a standalone MCP server for AI-native ontology engineering. It exposes 21 tools that let Claude validate, query, diff, lint, version, and persist RDF/OWL ontologies using an in-memory Oxigraph triple store.
Written in Rust, ships as a single binary. No JVM, no Protege, no GUI.
@@ -59,7 +59,7 @@ flowchart TD
Version --> Save
```
-This is not a fixed pipeline. The MCP server exposes 16 ontology tools — **Claude is the orchestrator** that decides what to call next based on results. If `onto_validate` fails, Claude fixes the Turtle and retries. If `onto_stats` shows wrong counts, Claude regenerates. If `onto_lint` finds missing labels, Claude adds them.
+This is not a fixed pipeline. The MCP server exposes 21 ontology tools — **Claude is the orchestrator** that decides what to call next based on results. If `onto_validate` fails, Claude fixes the Turtle and retries. If `onto_stats` shows wrong counts, Claude regenerates. If `onto_lint` finds missing labels, Claude adds them.
No Protege. No GUI. No manual class creation. Claude is the ontology engineer, Open Ontologies is the runtime.
@@ -104,6 +104,11 @@ flowchart TD
| `onto_history` | List saved version snapshots |
| `onto_rollback` | Restore a previous version |
| `onto_status` | Server health and loaded triple count |
+| `onto_ingest` | Parse structured data (CSV/JSON/XML/YAML/XLSX/Parquet) into RDF |
+| `onto_map` | Generate mapping config from data schema + ontology |
+| `onto_shacl` | Validate data against SHACL shapes |
+| `onto_reason` | Run RDFS/OWL-RL inference (materialize triples) |
+| `onto_extend` | Full pipeline: ingest → validate → reason |
## Benchmarks