Name the important things
Map the entities and relationships in one scoped workflow to the source code that implements them.
OntologyEX / developer preview
Select a workflow. Have your agent build a source-linked domain model. Compile it into a portable skill with explicit rules, implementation mappings, and questions that still need answers. Your agent does the modeling. The local tools verify structure and source bytes, not semantic correctness.
Context worth keeping
Keep implementation behavior, intended requirements, and unresolved questions distinct. Give the next agent a model it can inspect rather than another undocumented assumption.
Map the entities and relationships in one scoped workflow to the source code that implements them.
Capture exact source spans with a deterministic helper. Review whether those spans support the proposed interpretation.
Conflicts, inferences, and unsupported checks remain visible review blockers.
How it works
The existing coding agent interprets the domain. The tools preserve selected sources, capture evidence, bound compilation attempts, and package a candidate.
Acknowledge the source boundary. Build the four-layer model from the selected code and documentation.
Capture exact quotations and hashes. Correct structural errors within at most three tracked submissions.
Inspect the report and unresolved questions. Export the relevant context for a fresh agent session.
Checks are not permissions. A successful build does not establish business-rule truth, authenticate supplied inputs, or authorize a production action.
Start with the result
Python 3.11+ and PyYAML are enough for the local demo. It uses a pre-authored payments model, not a live agent or a real transaction.
git clone https://github.com/New1Direction/OntologyEX.git
cd OntologyEX
python3 -m venv .venv
source .venv/bin/activate
python -m pip install 'PyYAML==6.0.3'
python examples/payments-domain/demo.pyOpen build/payments-demo/v2/payments-domain/report.html. The demo checks both valid and invalid refunds, detects stale source snapshots, and compares two policy versions.
On Windows PowerShell, activate with .venv\Scripts\Activate.ps1. For a repeat run, choose a fresh --out directory.
python ontology-extraction/scripts/install.py \
--project /path/to/your-projectIn a fresh Claude Code session in that project, ask /ontology-extraction to onboard one workflow. Keep your normal tool-approval settings.
Use a source-only project, let the installed agent author the model, and evaluate a separate session's output. The pilot guide separates actual agent work from scripted replay.
What is verified
CI runs regression tests and the examples on Python 3.11 and 3.13. Behavioral fixtures and fresh-agent performance are different kinds of evidence.
A pre-authored model and in-memory ledger demonstrate refund rules, legitimate success, source drift, and a policy revision.
The cachetools case exercises actual pinned library behavior using a developer-authored model and reference adapter. Replaying it is not autonomous extraction.
Native host activation, first-time-user onboarding, and raw/Markdown/skill performance comparisons still need actual recorded runs. No improvement percentage is claimed.
Preserve corrections
Freeze a new snapshot, propose corrections, compare candidates, and retest affected tasks. Accepted knowledge is not silently replaced.
Compare selected current files with their snapshot. Hashes establish byte identity, not source truth.
Inspect changes to source evidence and contract items. The impact report conservatively identifies tasks to rerun.
Semantic review and independent tests remain outside the proposing agent. There is no automatic deployment or promotion.
Open source / MIT
The default branch contains the compiler, guided skill, evidence helper, examples, and tests. The historical archives in source/ are not the current installation package.