@agenticprimitives/ontology 1.0.0-alpha.22 → 1.0.0-alpha.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +11 -0
  2. package/cbox/card-projection-shapes.shacl.ttl +216 -0
  3. package/cbox/controlled-vocabularies.ttl +172 -4
  4. package/cbox/naming-registry-shapes.shacl.ttl +272 -0
  5. package/cbox/org-team-shapes.shacl.ttl +184 -0
  6. package/cbox/registry-vocabulary.ttl +86 -0
  7. package/cbox/run-provenance-shapes.shacl.ttl +172 -0
  8. package/context.jsonld +7 -1
  9. package/dist/arg-types.d.ts +60 -0
  10. package/dist/arg-types.d.ts.map +1 -0
  11. package/dist/arg-types.js +143 -0
  12. package/dist/arg-types.js.map +1 -0
  13. package/dist/artifacts.d.ts +4 -2
  14. package/dist/artifacts.d.ts.map +1 -1
  15. package/dist/artifacts.js +22 -0
  16. package/dist/artifacts.js.map +1 -1
  17. package/dist/contact-fields.d.ts +28 -0
  18. package/dist/contact-fields.d.ts.map +1 -0
  19. package/dist/contact-fields.js +38 -0
  20. package/dist/contact-fields.js.map +1 -0
  21. package/dist/decisions.d.ts +69 -0
  22. package/dist/decisions.d.ts.map +1 -0
  23. package/dist/decisions.js +98 -0
  24. package/dist/decisions.js.map +1 -0
  25. package/dist/household.d.ts +19 -0
  26. package/dist/household.d.ts.map +1 -0
  27. package/dist/household.js +41 -0
  28. package/dist/household.js.map +1 -0
  29. package/dist/index.d.ts +230 -0
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +275 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/party-roles.d.ts +106 -0
  34. package/dist/party-roles.d.ts.map +1 -0
  35. package/dist/party-roles.js +305 -0
  36. package/dist/party-roles.js.map +1 -0
  37. package/dist/plan-shapes.d.ts +18 -0
  38. package/dist/plan-shapes.d.ts.map +1 -0
  39. package/dist/plan-shapes.js +38 -0
  40. package/dist/plan-shapes.js.map +1 -0
  41. package/dist/relations.d.ts +44 -0
  42. package/dist/relations.d.ts.map +1 -0
  43. package/dist/relations.js +104 -0
  44. package/dist/relations.js.map +1 -0
  45. package/dist/run-provenance-context.d.ts +211 -0
  46. package/dist/run-provenance-context.d.ts.map +1 -0
  47. package/dist/run-provenance-context.js +219 -0
  48. package/dist/run-provenance-context.js.map +1 -0
  49. package/dist/vault-records.d.ts +74 -0
  50. package/dist/vault-records.d.ts.map +1 -0
  51. package/dist/vault-records.js +330 -0
  52. package/dist/vault-records.js.map +1 -0
  53. package/mappings/agent-discovery-standards.ttl +24 -3
  54. package/mappings/collaboration-crosswalk-organization.ttl +22 -0
  55. package/mappings/collaboration-crosswalk-skills.ttl +5 -0
  56. package/package.json +4 -2
  57. package/run-provenance.jsonld +106 -0
  58. package/tbox/actor-context.ttl +11 -0
  59. package/tbox/agent-resolution.ttl +6 -6
  60. package/tbox/card-projection.ttl +350 -0
  61. package/tbox/contact.ttl +61 -0
  62. package/tbox/context.ttl +114 -0
  63. package/tbox/coordination.ttl +17 -0
  64. package/tbox/core.ttl +232 -12
  65. package/tbox/execution.ttl +168 -0
  66. package/tbox/household.ttl +142 -0
  67. package/tbox/interaction.ttl +13 -0
  68. package/tbox/naming.ttl +114 -0
  69. package/tbox/org.ttl +188 -4
  70. package/tbox/profile.ttl +7 -0
  71. package/tbox/prov-imports.ttl +65 -0
  72. package/tbox/registry.ttl +159 -4
  73. package/tbox/skills.ttl +62 -0
  74. package/tbox/values.ttl +81 -0
