← Ontology Builder · Jannah Capital Neuroplast · OD101 Methodology — Architecture

A publishable ontology, refined through seven steps.

A pairing of a Python MCP server of atomic ontology-engineering tools and a Claude Code plugin that encodes the Ontology Development 101 seven-step methodology as slash commands, SKILL.md prose, sub-agents, and hooks. A non-expert customer — a technical lead working alongside an async domain SME — drives the whole workflow inside Claude Code and ships a validated canonical ontology (OWL + SHACL + docs) for their business domain. There is no custom UI: Claude Code is the UI. The methodology is what we're proving.

Commands/ontology: 13 slash commands SpineOD101 · 7 steps EngineMCP · rdflib · pyshacl Artifact14-slot git bundle DomainsCredit + Legal Status● Phase 7 · M3
01

The three planes

human intent → deterministic computation → durable artifact
Technical lead drives the pipeline inside Claude Code
Domain SME reviews async via Gmail / Slack / Linear
Neuroplast hosts the customer git working tree · repatriation always available
Pl

Plugin

Claude Code · the surface

A GSD-style plugin: /ontology:* slash commands, SKILL.md prose, two sub-agents, and fail-closed hooks. The conversation is real; the human confirms every gray area. Shipped via an npx installer.

slash commandsOD101 driver
sub-agentsreuse-scout · term-clusterer
hooks500-LOC · kebab · step-gatefail-closed
SKILL.mdmethodology prose
drives
Ec

Engine

Python MCP · LLM proposes, server disposes

Atomic tools behind a stable wire contract. A three-phase prepare/submit/finalize_locked handler; deterministic server-side engines return severity-tagged findings. rdflib + pyshacl, LOCAL-only. State persists to a durable session store.

tools/3-phase handlerstyped wire
engineshygiene · SHACL · coveragedeterministic
session.sqlitesteps · repliescold-resume
owl2shaclvendored TTL · LGPLadvanced
emits
Bn

Bundle

Neuroplast git · the artifact

A canonical 14-slot bundle tree in a Neuroplast-hosted repo. Every step writes real Turtle, SHACL, SPARQL, and docs. Five CI gates decide publishability. rm -rf .ontology-builder/ leaves a tool-agnostic, repatriation-safe bundle.

ontology/ttl + owlOWL 2
shapes/structural·policy·manualSHACL
instances/ · questions/gold·edge + CQtests
.github/workflows/5 CI gatespublishable?
02

The OD101 spine

every command drives one atomic MCP tool — no bespoke branches
OD101 step
Maturity
Surface
03

The deterministic engines

the LLM proposes the judgment; the server disposes the structure

Structural hygiene

classes + properties

Findings by 4-level severity. A class cycle is a HARD_FAIL halt; count ≥ 250 is a HARD_PAUSE; missing owl:inverseOf partners and non-most-general attachment are WARN.

SHACL generation

owl2shacl · pyshacl

Vendored owl2shacl rules run via pyshacl advanced=True to materialize shapes, then partition into structural.ttl (auto) + policy.ttl (SME-confirmed). 14-construct gap report seeds manual.ttl.

Divergence diff

tightening gate

On regeneration, a triple-set diff detects tightened constraints (maxCount lowered, facet narrowed) across every policy-routed predicate and demands a justification note before re-lock.

Instance coverage

3 guarantees

Every class gets a conforming gold instance; every CQ yields a non-empty answer; every policy shape gets an edge-case that trips it with the expected violation.

Reuse ranking

LOV · schema.org · Wikidata

A 5-component score ranks reuse candidates per scoped term; a license-incompatibility detector gates each accept. Server-verified provenance on every term.

CQ answerability

SPARQL regression

Each CQ-NNN.rq runs against gold instances; byte-exact compare to expected/CQ-NNN.json. Per-CQ answerable flag + coverage %, kept distinct from regression.

04

Production guarantees

integrity · isolation · privacy — from commit 01

Publish hard-block

SC5 / C8

Any SHACL violation on the customer's own gold fixtures, or any CQ regression failure, makes finalize raise and the validate step is not recorded. Zero violations on publish, or publish is blocked.

Local-only parse

no SSRF

Every rdflib/pyshacl parse uses source=, never location=<URL>; owl2shacl rules load from vendored local TTL. An AST lock keeps the whole package outbound-clean.

manual.ttl never-clobbered

D6-07

Hand-authored shapes the generator can't produce — the credit LTV ≤ 0.8 / DTI ≤ 0.43 xsd facets — live in manual.ttl, which regeneration is forbidden to overwrite. Byte-identity tested.

