|
| 1 | +# ConceptKernel Base Instance Shapes Ontology |
| 2 | +# Version: v3.6 |
| 3 | +# Date: 2026-04-06 |
| 4 | +# Purpose: OWL classes for base instance shapes — InstanceManifest, SealedInstance, LedgerEntry |
| 5 | + |
| 6 | +@prefix : <https://conceptkernel.org/ontology/v3.6/> . |
| 7 | +@prefix ckp: <https://conceptkernel.org/ontology/v3.6/> . |
| 8 | +@prefix bfo: <http://purl.obolibrary.org/obo/BFO_> . |
| 9 | +@prefix iao: <http://purl.obolibrary.org/obo/IAO_> . |
| 10 | +@prefix owl: <http://www.w3.org/2002/07/owl#> . |
| 11 | +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . |
| 12 | +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . |
| 13 | +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
| 14 | +@prefix dc: <http://purl.org/dc/elements/1.1/> . |
| 15 | +@prefix dcterms: <http://purl.org/dc/terms/> . |
| 16 | +@prefix prov: <http://www.w3.org/ns/prov#> . |
| 17 | + |
| 18 | +<https://conceptkernel.org/ontology/v3.6/base-instances> a owl:Ontology ; |
| 19 | + dc:title "ConceptKernel Base Instance Shapes Ontology" ; |
| 20 | + dc:description "OWL classes defining the base instance shapes for InstanceManifest, SealedInstance, and LedgerEntry" ; |
| 21 | + dcterms:created "2026-04-06"^^xsd:date ; |
| 22 | + dcterms:modified "2026-04-06"^^xsd:date ; |
| 23 | + owl:versionInfo "v3.6" ; |
| 24 | + dcterms:creator "Peter Styk <peter@conceptkernel.org>" ; |
| 25 | + rdfs:seeAlso <https://conceptkernel.org> ; |
| 26 | + rdfs:seeAlso <https://github.com/ConceptKernel> ; |
| 27 | + rdfs:comment "Defines the canonical instance structures. InstanceManifest and LedgerEntry grounded in iao:DataItem." ; |
| 28 | + owl:imports <https://conceptkernel.org/ontology/v3.6/> . |
| 29 | + |
| 30 | +################################################################# |
| 31 | +# InstanceManifest — base class for all instances |
| 32 | +################################################################# |
| 33 | + |
| 34 | +ckp:InstanceManifest a owl:Class ; |
| 35 | + rdfs:subClassOf iao:0000027 ; # iao:DataItem (via ckp:Instance reclassification) |
| 36 | + rdfs:label "Instance Manifest"@en ; |
| 37 | + rdfs:comment "The base shape for all CKP instances. An immutable data item produced by a kernel action. Every instance directory contains a manifest.json conforming to this shape."@en ; |
| 38 | + dc:description "Stored at storage/instances/i-{identifier}/manifest.json" . |
| 39 | + |
| 40 | +### InstanceManifest Properties |
| 41 | + |
| 42 | +ckp:instance_id a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 43 | + rdfs:domain ckp:InstanceManifest ; |
| 44 | + rdfs:range xsd:string ; |
| 45 | + rdfs:label "instance ID"@en ; |
| 46 | + rdfs:comment "Unique identifier for the instance, format: i-{slug}-{epoch}"@en . |
| 47 | + |
| 48 | +ckp:kernel_class a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 49 | + rdfs:domain ckp:InstanceManifest ; |
| 50 | + rdfs:range xsd:string ; |
| 51 | + rdfs:label "kernel class"@en ; |
| 52 | + rdfs:comment "The class name of the kernel that produced this instance (e.g., LOCAL.ClaudeCode)"@en . |
| 53 | + |
| 54 | +ckp:kernel_id a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 55 | + rdfs:domain ckp:InstanceManifest ; |
| 56 | + rdfs:range xsd:string ; |
| 57 | + rdfs:label "kernel ID"@en ; |
| 58 | + rdfs:comment "The unique identifier (GUID) of the kernel that produced this instance"@en . |
| 59 | + |
| 60 | +ckp:created_at a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 61 | + rdfs:domain ckp:InstanceManifest ; |
| 62 | + rdfs:range xsd:dateTime ; |
| 63 | + rdfs:label "created at"@en ; |
| 64 | + rdfs:comment "ISO 8601 timestamp of instance creation"@en . |
| 65 | + |
| 66 | +### Provenance linkage (PROV-O aligned) |
| 67 | + |
| 68 | +ckp:instanceWasGeneratedBy a owl:ObjectProperty , owl:FunctionalProperty ; |
| 69 | + rdfs:subPropertyOf prov:wasGeneratedBy ; |
| 70 | + rdfs:domain ckp:InstanceManifest ; |
| 71 | + rdfs:range prov:Activity ; |
| 72 | + rdfs:label "was generated by"@en ; |
| 73 | + rdfs:comment "The action/activity that generated this instance (prov:wasGeneratedBy)"@en . |
| 74 | + |
| 75 | +ckp:instanceWasAttributedTo a owl:ObjectProperty , owl:FunctionalProperty ; |
| 76 | + rdfs:subPropertyOf prov:wasAttributedTo ; |
| 77 | + rdfs:domain ckp:InstanceManifest ; |
| 78 | + rdfs:range prov:Agent ; |
| 79 | + rdfs:label "was attributed to"@en ; |
| 80 | + rdfs:comment "The kernel/agent responsible for this instance (prov:wasAttributedTo)"@en . |
| 81 | + |
| 82 | +ckp:instanceGeneratedAtTime a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 83 | + rdfs:subPropertyOf prov:generatedAtTime ; |
| 84 | + rdfs:domain ckp:InstanceManifest ; |
| 85 | + rdfs:range xsd:dateTime ; |
| 86 | + rdfs:label "generated at time"@en ; |
| 87 | + rdfs:comment "Timestamp when this instance was generated (prov:generatedAtTime)"@en . |
| 88 | + |
| 89 | +################################################################# |
| 90 | +# SealedInstance — finalized instance with data and refs |
| 91 | +################################################################# |
| 92 | + |
| 93 | +ckp:SealedInstance a owl:Class ; |
| 94 | + rdfs:subClassOf ckp:InstanceManifest ; |
| 95 | + rdfs:label "Sealed Instance"@en ; |
| 96 | + rdfs:comment "A finalized, immutable instance that has been sealed with data, tool reference, and CK reference. Once sealed, the instance and its contents cannot be modified."@en ; |
| 97 | + dc:description "Sealed instances contain data.json, and link back to tool/ and CK loop references" . |
| 98 | + |
| 99 | +### SealedInstance Properties |
| 100 | + |
| 101 | +ckp:data a owl:DatatypeProperty ; |
| 102 | + rdfs:domain ckp:SealedInstance ; |
| 103 | + rdfs:range xsd:string ; |
| 104 | + rdfs:label "data"@en ; |
| 105 | + rdfs:comment "JSON-serialized output data of the sealed instance (stored as data.json). Required — every SealedInstance must contain data."@en . |
| 106 | + |
| 107 | +ckp:tool_ref a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 108 | + rdfs:domain ckp:SealedInstance ; |
| 109 | + rdfs:range xsd:string ; |
| 110 | + rdfs:label "tool reference"@en ; |
| 111 | + rdfs:comment "Reference to the tool loop (processor) that produced this instance, e.g., tool/processor.py"@en . |
| 112 | + |
| 113 | +ckp:ck_ref a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 114 | + rdfs:domain ckp:SealedInstance ; |
| 115 | + rdfs:range xsd:string ; |
| 116 | + rdfs:label "CK reference"@en ; |
| 117 | + rdfs:comment "Reference to the CK loop (conceptkernel.yaml) identity at the time this instance was sealed"@en . |
| 118 | + |
| 119 | +################################################################# |
| 120 | +# LedgerEntry — append-only action log |
| 121 | +################################################################# |
| 122 | + |
| 123 | +ckp:LedgerEntry a owl:Class ; |
| 124 | + rdfs:subClassOf iao:0000027 ; # iao:DataItem |
| 125 | + rdfs:label "Ledger Entry"@en ; |
| 126 | + rdfs:comment "An append-only log entry recording a state transition or action event. Stored in storage/ledger/ as JSONL files, one entry per line."@en ; |
| 127 | + dc:description "Stored at storage/ledger/actions-{date}.jsonl" . |
| 128 | + |
| 129 | +### LedgerEntry Properties |
| 130 | + |
| 131 | +ckp:ledgerTimestamp a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 132 | + rdfs:domain ckp:LedgerEntry ; |
| 133 | + rdfs:range xsd:dateTime ; |
| 134 | + rdfs:label "timestamp"@en ; |
| 135 | + rdfs:comment "ISO 8601 timestamp of when this ledger event occurred"@en . |
| 136 | + |
| 137 | +ckp:ledgerEvent a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 138 | + rdfs:domain ckp:LedgerEntry ; |
| 139 | + rdfs:range xsd:string ; |
| 140 | + rdfs:label "event"@en ; |
| 141 | + rdfs:comment "The event type or action name recorded in this ledger entry (e.g., spawn, seal, context)"@en . |
| 142 | + |
| 143 | +ckp:ledgerBefore a owl:DatatypeProperty ; |
| 144 | + rdfs:domain ckp:LedgerEntry ; |
| 145 | + rdfs:range xsd:string ; |
| 146 | + rdfs:label "before"@en ; |
| 147 | + rdfs:comment "JSON-serialized state before the event (for state transitions)"@en . |
| 148 | + |
| 149 | +ckp:ledgerAfter a owl:DatatypeProperty ; |
| 150 | + rdfs:domain ckp:LedgerEntry ; |
| 151 | + rdfs:range xsd:string ; |
| 152 | + rdfs:label "after"@en ; |
| 153 | + rdfs:comment "JSON-serialized state after the event (for state transitions)"@en . |
| 154 | + |
| 155 | +################################################################# |
| 156 | +################################################################# |
| 157 | + |
| 158 | +################################################################# |
| 159 | +# v3.6: TaskInstance — instance shape for consensus-generated tasks |
| 160 | +################################################################# |
| 161 | + |
| 162 | +ckp:TaskInstance a owl:Class ; |
| 163 | + rdfs:subClassOf ckp:InstanceManifest ; |
| 164 | + rdfs:label "Task Instance"@en ; |
| 165 | + rdfs:comment "An instance shape for consensus-generated tasks. Tasks are concrete work items with an instruction, target file, constraints, executor, and version pin. Generated by CK.Consensus approve action."@en ; |
| 166 | + dc:description "v3.6 addition. Stored at storage/tasks/{task_id}.yaml" . |
| 167 | + |
| 168 | +### TaskInstance Properties |
| 169 | + |
| 170 | +ckp:taskId a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 171 | + rdfs:domain ckp:TaskInstance ; |
| 172 | + rdfs:range xsd:string ; |
| 173 | + rdfs:label "task ID"@en ; |
| 174 | + rdfs:comment "Unique identifier for this task, format: T-{uuid4_prefix}"@en . |
| 175 | + |
| 176 | +ckp:decisionId a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 177 | + rdfs:domain ckp:TaskInstance ; |
| 178 | + rdfs:range xsd:string ; |
| 179 | + rdfs:label "decision ID"@en ; |
| 180 | + rdfs:comment "The consensus decision that generated this task"@en . |
| 181 | + |
| 182 | +ckp:targetFile a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 183 | + rdfs:domain ckp:TaskInstance ; |
| 184 | + rdfs:range xsd:string ; |
| 185 | + rdfs:label "target file"@en ; |
| 186 | + rdfs:comment "The file path that this task modifies"@en . |
| 187 | + |
| 188 | +ckp:taskInstruction a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 189 | + rdfs:domain ckp:TaskInstance ; |
| 190 | + rdfs:range xsd:string ; |
| 191 | + rdfs:label "instruction"@en ; |
| 192 | + rdfs:comment "The instruction for the executor (human-readable specification of what to do)"@en . |
| 193 | + |
| 194 | +ckp:taskStatus a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 195 | + rdfs:domain ckp:TaskInstance ; |
| 196 | + rdfs:range xsd:string ; |
| 197 | + rdfs:label "task status"@en ; |
| 198 | + rdfs:comment "Task lifecycle status: pending, executing, completed, failed"@en . |
| 199 | + |
| 200 | +ckp:taskVersionPin a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 201 | + rdfs:domain ckp:TaskInstance ; |
| 202 | + rdfs:range xsd:string ; |
| 203 | + rdfs:label "version pin"@en ; |
| 204 | + rdfs:comment "Git commit hash — task applies to this specific kernel version"@en . |
| 205 | + |
| 206 | +ckp:taskExecutor a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 207 | + rdfs:domain ckp:TaskInstance ; |
| 208 | + rdfs:range xsd:string ; |
| 209 | + rdfs:label "executor"@en ; |
| 210 | + rdfs:comment "The executor type: headless-claude-code, manual, automated"@en . |
| 211 | + |
| 212 | +################################################################# |
| 213 | +# v3.6: ConversationInstance — instance shape for multi-turn sessions |
| 214 | +################################################################# |
| 215 | + |
| 216 | +ckp:ConversationInstance a owl:Class ; |
| 217 | + rdfs:subClassOf ckp:InstanceManifest ; |
| 218 | + rdfs:label "Conversation Instance"@en ; |
| 219 | + rdfs:comment "An instance shape for recording multi-turn LLM conversation sessions. Stores the conversation context, stream events, and final result. Produced when agent-type kernels execute conversational actions."@en ; |
| 220 | + dc:description "v3.6 addition. Stored at storage/instances/i-{trace}-{ts}/conversation/" . |
| 221 | + |
| 222 | +### ConversationInstance Properties |
| 223 | + |
| 224 | +ckp:conversationTraceId a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 225 | + rdfs:domain ckp:ConversationInstance ; |
| 226 | + rdfs:range xsd:string ; |
| 227 | + rdfs:label "trace ID"@en ; |
| 228 | + rdfs:comment "Trace identifier linking all messages in this conversation"@en . |
| 229 | + |
| 230 | +ckp:conversationPersona a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 231 | + rdfs:domain ckp:ConversationInstance ; |
| 232 | + rdfs:range xsd:string ; |
| 233 | + rdfs:label "persona"@en ; |
| 234 | + rdfs:comment "The persona template used during this conversation"@en . |
| 235 | + |
| 236 | +ckp:conversationModel a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 237 | + rdfs:domain ckp:ConversationInstance ; |
| 238 | + rdfs:range xsd:string ; |
| 239 | + rdfs:label "model"@en ; |
| 240 | + rdfs:comment "The LLM model used for this conversation (e.g., sonnet, opus)"@en . |
| 241 | + |
| 242 | +ckp:conversationTurnCount a owl:DatatypeProperty , owl:FunctionalProperty ; |
| 243 | + rdfs:domain ckp:ConversationInstance ; |
| 244 | + rdfs:range xsd:integer ; |
| 245 | + rdfs:label "turn count"@en ; |
| 246 | + rdfs:comment "Number of conversation turns (assistant messages) in this session"@en . |
| 247 | + |
| 248 | +################################################################# |
| 249 | +# End of ConceptKernel Base Instance Shapes Ontology v3.6 |
| 250 | +################################################################# |
0 commit comments