codex-workflow-v2 2.0.0-beta.2 → 2.0.0-beta.4

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 (128) hide show
  1. package/README.md +35 -2
  2. package/dist/src/alpha6/adoption.js +13 -3
  3. package/dist/src/alpha6/adoption.js.map +1 -1
  4. package/dist/src/alpha6/handoff.d.ts +21 -0
  5. package/dist/src/alpha6/handoff.js +100 -19
  6. package/dist/src/alpha6/handoff.js.map +1 -1
  7. package/dist/src/alpha6/milestone.d.ts +2 -0
  8. package/dist/src/alpha6/milestone.js +15 -0
  9. package/dist/src/alpha6/milestone.js.map +1 -1
  10. package/dist/src/alpha6/plan-risk.d.ts +1 -0
  11. package/dist/src/alpha6/plan-risk.js +6 -0
  12. package/dist/src/alpha6/plan-risk.js.map +1 -1
  13. package/dist/src/cli.js +188 -65
  14. package/dist/src/cli.js.map +1 -1
  15. package/dist/src/contracts.d.ts +111 -5
  16. package/dist/src/contracts.js +1 -1
  17. package/dist/src/credential-output.d.ts +10 -0
  18. package/dist/src/credential-output.js +73 -0
  19. package/dist/src/credential-output.js.map +1 -0
  20. package/dist/src/errors.d.ts +1 -1
  21. package/dist/src/errors.js.map +1 -1
  22. package/dist/src/index.d.ts +1 -1
  23. package/dist/src/index.js +1 -1
  24. package/dist/src/index.js.map +1 -1
  25. package/dist/src/lifecycle/canonical-hash.d.ts +6 -0
  26. package/dist/src/lifecycle/canonical-hash.js +24 -0
  27. package/dist/src/lifecycle/canonical-hash.js.map +1 -0
  28. package/dist/src/lifecycle/catalog.d.ts +26 -0
  29. package/dist/src/lifecycle/catalog.js +208 -0
  30. package/dist/src/lifecycle/catalog.js.map +1 -0
  31. package/dist/src/lifecycle/compiler-inspection.d.ts +48 -0
  32. package/dist/src/lifecycle/compiler-inspection.js +29 -0
  33. package/dist/src/lifecycle/compiler-inspection.js.map +1 -0
  34. package/dist/src/lifecycle/core-static-readiness.d.ts +6 -0
  35. package/dist/src/lifecycle/core-static-readiness.js +130 -0
  36. package/dist/src/lifecycle/core-static-readiness.js.map +1 -0
  37. package/dist/src/lifecycle/corrective-replan-authority.d.ts +53 -0
  38. package/dist/src/lifecycle/corrective-replan-authority.js +139 -0
  39. package/dist/src/lifecycle/corrective-replan-authority.js.map +1 -0
  40. package/dist/src/lifecycle/corrective-replan-binding-manifest.d.ts +21 -0
  41. package/dist/src/lifecycle/corrective-replan-binding-manifest.js +35 -0
  42. package/dist/src/lifecycle/corrective-replan-binding-manifest.js.map +1 -0
  43. package/dist/src/lifecycle/corrective-replan-credential-core.d.ts +86 -0
  44. package/dist/src/lifecycle/corrective-replan-credential-core.js +534 -0
  45. package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -0
  46. package/dist/src/lifecycle/corrective-replan-credential-schema.d.ts +17 -0
  47. package/dist/src/lifecycle/corrective-replan-credential-schema.js +44 -0
  48. package/dist/src/lifecycle/corrective-replan-credential-schema.js.map +1 -0
  49. package/dist/src/lifecycle/corrective-replan-credentials.d.ts +47 -0
  50. package/dist/src/lifecycle/corrective-replan-credentials.js +103 -0
  51. package/dist/src/lifecycle/corrective-replan-credentials.js.map +1 -0
  52. package/dist/src/lifecycle/corrective-replan.d.ts +64 -0
  53. package/dist/src/lifecycle/corrective-replan.js +548 -0
  54. package/dist/src/lifecycle/corrective-replan.js.map +1 -0
  55. package/dist/src/lifecycle/evaluator.d.ts +2 -0
  56. package/dist/src/lifecycle/evaluator.js +35 -0
  57. package/dist/src/lifecycle/evaluator.js.map +1 -0
  58. package/dist/src/lifecycle/fingerprint.d.ts +31 -0
  59. package/dist/src/lifecycle/fingerprint.js +388 -0
  60. package/dist/src/lifecycle/fingerprint.js.map +1 -0
  61. package/dist/src/lifecycle/immutable.d.ts +1 -0
  62. package/dist/src/lifecycle/immutable.js +10 -0
  63. package/dist/src/lifecycle/immutable.js.map +1 -0
  64. package/dist/src/lifecycle/implementation-table.d.ts +29 -0
  65. package/dist/src/lifecycle/implementation-table.js +87 -0
  66. package/dist/src/lifecycle/implementation-table.js.map +1 -0
  67. package/dist/src/lifecycle/index.d.ts +4 -0
  68. package/dist/src/lifecycle/index.js +5 -0
  69. package/dist/src/lifecycle/index.js.map +1 -0
  70. package/dist/src/lifecycle/schema-artifact.d.ts +12 -0
  71. package/dist/src/lifecycle/schema-artifact.js +214 -0
  72. package/dist/src/lifecycle/schema-artifact.js.map +1 -0
  73. package/dist/src/lifecycle/semantic-registry.d.ts +6 -0
  74. package/dist/src/lifecycle/semantic-registry.js +489 -0
  75. package/dist/src/lifecycle/semantic-registry.js.map +1 -0
  76. package/dist/src/lifecycle/types.d.ts +718 -0
  77. package/dist/src/lifecycle/types.js +4 -0
  78. package/dist/src/lifecycle/types.js.map +1 -0
  79. package/dist/src/observation.d.ts +20 -0
  80. package/dist/src/observation.js +171 -0
  81. package/dist/src/observation.js.map +1 -0
  82. package/dist/src/state/corrective-replan-executor.d.ts +64 -0
  83. package/dist/src/state/corrective-replan-executor.js +598 -0
  84. package/dist/src/state/corrective-replan-executor.js.map +1 -0
  85. package/dist/src/state/corrective-replan-public-schema.d.ts +3 -0
  86. package/dist/src/state/corrective-replan-public-schema.js +43 -0
  87. package/dist/src/state/corrective-replan-public-schema.js.map +1 -0
  88. package/dist/src/state/corrective-replan-public.d.ts +95 -0
  89. package/dist/src/state/corrective-replan-public.js +618 -0
  90. package/dist/src/state/corrective-replan-public.js.map +1 -0
  91. package/dist/src/state/corrective-replan-transaction.d.ts +158 -0
  92. package/dist/src/state/corrective-replan-transaction.js +723 -0
  93. package/dist/src/state/corrective-replan-transaction.js.map +1 -0
  94. package/dist/src/state/corrective-yield-executor.d.ts +31 -0
  95. package/dist/src/state/corrective-yield-executor.js +236 -0
  96. package/dist/src/state/corrective-yield-executor.js.map +1 -0
  97. package/dist/src/state/corrective-yield-transaction.d.ts +97 -0
  98. package/dist/src/state/corrective-yield-transaction.js +591 -0
  99. package/dist/src/state/corrective-yield-transaction.js.map +1 -0
  100. package/dist/src/state/lock.d.ts +75 -3
  101. package/dist/src/state/lock.js +582 -30
  102. package/dist/src/state/lock.js.map +1 -1
  103. package/dist/src/state/store.d.ts +3 -0
  104. package/dist/src/state/store.js +65 -12
  105. package/dist/src/state/store.js.map +1 -1
  106. package/dist/src/transition-core.d.ts +67 -0
  107. package/dist/src/transition-core.js +318 -0
  108. package/dist/src/transition-core.js.map +1 -0
  109. package/dist/src/version.d.ts +1 -1
  110. package/dist/src/version.js +1 -1
  111. package/dist/src/workflow.d.ts +34 -22
  112. package/dist/src/workflow.js +486 -141
  113. package/dist/src/workflow.js.map +1 -1
  114. package/docs/lifecycle/state-machine-stabilization.md +641 -0
  115. package/docs/release.md +4 -2
  116. package/docs/updating-existing-project.md +9 -0
  117. package/package.json +4 -1
  118. package/schemas/adoption-posture-event.schema.json +1 -1
  119. package/schemas/context-envelope.schema.json +1 -1
  120. package/schemas/corrective-replan-credentials.private.schema.json +98 -0
  121. package/schemas/corrective-replan-execution-event.private.schema.json +53 -0
  122. package/schemas/corrective-replan-public.schema.json +142 -0
  123. package/schemas/corrective-replan-task-transaction.private.schema.json +151 -0
  124. package/schemas/corrective-yield-task-transaction.private.schema.json +98 -0
  125. package/schemas/remediation-event.schema.json +11 -1
  126. package/schemas/task-handoff-event.schema.json +1 -1
  127. package/schemas/transition-definition.schema.json +2609 -0
  128. package/schemas/transition-payloads.schema.json +140 -0