SME ≥ 80% sign-off

concept coverage

A structured checklist scores "concepts I'd have included" vs "concepts present", plus predicate-coverage and CQ-answerability — ≥ 80% on both test domains. Tooling ships; real-SME sign-off is human-gated.

500-LOC cap · prod-ready

D3

Hard 500-line cap per file, split before crossing. Tests, types, error handling, and metadata-only structured logging on every commit — no MVP shortcuts.

Telemetry privacy

opt-in

Opt-in only, and it never captures customer-private content — no extracted terms, no document text, no SME replies. Only methodology-friction signals, behind a pydantic field-allowlist.

05

The bundle topology

14 canonical slots · CI-gated · repatriation-safe
◆ Neuroplast-hosted git working tree
Gmail SME review · draft + reply
Slack SME review · post + ts anchor
Linear SME review · issue tracker
↓  HITL channel layer — async SME review on the configured channel; the absolute message identifier (Gmail thread id / Slack ts) is persisted so /ontology:resume recovers the reply days later  ↓
ontology · shapes · tests — the canonical RDF
OWL 2
ontology/
ontology.ttl + ontology.owl RDF/XML mirror
SHACL
shapes/
structural ∪ policy ∪ manual → shapes.ttl + valid/invalid fixtures
test data
instances/
gold/ conforming + edge-cases/ must-violate
SPARQL
competency-questions/
sparql/CQ-NNN.rq + expected/CQ-NNN.json
docs · evaluation · sign-off · CI
human-readable
docs/
ORSD · term-inventory · concept-map · reuse-report
quality
evaluation/
OOPS! pitfall report under threshold + eval report
human gate
sign-off/
SME concept-coverage checklist · ≥ 80% bar
5 gates
.github/workflows/
riot · pyshacl valid · pyshacl invalid · CQ regression · OOPS!
tool state
.ontology-builder/
rm -rf → tool-agnostic, repatriation-safe bundle
1Scope. /ontology:scope reads the bundle's sources/, proposes 8–15 competency questions, locks the ORSD, and fires the first SME review on the channel.
2Reuse → Terms. reuse-scout ranks LOV/schema.org/Wikidata candidates with license gates; extract_terms + term-clusterer triage the inventory and cluster synonyms.
3Classes. The Mermaid concept map renders before RDF (picture first); hygiene halts on a cycle; finalize_locked emits the map then ontology.ttl.
4Properties + SHACL. Slots and facets fuse in one pass; each object property gets an owl:inverseOf partner; owl2shacl materializes shapes, partitioned + SME-confirmed.
5Instances + Validate. Gold + edge instances exercise every class/CQ/shape; run_validation composes the shapes, runs conformance + CQ regression, and hard-blocks on any violation.
6Resume. /ontology:resume renders the OD101 step map from session state and captures pending SME replies from the recorded channel anchor — any session resumable cold by session_id.
7Publish. /ontology:publish renders docs + the eval report, commits the complete bundle, and pushes — triggering the 5 real CI gates that decide publishability (Phase 8).
8Sign-off. The SME fills the concept-coverage checklist async; ≥ 80% on credit + legal closes the M3 acceptance. Real-partner sign-off + ONBD-04 are human-gated.
06

Walking skeleton, then vertical deepening

build plumbing · wire all 13 commands · deepen one or two per phase
1
Scaffolding & FoundationPlugin repo · MCP skeleton · 14-slot bundle tree · CI gate skeleton · invariant hooks · hosting + distribution + auth resolved
✓ M1
2
Walking SkeletonAll 13 commands callable end-to-end with stub tools · full pipeline emits a stub bundle · HITL proxy + STATE.md persistence wired
✓ M1
3
Deepen scope + HITL resilienceReal RAG competency-question proposal · ORSD emission · absolute-message-ID channel persistence
✓ M2
4
Deepen reuse + license disciplineReal reuse-scout across LOV/schema.org/Wikidata · 5-component ranking · per-term provenance · license-incompatibility detector
✓ M2
5
Deepen terms + classesReal term extraction + synonym clustering + OD101 hygiene hooks + concept-map render before RDF
✓ M2
6
Deepen properties + real SHACLFused slots+facets · generate_shacl_shapes via owl2shacl+pyshacl · structural/policy partition · 14-construct gap report + manual.ttl
✓ M3
7
Deepen instances + validate + CI gates + sign-offReal instance coverage · run_validation hard-block · both bundles ship · SME ≥80% tooling · ONBD-04 reproducibility — 5/6 plans done, live two-bundle dogfood pending
● M3