The full ontology authoring workflow as a single skill. Take a topic or source paper, research it, extract concepts/relations/axioms, scaffold the ontology with define_ontology!, scaffold candidate functors and adjunctions to existing related ontologies, run the laws check, run gap analysis, and report. Produces a draft for human review — does not auto-commit.
The closing-loop skill. Composes most of the other skills in this directory to take pr4xis from "a topic to encode" to "a tested, integrated draft ontology" in one invocation.
When the user wants to add a new domain to pr4xis from a published source paper (or set of papers). This skill is the operationalization of the principle "every ontology is grounded in research, encoded as code, and verified by tests".
This is the most ambitious skill in the directory. The first few runs will need substantial human review of the generated draft. Treat its output as a starting point, not finished work.
propulsion-cycles, enzyme-kinetics, pregroup-grammar-extensions)["natural/physics", "applied/space/orbit"])crates/domains/src/ (e.g., , , ). If not specified, the skill will infer from the topic.appliednaturalformalIf no source paper is supplied:
If a source paper is supplied: skip to step 2.
Read the approved paper(s) end to end. Extract structured knowledge:
Entity enum variants (use the paper's terminology verbatim where possible)Axiom impls (each with the paper citation)Quality types (with units)ContextDef entriescitings.md entriesCreate crates/domains/src/<branch>/<topic>/:
ontology.rs — the define_ontology! block, the Entity enum, the Relation typetests.rs — structural law tests (auto-generated by define_ontology!) plus property-based tests for each domain axiommod.rs — wiringpapers/ — directory containing the source paper PDF(s) if a local copy was supplied or downloadedThen add the new module to the parent mod.rs.
Invoke per-ontology-rollout on the new ontology directory to generate:
README.md (via per-ontology-readme)citings.md (via per-ontology-citings) — the source paper from step 1 should be the primary entryper-ontology-mermaid-internal)per-ontology-mermaid-external — initially empty, filled in by step 6)Run cargo check -p pr4xis-domains and cargo test -p pr4xis-domains <topic>::tests. The structural axioms (category laws, taxonomy NoCycles, mereology WeakSupplementation, etc.) are auto-generated and should pass on a well-formed ontology. If they fail, surface the failure and stop.
For each ontology in the workspace that:
…invoke functor-author to scaffold a Functor: New → Existing and a Functor: Existing → New. Each scaffold produces a draft; the todo! cases are surfaced for human review.
For each generated functor, run cargo test -p pr4xis-domains <functor_name>. If the functor has todo! cases, the test will panic — that's expected, surface it for the human. If the functor compiles fully and the laws fail, that's a structural mismatch — report which morphism breaks the laws.
For each pair of generated functors going in opposite directions between the same two ontologies, invoke adjunction-author to scaffold the adjunction.
For each generated adjunction, invoke the existing analyze_* function in crates/domains/src/formal/meta/gap_analysis.rs (or the test that runs it). Report the unit-loss and counit-loss percentages and the entities that collapse. Each collapse is a candidate missing distinction in one of the ontologies — surface it for human consideration of a ContextDef resolution.
cargo test --workspace. If any pre-existing test that used to pass now fails, the new ontology has introduced a contradiction with an existing one. Surface the conflict, do not auto-fix.
Produce a structured summary:
todo! cases for the human to resolvetodo!s to fill in first, which gaps to investigate, etc.)Then stop. Do not commit. The user reviews and commits.
check_functor_laws (or todo! out the unfilled cases honestly). Do not commit a functor that fails the laws.crates/domains/src/<branch>/<topic>/ already exists, refuse and ask. Pick a different topic name or update the existing one explicitly.todo! in the final report. The user must know what's incomplete before they commit.This skill is the headline use case for the project. When it works well, it makes adding a new domain to pr4xis a one-command operation. When it fails, the failures are educational — they tell the user where the structural assumptions of pr4xis disagree with the real-world domain, which is exactly the kind of friction that makes a categorical substrate worth using.
Expect the first 5-10 invocations to produce drafts that need substantial human revision. Each invocation also improves the skill itself (failure cases reveal where the inference rules are too aggressive or too conservative).