@gtrabanco/agentic-workflow-schema 3.3.0 → 3.5.0

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.
@@ -0,0 +1,457 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$comment": "agentic-workflow generated file - DO NOT HAND-EDIT. | projection: structural-only | authoritative: false | authority: validatePreExecutionReceiptAgainstSnapshot | semantic validation: required (a Draft-07 PASS is not contract validity) | runtime-only rules (not expressible in Draft-07): timestamp-order, calendar-roundtrip, unique-finding-ids, unique-parent-receipts; finding-requires-evidence (every finding carries at least one evidence reference); pass-requires-resolved-material-findings (PASS cannot coexist with an open or unverified material finding); dismissal-requires-counter-evidence (only recorded counter-evidence dismisses a finding); author-exclusion-where-enforced (an enforcing runtime rejects a reused author identity); pass-requires-clean-context (PASS requires context-clean evidence); unique-parent-digests (parent receipt digests are unique); receipt-bound-to-snapshot (the verdict must bind the exact snapshot digest) | payload budget: runtime-only (canonical receipt <= 65536 bytes = 64 KiB) | diagnostics: runtime-only (at most 50 redacted code+path rows) | values: never returned (D16 — diagnostics carry a frozen code and an RFC 6901 pointer only) | regenerate with: node scripts/generate-pre-execution-schemas.mjs",
4
+ "title": "PreExecutionReviewReceipt v1",
5
+ "description": "A content-bound verdict on one pre-execution snapshot, with structured findings, reviewer identities, and an optional critique/synthesis topology. This document is a NON-AUTHORITATIVE Draft-07 structural projection generated from the package's canonical pre-execution-contract definition. It is not a semantic authority: a Draft-07 match is not contract validity — use the authoritative runtime entry point named in $comment.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "contract",
10
+ "id",
11
+ "stage",
12
+ "snapshotDigest",
13
+ "verdict",
14
+ "findings",
15
+ "reviewer",
16
+ "sessionId",
17
+ "reviewerRole",
18
+ "authorId",
19
+ "authorExclusion",
20
+ "contextClean",
21
+ "modelDiversity",
22
+ "policyVersion",
23
+ "startedAt",
24
+ "finishedAt",
25
+ "parentReceipts",
26
+ "diagnostics"
27
+ ],
28
+ "properties": {
29
+ "contract": {
30
+ "type": "string",
31
+ "const": "agentic-workflow/pre-execution-review-receipt@1",
32
+ "description": "Contract identifier. Candidate and verification receipts carry other ids and are refused here."
33
+ },
34
+ "id": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "maxLength": 128,
38
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
39
+ "allOf": [
40
+ {
41
+ "description": "[id] must not contain NUL characters",
42
+ "pattern": "^[^\\0]*$"
43
+ }
44
+ ],
45
+ "description": "Stable receipt identity. Opaque: compared, never parsed, and never echoed back by a diagnostic."
46
+ },
47
+ "stage": {
48
+ "type": "string",
49
+ "enum": [
50
+ "spec",
51
+ "plan"
52
+ ],
53
+ "description": "Stage the verdict belongs to."
54
+ },
55
+ "snapshotDigest": {
56
+ "type": "string",
57
+ "minLength": 64,
58
+ "maxLength": 64,
59
+ "pattern": "^[a-f0-9]{64}$",
60
+ "allOf": [
61
+ {
62
+ "description": "[snapshotDigest] must not contain NUL characters",
63
+ "pattern": "^[^\\0]*$"
64
+ }
65
+ ],
66
+ "description": "Digest of the exact snapshot that was reviewed."
67
+ },
68
+ "verdict": {
69
+ "type": "string",
70
+ "enum": [
71
+ "spec-review-pass",
72
+ "spec-review-fail",
73
+ "plan-review-pass",
74
+ "plan-review-fail",
75
+ "needs-design"
76
+ ],
77
+ "description": "One of the five public verdicts."
78
+ },
79
+ "findings": {
80
+ "type": "array",
81
+ "items": {
82
+ "$ref": "#/$defs/PreExecutionReviewFindingV1"
83
+ },
84
+ "maxItems": 64,
85
+ "description": "Structured findings; at most 64. A PASS never carries an open or unverified material row."
86
+ },
87
+ "reviewer": {
88
+ "type": "string",
89
+ "minLength": 1,
90
+ "maxLength": 128,
91
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
92
+ "allOf": [
93
+ {
94
+ "description": "[reviewer] must not contain NUL characters",
95
+ "pattern": "^[^\\0]*$"
96
+ }
97
+ ],
98
+ "description": "Reviewer identity as the runtime knows it. Opaque: compared, never parsed, and never echoed back by a diagnostic."
99
+ },
100
+ "sessionId": {
101
+ "type": "string",
102
+ "minLength": 1,
103
+ "maxLength": 128,
104
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
105
+ "allOf": [
106
+ {
107
+ "description": "[sessionId] must not contain NUL characters",
108
+ "pattern": "^[^\\0]*$"
109
+ }
110
+ ],
111
+ "description": "Session identity of the context-clean review. Opaque: compared, never parsed, and never echoed back by a diagnostic."
112
+ },
113
+ "reviewerRole": {
114
+ "type": "string",
115
+ "enum": [
116
+ "reviewer",
117
+ "critic",
118
+ "synthesizer",
119
+ "arbiter"
120
+ ],
121
+ "description": "Role this receipt played in the review topology."
122
+ },
123
+ "authorId": {
124
+ "type": "string",
125
+ "minLength": 1,
126
+ "maxLength": 128,
127
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
128
+ "allOf": [
129
+ {
130
+ "description": "[authorId] must not contain NUL characters",
131
+ "pattern": "^[^\\0]*$"
132
+ }
133
+ ],
134
+ "description": "Identity of the artifact author the exclusion rule compares against. Opaque: compared, never parsed, and never echoed back by a diagnostic."
135
+ },
136
+ "authorExclusion": {
137
+ "type": "string",
138
+ "enum": [
139
+ "enforced",
140
+ "not-enforceable"
141
+ ],
142
+ "description": "Whether the runtime can actually observe author identity."
143
+ },
144
+ "contextClean": {
145
+ "type": "boolean",
146
+ "description": "The review ran in a context that did not author the artifact."
147
+ },
148
+ "modelDiversity": {
149
+ "type": "string",
150
+ "enum": [
151
+ "same-model",
152
+ "cross-model",
153
+ "not-applicable"
154
+ ],
155
+ "description": "Truthful diversity label; never inferred from plurality."
156
+ },
157
+ "policyVersion": {
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "maxLength": 64,
161
+ "pattern": "^[^\\0]*$",
162
+ "description": "Review policy version the verdict was produced under; at most 64 characters."
163
+ },
164
+ "startedAt": {
165
+ "type": "string",
166
+ "minLength": 20,
167
+ "maxLength": 40,
168
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$",
169
+ "allOf": [
170
+ {
171
+ "description": "[startedAt] must not contain NUL characters",
172
+ "pattern": "^[^\\0]*$"
173
+ }
174
+ ],
175
+ "description": "UTC start of the review."
176
+ },
177
+ "finishedAt": {
178
+ "type": "string",
179
+ "minLength": 20,
180
+ "maxLength": 40,
181
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$",
182
+ "allOf": [
183
+ {
184
+ "description": "[finishedAt] must not contain NUL characters",
185
+ "pattern": "^[^\\0]*$"
186
+ }
187
+ ],
188
+ "description": "UTC end of the review."
189
+ },
190
+ "parentReceipts": {
191
+ "type": "array",
192
+ "items": {
193
+ "$ref": "#/$defs/PreExecutionParentReceiptV1"
194
+ },
195
+ "maxItems": 8,
196
+ "description": "Optional bounded critique/synthesis/arbitration parents; at most 8. Presence is topology, not a vote."
197
+ },
198
+ "diagnostics": {
199
+ "type": "array",
200
+ "items": {
201
+ "type": "string",
202
+ "pattern": "^[^\\0]*$",
203
+ "maxLength": 512
204
+ },
205
+ "maxItems": 8,
206
+ "description": "Reviewer-side notes; at most 8 rows of 512 characters."
207
+ }
208
+ },
209
+ "allOf": [
210
+ {
211
+ "description": "[verdict-stage-matrix] A SPEC-stage receipt carries only spec verdicts.",
212
+ "if": {
213
+ "properties": {
214
+ "stage": {
215
+ "const": "spec"
216
+ }
217
+ }
218
+ },
219
+ "then": {
220
+ "properties": {
221
+ "verdict": {
222
+ "enum": [
223
+ "spec-review-pass",
224
+ "spec-review-fail",
225
+ "needs-design"
226
+ ]
227
+ }
228
+ }
229
+ }
230
+ },
231
+ {
232
+ "description": "[verdict-stage-matrix] A PLAN-stage receipt carries only plan verdicts.",
233
+ "if": {
234
+ "properties": {
235
+ "stage": {
236
+ "const": "plan"
237
+ }
238
+ }
239
+ },
240
+ "then": {
241
+ "properties": {
242
+ "verdict": {
243
+ "enum": [
244
+ "plan-review-pass",
245
+ "plan-review-fail",
246
+ "needs-design"
247
+ ]
248
+ }
249
+ }
250
+ }
251
+ },
252
+ {
253
+ "description": "[parent-topology-shaped] Parent receipts require a critic, synthesizer, or arbiter reviewer role.",
254
+ "if": {
255
+ "properties": {
256
+ "parentReceipts": {
257
+ "type": "array",
258
+ "minItems": 1
259
+ }
260
+ }
261
+ },
262
+ "then": {
263
+ "properties": {
264
+ "reviewerRole": {
265
+ "enum": [
266
+ "critic",
267
+ "synthesizer",
268
+ "arbiter"
269
+ ]
270
+ }
271
+ }
272
+ }
273
+ },
274
+ {
275
+ "description": "[parent-topology-restrained] A plain reviewer receipt carries no parent receipts.",
276
+ "if": {
277
+ "properties": {
278
+ "reviewerRole": {
279
+ "const": "reviewer"
280
+ }
281
+ }
282
+ },
283
+ "then": {
284
+ "properties": {
285
+ "parentReceipts": {
286
+ "maxItems": 0
287
+ }
288
+ }
289
+ }
290
+ },
291
+ {
292
+ "description": "[parent-identities-unique] Parent receipts are unique rows; digests are unique too (runtime rule).",
293
+ "properties": {
294
+ "parentReceipts": {
295
+ "uniqueItems": true
296
+ }
297
+ }
298
+ }
299
+ ],
300
+ "$defs": {
301
+ "PreExecutionReviewFindingV1": {
302
+ "type": "object",
303
+ "additionalProperties": false,
304
+ "required": [
305
+ "id",
306
+ "severity",
307
+ "class",
308
+ "claim",
309
+ "evidenceRefs",
310
+ "verification",
311
+ "resolution",
312
+ "resolutionEvidence"
313
+ ],
314
+ "properties": {
315
+ "id": {
316
+ "type": "string",
317
+ "minLength": 1,
318
+ "maxLength": 128,
319
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$",
320
+ "allOf": [
321
+ {
322
+ "description": "[id] must not contain NUL characters",
323
+ "pattern": "^[^\\0]*$"
324
+ }
325
+ ],
326
+ "description": "Stable finding identity, unique inside the receipt. Opaque: compared, never parsed, and never echoed back by a diagnostic."
327
+ },
328
+ "severity": {
329
+ "type": "string",
330
+ "enum": [
331
+ "info",
332
+ "low",
333
+ "medium",
334
+ "high",
335
+ "critical"
336
+ ],
337
+ "description": "Severity ladder shared with candidate review; `info` is the only immaterial row."
338
+ },
339
+ "class": {
340
+ "type": "string",
341
+ "enum": [
342
+ "product",
343
+ "plan",
344
+ "source",
345
+ "environment",
346
+ "runtime"
347
+ ],
348
+ "description": "Root-cause owner the finding routes to."
349
+ },
350
+ "claim": {
351
+ "type": "string",
352
+ "minLength": 1,
353
+ "maxLength": 2048,
354
+ "pattern": "^[^\\0]*$",
355
+ "description": "What the reviewer asserts is missing or wrong; at most 2048 characters."
356
+ },
357
+ "evidenceRefs": {
358
+ "type": "array",
359
+ "items": {
360
+ "type": "string",
361
+ "pattern": "^[^\\0]*$",
362
+ "maxLength": 1024
363
+ },
364
+ "maxItems": 8,
365
+ "description": "Non-empty file:line references; at most 8. A claim without evidence is not a finding."
366
+ },
367
+ "verification": {
368
+ "type": "string",
369
+ "enum": [
370
+ "verified",
371
+ "unverified"
372
+ ],
373
+ "description": "Whether the claim was checked against the artifact."
374
+ },
375
+ "resolution": {
376
+ "type": "string",
377
+ "enum": [
378
+ "open",
379
+ "resolved",
380
+ "dismissed"
381
+ ],
382
+ "description": "Resolution state inside the owning author's repair."
383
+ },
384
+ "resolutionEvidence": {
385
+ "oneOf": [
386
+ {
387
+ "type": "string",
388
+ "minLength": 1,
389
+ "maxLength": 2048,
390
+ "pattern": "^[^\\0]*$"
391
+ },
392
+ {
393
+ "type": "null"
394
+ }
395
+ ],
396
+ "description": "Counter-evidence or repair pointer. Required to dismiss or resolve a finding."
397
+ }
398
+ },
399
+ "allOf": [
400
+ {
401
+ "description": "[dismissal-needs-counter-evidence] A dismissed finding records the evidence that falsifies it.",
402
+ "if": {
403
+ "properties": {
404
+ "resolution": {
405
+ "enum": [
406
+ "dismissed",
407
+ "resolved"
408
+ ]
409
+ }
410
+ }
411
+ },
412
+ "then": {
413
+ "properties": {
414
+ "resolutionEvidence": {
415
+ "not": {
416
+ "type": "null"
417
+ }
418
+ }
419
+ }
420
+ }
421
+ }
422
+ ]
423
+ },
424
+ "PreExecutionParentReceiptV1": {
425
+ "type": "object",
426
+ "additionalProperties": false,
427
+ "required": [
428
+ "role",
429
+ "receiptDigest"
430
+ ],
431
+ "properties": {
432
+ "role": {
433
+ "type": "string",
434
+ "enum": [
435
+ "critic",
436
+ "synthesis",
437
+ "arbitration"
438
+ ],
439
+ "description": "Parent role. No quorum or majority meaning is attached to this list."
440
+ },
441
+ "receiptDigest": {
442
+ "type": "string",
443
+ "minLength": 64,
444
+ "maxLength": 64,
445
+ "pattern": "^[a-f0-9]{64}$",
446
+ "allOf": [
447
+ {
448
+ "description": "[receiptDigest] must not contain NUL characters",
449
+ "pattern": "^[^\\0]*$"
450
+ }
451
+ ],
452
+ "description": "Lowercase SHA-256 digest of the parent receipt."
453
+ }
454
+ }
455
+ }
456
+ }
457
+ }
@@ -0,0 +1,197 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$comment": "agentic-workflow generated file - DO NOT HAND-EDIT. | projection: structural-only | authoritative: false | authority: validateVerificationPlanV1 | semantic validation: required (a Draft-07 PASS is not contract validity) | runtime-only rules (not expressible in Draft-07): unique-command-ids, fast-stage-aggregate-budget, full-stage-aggregate-budget | payload budget: runtime-only (canonical plan <= 256 KiB) | diagnostics: runtime-only (at most 50 redacted code+path rows) | values: never returned (D16 — diagnostics carry a frozen code and an RFC 6901 pointer only) | regenerate with: node scripts/generate-verification-schemas.mjs",
4
+ "title": "VerificationPlan v1",
5
+ "description": "An ordered, non-empty command list for staged verification (fast/full). This document is a NON-AUTHORITATIVE Draft-07 structural projection generated from the package's canonical verification-contract definition. It is not a semantic authority: a Draft-07 match is not contract validity — use the authoritative runtime entry point named in $comment.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "contract",
10
+ "commands"
11
+ ],
12
+ "properties": {
13
+ "contract": {
14
+ "type": "string",
15
+ "const": "agentic-workflow/verification-plan@1",
16
+ "description": "Contract identifier."
17
+ },
18
+ "commands": {
19
+ "type": "array",
20
+ "items": {
21
+ "$ref": "#/$defs/VerificationCommandV1"
22
+ },
23
+ "minItems": 1,
24
+ "maxItems": 128,
25
+ "description": "Non-empty command list of at most 128 commands, in declared order."
26
+ }
27
+ },
28
+ "$defs": {
29
+ "VerificationCommandV1": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": [
33
+ "id",
34
+ "stage",
35
+ "executable",
36
+ "args",
37
+ "workingDirectoryPolicy",
38
+ "workingDirectory",
39
+ "timeoutMs",
40
+ "stopOnFailure",
41
+ "costClass"
42
+ ],
43
+ "properties": {
44
+ "id": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "maxLength": 128,
48
+ "pattern": "^[^\\0]*$",
49
+ "description": "Stable, non-empty, NUL-free, at most 128 chars, unique within the plan."
50
+ },
51
+ "stage": {
52
+ "type": "string",
53
+ "enum": [
54
+ "fast",
55
+ "full"
56
+ ],
57
+ "description": "Verification stage."
58
+ },
59
+ "executable": {
60
+ "type": "string",
61
+ "minLength": 1,
62
+ "maxLength": 1024,
63
+ "pattern": "^[^\\0]*$",
64
+ "description": "Non-empty executable path; NUL-free, at most 1024 chars. Never a shell string."
65
+ },
66
+ "args": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string",
70
+ "pattern": "^[^\\0]*$",
71
+ "maxLength": 4096
72
+ },
73
+ "maxItems": 64,
74
+ "description": "Ordered arguments; at most 64 items, each NUL-free and at most 4096 chars."
75
+ },
76
+ "workingDirectoryPolicy": {
77
+ "type": "string",
78
+ "enum": [
79
+ "candidate-root",
80
+ "relative-path"
81
+ ],
82
+ "description": "Working directory policy."
83
+ },
84
+ "workingDirectory": {
85
+ "oneOf": [
86
+ {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "maxLength": 1024,
90
+ "allOf": [
91
+ {
92
+ "description": "[workingDirectory] must not contain NUL characters",
93
+ "pattern": "^[^\\0]*$"
94
+ },
95
+ {
96
+ "description": "[workingDirectory] must not be an absolute path (leading \"/\")",
97
+ "pattern": "^(?!/)"
98
+ },
99
+ {
100
+ "description": "[workingDirectory] must not be a Windows drive-letter path",
101
+ "pattern": "^(?![A-Za-z]:)"
102
+ },
103
+ {
104
+ "description": "[workingDirectory] must not contain backslashes",
105
+ "pattern": "^(?!.*\\\\)"
106
+ },
107
+ {
108
+ "description": "[workingDirectory] must not contain \"..\" segments (path traversal)",
109
+ "pattern": "^(?!.*(\\/|^)\\.\\.($|\\/))"
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "type": "null"
115
+ }
116
+ ],
117
+ "description": "Null iff candidate-root; validated relative path iff relative-path."
118
+ },
119
+ "timeoutMs": {
120
+ "type": "integer",
121
+ "exclusiveMinimum": 0,
122
+ "maximum": 3600000,
123
+ "description": "Positive integer timeout in milliseconds; at most 3600000 (full stage) or 600000 (fast stage)."
124
+ },
125
+ "stopOnFailure": {
126
+ "type": "boolean",
127
+ "description": "Whether to stop executing subsequent commands on failure."
128
+ },
129
+ "costClass": {
130
+ "type": "string",
131
+ "enum": [
132
+ "cheap",
133
+ "moderate",
134
+ "expensive"
135
+ ],
136
+ "description": "Project-declared cost class."
137
+ }
138
+ },
139
+ "allOf": [
140
+ {
141
+ "description": "[working-directory-null-at-root] workingDirectory is null when workingDirectoryPolicy is candidate-root.",
142
+ "if": {
143
+ "properties": {
144
+ "workingDirectoryPolicy": {
145
+ "const": "candidate-root"
146
+ }
147
+ }
148
+ },
149
+ "then": {
150
+ "properties": {
151
+ "workingDirectory": {
152
+ "type": "null"
153
+ }
154
+ }
155
+ }
156
+ },
157
+ {
158
+ "description": "[fast-command-timeout] A fast-stage command times out within 600000 ms (D14).",
159
+ "if": {
160
+ "properties": {
161
+ "stage": {
162
+ "const": "fast"
163
+ }
164
+ }
165
+ },
166
+ "then": {
167
+ "properties": {
168
+ "timeoutMs": {
169
+ "type": "number",
170
+ "maximum": 600000
171
+ }
172
+ }
173
+ }
174
+ },
175
+ {
176
+ "description": "[working-directory-set-for-relative-path] workingDirectory is a validated relative path when workingDirectoryPolicy is relative-path.",
177
+ "if": {
178
+ "properties": {
179
+ "workingDirectoryPolicy": {
180
+ "const": "relative-path"
181
+ }
182
+ }
183
+ },
184
+ "then": {
185
+ "properties": {
186
+ "workingDirectory": {
187
+ "not": {
188
+ "type": "null"
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+ ]
195
+ }
196
+ }
197
+ }