bmad-method-test-architecture-enterprise 3.0.2 → 3.1.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,563 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:tea:evaluate:schema:discovery-candidate",
4
+ "title": "discovery/<campaignId>/C-NNN.candidate.json",
5
+ "description": "One exploratory candidate: a proposed edit, what was observed when it ran, the independent evidence that its behavior is undesirable, the review decision and the draft promotion. It lives outside every native scored artifact and carries no native outcome, verdict or qualification. The tea-evaluate runtime owns this schema; evaluation.json, probes and mutations never reference it.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "recordKind",
11
+ "candidateId",
12
+ "campaignId",
13
+ "partition",
14
+ "identity",
15
+ "generator",
16
+ "intent",
17
+ "hypothesis",
18
+ "requirement",
19
+ "target",
20
+ "edit",
21
+ "state",
22
+ "disposition",
23
+ "observations",
24
+ "independentEvidence",
25
+ "review",
26
+ "acceptedRisk",
27
+ "promotion"
28
+ ],
29
+ "$defs": {
30
+ "digest": {
31
+ "type": "string",
32
+ "pattern": "^sha256:[0-9a-f]{64}$"
33
+ },
34
+ "disposition": {
35
+ "description": "Why the candidate stopped, or what review concluded. None of these is a native outcome.",
36
+ "enum": [
37
+ "generation-error",
38
+ "inapplicable",
39
+ "binding-not-consumed",
40
+ "unexercised",
41
+ "target-error",
42
+ "judge-failure",
43
+ "budget-exhausted",
44
+ "observationally-unchanged",
45
+ "undetermined",
46
+ "confirmed-undesirable-caught",
47
+ "confirmed-undesirable-missed"
48
+ ]
49
+ },
50
+ "reviewDisposition": {
51
+ "description": "What a review can conclude.",
52
+ "enum": ["inapplicable", "observationally-unchanged", "undetermined", "confirmed-undesirable-caught", "confirmed-undesirable-missed"]
53
+ },
54
+ "confirmedDisposition": {
55
+ "enum": ["confirmed-undesirable-caught", "confirmed-undesirable-missed"]
56
+ },
57
+ "scope": {
58
+ "description": "What a decision was made against. The reader refuses the decision once any part no longer matches the candidate.",
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": ["identity", "determination", "observations"],
62
+ "properties": {
63
+ "identity": {
64
+ "description": "The candidate identity at decision time. It covers the edit, the target and the requirement digest.",
65
+ "$ref": "#/$defs/digest"
66
+ },
67
+ "determination": {
68
+ "description": "The digest of the disposition and the independent evidence at decision time.",
69
+ "$ref": "#/$defs/digest"
70
+ },
71
+ "observations": {
72
+ "description": "The observations the decision rested on. Each must still be in the record, unchanged: same arm, evidence and trial counts.",
73
+ "type": "array",
74
+ "minItems": 1,
75
+ "items": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["observationId", "digest"],
79
+ "properties": {
80
+ "observationId": {
81
+ "type": "string",
82
+ "pattern": "^OBS-[0-9]{3,}$"
83
+ },
84
+ "digest": {
85
+ "description": "The digest of the observation's canonical JSON.",
86
+ "$ref": "#/$defs/digest"
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ },
94
+ "properties": {
95
+ "schemaVersion": {
96
+ "const": 1
97
+ },
98
+ "recordKind": {
99
+ "const": "exploratory-candidate",
100
+ "description": "Names the record's kind so no native artifact can be read as a candidate, and no candidate as a native one."
101
+ },
102
+ "candidateId": {
103
+ "type": "string",
104
+ "pattern": "^C-[0-9]{3,}$",
105
+ "description": "Disjoint from the native M-NNN, P-NNN, B-NNN, D-NNN and O-NNN identifiers."
106
+ },
107
+ "campaignId": {
108
+ "type": "string",
109
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
110
+ },
111
+ "partition": {
112
+ "const": "development",
113
+ "description": "Discovery reads development evidence only. A held-out partition never appears in a candidate."
114
+ },
115
+ "identity": {
116
+ "description": "The digest of every field that defines the candidate, computed by the reader. A review or accepted risk binds to it.",
117
+ "$ref": "#/$defs/digest"
118
+ },
119
+ "generator": {
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": ["name", "version", "seed"],
123
+ "properties": {
124
+ "name": {
125
+ "type": "string",
126
+ "minLength": 1
127
+ },
128
+ "version": {
129
+ "type": "string",
130
+ "minLength": 1
131
+ },
132
+ "seed": {
133
+ "type": "string"
134
+ }
135
+ }
136
+ },
137
+ "intent": {
138
+ "enum": ["regression", "robustness"]
139
+ },
140
+ "hypothesis": {
141
+ "type": "string",
142
+ "minLength": 1
143
+ },
144
+ "requirement": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": ["path", "digest"],
148
+ "properties": {
149
+ "path": {
150
+ "const": "requirements.md",
151
+ "description": "The evaluation's committed requirements statement."
152
+ },
153
+ "digest": {
154
+ "description": "eval-quality's digestBytes over the requirements file, as evaluation.json records it.",
155
+ "$ref": "#/$defs/digest"
156
+ }
157
+ }
158
+ },
159
+ "target": {
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": ["artifact", "artifactDigest"],
163
+ "properties": {
164
+ "artifact": {
165
+ "description": "The edited file, spelled as a mutation's targetArtifact.",
166
+ "type": "string",
167
+ "minLength": 1,
168
+ "pattern": "^(?![A-Za-z]:)(?!/)(?![\\s\\S]*(?:^|/)\\.{1,2}(?:/|$))(?![\\s\\S]*//)(?![\\s\\S]*/$)[^\\\\\\u0000-\\u001f\\u007f-\\u009f\\u061c\\u200e\\u200f\\u2028\\u2029\\u202a-\\u202e\\u2066-\\u2069]+$"
169
+ },
170
+ "artifactDigest": {
171
+ "description": "eval-quality's digestBytes over the file before the edit.",
172
+ "$ref": "#/$defs/digest"
173
+ }
174
+ }
175
+ },
176
+ "edit": {
177
+ "type": "object",
178
+ "additionalProperties": false,
179
+ "required": ["find", "replace", "occurrences"],
180
+ "properties": {
181
+ "find": {
182
+ "type": "string",
183
+ "minLength": 1
184
+ },
185
+ "replace": {
186
+ "type": "string"
187
+ },
188
+ "occurrences": {
189
+ "const": 1
190
+ }
191
+ }
192
+ },
193
+ "state": {
194
+ "enum": ["generated", "applicable", "observed", "reviewed", "promoted"]
195
+ },
196
+ "disposition": {
197
+ "oneOf": [
198
+ {
199
+ "type": "null"
200
+ },
201
+ {
202
+ "$ref": "#/$defs/disposition"
203
+ }
204
+ ]
205
+ },
206
+ "observations": {
207
+ "type": "array",
208
+ "items": {
209
+ "type": "object",
210
+ "additionalProperties": false,
211
+ "required": ["observationId", "arm", "evidence", "trials"],
212
+ "properties": {
213
+ "observationId": {
214
+ "type": "string",
215
+ "pattern": "^OBS-[0-9]{3,}$"
216
+ },
217
+ "arm": {
218
+ "enum": ["baseline", "candidate"]
219
+ },
220
+ "evidence": {
221
+ "description": "The digest of the recorded evidence the observation summarizes.",
222
+ "$ref": "#/$defs/digest"
223
+ },
224
+ "trials": {
225
+ "description": "Completed, errored and missing trials never exceed the planned count. A run that stopped early leaves the rest unaccounted.",
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "required": ["planned", "completed", "errors", "missing"],
229
+ "properties": {
230
+ "planned": {
231
+ "type": "integer",
232
+ "minimum": 0
233
+ },
234
+ "completed": {
235
+ "type": "integer",
236
+ "minimum": 0
237
+ },
238
+ "errors": {
239
+ "type": "integer",
240
+ "minimum": 0
241
+ },
242
+ "missing": {
243
+ "type": "integer",
244
+ "minimum": 0
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }
250
+ },
251
+ "independentEvidence": {
252
+ "description": "Evidence that the edited behavior is wrong, from a source other than the target, the evaluator or the requirement the edit is judged against.",
253
+ "type": "array",
254
+ "items": {
255
+ "type": "object",
256
+ "additionalProperties": false,
257
+ "required": ["kind", "reference", "digest"],
258
+ "properties": {
259
+ "kind": {
260
+ "enum": ["domain-invariant", "separate-specification", "historical-defect", "reference-computation", "blinded-human-annotation"]
261
+ },
262
+ "reference": {
263
+ "description": "A snapshot of the material the reviewer saw, kept in the campaign's evidence directory: discovery/<campaignId>/evidence/<file>. A source outside the folder is archived there, and a human annotation is recorded there as written.",
264
+ "type": "string",
265
+ "pattern": "^discovery/[a-z0-9]+(-[a-z0-9]+)*/evidence/(?!.*\\.candidate\\.json$)[A-Za-z0-9][A-Za-z0-9._-]*$"
266
+ },
267
+ "digest": {
268
+ "description": "eval-quality's digestBytes over the snapshot file.",
269
+ "$ref": "#/$defs/digest"
270
+ }
271
+ }
272
+ }
273
+ },
274
+ "review": {
275
+ "oneOf": [
276
+ {
277
+ "type": "null"
278
+ },
279
+ {
280
+ "type": "object",
281
+ "additionalProperties": false,
282
+ "required": ["reviewer", "decidedAt", "rationale", "scope"],
283
+ "properties": {
284
+ "reviewer": {
285
+ "type": "string",
286
+ "minLength": 1
287
+ },
288
+ "decidedAt": {
289
+ "type": "string",
290
+ "format": "date-time"
291
+ },
292
+ "rationale": {
293
+ "type": "string",
294
+ "minLength": 1
295
+ },
296
+ "scope": {
297
+ "$ref": "#/$defs/scope"
298
+ }
299
+ }
300
+ }
301
+ ]
302
+ },
303
+ "acceptedRisk": {
304
+ "description": "A waived survivor stays in the record and in every total.",
305
+ "oneOf": [
306
+ {
307
+ "type": "null"
308
+ },
309
+ {
310
+ "type": "object",
311
+ "additionalProperties": false,
312
+ "required": ["reviewer", "decidedAt", "rationale", "scope", "revisitWhen"],
313
+ "properties": {
314
+ "reviewer": {
315
+ "type": "string",
316
+ "minLength": 1
317
+ },
318
+ "decidedAt": {
319
+ "type": "string",
320
+ "format": "date-time"
321
+ },
322
+ "rationale": {
323
+ "type": "string",
324
+ "minLength": 1
325
+ },
326
+ "scope": {
327
+ "$ref": "#/$defs/scope"
328
+ },
329
+ "revisitWhen": {
330
+ "type": "string",
331
+ "minLength": 1
332
+ }
333
+ }
334
+ }
335
+ ]
336
+ },
337
+ "promotion": {
338
+ "description": "A draft only. Native check, compile, seal, qualification and scoring stay authoritative.",
339
+ "oneOf": [
340
+ {
341
+ "type": "null"
342
+ },
343
+ {
344
+ "type": "object",
345
+ "additionalProperties": false,
346
+ "required": ["draftMutationId", "qualificationReceipt"],
347
+ "properties": {
348
+ "draftMutationId": {
349
+ "type": "string",
350
+ "pattern": "^M-[0-9]{3,}$"
351
+ },
352
+ "qualificationReceipt": {
353
+ "oneOf": [
354
+ {
355
+ "type": "null"
356
+ },
357
+ {
358
+ "type": "object",
359
+ "additionalProperties": false,
360
+ "required": ["path", "digest"],
361
+ "properties": {
362
+ "path": {
363
+ "description": "The mutated arm's evidence of the native qualification of the draft mutation, as a qualification writes it: baseline/qualification/<probeId>/mutated-fail.json. The reader holds it, with the baseline-pass and rollback evidence beside it, to the draft mutation, the probe and the target.",
364
+ "type": "string",
365
+ "pattern": "^baseline/qualification/P-[0-9]{3,}/mutated-fail\\.json$"
366
+ },
367
+ "digest": {
368
+ "description": "eval-quality's digestBytes over the receipt file.",
369
+ "$ref": "#/$defs/digest"
370
+ }
371
+ }
372
+ }
373
+ ]
374
+ }
375
+ }
376
+ }
377
+ ]
378
+ }
379
+ },
380
+ "allOf": [
381
+ {
382
+ "if": {
383
+ "properties": {
384
+ "state": {
385
+ "enum": ["generated", "applicable"]
386
+ }
387
+ },
388
+ "required": ["state"]
389
+ },
390
+ "then": {
391
+ "properties": {
392
+ "observations": {
393
+ "type": "array",
394
+ "maxItems": 0
395
+ },
396
+ "review": {
397
+ "type": "null"
398
+ },
399
+ "acceptedRisk": {
400
+ "type": "null"
401
+ }
402
+ }
403
+ }
404
+ },
405
+ {
406
+ "if": {
407
+ "properties": {
408
+ "state": {
409
+ "const": "observed"
410
+ }
411
+ },
412
+ "required": ["state"]
413
+ },
414
+ "then": {
415
+ "properties": {
416
+ "observations": {
417
+ "type": "array",
418
+ "minItems": 1
419
+ },
420
+ "review": {
421
+ "type": "null"
422
+ },
423
+ "acceptedRisk": {
424
+ "type": "null"
425
+ }
426
+ }
427
+ }
428
+ },
429
+ {
430
+ "if": {
431
+ "properties": {
432
+ "state": {
433
+ "enum": ["reviewed", "promoted"]
434
+ }
435
+ },
436
+ "required": ["state"]
437
+ },
438
+ "then": {
439
+ "properties": {
440
+ "observations": {
441
+ "type": "array",
442
+ "minItems": 1
443
+ },
444
+ "review": {
445
+ "type": "object"
446
+ },
447
+ "disposition": {
448
+ "$ref": "#/$defs/reviewDisposition"
449
+ }
450
+ }
451
+ }
452
+ },
453
+ {
454
+ "if": {
455
+ "properties": {
456
+ "state": {
457
+ "const": "promoted"
458
+ }
459
+ },
460
+ "required": ["state"]
461
+ },
462
+ "then": {
463
+ "properties": {
464
+ "promotion": {
465
+ "type": "object"
466
+ }
467
+ }
468
+ },
469
+ "else": {
470
+ "properties": {
471
+ "promotion": {
472
+ "type": "null"
473
+ }
474
+ }
475
+ }
476
+ },
477
+ {
478
+ "if": {
479
+ "properties": {
480
+ "disposition": {
481
+ "$ref": "#/$defs/confirmedDisposition"
482
+ }
483
+ },
484
+ "required": ["disposition"]
485
+ },
486
+ "then": {
487
+ "properties": {
488
+ "review": {
489
+ "type": "object"
490
+ },
491
+ "independentEvidence": {
492
+ "type": "array",
493
+ "minItems": 1
494
+ },
495
+ "observations": {
496
+ "type": "array",
497
+ "allOf": [
498
+ {
499
+ "contains": {
500
+ "type": "object",
501
+ "properties": {
502
+ "arm": {
503
+ "const": "baseline"
504
+ }
505
+ },
506
+ "required": ["arm"]
507
+ }
508
+ },
509
+ {
510
+ "contains": {
511
+ "type": "object",
512
+ "properties": {
513
+ "arm": {
514
+ "const": "candidate"
515
+ }
516
+ },
517
+ "required": ["arm"]
518
+ }
519
+ }
520
+ ]
521
+ }
522
+ }
523
+ }
524
+ },
525
+ {
526
+ "if": {
527
+ "properties": {
528
+ "promotion": {
529
+ "type": "object"
530
+ }
531
+ },
532
+ "required": ["promotion"]
533
+ },
534
+ "then": {
535
+ "properties": {
536
+ "disposition": {
537
+ "$ref": "#/$defs/confirmedDisposition"
538
+ }
539
+ }
540
+ }
541
+ },
542
+ {
543
+ "if": {
544
+ "properties": {
545
+ "acceptedRisk": {
546
+ "type": "object"
547
+ }
548
+ },
549
+ "required": ["acceptedRisk"]
550
+ },
551
+ "then": {
552
+ "properties": {
553
+ "review": {
554
+ "type": "object"
555
+ },
556
+ "disposition": {
557
+ "const": "confirmed-undesirable-missed"
558
+ }
559
+ }
560
+ }
561
+ }
562
+ ]
563
+ }