@@ -0,0 +1,2609 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://codex-workflow.local/schemas/transition-definition-v4.schema.json",
4
+ "title": "Codex Workflow V2 Guarded Transition Definition Format 4",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "definitionFormatVersion",
9
+ "transitionId",
10
+ "guardNamespace",
11
+ "lifecycleEpoch",
12
+ "entity",
13
+ "scope",
14
+ "command",
15
+ "sourcePosture",
16
+ "inputContract",
17
+ "snapshotContract",
18
+ "bindingContract",
19
+ "outputContract",
20
+ "guards",
21
+ "authority",
22
+ "effects",
23
+ "admissionBoundary",
24
+ "atomicity",
25
+ "racePreconditions",
26
+ "navigation",
27
+ "executorAdapter",
28
+ "readinessManifest",
29
+ "traceability",
30
+ "documentation",
31
+ "runtimeSemanticFingerprint",
32
+ "semanticFingerprint",
33
+ "definitionManifestHash"
34
+ ],
35
+ "properties": {
36
+ "definitionFormatVersion": {
37
+ "const": 4
38
+ },
39
+ "transitionId": {
40
+ "$ref": "#/$defs/transitionId"
41
+ },
42
+ "guardNamespace": {
43
+ "$ref": "#/$defs/stableId"
44
+ },
45
+ "lifecycleEpoch": {
46
+ "const": 2
47
+ },
48
+ "entity": {
49
+ "enum": [
50
+ "project",
51
+ "project-memory",
52
+ "discovery",
53
+ "task",
54
+ "milestone",
55
+ "step"
56
+ ]
57
+ },
58
+ "scope": {
59
+ "enum": [
60
+ "repository",
61
+ "project",
62
+ "entity",
63
+ "task-step"
64
+ ]
65
+ },
66
+ "command": {
67
+ "$ref": "#/$defs/command"
68
+ },
69
+ "sourcePosture": {
70
+ "$ref": "#/$defs/sourcePosture"
71
+ },
72
+ "inputContract": {
73
+ "type": "array",
74
+ "uniqueItems": true,
75
+ "items": {
76
+ "$ref": "#/$defs/inputRequirement"
77
+ }
78
+ },
79
+ "snapshotContract": {
80
+ "$ref": "#/$defs/projectionRef"
81
+ },
82
+ "bindingContract": {
83
+ "$ref": "#/$defs/projectionRef"
84
+ },
85
+ "outputContract": {
86
+ "type": "array",
87
+ "uniqueItems": true,
88
+ "items": {
89
+ "$ref": "#/$defs/outputRequirement"
90
+ }
91
+ },
92
+ "guards": {
93
+ "type": "array",
94
+ "minItems": 1,
95
+ "uniqueItems": true,
96
+ "items": {
97
+ "$ref": "#/$defs/guard"
98
+ }
99
+ },
100
+ "authority": {
101
+ "$ref": "#/$defs/authority"
102
+ },
103
+ "effects": {
104
+ "$ref": "#/$defs/effectGraph"
105
+ },
106
+ "admissionBoundary": {
107
+ "$ref": "#/$defs/admissionBoundary"
108
+ },
109
+ "atomicity": {
110
+ "$ref": "#/$defs/atomicity"
111
+ },
112
+ "racePreconditions": {
113
+ "type": "array",
114
+ "uniqueItems": true,
115
+ "items": {
116
+ "$ref": "#/$defs/racePrecondition"
117
+ }
118
+ },
119
+ "navigation": {
120
+ "$ref": "#/$defs/navigation"
121
+ },
122
+ "executorAdapter": {
123
+ "$ref": "#/$defs/effectAdapterRef"
124
+ },
125
+ "readinessManifest": {
126
+ "$ref": "#/$defs/readinessManifest"
127
+ },
128
+ "traceability": {
129
+ "$ref": "#/$defs/traceability"
130
+ },
131
+ "documentation": {
132
+ "$ref": "#/$defs/documentation"
133
+ },
134
+ "runtimeSemanticFingerprint": {
135
+ "$ref": "#/$defs/hash64"
136
+ },
137
+ "semanticFingerprint": {
138
+ "$ref": "#/$defs/hash64"
139
+ },
140
+ "definitionManifestHash": {
141
+ "$ref": "#/$defs/hash64"
142
+ }
143
+ },
144
+ "allOf": [
145
+ {
146
+ "if": {
147
+ "properties": {
148
+ "entity": {
149
+ "enum": [
150
+ "task",
151
+ "step"
152
+ ]
153
+ }
154
+ },
155
+ "required": [
156
+ "entity"
157
+ ]
158
+ },
159
+ "then": {
160
+ "properties": {
161
+ "transitionId": {
162
+ "type": "string",
163
+ "pattern": "^task\\."
164
+ },
165
+ "guardNamespace": {
166
+ "type": "string",
167
+ "pattern": "^task\\."
168
+ }
169
+ }
170
+ }
171
+ },
172
+ {
173
+ "if": {
174
+ "properties": {
175
+ "entity": {
176
+ "const": "milestone"
177
+ }
178
+ },
179
+ "required": [
180
+ "entity"
181
+ ]
182
+ },
183
+ "then": {
184
+ "properties": {
185
+ "transitionId": {
186
+ "type": "string",
187
+ "pattern": "^milestone\\."
188
+ },
189
+ "guardNamespace": {
190
+ "type": "string",
191
+ "pattern": "^milestone\\."
192
+ }
193
+ }
194
+ }
195
+ },
196
+ {
197
+ "if": {
198
+ "properties": {
199
+ "entity": {
200
+ "enum": [
201
+ "project",
202
+ "project-memory"
203
+ ]
204
+ }
205
+ },
206
+ "required": [
207
+ "entity"
208
+ ]
209
+ },
210
+ "then": {
211
+ "properties": {
212
+ "transitionId": {
213
+ "type": "string",
214
+ "pattern": "^project\\."
215
+ },
216
+ "guardNamespace": {
217
+ "type": "string",
218
+ "pattern": "^project\\."
219
+ }
220
+ }
221
+ }
222
+ },
223
+ {
224
+ "if": {
225
+ "properties": {
226
+ "entity": {
227
+ "const": "discovery"
228
+ }
229
+ },
230
+ "required": [
231
+ "entity"
232
+ ]
233
+ },
234
+ "then": {
235
+ "properties": {
236
+ "transitionId": {
237
+ "type": "string",
238
+ "pattern": "^discovery\\."
239
+ },
240
+ "guardNamespace": {
241
+ "type": "string",
242
+ "pattern": "^discovery\\."
243
+ }
244
+ }
245
+ }
246
+ },
247
+ {
248
+ "if": {
249
+ "properties": {
250
+ "transitionId": {
251
+ "const": "task.plan.corrective-replan"
252
+ }
253
+ },
254
+ "required": [
255
+ "transitionId"
256
+ ]
257
+ },
258
+ "then": {
259
+ "properties": {
260
+ "guardNamespace": {
261
+ "const": "task.corrective-replan"
262
+ },
263
+ "guards": {
264
+ "type": "array",
265
+ "items": {
266
+ "type": "object",
267
+ "properties": {
268
+ "guardId": {
269
+ "type": "string",
270
+ "pattern": "^task\\.corrective-replan\\.[a-z][a-z0-9-]*$"
271
+ }
272
+ }
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
278
+ ],
279
+ "$defs": {
280
+ "semanticRegistryVocabulary": {
281
+ "const": {
282
+ "capabilities": [
283
+ "capability.task.corrective-replan@1"
284
+ ],
285
+ "clocks": [
286
+ "clock.workflow-core-utc@1"
287
+ ],
288
+ "coverageProducers": [],
289
+ "coverageProfiles": [
290
+ "coverage-profile.exact-transition@1"
291
+ ],
292
+ "credentialPolicies": [
293
+ "credential-policy.corrective-execution-receipt@1"
294
+ ],
295
+ "credentialVerifiers": [
296
+ "credential-verifier.corrective-replan.receipt@1"
297
+ ],
298
+ "delegationPolicies": [
299
+ "delegation.forbidden@1"
300
+ ],
301
+ "effectAdapters": [
302
+ "effect-adapter.journaled-corrective-replan@1"
303
+ ],
304
+ "executionKeyPolicies": [
305
+ "execution-key-policy.corrective-replan-exact@1"
306
+ ],
307
+ "guardEvaluators": [
308
+ "guard-evaluator.task.corrective-replan.active-decision@1",
309
+ "guard-evaluator.task.corrective-replan.actor-role-eligible@1",
310
+ "guard-evaluator.task.corrective-replan.attempt-threshold@1",
311
+ "guard-evaluator.task.corrective-replan.bindings-current@1",
312
+ "guard-evaluator.task.corrective-replan.guarded-step-retained@1",
313
+ "guard-evaluator.task.corrective-replan.no-c1-claim@1",
314
+ "guard-evaluator.task.corrective-replan.no-step-in-progress@1",
315
+ "guard-evaluator.task.corrective-replan.no-writer-lease@1",
316
+ "guard-evaluator.task.corrective-replan.plan-validation-passed@1",
317
+ "guard-evaluator.task.corrective-replan.receipt-valid@1",
318
+ "guard-evaluator.task.corrective-replan.risk-audit-passed@1",
319
+ "guard-evaluator.task.corrective-replan.semantic-plan-change@1",
320
+ "guard-evaluator.task.corrective-replan.source-posture@1"
321
+ ],
322
+ "hashPolicies": [
323
+ "hash-policy.canonical-json-sha256@1",
324
+ "hash-policy.raw-sha256@1"
325
+ ],
326
+ "identities": [
327
+ "identity.actor@1",
328
+ "identity.human-principal@1",
329
+ "identity.plan-author@1",
330
+ "identity.plan-validator@1",
331
+ "identity.risk-auditor@1",
332
+ "identity.workflow-core@1"
333
+ ],
334
+ "identityComparators": [
335
+ "identity-comparator.corrective-replan.author-human-principal@1",
336
+ "identity-comparator.corrective-replan.author-risk-auditor@1",
337
+ "identity-comparator.corrective-replan.author-validator@1"
338
+ ],
339
+ "inputs": [
340
+ "input.corrective-execution-receipt@1",
341
+ "input.corrective-plan-risk-audit@1",
342
+ "input.corrective-plan-validation@1",
343
+ "input.corrective-replacement-plan@1",
344
+ "input.expected-revision@1",
345
+ "input.task-id@1"
346
+ ],
347
+ "journalAdapters": [
348
+ "journal-adapter.corrective-replan-task@1"
349
+ ],
350
+ "journalSchemas": [
351
+ "journal-schema.corrective-replan-task@1"
352
+ ],
353
+ "limitations": [
354
+ "limitation.release-profile.verified-evidence-external@1"
355
+ ],
356
+ "lockPolicies": [
357
+ "lock-policy.corrective-replan-task-exclusive@1"
358
+ ],
359
+ "ownershipPolicies": [
360
+ "ownership.corrective-replan-clear@1"
361
+ ],
362
+ "principalBases": [
363
+ "principal-basis.human-confirmation@1"
364
+ ],
365
+ "projections": [
366
+ "projection.corrective-replan.authority@1",
367
+ "projection.corrective-replan.bindings@1",
368
+ "projection.corrective-replan.candidate@1",
369
+ "projection.corrective-replan.execution-receipt@1",
370
+ "projection.corrective-replan.protocol@1",
371
+ "projection.corrective-replan.snapshot@1",
372
+ "projection.corrective-replan.state@1",
373
+ "projection.corrective-replan.terminal-readback@1",
374
+ "projection.input.execution-receipt@1",
375
+ "projection.input.expected-revision@1",
376
+ "projection.input.plan-risk-audit@1",
377
+ "projection.input.plan-validation@1",
378
+ "projection.input.replacement-plan@1",
379
+ "projection.input.task-id@1",
380
+ "projection.task-state.readback@1"
381
+ ],
382
+ "readbackAdapters": [
383
+ "readback-adapter.corrective-replan-terminal@1"
384
+ ],
385
+ "recoveryAdapters": [
386
+ "recovery-adapter.corrective-replan-roll-forward@1"
387
+ ],
388
+ "releaseProfiles": [
389
+ "release-profile.exact-mutation@1"
390
+ ],
391
+ "resources": [
392
+ "resource.corrective-replan-execution-sidecar@1",
393
+ "resource.corrective-replan-journal@1",
394
+ "resource.plan-artifact@1",
395
+ "resource.plan-risk-audit-sidecar@1",
396
+ "resource.plan-validation-sidecar@1",
397
+ "resource.task-state@1"
398
+ ],
399
+ "schemas": [
400
+ "schema.corrective-replan-binding@1",
401
+ "schema.corrective-replan-bindings@1",
402
+ "schema.corrective-replan-plan-validation-attestation@1",
403
+ "schema.corrective-replan-receipt@1",
404
+ "schema.corrective-replan-snapshot@1",
405
+ "schema.corrective-replan-task-transaction@1",
406
+ "schema.expected-revision@1",
407
+ "schema.plan-risk-audit-input@1",
408
+ "schema.task-id@1",
409
+ "schema.task-plan-input@1",
410
+ "schema.task-state-readback@1"
411
+ ],
412
+ "semanticRules": [
413
+ "semantic-rule.admission-boundary@1",
414
+ "semantic-rule.definition-integrity@1",
415
+ "semantic-rule.exact-authority@1",
416
+ "semantic-rule.reliable-effects@1",
417
+ "semantic-rule.required-inputs@1"
418
+ ],
419
+ "projectionFields": [
420
+ "projection.corrective-replan.authority@1:field.actor-identity-hash",
421
+ "projection.corrective-replan.authority@1:field.actor-role",
422
+ "projection.corrective-replan.authority@1:field.capability-id",
423
+ "projection.corrective-replan.authority@1:field.capability-version",
424
+ "projection.corrective-replan.authority@1:field.human-principal-identity-hash",
425
+ "projection.corrective-replan.bindings@1:field.candidate-plan-hash",
426
+ "projection.corrective-replan.bindings@1:field.candidate-step-ids",
427
+ "projection.corrective-replan.bindings@1:field.corrective-decision-event-id",
428
+ "projection.corrective-replan.bindings@1:field.current-plan-hash",
429
+ "projection.corrective-replan.bindings@1:field.expected-revision",
430
+ "projection.corrective-replan.bindings@1:field.step-id",
431
+ "projection.corrective-replan.bindings@1:field.task-id",
432
+ "projection.corrective-replan.candidate@1:field.candidate-plan-hash",
433
+ "projection.corrective-replan.candidate@1:field.candidate-step-set-hash",
434
+ "projection.corrective-replan.candidate@1:field.plan-author-identity-hash",
435
+ "projection.corrective-replan.candidate@1:field.plan-validation-hash",
436
+ "projection.corrective-replan.candidate@1:field.plan-validator-identity-hash",
437
+ "projection.corrective-replan.candidate@1:field.risk-audit-hash",
438
+ "projection.corrective-replan.candidate@1:field.risk-auditor-identity-hash",
439
+ "projection.corrective-replan.execution-receipt@1:field.actor-identity-hash",
440
+ "projection.corrective-replan.execution-receipt@1:field.actor-role",
441
+ "projection.corrective-replan.execution-receipt@1:field.attempt-count",
442
+ "projection.corrective-replan.execution-receipt@1:field.brief-hash",
443
+ "projection.corrective-replan.execution-receipt@1:field.candidate-plan-hash",
444
+ "projection.corrective-replan.execution-receipt@1:field.candidate-step-set-hash",
445
+ "projection.corrective-replan.execution-receipt@1:field.capability-id",
446
+ "projection.corrective-replan.execution-receipt@1:field.capability-version",
447
+ "projection.corrective-replan.execution-receipt@1:field.catalog-hash",
448
+ "projection.corrective-replan.execution-receipt@1:field.corrective-decision-event-id",
449
+ "projection.corrective-replan.execution-receipt@1:field.corrective-decision-hash",
450
+ "projection.corrective-replan.execution-receipt@1:field.current-plan-hash",
451
+ "projection.corrective-replan.execution-receipt@1:field.git-head",
452
+ "projection.corrective-replan.execution-receipt@1:field.guarded-step-id",
453
+ "projection.corrective-replan.execution-receipt@1:field.human-principal-identity-hash",
454
+ "projection.corrective-replan.execution-receipt@1:field.knowledge-hash",
455
+ "projection.corrective-replan.execution-receipt@1:field.knowledge-revision",
456
+ "projection.corrective-replan.execution-receipt@1:field.lifecycle-epoch",
457
+ "projection.corrective-replan.execution-receipt@1:field.plan-author-identity-hash",
458
+ "projection.corrective-replan.execution-receipt@1:field.plan-validation-hash",
459
+ "projection.corrective-replan.execution-receipt@1:field.plan-validator-identity-hash",
460
+ "projection.corrective-replan.execution-receipt@1:field.remediation-tail-hash",
461
+ "projection.corrective-replan.execution-receipt@1:field.risk-audit-hash",
462
+ "projection.corrective-replan.execution-receipt@1:field.risk-auditor-identity-hash",
463
+ "projection.corrective-replan.execution-receipt@1:field.runtime-fingerprint",
464
+ "projection.corrective-replan.execution-receipt@1:field.task-id",
465
+ "projection.corrective-replan.execution-receipt@1:field.task-revision",
466
+ "projection.corrective-replan.execution-receipt@1:field.transition-id",
467
+ "projection.corrective-replan.protocol@1:field.catalog-hash",
468
+ "projection.corrective-replan.protocol@1:field.lifecycle-epoch",
469
+ "projection.corrective-replan.protocol@1:field.runtime-fingerprint",
470
+ "projection.corrective-replan.protocol@1:field.transition-id",
471
+ "projection.corrective-replan.snapshot@1:field.actor-role-eligible",
472
+ "projection.corrective-replan.snapshot@1:field.c1-claim-absent",
473
+ "projection.corrective-replan.snapshot@1:field.candidate-plan-hash",
474
+ "projection.corrective-replan.snapshot@1:field.candidate-step-ids",
475
+ "projection.corrective-replan.snapshot@1:field.corrective-decision-decision",
476
+ "projection.corrective-replan.snapshot@1:field.corrective-decision-event-id",
477
+ "projection.corrective-replan.snapshot@1:field.corrective-decision-plan-hash",
478
+ "projection.corrective-replan.snapshot@1:field.corrective-decision-step-id",
479
+ "projection.corrective-replan.snapshot@1:field.corrective-decision-triggering-attempt-count",
480
+ "projection.corrective-replan.snapshot@1:field.corrective-posture",
481
+ "projection.corrective-replan.snapshot@1:field.current-plan-hash",
482
+ "projection.corrective-replan.snapshot@1:field.in-progress-step-ids",
483
+ "projection.corrective-replan.snapshot@1:field.plan-validation-passed",
484
+ "projection.corrective-replan.snapshot@1:field.receipt-valid",
485
+ "projection.corrective-replan.snapshot@1:field.remediation-attempt-count",
486
+ "projection.corrective-replan.snapshot@1:field.risk-audit-passed",
487
+ "projection.corrective-replan.snapshot@1:field.step-id",
488
+ "projection.corrective-replan.snapshot@1:field.step-status",
489
+ "projection.corrective-replan.snapshot@1:field.task-id",
490
+ "projection.corrective-replan.snapshot@1:field.task-revision",
491
+ "projection.corrective-replan.snapshot@1:field.task-status",
492
+ "projection.corrective-replan.snapshot@1:field.writer-lease-absent",
493
+ "projection.corrective-replan.state@1:field.attempt-count",
494
+ "projection.corrective-replan.state@1:field.brief-hash",
495
+ "projection.corrective-replan.state@1:field.corrective-decision-event-id",
496
+ "projection.corrective-replan.state@1:field.corrective-decision-hash",
497
+ "projection.corrective-replan.state@1:field.current-plan-hash",
498
+ "projection.corrective-replan.state@1:field.git-head",
499
+ "projection.corrective-replan.state@1:field.guarded-step-id",
500
+ "projection.corrective-replan.state@1:field.knowledge-hash",
501
+ "projection.corrective-replan.state@1:field.knowledge-revision",
502
+ "projection.corrective-replan.state@1:field.remediation-tail-hash",
503
+ "projection.corrective-replan.state@1:field.task-id",
504
+ "projection.corrective-replan.state@1:field.task-revision",
505
+ "projection.corrective-replan.terminal-readback@1:field.catalog-hash",
506
+ "projection.corrective-replan.terminal-readback@1:field.current-plan-hash",
507
+ "projection.corrective-replan.terminal-readback@1:field.plan-validation-hash",
508
+ "projection.corrective-replan.terminal-readback@1:field.risk-audit-hash",
509
+ "projection.corrective-replan.terminal-readback@1:field.runtime-fingerprint",
510
+ "projection.corrective-replan.terminal-readback@1:field.task-id",
511
+ "projection.corrective-replan.terminal-readback@1:field.task-revision",
512
+ "projection.corrective-replan.terminal-readback@1:field.task-status",
513
+ "projection.input.execution-receipt@1:field.actor-identity-hash",
514
+ "projection.input.execution-receipt@1:field.actor-role",
515
+ "projection.input.execution-receipt@1:field.attempt-count",
516
+ "projection.input.execution-receipt@1:field.brief-hash",
517
+ "projection.input.execution-receipt@1:field.candidate-plan-hash",
518
+ "projection.input.execution-receipt@1:field.candidate-step-set-hash",
519
+ "projection.input.execution-receipt@1:field.capability-id",
520
+ "projection.input.execution-receipt@1:field.capability-version",
521
+ "projection.input.execution-receipt@1:field.catalog-hash",
522
+ "projection.input.execution-receipt@1:field.corrective-decision-event-id",
523
+ "projection.input.execution-receipt@1:field.corrective-decision-hash",
524
+ "projection.input.execution-receipt@1:field.current-plan-hash",
525
+ "projection.input.execution-receipt@1:field.git-head",
526
+ "projection.input.execution-receipt@1:field.guarded-step-id",
527
+ "projection.input.execution-receipt@1:field.human-principal-identity-hash",
528
+ "projection.input.execution-receipt@1:field.knowledge-hash",
529
+ "projection.input.execution-receipt@1:field.knowledge-revision",
530
+ "projection.input.execution-receipt@1:field.lifecycle-epoch",
531
+ "projection.input.execution-receipt@1:field.plan-author-identity-hash",
532
+ "projection.input.execution-receipt@1:field.plan-validation-hash",
533
+ "projection.input.execution-receipt@1:field.plan-validator-identity-hash",
534
+ "projection.input.execution-receipt@1:field.remediation-tail-hash",
535
+ "projection.input.execution-receipt@1:field.risk-audit-hash",
536
+ "projection.input.execution-receipt@1:field.risk-auditor-identity-hash",
537
+ "projection.input.execution-receipt@1:field.runtime-fingerprint",
538
+ "projection.input.execution-receipt@1:field.task-id",
539
+ "projection.input.execution-receipt@1:field.task-revision",
540
+ "projection.input.execution-receipt@1:field.transition-id",
541
+ "projection.input.expected-revision@1:field.expected-revision",
542
+ "projection.input.plan-risk-audit@1:field.risk-audit-hash",
543
+ "projection.input.plan-risk-audit@1:field.risk-auditor-identity-hash",
544
+ "projection.input.plan-validation@1:field.plan-validation-hash",
545
+ "projection.input.plan-validation@1:field.plan-validator-identity-hash",
546
+ "projection.input.replacement-plan@1:field.candidate-plan-hash",
547
+ "projection.input.replacement-plan@1:field.candidate-step-ids",
548
+ "projection.input.replacement-plan@1:field.candidate-step-set-hash",
549
+ "projection.input.task-id@1:field.task-id",
550
+ "projection.task-state.readback@1:field.task-id",
551
+ "projection.task-state.readback@1:field.task-plan-hash",
552
+ "projection.task-state.readback@1:field.task-revision",
553
+ "projection.task-state.readback@1:field.task-status"
554
+ ]
555
+ }
556
+ },
557
+ "transitionId": {
558
+ "type": "string",
559
+ "pattern": "^(task|milestone|project|discovery)\\.[a-z0-9]+(?:[.-][a-z0-9]+)*$"
560
+ },
561
+ "stableId": {
562
+ "type": "string",
563
+ "pattern": "^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$"
564
+ },
565
+ "hash64": {
566
+ "type": "string",
567
+ "pattern": "^[a-f0-9]{64}$"
568
+ },
569
+ "nonEmptyString": {
570
+ "type": "string",
571
+ "minLength": 1
572
+ },
573
+ "uniqueStrings": {
574
+ "type": "array",
575
+ "uniqueItems": true,
576
+ "items": {
577
+ "$ref": "#/$defs/nonEmptyString"
578
+ }
579
+ },
580
+ "fieldId": {
581
+ "enum": [
582
+ "field.actor-identity-hash",
583
+ "field.actor-role",
584
+ "field.actor-role-eligible",
585
+ "field.attempt-count",
586
+ "field.brief-hash",
587
+ "field.c1-claim-absent",
588
+ "field.candidate-plan-hash",
589
+ "field.candidate-step-ids",
590
+ "field.candidate-step-set-hash",
591
+ "field.capability-id",
592
+ "field.capability-version",
593
+ "field.catalog-hash",
594
+ "field.corrective-decision-decision",
595
+ "field.corrective-decision-event-id",
596
+ "field.corrective-decision-hash",
597
+ "field.corrective-decision-plan-hash",
598
+ "field.corrective-decision-step-id",
599
+ "field.corrective-decision-triggering-attempt-count",
600
+ "field.corrective-posture",
601
+ "field.current-plan-hash",
602
+ "field.expected-revision",
603
+ "field.git-head",
604
+ "field.guarded-step-id",
605
+ "field.human-principal-identity-hash",
606
+ "field.in-progress-step-ids",
607
+ "field.knowledge-hash",
608
+ "field.knowledge-revision",
609
+ "field.lifecycle-epoch",
610
+ "field.plan-author-identity-hash",
611
+ "field.plan-validation-hash",
612
+ "field.plan-validation-passed",
613
+ "field.plan-validator-identity-hash",
614
+ "field.receipt-valid",
615
+ "field.remediation-attempt-count",
616
+ "field.remediation-tail-hash",
617
+ "field.risk-audit-hash",
618
+ "field.risk-audit-passed",
619
+ "field.risk-auditor-identity-hash",
620
+ "field.runtime-fingerprint",
621
+ "field.step-id",
622
+ "field.step-status",
623
+ "field.task-id",
624
+ "field.task-plan-hash",
625
+ "field.task-revision",
626
+ "field.task-status",
627
+ "field.transition-id",
628
+ "field.writer-lease-absent"
629
+ ]
630
+ },
631
+ "inputRef": {
632
+ "type": "object",
633
+ "additionalProperties": false,
634
+ "required": [
635
+ "id",
636
+ "version"
637
+ ],
638
+ "properties": {
639
+ "id": {
640
+ "enum": [
641
+ "input.corrective-execution-receipt",
642
+ "input.corrective-plan-risk-audit",
643
+ "input.corrective-plan-validation",
644
+ "input.corrective-replacement-plan",
645
+ "input.expected-revision",
646
+ "input.task-id"
647
+ ]
648
+ },
649
+ "version": {
650
+ "const": 1
651
+ }
652
+ }
653
+ },
654
+ "projectionRef": {
655
+ "type": "object",
656
+ "additionalProperties": false,
657
+ "required": [
658
+ "id",
659
+ "version"
660
+ ],
661
+ "properties": {
662
+ "id": {
663
+ "enum": [
664
+ "projection.corrective-replan.authority",
665
+ "projection.corrective-replan.bindings",
666
+ "projection.corrective-replan.candidate",
667
+ "projection.corrective-replan.execution-receipt",
668
+ "projection.corrective-replan.protocol",
669
+ "projection.corrective-replan.snapshot",
670
+ "projection.corrective-replan.state",
671
+ "projection.corrective-replan.terminal-readback",
672
+ "projection.input.execution-receipt",
673
+ "projection.input.expected-revision",
674
+ "projection.input.plan-risk-audit",
675
+ "projection.input.plan-validation",
676
+ "projection.input.replacement-plan",
677
+ "projection.input.task-id",
678
+ "projection.task-state.readback"
679
+ ]
680
+ },
681
+ "version": {
682
+ "const": 1
683
+ }
684
+ }
685
+ },
686
+ "hashPolicyRef": {
687
+ "type": "object",
688
+ "additionalProperties": false,
689
+ "required": [
690
+ "id",
691
+ "version"
692
+ ],
693
+ "properties": {
694
+ "id": {
695
+ "enum": [
696
+ "hash-policy.canonical-json-sha256",
697
+ "hash-policy.raw-sha256"
698
+ ]
699
+ },
700
+ "version": {
701
+ "const": 1
702
+ }
703
+ }
704
+ },
705
+ "identityRef": {
706
+ "type": "object",
707
+ "additionalProperties": false,
708
+ "required": [
709
+ "id",
710
+ "version"
711
+ ],
712
+ "properties": {
713
+ "id": {
714
+ "enum": [
715
+ "identity.actor",
716
+ "identity.human-principal",
717
+ "identity.plan-author",
718
+ "identity.plan-validator",
719
+ "identity.risk-auditor",
720
+ "identity.workflow-core"
721
+ ]
722
+ },
723
+ "version": {
724
+ "const": 1
725
+ }
726
+ }
727
+ },
728
+ "identityComparatorRef": {
729
+ "type": "object",
730
+ "additionalProperties": false,
731
+ "required": [
732
+ "id",
733
+ "version"
734
+ ],
735
+ "properties": {
736
+ "id": {
737
+ "enum": [
738
+ "identity-comparator.corrective-replan.author-human-principal",
739
+ "identity-comparator.corrective-replan.author-risk-auditor",
740
+ "identity-comparator.corrective-replan.author-validator"
741
+ ]
742
+ },
743
+ "version": {
744
+ "const": 1
745
+ }
746
+ }
747
+ },
748
+ "principalBasisRef": {
749
+ "type": "object",
750
+ "additionalProperties": false,
751
+ "required": [
752
+ "id",
753
+ "version"
754
+ ],
755
+ "properties": {
756
+ "id": {
757
+ "enum": [
758
+ "principal-basis.human-confirmation"
759
+ ]
760
+ },
761
+ "version": {
762
+ "const": 1
763
+ }
764
+ }
765
+ },
766
+ "capabilityRef": {
767
+ "type": "object",
768
+ "additionalProperties": false,
769
+ "required": [
770
+ "id",
771
+ "version"
772
+ ],
773
+ "properties": {
774
+ "id": {
775
+ "enum": [
776
+ "capability.task.corrective-replan"
777
+ ]
778
+ },
779
+ "version": {
780
+ "const": 1
781
+ }
782
+ }
783
+ },
784
+ "credentialPolicyRef": {
785
+ "type": "object",
786
+ "additionalProperties": false,
787
+ "required": [
788
+ "id",
789
+ "version"
790
+ ],
791
+ "properties": {
792
+ "id": {
793
+ "enum": [
794
+ "credential-policy.corrective-execution-receipt"
795
+ ]
796
+ },
797
+ "version": {
798
+ "const": 1
799
+ }
800
+ }
801
+ },
802
+ "credentialVerifierRef": {
803
+ "type": "object",
804
+ "additionalProperties": false,
805
+ "required": [
806
+ "id",
807
+ "version"
808
+ ],
809
+ "properties": {
810
+ "id": {
811
+ "enum": [
812
+ "credential-verifier.corrective-replan.receipt"
813
+ ]
814
+ },
815
+ "version": {
816
+ "const": 1
817
+ }
818
+ }
819
+ },
820
+ "delegationPolicyRef": {
821
+ "type": "object",
822
+ "additionalProperties": false,
823
+ "required": [
824
+ "id",
825
+ "version"
826
+ ],
827
+ "properties": {
828
+ "id": {
829
+ "enum": [
830
+ "delegation.forbidden"
831
+ ]
832
+ },
833
+ "version": {
834
+ "const": 1
835
+ }
836
+ }
837
+ },
838
+ "ownershipPolicyRef": {
839
+ "type": "object",
840
+ "additionalProperties": false,
841
+ "required": [
842
+ "id",
843
+ "version"
844
+ ],
845
+ "properties": {
846
+ "id": {
847
+ "enum": [
848
+ "ownership.corrective-replan-clear"
849
+ ]
850
+ },
851
+ "version": {
852
+ "const": 1
853
+ }
854
+ }
855
+ },
856
+ "guardEvaluatorRef": {
857
+ "type": "object",
858
+ "additionalProperties": false,
859
+ "required": [
860
+ "id",
861
+ "version"
862
+ ],
863
+ "properties": {
864
+ "id": {
865
+ "enum": [
866
+ "guard-evaluator.task.corrective-replan.active-decision",
867
+ "guard-evaluator.task.corrective-replan.actor-role-eligible",
868
+ "guard-evaluator.task.corrective-replan.attempt-threshold",
869
+ "guard-evaluator.task.corrective-replan.bindings-current",
870
+ "guard-evaluator.task.corrective-replan.guarded-step-retained",
871
+ "guard-evaluator.task.corrective-replan.no-c1-claim",
872
+ "guard-evaluator.task.corrective-replan.no-step-in-progress",
873
+ "guard-evaluator.task.corrective-replan.no-writer-lease",
874
+ "guard-evaluator.task.corrective-replan.plan-validation-passed",
875
+ "guard-evaluator.task.corrective-replan.receipt-valid",
876
+ "guard-evaluator.task.corrective-replan.risk-audit-passed",
877
+ "guard-evaluator.task.corrective-replan.semantic-plan-change",
878
+ "guard-evaluator.task.corrective-replan.source-posture"
879
+ ]
880
+ },
881
+ "version": {
882
+ "const": 1
883
+ }
884
+ }
885
+ },
886
+ "effectAdapterRef": {
887
+ "type": "object",
888
+ "additionalProperties": false,
889
+ "required": [
890
+ "id",
891
+ "version"
892
+ ],
893
+ "properties": {
894
+ "id": {
895
+ "enum": [
896
+ "effect-adapter.journaled-corrective-replan"
897
+ ]
898
+ },
899
+ "version": {
900
+ "const": 1
901
+ }
902
+ }
903
+ },
904
+ "resourceRef": {
905
+ "type": "object",
906
+ "additionalProperties": false,
907
+ "required": [
908
+ "id",
909
+ "version"
910
+ ],
911
+ "properties": {
912
+ "id": {
913
+ "enum": [
914
+ "resource.corrective-replan-execution-sidecar",
915
+ "resource.corrective-replan-journal",
916
+ "resource.plan-artifact",
917
+ "resource.plan-risk-audit-sidecar",
918
+ "resource.plan-validation-sidecar",
919
+ "resource.task-state"
920
+ ]
921
+ },
922
+ "version": {
923
+ "const": 1
924
+ }
925
+ }
926
+ },
927
+ "lockPolicyRef": {
928
+ "type": "object",
929
+ "additionalProperties": false,
930
+ "required": [
931
+ "id",
932
+ "version"
933
+ ],
934
+ "properties": {
935
+ "id": {
936
+ "enum": [
937
+ "lock-policy.corrective-replan-task-exclusive"
938
+ ]
939
+ },
940
+ "version": {
941
+ "const": 1
942
+ }
943
+ }
944
+ },
945
+ "executionKeyPolicyRef": {
946
+ "type": "object",
947
+ "additionalProperties": false,
948
+ "required": [
949
+ "id",
950
+ "version"
951
+ ],
952
+ "properties": {
953
+ "id": {
954
+ "enum": [
955
+ "execution-key-policy.corrective-replan-exact"
956
+ ]
957
+ },
958
+ "version": {
959
+ "const": 1
960
+ }
961
+ }
962
+ },
963
+ "journalSchemaRef": {
964
+ "type": "object",
965
+ "additionalProperties": false,
966
+ "required": [
967
+ "id",
968
+ "version"
969
+ ],
970
+ "properties": {
971
+ "id": {
972
+ "enum": [
973
+ "journal-schema.corrective-replan-task"
974
+ ]
975
+ },
976
+ "version": {
977
+ "const": 1
978
+ }
979
+ }
980
+ },
981
+ "journalAdapterRef": {
982
+ "type": "object",
983
+ "additionalProperties": false,
984
+ "required": [
985
+ "id",
986
+ "version"
987
+ ],
988
+ "properties": {
989
+ "id": {
990
+ "enum": [
991
+ "journal-adapter.corrective-replan-task"
992
+ ]
993
+ },
994
+ "version": {
995
+ "const": 1
996
+ }
997
+ }
998
+ },
999
+ "recoveryAdapterRef": {
1000
+ "type": "object",
1001
+ "additionalProperties": false,
1002
+ "required": [
1003
+ "id",
1004
+ "version"
1005
+ ],
1006
+ "properties": {
1007
+ "id": {
1008
+ "enum": [
1009
+ "recovery-adapter.corrective-replan-roll-forward"
1010
+ ]
1011
+ },
1012
+ "version": {
1013
+ "const": 1
1014
+ }
1015
+ }
1016
+ },
1017
+ "readbackAdapterRef": {
1018
+ "type": "object",
1019
+ "additionalProperties": false,
1020
+ "required": [
1021
+ "id",
1022
+ "version"
1023
+ ],
1024
+ "properties": {
1025
+ "id": {
1026
+ "enum": [
1027
+ "readback-adapter.corrective-replan-terminal"
1028
+ ]
1029
+ },
1030
+ "version": {
1031
+ "const": 1
1032
+ }
1033
+ }
1034
+ },
1035
+ "releaseProfileRef": {
1036
+ "type": "object",
1037
+ "additionalProperties": false,
1038
+ "required": [
1039
+ "id",
1040
+ "version"
1041
+ ],
1042
+ "properties": {
1043
+ "id": {
1044
+ "enum": [
1045
+ "release-profile.exact-mutation"
1046
+ ]
1047
+ },
1048
+ "version": {
1049
+ "const": 1
1050
+ }
1051
+ }
1052
+ },
1053
+ "coverageProfileRef": {
1054
+ "type": "object",
1055
+ "additionalProperties": false,
1056
+ "required": [
1057
+ "id",
1058
+ "version"
1059
+ ],
1060
+ "properties": {
1061
+ "id": {
1062
+ "enum": [
1063
+ "coverage-profile.exact-transition"
1064
+ ]
1065
+ },
1066
+ "version": {
1067
+ "const": 1
1068
+ }
1069
+ }
1070
+ },
1071
+ "limitationRef": {
1072
+ "type": "object",
1073
+ "additionalProperties": false,
1074
+ "required": [
1075
+ "id",
1076
+ "version"
1077
+ ],
1078
+ "properties": {
1079
+ "id": {
1080
+ "enum": [
1081
+ "limitation.release-profile.verified-evidence-external"
1082
+ ]
1083
+ },
1084
+ "version": {
1085
+ "const": 1
1086
+ }
1087
+ }
1088
+ },
1089
+ "projectionSlice": {
1090
+ "type": "object",
1091
+ "additionalProperties": false,
1092
+ "required": [
1093
+ "projection",
1094
+ "fieldIds"
1095
+ ],
1096
+ "properties": {
1097
+ "projection": {
1098
+ "$ref": "#/$defs/projectionRef"
1099
+ },
1100
+ "fieldIds": {
1101
+ "type": "array",
1102
+ "uniqueItems": true,
1103
+ "items": {
1104
+ "$ref": "#/$defs/fieldId"
1105
+ }
1106
+ }
1107
+ }
1108
+ },
1109
+ "projectionField": {
1110
+ "type": "object",
1111
+ "additionalProperties": false,
1112
+ "required": [
1113
+ "projection",
1114
+ "fieldId"
1115
+ ],
1116
+ "properties": {
1117
+ "projection": {
1118
+ "$ref": "#/$defs/projectionRef"
1119
+ },
1120
+ "fieldId": {
1121
+ "$ref": "#/$defs/fieldId"
1122
+ }
1123
+ }
1124
+ },
1125
+ "taskStatus": {
1126
+ "enum": [
1127
+ "planning",
1128
+ "awaiting_execution_authorization",
1129
+ "ready",
1130
+ "in_progress",
1131
+ "validating",
1132
+ "needs_fix",
1133
+ "awaiting_final_acceptance",
1134
+ "merging",
1135
+ "ready_to_merge",
1136
+ "merged",
1137
+ "blocked",
1138
+ "cancelled"
1139
+ ]
1140
+ },
1141
+ "milestoneStatus": {
1142
+ "enum": [
1143
+ "planning",
1144
+ "awaiting_execution_authorization",
1145
+ "active",
1146
+ "validating",
1147
+ "awaiting_final_acceptance",
1148
+ "accepted",
1149
+ "blocked",
1150
+ "cancelled"
1151
+ ]
1152
+ },
1153
+ "stepStatus": {
1154
+ "enum": [
1155
+ "planned",
1156
+ "in_progress",
1157
+ "completed",
1158
+ "failed",
1159
+ "blocked",
1160
+ "skipped"
1161
+ ]
1162
+ },
1163
+ "role": {
1164
+ "enum": [
1165
+ "scope-lead",
1166
+ "technical-planner",
1167
+ "delivery-coordinator",
1168
+ "worker",
1169
+ "independent-reviewer",
1170
+ "human-principal",
1171
+ "plan-validator",
1172
+ "milestone-coordinator",
1173
+ "delegate-coordinator",
1174
+ "c1-claimant",
1175
+ "corrective-auditor",
1176
+ "workflow-core",
1177
+ "update-migration-operator"
1178
+ ]
1179
+ },
1180
+ "command": {
1181
+ "type": "object",
1182
+ "additionalProperties": false,
1183
+ "required": [
1184
+ "command",
1185
+ "noun",
1186
+ "action"
1187
+ ],
1188
+ "properties": {
1189
+ "command": {
1190
+ "$ref": "#/$defs/nonEmptyString"
1191
+ },
1192
+ "noun": {
1193
+ "$ref": "#/$defs/nonEmptyString"
1194
+ },
1195
+ "action": {
1196
+ "$ref": "#/$defs/nonEmptyString"
1197
+ }
1198
+ }
1199
+ },
1200
+ "sourcePosture": {
1201
+ "type": "object",
1202
+ "additionalProperties": false,
1203
+ "required": [
1204
+ "taskStatuses",
1205
+ "milestoneStatuses",
1206
+ "stepStatuses",
1207
+ "correctivePostures"
1208
+ ],
1209
+ "properties": {
1210
+ "taskStatuses": {
1211
+ "type": "array",
1212
+ "uniqueItems": true,
1213
+ "items": {
1214
+ "$ref": "#/$defs/taskStatus"
1215
+ }
1216
+ },
1217
+ "milestoneStatuses": {
1218
+ "type": "array",
1219
+ "uniqueItems": true,
1220
+ "items": {
1221
+ "$ref": "#/$defs/milestoneStatus"
1222
+ }
1223
+ },
1224
+ "stepStatuses": {
1225
+ "type": "array",
1226
+ "uniqueItems": true,
1227
+ "items": {
1228
+ "$ref": "#/$defs/stepStatus"
1229
+ }
1230
+ },
1231
+ "correctivePostures": {
1232
+ "$ref": "#/$defs/uniqueStrings"
1233
+ }
1234
+ }
1235
+ },
1236
+ "inputRequirement": {
1237
+ "type": "object",
1238
+ "additionalProperties": false,
1239
+ "required": [
1240
+ "input",
1241
+ "phase",
1242
+ "required",
1243
+ "sensitivity"
1244
+ ],
1245
+ "properties": {
1246
+ "input": {
1247
+ "$ref": "#/$defs/inputRef"
1248
+ },
1249
+ "phase": {
1250
+ "enum": [
1251
+ "availability",
1252
+ "execution"
1253
+ ]
1254
+ },
1255
+ "required": {
1256
+ "type": "boolean"
1257
+ },
1258
+ "sensitivity": {
1259
+ "enum": [
1260
+ "public",
1261
+ "sensitive"
1262
+ ]
1263
+ }
1264
+ }
1265
+ },
1266
+ "outputRequirement": {
1267
+ "type": "object",
1268
+ "additionalProperties": false,
1269
+ "required": [
1270
+ "outputId",
1271
+ "channel",
1272
+ "sensitivity",
1273
+ "required"
1274
+ ],
1275
+ "properties": {
1276
+ "outputId": {
1277
+ "type": "string",
1278
+ "pattern": "^output\\.[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)*$"
1279
+ },
1280
+ "channel": {
1281
+ "enum": [
1282
+ "navigation",
1283
+ "result",
1284
+ "credential-receipt"
1285
+ ]
1286
+ },
1287
+ "sensitivity": {
1288
+ "enum": [
1289
+ "public",
1290
+ "redacted",
1291
+ "issuance-only",
1292
+ "internal"
1293
+ ]
1294
+ },
1295
+ "required": {
1296
+ "type": "boolean"
1297
+ }
1298
+ }
1299
+ },
1300
+ "guard": {
1301
+ "type": "object",
1302
+ "additionalProperties": false,
1303
+ "required": [
1304
+ "guardId",
1305
+ "semanticVersion",
1306
+ "phase",
1307
+ "stage",
1308
+ "reasonClass",
1309
+ "evaluator",
1310
+ "reads",
1311
+ "requiredInputs",
1312
+ "description"
1313
+ ],
1314
+ "properties": {
1315
+ "guardId": {
1316
+ "$ref": "#/$defs/stableId"
1317
+ },
1318
+ "semanticVersion": {
1319
+ "type": "integer",
1320
+ "minimum": 1
1321
+ },
1322
+ "phase": {
1323
+ "enum": [
1324
+ "availability",
1325
+ "execution"
1326
+ ]
1327
+ },
1328
+ "stage": {
1329
+ "enum": [
1330
+ "observation",
1331
+ "authority",
1332
+ "candidate"
1333
+ ]
1334
+ },
1335
+ "reasonClass": {
1336
+ "enum": [
1337
+ "lifecycle-blocker",
1338
+ "authority-blocker",
1339
+ "candidate-blocker",
1340
+ "external-race",
1341
+ "integrity-failure"
1342
+ ]
1343
+ },
1344
+ "evaluator": {
1345
+ "$ref": "#/$defs/guardEvaluatorRef"
1346
+ },
1347
+ "reads": {
1348
+ "type": "array",
1349
+ "uniqueItems": true,
1350
+ "items": {
1351
+ "$ref": "#/$defs/projectionSlice"
1352
+ }
1353
+ },
1354
+ "requiredInputs": {
1355
+ "type": "array",
1356
+ "uniqueItems": true,
1357
+ "items": {
1358
+ "$ref": "#/$defs/inputRef"
1359
+ }
1360
+ },
1361
+ "description": {
1362
+ "$ref": "#/$defs/nonEmptyString"
1363
+ }
1364
+ }
1365
+ },
1366
+ "actorContract": {
1367
+ "type": "object",
1368
+ "additionalProperties": false,
1369
+ "required": [
1370
+ "identity",
1371
+ "principalBasis",
1372
+ "required"
1373
+ ],
1374
+ "properties": {
1375
+ "identity": {
1376
+ "$ref": "#/$defs/identityRef"
1377
+ },
1378
+ "principalBasis": {
1379
+ "$ref": "#/$defs/principalBasisRef"
1380
+ },
1381
+ "required": {
1382
+ "type": "boolean"
1383
+ }
1384
+ }
1385
+ },
1386
+ "principalContract": {
1387
+ "type": "object",
1388
+ "additionalProperties": false,
1389
+ "required": [
1390
+ "identity",
1391
+ "principalBasis",
1392
+ "issuer",
1393
+ "allowedKinds"
1394
+ ],
1395
+ "properties": {
1396
+ "identity": {
1397
+ "$ref": "#/$defs/identityRef"
1398
+ },
1399
+ "principalBasis": {
1400
+ "$ref": "#/$defs/principalBasisRef"
1401
+ },
1402
+ "issuer": {
1403
+ "$ref": "#/$defs/identityRef"
1404
+ },
1405
+ "allowedKinds": {
1406
+ "type": "array",
1407
+ "minItems": 1,
1408
+ "uniqueItems": true,
1409
+ "items": {
1410
+ "enum": [
1411
+ "human",
1412
+ "workflow-core",
1413
+ "delegation-grant",
1414
+ "update-operator"
1415
+ ]
1416
+ }
1417
+ }
1418
+ }
1419
+ },
1420
+ "capabilityRequirement": {
1421
+ "type": "object",
1422
+ "additionalProperties": false,
1423
+ "required": [
1424
+ "capability",
1425
+ "source",
1426
+ "required"
1427
+ ],
1428
+ "properties": {
1429
+ "capability": {
1430
+ "$ref": "#/$defs/capabilityRef"
1431
+ },
1432
+ "source": {
1433
+ "enum": [
1434
+ "catalog",
1435
+ "principal",
1436
+ "credential",
1437
+ "state"
1438
+ ]
1439
+ },
1440
+ "required": {
1441
+ "type": "boolean"
1442
+ }
1443
+ }
1444
+ },
1445
+ "guardEnforcement": {
1446
+ "type": "object",
1447
+ "additionalProperties": false,
1448
+ "required": [
1449
+ "kind",
1450
+ "guardId",
1451
+ "evaluator"
1452
+ ],
1453
+ "properties": {
1454
+ "kind": {
1455
+ "const": "guard"
1456
+ },
1457
+ "guardId": {
1458
+ "$ref": "#/$defs/stableId"
1459
+ },
1460
+ "evaluator": {
1461
+ "$ref": "#/$defs/guardEvaluatorRef"
1462
+ }
1463
+ }
1464
+ },
1465
+ "credentialEnforcement": {
1466
+ "type": "object",
1467
+ "additionalProperties": false,
1468
+ "required": [
1469
+ "kind",
1470
+ "verifier"
1471
+ ],
1472
+ "properties": {
1473
+ "kind": {
1474
+ "const": "credential-verifier"
1475
+ },
1476
+ "verifier": {
1477
+ "$ref": "#/$defs/credentialVerifierRef"
1478
+ }
1479
+ }
1480
+ },
1481
+ "attestationEnforcement": {
1482
+ "type": "object",
1483
+ "additionalProperties": false,
1484
+ "required": [
1485
+ "kind",
1486
+ "input",
1487
+ "verifier"
1488
+ ],
1489
+ "properties": {
1490
+ "kind": {
1491
+ "const": "attestation"
1492
+ },
1493
+ "input": {
1494
+ "$ref": "#/$defs/inputRef"
1495
+ },
1496
+ "verifier": {
1497
+ "$ref": "#/$defs/credentialVerifierRef"
1498
+ }
1499
+ }
1500
+ },
1501
+ "identityEnforcement": {
1502
+ "oneOf": [
1503
+ {
1504
+ "$ref": "#/$defs/guardEnforcement"
1505
+ },
1506
+ {
1507
+ "$ref": "#/$defs/credentialEnforcement"
1508
+ },
1509
+ {
1510
+ "$ref": "#/$defs/attestationEnforcement"
1511
+ }
1512
+ ]
1513
+ },
1514
+ "separationConstraint": {
1515
+ "type": "object",
1516
+ "additionalProperties": false,
1517
+ "required": [
1518
+ "constraintId",
1519
+ "left",
1520
+ "right",
1521
+ "relation",
1522
+ "missingIdentity",
1523
+ "comparator",
1524
+ "enforcement"
1525
+ ],
1526
+ "properties": {
1527
+ "constraintId": {
1528
+ "type": "string",
1529
+ "pattern": "^sod\\."
1530
+ },
1531
+ "left": {
1532
+ "$ref": "#/$defs/identityRef"
1533
+ },
1534
+ "right": {
1535
+ "$ref": "#/$defs/identityRef"
1536
+ },
1537
+ "relation": {
1538
+ "enum": [
1539
+ "distinct",
1540
+ "same"
1541
+ ]
1542
+ },
1543
+ "missingIdentity": {
1544
+ "enum": [
1545
+ "block",
1546
+ "integrity-failure"
1547
+ ]
1548
+ },
1549
+ "comparator": {
1550
+ "$ref": "#/$defs/identityComparatorRef"
1551
+ },
1552
+ "enforcement": {
1553
+ "$ref": "#/$defs/identityEnforcement"
1554
+ }
1555
+ }
1556
+ },
1557
+ "forbiddenCombination": {
1558
+ "type": "object",
1559
+ "additionalProperties": false,
1560
+ "required": [
1561
+ "constraintId",
1562
+ "subjects",
1563
+ "rule",
1564
+ "missingIdentity",
1565
+ "comparator",
1566
+ "enforcement"
1567
+ ],
1568
+ "properties": {
1569
+ "constraintId": {
1570
+ "type": "string",
1571
+ "pattern": "^forbidden\\."
1572
+ },
1573
+ "subjects": {
1574
+ "type": "array",
1575
+ "minItems": 2,
1576
+ "uniqueItems": true,
1577
+ "items": {
1578
+ "$ref": "#/$defs/identityRef"
1579
+ }
1580
+ },
1581
+ "rule": {
1582
+ "enum": [
1583
+ "cannot-authorize",
1584
+ "cannot-coexist",
1585
+ "cannot-delegate",
1586
+ "cannot-preserve"
1587
+ ]
1588
+ },
1589
+ "missingIdentity": {
1590
+ "enum": [
1591
+ "block",
1592
+ "integrity-failure"
1593
+ ]
1594
+ },
1595
+ "comparator": {
1596
+ "$ref": "#/$defs/identityComparatorRef"
1597
+ },
1598
+ "enforcement": {
1599
+ "$ref": "#/$defs/identityEnforcement"
1600
+ }
1601
+ }
1602
+ },
1603
+ "authority": {
1604
+ "type": "object",
1605
+ "additionalProperties": false,
1606
+ "required": [
1607
+ "eligibleRoles",
1608
+ "actor",
1609
+ "principal",
1610
+ "capabilities",
1611
+ "credentials",
1612
+ "delegation",
1613
+ "ownership",
1614
+ "executionBoundaries",
1615
+ "separationOfDuty",
1616
+ "forbiddenCombinations"
1617
+ ],
1618
+ "properties": {
1619
+ "eligibleRoles": {
1620
+ "type": "array",
1621
+ "uniqueItems": true,
1622
+ "items": {
1623
+ "$ref": "#/$defs/role"
1624
+ }
1625
+ },
1626
+ "actor": {
1627
+ "$ref": "#/$defs/actorContract"
1628
+ },
1629
+ "principal": {
1630
+ "$ref": "#/$defs/principalContract"
1631
+ },
1632
+ "capabilities": {
1633
+ "type": "array",
1634
+ "uniqueItems": true,
1635
+ "items": {
1636
+ "$ref": "#/$defs/capabilityRequirement"
1637
+ }
1638
+ },
1639
+ "credentials": {
1640
+ "type": "array",
1641
+ "uniqueItems": true,
1642
+ "items": {
1643
+ "$ref": "#/$defs/credentialPolicyRef"
1644
+ }
1645
+ },
1646
+ "delegation": {
1647
+ "$ref": "#/$defs/delegationPolicyRef"
1648
+ },
1649
+ "ownership": {
1650
+ "$ref": "#/$defs/ownershipPolicyRef"
1651
+ },
1652
+ "executionBoundaries": {
1653
+ "type": "array",
1654
+ "uniqueItems": true,
1655
+ "items": {
1656
+ "enum": [
1657
+ "human",
1658
+ "coordinator",
1659
+ "worker",
1660
+ "reviewer",
1661
+ "auditor",
1662
+ "workflow-core",
1663
+ "update-operator"
1664
+ ]
1665
+ }
1666
+ },
1667
+ "separationOfDuty": {
1668
+ "type": "array",
1669
+ "uniqueItems": true,
1670
+ "items": {
1671
+ "$ref": "#/$defs/separationConstraint"
1672
+ }
1673
+ },
1674
+ "forbiddenCombinations": {
1675
+ "type": "array",
1676
+ "uniqueItems": true,
1677
+ "items": {
1678
+ "$ref": "#/$defs/forbiddenCombination"
1679
+ }
1680
+ }
1681
+ }
1682
+ },
1683
+ "taskStatusEffect": {
1684
+ "type": "object",
1685
+ "additionalProperties": false,
1686
+ "required": [
1687
+ "from",
1688
+ "to"
1689
+ ],
1690
+ "properties": {
1691
+ "from": {
1692
+ "type": "array",
1693
+ "uniqueItems": true,
1694
+ "items": {
1695
+ "$ref": "#/$defs/taskStatus"
1696
+ }
1697
+ },
1698
+ "to": {
1699
+ "anyOf": [
1700
+ {
1701
+ "$ref": "#/$defs/taskStatus"
1702
+ },
1703
+ {
1704
+ "enum": [
1705
+ "input-dependent",
1706
+ "preserved"
1707
+ ]
1708
+ }
1709
+ ]
1710
+ }
1711
+ }
1712
+ },
1713
+ "milestoneStatusEffect": {
1714
+ "type": "object",
1715
+ "additionalProperties": false,
1716
+ "required": [
1717
+ "from",
1718
+ "to"
1719
+ ],
1720
+ "properties": {
1721
+ "from": {
1722
+ "type": "array",
1723
+ "uniqueItems": true,
1724
+ "items": {
1725
+ "$ref": "#/$defs/milestoneStatus"
1726
+ }
1727
+ },
1728
+ "to": {
1729
+ "anyOf": [
1730
+ {
1731
+ "$ref": "#/$defs/milestoneStatus"
1732
+ },
1733
+ {
1734
+ "enum": [
1735
+ "input-dependent",
1736
+ "preserved"
1737
+ ]
1738
+ }
1739
+ ]
1740
+ }
1741
+ }
1742
+ },
1743
+ "stepStatusEffect": {
1744
+ "type": "object",
1745
+ "additionalProperties": false,
1746
+ "required": [
1747
+ "from",
1748
+ "to"
1749
+ ],
1750
+ "properties": {
1751
+ "from": {
1752
+ "type": "array",
1753
+ "uniqueItems": true,
1754
+ "items": {
1755
+ "$ref": "#/$defs/stepStatus"
1756
+ }
1757
+ },
1758
+ "to": {
1759
+ "anyOf": [
1760
+ {
1761
+ "$ref": "#/$defs/stepStatus"
1762
+ },
1763
+ {
1764
+ "enum": [
1765
+ "input-dependent",
1766
+ "preserved"
1767
+ ]
1768
+ }
1769
+ ]
1770
+ }
1771
+ }
1772
+ },
1773
+ "supersession": {
1774
+ "type": "object",
1775
+ "additionalProperties": false,
1776
+ "required": [
1777
+ "executionAuthorization",
1778
+ "finalAcceptance",
1779
+ "delegationGrants",
1780
+ "c1Claim",
1781
+ "writerLease"
1782
+ ],
1783
+ "properties": {
1784
+ "executionAuthorization": {
1785
+ "enum": [
1786
+ "preserve",
1787
+ "supersede-approved",
1788
+ "invalidate"
1789
+ ]
1790
+ },
1791
+ "finalAcceptance": {
1792
+ "enum": [
1793
+ "preserve",
1794
+ "supersede-approved",
1795
+ "invalidate"
1796
+ ]
1797
+ },
1798
+ "delegationGrants": {
1799
+ "enum": [
1800
+ "preserve",
1801
+ "supersede",
1802
+ "invalidate"
1803
+ ]
1804
+ },
1805
+ "c1Claim": {
1806
+ "enum": [
1807
+ "preserve",
1808
+ "supersede",
1809
+ "invalidate"
1810
+ ]
1811
+ },
1812
+ "writerLease": {
1813
+ "enum": [
1814
+ "preserve",
1815
+ "release",
1816
+ "invalidate"
1817
+ ]
1818
+ }
1819
+ }
1820
+ },
1821
+ "effectCondition": {
1822
+ "oneOf": [
1823
+ {
1824
+ "type": "object",
1825
+ "additionalProperties": false,
1826
+ "required": [
1827
+ "kind",
1828
+ "input"
1829
+ ],
1830
+ "properties": {
1831
+ "kind": {
1832
+ "const": "input-present"
1833
+ },
1834
+ "input": {
1835
+ "$ref": "#/$defs/inputRef"
1836
+ }
1837
+ }
1838
+ },
1839
+ {
1840
+ "type": "object",
1841
+ "additionalProperties": false,
1842
+ "required": [
1843
+ "kind",
1844
+ "guardId"
1845
+ ],
1846
+ "properties": {
1847
+ "kind": {
1848
+ "const": "guard-passed"
1849
+ },
1850
+ "guardId": {
1851
+ "$ref": "#/$defs/stableId"
1852
+ }
1853
+ }
1854
+ }
1855
+ ]
1856
+ },
1857
+ "effectNode": {
1858
+ "type": "object",
1859
+ "additionalProperties": false,
1860
+ "required": [
1861
+ "effectId",
1862
+ "ordinal",
1863
+ "adapter",
1864
+ "resource",
1865
+ "operation",
1866
+ "conditions",
1867
+ "dependsOn"
1868
+ ],
1869
+ "properties": {
1870
+ "effectId": {
1871
+ "type": "string",
1872
+ "pattern": "^effect\\."
1873
+ },
1874
+ "ordinal": {
1875
+ "type": "integer",
1876
+ "minimum": 0
1877
+ },
1878
+ "adapter": {
1879
+ "$ref": "#/$defs/effectAdapterRef"
1880
+ },
1881
+ "resource": {
1882
+ "$ref": "#/$defs/resourceRef"
1883
+ },
1884
+ "operation": {
1885
+ "enum": [
1886
+ "stage",
1887
+ "write",
1888
+ "append",
1889
+ "publish",
1890
+ "replace",
1891
+ "delete",
1892
+ "preserve"
1893
+ ]
1894
+ },
1895
+ "conditions": {
1896
+ "type": "array",
1897
+ "uniqueItems": true,
1898
+ "items": {
1899
+ "$ref": "#/$defs/effectCondition"
1900
+ }
1901
+ },
1902
+ "dependsOn": {
1903
+ "type": "array",
1904
+ "uniqueItems": true,
1905
+ "items": {
1906
+ "type": "string",
1907
+ "pattern": "^effect\\."
1908
+ }
1909
+ }
1910
+ }
1911
+ },
1912
+ "postcondition": {
1913
+ "type": "object",
1914
+ "additionalProperties": false,
1915
+ "required": [
1916
+ "postconditionId",
1917
+ "assertion",
1918
+ "reads",
1919
+ "effectNodeIds"
1920
+ ],
1921
+ "properties": {
1922
+ "postconditionId": {
1923
+ "type": "string",
1924
+ "pattern": "^postcondition\\."
1925
+ },
1926
+ "assertion": {
1927
+ "enum": [
1928
+ "hash-equals",
1929
+ "revision-advanced",
1930
+ "status-equals",
1931
+ "event-appended",
1932
+ "path-absent"
1933
+ ]
1934
+ },
1935
+ "reads": {
1936
+ "type": "array",
1937
+ "uniqueItems": true,
1938
+ "items": {
1939
+ "$ref": "#/$defs/projectionSlice"
1940
+ }
1941
+ },
1942
+ "effectNodeIds": {
1943
+ "type": "array",
1944
+ "minItems": 1,
1945
+ "uniqueItems": true,
1946
+ "items": {
1947
+ "type": "string",
1948
+ "pattern": "^effect\\."
1949
+ }
1950
+ }
1951
+ }
1952
+ },
1953
+ "effectGraph": {
1954
+ "type": "object",
1955
+ "additionalProperties": false,
1956
+ "required": [
1957
+ "graphId",
1958
+ "graphVersion",
1959
+ "taskStatus",
1960
+ "milestoneStatus",
1961
+ "stepStatus",
1962
+ "supersession",
1963
+ "orderedNodes",
1964
+ "postconditions"
1965
+ ],
1966
+ "properties": {
1967
+ "graphId": {
1968
+ "type": "string",
1969
+ "pattern": "^effect-graph\\."
1970
+ },
1971
+ "graphVersion": {
1972
+ "type": "integer",
1973
+ "minimum": 1
1974
+ },
1975
+ "taskStatus": {
1976
+ "$ref": "#/$defs/taskStatusEffect"
1977
+ },
1978
+ "milestoneStatus": {
1979
+ "$ref": "#/$defs/milestoneStatusEffect"
1980
+ },
1981
+ "stepStatus": {
1982
+ "$ref": "#/$defs/stepStatusEffect"
1983
+ },
1984
+ "supersession": {
1985
+ "$ref": "#/$defs/supersession"
1986
+ },
1987
+ "orderedNodes": {
1988
+ "type": "array",
1989
+ "minItems": 1,
1990
+ "uniqueItems": true,
1991
+ "items": {
1992
+ "$ref": "#/$defs/effectNode"
1993
+ }
1994
+ },
1995
+ "postconditions": {
1996
+ "type": "array",
1997
+ "uniqueItems": true,
1998
+ "items": {
1999
+ "$ref": "#/$defs/postcondition"
2000
+ }
2001
+ }
2002
+ }
2003
+ },
2004
+ "revalidation": {
2005
+ "type": "object",
2006
+ "additionalProperties": false,
2007
+ "required": [
2008
+ "revalidationId",
2009
+ "ordinal",
2010
+ "raceId",
2011
+ "guardId",
2012
+ "evaluator",
2013
+ "reads",
2014
+ "underLock"
2015
+ ],
2016
+ "properties": {
2017
+ "revalidationId": {
2018
+ "type": "string",
2019
+ "pattern": "^revalidation\\."
2020
+ },
2021
+ "ordinal": {
2022
+ "type": "integer",
2023
+ "minimum": 0
2024
+ },
2025
+ "raceId": {
2026
+ "type": "string",
2027
+ "pattern": "^race\\."
2028
+ },
2029
+ "guardId": {
2030
+ "$ref": "#/$defs/stableId"
2031
+ },
2032
+ "evaluator": {
2033
+ "$ref": "#/$defs/guardEvaluatorRef"
2034
+ },
2035
+ "reads": {
2036
+ "type": "array",
2037
+ "uniqueItems": true,
2038
+ "items": {
2039
+ "$ref": "#/$defs/projectionSlice"
2040
+ }
2041
+ },
2042
+ "underLock": {
2043
+ "type": "boolean"
2044
+ }
2045
+ }
2046
+ },
2047
+ "admissionBoundary": {
2048
+ "type": "object",
2049
+ "additionalProperties": false,
2050
+ "required": [
2051
+ "lock",
2052
+ "orderedRevalidations",
2053
+ "firstEffectAfterRevalidation",
2054
+ "release"
2055
+ ],
2056
+ "properties": {
2057
+ "lock": {
2058
+ "type": "object",
2059
+ "additionalProperties": false,
2060
+ "required": [
2061
+ "policy",
2062
+ "scope"
2063
+ ],
2064
+ "properties": {
2065
+ "policy": {
2066
+ "$ref": "#/$defs/lockPolicyRef"
2067
+ },
2068
+ "scope": {
2069
+ "$ref": "#/$defs/projectionSlice"
2070
+ }
2071
+ }
2072
+ },
2073
+ "orderedRevalidations": {
2074
+ "type": "array",
2075
+ "uniqueItems": true,
2076
+ "items": {
2077
+ "$ref": "#/$defs/revalidation"
2078
+ }
2079
+ },
2080
+ "firstEffectAfterRevalidation": {
2081
+ "const": true
2082
+ },
2083
+ "release": {
2084
+ "const": "finally-after-readback"
2085
+ }
2086
+ }
2087
+ },
2088
+ "racePrecondition": {
2089
+ "type": "object",
2090
+ "additionalProperties": false,
2091
+ "required": [
2092
+ "raceId",
2093
+ "reasonClass",
2094
+ "guardId",
2095
+ "revalidationId",
2096
+ "reads",
2097
+ "allowedFailureCodes"
2098
+ ],
2099
+ "properties": {
2100
+ "raceId": {
2101
+ "type": "string",
2102
+ "pattern": "^race\\."
2103
+ },
2104
+ "reasonClass": {
2105
+ "enum": [
2106
+ "external-race",
2107
+ "integrity-failure"
2108
+ ]
2109
+ },
2110
+ "guardId": {
2111
+ "$ref": "#/$defs/stableId"
2112
+ },
2113
+ "revalidationId": {
2114
+ "type": "string",
2115
+ "pattern": "^revalidation\\."
2116
+ },
2117
+ "reads": {
2118
+ "type": "array",
2119
+ "uniqueItems": true,
2120
+ "items": {
2121
+ "$ref": "#/$defs/projectionSlice"
2122
+ }
2123
+ },
2124
+ "allowedFailureCodes": {
2125
+ "type": "array",
2126
+ "minItems": 1,
2127
+ "uniqueItems": true,
2128
+ "items": {
2129
+ "enum": [
2130
+ "STATE_CONFLICT",
2131
+ "GIT_PRECONDITION_FAILED",
2132
+ "CREDENTIAL_EXPIRED",
2133
+ "STATE_CORRUPT"
2134
+ ]
2135
+ }
2136
+ }
2137
+ }
2138
+ },
2139
+ "executionKey": {
2140
+ "type": "object",
2141
+ "additionalProperties": false,
2142
+ "required": [
2143
+ "policy",
2144
+ "fields",
2145
+ "hashPolicy"
2146
+ ],
2147
+ "properties": {
2148
+ "policy": {
2149
+ "$ref": "#/$defs/executionKeyPolicyRef"
2150
+ },
2151
+ "fields": {
2152
+ "type": "array",
2153
+ "minItems": 1,
2154
+ "uniqueItems": true,
2155
+ "items": {
2156
+ "$ref": "#/$defs/projectionField"
2157
+ }
2158
+ },
2159
+ "hashPolicy": {
2160
+ "$ref": "#/$defs/hashPolicyRef"
2161
+ }
2162
+ }
2163
+ },
2164
+ "replay": {
2165
+ "type": "object",
2166
+ "additionalProperties": false,
2167
+ "required": [
2168
+ "identicalCompleted",
2169
+ "identicalInProgress",
2170
+ "conflicting"
2171
+ ],
2172
+ "properties": {
2173
+ "identicalCompleted": {
2174
+ "enum": [
2175
+ "return-recorded-result",
2176
+ "reject"
2177
+ ]
2178
+ },
2179
+ "identicalInProgress": {
2180
+ "enum": [
2181
+ "resume-journal",
2182
+ "reject"
2183
+ ]
2184
+ },
2185
+ "conflicting": {
2186
+ "enum": [
2187
+ "reject-state-conflict",
2188
+ "reject-transition-blocked"
2189
+ ]
2190
+ }
2191
+ }
2192
+ },
2193
+ "journalPhase": {
2194
+ "type": "object",
2195
+ "additionalProperties": false,
2196
+ "required": [
2197
+ "phaseId",
2198
+ "ordinal",
2199
+ "allowedNextPhaseIds",
2200
+ "terminal",
2201
+ "durable",
2202
+ "effectNodeIds",
2203
+ "digestFields"
2204
+ ],
2205
+ "properties": {
2206
+ "phaseId": {
2207
+ "type": "string",
2208
+ "pattern": "^journal-phase\\."
2209
+ },
2210
+ "ordinal": {
2211
+ "type": "integer",
2212
+ "minimum": 0
2213
+ },
2214
+ "allowedNextPhaseIds": {
2215
+ "type": "array",
2216
+ "uniqueItems": true,
2217
+ "items": {
2218
+ "type": "string",
2219
+ "pattern": "^journal-phase\\."
2220
+ }
2221
+ },
2222
+ "terminal": {
2223
+ "type": "boolean"
2224
+ },
2225
+ "durable": {
2226
+ "type": "boolean"
2227
+ },
2228
+ "effectNodeIds": {
2229
+ "type": "array",
2230
+ "uniqueItems": true,
2231
+ "items": {
2232
+ "type": "string",
2233
+ "pattern": "^effect\\."
2234
+ }
2235
+ },
2236
+ "digestFields": {
2237
+ "type": "array",
2238
+ "uniqueItems": true,
2239
+ "items": {
2240
+ "$ref": "#/$defs/projectionField"
2241
+ }
2242
+ }
2243
+ }
2244
+ },
2245
+ "journal": {
2246
+ "oneOf": [
2247
+ {
2248
+ "type": "object",
2249
+ "additionalProperties": false,
2250
+ "required": [
2251
+ "mode"
2252
+ ],
2253
+ "properties": {
2254
+ "mode": {
2255
+ "const": "none"
2256
+ }
2257
+ }
2258
+ },
2259
+ {
2260
+ "type": "object",
2261
+ "additionalProperties": false,
2262
+ "required": [
2263
+ "mode",
2264
+ "schema",
2265
+ "adapter",
2266
+ "digestPolicy",
2267
+ "orderedPhases"
2268
+ ],
2269
+ "properties": {
2270
+ "mode": {
2271
+ "const": "required"
2272
+ },
2273
+ "schema": {
2274
+ "$ref": "#/$defs/journalSchemaRef"
2275
+ },
2276
+ "adapter": {
2277
+ "$ref": "#/$defs/journalAdapterRef"
2278
+ },
2279
+ "digestPolicy": {
2280
+ "$ref": "#/$defs/hashPolicyRef"
2281
+ },
2282
+ "orderedPhases": {
2283
+ "type": "array",
2284
+ "minItems": 2,
2285
+ "uniqueItems": true,
2286
+ "items": {
2287
+ "$ref": "#/$defs/journalPhase"
2288
+ }
2289
+ }
2290
+ }
2291
+ }
2292
+ ]
2293
+ },
2294
+ "recoveryStep": {
2295
+ "type": "object",
2296
+ "additionalProperties": false,
2297
+ "required": [
2298
+ "stepId",
2299
+ "ordinal",
2300
+ "fromPhaseId",
2301
+ "toPhaseId"
2302
+ ],
2303
+ "properties": {
2304
+ "stepId": {
2305
+ "type": "string",
2306
+ "pattern": "^recovery-step\\."
2307
+ },
2308
+ "ordinal": {
2309
+ "type": "integer",
2310
+ "minimum": 0
2311
+ },
2312
+ "fromPhaseId": {
2313
+ "type": "string",
2314
+ "pattern": "^journal-phase\\."
2315
+ },
2316
+ "toPhaseId": {
2317
+ "type": "string",
2318
+ "pattern": "^journal-phase\\."
2319
+ }
2320
+ }
2321
+ },
2322
+ "recovery": {
2323
+ "oneOf": [
2324
+ {
2325
+ "type": "object",
2326
+ "additionalProperties": false,
2327
+ "required": [
2328
+ "mode",
2329
+ "fromPhaseIds"
2330
+ ],
2331
+ "properties": {
2332
+ "mode": {
2333
+ "const": "manual-integrity-stop"
2334
+ },
2335
+ "fromPhaseIds": {
2336
+ "type": "array",
2337
+ "uniqueItems": true,
2338
+ "items": {
2339
+ "type": "string",
2340
+ "pattern": "^journal-phase\\."
2341
+ }
2342
+ }
2343
+ }
2344
+ },
2345
+ {
2346
+ "type": "object",
2347
+ "additionalProperties": false,
2348
+ "required": [
2349
+ "mode",
2350
+ "trigger",
2351
+ "adapter",
2352
+ "fromPhaseIds",
2353
+ "orderedSteps"
2354
+ ],
2355
+ "properties": {
2356
+ "mode": {
2357
+ "enum": [
2358
+ "automatic-roll-forward",
2359
+ "automatic-roll-back"
2360
+ ]
2361
+ },
2362
+ "adapter": {
2363
+ "$ref": "#/$defs/recoveryAdapterRef"
2364
+ },
2365
+ "trigger": {
2366
+ "const": "explicit-repair"
2367
+ },
2368
+ "fromPhaseIds": {
2369
+ "type": "array",
2370
+ "minItems": 1,
2371
+ "uniqueItems": true,
2372
+ "items": {
2373
+ "type": "string",
2374
+ "pattern": "^journal-phase\\."
2375
+ }
2376
+ },
2377
+ "orderedSteps": {
2378
+ "type": "array",
2379
+ "minItems": 1,
2380
+ "uniqueItems": true,
2381
+ "items": {
2382
+ "$ref": "#/$defs/recoveryStep"
2383
+ }
2384
+ }
2385
+ }
2386
+ }
2387
+ ]
2388
+ },
2389
+ "readback": {
2390
+ "type": "object",
2391
+ "additionalProperties": false,
2392
+ "required": [
2393
+ "adapter",
2394
+ "wiring",
2395
+ "checkpoints",
2396
+ "projection",
2397
+ "postconditionIds",
2398
+ "resultDigestPolicy"
2399
+ ],
2400
+ "properties": {
2401
+ "adapter": {
2402
+ "$ref": "#/$defs/readbackAdapterRef"
2403
+ },
2404
+ "wiring": {
2405
+ "enum": [
2406
+ "invoked-post-effect",
2407
+ "available-unwired"
2408
+ ]
2409
+ },
2410
+ "projection": {
2411
+ "$ref": "#/$defs/projectionRef"
2412
+ },
2413
+ "checkpoints": {
2414
+ "type": "object",
2415
+ "additionalProperties": false,
2416
+ "required": [
2417
+ "preCompletion",
2418
+ "postTerminal"
2419
+ ],
2420
+ "properties": {
2421
+ "preCompletion": {
2422
+ "const": "domain-readback"
2423
+ },
2424
+ "postTerminal": {
2425
+ "const": "terminal-readback"
2426
+ }
2427
+ }
2428
+ },
2429
+ "postconditionIds": {
2430
+ "type": "array",
2431
+ "uniqueItems": true,
2432
+ "items": {
2433
+ "type": "string",
2434
+ "pattern": "^postcondition\\."
2435
+ }
2436
+ },
2437
+ "resultDigestPolicy": {
2438
+ "$ref": "#/$defs/hashPolicyRef"
2439
+ }
2440
+ }
2441
+ },
2442
+ "atomicity": {
2443
+ "type": "object",
2444
+ "additionalProperties": false,
2445
+ "required": [
2446
+ "classification",
2447
+ "nonMutatingFailureGuarantee",
2448
+ "executionKey",
2449
+ "replay",
2450
+ "journal",
2451
+ "recovery",
2452
+ "readback"
2453
+ ],
2454
+ "properties": {
2455
+ "classification": {
2456
+ "enum": [
2457
+ "read-only",
2458
+ "single-write",
2459
+ "journaled-multi-write",
2460
+ "non-transactional-multi-write"
2461
+ ]
2462
+ },
2463
+ "nonMutatingFailureGuarantee": {
2464
+ "enum": [
2465
+ "all-guards-before-effects",
2466
+ "best-effort",
2467
+ "not-applicable"
2468
+ ]
2469
+ },
2470
+ "executionKey": {
2471
+ "$ref": "#/$defs/executionKey"
2472
+ },
2473
+ "replay": {
2474
+ "$ref": "#/$defs/replay"
2475
+ },
2476
+ "journal": {
2477
+ "$ref": "#/$defs/journal"
2478
+ },
2479
+ "recovery": {
2480
+ "$ref": "#/$defs/recovery"
2481
+ },
2482
+ "readback": {
2483
+ "$ref": "#/$defs/readback"
2484
+ }
2485
+ }
2486
+ },
2487
+ "navigation": {
2488
+ "type": "object",
2489
+ "additionalProperties": false,
2490
+ "required": [
2491
+ "kind",
2492
+ "mode",
2493
+ "priority"
2494
+ ],
2495
+ "properties": {
2496
+ "kind": {
2497
+ "enum": [
2498
+ "executable",
2499
+ "choice",
2500
+ "human-gate",
2501
+ "wait",
2502
+ "repair",
2503
+ "blocked"
2504
+ ]
2505
+ },
2506
+ "mode": {
2507
+ "enum": [
2508
+ "exact",
2509
+ "advisory"
2510
+ ]
2511
+ },
2512
+ "priority": {
2513
+ "type": "integer",
2514
+ "minimum": 0
2515
+ }
2516
+ }
2517
+ },
2518
+ "readinessManifest": {
2519
+ "type": "object",
2520
+ "additionalProperties": false,
2521
+ "required": [
2522
+ "developmentStage",
2523
+ "releaseProfile",
2524
+ "coverageProfile",
2525
+ "limitations",
2526
+ "evidence"
2527
+ ],
2528
+ "properties": {
2529
+ "developmentStage": {
2530
+ "enum": [
2531
+ "partial",
2532
+ "candidate",
2533
+ "withdrawn"
2534
+ ]
2535
+ },
2536
+ "releaseProfile": {
2537
+ "$ref": "#/$defs/releaseProfileRef"
2538
+ },
2539
+ "coverageProfile": {
2540
+ "$ref": "#/$defs/coverageProfileRef"
2541
+ },
2542
+ "limitations": {
2543
+ "type": "array",
2544
+ "uniqueItems": true,
2545
+ "items": {
2546
+ "$ref": "#/$defs/limitationRef"
2547
+ }
2548
+ },
2549
+ "evidence": {
2550
+ "type": "array",
2551
+ "uniqueItems": true,
2552
+ "items": {
2553
+ "type": "object",
2554
+ "additionalProperties": false,
2555
+ "required": [
2556
+ "evidenceId",
2557
+ "sha256"
2558
+ ],
2559
+ "properties": {
2560
+ "evidenceId": {
2561
+ "type": "string",
2562
+ "pattern": "^evidence\\."
2563
+ },
2564
+ "sha256": {
2565
+ "$ref": "#/$defs/hash64"
2566
+ }
2567
+ }
2568
+ }
2569
+ }
2570
+ }
2571
+ },
2572
+ "traceability": {
2573
+ "type": "object",
2574
+ "additionalProperties": false,
2575
+ "required": [
2576
+ "defectIds",
2577
+ "invariantIds",
2578
+ "positiveEvidence",
2579
+ "hostileEvidence"
2580
+ ],
2581
+ "properties": {
2582
+ "defectIds": {
2583
+ "$ref": "#/$defs/uniqueStrings"
2584
+ },
2585
+ "invariantIds": {
2586
+ "$ref": "#/$defs/uniqueStrings"
2587
+ },
2588
+ "positiveEvidence": {
2589
+ "$ref": "#/$defs/uniqueStrings"
2590
+ },
2591
+ "hostileEvidence": {
2592
+ "$ref": "#/$defs/uniqueStrings"
2593
+ }
2594
+ }
2595
+ },
2596
+ "documentation": {
2597
+ "type": "object",
2598
+ "additionalProperties": false,
2599
+ "required": [
2600
+ "summary"
2601
+ ],
2602
+ "properties": {
2603
+ "summary": {
2604
+ "$ref": "#/$defs/nonEmptyString"
2605
+ }
2606
+ }
2607
+ }
2608
+ }
2609
+ }