@aiwg/cli 2026.9.21 → 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 (210) hide show
  1. package/agentic/code/providers/capability-matrix.yaml +2 -1
  2. package/dist/src/artifacts/cli.js +23 -18
  3. package/dist/src/artifacts/discovery-shadow-evaluator.js +177 -0
  4. package/dist/src/artifacts/discovery-shadow.js +195 -0
  5. package/dist/src/artifacts/fortemi-core-query-adapter.js +6 -2
  6. package/dist/src/artifacts/index-builder.js +47 -9
  7. package/dist/src/artifacts/query-engine.js +108 -5
  8. package/dist/src/artifacts/types.js +1 -0
  9. package/dist/src/cli/handlers/decision.js +88 -0
  10. package/dist/src/cli/handlers/gates.js +154 -0
  11. package/dist/src/cli/handlers/index.js +5 -1
  12. package/dist/src/cli/handlers/sessions.js +10 -7
  13. package/dist/src/cli/handlers/utilities.js +20 -0
  14. package/dist/src/config/aiwg-config.js +15 -2
  15. package/dist/src/decision/acceptance.js +25 -0
  16. package/dist/src/decision/adapters/jev.js +24 -2
  17. package/dist/src/decision/calibration/registry.js +9 -0
  18. package/dist/src/decision/compose.js +74 -15
  19. package/dist/src/decision/context-live-promotion.js +344 -0
  20. package/dist/src/decision/context-live-qualification.js +591 -0
  21. package/dist/src/decision/context-pruning.js +847 -0
  22. package/dist/src/decision/driver.js +430 -0
  23. package/dist/src/decision/egress-live-qualification.js +874 -0
  24. package/dist/src/decision/ensemble/contract.js +64 -1
  25. package/dist/src/decision/ensemble/index.js +1 -0
  26. package/dist/src/decision/ensemble/report.js +8 -42
  27. package/dist/src/decision/ensemble/runtime.js +571 -0
  28. package/dist/src/decision/ensemble-study/artifacts.js +85 -0
  29. package/dist/src/decision/ensemble-study/calibration.js +443 -0
  30. package/dist/src/decision/ensemble-study/corpus.js +229 -0
  31. package/dist/src/decision/ensemble-study/multifact-artifacts.js +23 -0
  32. package/dist/src/decision/ensemble-study/multifact-study.js +596 -0
  33. package/dist/src/decision/ensemble-study/multifact.js +241 -0
  34. package/dist/src/decision/ensemble-study/protocol.js +77 -0
  35. package/dist/src/decision/ensemble-study/score.js +462 -0
  36. package/dist/src/decision/ensemble-study/staged.js +87 -0
  37. package/dist/src/decision/ensemble-study/statistics.js +84 -0
  38. package/dist/src/decision/evaluate.js +227 -14
  39. package/dist/src/decision/export.js +4 -0
  40. package/dist/src/decision/feature-export.js +1074 -0
  41. package/dist/src/decision/graph-index.js +16 -0
  42. package/dist/src/decision/graph-live-qualification.js +1041 -0
  43. package/dist/src/decision/graph-live-workload.js +245 -0
  44. package/dist/src/decision/graph-skill-bridge.js +21 -3
  45. package/dist/src/decision/heldout/calibration.js +140 -0
  46. package/dist/src/decision/heldout/collector.js +430 -0
  47. package/dist/src/decision/heldout/contract.js +309 -0
  48. package/dist/src/decision/heldout/d29-generator-ids.js +12 -0
  49. package/dist/src/decision/heldout/d29-passage-baseline-v2.js +93 -0
  50. package/dist/src/decision/heldout/d29-passage-baseline-v3.js +100 -0
  51. package/dist/src/decision/heldout/d29-passage-baseline.js +66 -0
  52. package/dist/src/decision/heldout/d29-pools-v8.js +575 -0
  53. package/dist/src/decision/heldout/d29-pools.js +288 -0
  54. package/dist/src/decision/heldout/d29-v6.js +169 -0
  55. package/dist/src/decision/heldout/d29-v7.js +202 -0
  56. package/dist/src/decision/heldout/d29-v8.js +586 -0
  57. package/dist/src/decision/heldout/generator-registry.js +67 -0
  58. package/dist/src/decision/heldout/generators.js +696 -0
  59. package/dist/src/decision/heldout/index.js +8 -0
  60. package/dist/src/decision/heldout/journal.js +346 -0
  61. package/dist/src/decision/heldout/study-generators.js +64 -0
  62. package/dist/src/decision/heldout/types.js +2 -0
  63. package/dist/src/decision/host-policy.js +61 -0
  64. package/dist/src/decision/index.js +11 -0
  65. package/dist/src/decision/interop-profile.v1.json +112 -0
  66. package/dist/src/decision/interop.js +653 -0
  67. package/dist/src/decision/issue-triage/index.js +3 -0
  68. package/dist/src/decision/issue-triage/runtime.js +1069 -0
  69. package/dist/src/decision/issue-triage/types.js +2 -0
  70. package/dist/src/decision/patterns/catalog.js +28 -8
  71. package/dist/src/decision/patterns/playground.js +28 -11
  72. package/dist/src/decision/patterns/specs.js +19 -10
  73. package/dist/src/decision/preprocessed-evidence.js +724 -0
  74. package/dist/src/decision/qualification/capture.js +8 -2
  75. package/dist/src/decision/qualification/gate-evidence.js +19 -4
  76. package/dist/src/decision/qualification/load.js +8 -1
  77. package/dist/src/decision/qualification/quality.js +57 -49
  78. package/dist/src/decision/qualification/release.js +76 -3
  79. package/dist/src/decision/qualification/runner.js +5 -2
  80. package/dist/src/decision/routing/contract.js +175 -0
  81. package/dist/src/decision/routing/index.js +5 -0
  82. package/dist/src/decision/routing/report.js +216 -0
  83. package/dist/src/decision/routing/runtime.js +685 -0
  84. package/dist/src/decision/routing/types.js +2 -0
  85. package/dist/src/decision/sdlc-screening.js +1157 -0
  86. package/dist/src/decision/sensitivity/comparative.js +154 -0
  87. package/dist/src/decision/sensitivity/contract.js +218 -0
  88. package/dist/src/decision/sensitivity/index.js +5 -0
  89. package/dist/src/decision/sensitivity/runtime.js +912 -0
  90. package/dist/src/decision/sensitivity/types.js +2 -0
  91. package/dist/src/decision/validate.js +26 -0
  92. package/dist/src/extensions/commands/definitions.js +38 -0
  93. package/dist/src/extensions/manifest.js +44 -0
  94. package/dist/src/gates/discovery.js +315 -0
  95. package/dist/src/gates/driver.js +388 -0
  96. package/dist/src/gates/evaluate.js +719 -0
  97. package/dist/src/gates/floors.js +255 -0
  98. package/dist/src/gates/index.js +17 -0
  99. package/dist/src/gates/providers/evidence.js +38 -0
  100. package/dist/src/gates/providers/index.js +21 -0
  101. package/dist/src/gates/providers/isolated-child-source.js +446 -0
  102. package/dist/src/gates/providers/loader.js +1069 -0
  103. package/dist/src/gates/providers/paired.js +52 -0
  104. package/dist/src/gates/providers/proportion.js +60 -0
  105. package/dist/src/gates/providers/registry.js +40 -0
  106. package/dist/src/gates/providers/scalar.js +41 -0
  107. package/dist/src/gates/providers/screening.js +53 -0
  108. package/dist/src/gates/providers/types.js +25 -0
  109. package/dist/src/gates/registry.js +1003 -0
  110. package/dist/src/gates/report.js +102 -0
  111. package/dist/src/gates/schema.js +56 -0
  112. package/dist/src/gates/stats/binomial.js +26 -0
  113. package/dist/src/gates/stats/bootstrap.js +62 -0
  114. package/dist/src/gates/stats/clopper-pearson.js +95 -0
  115. package/dist/src/gates/stats/digest.js +26 -0
  116. package/dist/src/gates/stats/error.js +5 -0
  117. package/dist/src/gates/stats/index.js +9 -0
  118. package/dist/src/gates/stats/normal.js +35 -0
  119. package/dist/src/gates/stats/paired.js +120 -0
  120. package/dist/src/gates/stats/splits.js +30 -0
  121. package/dist/src/gates/types.js +8 -0
  122. package/dist/src/governance/redaction.js +14 -4
  123. package/dist/src/mcp/muse-native-config.mjs +123 -0
  124. package/dist/src/mcp/tools/decision.mjs +188 -0
  125. package/dist/src/mcp/tools/subsystems.mjs +2 -0
  126. package/dist/src/providers/capability-matrix.yaml +2 -1
  127. package/dist/src/providers/provider-definitions.js +2 -1
  128. package/dist/src/sessions/adapters/muse.js +336 -39
  129. package/dist/src/sessions/batch-import.js +7 -0
  130. package/dist/src/sessions/workspace-discovery.js +13 -2
  131. package/package.json +1 -1
  132. package/schemas/decision/ConformalFrozenOpenData.v2.schema.json +371 -0
  133. package/schemas/decision/ConformalOpenDataReport.v2.schema.json +421 -0
  134. package/schemas/decision/ConformalPreregistration.v2.schema.json +529 -0
  135. package/schemas/decision/ContextPruningCandidate.v1.schema.json +47 -0
  136. package/schemas/decision/ContextPruningEvaluationReport.v1.schema.json +758 -0
  137. package/schemas/decision/ContextPruningPreregistration.v1.schema.json +175 -0
  138. package/schemas/decision/ContextPruningReceipt.v1.schema.json +72 -0
  139. package/schemas/decision/D17Multifact.v1.schema.json +1851 -0
  140. package/schemas/decision/D17StudyAnalysis.v1.schema.json +42 -0
  141. package/schemas/decision/D17StudyAnalysis.v2.schema.json +51 -0
  142. package/schemas/decision/D17StudyCalibration.v1.schema.json +819 -0
  143. package/schemas/decision/D17StudyDryRun.v1.schema.json +169 -0
  144. package/schemas/decision/D17StudyDryRun.v2.schema.json +239 -0
  145. package/schemas/decision/D17StudyGold.v1.schema.json +108 -0
  146. package/schemas/decision/D17StudyGuide.v1.schema.json +63 -0
  147. package/schemas/decision/D17StudyNativeTemplates.v1.schema.json +619 -0
  148. package/schemas/decision/D17StudyProtocol.v1.schema.json +241 -0
  149. package/schemas/decision/D17StudyReport.v1.schema.json +902 -0
  150. package/schemas/decision/D17StudyReport.v2.schema.json +1319 -0
  151. package/schemas/decision/D17StudyReview.v1.schema.json +175 -0
  152. package/schemas/decision/D17StudySplits.v1.schema.json +217 -0
  153. package/schemas/decision/D29Study.v1.schema.json +1903 -0
  154. package/schemas/decision/D29Study.v2.schema.json +1344 -0
  155. package/schemas/decision/D29Study.v3.schema.json +609 -0
  156. package/schemas/decision/D29Study.v4.schema.json +1133 -0
  157. package/schemas/decision/D29Study.v6.schema.json +1205 -0
  158. package/schemas/decision/D29Study.v7.schema.json +1471 -0
  159. package/schemas/decision/D29Study.v8.schema.json +671 -0
  160. package/schemas/decision/D29Study.v9.schema.json +778 -0
  161. package/schemas/decision/DecisionComparativeReplayAuditSample.v1.schema.json +137 -0
  162. package/schemas/decision/DecisionComparativeReplayCorpus.v1.schema.json +258 -0
  163. package/schemas/decision/DecisionComparativeReplayFreeze.v1.schema.json +74 -0
  164. package/schemas/decision/DecisionComparativeReplayGold.v1.schema.json +50 -0
  165. package/schemas/decision/DecisionComparativeReplayGoldAsset.v1.schema.json +37 -0
  166. package/schemas/decision/DecisionComparativeReplayIntegrity.v1.schema.json +81 -0
  167. package/schemas/decision/DecisionComparativeReplayMembers.v1.schema.json +52 -0
  168. package/schemas/decision/DecisionComparativeReplayPreregistration.v1.schema.json +113 -0
  169. package/schemas/decision/DecisionComparativeReplayReport.v1.schema.json +407 -0
  170. package/schemas/decision/DecisionComparativeReplayReviewPackets.v1.schema.json +260 -0
  171. package/schemas/decision/DecisionComparativeReplaySplit.v1.schema.json +84 -0
  172. package/schemas/decision/DecisionFeatureObservation.v1.schema.json +564 -0
  173. package/schemas/decision/DecisionFeatureSet.v1.schema.json +155 -0
  174. package/schemas/decision/DecisionInteropMapping.v1.schema.json +85 -0
  175. package/schemas/decision/DecisionIssueTriageEvaluationManifest.v1.schema.json +174 -0
  176. package/schemas/decision/DecisionIssueTriageEvaluationReport.v1.schema.json +280 -0
  177. package/schemas/decision/DecisionIssueTriagePilotPack.v1.schema.json +114 -0
  178. package/schemas/decision/DecisionRouteReceipt.v1.schema.json +155 -0
  179. package/schemas/decision/DecisionRoutingPolicy.v1.schema.json +132 -0
  180. package/schemas/decision/DecisionRoutingShadowReport.v1.schema.json +170 -0
  181. package/schemas/decision/DecisionRoutingTask.v1.schema.json +49 -0
  182. package/schemas/decision/DecisionRuleset.schema.json +8 -2
  183. package/schemas/decision/DecisionRuleset.v1alpha2.schema.json +8 -2
  184. package/schemas/decision/DecisionSensitivityPlan.v1.schema.json +191 -0
  185. package/schemas/decision/DecisionSensitivityReport.v1.schema.json +163 -0
  186. package/schemas/decision/HeldoutApproval.v1.schema.json +312 -0
  187. package/schemas/decision/HeldoutAttempt.v1.schema.json +211 -0
  188. package/schemas/decision/HeldoutBaseline.v1.schema.json +90 -0
  189. package/schemas/decision/HeldoutCalibrationPhase.v1.schema.json +87 -0
  190. package/schemas/decision/HeldoutCorpus.v1.schema.json +167 -0
  191. package/schemas/decision/HeldoutEvent.v1.schema.json +41 -0
  192. package/schemas/decision/HeldoutFrozen.v1.schema.json +142 -0
  193. package/schemas/decision/HeldoutPreregistration.v1.schema.json +222 -0
  194. package/schemas/decision/HeldoutSpendEvent.v1.schema.json +122 -0
  195. package/schemas/decision/HeldoutSpendHead.v1.schema.json +25 -0
  196. package/schemas/decision/HeldoutSpendHead.v2.schema.json +46 -0
  197. package/schemas/decision/HeldoutSummary.v1.schema.json +101 -0
  198. package/schemas/decision/OpaDecisionLogExport.v1.schema.json +65 -0
  199. package/schemas/decision/PreprocessedEvidence.v1.schema.json +306 -0
  200. package/schemas/decision/RulesetResult.v1alpha2.schema.json +175 -0
  201. package/schemas/decision/SdlcEvidenceScreening.v1.schema.json +499 -0
  202. package/schemas/decision/SdlcScreeningPreregistration.v1.schema.json +132 -0
  203. package/schemas/decision/SdlcScreeningPreregistration.v2.schema.json +138 -0
  204. package/schemas/decision/SdlcScreeningRelease.v1.schema.json +654 -0
  205. package/schemas/decision/SdlcScreeningRelease.v2.schema.json +654 -0
  206. package/tools/agents/deploy-agents.mjs +1 -1
  207. package/tools/agents/providers/base.mjs +26 -7
  208. package/tools/agents/providers/factory.mjs +10 -2
  209. package/tools/agents/providers/muse-hooks.mjs +1 -29
  210. package/tools/agents/providers/muse.mjs +6 -3
