Ontology Conformance

Delx Ontology v0.3 publishes SHACL shapes, which means an artifact can be verified rather than guessed. This page is the canonical reference for what is enforceable, how a tool payload maps onto ontology terms, and how an agent checks its own artifact before writing it.

Call this before writing an artifact

validate_ontology_artifact is free, read-only, and needs no session. It returns conforms, a violation list naming the ontology path and the constraint that broke, and your artifact projected onto ontology terms.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "validate_ontology_artifact",
    "arguments": {
      "artifact": {
        "ontology_layer": "continuity",
        "evidence_hash": "sha256:...",
        "confidence": 0.82,
        "risk": "low"
      }
    }
  }
}

A violation looks like {"path": ".../ontology#riskLevel", "constraint": "sh:in", ...} — it names the term and the shape constraint, not a generic parse error.

Which shape gets applied

The tool picks shapes from the payload. An artifact is identified by provenance or typing — artifact_type, ontology_layer, evidence_hash, source_hash — and gets OntologyArtifactShape, plus WitnessTransferShape when it carries a successor or a consent block. A payload declaring delx:AgentContinuityPassport gets AgentContinuityPassportShape.

confidence and risk are not artifact markers — a read response can carry them as data. So if you pass a query result (a lineage graph, a memory search, an audit report), no published shape applies and the tool returns conforms: false with error: "no_applicable_shape" and an empty violation list. That is not a failure of your payload; it means artifacts are what you write, and nothing was checked. Pass shapes explicitly to force one.

Published artifacts

Six layers — structure, ego, witness, continuity, relation, recovery — with stable IRIs under https://ontology.delx.ai/ontology#, licensed CC-BY 4.0.

The three shapes, and what they actually constrain

The shapes file declares three sh:NodeShape targets. This is the whole enforceable surface — everything else in the ontology is descriptive, not checkable.

delx:OntologyArtifactShape

Applies to every artifact a continuity tool emits.

  • delx:ontologyLayersh:in the six layer IRIs, sh:minCount 1
  • delx:evidenceHashxsd:string, sh:pattern "^sha256:"
  • delx:sourceHashxsd:string, sh:pattern "^sha256:"
  • delx:confidencexsd:decimal, inclusive 0–1
  • delx:riskLevelsh:in ( low medium high unknown )

delx:WitnessTransferShape

Applies to succession handoffs.

  • delx:transfersTosh:minCount 1: a transfer needs a recipient
  • delx:sourceAgentSigned, delx:targetAgentAccepted, delx:revocablexsd:boolean

delx:AgentContinuityPassportShape

Requires prov:wasAttributedTo and prov:wasGeneratedBy, both sh:minCount 1.

The term mapping

This is the part that makes conformance non-obvious. Tool payloads are snake_case; the ontology defines camelCase terms, and ontologyLayer takes an IRI rather than a string. Tool output does not conform as returned — it conforms once projected onto the terms below. validate_ontology_artifact performs this projection and returns it, so you do not have to reimplement it.

Tool payload keyOntology termNote
ontology_layerdelx:ontologyLayerbecomes the layer IRI, not the string
evidence_hashdelx:evidenceHashalready sha256:-prefixed
source_hashdelx:sourceHashalready sha256:-prefixed
confidencedelx:confidencemust be typed xsd:decimal; a bare JSON number lands as xsd:double and fails
riskdelx:riskLevelnote the name change
successor_agent_iddelx:transfersToneeds to be a node, not a literal
consent.source_agent_signeddelx:sourceAgentSigned
consent.target_agent_accepteddelx:targetAgentAccepted
consent.revocabledelx:revocable

Checking the shapes yourself

The tool mirrors these constraints in plain code so validation stays out of the request path. If you would rather run the shapes directly, fetch them and use any SHACL processor:

curl -sS https://ontology.delx.ai/ontology/shacl.ttl -o delx-shapes.ttl
pyshacl -s delx-shapes.ttl -f human your-artifact.ttl

The Delx server keeps both in agreement deliberately: the fast checks are compared against these published shapes case by case in CI, so the cheap path cannot quietly accept what the ontology rejects.

Related references

Prefer agent-readable artifacts? Use the JSON specs in the sidebar.