@aiwg/cli 2026.9.24 → 2026.10.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.
Files changed (207) hide show
  1. package/agentic/code/providers/capability-matrix.yaml +2 -1
  2. package/dist/src/artifacts/discovery-shadow-evaluator.js +177 -0
  3. package/dist/src/artifacts/discovery-shadow.js +195 -0
  4. package/dist/src/artifacts/index-builder.js +47 -9
  5. package/dist/src/artifacts/query-engine.js +94 -1
  6. package/dist/src/artifacts/types.js +1 -0
  7. package/dist/src/cli/handlers/decision.js +88 -0
  8. package/dist/src/cli/handlers/gates.js +154 -0
  9. package/dist/src/cli/handlers/index.js +5 -1
  10. package/dist/src/cli/handlers/sessions.js +10 -7
  11. package/dist/src/cli/handlers/utilities.js +20 -0
  12. package/dist/src/config/aiwg-config.js +15 -2
  13. package/dist/src/decision/acceptance.js +25 -0
  14. package/dist/src/decision/adapters/jev.js +24 -2
  15. package/dist/src/decision/calibration/registry.js +9 -0
  16. package/dist/src/decision/compose.js +74 -15
  17. package/dist/src/decision/context-live-promotion.js +344 -0
  18. package/dist/src/decision/context-live-qualification.js +591 -0
  19. package/dist/src/decision/context-pruning.js +847 -0
  20. package/dist/src/decision/driver.js +430 -0
  21. package/dist/src/decision/egress-live-qualification.js +874 -0
  22. package/dist/src/decision/ensemble/contract.js +64 -1
  23. package/dist/src/decision/ensemble/index.js +1 -0
  24. package/dist/src/decision/ensemble/report.js +8 -42
  25. package/dist/src/decision/ensemble/runtime.js +571 -0
  26. package/dist/src/decision/ensemble-study/artifacts.js +85 -0
  27. package/dist/src/decision/ensemble-study/calibration.js +443 -0
  28. package/dist/src/decision/ensemble-study/corpus.js +229 -0
  29. package/dist/src/decision/ensemble-study/multifact-artifacts.js +23 -0
  30. package/dist/src/decision/ensemble-study/multifact-study.js +596 -0
  31. package/dist/src/decision/ensemble-study/multifact.js +241 -0
  32. package/dist/src/decision/ensemble-study/protocol.js +77 -0
  33. package/dist/src/decision/ensemble-study/score.js +462 -0
  34. package/dist/src/decision/ensemble-study/staged.js +87 -0
  35. package/dist/src/decision/ensemble-study/statistics.js +84 -0
  36. package/dist/src/decision/evaluate.js +227 -14
  37. package/dist/src/decision/export.js +4 -0
  38. package/dist/src/decision/feature-export.js +1074 -0
  39. package/dist/src/decision/graph-index.js +16 -0
  40. package/dist/src/decision/graph-live-qualification.js +1041 -0
  41. package/dist/src/decision/graph-live-workload.js +245 -0
  42. package/dist/src/decision/graph-skill-bridge.js +21 -3
  43. package/dist/src/decision/heldout/calibration.js +140 -0
  44. package/dist/src/decision/heldout/collector.js +430 -0
  45. package/dist/src/decision/heldout/contract.js +309 -0
  46. package/dist/src/decision/heldout/d29-generator-ids.js +12 -0
  47. package/dist/src/decision/heldout/d29-passage-baseline-v2.js +93 -0
  48. package/dist/src/decision/heldout/d29-passage-baseline-v3.js +100 -0
  49. package/dist/src/decision/heldout/d29-passage-baseline.js +66 -0
  50. package/dist/src/decision/heldout/d29-pools-v8.js +575 -0
  51. package/dist/src/decision/heldout/d29-pools.js +288 -0
  52. package/dist/src/decision/heldout/d29-v6.js +169 -0
  53. package/dist/src/decision/heldout/d29-v7.js +202 -0
  54. package/dist/src/decision/heldout/d29-v8.js +586 -0
  55. package/dist/src/decision/heldout/generator-registry.js +67 -0
  56. package/dist/src/decision/heldout/generators.js +696 -0
  57. package/dist/src/decision/heldout/index.js +8 -0
  58. package/dist/src/decision/heldout/journal.js +346 -0
  59. package/dist/src/decision/heldout/study-generators.js +64 -0
  60. package/dist/src/decision/heldout/types.js +2 -0
  61. package/dist/src/decision/host-policy.js +61 -0
  62. package/dist/src/decision/index.js +11 -0
  63. package/dist/src/decision/interop-profile.v1.json +112 -0
  64. package/dist/src/decision/interop.js +653 -0
  65. package/dist/src/decision/issue-triage/index.js +3 -0
  66. package/dist/src/decision/issue-triage/runtime.js +1069 -0
  67. package/dist/src/decision/issue-triage/types.js +2 -0
  68. package/dist/src/decision/patterns/catalog.js +28 -8
  69. package/dist/src/decision/patterns/playground.js +28 -11
  70. package/dist/src/decision/patterns/specs.js +19 -10
  71. package/dist/src/decision/preprocessed-evidence.js +724 -0
  72. package/dist/src/decision/qualification/capture.js +8 -2
  73. package/dist/src/decision/qualification/gate-evidence.js +19 -4
  74. package/dist/src/decision/qualification/quality.js +57 -49
  75. package/dist/src/decision/qualification/release.js +76 -3
  76. package/dist/src/decision/qualification/runner.js +5 -2
  77. package/dist/src/decision/routing/contract.js +175 -0
  78. package/dist/src/decision/routing/index.js +5 -0
  79. package/dist/src/decision/routing/report.js +216 -0
  80. package/dist/src/decision/routing/runtime.js +685 -0
  81. package/dist/src/decision/routing/types.js +2 -0
  82. package/dist/src/decision/sdlc-screening.js +1157 -0
  83. package/dist/src/decision/sensitivity/comparative.js +154 -0
  84. package/dist/src/decision/sensitivity/contract.js +218 -0
  85. package/dist/src/decision/sensitivity/index.js +5 -0
  86. package/dist/src/decision/sensitivity/runtime.js +912 -0
  87. package/dist/src/decision/sensitivity/types.js +2 -0
  88. package/dist/src/decision/validate.js +26 -0
  89. package/dist/src/extensions/commands/definitions.js +38 -0
  90. package/dist/src/extensions/manifest.js +44 -0
  91. package/dist/src/gates/discovery.js +315 -0
  92. package/dist/src/gates/driver.js +388 -0
  93. package/dist/src/gates/evaluate.js +719 -0
  94. package/dist/src/gates/floors.js +255 -0
  95. package/dist/src/gates/index.js +17 -0
  96. package/dist/src/gates/providers/evidence.js +38 -0
  97. package/dist/src/gates/providers/index.js +21 -0
  98. package/dist/src/gates/providers/isolated-child-source.js +446 -0
  99. package/dist/src/gates/providers/loader.js +1069 -0
  100. package/dist/src/gates/providers/paired.js +52 -0
  101. package/dist/src/gates/providers/proportion.js +60 -0
  102. package/dist/src/gates/providers/registry.js +40 -0
  103. package/dist/src/gates/providers/scalar.js +41 -0
  104. package/dist/src/gates/providers/screening.js +53 -0
  105. package/dist/src/gates/providers/types.js +25 -0
  106. package/dist/src/gates/registry.js +1003 -0
  107. package/dist/src/gates/report.js +102 -0
  108. package/dist/src/gates/schema.js +56 -0
  109. package/dist/src/gates/stats/binomial.js +26 -0
  110. package/dist/src/gates/stats/bootstrap.js +62 -0
  111. package/dist/src/gates/stats/clopper-pearson.js +95 -0
  112. package/dist/src/gates/stats/digest.js +26 -0
  113. package/dist/src/gates/stats/error.js +5 -0
  114. package/dist/src/gates/stats/index.js +9 -0
  115. package/dist/src/gates/stats/normal.js +35 -0
  116. package/dist/src/gates/stats/paired.js +120 -0
  117. package/dist/src/gates/stats/splits.js +30 -0
  118. package/dist/src/gates/types.js +8 -0
  119. package/dist/src/governance/redaction.js +14 -4
  120. package/dist/src/mcp/muse-native-config.mjs +123 -0
  121. package/dist/src/mcp/tools/decision.mjs +188 -0
  122. package/dist/src/mcp/tools/subsystems.mjs +2 -0
  123. package/dist/src/providers/capability-matrix.yaml +2 -1
  124. package/dist/src/providers/provider-definitions.js +2 -1
  125. package/dist/src/sessions/adapters/muse.js +336 -39
  126. package/dist/src/sessions/batch-import.js +7 -0
  127. package/dist/src/sessions/workspace-discovery.js +13 -2
  128. package/package.json +1 -1
  129. package/schemas/decision/ConformalFrozenOpenData.v2.schema.json +371 -0
  130. package/schemas/decision/ConformalOpenDataReport.v2.schema.json +421 -0
  131. package/schemas/decision/ConformalPreregistration.v2.schema.json +529 -0
  132. package/schemas/decision/ContextPruningCandidate.v1.schema.json +47 -0
  133. package/schemas/decision/ContextPruningEvaluationReport.v1.schema.json +758 -0
  134. package/schemas/decision/ContextPruningPreregistration.v1.schema.json +175 -0
  135. package/schemas/decision/ContextPruningReceipt.v1.schema.json +72 -0
  136. package/schemas/decision/D17Multifact.v1.schema.json +1851 -0
  137. package/schemas/decision/D17StudyAnalysis.v1.schema.json +42 -0
  138. package/schemas/decision/D17StudyAnalysis.v2.schema.json +51 -0
  139. package/schemas/decision/D17StudyCalibration.v1.schema.json +819 -0
  140. package/schemas/decision/D17StudyDryRun.v1.schema.json +169 -0
  141. package/schemas/decision/D17StudyDryRun.v2.schema.json +239 -0
  142. package/schemas/decision/D17StudyGold.v1.schema.json +108 -0
  143. package/schemas/decision/D17StudyGuide.v1.schema.json +63 -0
  144. package/schemas/decision/D17StudyNativeTemplates.v1.schema.json +619 -0
  145. package/schemas/decision/D17StudyProtocol.v1.schema.json +241 -0
  146. package/schemas/decision/D17StudyReport.v1.schema.json +902 -0
  147. package/schemas/decision/D17StudyReport.v2.schema.json +1319 -0
  148. package/schemas/decision/D17StudyReview.v1.schema.json +175 -0
  149. package/schemas/decision/D17StudySplits.v1.schema.json +217 -0
  150. package/schemas/decision/D29Study.v1.schema.json +1903 -0
  151. package/schemas/decision/D29Study.v2.schema.json +1344 -0
  152. package/schemas/decision/D29Study.v3.schema.json +609 -0
  153. package/schemas/decision/D29Study.v4.schema.json +1133 -0
  154. package/schemas/decision/D29Study.v6.schema.json +1205 -0
  155. package/schemas/decision/D29Study.v7.schema.json +1471 -0
  156. package/schemas/decision/D29Study.v8.schema.json +671 -0
  157. package/schemas/decision/D29Study.v9.schema.json +778 -0
  158. package/schemas/decision/DecisionComparativeReplayAuditSample.v1.schema.json +137 -0
  159. package/schemas/decision/DecisionComparativeReplayCorpus.v1.schema.json +258 -0
  160. package/schemas/decision/DecisionComparativeReplayFreeze.v1.schema.json +74 -0
  161. package/schemas/decision/DecisionComparativeReplayGold.v1.schema.json +50 -0
  162. package/schemas/decision/DecisionComparativeReplayGoldAsset.v1.schema.json +37 -0
  163. package/schemas/decision/DecisionComparativeReplayIntegrity.v1.schema.json +81 -0
  164. package/schemas/decision/DecisionComparativeReplayMembers.v1.schema.json +52 -0
  165. package/schemas/decision/DecisionComparativeReplayPreregistration.v1.schema.json +113 -0
  166. package/schemas/decision/DecisionComparativeReplayReport.v1.schema.json +407 -0
  167. package/schemas/decision/DecisionComparativeReplayReviewPackets.v1.schema.json +260 -0
  168. package/schemas/decision/DecisionComparativeReplaySplit.v1.schema.json +84 -0
  169. package/schemas/decision/DecisionFeatureObservation.v1.schema.json +564 -0
  170. package/schemas/decision/DecisionFeatureSet.v1.schema.json +155 -0
  171. package/schemas/decision/DecisionInteropMapping.v1.schema.json +85 -0
  172. package/schemas/decision/DecisionIssueTriageEvaluationManifest.v1.schema.json +174 -0
  173. package/schemas/decision/DecisionIssueTriageEvaluationReport.v1.schema.json +280 -0
  174. package/schemas/decision/DecisionIssueTriagePilotPack.v1.schema.json +114 -0
  175. package/schemas/decision/DecisionRouteReceipt.v1.schema.json +155 -0
  176. package/schemas/decision/DecisionRoutingPolicy.v1.schema.json +132 -0
  177. package/schemas/decision/DecisionRoutingShadowReport.v1.schema.json +170 -0
  178. package/schemas/decision/DecisionRoutingTask.v1.schema.json +49 -0
  179. package/schemas/decision/DecisionRuleset.schema.json +8 -2
  180. package/schemas/decision/DecisionRuleset.v1alpha2.schema.json +8 -2
  181. package/schemas/decision/DecisionSensitivityPlan.v1.schema.json +191 -0
  182. package/schemas/decision/DecisionSensitivityReport.v1.schema.json +163 -0
  183. package/schemas/decision/HeldoutApproval.v1.schema.json +312 -0
  184. package/schemas/decision/HeldoutAttempt.v1.schema.json +211 -0
  185. package/schemas/decision/HeldoutBaseline.v1.schema.json +90 -0
  186. package/schemas/decision/HeldoutCalibrationPhase.v1.schema.json +87 -0
  187. package/schemas/decision/HeldoutCorpus.v1.schema.json +167 -0
  188. package/schemas/decision/HeldoutEvent.v1.schema.json +41 -0
  189. package/schemas/decision/HeldoutFrozen.v1.schema.json +142 -0
  190. package/schemas/decision/HeldoutPreregistration.v1.schema.json +222 -0
  191. package/schemas/decision/HeldoutSpendEvent.v1.schema.json +122 -0
  192. package/schemas/decision/HeldoutSpendHead.v1.schema.json +25 -0
  193. package/schemas/decision/HeldoutSpendHead.v2.schema.json +46 -0
  194. package/schemas/decision/HeldoutSummary.v1.schema.json +101 -0
  195. package/schemas/decision/OpaDecisionLogExport.v1.schema.json +65 -0
  196. package/schemas/decision/PreprocessedEvidence.v1.schema.json +306 -0
  197. package/schemas/decision/RulesetResult.v1alpha2.schema.json +175 -0
  198. package/schemas/decision/SdlcEvidenceScreening.v1.schema.json +499 -0
  199. package/schemas/decision/SdlcScreeningPreregistration.v1.schema.json +132 -0
  200. package/schemas/decision/SdlcScreeningPreregistration.v2.schema.json +138 -0
  201. package/schemas/decision/SdlcScreeningRelease.v1.schema.json +654 -0
  202. package/schemas/decision/SdlcScreeningRelease.v2.schema.json +654 -0
  203. package/tools/agents/deploy-agents.mjs +1 -1
  204. package/tools/agents/providers/base.mjs +26 -7
  205. package/tools/agents/providers/factory.mjs +10 -2
  206. package/tools/agents/providers/muse-hooks.mjs +1 -29
  207. package/tools/agents/providers/muse.mjs +6 -3