@@ -0,0 +1,272 @@
1
+ # C-box — SHACL shapes for typed names, contextual issuance, the workspace agent and registry agents,
2
+ # registration receipts and the lifecycle log (spec 346 §11; ADR-0061).
3
+ #
4
+ # STRUCTURE, NEVER PERMISSION. A typed name that conforms is still only a claim; a receipt that
5
+ # conforms is evidence, not authority (ADR-0020); a conformant lifecycle event proves the log's
6
+ # shape, not the truth of the event. What these refuse is a record that misleads on its face:
7
+ #
8
+ # a `.team` name on a Person — the suffix contradicts the on-chain record; the
9
+ # record wins, so the name must not resolve (§2.3)
10
+ # a workspace agent serving two workspaces — two contexts behind one agentive face
11
+ # a registry agent operating no registry — a '.registry' name that names nothing
12
+ # a receipt that omits a check — 'not verified' silently read as 'verified'
13
+ # a receipt listing a check twice — verified AND failed: which is it?
14
+ # an event with no chain link — an append-only log that can be rewritten
15
+ #
16
+ # SUBCLASS HANDLING. sh:class against ap:Agent / ap:OrganizationAgent relies on the rdfs:subClassOf*
17
+ # closure; shacl-engine 1.1.2 does not compute it. The house test materializes it from the T-box
18
+ # first. The SPARQL constraints need the cbox codelists (controlled-vocabularies.ttl,
19
+ # registry-vocabulary.ttl) IN THE DATA GRAPH — they join on skos:prefLabel / skos:inScheme.
20
+
21
+ @prefix apnam: <https://agenticprimitives.dev/ns/naming#> .
22
+ @prefix ap: <https://agenticprimitives.dev/ns/core#> .
23
+ @prefix aporg: <https://agenticprimitives.dev/ns/org#> .
24
+ @prefix apreg: <https://agenticprimitives.dev/ns/registry#> .
25
+ @prefix apdel: <https://agenticprimitives.dev/ns/delegation#> .
26
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
27
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
28
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
29
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
30
+
31
+ # ─── Typed names (§3.1, §2.3) ───────────────────────────────────────────────
32
+ # Targets names that CARRY a tld. Legacy roots (.agent / .impact) carry none and are exempt — they
33
+ # keep resolving as legacy throughout (spec 346 §3.5); a shape that failed them would be a migration.
34
+
35
+ apnam:TypedAgentNameShape a sh:NodeShape ;
36
+ rdfs:label "TypedAgentName shape" ;
37
+ sh:targetSubjectsOf apnam:tld ;
38
+
39
+ sh:property [
40
+ sh:path apnam:tld ;
41
+ sh:maxCount 1 ; sh:datatype xsd:string ;
42
+ sh:in ( "me" "org" "team" "svc" "workspace" "treasury" "registry" ) ;
43
+ sh:message "Exactly one canonical tld from apnam:tldScheme: me | org | team | svc | workspace | treasury | registry. 'ws' is an alias resolved before storage; .alliance and .agent are reserved/inactive." ;
44
+ ] ;
45
+ sh:property [
46
+ sh:path apnam:resolvesTo ;
47
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:Agent ;
48
+ sh:message "A typed name resolves to exactly one canonical Agent — every suffix names an agent; there are no non-agent subjects in the naming registry (ADR-0061 §4)." ;
49
+ ] ;
50
+ # The suffix is a CLAIM; the SA-keyed ap:agentType record is the authority. Disagreement resolves
51
+ # to null with reason type_mismatch (ADR-0013: empty is an answer) — so it must be a violation here.
52
+ sh:sparql [
53
+ sh:message "The name's tld MUST name the derived type recorded on its target (ap:agentType, via apnam:namesDerivedType). The suffix never overrides the record; the record never bends to the suffix (spec 346 §2.3)." ;
54
+ sh:select """
55
+ SELECT $this ?tld ?actual ?expected WHERE {
56
+ $this <https://agenticprimitives.dev/ns/naming#tld> ?tld ;
57
+ <https://agenticprimitives.dev/ns/naming#resolvesTo> ?agent .
58
+ ?agent <https://agenticprimitives.dev/ns/core#agentType> ?actual .
59
+ ?concept <http://www.w3.org/2004/02/skos/core#inScheme> <https://agenticprimitives.dev/ns/naming#tldScheme> ;
60
+ <http://www.w3.org/2004/02/skos/core#prefLabel> ?tld ;
61
+ <https://agenticprimitives.dev/ns/naming#namesDerivedType> ?expected .
62
+ FILTER (?actual != ?expected)
63
+ }
64
+ """ ;
65
+ ] .
66
+
67
+ # ─── Contextual issuance (§3.2, §9) ─────────────────────────────────────────
68
+
69
+ apnam:ContextualNameIssuanceShape a sh:NodeShape ;
70
+ rdfs:label "ContextualNameIssuance shape" ;
71
+ sh:targetClass apnam:ContextualNameIssuance ;
72
+
73
+ sh:property [
74
+ sh:path apnam:issuedBy ;
75
+ sh:minCount 1 ; sh:maxCount 1 ;
76
+ sh:or ( [ sh:class ap:OrganizationAgent ] [ sh:class ap:WorkspaceAgent ] ) ;
77
+ sh:message "Exactly one issuedBy, and it MUST be a context that owns a namespace: an OrganizationAgent (incl. a Team) or a WorkspaceAgent. A person issues no contextual names." ;
78
+ ] ;
79
+ sh:property [
80
+ sh:path apnam:issuedFor ;
81
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:Agent ;
82
+ sh:message "Exactly one issuedFor — the canonical subject the contextual name refers to." ;
83
+ ] ;
84
+ sh:property [
85
+ sh:path apnam:issuanceBasis ;
86
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class apdel:Delegation ;
87
+ sh:message "Exactly one issuanceBasis — the Delegation whose liveness makes the name CURRENT. No basis, no name: a contextual name is a reference over a live delegation, never an identity (ADR-0061 §6)." ;
88
+ ] ;
89
+ sh:property [
90
+ sh:path apnam:issuanceKind ;
91
+ sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ;
92
+ sh:in ( "scoped" "reference" ) ;
93
+ sh:message "issuanceKind is exactly one of scoped | reference." ;
94
+ ] ;
95
+ sh:property [
96
+ sh:path apnam:issuedName ;
97
+ sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ;
98
+ sh:message "The issued contextual form is recorded verbatim." ;
99
+ ] ;
100
+ sh:sparql [
101
+ sh:message "A 'reference' issuance names ANOTHER agent in the issuer's namespace: issuedFor MUST differ from issuedBy." ;
102
+ sh:select """
103
+ SELECT $this WHERE {
104
+ $this <https://agenticprimitives.dev/ns/naming#issuanceKind> "reference" ;
105
+ <https://agenticprimitives.dev/ns/naming#issuedBy> ?ctx ;
106
+ <https://agenticprimitives.dev/ns/naming#issuedFor> ?ctx .
107
+ }
108
+ """ ;
109
+ ] .
110
+
111
+ # ─── The two named service roles that are also derived types (§2.1) ─────────
112
+
113
+ ap:WorkspaceAgentShape a sh:NodeShape ;
114
+ rdfs:label "WorkspaceAgent shape" ;
115
+ sh:targetClass ap:WorkspaceAgent ;
116
+
117
+ sh:property [
118
+ sh:path aporg:coordinatesWorkspace ;
119
+ sh:maxCount 1 ; sh:class aporg:Workspace ;
120
+ sh:message "A WorkspaceAgent custodies and serves AT MOST ONE Workspace (spec 346 §2.2) — the '.workspace' name is one context's agentive face, not a multiplexer." ;
121
+ ] ;
122
+ sh:property [
123
+ sh:path ap:serviceRole ;
124
+ sh:minCount 1 ; sh:maxCount 1 ; sh:hasValue "workspace" ;
125
+ sh:message "serviceRole MUST be exactly 'workspace' — the §2.3 claim-time invariant, made structural." ;
126
+ ] .
127
+
128
+ ap:RegistryAgentShape a sh:NodeShape ;
129
+ rdfs:label "RegistryAgent shape" ;
130
+ sh:targetClass ap:RegistryAgent ;
131
+
132
+ sh:property [
133
+ sh:path apreg:operatesRegistry ;
134
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class apreg:Registry ;
135
+ sh:message "A RegistryAgent operates EXACTLY ONE apreg:Registry — a '.registry' name that operates nothing names nothing; one that operates two is two registries' face." ;
136
+ ] ;
137
+ sh:property [
138
+ sh:path ap:serviceRole ;
139
+ sh:minCount 1 ; sh:maxCount 1 ; sh:hasValue "registry" ;
140
+ sh:message "serviceRole MUST be exactly 'registry'." ;
141
+ ] .
142
+
143
+ # ─── Registration receipt (§7.2) ────────────────────────────────────────────
144
+
145
+ apreg:RegistrationReceiptShape a sh:NodeShape ;
146
+ rdfs:label "RegistrationReceipt shape" ;
147
+ sh:targetClass apreg:RegistrationReceipt ;
148
+
149
+ sh:property [
150
+ sh:path apreg:inRegistry ;
151
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class apreg:Registry ;
152
+ sh:message "A receipt belongs to exactly one Registry." ;
153
+ ] ;
154
+ sh:property [
155
+ sh:path apreg:subjectAgent ;
156
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:Agent ;
157
+ sh:message "A receipt is about exactly one canonical subject Agent." ;
158
+ ] ;
159
+ sh:property [
160
+ sh:path apreg:subjectType ;
161
+ sh:minCount 1 ; sh:maxCount 1 ;
162
+ sh:node [ sh:property [ sh:path skos:inScheme ; sh:hasValue ap:agentTypeScheme ] ] ;
163
+ sh:message "subjectType is exactly one ap:agentTypeScheme concept — the derived type the admission checked." ;
164
+ ] ;
165
+ sh:property [
166
+ sh:path apreg:receiptSigner ;
167
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:RegistryAgent ;
168
+ sh:message "A receipt is signed by exactly one RegistryAgent — the operator SA; an unsigned receipt is a claim by nobody." ;
169
+ ] ;
170
+ sh:property [
171
+ sh:path apreg:admittedAt ;
172
+ sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:dateTime ;
173
+ sh:message "admittedAt is required — 'verified on <date>' is the whole consumer-facing claim." ;
174
+ ] ;
175
+ # Every listed check is a real AdmissionCheck …
176
+ sh:property [
177
+ sh:path [ sh:alternativePath ( apreg:verifiedCheck apreg:failedCheck apreg:notVerifiedCheck ) ] ;
178
+ sh:node [ sh:property [ sh:path skos:inScheme ; sh:hasValue apreg:admissionCheckScheme ] ] ;
179
+ sh:message "Every verified / failed / notVerified value MUST be an apreg:admissionCheckScheme concept." ;
180
+ ] ;
181
+ # … appears in AT MOST one list …
182
+ sh:property [
183
+ sh:path apreg:verifiedCheck ; sh:disjoint apreg:failedCheck ;
184
+ sh:message "A check cannot be both verified and failed." ;
185
+ ] ;
186
+ sh:property [
187
+ sh:path apreg:verifiedCheck ; sh:disjoint apreg:notVerifiedCheck ;
188
+ sh:message "A check cannot be both verified and not-verified." ;
189
+ ] ;
190
+ sh:property [
191
+ sh:path apreg:failedCheck ; sh:disjoint apreg:notVerifiedCheck ;
192
+ sh:message "A check cannot be both failed and not-verified." ;
193
+ ] ;
194
+ # … and in AT LEAST one. Together: exactly one. Omission is the dangerous direction — a missing
195
+ # line is read as 'verified' by anyone who does not know to look for it.
196
+ sh:sparql [
197
+ sh:message "Every AdmissionCheck in apreg:admissionCheckScheme MUST appear in exactly one of verifiedCheck / failedCheck / notVerifiedCheck. 'Not verified' is a first-class outcome and is RECORDED, never omitted (spec 346 §7.1)." ;
198
+ sh:select """
199
+ SELECT $this ?check WHERE {
200
+ ?check <http://www.w3.org/2004/02/skos/core#inScheme> <https://agenticprimitives.dev/ns/registry#admissionCheckScheme> .
201
+ FILTER NOT EXISTS { $this <https://agenticprimitives.dev/ns/registry#verifiedCheck> ?check }
202
+ FILTER NOT EXISTS { $this <https://agenticprimitives.dev/ns/registry#failedCheck> ?check }
203
+ FILTER NOT EXISTS { $this <https://agenticprimitives.dev/ns/registry#notVerifiedCheck> ?check }
204
+ }
205
+ """ ;
206
+ ] .
207
+
208
+ # ─── The append-only lifecycle log (§7.3) ───────────────────────────────────
209
+
210
+ apreg:RegistryLifecycleEventShape a sh:NodeShape ;
211
+ rdfs:label "RegistryLifecycleEvent shape" ;
212
+ sh:targetClass apreg:RegistryLifecycleEvent ;
213
+
214
+ sh:property [
215
+ sh:path apreg:inRegistry ;
216
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class apreg:Registry ;
217
+ sh:message "An event belongs to exactly one Registry — the log whose sequence it occupies." ;
218
+ ] ;
219
+ sh:property [
220
+ sh:path apreg:eventKind ;
221
+ sh:minCount 1 ; sh:maxCount 1 ;
222
+ sh:node [ sh:property [ sh:path skos:inScheme ; sh:hasValue apreg:lifecycleEventScheme ] ] ;
223
+ sh:message "eventKind is exactly one apreg:lifecycleEventScheme concept." ;
224
+ ] ;
225
+ sh:property [
226
+ sh:path apreg:eventSequence ;
227
+ sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:nonNegativeInteger ;
228
+ sh:message "Exactly one eventSequence (xsd:nonNegativeInteger) — the event's position in the log." ;
229
+ ] ;
230
+ sh:property [
231
+ sh:path apreg:eventDigest ;
232
+ sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ;
233
+ sh:message "Exactly one eventDigest — the value the next event chains to." ;
234
+ ] ;
235
+ sh:property [
236
+ sh:path apreg:occurredAt ;
237
+ sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:dateTime ;
238
+ sh:message "occurredAt is required." ;
239
+ ] ;
240
+ sh:property [
241
+ sh:path apreg:previousEventDigest ;
242
+ sh:maxCount 1 ; sh:datatype xsd:string ;
243
+ sh:message "At most one previousEventDigest." ;
244
+ ] ;
245
+ sh:sparql [
246
+ sh:message "Every event with eventSequence > 0 MUST carry previousEventDigest — without the chain link the log is append-only in name only (spec 346 §7.3)." ;
247
+ sh:select """
248
+ SELECT $this ?seq WHERE {
249
+ $this <https://agenticprimitives.dev/ns/registry#eventSequence> ?seq .
250
+ FILTER (?seq > 0)
251
+ FILTER NOT EXISTS { $this <https://agenticprimitives.dev/ns/registry#previousEventDigest> ?prev }
252
+ }
253
+ """ ;
254
+ ] .
255
+
256
+ # Kept as its OWN NodeShape: shacl-engine 1.1.2 compiles the sh:sparql constraints of one shape as a
257
+ # single unit (one select, all messages), so two sh:sparql on one shape mis-report. One per shape.
258
+ apreg:RegistryLogSequenceShape a sh:NodeShape ;
259
+ rdfs:label "RegistryLogSequence shape" ;
260
+ sh:targetClass apreg:RegistryLifecycleEvent ;
261
+ sh:sparql [
262
+ sh:message "eventSequence MUST be unique within a registry — two events at one position means the log was forked or rewritten (spec 346 §7.3: strictly increasing per registry)." ;
263
+ sh:select """
264
+ SELECT $this ?other ?seq WHERE {
265
+ $this <https://agenticprimitives.dev/ns/registry#inRegistry> ?registry ;
266
+ <https://agenticprimitives.dev/ns/registry#eventSequence> ?seq .
267
+ ?other <https://agenticprimitives.dev/ns/registry#inRegistry> ?registry ;
268
+ <https://agenticprimitives.dev/ns/registry#eventSequence> ?seq .
269
+ FILTER (?other != $this)
270
+ }
271
+ """ ;
272
+ ] .
@@ -0,0 +1,184 @@
1
+ # C-box — SHACL shapes for team affiliation, the workspace plane, representations and
2
+ # responsibilities (spec 344 §4.6).
3
+ #
4
+ # STRUCTURE, NEVER PERMISSION (ADR-0043/ADR-0048). A conformant TeamAffiliation is not a charter, a
5
+ # conformant Workspace grants nobody anything, and a conformant ResponsibilityAssignment authorizes
6
+ # no act. Each shape exists because its absence lets a record be written that cannot later be
7
+ # interpreted — or, in one case, that would be interpreted as PERMISSIVE by default:
8
+ #
9
+ # an affiliation with no kind / two teams — which side is the team, and chartered or engaged?
10
+ # a workspace with no governor — whose policy, whose vault, whose audit context?
11
+ # an open workspace with asserted members — two participation models on one plane
12
+ # a representation with no sharing policy — THE FAIL-CLOSED FLOOR: absence of a policy is
13
+ # never public; an unclassified projection fails
14
+ # a responsibility carrying grant terms — a responsibility that looks like an authorization
15
+ #
16
+ # SUBCLASS HANDLING. Several constraints use sh:class against a SUPERCLASS (ap:Agent,
17
+ # ap:OrganizationAgent) and rely on SHACL-instance-of (rdf:type/rdfs:subClassOf*). shacl-engine 1.1.2
18
+ # does not compute that closure; the house test materializes it from tbox/core.ttl + tbox/org.ttl before
19
+ # validating. Any other consumer must do the same or load an RDFS-inferencing store.
20
+
21
+ @prefix aporg: <https://agenticprimitives.dev/ns/org#> .
22
+ @prefix ap: <https://agenticprimitives.dev/ns/core#> .
23
+ @prefix apdel: <https://agenticprimitives.dev/ns/delegation#> .
24
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
25
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
26
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
27
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
28
+
29
+ # ─── Team affiliation (§1.2) ────────────────────────────────────────────────
30
+
31
+ aporg:TeamAffiliationShape a sh:NodeShape ;
32
+ rdfs:label "TeamAffiliation shape" ;
33
+ sh:targetClass aporg:TeamAffiliation ;
34
+
35
+ sh:property [
36
+ sh:path aporg:teamAgent ;
37
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:TeamAgent ;
38
+ sh:message "A TeamAffiliation names exactly one teamAgent, and it MUST be an ap:TeamAgent (profileType 'team') — an informal WorkingGroup cannot be affiliated, it is not an agent (spec 344 §1.1)." ;
39
+ ] ;
40
+ sh:property [
41
+ sh:path aporg:affiliatedOrganization ;
42
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:OrganizationAgent ;
43
+ sh:message "A TeamAffiliation names exactly one affiliatedOrganization (an org, team or alliance)." ;
44
+ ] ;
45
+ sh:property [
46
+ sh:path aporg:affiliationKind ;
47
+ sh:minCount 1 ; sh:maxCount 1 ;
48
+ sh:in ( aporg:CharteredAffiliation aporg:EngagedAffiliation ) ;
49
+ sh:message "affiliationKind is exactly one of aporg:affiliationKindScheme: chartered | engaged. An affiliation of no kind cannot be read as a charter OR as an engagement." ;
50
+ ] ;
51
+ # A team is itself an OrganizationAgent, so nothing else stops it from being 'affiliated' with itself.
52
+ sh:property [
53
+ sh:path aporg:teamAgent ;
54
+ sh:disjoint aporg:affiliatedOrganization ;
55
+ sh:message "The two sides of a TeamAffiliation MUST be distinct agents — a team cannot charter or engage itself." ;
56
+ ] ;
57
+ sh:property [
58
+ sh:path aporg:mandatedByDelegation ;
59
+ sh:maxCount 1 ; sh:class apdel:Delegation ;
60
+ sh:message "At most one chartering mandate, and it is a Delegation reference — the gate verifies the delegation, never this record." ;
61
+ ] .
62
+
63
+ # ─── The workspace plane (§2) ───────────────────────────────────────────────
64
+
65
+ aporg:WorkspaceShape a sh:NodeShape ;
66
+ rdfs:label "Workspace shape" ;
67
+ sh:targetClass aporg:Workspace ;
68
+
69
+ sh:property [
70
+ sh:path aporg:governedBy ;
71
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:OrganizationAgent ;
72
+ sh:message "A Workspace is governed by exactly one OrganizationAgent (org, team or alliance) — the source of every policy it has and the owner of the vault its records live in (ADR-0055). A workspace has no authority of its own." ;
73
+ ] ;
74
+ sh:property [
75
+ sh:path aporg:workspaceParticipationPolicy ;
76
+ sh:minCount 1 ; sh:maxCount 1 ;
77
+ sh:in ( aporg:OpenWorkspace aporg:RestrictedWorkspace ) ;
78
+ sh:message "Exactly one workspaceParticipationPolicy from aporg:workspacePolicyScheme: open | restricted. Absence would have to be read as one of them, and the convenient reading is 'open'." ;
79
+ ] ;
80
+ sh:property [
81
+ sh:path aporg:workspaceProfile ;
82
+ sh:minCount 1 ; sh:maxCount 1 ;
83
+ sh:node [ sh:property [ sh:path skos:inScheme ; sh:hasValue aporg:workspaceProfileScheme ] ] ;
84
+ sh:message "One primary workspaceProfile, a concept of aporg:workspaceProfileScheme (domain packs extend the scheme, so membership is checked rather than a closed list)." ;
85
+ ] ;
86
+ sh:property [
87
+ sh:path aporg:coordinatedBy ;
88
+ sh:maxCount 1 ; sh:class ap:WorkspaceAgent ;
89
+ sh:message "At most one workspace agent, and it is an ap:WorkspaceAgent — the workspace's single agentive face (ADR-0061 §4). Two workspace agents would be two names for one context." ;
90
+ ] ;
91
+ # An 'open' workspace DERIVES participation from the governor's membership; an asserted
92
+ # WorkspaceParticipation on it would be a second, contradicting participation model.
93
+ sh:sparql [
94
+ sh:message "An OPEN workspace MUST NOT have asserted WorkspaceParticipation records — participation is derived from the governor's membership, never asserted (spec 344 §2.1). Make it restricted, or drop the assertions." ;
95
+ sh:select """
96
+ SELECT $this ?participation WHERE {
97
+ $this <https://agenticprimitives.dev/ns/org#workspaceParticipationPolicy> <https://agenticprimitives.dev/ns/org#OpenWorkspace> .
98
+ ?participation <https://agenticprimitives.dev/ns/org#inWorkspace> $this .
99
+ }
100
+ """ ;
101
+ ] .
102
+
103
+ aporg:WorkspaceParticipationShape a sh:NodeShape ;
104
+ rdfs:label "WorkspaceParticipation shape" ;
105
+ sh:targetClass aporg:WorkspaceParticipation ;
106
+
107
+ sh:property [
108
+ sh:path aporg:participantAgent ;
109
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:Agent ;
110
+ sh:message "Exactly one participantAgent — ANY agent kind (a person, or an org/team that projects its own live roster in; the Gather27 GatherHost shape)." ;
111
+ ] ;
112
+ sh:property [
113
+ sh:path aporg:inWorkspace ;
114
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class aporg:Workspace ;
115
+ sh:message "Exactly one inWorkspace — a participation that names no workspace, or two, is not a participation in anything." ;
116
+ ] .
117
+
118
+ # ─── Representations (§2.2) — the fail-closed floor ─────────────────────────
119
+
120
+ aporg:WorkspaceRepresentationShape a sh:NodeShape ;
121
+ rdfs:label "WorkspaceRepresentation shape" ;
122
+ sh:targetClass aporg:WorkspaceRepresentation ;
123
+
124
+ sh:property [
125
+ sh:path aporg:represents ;
126
+ sh:minCount 1 ; sh:maxCount 1 ;
127
+ sh:message "A representation projects exactly one domain entity." ;
128
+ ] ;
129
+ sh:property [
130
+ sh:path aporg:representationOfWorkspace ;
131
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class aporg:Workspace ;
132
+ sh:message "A representation is scoped to exactly one Workspace — the plane whose policy bounds it." ;
133
+ ] ;
134
+ sh:property [
135
+ sh:path aporg:sourceCustodian ;
136
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:Agent ;
137
+ sh:message "Exactly one sourceCustodian — whose vault holds the authoritative record. Custody NEVER moves into the workspace." ;
138
+ ] ;
139
+ # THE FLOOR. Not a default, not a warning: a representation with no disclosure bound is refused
140
+ # at the structural level, because the only alternative reading of 'no policy' is 'public'.
141
+ sh:property [
142
+ sh:path aporg:sharingPolicy ;
143
+ sh:minCount 1 ;
144
+ sh:message "A WorkspaceRepresentation MUST carry a sharingPolicy. Absence of a policy is never public — an unclassified representation fails closed (spec 344 §2.2 normative floor)." ;
145
+ ] .
146
+
147
+ # ─── Responsibility (§1.5) — never an authorization ─────────────────────────
148
+
149
+ aporg:ResponsibilityShape a sh:NodeShape ;
150
+ rdfs:label "ResponsibilityAssignment shape" ;
151
+ sh:targetClass aporg:ResponsibilityAssignment ;
152
+
153
+ sh:property [
154
+ sh:path aporg:responsibleAgent ;
155
+ sh:minCount 1 ; sh:maxCount 1 ; sh:class ap:Agent ;
156
+ sh:message "Exactly one responsibleAgent — the one expected to care for the outcome." ;
157
+ ] ;
158
+ sh:property [
159
+ sh:path aporg:accountableAgent ;
160
+ sh:maxCount 1 ; sh:class ap:Agent ;
161
+ sh:message "At most one accountableAgent — who answers for the result; MAY differ from the responsible agent." ;
162
+ ] ;
163
+ sh:property [
164
+ sh:path aporg:responsibilityKind ;
165
+ sh:minCount 1 ; sh:maxCount 1 ;
166
+ sh:message "A responsibility has exactly one kind." ;
167
+ ] ;
168
+ sh:property [
169
+ sh:path aporg:underMandate ;
170
+ sh:maxCount 1 ; sh:class apdel:Delegation ;
171
+ sh:message "underMandate is a REFERENCE to the delegation the responsible agent exercises — at most one, and never the grant itself." ;
172
+ ] ;
173
+ # A ResponsibilityAssignment MUST NOT carry the authority-materialization terms a RoleAssignment
174
+ # does. The moment one does, a reader has a record that looks like an authorization and is not.
175
+ sh:property [
176
+ sh:path aporg:materializedByDelegation ;
177
+ sh:maxCount 0 ;
178
+ sh:message "A ResponsibilityAssignment MUST NOT carry aporg:materializedByDelegation — a responsibility is never an authorization; that term belongs to RoleAssignment (spec 344 §1.5)." ;
179
+ ] ;
180
+ sh:property [
181
+ sh:path aporg:supportedByEntitlement ;
182
+ sh:maxCount 0 ;
183
+ sh:message "A ResponsibilityAssignment MUST NOT carry aporg:supportedByEntitlement — grant terms on a responsibility make it read as authority." ;
184
+ ] .
@@ -0,0 +1,86 @@
1
+ # C-box — registry core controlled vocabularies (spec 346 §7).
2
+ # Closed SKOS codelists mirrored by registry-kit's TS unions: AdmissionCheck (§7.2),
3
+ # RegistryLifecycleEventKind (§7.3), RegistryEntryStatusV1.current (§7.4). The .ttl is the source of
4
+ # truth; the TS unions mirror it (spec 225 drift rule — never hand-duplicate as TS arrays here).
5
+
6
+ @prefix apreg: <https://agenticprimitives.dev/ns/registry#> .
7
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
8
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
9
+
10
+ # ─── admissionCheck — the 10 steps of the admission pipeline (§7.1/§7.2) ──
11
+ # Every check produces a line in the receipt whether it passed, failed, or was NOT ATTEMPTED —
12
+ # "not verified" is a first-class outcome, never silently equal to "verified".
13
+ apreg:admissionCheckScheme a skos:ConceptScheme ;
14
+ rdfs:label "admissionCheck" ;
15
+ rdfs:comment "registry-kit AdmissionCheck: binding-proof card-bundle publication endpoint-control derived-type suffix-consistency authority-proof delegation-live claim-slot shape. A RegistrationReceipt lists each exactly once across verifiedCheck / failedCheck / notVerifiedCheck." ;
16
+ skos:hasTopConcept apreg:BindingProofCheck, apreg:CardBundleCheck, apreg:PublicationCheck,
17
+ apreg:EndpointControlCheck, apreg:DerivedTypeCheck, apreg:SuffixConsistencyCheck,
18
+ apreg:AuthorityProofCheck, apreg:DelegationLiveCheck, apreg:ClaimSlotCheck, apreg:ShapeCheck .
19
+ apreg:BindingProofCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "binding-proof" ;
20
+ rdfs:comment "verifyEntryBindingProof — the subject SA's ERC-1271 signature over registryId/entryId/subject/cardHash/claimHashes." .
21
+ apreg:CardBundleCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "card-bundle" ;
22
+ rdfs:comment "verifySignedAgentCardBundle." .
23
+ apreg:PublicationCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "publication" ;
24
+ rdfs:comment "verifyPublication — the current sequenced AgentServicePublication (spec 338)." .
25
+ apreg:EndpointControlCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "endpoint-control" ;
26
+ rdfs:comment "verifyEndpointControl." .
27
+ apreg:DerivedTypeCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "derived-type" ;
28
+ rdfs:comment "The on-chain ap:agentType / ap:serviceRole record satisfies the §2.3 invariant." .
29
+ apreg:SuffixConsistencyCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "suffix-consistency" ;
30
+ rdfs:comment "derivedTypeForTld(suffix) == agentType and rootClassForDerivedType(agentType) == the name node's agentKind." .
31
+ apreg:AuthorityProofCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "authority-proof" ;
32
+ rdfs:comment "The per-archetype authority proof (§7.1 table)." .
33
+ apreg:DelegationLiveCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "delegation-live" ;
34
+ rdfs:comment "DelegationLivenessPort — the operatedBy / charter / governor delegation is live." .
35
+ apreg:ClaimSlotCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "claim-slot" ;
36
+ rdfs:comment "Claim-slot attestations satisfy the RegistryKitProfile's required slots." .
37
+ apreg:ShapeCheck a skos:Concept ; skos:inScheme apreg:admissionCheckScheme ; skos:prefLabel "shape" ;
38
+ rdfs:comment "SHACL / shape validation of the fetched artifacts." .
39
+
40
+ # ─── lifecycleEventKind — the append-only log vocabulary (§7.3) ────────
41
+ apreg:lifecycleEventScheme a skos:ConceptScheme ;
42
+ rdfs:label "lifecycleEventKind" ;
43
+ rdfs:comment "registry-kit RegistryLifecycleEventKind. The on-chain AgentRegistryBase events remain the PUBLIC facts; the log adds the off-chain evidence chain. AGENT_REVOKED = the subject SA is compromised/retired (a 'compromised' publication)." ;
44
+ skos:hasTopConcept apreg:NAME_CLAIMED, apreg:NAME_RELEASED, apreg:CONTEXTUAL_NAME_ISSUED, apreg:CONTEXTUAL_NAME_REVOKED,
45
+ apreg:CARD_REGISTERED, apreg:CARD_UPDATED, apreg:PUBLICATION_UPDATED, apreg:DEPLOYMENT_UPDATED,
46
+ apreg:OFFERING_REGISTERED, apreg:OFFERING_WITHDRAWN,
47
+ apreg:ENTRY_REGISTERED, apreg:ENTRY_RENEWED, apreg:ENTRY_SUSPENDED, apreg:ENTRY_REVOKED, apreg:ENTRY_EXPIRED,
48
+ apreg:REVALIDATION_PASSED, apreg:REVALIDATION_FAILED, apreg:AGENT_REVOKED .
49
+ apreg:NAME_CLAIMED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "NAME_CLAIMED" .
50
+ apreg:NAME_RELEASED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "NAME_RELEASED" .
51
+ apreg:CONTEXTUAL_NAME_ISSUED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "CONTEXTUAL_NAME_ISSUED" ;
52
+ rdfs:comment "Private issuance — logged by DIGEST only (refs.issuanceDigest); the issuance record stays in the context vault." .
53
+ apreg:CONTEXTUAL_NAME_REVOKED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "CONTEXTUAL_NAME_REVOKED" .
54
+ apreg:CARD_REGISTERED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "CARD_REGISTERED" .
55
+ apreg:CARD_UPDATED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "CARD_UPDATED" .
56
+ apreg:PUBLICATION_UPDATED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "PUBLICATION_UPDATED" ;
57
+ rdfs:comment "A new AgentServicePublication sequence." .
58
+ apreg:DEPLOYMENT_UPDATED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "DEPLOYMENT_UPDATED" ;
59
+ rdfs:comment "New deployment bindings (hosts / A2A paths) on the publication." .
60
+ apreg:OFFERING_REGISTERED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "OFFERING_REGISTERED" .
61
+ apreg:OFFERING_WITHDRAWN a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "OFFERING_WITHDRAWN" .
62
+ apreg:ENTRY_REGISTERED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "ENTRY_REGISTERED" .
63
+ apreg:ENTRY_RENEWED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "ENTRY_RENEWED" .
64
+ apreg:ENTRY_SUSPENDED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "ENTRY_SUSPENDED" .
65
+ apreg:ENTRY_REVOKED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "ENTRY_REVOKED" .
66
+ apreg:ENTRY_EXPIRED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "ENTRY_EXPIRED" .
67
+ apreg:REVALIDATION_PASSED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "REVALIDATION_PASSED" .
68
+ apreg:REVALIDATION_FAILED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "REVALIDATION_FAILED" .
69
+ apreg:AGENT_REVOKED a skos:Concept ; skos:inScheme apreg:lifecycleEventScheme ; skos:prefLabel "AGENT_REVOKED" .
70
+
71
+ # ─── entryStatus — the DERIVED revalidation status (§7.4) ──────────────
72
+ # Distinct IRIs from the on-chain apreg:RegistryLifecycleStatus individuals (active / suspended /
73
+ # revoked / expired / pending in tbox/registry.ttl): that one is a public chain FACT, this one is a
74
+ # pure fold over the event history under a revalidation policy — never a hand-written flag.
75
+ apreg:entryStatusScheme a skos:ConceptScheme ;
76
+ rdfs:label "entryStatus" ;
77
+ rdfs:comment "registry-kit RegistryEntryStatusV1.current: verified stale failing suspended revoked expired. deriveEntryStatus(events, policy, now) — status is derived from history, never written by hand." ;
78
+ skos:hasTopConcept apreg:EntryVerified, apreg:EntryStale, apreg:EntryFailing, apreg:EntrySuspended, apreg:EntryRevoked, apreg:EntryExpired .
79
+ apreg:EntryVerified a skos:Concept ; skos:inScheme apreg:entryStatusScheme ; skos:prefLabel "verified" .
80
+ apreg:EntryStale a skos:Concept ; skos:inScheme apreg:entryStatusScheme ; skos:prefLabel "stale" ;
81
+ rdfs:comment "Revalidation overdue (nextDueAt passed) with no failure yet." .
82
+ apreg:EntryFailing a skos:Concept ; skos:inScheme apreg:entryStatusScheme ; skos:prefLabel "failing" ;
83
+ rdfs:comment "A revalidation check failed (e.g. a rolled-back, expired or non-active publication); policy decides suspension." .
84
+ apreg:EntrySuspended a skos:Concept ; skos:inScheme apreg:entryStatusScheme ; skos:prefLabel "suspended" .
85
+ apreg:EntryRevoked a skos:Concept ; skos:inScheme apreg:entryStatusScheme ; skos:prefLabel "revoked" .
86
+ apreg:EntryExpired a skos:Concept ; skos:inScheme apreg:entryStatusScheme ; skos:prefLabel "expired" .