@gtrabanco/agentic-workflow-schema 3.4.0 → 4.0.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.
- package/README.es.md +294 -0
- package/README.md +290 -0
- package/dist/canonical-json.d.ts +60 -0
- package/dist/canonical-json.js +119 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.js +105 -169
- package/dist/pre-execution-contract.d.ts +175 -0
- package/dist/pre-execution-contract.js +676 -0
- package/dist/pre-execution-vectors.d.ts +19 -0
- package/dist/pre-execution-vectors.js +35 -0
- package/dist/pre-execution.d.ts +363 -0
- package/dist/pre-execution.js +838 -0
- package/dist/sha256.d.ts +43 -0
- package/dist/sha256.js +189 -0
- package/dist/verification-contract.d.ts +77 -10
- package/dist/verification-contract.js +128 -10
- package/package.json +12 -3
- package/pre-execution-artifact-snapshot.schema.json +383 -0
- package/pre-execution-review-receipt.schema.json +457 -0
- package/skill-outcome.schema.json +1 -1
|
@@ -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
|
+
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"definitions": {
|
|
22
22
|
"intent": {
|
|
23
|
-
"enum": ["init-workspace", "status", "discover-repository-state", "resolve-repository-state", "design-feature", "plan-feature", "plan-fix", "triage-issue", "execute-phase", "review-change", "
|
|
23
|
+
"enum": ["init-workspace", "status", "discover-repository-state", "resolve-repository-state", "design-feature", "plan-feature", "plan-fix", "triage-issue", "execute-phase", "review-change", "audit-pr", "merge", "ask-human", "stop", "none"]
|
|
24
24
|
},
|
|
25
25
|
"next": {
|
|
26
26
|
"type": "object",
|