You are working in an ontology repository. Your job is to preserve semantic quality and long-term maintainability. Never "just edit labels". Treat every change as a semantic change unless proven otherwise.
- Do not change meaning silently.
- Do not invent or rename ontology terms. If labels/definitions are missing, list them; do not fabricate.
- If you cannot justify a change with the ontology's modeling patterns and scope, stop and propose alternatives.
- Release manifest (the contract downstream tools read):
hcmo.yaml— its shape is an API; keep it stable. - Hand-authored ontology source modules:
ontology/modules/*.ttl(the checksummed end-userexternal-upperpresentation;hcm-core,hcm-bio,hcm-env,hcm-obs,hcm-tech; and the migration-onlyhcm-compat). - Optional developer profile:
ontology/profiles/external-upper-developer.ttl— restores the source-faithful BFO/IAO intermediate hierarchy and is excluded from the default release manifest. - External-vocabulary contract:
external-vocabularies.yaml— separate from the stablehcmo.yamlAPI; records versions, namespaces, used terms, and source checksums. - SKOS vocabularies (CBox, not in the release manifest):
vocabularies/.file-formats.ttlanddata-access-methods.ttlare hand-authored;vendors.ttl,systems.ttl, and the contribution-form chips are generated fromdocs/hcm-systems/CATALOG.mdand those files bytooling/export_hcm_vocab.py(never hand-edit them). Shapes:shapes/vocab-shapes.ttl. - Mapping registries:
mappings/semantic/contains review-only SSSOM tables;mappings/exchange/contains directional serialization contracts. Neither registry is merged into canonical HCMO reasoning by default. - JSON-LD context:
ontology/context.jsonld - Generated artifacts (never hand-edit):
dist/(hcmo.ttlmerged/canonical,hcmo.owl,hcmo.json,profile.json). - Shapes / constraints:
shapes/ - Examples (ABox):
examples/ - Interoperability fixtures:
examples/isa-roundtrip/(generated canonical RDF, extended ISA RO-Crate, data files, and controlled-loss manifests). - Queries + competency-question index:
queries/(competency_questions.yaml,cq-*.rq) - Tooling:
tooling/build.py(regenerate dist),tooling/validate.py(CI gate). - Docs:
docs/(incl.docs/MISSING-DEFINITIONS.md). - Previous ontology (HCMO 1.0.0, retained not deleted):
ontology/legacy/.
If these paths change, update this map and hcmo.yaml before editing.
- Base namespace:
https://w3id.org/hcmo/ontology/hcm# - Ontology IRI:
https://w3id.org/hcmo/ontology/hcm· versionIRI…/hcm/0.4.1 - Module sub-namespaces:
…/hcm/bio#,…/hcm/env#,…/hcm/obs#,…/hcm/tech# - Never re-mint IRIs for existing concepts. Deprecate instead. Keep the namespace exactly as authored; if it must change, call it out and bump
owl:versionIRI.
- Each class/property SHOULD have an
rdfs:label, a textual definition (rdfs:commentand/orIAO:0000115), and a lightweight provenance note. - Missing labels/definitions are tracked in
docs/MISSING-DEFINITIONS.md— fill them at the source module; do not invent. - Avoid definition-by-example and circular definitions.
- Put each term in the correct module by namespace (
hcm-core/bio/env/obs). - Keep "core" minimal; push application-specific constraints to
shapes/orexamples/. dist/is always regenerated from modules — never edit it by hand.
Run, in order, from the repo root:
python tooling/build.py— regeneratedist/+profile.json(must be reproducible: re-running produces no diff).python tooling/validate.py— parses every TTL, runs pySHACL ofshapes/againstexamples/, runs eachqueries/cq-*.rqagainst the merged graph; exits non-zero on failure.- Commit
dist/changes alongside the module changes (CI fails ifdist/is stale).
When asked to change anything:
- Produce a short PLAN: modules touched, impacted terms, expected semantic effect, commands to run.
- Implement the smallest correct change in
ontology/modules/. - Run the quality gates above.
- Summarize results + provide a PR-ready
CHANGELOG.mdentry (with a### Renamedsection if any term moved, asold -> new).
- Do NOT delete terms that may be referenced externally. Deprecate and map replacements.
- Do NOT "rename by IRI change". Labels can change; IRIs should not.
- Everything in
dist/is generated — regenerate, never hand-edit. - If a request conflicts with best practice, push back and offer 2–3 safer alternatives.