@@ -0,0 +1,1319 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/D17StudyReport.v2.schema.json",
4
+ "title": "D17StudyReport",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "scope",
10
+ "calibrated",
11
+ "d09Qualified",
12
+ "calibratedGate",
13
+ "corpusDigest",
14
+ "preregistrationDigest",
15
+ "executionPins",
16
+ "integrityDigest",
17
+ "integrity",
18
+ "integrityProblems",
19
+ "statistics",
20
+ "statisticsDigest",
21
+ "pairs",
22
+ "observations",
23
+ "accounting",
24
+ "calibrationDiagnostics",
25
+ "pending",
26
+ "decision",
27
+ "calibration",
28
+ "developmentReviewDigest",
29
+ "calibrationReviewDigest",
30
+ "uncalibratedStatistics",
31
+ "gates"
32
+ ],
33
+ "properties": {
34
+ "schemaVersion": {
35
+ "const": "decision-d17-study-report/v2"
36
+ },
37
+ "scope": {
38
+ "const": "synthetic-staged-calibrated"
39
+ },
40
+ "calibrated": {
41
+ "const": true
42
+ },
43
+ "d09Qualified": {
44
+ "const": true
45
+ },
46
+ "calibratedGate": {
47
+ "const": true
48
+ },
49
+ "corpusDigest": {
50
+ "type": "string",
51
+ "pattern": "^sha256:[a-f0-9]{64}$"
52
+ },
53
+ "preregistrationDigest": {
54
+ "type": "string",
55
+ "pattern": "^sha256:[a-f0-9]{64}$"
56
+ },
57
+ "executionPins": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": [
61
+ "definition",
62
+ "binding",
63
+ "model",
64
+ "adapter",
65
+ "aggregatePolicyDigest"
66
+ ],
67
+ "properties": {
68
+ "definition": {
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": [
72
+ "id",
73
+ "version",
74
+ "digest"
75
+ ],
76
+ "properties": {
77
+ "id": {
78
+ "type": "string"
79
+ },
80
+ "version": {
81
+ "type": "string"
82
+ },
83
+ "digest": {
84
+ "type": "string",
85
+ "pattern": "^sha256:[a-f0-9]{64}$"
86
+ }
87
+ }
88
+ },
89
+ "binding": {
90
+ "anyOf": [
91
+ {
92
+ "type": "null"
93
+ },
94
+ {
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": [
98
+ "id",
99
+ "version",
100
+ "digest"
101
+ ],
102
+ "properties": {
103
+ "id": {
104
+ "type": "string"
105
+ },
106
+ "version": {
107
+ "type": "string"
108
+ },
109
+ "digest": {
110
+ "type": "string",
111
+ "pattern": "^sha256:[a-f0-9]{64}$"
112
+ }
113
+ }
114
+ }
115
+ ]
116
+ },
117
+ "model": {
118
+ "const": "jev-1.13.0"
119
+ },
120
+ "adapter": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": [
124
+ "id",
125
+ "version"
126
+ ],
127
+ "properties": {
128
+ "id": {
129
+ "const": "jev"
130
+ },
131
+ "version": {
132
+ "const": "1.0.0"
133
+ }
134
+ }
135
+ },
136
+ "aggregatePolicyDigest": {
137
+ "anyOf": [
138
+ {
139
+ "type": "null"
140
+ },
141
+ {
142
+ "type": "string",
143
+ "pattern": "^sha256:[a-f0-9]{64}$"
144
+ }
145
+ ]
146
+ }
147
+ }
148
+ },
149
+ "integrityDigest": {
150
+ "type": "string",
151
+ "pattern": "^sha256:[a-f0-9]{64}$"
152
+ },
153
+ "integrity": {
154
+ "$ref": "https://aiwg.io/schemas/decision/DecisionEnsembleIntegrityReport.v1.schema.json#/properties/integrity"
155
+ },
156
+ "integrityProblems": {
157
+ "type": "array",
158
+ "items": {
159
+ "type": "string"
160
+ }
161
+ },
162
+ "statistics": {
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": [
166
+ "sampleN",
167
+ "missingIds",
168
+ "slices",
169
+ "pairedDeltas",
170
+ "quality",
171
+ "brier",
172
+ "abstention",
173
+ "acceptedN",
174
+ "acceptedErrors",
175
+ "acceptedErrorUpperBps",
176
+ "coverageLowerBps",
177
+ "p95LatencyIncreaseMs",
178
+ "latencyDifferencesMs",
179
+ "netSavingsMicros",
180
+ "costBasis",
181
+ "benefitSupported",
182
+ "findings",
183
+ "statisticalGate",
184
+ "worstCaseFailureAsError"
185
+ ],
186
+ "properties": {
187
+ "sampleN": {
188
+ "type": "integer",
189
+ "minimum": 0
190
+ },
191
+ "missingIds": {
192
+ "type": "array",
193
+ "items": {
194
+ "type": "string"
195
+ }
196
+ },
197
+ "slices": {
198
+ "type": "array",
199
+ "items": {
200
+ "type": "object",
201
+ "additionalProperties": false,
202
+ "required": [
203
+ "slice",
204
+ "n",
205
+ "qualityDelta",
206
+ "harm",
207
+ "descriptiveOnly"
208
+ ],
209
+ "properties": {
210
+ "slice": {
211
+ "type": "string"
212
+ },
213
+ "n": {
214
+ "type": "integer",
215
+ "minimum": 0
216
+ },
217
+ "qualityDelta": {
218
+ "anyOf": [
219
+ {
220
+ "type": "null"
221
+ },
222
+ {
223
+ "type": "number"
224
+ }
225
+ ]
226
+ },
227
+ "harm": {
228
+ "type": "boolean"
229
+ },
230
+ "descriptiveOnly": {
231
+ "const": true
232
+ }
233
+ }
234
+ }
235
+ },
236
+ "pairedDeltas": {
237
+ "type": "array",
238
+ "items": {
239
+ "type": "object",
240
+ "additionalProperties": false,
241
+ "required": [
242
+ "metric",
243
+ "pairs",
244
+ "delta"
245
+ ],
246
+ "properties": {
247
+ "metric": {
248
+ "enum": [
249
+ "quality",
250
+ "calibration",
251
+ "risk-coverage",
252
+ "abstention",
253
+ "latency",
254
+ "tokens",
255
+ "cost",
256
+ "slice"
257
+ ]
258
+ },
259
+ "pairs": {
260
+ "type": "integer",
261
+ "minimum": 0
262
+ },
263
+ "delta": {
264
+ "anyOf": [
265
+ {
266
+ "type": "null"
267
+ },
268
+ {
269
+ "type": "number"
270
+ }
271
+ ]
272
+ }
273
+ }
274
+ }
275
+ },
276
+ "quality": {
277
+ "$ref": "#/$defs/interval"
278
+ },
279
+ "brier": {
280
+ "$ref": "#/$defs/interval"
281
+ },
282
+ "abstention": {
283
+ "$ref": "#/$defs/interval"
284
+ },
285
+ "acceptedN": {
286
+ "type": "integer",
287
+ "minimum": 0
288
+ },
289
+ "acceptedErrors": {
290
+ "type": "integer",
291
+ "minimum": 0
292
+ },
293
+ "acceptedErrorUpperBps": {
294
+ "anyOf": [
295
+ {
296
+ "type": "null"
297
+ },
298
+ {
299
+ "type": "integer",
300
+ "minimum": 0
301
+ }
302
+ ]
303
+ },
304
+ "coverageLowerBps": {
305
+ "anyOf": [
306
+ {
307
+ "type": "null"
308
+ },
309
+ {
310
+ "type": "integer",
311
+ "minimum": 0
312
+ }
313
+ ]
314
+ },
315
+ "p95LatencyIncreaseMs": {
316
+ "anyOf": [
317
+ {
318
+ "type": "null"
319
+ },
320
+ {
321
+ "type": "number"
322
+ }
323
+ ]
324
+ },
325
+ "latencyDifferencesMs": {
326
+ "type": "array",
327
+ "items": {
328
+ "type": "number"
329
+ }
330
+ },
331
+ "netSavingsMicros": {
332
+ "type": "number"
333
+ },
334
+ "costBasis": {
335
+ "const": "nonrefundable-reservations-including-failed-attempts"
336
+ },
337
+ "benefitSupported": {
338
+ "type": "boolean"
339
+ },
340
+ "findings": {
341
+ "type": "array",
342
+ "items": {
343
+ "type": "string"
344
+ }
345
+ },
346
+ "statisticalGate": {
347
+ "enum": [
348
+ "HOLD",
349
+ "pass"
350
+ ]
351
+ },
352
+ "worstCaseFailureAsError": {
353
+ "type": "object",
354
+ "additionalProperties": false,
355
+ "required": [
356
+ "n",
357
+ "championCorrect",
358
+ "challengerCorrect",
359
+ "missingPairsCountedAsErrors"
360
+ ],
361
+ "properties": {
362
+ "n": {
363
+ "type": "integer",
364
+ "minimum": 0
365
+ },
366
+ "championCorrect": {
367
+ "type": "integer",
368
+ "minimum": 0
369
+ },
370
+ "challengerCorrect": {
371
+ "type": "integer",
372
+ "minimum": 0
373
+ },
374
+ "missingPairsCountedAsErrors": {
375
+ "type": "integer",
376
+ "minimum": 0
377
+ }
378
+ }
379
+ }
380
+ }
381
+ },
382
+ "statisticsDigest": {
383
+ "type": "string",
384
+ "pattern": "^sha256:[a-f0-9]{64}$"
385
+ },
386
+ "pairs": {
387
+ "type": "array",
388
+ "items": {
389
+ "type": "object",
390
+ "additionalProperties": false,
391
+ "required": [
392
+ "id",
393
+ "slice",
394
+ "champion",
395
+ "challenger"
396
+ ],
397
+ "properties": {
398
+ "id": {
399
+ "type": "string"
400
+ },
401
+ "slice": {
402
+ "type": "string"
403
+ },
404
+ "champion": {
405
+ "$ref": "#/$defs/arm"
406
+ },
407
+ "challenger": {
408
+ "$ref": "#/$defs/arm"
409
+ }
410
+ }
411
+ }
412
+ },
413
+ "observations": {
414
+ "type": "array",
415
+ "items": {
416
+ "type": "object",
417
+ "additionalProperties": false,
418
+ "required": [
419
+ "id",
420
+ "champion",
421
+ "challenger",
422
+ "aggregate"
423
+ ],
424
+ "properties": {
425
+ "id": {
426
+ "type": "string"
427
+ },
428
+ "champion": {
429
+ "$ref": "#/$defs/observation"
430
+ },
431
+ "challenger": {
432
+ "$ref": "#/$defs/observation"
433
+ },
434
+ "aggregate": {
435
+ "anyOf": [
436
+ {
437
+ "type": "null"
438
+ },
439
+ {
440
+ "$ref": "https://aiwg.io/schemas/decision/DecisionEnsembleAggregate.v1.schema.json"
441
+ }
442
+ ]
443
+ }
444
+ }
445
+ }
446
+ },
447
+ "accounting": {
448
+ "type": "object",
449
+ "additionalProperties": false,
450
+ "required": [
451
+ "allSplits",
452
+ "test"
453
+ ],
454
+ "properties": {
455
+ "allSplits": {
456
+ "type": "object",
457
+ "additionalProperties": false,
458
+ "required": [
459
+ "attempts",
460
+ "reservedCostMicros"
461
+ ],
462
+ "properties": {
463
+ "attempts": {
464
+ "type": "integer",
465
+ "minimum": 0
466
+ },
467
+ "reservedCostMicros": {
468
+ "type": "number"
469
+ }
470
+ }
471
+ },
472
+ "test": {
473
+ "type": "object",
474
+ "additionalProperties": false,
475
+ "required": [
476
+ "championReservedCostMicros",
477
+ "challengerReservedCostMicros",
478
+ "netSavingsMicros",
479
+ "complete"
480
+ ],
481
+ "properties": {
482
+ "championReservedCostMicros": {
483
+ "type": "number"
484
+ },
485
+ "challengerReservedCostMicros": {
486
+ "type": "number"
487
+ },
488
+ "netSavingsMicros": {
489
+ "type": "number"
490
+ },
491
+ "complete": {
492
+ "type": "boolean"
493
+ }
494
+ }
495
+ }
496
+ }
497
+ },
498
+ "calibrationDiagnostics": {
499
+ "type": "object",
500
+ "additionalProperties": false,
501
+ "required": [
502
+ "champion",
503
+ "challenger",
504
+ "calibrated"
505
+ ],
506
+ "properties": {
507
+ "champion": {
508
+ "anyOf": [
509
+ {
510
+ "type": "null"
511
+ },
512
+ {
513
+ "type": "object",
514
+ "additionalProperties": false,
515
+ "required": [
516
+ "overall",
517
+ "slices"
518
+ ],
519
+ "properties": {
520
+ "overall": {
521
+ "$ref": "#/$defs/binaryMetrics"
522
+ },
523
+ "slices": {
524
+ "type": "object",
525
+ "additionalProperties": {
526
+ "$ref": "#/$defs/binaryMetrics"
527
+ }
528
+ }
529
+ }
530
+ }
531
+ ]
532
+ },
533
+ "challenger": {
534
+ "anyOf": [
535
+ {
536
+ "type": "null"
537
+ },
538
+ {
539
+ "type": "object",
540
+ "additionalProperties": false,
541
+ "required": [
542
+ "overall",
543
+ "slices"
544
+ ],
545
+ "properties": {
546
+ "overall": {
547
+ "$ref": "#/$defs/binaryMetrics"
548
+ },
549
+ "slices": {
550
+ "type": "object",
551
+ "additionalProperties": {
552
+ "$ref": "#/$defs/binaryMetrics"
553
+ }
554
+ }
555
+ }
556
+ }
557
+ ]
558
+ },
559
+ "calibrated": {
560
+ "const": true
561
+ }
562
+ }
563
+ },
564
+ "pending": {
565
+ "type": "array",
566
+ "items": {
567
+ "type": "string"
568
+ }
569
+ },
570
+ "decision": {
571
+ "enum": [
572
+ "HOLD",
573
+ "ROLLBACK"
574
+ ]
575
+ },
576
+ "calibration": {
577
+ "type": "object",
578
+ "additionalProperties": false,
579
+ "required": [
580
+ "mode",
581
+ "calibrationSetDigest",
582
+ "calibrationPhaseRecordDigest",
583
+ "priorApprovalDigest",
584
+ "member",
585
+ "aggregate",
586
+ "qualifiedAt",
587
+ "applied"
588
+ ],
589
+ "properties": {
590
+ "mode": {
591
+ "const": "staged-test"
592
+ },
593
+ "calibrationSetDigest": {
594
+ "type": "string",
595
+ "pattern": "^sha256:[a-f0-9]{64}$"
596
+ },
597
+ "calibrationPhaseRecordDigest": {
598
+ "type": "string",
599
+ "pattern": "^sha256:[a-f0-9]{64}$"
600
+ },
601
+ "priorApprovalDigest": {
602
+ "type": "string",
603
+ "pattern": "^sha256:[a-f0-9]{64}$"
604
+ },
605
+ "member": {
606
+ "type": "object",
607
+ "additionalProperties": false,
608
+ "required": [
609
+ "artifactId",
610
+ "artifactDigest",
611
+ "mappingDigest",
612
+ "compatibility"
613
+ ],
614
+ "properties": {
615
+ "artifactId": {
616
+ "type": "string",
617
+ "minLength": 1,
618
+ "maxLength": 512
619
+ },
620
+ "artifactDigest": {
621
+ "type": "string",
622
+ "pattern": "^sha256:[a-f0-9]{64}$"
623
+ },
624
+ "mappingDigest": {
625
+ "type": "string",
626
+ "pattern": "^sha256:[a-f0-9]{64}$"
627
+ },
628
+ "compatibility": {
629
+ "type": "object",
630
+ "additionalProperties": false,
631
+ "required": [
632
+ "action",
633
+ "state",
634
+ "pinId"
635
+ ],
636
+ "properties": {
637
+ "action": {
638
+ "const": "allow"
639
+ },
640
+ "state": {
641
+ "enum": [
642
+ "exact",
643
+ "approved-compatible"
644
+ ]
645
+ },
646
+ "pinId": {
647
+ "type": "string",
648
+ "minLength": 1
649
+ }
650
+ }
651
+ }
652
+ }
653
+ },
654
+ "aggregate": {
655
+ "type": "object",
656
+ "additionalProperties": false,
657
+ "required": [
658
+ "artifactId",
659
+ "artifactDigest",
660
+ "mappingDigest",
661
+ "compatibility"
662
+ ],
663
+ "properties": {
664
+ "artifactId": {
665
+ "type": "string",
666
+ "minLength": 1,
667
+ "maxLength": 512
668
+ },
669
+ "artifactDigest": {
670
+ "type": "string",
671
+ "pattern": "^sha256:[a-f0-9]{64}$"
672
+ },
673
+ "mappingDigest": {
674
+ "type": "string",
675
+ "pattern": "^sha256:[a-f0-9]{64}$"
676
+ },
677
+ "compatibility": {
678
+ "type": "object",
679
+ "additionalProperties": false,
680
+ "required": [
681
+ "action",
682
+ "state",
683
+ "pinId"
684
+ ],
685
+ "properties": {
686
+ "action": {
687
+ "const": "allow"
688
+ },
689
+ "state": {
690
+ "enum": [
691
+ "exact",
692
+ "approved-compatible"
693
+ ]
694
+ },
695
+ "pinId": {
696
+ "type": "string",
697
+ "minLength": 1
698
+ }
699
+ }
700
+ }
701
+ }
702
+ },
703
+ "qualifiedAt": {
704
+ "type": "string",
705
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"
706
+ },
707
+ "applied": {
708
+ "type": "object",
709
+ "additionalProperties": false,
710
+ "required": [
711
+ "champion",
712
+ "challenger"
713
+ ],
714
+ "properties": {
715
+ "champion": {
716
+ "const": "member"
717
+ },
718
+ "challenger": {
719
+ "const": "aggregate"
720
+ }
721
+ }
722
+ }
723
+ }
724
+ },
725
+ "developmentReviewDigest": {
726
+ "type": "string",
727
+ "pattern": "^sha256:[a-f0-9]{64}$"
728
+ },
729
+ "uncalibratedStatistics": {
730
+ "type": "object",
731
+ "additionalProperties": false,
732
+ "required": [
733
+ "sampleN",
734
+ "missingIds",
735
+ "slices",
736
+ "pairedDeltas",
737
+ "quality",
738
+ "brier",
739
+ "abstention",
740
+ "acceptedN",
741
+ "acceptedErrors",
742
+ "acceptedErrorUpperBps",
743
+ "coverageLowerBps",
744
+ "p95LatencyIncreaseMs",
745
+ "latencyDifferencesMs",
746
+ "netSavingsMicros",
747
+ "costBasis",
748
+ "benefitSupported",
749
+ "findings",
750
+ "statisticalGate",
751
+ "worstCaseFailureAsError"
752
+ ],
753
+ "properties": {
754
+ "sampleN": {
755
+ "type": "integer",
756
+ "minimum": 0
757
+ },
758
+ "missingIds": {
759
+ "type": "array",
760
+ "items": {
761
+ "type": "string"
762
+ }
763
+ },
764
+ "slices": {
765
+ "type": "array",
766
+ "items": {
767
+ "type": "object",
768
+ "additionalProperties": false,
769
+ "required": [
770
+ "slice",
771
+ "n",
772
+ "qualityDelta",
773
+ "harm",
774
+ "descriptiveOnly"
775
+ ],
776
+ "properties": {
777
+ "slice": {
778
+ "type": "string"
779
+ },
780
+ "n": {
781
+ "type": "integer",
782
+ "minimum": 0
783
+ },
784
+ "qualityDelta": {
785
+ "anyOf": [
786
+ {
787
+ "type": "null"
788
+ },
789
+ {
790
+ "type": "number"
791
+ }
792
+ ]
793
+ },
794
+ "harm": {
795
+ "type": "boolean"
796
+ },
797
+ "descriptiveOnly": {
798
+ "const": true
799
+ }
800
+ }
801
+ }
802
+ },
803
+ "pairedDeltas": {
804
+ "type": "array",
805
+ "items": {
806
+ "type": "object",
807
+ "additionalProperties": false,
808
+ "required": [
809
+ "metric",
810
+ "pairs",
811
+ "delta"
812
+ ],
813
+ "properties": {
814
+ "metric": {
815
+ "enum": [
816
+ "quality",
817
+ "calibration",
818
+ "risk-coverage",
819
+ "abstention",
820
+ "latency",
821
+ "tokens",
822
+ "cost",
823
+ "slice"
824
+ ]
825
+ },
826
+ "pairs": {
827
+ "type": "integer",
828
+ "minimum": 0
829
+ },
830
+ "delta": {
831
+ "anyOf": [
832
+ {
833
+ "type": "null"
834
+ },
835
+ {
836
+ "type": "number"
837
+ }
838
+ ]
839
+ }
840
+ }
841
+ }
842
+ },
843
+ "quality": {
844
+ "$ref": "#/$defs/interval"
845
+ },
846
+ "brier": {
847
+ "$ref": "#/$defs/interval"
848
+ },
849
+ "abstention": {
850
+ "$ref": "#/$defs/interval"
851
+ },
852
+ "acceptedN": {
853
+ "type": "integer",
854
+ "minimum": 0
855
+ },
856
+ "acceptedErrors": {
857
+ "type": "integer",
858
+ "minimum": 0
859
+ },
860
+ "acceptedErrorUpperBps": {
861
+ "anyOf": [
862
+ {
863
+ "type": "null"
864
+ },
865
+ {
866
+ "type": "integer",
867
+ "minimum": 0
868
+ }
869
+ ]
870
+ },
871
+ "coverageLowerBps": {
872
+ "anyOf": [
873
+ {
874
+ "type": "null"
875
+ },
876
+ {
877
+ "type": "integer",
878
+ "minimum": 0
879
+ }
880
+ ]
881
+ },
882
+ "p95LatencyIncreaseMs": {
883
+ "anyOf": [
884
+ {
885
+ "type": "null"
886
+ },
887
+ {
888
+ "type": "number"
889
+ }
890
+ ]
891
+ },
892
+ "latencyDifferencesMs": {
893
+ "type": "array",
894
+ "items": {
895
+ "type": "number"
896
+ }
897
+ },
898
+ "netSavingsMicros": {
899
+ "type": "number"
900
+ },
901
+ "costBasis": {
902
+ "const": "nonrefundable-reservations-including-failed-attempts"
903
+ },
904
+ "benefitSupported": {
905
+ "type": "boolean"
906
+ },
907
+ "findings": {
908
+ "type": "array",
909
+ "items": {
910
+ "type": "string"
911
+ }
912
+ },
913
+ "statisticalGate": {
914
+ "enum": [
915
+ "HOLD",
916
+ "pass"
917
+ ]
918
+ },
919
+ "worstCaseFailureAsError": {
920
+ "type": "object",
921
+ "additionalProperties": false,
922
+ "required": [
923
+ "n",
924
+ "championCorrect",
925
+ "challengerCorrect",
926
+ "missingPairsCountedAsErrors"
927
+ ],
928
+ "properties": {
929
+ "n": {
930
+ "type": "integer",
931
+ "minimum": 0
932
+ },
933
+ "championCorrect": {
934
+ "type": "integer",
935
+ "minimum": 0
936
+ },
937
+ "challengerCorrect": {
938
+ "type": "integer",
939
+ "minimum": 0
940
+ },
941
+ "missingPairsCountedAsErrors": {
942
+ "type": "integer",
943
+ "minimum": 0
944
+ }
945
+ }
946
+ }
947
+ }
948
+ },
949
+ "gates": {
950
+ "type": "object",
951
+ "additionalProperties": false,
952
+ "required": [
953
+ "source",
954
+ "gateBinding",
955
+ "statisticalGate",
956
+ "findings",
957
+ "promotion"
958
+ ],
959
+ "properties": {
960
+ "source": {
961
+ "const": "d17-native-protocol"
962
+ },
963
+ "gateBinding": {
964
+ "const": null
965
+ },
966
+ "statisticalGate": {
967
+ "enum": [
968
+ "pass",
969
+ "HOLD"
970
+ ]
971
+ },
972
+ "findings": {
973
+ "type": "array",
974
+ "items": {
975
+ "type": "string"
976
+ }
977
+ },
978
+ "promotion": {
979
+ "const": "not-authorized: requires separate extra-cost tradeoff approval and D09 promotion eligibility"
980
+ }
981
+ }
982
+ },
983
+ "calibrationReviewDigest": {
984
+ "type": "string",
985
+ "pattern": "^sha256:[a-f0-9]{64}$"
986
+ }
987
+ },
988
+ "$defs": {
989
+ "interval": {
990
+ "anyOf": [
991
+ {
992
+ "type": "null"
993
+ },
994
+ {
995
+ "type": "object",
996
+ "additionalProperties": false,
997
+ "required": [
998
+ "lowerBps",
999
+ "upperBps",
1000
+ "estimateBps",
1001
+ "n",
1002
+ "method"
1003
+ ],
1004
+ "properties": {
1005
+ "lowerBps": {
1006
+ "type": "integer"
1007
+ },
1008
+ "upperBps": {
1009
+ "type": "integer"
1010
+ },
1011
+ "estimateBps": {
1012
+ "type": "integer"
1013
+ },
1014
+ "n": {
1015
+ "type": "integer",
1016
+ "minimum": 0
1017
+ },
1018
+ "method": {
1019
+ "enum": [
1020
+ "newcombe-hybrid-score",
1021
+ "percentile-bootstrap"
1022
+ ]
1023
+ }
1024
+ }
1025
+ }
1026
+ ]
1027
+ },
1028
+ "arm": {
1029
+ "type": "object",
1030
+ "additionalProperties": false,
1031
+ "required": [
1032
+ "probability",
1033
+ "accepted",
1034
+ "correct",
1035
+ "brier",
1036
+ "latencyMs",
1037
+ "tokens",
1038
+ "reservedCostMicros"
1039
+ ],
1040
+ "properties": {
1041
+ "probability": {
1042
+ "type": "number",
1043
+ "minimum": 0,
1044
+ "maximum": 1
1045
+ },
1046
+ "accepted": {
1047
+ "type": "boolean"
1048
+ },
1049
+ "correct": {
1050
+ "type": "boolean"
1051
+ },
1052
+ "brier": {
1053
+ "type": "number",
1054
+ "minimum": 0,
1055
+ "maximum": 1
1056
+ },
1057
+ "latencyMs": {
1058
+ "type": "number"
1059
+ },
1060
+ "tokens": {
1061
+ "anyOf": [
1062
+ {
1063
+ "type": "null"
1064
+ },
1065
+ {
1066
+ "type": "integer",
1067
+ "minimum": 0
1068
+ }
1069
+ ]
1070
+ },
1071
+ "reservedCostMicros": {
1072
+ "type": "number"
1073
+ }
1074
+ }
1075
+ },
1076
+ "observation": {
1077
+ "anyOf": [
1078
+ {
1079
+ "type": "null"
1080
+ },
1081
+ {
1082
+ "type": "object",
1083
+ "additionalProperties": false,
1084
+ "required": [
1085
+ "inputDigest",
1086
+ "receiptDigest",
1087
+ "quality",
1088
+ "calibration",
1089
+ "riskCoverage",
1090
+ "abstention",
1091
+ "latencyMs",
1092
+ "tokens",
1093
+ "costMicros",
1094
+ "slice"
1095
+ ],
1096
+ "properties": {
1097
+ "inputDigest": {
1098
+ "type": "string",
1099
+ "pattern": "^sha256:[a-f0-9]{64}$"
1100
+ },
1101
+ "receiptDigest": {
1102
+ "type": "string",
1103
+ "pattern": "^sha256:[a-f0-9]{64}$"
1104
+ },
1105
+ "quality": {
1106
+ "anyOf": [
1107
+ {
1108
+ "type": "null"
1109
+ },
1110
+ {
1111
+ "type": "number"
1112
+ }
1113
+ ]
1114
+ },
1115
+ "calibration": {
1116
+ "anyOf": [
1117
+ {
1118
+ "type": "null"
1119
+ },
1120
+ {
1121
+ "type": "number"
1122
+ }
1123
+ ]
1124
+ },
1125
+ "riskCoverage": {
1126
+ "anyOf": [
1127
+ {
1128
+ "type": "null"
1129
+ },
1130
+ {
1131
+ "type": "number"
1132
+ }
1133
+ ]
1134
+ },
1135
+ "abstention": {
1136
+ "anyOf": [
1137
+ {
1138
+ "type": "null"
1139
+ },
1140
+ {
1141
+ "type": "number"
1142
+ }
1143
+ ]
1144
+ },
1145
+ "latencyMs": {
1146
+ "anyOf": [
1147
+ {
1148
+ "type": "null"
1149
+ },
1150
+ {
1151
+ "type": "number"
1152
+ }
1153
+ ]
1154
+ },
1155
+ "tokens": {
1156
+ "anyOf": [
1157
+ {
1158
+ "type": "null"
1159
+ },
1160
+ {
1161
+ "type": "number"
1162
+ }
1163
+ ]
1164
+ },
1165
+ "costMicros": {
1166
+ "anyOf": [
1167
+ {
1168
+ "type": "null"
1169
+ },
1170
+ {
1171
+ "type": "number"
1172
+ }
1173
+ ]
1174
+ },
1175
+ "slice": {
1176
+ "anyOf": [
1177
+ {
1178
+ "type": "null"
1179
+ },
1180
+ {
1181
+ "type": "number"
1182
+ }
1183
+ ]
1184
+ }
1185
+ }
1186
+ }
1187
+ ]
1188
+ },
1189
+ "binaryMetrics": {
1190
+ "type": "object",
1191
+ "additionalProperties": false,
1192
+ "required": [
1193
+ "sampleN",
1194
+ "errorRate",
1195
+ "brier",
1196
+ "logLoss",
1197
+ "expectedCalibrationError",
1198
+ "coverage",
1199
+ "reviewRate",
1200
+ "selectiveRisk",
1201
+ "errorWilson95",
1202
+ "latencyMs",
1203
+ "inputTokens",
1204
+ "outputTokens",
1205
+ "costUsd",
1206
+ "calls",
1207
+ "retries",
1208
+ "fallbacks"
1209
+ ],
1210
+ "properties": {
1211
+ "sampleN": {
1212
+ "type": "integer",
1213
+ "minimum": 0
1214
+ },
1215
+ "errorRate": {
1216
+ "type": "number"
1217
+ },
1218
+ "brier": {
1219
+ "type": "number"
1220
+ },
1221
+ "logLoss": {
1222
+ "type": "number"
1223
+ },
1224
+ "expectedCalibrationError": {
1225
+ "type": "number"
1226
+ },
1227
+ "coverage": {
1228
+ "type": "number"
1229
+ },
1230
+ "reviewRate": {
1231
+ "type": "number"
1232
+ },
1233
+ "selectiveRisk": {
1234
+ "anyOf": [
1235
+ {
1236
+ "type": "null"
1237
+ },
1238
+ {
1239
+ "type": "number"
1240
+ }
1241
+ ]
1242
+ },
1243
+ "errorWilson95": {
1244
+ "type": "array",
1245
+ "minItems": 2,
1246
+ "maxItems": 2,
1247
+ "items": {
1248
+ "type": "number"
1249
+ }
1250
+ },
1251
+ "latencyMs": {
1252
+ "type": "object",
1253
+ "additionalProperties": false,
1254
+ "required": [
1255
+ "p50",
1256
+ "p95",
1257
+ "p99"
1258
+ ],
1259
+ "properties": {
1260
+ "p50": {
1261
+ "type": "number"
1262
+ },
1263
+ "p95": {
1264
+ "type": "number"
1265
+ },
1266
+ "p99": {
1267
+ "type": "number"
1268
+ }
1269
+ }
1270
+ },
1271
+ "inputTokens": {
1272
+ "anyOf": [
1273
+ {
1274
+ "type": "null"
1275
+ },
1276
+ {
1277
+ "type": "integer",
1278
+ "minimum": 0
1279
+ }
1280
+ ]
1281
+ },
1282
+ "outputTokens": {
1283
+ "anyOf": [
1284
+ {
1285
+ "type": "null"
1286
+ },
1287
+ {
1288
+ "type": "integer",
1289
+ "minimum": 0
1290
+ }
1291
+ ]
1292
+ },
1293
+ "costUsd": {
1294
+ "anyOf": [
1295
+ {
1296
+ "type": "null"
1297
+ },
1298
+ {
1299
+ "type": "number"
1300
+ }
1301
+ ]
1302
+ },
1303
+ "calls": {
1304
+ "type": "integer",
1305
+ "minimum": 0
1306
+ },
1307
+ "retries": {
1308
+ "type": "integer",
1309
+ "minimum": 0
1310
+ },
1311
+ "fallbacks": {
1312
+ "type": "integer",
1313
+ "minimum": 0
1314
+ }
1315
+ }
1316
+ }
1317
+ },
1318
+ "description": "Staged-calibration D17 test-phase report: native gates evaluated on D09-qualified calibrated probabilities. v1 remains the uncalibrated diagnostic report. Never PROMOTE."
1319
+ }