@@ -0,0 +1,529 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/ConformalPreregistration.v2.schema.json",
4
+ "title": "Conformal open-data preregistration v2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "issue",
10
+ "mode",
11
+ "status",
12
+ "methods",
13
+ "alpha",
14
+ "tasks",
15
+ "pins",
16
+ "splits",
17
+ "liveDesign",
18
+ "coverageTarget",
19
+ "usefulnessGates",
20
+ "sampleSizeRationale",
21
+ "baselines",
22
+ "metrics",
23
+ "compatibilityKey",
24
+ "resourceBudget",
25
+ "liveCollection",
26
+ "outcomeRule",
27
+ "nonGoals",
28
+ "sources"
29
+ ],
30
+ "properties": {
31
+ "schemaVersion": {
32
+ "const": "conformal-preregistration/v2"
33
+ },
34
+ "issue": {
35
+ "const": 2613
36
+ },
37
+ "mode": {
38
+ "type": "string",
39
+ "minLength": 1
40
+ },
41
+ "status": {
42
+ "const": "experimental-default-off"
43
+ },
44
+ "methods": {
45
+ "type": "array",
46
+ "minItems": 1,
47
+ "items": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": [
51
+ "id",
52
+ "source",
53
+ "nonconformity",
54
+ "quantile",
55
+ "tiePolicy"
56
+ ],
57
+ "properties": {
58
+ "id": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "source": {
63
+ "type": "string",
64
+ "minLength": 1
65
+ },
66
+ "nonconformity": {
67
+ "type": "string",
68
+ "minLength": 1
69
+ },
70
+ "quantile": {
71
+ "type": "string",
72
+ "minLength": 1
73
+ },
74
+ "tiePolicy": {
75
+ "type": "string",
76
+ "minLength": 1
77
+ }
78
+ }
79
+ }
80
+ },
81
+ "alpha": {
82
+ "type": "number",
83
+ "exclusiveMinimum": 0,
84
+ "exclusiveMaximum": 1
85
+ },
86
+ "tasks": {
87
+ "type": "array",
88
+ "minItems": 1,
89
+ "items": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "required": [
93
+ "id",
94
+ "primitive",
95
+ "dataset",
96
+ "datasetUrl",
97
+ "license",
98
+ "definition",
99
+ "shift"
100
+ ],
101
+ "properties": {
102
+ "id": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ },
106
+ "primitive": {
107
+ "const": "choice"
108
+ },
109
+ "dataset": {
110
+ "type": "string",
111
+ "minLength": 1
112
+ },
113
+ "datasetUrl": {
114
+ "type": "string",
115
+ "format": "uri"
116
+ },
117
+ "license": {
118
+ "enum": [
119
+ "CC-BY-3.0",
120
+ "CC-BY-4.0"
121
+ ]
122
+ },
123
+ "definition": {
124
+ "type": "string",
125
+ "minLength": 1
126
+ },
127
+ "shift": {
128
+ "type": "string",
129
+ "minLength": 1
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "pins": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": [
138
+ "offlineServedModel",
139
+ "liveServedModel",
140
+ "liveAdapter",
141
+ "liveAdapterVersion",
142
+ "definition",
143
+ "seed",
144
+ "collectorCodeDigest",
145
+ "livePromptDigest"
146
+ ],
147
+ "properties": {
148
+ "offlineServedModel": {
149
+ "type": "string",
150
+ "minLength": 1
151
+ },
152
+ "liveServedModel": {
153
+ "type": "string",
154
+ "minLength": 1
155
+ },
156
+ "liveAdapter": {
157
+ "type": "string",
158
+ "minLength": 1
159
+ },
160
+ "liveAdapterVersion": {
161
+ "type": "string",
162
+ "minLength": 1
163
+ },
164
+ "definition": {
165
+ "type": "string",
166
+ "minLength": 1
167
+ },
168
+ "seed": {
169
+ "type": "string",
170
+ "minLength": 1
171
+ },
172
+ "collectorCodeDigest": {
173
+ "type": "string",
174
+ "pattern": "^sha256:[a-f0-9]{64}$"
175
+ },
176
+ "livePromptDigest": {
177
+ "type": "string",
178
+ "pattern": "^sha256:[a-f0-9]{64}$"
179
+ }
180
+ }
181
+ },
182
+ "splits": {
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": [
186
+ "train",
187
+ "calibration",
188
+ "finalTest",
189
+ "shift"
190
+ ],
191
+ "properties": {
192
+ "train": {
193
+ "type": "string",
194
+ "minLength": 1
195
+ },
196
+ "calibration": {
197
+ "type": "string",
198
+ "minLength": 1
199
+ },
200
+ "finalTest": {
201
+ "type": "string",
202
+ "minLength": 1
203
+ },
204
+ "shift": {
205
+ "type": "string",
206
+ "minLength": 1
207
+ }
208
+ }
209
+ },
210
+ "liveDesign": {
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": [
214
+ "tasks",
215
+ "calibration",
216
+ "finalTest",
217
+ "shift",
218
+ "selection",
219
+ "rationale",
220
+ "gateTable"
221
+ ],
222
+ "properties": {
223
+ "tasks": {
224
+ "type": "array",
225
+ "minItems": 1,
226
+ "uniqueItems": true,
227
+ "items": {
228
+ "type": "string",
229
+ "minLength": 1
230
+ }
231
+ },
232
+ "calibration": {
233
+ "type": "integer",
234
+ "minimum": 1
235
+ },
236
+ "finalTest": {
237
+ "type": "integer",
238
+ "minimum": 1
239
+ },
240
+ "shift": {
241
+ "type": "integer",
242
+ "minimum": 1
243
+ },
244
+ "selection": {
245
+ "type": "string",
246
+ "minLength": 1
247
+ },
248
+ "rationale": {
249
+ "type": "string",
250
+ "minLength": 1
251
+ },
252
+ "gateTable": {
253
+ "type": "array",
254
+ "minItems": 1,
255
+ "items": {
256
+ "type": "object",
257
+ "additionalProperties": false,
258
+ "required": [
259
+ "task",
260
+ "split",
261
+ "scoredN",
262
+ "minCovered",
263
+ "passProbabilityAtTrueCoverage090",
264
+ "passProbabilityAtTrueCoverage085"
265
+ ],
266
+ "properties": {
267
+ "task": {
268
+ "type": "string",
269
+ "minLength": 1
270
+ },
271
+ "split": {
272
+ "enum": [
273
+ "finalTest",
274
+ "shift"
275
+ ]
276
+ },
277
+ "scoredN": {
278
+ "type": "integer",
279
+ "minimum": 1
280
+ },
281
+ "minCovered": {
282
+ "type": "integer",
283
+ "minimum": 0
284
+ },
285
+ "passProbabilityAtTrueCoverage090": {
286
+ "type": "number",
287
+ "minimum": 0,
288
+ "maximum": 1
289
+ },
290
+ "passProbabilityAtTrueCoverage085": {
291
+ "type": "number",
292
+ "minimum": 0,
293
+ "maximum": 1
294
+ }
295
+ }
296
+ }
297
+ }
298
+ }
299
+ },
300
+ "coverageTarget": {
301
+ "type": "number",
302
+ "exclusiveMinimum": 0,
303
+ "exclusiveMaximum": 1
304
+ },
305
+ "usefulnessGates": {
306
+ "type": "object",
307
+ "additionalProperties": false,
308
+ "required": [
309
+ "minimumFinalRowsPerTask",
310
+ "minimumSliceRows",
311
+ "minimumCoverageWilsonLower",
312
+ "maximumMeanSetSizeFractionOfLabels",
313
+ "maximumReviewRate",
314
+ "maximumSelectiveRisk",
315
+ "mustNotUpgradeIntegrityHoldOrRollback"
316
+ ],
317
+ "properties": {
318
+ "minimumFinalRowsPerTask": {
319
+ "type": "integer",
320
+ "minimum": 1
321
+ },
322
+ "minimumSliceRows": {
323
+ "type": "integer",
324
+ "minimum": 1
325
+ },
326
+ "minimumCoverageWilsonLower": {
327
+ "type": "number",
328
+ "minimum": 0,
329
+ "maximum": 1
330
+ },
331
+ "maximumMeanSetSizeFractionOfLabels": {
332
+ "type": "number",
333
+ "exclusiveMinimum": 0,
334
+ "maximum": 1
335
+ },
336
+ "maximumReviewRate": {
337
+ "type": "number",
338
+ "minimum": 0,
339
+ "maximum": 1
340
+ },
341
+ "maximumSelectiveRisk": {
342
+ "type": "number",
343
+ "minimum": 0,
344
+ "maximum": 1
345
+ },
346
+ "mustNotUpgradeIntegrityHoldOrRollback": {
347
+ "const": true
348
+ }
349
+ }
350
+ },
351
+ "sampleSizeRationale": {
352
+ "type": "string",
353
+ "minLength": 1
354
+ },
355
+ "baselines": {
356
+ "type": "array",
357
+ "minItems": 1,
358
+ "items": {
359
+ "type": "string",
360
+ "minLength": 1
361
+ }
362
+ },
363
+ "metrics": {
364
+ "type": "array",
365
+ "minItems": 1,
366
+ "items": {
367
+ "type": "string",
368
+ "minLength": 1
369
+ }
370
+ },
371
+ "compatibilityKey": {
372
+ "type": "array",
373
+ "minItems": 1,
374
+ "items": {
375
+ "type": "string",
376
+ "minLength": 1
377
+ }
378
+ },
379
+ "resourceBudget": {
380
+ "type": "object",
381
+ "additionalProperties": false,
382
+ "required": [
383
+ "offlineProviderCalls",
384
+ "offlineTokens",
385
+ "offlineUsd",
386
+ "liveHardCeilingUsd",
387
+ "inputUsdPerMillionTokensCeiling",
388
+ "outputUsdPerMillionTokensCeiling",
389
+ "measuredMaxRequestBodyBytes",
390
+ "serverOverheadTokensAllowance",
391
+ "maxInputTokensPerCall",
392
+ "maxOutputTokensPerCall",
393
+ "maxRetriesPerItem",
394
+ "maxAttemptsPerItemTotal",
395
+ "maxConsecutiveErrors",
396
+ "maxTerminalFailureFraction",
397
+ "liveMaxItems",
398
+ "liveSubsetItems",
399
+ "sampleMaxItems"
400
+ ],
401
+ "properties": {
402
+ "offlineProviderCalls": {
403
+ "const": 0
404
+ },
405
+ "offlineTokens": {
406
+ "const": 0
407
+ },
408
+ "offlineUsd": {
409
+ "const": 0
410
+ },
411
+ "liveHardCeilingUsd": {
412
+ "type": "number",
413
+ "exclusiveMinimum": 0,
414
+ "maximum": 8
415
+ },
416
+ "inputUsdPerMillionTokensCeiling": {
417
+ "type": "number",
418
+ "exclusiveMinimum": 0
419
+ },
420
+ "outputUsdPerMillionTokensCeiling": {
421
+ "type": "number",
422
+ "exclusiveMinimum": 0
423
+ },
424
+ "measuredMaxRequestBodyBytes": {
425
+ "type": "integer",
426
+ "minimum": 1
427
+ },
428
+ "serverOverheadTokensAllowance": {
429
+ "type": "integer",
430
+ "minimum": 0
431
+ },
432
+ "maxInputTokensPerCall": {
433
+ "type": "integer",
434
+ "minimum": 1
435
+ },
436
+ "maxOutputTokensPerCall": {
437
+ "type": "integer",
438
+ "minimum": 1
439
+ },
440
+ "maxRetriesPerItem": {
441
+ "type": "integer",
442
+ "minimum": 0,
443
+ "maximum": 3
444
+ },
445
+ "maxAttemptsPerItemTotal": {
446
+ "type": "integer",
447
+ "minimum": 1,
448
+ "maximum": 5
449
+ },
450
+ "maxConsecutiveErrors": {
451
+ "type": "integer",
452
+ "minimum": 1,
453
+ "maximum": 10
454
+ },
455
+ "maxTerminalFailureFraction": {
456
+ "type": "number",
457
+ "minimum": 0,
458
+ "maximum": 0.2
459
+ },
460
+ "liveMaxItems": {
461
+ "type": "integer",
462
+ "minimum": 1,
463
+ "maximum": 2000
464
+ },
465
+ "liveSubsetItems": {
466
+ "type": "integer",
467
+ "minimum": 1,
468
+ "maximum": 2000
469
+ },
470
+ "sampleMaxItems": {
471
+ "type": "integer",
472
+ "minimum": 1
473
+ }
474
+ }
475
+ },
476
+ "liveCollection": {
477
+ "type": "object",
478
+ "additionalProperties": false,
479
+ "required": [
480
+ "enabledByDefault",
481
+ "requiredEnv",
482
+ "credentialEnv",
483
+ "dryRunDefault",
484
+ "networkRule",
485
+ "amendment"
486
+ ],
487
+ "properties": {
488
+ "enabledByDefault": {
489
+ "const": false
490
+ },
491
+ "requiredEnv": {
492
+ "const": "AIWG_DECISION_JEV_LIVE_SMOKE=1"
493
+ },
494
+ "credentialEnv": {
495
+ "const": "AIWG_DECISION_JEV_API_KEY"
496
+ },
497
+ "dryRunDefault": {
498
+ "const": true
499
+ },
500
+ "networkRule": {
501
+ "type": "string",
502
+ "minLength": 1
503
+ },
504
+ "amendment": {
505
+ "type": "string",
506
+ "minLength": 1
507
+ }
508
+ }
509
+ },
510
+ "outcomeRule": {
511
+ "type": "string",
512
+ "minLength": 1
513
+ },
514
+ "nonGoals": {
515
+ "type": "array",
516
+ "items": {
517
+ "type": "string",
518
+ "minLength": 1
519
+ }
520
+ },
521
+ "sources": {
522
+ "type": "array",
523
+ "items": {
524
+ "type": "string",
525
+ "format": "uri"
526
+ }
527
+ }
528
+ }
529
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aiwg.io/schemas/decision/ContextPruningCandidate.v1.schema.json",
4
+ "title": "Context Pruning Candidate",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "itemId", "locator", "contentDigest", "source", "tokenEstimate", "priority", "trust", "sensitivity", "dependencies", "protectedHints", "taskSubject", "dataPolicy"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "decision-context-candidate/v1" },
10
+ "itemId": { "type": "string", "minLength": 1 },
11
+ "locator": { "type": "string", "minLength": 1 },
12
+ "contentDigest": { "$ref": "#/$defs/digest" },
13
+ "content": { "type": "string" },
14
+ "source": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["kind", "addedAt"],
18
+ "properties": {
19
+ "kind": { "enum": ["system", "developer", "project", "security-policy", "user", "approval", "blocker", "provenance", "citation", "artifact", "test-evidence", "open-decision", "retrieved", "memory", "tool-output", "ordinary"] },
20
+ "addedAt": { "type": "string", "format": "date-time" }
21
+ }
22
+ },
23
+ "tokenEstimate": { "type": "integer", "minimum": 0 },
24
+ "priority": { "type": "number", "minimum": 0, "maximum": 1 },
25
+ "trust": { "enum": ["verified", "untrusted"] },
26
+ "sensitivity": { "enum": ["public", "internal", "confidential", "restricted"] },
27
+ "dependencies": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
28
+ "protectedHints": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/protectedReason" } },
29
+ "taskSubject": { "type": "string", "minLength": 1 },
30
+ "dataPolicy": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": ["externalEvaluation", "localOnly", "legalAction"],
34
+ "properties": {
35
+ "externalEvaluation": { "enum": ["allowed", "denied"] },
36
+ "localOnly": { "type": "boolean" },
37
+ "legalAction": { "enum": ["none", "requires-review"] }
38
+ }
39
+ }
40
+ },
41
+ "$defs": {
42
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
43
+ "protectedReason": {
44
+ "enum": ["system-rule", "developer-rule", "project-rule", "security-policy", "current-user-requirement", "explicit-mention", "unresolved-blocker", "action-approval", "artifact-pin", "version-pin", "digest-pin", "provenance-required", "citation-required", "test-gate-evidence", "open-decision-evidence", "protected-dependency", "external-evaluation-denied", "local-only", "restricted-data", "legal-policy"]
45
+ }
46
+ }
47
+ }