cohorte 2.10.1 → 3.0.0-dev.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 (211) hide show
  1. package/README.md +7 -0
  2. package/assets/manifest.json +193 -0
  3. package/assets/migrations/config/README.md +12 -0
  4. package/assets/migrations/state/0001_init.sql +154 -0
  5. package/assets/prompts/README.md +11 -0
  6. package/assets/prompts/agents/fixer.md +7 -0
  7. package/assets/prompts/agents/implementer.md +12 -0
  8. package/assets/prompts/agents/reviewer.md +8 -0
  9. package/assets/prompts/agents/security-reviewer.md +7 -0
  10. package/assets/prompts/phases/build.md +5 -0
  11. package/assets/prompts/phases/review.md +5 -0
  12. package/assets/prompts/phases/test.md +5 -0
  13. package/assets/prompts/system.md +11 -0
  14. package/assets/schemas/agent-output.schema.json +225 -0
  15. package/assets/schemas/auth-status.schema.json +87 -0
  16. package/assets/schemas/command-result.schema.json +192 -0
  17. package/assets/schemas/commands.schema.json +952 -0
  18. package/assets/schemas/config.schema.json +2259 -0
  19. package/assets/schemas/doctor-report.schema.json +104 -0
  20. package/assets/schemas/events.schema.json +8514 -0
  21. package/assets/schemas/fake-script.schema.json +549 -0
  22. package/assets/schemas/inspect.schema.json +3133 -0
  23. package/assets/schemas/manifest.schema.json +79 -0
  24. package/assets/schemas/ownership.schema.json +52 -0
  25. package/assets/schemas/policy-verdict.schema.json +282 -0
  26. package/assets/schemas/project-model.schema.json +783 -0
  27. package/assets/schemas/project-status.schema.json +217 -0
  28. package/assets/schemas/reconcile-plan.schema.json +155 -0
  29. package/assets/schemas/run-diff.schema.json +177 -0
  30. package/assets/schemas/run-snapshot-manifest.schema.json +2104 -0
  31. package/assets/schemas/run-state.schema.json +1755 -0
  32. package/assets/schemas/runtime-capabilities.schema.json +1545 -0
  33. package/assets/schemas/sandbox-capabilities.schema.json +116 -0
  34. package/assets/schemas/skill.schema.json +87 -0
  35. package/assets/schemas/spec.schema.json +202 -0
  36. package/assets/schemas/tool-catalogue.schema.json +655 -0
  37. package/assets/schemas/trust-record.schema.json +38 -0
  38. package/assets/skills/README.md +9 -0
  39. package/assets/skills/inspect-surface.md +4 -0
  40. package/dist/agent-host.mjs +50 -0
  41. package/dist/agent-host.mjs.map +1 -0
  42. package/dist/bundle-manifest.json +102 -0
  43. package/dist/chunks/__host-DgGPyco9.mjs +18 -0
  44. package/dist/chunks/__host-DgGPyco9.mjs.map +1 -0
  45. package/dist/chunks/approve-Cv135UqI.mjs +19 -0
  46. package/dist/chunks/approve-Cv135UqI.mjs.map +1 -0
  47. package/dist/chunks/auth-BT5oVp76.mjs +132 -0
  48. package/dist/chunks/auth-BT5oVp76.mjs.map +1 -0
  49. package/dist/chunks/auth-D8rCVY33.mjs +84 -0
  50. package/dist/chunks/auth-D8rCVY33.mjs.map +1 -0
  51. package/dist/chunks/brainstorm-CU10T1tm.mjs +7 -0
  52. package/dist/chunks/brainstorm-CU10T1tm.mjs.map +1 -0
  53. package/dist/chunks/cancel-KV_cpsqS.mjs +15 -0
  54. package/dist/chunks/cancel-KV_cpsqS.mjs.map +1 -0
  55. package/dist/chunks/canonical-C8UxeEmB.mjs +57 -0
  56. package/dist/chunks/canonical-C8UxeEmB.mjs.map +1 -0
  57. package/dist/chunks/catalogue-BvwSrM_j.mjs +1549 -0
  58. package/dist/chunks/catalogue-BvwSrM_j.mjs.map +1 -0
  59. package/dist/chunks/compose-Cr0hP0qm.mjs +7303 -0
  60. package/dist/chunks/compose-Cr0hP0qm.mjs.map +1 -0
  61. package/dist/chunks/config-DefHA2Lw.mjs +96 -0
  62. package/dist/chunks/config-DefHA2Lw.mjs.map +1 -0
  63. package/dist/chunks/contract-B0ra2-bm.mjs +295 -0
  64. package/dist/chunks/contract-B0ra2-bm.mjs.map +1 -0
  65. package/dist/chunks/contract-vYbwYr0Y.mjs +123 -0
  66. package/dist/chunks/contract-vYbwYr0Y.mjs.map +1 -0
  67. package/dist/chunks/deny-ClTxSvHJ.mjs +15 -0
  68. package/dist/chunks/deny-ClTxSvHJ.mjs.map +1 -0
  69. package/dist/chunks/diff-Qw0II0sj.mjs +101 -0
  70. package/dist/chunks/diff-Qw0II0sj.mjs.map +1 -0
  71. package/dist/chunks/discover-30Ciya_0.mjs +20 -0
  72. package/dist/chunks/discover-30Ciya_0.mjs.map +1 -0
  73. package/dist/chunks/doctor-DfCrKpfT.mjs +222 -0
  74. package/dist/chunks/doctor-DfCrKpfT.mjs.map +1 -0
  75. package/dist/chunks/fix-D4Tj8RVA.mjs +18 -0
  76. package/dist/chunks/fix-D4Tj8RVA.mjs.map +1 -0
  77. package/dist/chunks/gc-BBXlBF5w.mjs +161 -0
  78. package/dist/chunks/gc-BBXlBF5w.mjs.map +1 -0
  79. package/dist/chunks/init-Okz4mlhW.mjs +30 -0
  80. package/dist/chunks/init-Okz4mlhW.mjs.map +1 -0
  81. package/dist/chunks/inspect-Buby4cQD.mjs +22 -0
  82. package/dist/chunks/inspect-Buby4cQD.mjs.map +1 -0
  83. package/dist/chunks/logs-Giq5sUau.mjs +25 -0
  84. package/dist/chunks/logs-Giq5sUau.mjs.map +1 -0
  85. package/dist/chunks/migrate-DRoFUg53.mjs +19 -0
  86. package/dist/chunks/migrate-DRoFUg53.mjs.map +1 -0
  87. package/dist/chunks/models-Btp6X2YZ.mjs +24 -0
  88. package/dist/chunks/models-Btp6X2YZ.mjs.map +1 -0
  89. package/dist/chunks/pause-BASBfKLO.mjs +16 -0
  90. package/dist/chunks/pause-BASBfKLO.mjs.map +1 -0
  91. package/dist/chunks/policy-DUIgzF3W.mjs +139 -0
  92. package/dist/chunks/policy-DUIgzF3W.mjs.map +1 -0
  93. package/dist/chunks/providers-Dx78imKj.mjs +19 -0
  94. package/dist/chunks/providers-Dx78imKj.mjs.map +1 -0
  95. package/dist/chunks/reconcile-BfD785gd.mjs +26 -0
  96. package/dist/chunks/reconcile-BfD785gd.mjs.map +1 -0
  97. package/dist/chunks/render-DyZr5Lgi.mjs +53 -0
  98. package/dist/chunks/render-DyZr5Lgi.mjs.map +1 -0
  99. package/dist/chunks/resume-GJQRb2Eb.mjs +15 -0
  100. package/dist/chunks/resume-GJQRb2Eb.mjs.map +1 -0
  101. package/dist/chunks/retry-CLrUem1H.mjs +15 -0
  102. package/dist/chunks/retry-CLrUem1H.mjs.map +1 -0
  103. package/dist/chunks/review-BDdjb6kB.mjs +17 -0
  104. package/dist/chunks/review-BDdjb6kB.mjs.map +1 -0
  105. package/dist/chunks/run-CgTWYlcd.mjs +82 -0
  106. package/dist/chunks/run-CgTWYlcd.mjs.map +1 -0
  107. package/dist/chunks/run-tool-C3rAv4XF.mjs +26 -0
  108. package/dist/chunks/run-tool-C3rAv4XF.mjs.map +1 -0
  109. package/dist/chunks/schema-C9QbUW4H.mjs +578 -0
  110. package/dist/chunks/schema-C9QbUW4H.mjs.map +1 -0
  111. package/dist/chunks/send-BdnJ85Nz.mjs +19 -0
  112. package/dist/chunks/send-BdnJ85Nz.mjs.map +1 -0
  113. package/dist/chunks/ship-DTuLGoaJ.mjs +19 -0
  114. package/dist/chunks/ship-DTuLGoaJ.mjs.map +1 -0
  115. package/dist/chunks/shutdown-BM92Iyv2.mjs +15 -0
  116. package/dist/chunks/shutdown-BM92Iyv2.mjs.map +1 -0
  117. package/dist/chunks/skip-DZG5kpcH.mjs +18 -0
  118. package/dist/chunks/skip-DZG5kpcH.mjs.map +1 -0
  119. package/dist/chunks/spec-Bq0P3jVh.mjs +20 -0
  120. package/dist/chunks/spec-Bq0P3jVh.mjs.map +1 -0
  121. package/dist/chunks/src-CId6kMsY.mjs +1689 -0
  122. package/dist/chunks/src-CId6kMsY.mjs.map +1 -0
  123. package/dist/chunks/src-CfAOde7C.mjs +5403 -0
  124. package/dist/chunks/src-CfAOde7C.mjs.map +1 -0
  125. package/dist/chunks/src-Cu3TxNob.mjs +783 -0
  126. package/dist/chunks/src-Cu3TxNob.mjs.map +1 -0
  127. package/dist/chunks/src-DcU4IXMe.mjs +117 -0
  128. package/dist/chunks/src-DcU4IXMe.mjs.map +1 -0
  129. package/dist/chunks/src-JxawBQBn.mjs +446 -0
  130. package/dist/chunks/src-JxawBQBn.mjs.map +1 -0
  131. package/dist/chunks/src-s7YRvk0t.mjs +2116 -0
  132. package/dist/chunks/src-s7YRvk0t.mjs.map +1 -0
  133. package/dist/chunks/status-SMjiOMYy.mjs +29 -0
  134. package/dist/chunks/status-SMjiOMYy.mjs.map +1 -0
  135. package/dist/chunks/tail-BuhT-2PH.mjs +25 -0
  136. package/dist/chunks/tail-BuhT-2PH.mjs.map +1 -0
  137. package/dist/chunks/update-BXIppsbi.mjs +16 -0
  138. package/dist/chunks/update-BXIppsbi.mjs.map +1 -0
  139. package/dist/cli.mjs +175 -0
  140. package/dist/cli.mjs.map +1 -0
  141. package/package.json +17 -32
  142. package/CHANGELOG.md +0 -1461
  143. package/bin/cli.js +0 -817
  144. package/bin/report.js +0 -141
  145. package/core/adapter/render.js +0 -415
  146. package/core/agents/implementer.template.md +0 -142
  147. package/core/agents/profile-reader.md +0 -50
  148. package/core/agents/release.md +0 -58
  149. package/core/agents/review.md +0 -179
  150. package/core/commands/cohorte-align-ds.md +0 -33
  151. package/core/commands/cohorte-audit.md +0 -58
  152. package/core/commands/cohorte-brainstorm.md +0 -70
  153. package/core/commands/cohorte-build.md +0 -219
  154. package/core/commands/cohorte-doctor.md +0 -194
  155. package/core/commands/cohorte-fix.md +0 -80
  156. package/core/commands/cohorte-fleet.md +0 -103
  157. package/core/commands/cohorte-init-pipeline.md +0 -31
  158. package/core/commands/cohorte-intake.md +0 -92
  159. package/core/commands/cohorte-patch.md +0 -118
  160. package/core/commands/cohorte-refactor.md +0 -59
  161. package/core/commands/cohorte-retro.md +0 -85
  162. package/core/commands/cohorte-review.md +0 -270
  163. package/core/commands/cohorte-ship.md +0 -122
  164. package/core/commands/cohorte-spec.md +0 -101
  165. package/core/commands/cohorte-update-pipeline.md +0 -165
  166. package/core/hooks/gate.py +0 -588
  167. package/core/runtimes/claude.json +0 -74
  168. package/core/runtimes/codex.json +0 -85
  169. package/core/runtimes/cursor.json +0 -76
  170. package/core/runtimes/gemini.json +0 -76
  171. package/core/runtimes/opencode.json +0 -73
  172. package/core/templates/agent-handoff.md +0 -34
  173. package/core/templates/brainstorm-return.md +0 -36
  174. package/core/templates/decisions.template.md +0 -42
  175. package/core/templates/design-brief.md +0 -44
  176. package/core/templates/patch.template.md +0 -86
  177. package/core/templates/pr-body.md +0 -25
  178. package/core/templates/review-feedback.md +0 -38
  179. package/core/templates/spec.template.md +0 -87
  180. package/core/templates/steps/init-pipeline/01-detect-stack.md +0 -44
  181. package/core/templates/steps/init-pipeline/02-interview-gaps.md +0 -55
  182. package/core/templates/steps/init-pipeline/03-draft-profile.md +0 -10
  183. package/core/templates/steps/init-pipeline/04-write-render.md +0 -145
  184. package/core/templates/steps/init-pipeline/05-report.md +0 -12
  185. package/core/workflows/audit.js +0 -240
  186. package/core/workflows/loop.js +0 -641
  187. package/core/workflows/refactor.js +0 -276
  188. package/core/workflows/review.js +0 -456
  189. package/install.ps1 +0 -103
  190. package/install.sh +0 -114
  191. package/lib/doctor.js +0 -534
  192. package/lib/runtime.js +0 -139
  193. package/lib/versions.js +0 -149
  194. package/lib/yaml.js +0 -129
  195. package/profile/PIPELINE.template.md +0 -259
  196. package/profile/SCHEMA.md +0 -735
  197. package/profile/cohorte.config.template.yaml +0 -43
  198. package/scripts/assert-gate-hook.mjs +0 -75
  199. package/scripts/kanban-move.sh +0 -313
  200. package/scripts/metrics/collect.mjs +0 -531
  201. package/scripts/metrics/prices.json +0 -42
  202. package/scripts/new-feature.sh.template +0 -98
  203. package/scripts/preflight.sh +0 -124
  204. package/scripts/remove-feature.sh.template +0 -56
  205. package/scripts/test-adapter.mjs +0 -437
  206. package/scripts/test-gate.mjs +0 -443
  207. package/scripts/test-kanban.mjs +0 -304
  208. package/scripts/test-lib.mjs +0 -356
  209. package/scripts/test-metrics.mjs +0 -156
  210. package/scripts/test-workflows.mjs +0 -758
  211. package/scripts/validate-core.mjs +0 -325
@@ -0,0 +1,2259 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://cohorte.dev/schemas/3/config.schema.json",
4
+ "title": "Cohorte project configuration (.cohorte/config.yaml)",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "project",
9
+ "runtime",
10
+ "authentication",
11
+ "routing",
12
+ "budgets",
13
+ "loop",
14
+ "checks",
15
+ "provision",
16
+ "policy",
17
+ "host",
18
+ "network",
19
+ "sandbox",
20
+ "git",
21
+ "retention",
22
+ "telemetry"
23
+ ],
24
+ "properties": {
25
+ "schemaVersion": {
26
+ "type": "number",
27
+ "const": 1
28
+ },
29
+ "project": {
30
+ "type": "object",
31
+ "required": [
32
+ "id",
33
+ "defaultBranch",
34
+ "protectedBranches"
35
+ ],
36
+ "properties": {
37
+ "id": {
38
+ "type": "string",
39
+ "pattern": "^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$"
40
+ },
41
+ "defaultBranch": {
42
+ "type": "string",
43
+ "minLength": 1
44
+ },
45
+ "protectedBranches": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "runtime": {
55
+ "type": "object",
56
+ "required": [
57
+ "id"
58
+ ],
59
+ "properties": {
60
+ "id": {
61
+ "type": "string",
62
+ "minLength": 1
63
+ },
64
+ "pi": {
65
+ "type": "object",
66
+ "required": [
67
+ "loadFrom"
68
+ ],
69
+ "properties": {
70
+ "loadFrom": {
71
+ "type": "string",
72
+ "enum": [
73
+ "package",
74
+ "bundle"
75
+ ]
76
+ }
77
+ }
78
+ }
79
+ }
80
+ },
81
+ "authentication": {
82
+ "type": "object",
83
+ "required": [
84
+ "mode",
85
+ "allowApiKeys"
86
+ ],
87
+ "properties": {
88
+ "mode": {
89
+ "anyOf": [
90
+ {
91
+ "type": "string",
92
+ "const": "subscription"
93
+ },
94
+ {
95
+ "type": "string",
96
+ "const": "api"
97
+ }
98
+ ]
99
+ },
100
+ "allowApiKeys": {
101
+ "type": "boolean"
102
+ },
103
+ "anthropicSubscriptionViaPi": {
104
+ "type": "object",
105
+ "required": [
106
+ "enabled",
107
+ "acknowledgePerTokenBilling",
108
+ "acknowledgeProviderTermsRisk"
109
+ ],
110
+ "properties": {
111
+ "enabled": {
112
+ "type": "boolean"
113
+ },
114
+ "acknowledgePerTokenBilling": {
115
+ "type": "boolean"
116
+ },
117
+ "acknowledgeProviderTermsRisk": {
118
+ "type": "boolean"
119
+ }
120
+ }
121
+ }
122
+ }
123
+ },
124
+ "routing": {
125
+ "type": "object",
126
+ "required": [
127
+ "allowedProviders",
128
+ "defaults",
129
+ "tiers",
130
+ "escalation",
131
+ "fallback"
132
+ ],
133
+ "properties": {
134
+ "allowedProviders": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string",
138
+ "minLength": 1
139
+ }
140
+ },
141
+ "defaults": {
142
+ "type": "object",
143
+ "patternProperties": {
144
+ "^.*$": {
145
+ "anyOf": [
146
+ {
147
+ "type": "string",
148
+ "const": "fast"
149
+ },
150
+ {
151
+ "type": "string",
152
+ "const": "coding"
153
+ },
154
+ {
155
+ "type": "string",
156
+ "const": "reasoning"
157
+ },
158
+ {
159
+ "type": "string",
160
+ "const": "vision"
161
+ },
162
+ {
163
+ "type": "string",
164
+ "const": "cheap"
165
+ }
166
+ ]
167
+ }
168
+ }
169
+ },
170
+ "tiers": {
171
+ "type": "object",
172
+ "properties": {
173
+ "fast": {
174
+ "type": "object",
175
+ "required": [
176
+ "ref",
177
+ "thinking"
178
+ ],
179
+ "properties": {
180
+ "ref": {
181
+ "type": "object",
182
+ "required": [
183
+ "provider",
184
+ "model"
185
+ ],
186
+ "properties": {
187
+ "provider": {
188
+ "type": "string"
189
+ },
190
+ "model": {
191
+ "type": "string"
192
+ },
193
+ "capability": {
194
+ "anyOf": [
195
+ {
196
+ "type": "string",
197
+ "const": "fast"
198
+ },
199
+ {
200
+ "type": "string",
201
+ "const": "coding"
202
+ },
203
+ {
204
+ "type": "string",
205
+ "const": "reasoning"
206
+ },
207
+ {
208
+ "type": "string",
209
+ "const": "vision"
210
+ },
211
+ {
212
+ "type": "string",
213
+ "const": "cheap"
214
+ }
215
+ ]
216
+ }
217
+ }
218
+ },
219
+ "thinking": {
220
+ "anyOf": [
221
+ {
222
+ "type": "string",
223
+ "const": "off"
224
+ },
225
+ {
226
+ "type": "string",
227
+ "const": "minimal"
228
+ },
229
+ {
230
+ "type": "string",
231
+ "const": "low"
232
+ },
233
+ {
234
+ "type": "string",
235
+ "const": "medium"
236
+ },
237
+ {
238
+ "type": "string",
239
+ "const": "high"
240
+ },
241
+ {
242
+ "type": "string",
243
+ "const": "xhigh"
244
+ }
245
+ ]
246
+ }
247
+ }
248
+ },
249
+ "coding": {
250
+ "type": "object",
251
+ "required": [
252
+ "ref",
253
+ "thinking"
254
+ ],
255
+ "properties": {
256
+ "ref": {
257
+ "type": "object",
258
+ "required": [
259
+ "provider",
260
+ "model"
261
+ ],
262
+ "properties": {
263
+ "provider": {
264
+ "type": "string"
265
+ },
266
+ "model": {
267
+ "type": "string"
268
+ },
269
+ "capability": {
270
+ "anyOf": [
271
+ {
272
+ "type": "string",
273
+ "const": "fast"
274
+ },
275
+ {
276
+ "type": "string",
277
+ "const": "coding"
278
+ },
279
+ {
280
+ "type": "string",
281
+ "const": "reasoning"
282
+ },
283
+ {
284
+ "type": "string",
285
+ "const": "vision"
286
+ },
287
+ {
288
+ "type": "string",
289
+ "const": "cheap"
290
+ }
291
+ ]
292
+ }
293
+ }
294
+ },
295
+ "thinking": {
296
+ "anyOf": [
297
+ {
298
+ "type": "string",
299
+ "const": "off"
300
+ },
301
+ {
302
+ "type": "string",
303
+ "const": "minimal"
304
+ },
305
+ {
306
+ "type": "string",
307
+ "const": "low"
308
+ },
309
+ {
310
+ "type": "string",
311
+ "const": "medium"
312
+ },
313
+ {
314
+ "type": "string",
315
+ "const": "high"
316
+ },
317
+ {
318
+ "type": "string",
319
+ "const": "xhigh"
320
+ }
321
+ ]
322
+ }
323
+ }
324
+ },
325
+ "reasoning": {
326
+ "type": "object",
327
+ "required": [
328
+ "ref",
329
+ "thinking"
330
+ ],
331
+ "properties": {
332
+ "ref": {
333
+ "type": "object",
334
+ "required": [
335
+ "provider",
336
+ "model"
337
+ ],
338
+ "properties": {
339
+ "provider": {
340
+ "type": "string"
341
+ },
342
+ "model": {
343
+ "type": "string"
344
+ },
345
+ "capability": {
346
+ "anyOf": [
347
+ {
348
+ "type": "string",
349
+ "const": "fast"
350
+ },
351
+ {
352
+ "type": "string",
353
+ "const": "coding"
354
+ },
355
+ {
356
+ "type": "string",
357
+ "const": "reasoning"
358
+ },
359
+ {
360
+ "type": "string",
361
+ "const": "vision"
362
+ },
363
+ {
364
+ "type": "string",
365
+ "const": "cheap"
366
+ }
367
+ ]
368
+ }
369
+ }
370
+ },
371
+ "thinking": {
372
+ "anyOf": [
373
+ {
374
+ "type": "string",
375
+ "const": "off"
376
+ },
377
+ {
378
+ "type": "string",
379
+ "const": "minimal"
380
+ },
381
+ {
382
+ "type": "string",
383
+ "const": "low"
384
+ },
385
+ {
386
+ "type": "string",
387
+ "const": "medium"
388
+ },
389
+ {
390
+ "type": "string",
391
+ "const": "high"
392
+ },
393
+ {
394
+ "type": "string",
395
+ "const": "xhigh"
396
+ }
397
+ ]
398
+ }
399
+ }
400
+ },
401
+ "vision": {
402
+ "type": "object",
403
+ "required": [
404
+ "ref",
405
+ "thinking"
406
+ ],
407
+ "properties": {
408
+ "ref": {
409
+ "type": "object",
410
+ "required": [
411
+ "provider",
412
+ "model"
413
+ ],
414
+ "properties": {
415
+ "provider": {
416
+ "type": "string"
417
+ },
418
+ "model": {
419
+ "type": "string"
420
+ },
421
+ "capability": {
422
+ "anyOf": [
423
+ {
424
+ "type": "string",
425
+ "const": "fast"
426
+ },
427
+ {
428
+ "type": "string",
429
+ "const": "coding"
430
+ },
431
+ {
432
+ "type": "string",
433
+ "const": "reasoning"
434
+ },
435
+ {
436
+ "type": "string",
437
+ "const": "vision"
438
+ },
439
+ {
440
+ "type": "string",
441
+ "const": "cheap"
442
+ }
443
+ ]
444
+ }
445
+ }
446
+ },
447
+ "thinking": {
448
+ "anyOf": [
449
+ {
450
+ "type": "string",
451
+ "const": "off"
452
+ },
453
+ {
454
+ "type": "string",
455
+ "const": "minimal"
456
+ },
457
+ {
458
+ "type": "string",
459
+ "const": "low"
460
+ },
461
+ {
462
+ "type": "string",
463
+ "const": "medium"
464
+ },
465
+ {
466
+ "type": "string",
467
+ "const": "high"
468
+ },
469
+ {
470
+ "type": "string",
471
+ "const": "xhigh"
472
+ }
473
+ ]
474
+ }
475
+ }
476
+ },
477
+ "cheap": {
478
+ "type": "object",
479
+ "required": [
480
+ "ref",
481
+ "thinking"
482
+ ],
483
+ "properties": {
484
+ "ref": {
485
+ "type": "object",
486
+ "required": [
487
+ "provider",
488
+ "model"
489
+ ],
490
+ "properties": {
491
+ "provider": {
492
+ "type": "string"
493
+ },
494
+ "model": {
495
+ "type": "string"
496
+ },
497
+ "capability": {
498
+ "anyOf": [
499
+ {
500
+ "type": "string",
501
+ "const": "fast"
502
+ },
503
+ {
504
+ "type": "string",
505
+ "const": "coding"
506
+ },
507
+ {
508
+ "type": "string",
509
+ "const": "reasoning"
510
+ },
511
+ {
512
+ "type": "string",
513
+ "const": "vision"
514
+ },
515
+ {
516
+ "type": "string",
517
+ "const": "cheap"
518
+ }
519
+ ]
520
+ }
521
+ }
522
+ },
523
+ "thinking": {
524
+ "anyOf": [
525
+ {
526
+ "type": "string",
527
+ "const": "off"
528
+ },
529
+ {
530
+ "type": "string",
531
+ "const": "minimal"
532
+ },
533
+ {
534
+ "type": "string",
535
+ "const": "low"
536
+ },
537
+ {
538
+ "type": "string",
539
+ "const": "medium"
540
+ },
541
+ {
542
+ "type": "string",
543
+ "const": "high"
544
+ },
545
+ {
546
+ "type": "string",
547
+ "const": "xhigh"
548
+ }
549
+ ]
550
+ }
551
+ }
552
+ }
553
+ }
554
+ },
555
+ "escalation": {
556
+ "type": "object",
557
+ "required": [
558
+ "sameFailureCount",
559
+ "ladder",
560
+ "maxPerRun"
561
+ ],
562
+ "properties": {
563
+ "sameFailureCount": {
564
+ "type": "integer",
565
+ "minimum": 1
566
+ },
567
+ "ladder": {
568
+ "type": "array",
569
+ "items": {
570
+ "anyOf": [
571
+ {
572
+ "type": "object",
573
+ "required": [
574
+ "kind",
575
+ "role",
576
+ "from",
577
+ "to"
578
+ ],
579
+ "properties": {
580
+ "kind": {
581
+ "type": "string",
582
+ "const": "model-tier"
583
+ },
584
+ "role": {
585
+ "type": "string",
586
+ "enum": [
587
+ "discoverer",
588
+ "brainstormer",
589
+ "architect",
590
+ "spec-author",
591
+ "implementer",
592
+ "tester",
593
+ "reviewer",
594
+ "security-reviewer",
595
+ "fixer",
596
+ "release-manager",
597
+ "reconciler",
598
+ "verifier"
599
+ ]
600
+ },
601
+ "from": {
602
+ "anyOf": [
603
+ {
604
+ "type": "string",
605
+ "const": "fast"
606
+ },
607
+ {
608
+ "type": "string",
609
+ "const": "coding"
610
+ },
611
+ {
612
+ "type": "string",
613
+ "const": "reasoning"
614
+ },
615
+ {
616
+ "type": "string",
617
+ "const": "vision"
618
+ },
619
+ {
620
+ "type": "string",
621
+ "const": "cheap"
622
+ }
623
+ ]
624
+ },
625
+ "to": {
626
+ "anyOf": [
627
+ {
628
+ "type": "string",
629
+ "const": "fast"
630
+ },
631
+ {
632
+ "type": "string",
633
+ "const": "coding"
634
+ },
635
+ {
636
+ "type": "string",
637
+ "const": "reasoning"
638
+ },
639
+ {
640
+ "type": "string",
641
+ "const": "vision"
642
+ },
643
+ {
644
+ "type": "string",
645
+ "const": "cheap"
646
+ }
647
+ ]
648
+ }
649
+ }
650
+ },
651
+ {
652
+ "type": "object",
653
+ "required": [
654
+ "kind",
655
+ "from",
656
+ "to"
657
+ ],
658
+ "properties": {
659
+ "kind": {
660
+ "type": "string",
661
+ "const": "role"
662
+ },
663
+ "from": {
664
+ "type": "string",
665
+ "enum": [
666
+ "discoverer",
667
+ "brainstormer",
668
+ "architect",
669
+ "spec-author",
670
+ "implementer",
671
+ "tester",
672
+ "reviewer",
673
+ "security-reviewer",
674
+ "fixer",
675
+ "release-manager",
676
+ "reconciler",
677
+ "verifier"
678
+ ]
679
+ },
680
+ "to": {
681
+ "type": "string",
682
+ "enum": [
683
+ "discoverer",
684
+ "brainstormer",
685
+ "architect",
686
+ "spec-author",
687
+ "implementer",
688
+ "tester",
689
+ "reviewer",
690
+ "security-reviewer",
691
+ "fixer",
692
+ "release-manager",
693
+ "reconciler",
694
+ "verifier"
695
+ ]
696
+ }
697
+ }
698
+ },
699
+ {
700
+ "type": "object",
701
+ "required": [
702
+ "kind"
703
+ ],
704
+ "properties": {
705
+ "kind": {
706
+ "type": "string",
707
+ "const": "human"
708
+ }
709
+ }
710
+ }
711
+ ]
712
+ }
713
+ },
714
+ "maxPerRun": {
715
+ "type": "integer",
716
+ "minimum": 0
717
+ }
718
+ }
719
+ },
720
+ "fallback": {
721
+ "type": "object",
722
+ "required": [
723
+ "enabled"
724
+ ],
725
+ "properties": {
726
+ "enabled": {
727
+ "type": "boolean"
728
+ }
729
+ }
730
+ }
731
+ }
732
+ },
733
+ "budgets": {
734
+ "type": "object",
735
+ "required": [
736
+ "run",
737
+ "phase",
738
+ "agent",
739
+ "provider",
740
+ "tool",
741
+ "concurrency",
742
+ "maxIncarnations"
743
+ ],
744
+ "properties": {
745
+ "run": {
746
+ "type": "object",
747
+ "properties": {
748
+ "tokens": {
749
+ "type": "integer",
750
+ "minimum": 0
751
+ },
752
+ "modelRequests": {
753
+ "type": "integer",
754
+ "minimum": 0
755
+ },
756
+ "toolCalls": {
757
+ "type": "integer",
758
+ "minimum": 0
759
+ },
760
+ "wallClockMs": {
761
+ "type": "number",
762
+ "minimum": 0
763
+ },
764
+ "retries": {
765
+ "type": "integer",
766
+ "minimum": 0
767
+ },
768
+ "fixRounds": {
769
+ "type": "integer",
770
+ "minimum": 0
771
+ },
772
+ "contextTokens": {
773
+ "type": "integer",
774
+ "minimum": 0
775
+ },
776
+ "concurrentAgents": {
777
+ "type": "integer",
778
+ "minimum": 0
779
+ },
780
+ "estimatedQuotaPercent": {
781
+ "type": "number",
782
+ "minimum": 0
783
+ }
784
+ }
785
+ },
786
+ "phase": {
787
+ "type": "object",
788
+ "properties": {
789
+ "tokens": {
790
+ "type": "integer",
791
+ "minimum": 0
792
+ },
793
+ "modelRequests": {
794
+ "type": "integer",
795
+ "minimum": 0
796
+ },
797
+ "toolCalls": {
798
+ "type": "integer",
799
+ "minimum": 0
800
+ },
801
+ "wallClockMs": {
802
+ "type": "number",
803
+ "minimum": 0
804
+ },
805
+ "retries": {
806
+ "type": "integer",
807
+ "minimum": 0
808
+ },
809
+ "fixRounds": {
810
+ "type": "integer",
811
+ "minimum": 0
812
+ },
813
+ "contextTokens": {
814
+ "type": "integer",
815
+ "minimum": 0
816
+ },
817
+ "concurrentAgents": {
818
+ "type": "integer",
819
+ "minimum": 0
820
+ },
821
+ "estimatedQuotaPercent": {
822
+ "type": "number",
823
+ "minimum": 0
824
+ }
825
+ }
826
+ },
827
+ "agent": {
828
+ "type": "object",
829
+ "properties": {
830
+ "tokens": {
831
+ "type": "integer",
832
+ "minimum": 0
833
+ },
834
+ "modelRequests": {
835
+ "type": "integer",
836
+ "minimum": 0
837
+ },
838
+ "toolCalls": {
839
+ "type": "integer",
840
+ "minimum": 0
841
+ },
842
+ "wallClockMs": {
843
+ "type": "number",
844
+ "minimum": 0
845
+ },
846
+ "retries": {
847
+ "type": "integer",
848
+ "minimum": 0
849
+ },
850
+ "fixRounds": {
851
+ "type": "integer",
852
+ "minimum": 0
853
+ },
854
+ "contextTokens": {
855
+ "type": "integer",
856
+ "minimum": 0
857
+ },
858
+ "concurrentAgents": {
859
+ "type": "integer",
860
+ "minimum": 0
861
+ },
862
+ "estimatedQuotaPercent": {
863
+ "type": "number",
864
+ "minimum": 0
865
+ }
866
+ }
867
+ },
868
+ "provider": {
869
+ "type": "object",
870
+ "patternProperties": {
871
+ "^.*$": {
872
+ "type": "object",
873
+ "properties": {
874
+ "tokens": {
875
+ "type": "integer",
876
+ "minimum": 0
877
+ },
878
+ "modelRequests": {
879
+ "type": "integer",
880
+ "minimum": 0
881
+ },
882
+ "toolCalls": {
883
+ "type": "integer",
884
+ "minimum": 0
885
+ },
886
+ "wallClockMs": {
887
+ "type": "number",
888
+ "minimum": 0
889
+ },
890
+ "retries": {
891
+ "type": "integer",
892
+ "minimum": 0
893
+ },
894
+ "fixRounds": {
895
+ "type": "integer",
896
+ "minimum": 0
897
+ },
898
+ "contextTokens": {
899
+ "type": "integer",
900
+ "minimum": 0
901
+ },
902
+ "concurrentAgents": {
903
+ "type": "integer",
904
+ "minimum": 0
905
+ },
906
+ "estimatedQuotaPercent": {
907
+ "type": "number",
908
+ "minimum": 0
909
+ }
910
+ }
911
+ }
912
+ }
913
+ },
914
+ "tool": {
915
+ "type": "object",
916
+ "patternProperties": {
917
+ "^.*$": {
918
+ "type": "object",
919
+ "properties": {
920
+ "tokens": {
921
+ "type": "integer",
922
+ "minimum": 0
923
+ },
924
+ "modelRequests": {
925
+ "type": "integer",
926
+ "minimum": 0
927
+ },
928
+ "toolCalls": {
929
+ "type": "integer",
930
+ "minimum": 0
931
+ },
932
+ "wallClockMs": {
933
+ "type": "number",
934
+ "minimum": 0
935
+ },
936
+ "retries": {
937
+ "type": "integer",
938
+ "minimum": 0
939
+ },
940
+ "fixRounds": {
941
+ "type": "integer",
942
+ "minimum": 0
943
+ },
944
+ "contextTokens": {
945
+ "type": "integer",
946
+ "minimum": 0
947
+ },
948
+ "concurrentAgents": {
949
+ "type": "integer",
950
+ "minimum": 0
951
+ },
952
+ "estimatedQuotaPercent": {
953
+ "type": "number",
954
+ "minimum": 0
955
+ }
956
+ }
957
+ }
958
+ }
959
+ },
960
+ "concurrency": {
961
+ "type": "integer",
962
+ "minimum": 1
963
+ },
964
+ "maxIncarnations": {
965
+ "type": "integer",
966
+ "minimum": 1
967
+ }
968
+ }
969
+ },
970
+ "loop": {
971
+ "type": "object",
972
+ "required": [
973
+ "maxFixRounds",
974
+ "noProgressWindow",
975
+ "maxDeniedCallsPerAgent",
976
+ "leftovers"
977
+ ],
978
+ "properties": {
979
+ "maxFixRounds": {
980
+ "type": "integer",
981
+ "minimum": 0
982
+ },
983
+ "noProgressWindow": {
984
+ "type": "integer",
985
+ "minimum": 1
986
+ },
987
+ "maxDeniedCallsPerAgent": {
988
+ "type": "integer",
989
+ "minimum": 0
990
+ },
991
+ "leftovers": {
992
+ "type": "object",
993
+ "required": [
994
+ "major",
995
+ "minor",
996
+ "info"
997
+ ],
998
+ "properties": {
999
+ "major": {
1000
+ "type": "string",
1001
+ "enum": [
1002
+ "fix",
1003
+ "park",
1004
+ "ask"
1005
+ ]
1006
+ },
1007
+ "minor": {
1008
+ "type": "string",
1009
+ "enum": [
1010
+ "fix",
1011
+ "park",
1012
+ "ask"
1013
+ ]
1014
+ },
1015
+ "info": {
1016
+ "type": "string",
1017
+ "enum": [
1018
+ "fix",
1019
+ "park",
1020
+ "ask"
1021
+ ]
1022
+ }
1023
+ }
1024
+ }
1025
+ }
1026
+ },
1027
+ "checks": {
1028
+ "type": "object",
1029
+ "required": [
1030
+ "timeoutMs"
1031
+ ],
1032
+ "properties": {
1033
+ "typecheck": {
1034
+ "type": "array",
1035
+ "items": {
1036
+ "type": "string"
1037
+ },
1038
+ "minItems": 1
1039
+ },
1040
+ "lint": {
1041
+ "type": "array",
1042
+ "items": {
1043
+ "type": "string"
1044
+ },
1045
+ "minItems": 1
1046
+ },
1047
+ "test": {
1048
+ "type": "array",
1049
+ "items": {
1050
+ "type": "string"
1051
+ },
1052
+ "minItems": 1
1053
+ },
1054
+ "timeoutMs": {
1055
+ "type": "integer",
1056
+ "minimum": 1
1057
+ }
1058
+ }
1059
+ },
1060
+ "provision": {
1061
+ "type": "object",
1062
+ "required": [
1063
+ "network",
1064
+ "cacheDirs",
1065
+ "lockfiles",
1066
+ "env",
1067
+ "dependencyDirs",
1068
+ "writableCaches"
1069
+ ],
1070
+ "properties": {
1071
+ "argv": {
1072
+ "type": "array",
1073
+ "items": {
1074
+ "type": "string"
1075
+ },
1076
+ "minItems": 1
1077
+ },
1078
+ "network": {
1079
+ "type": "boolean"
1080
+ },
1081
+ "cacheDirs": {
1082
+ "type": "array",
1083
+ "items": {
1084
+ "type": "string",
1085
+ "minLength": 1
1086
+ }
1087
+ },
1088
+ "lockfiles": {
1089
+ "type": "array",
1090
+ "items": {
1091
+ "type": "string",
1092
+ "minLength": 1
1093
+ }
1094
+ },
1095
+ "env": {
1096
+ "type": "object",
1097
+ "properties": {
1098
+ "npm_config_store_dir": {
1099
+ "type": "string",
1100
+ "minLength": 1
1101
+ },
1102
+ "npm_config_cache": {
1103
+ "type": "string",
1104
+ "minLength": 1
1105
+ },
1106
+ "YARN_CACHE_FOLDER": {
1107
+ "type": "string",
1108
+ "minLength": 1
1109
+ },
1110
+ "COREPACK_HOME": {
1111
+ "type": "string",
1112
+ "minLength": 1
1113
+ }
1114
+ }
1115
+ },
1116
+ "dependencyDirs": {
1117
+ "type": "array",
1118
+ "items": {
1119
+ "type": "string",
1120
+ "minLength": 1
1121
+ }
1122
+ },
1123
+ "writableCaches": {
1124
+ "type": "array",
1125
+ "items": {
1126
+ "type": "string",
1127
+ "minLength": 1
1128
+ }
1129
+ }
1130
+ }
1131
+ },
1132
+ "policy": {
1133
+ "type": "object",
1134
+ "required": [
1135
+ "commands",
1136
+ "dangerousCommands",
1137
+ "symlinks",
1138
+ "approvals",
1139
+ "inDoubt",
1140
+ "skip",
1141
+ "steer",
1142
+ "admin",
1143
+ "quota"
1144
+ ],
1145
+ "properties": {
1146
+ "commands": {
1147
+ "type": "object",
1148
+ "required": [
1149
+ "allow",
1150
+ "ask",
1151
+ "deny"
1152
+ ],
1153
+ "properties": {
1154
+ "allow": {
1155
+ "type": "array",
1156
+ "items": {
1157
+ "type": "object",
1158
+ "required": [
1159
+ "id",
1160
+ "program",
1161
+ "decision",
1162
+ "replay",
1163
+ "network",
1164
+ "origin"
1165
+ ],
1166
+ "properties": {
1167
+ "id": {
1168
+ "type": "string",
1169
+ "minLength": 1
1170
+ },
1171
+ "program": {
1172
+ "type": "string",
1173
+ "pattern": "^[^/\\\\\\s]+$"
1174
+ },
1175
+ "subcommand": {
1176
+ "type": "array",
1177
+ "items": {
1178
+ "type": "string",
1179
+ "minLength": 1
1180
+ }
1181
+ },
1182
+ "flags": {
1183
+ "type": "object",
1184
+ "required": [
1185
+ "allow"
1186
+ ],
1187
+ "properties": {
1188
+ "allow": {
1189
+ "type": "array",
1190
+ "items": {
1191
+ "type": "string",
1192
+ "minLength": 1
1193
+ }
1194
+ },
1195
+ "deny": {
1196
+ "type": "array",
1197
+ "items": {
1198
+ "type": "string",
1199
+ "minLength": 1
1200
+ }
1201
+ }
1202
+ }
1203
+ },
1204
+ "positionals": {
1205
+ "anyOf": [
1206
+ {
1207
+ "type": "object",
1208
+ "required": [
1209
+ "kind"
1210
+ ],
1211
+ "properties": {
1212
+ "kind": {
1213
+ "type": "string",
1214
+ "const": "none"
1215
+ }
1216
+ }
1217
+ },
1218
+ {
1219
+ "type": "object",
1220
+ "required": [
1221
+ "kind",
1222
+ "max"
1223
+ ],
1224
+ "properties": {
1225
+ "kind": {
1226
+ "type": "string",
1227
+ "const": "paths-in-worktree"
1228
+ },
1229
+ "max": {
1230
+ "type": "integer",
1231
+ "minimum": 0
1232
+ }
1233
+ }
1234
+ },
1235
+ {
1236
+ "type": "object",
1237
+ "required": [
1238
+ "kind",
1239
+ "values",
1240
+ "max"
1241
+ ],
1242
+ "properties": {
1243
+ "kind": {
1244
+ "type": "string",
1245
+ "const": "enum"
1246
+ },
1247
+ "values": {
1248
+ "type": "array",
1249
+ "items": {
1250
+ "type": "string",
1251
+ "minLength": 1
1252
+ }
1253
+ },
1254
+ "max": {
1255
+ "type": "integer",
1256
+ "minimum": 0
1257
+ }
1258
+ }
1259
+ },
1260
+ {
1261
+ "type": "object",
1262
+ "required": [
1263
+ "kind",
1264
+ "values"
1265
+ ],
1266
+ "properties": {
1267
+ "kind": {
1268
+ "type": "string",
1269
+ "const": "exact"
1270
+ },
1271
+ "values": {
1272
+ "type": "array",
1273
+ "items": {
1274
+ "type": "string"
1275
+ }
1276
+ }
1277
+ }
1278
+ }
1279
+ ]
1280
+ },
1281
+ "decision": {
1282
+ "anyOf": [
1283
+ {
1284
+ "type": "string",
1285
+ "const": "allow"
1286
+ },
1287
+ {
1288
+ "type": "string",
1289
+ "const": "ask"
1290
+ },
1291
+ {
1292
+ "type": "string",
1293
+ "const": "deny"
1294
+ }
1295
+ ]
1296
+ },
1297
+ "when": {
1298
+ "type": "object",
1299
+ "properties": {
1300
+ "branch": {
1301
+ "anyOf": [
1302
+ {
1303
+ "type": "string",
1304
+ "const": "any"
1305
+ },
1306
+ {
1307
+ "type": "string",
1308
+ "const": "unprotected-only"
1309
+ }
1310
+ ]
1311
+ },
1312
+ "roles": {
1313
+ "type": "array",
1314
+ "items": {
1315
+ "type": "string",
1316
+ "minLength": 1
1317
+ }
1318
+ },
1319
+ "phases": {
1320
+ "type": "array",
1321
+ "items": {
1322
+ "type": "string",
1323
+ "minLength": 1
1324
+ }
1325
+ }
1326
+ }
1327
+ },
1328
+ "replay": {
1329
+ "anyOf": [
1330
+ {
1331
+ "type": "string",
1332
+ "const": "idempotent"
1333
+ },
1334
+ {
1335
+ "type": "string",
1336
+ "const": "at-most-once"
1337
+ }
1338
+ ]
1339
+ },
1340
+ "network": {
1341
+ "type": "boolean"
1342
+ },
1343
+ "origin": {
1344
+ "anyOf": [
1345
+ {
1346
+ "type": "string",
1347
+ "const": "builtin"
1348
+ },
1349
+ {
1350
+ "type": "string",
1351
+ "const": "project-config"
1352
+ },
1353
+ {
1354
+ "type": "string",
1355
+ "const": "project-checks"
1356
+ }
1357
+ ]
1358
+ }
1359
+ }
1360
+ }
1361
+ },
1362
+ "ask": {
1363
+ "type": "array",
1364
+ "items": {
1365
+ "type": "object",
1366
+ "required": [
1367
+ "id",
1368
+ "program",
1369
+ "decision",
1370
+ "replay",
1371
+ "network",
1372
+ "origin"
1373
+ ],
1374
+ "properties": {
1375
+ "id": {
1376
+ "type": "string",
1377
+ "minLength": 1
1378
+ },
1379
+ "program": {
1380
+ "type": "string",
1381
+ "pattern": "^[^/\\\\\\s]+$"
1382
+ },
1383
+ "subcommand": {
1384
+ "type": "array",
1385
+ "items": {
1386
+ "type": "string",
1387
+ "minLength": 1
1388
+ }
1389
+ },
1390
+ "flags": {
1391
+ "type": "object",
1392
+ "required": [
1393
+ "allow"
1394
+ ],
1395
+ "properties": {
1396
+ "allow": {
1397
+ "type": "array",
1398
+ "items": {
1399
+ "type": "string",
1400
+ "minLength": 1
1401
+ }
1402
+ },
1403
+ "deny": {
1404
+ "type": "array",
1405
+ "items": {
1406
+ "type": "string",
1407
+ "minLength": 1
1408
+ }
1409
+ }
1410
+ }
1411
+ },
1412
+ "positionals": {
1413
+ "anyOf": [
1414
+ {
1415
+ "type": "object",
1416
+ "required": [
1417
+ "kind"
1418
+ ],
1419
+ "properties": {
1420
+ "kind": {
1421
+ "type": "string",
1422
+ "const": "none"
1423
+ }
1424
+ }
1425
+ },
1426
+ {
1427
+ "type": "object",
1428
+ "required": [
1429
+ "kind",
1430
+ "max"
1431
+ ],
1432
+ "properties": {
1433
+ "kind": {
1434
+ "type": "string",
1435
+ "const": "paths-in-worktree"
1436
+ },
1437
+ "max": {
1438
+ "type": "integer",
1439
+ "minimum": 0
1440
+ }
1441
+ }
1442
+ },
1443
+ {
1444
+ "type": "object",
1445
+ "required": [
1446
+ "kind",
1447
+ "values",
1448
+ "max"
1449
+ ],
1450
+ "properties": {
1451
+ "kind": {
1452
+ "type": "string",
1453
+ "const": "enum"
1454
+ },
1455
+ "values": {
1456
+ "type": "array",
1457
+ "items": {
1458
+ "type": "string",
1459
+ "minLength": 1
1460
+ }
1461
+ },
1462
+ "max": {
1463
+ "type": "integer",
1464
+ "minimum": 0
1465
+ }
1466
+ }
1467
+ },
1468
+ {
1469
+ "type": "object",
1470
+ "required": [
1471
+ "kind",
1472
+ "values"
1473
+ ],
1474
+ "properties": {
1475
+ "kind": {
1476
+ "type": "string",
1477
+ "const": "exact"
1478
+ },
1479
+ "values": {
1480
+ "type": "array",
1481
+ "items": {
1482
+ "type": "string"
1483
+ }
1484
+ }
1485
+ }
1486
+ }
1487
+ ]
1488
+ },
1489
+ "decision": {
1490
+ "anyOf": [
1491
+ {
1492
+ "type": "string",
1493
+ "const": "allow"
1494
+ },
1495
+ {
1496
+ "type": "string",
1497
+ "const": "ask"
1498
+ },
1499
+ {
1500
+ "type": "string",
1501
+ "const": "deny"
1502
+ }
1503
+ ]
1504
+ },
1505
+ "when": {
1506
+ "type": "object",
1507
+ "properties": {
1508
+ "branch": {
1509
+ "anyOf": [
1510
+ {
1511
+ "type": "string",
1512
+ "const": "any"
1513
+ },
1514
+ {
1515
+ "type": "string",
1516
+ "const": "unprotected-only"
1517
+ }
1518
+ ]
1519
+ },
1520
+ "roles": {
1521
+ "type": "array",
1522
+ "items": {
1523
+ "type": "string",
1524
+ "minLength": 1
1525
+ }
1526
+ },
1527
+ "phases": {
1528
+ "type": "array",
1529
+ "items": {
1530
+ "type": "string",
1531
+ "minLength": 1
1532
+ }
1533
+ }
1534
+ }
1535
+ },
1536
+ "replay": {
1537
+ "anyOf": [
1538
+ {
1539
+ "type": "string",
1540
+ "const": "idempotent"
1541
+ },
1542
+ {
1543
+ "type": "string",
1544
+ "const": "at-most-once"
1545
+ }
1546
+ ]
1547
+ },
1548
+ "network": {
1549
+ "type": "boolean"
1550
+ },
1551
+ "origin": {
1552
+ "anyOf": [
1553
+ {
1554
+ "type": "string",
1555
+ "const": "builtin"
1556
+ },
1557
+ {
1558
+ "type": "string",
1559
+ "const": "project-config"
1560
+ },
1561
+ {
1562
+ "type": "string",
1563
+ "const": "project-checks"
1564
+ }
1565
+ ]
1566
+ }
1567
+ }
1568
+ }
1569
+ },
1570
+ "deny": {
1571
+ "type": "array",
1572
+ "items": {
1573
+ "type": "object",
1574
+ "required": [
1575
+ "id",
1576
+ "program",
1577
+ "decision",
1578
+ "replay",
1579
+ "network",
1580
+ "origin"
1581
+ ],
1582
+ "properties": {
1583
+ "id": {
1584
+ "type": "string",
1585
+ "minLength": 1
1586
+ },
1587
+ "program": {
1588
+ "type": "string",
1589
+ "pattern": "^[^/\\\\\\s]+$"
1590
+ },
1591
+ "subcommand": {
1592
+ "type": "array",
1593
+ "items": {
1594
+ "type": "string",
1595
+ "minLength": 1
1596
+ }
1597
+ },
1598
+ "flags": {
1599
+ "type": "object",
1600
+ "required": [
1601
+ "allow"
1602
+ ],
1603
+ "properties": {
1604
+ "allow": {
1605
+ "type": "array",
1606
+ "items": {
1607
+ "type": "string",
1608
+ "minLength": 1
1609
+ }
1610
+ },
1611
+ "deny": {
1612
+ "type": "array",
1613
+ "items": {
1614
+ "type": "string",
1615
+ "minLength": 1
1616
+ }
1617
+ }
1618
+ }
1619
+ },
1620
+ "positionals": {
1621
+ "anyOf": [
1622
+ {
1623
+ "type": "object",
1624
+ "required": [
1625
+ "kind"
1626
+ ],
1627
+ "properties": {
1628
+ "kind": {
1629
+ "type": "string",
1630
+ "const": "none"
1631
+ }
1632
+ }
1633
+ },
1634
+ {
1635
+ "type": "object",
1636
+ "required": [
1637
+ "kind",
1638
+ "max"
1639
+ ],
1640
+ "properties": {
1641
+ "kind": {
1642
+ "type": "string",
1643
+ "const": "paths-in-worktree"
1644
+ },
1645
+ "max": {
1646
+ "type": "integer",
1647
+ "minimum": 0
1648
+ }
1649
+ }
1650
+ },
1651
+ {
1652
+ "type": "object",
1653
+ "required": [
1654
+ "kind",
1655
+ "values",
1656
+ "max"
1657
+ ],
1658
+ "properties": {
1659
+ "kind": {
1660
+ "type": "string",
1661
+ "const": "enum"
1662
+ },
1663
+ "values": {
1664
+ "type": "array",
1665
+ "items": {
1666
+ "type": "string",
1667
+ "minLength": 1
1668
+ }
1669
+ },
1670
+ "max": {
1671
+ "type": "integer",
1672
+ "minimum": 0
1673
+ }
1674
+ }
1675
+ },
1676
+ {
1677
+ "type": "object",
1678
+ "required": [
1679
+ "kind",
1680
+ "values"
1681
+ ],
1682
+ "properties": {
1683
+ "kind": {
1684
+ "type": "string",
1685
+ "const": "exact"
1686
+ },
1687
+ "values": {
1688
+ "type": "array",
1689
+ "items": {
1690
+ "type": "string"
1691
+ }
1692
+ }
1693
+ }
1694
+ }
1695
+ ]
1696
+ },
1697
+ "decision": {
1698
+ "anyOf": [
1699
+ {
1700
+ "type": "string",
1701
+ "const": "allow"
1702
+ },
1703
+ {
1704
+ "type": "string",
1705
+ "const": "ask"
1706
+ },
1707
+ {
1708
+ "type": "string",
1709
+ "const": "deny"
1710
+ }
1711
+ ]
1712
+ },
1713
+ "when": {
1714
+ "type": "object",
1715
+ "properties": {
1716
+ "branch": {
1717
+ "anyOf": [
1718
+ {
1719
+ "type": "string",
1720
+ "const": "any"
1721
+ },
1722
+ {
1723
+ "type": "string",
1724
+ "const": "unprotected-only"
1725
+ }
1726
+ ]
1727
+ },
1728
+ "roles": {
1729
+ "type": "array",
1730
+ "items": {
1731
+ "type": "string",
1732
+ "minLength": 1
1733
+ }
1734
+ },
1735
+ "phases": {
1736
+ "type": "array",
1737
+ "items": {
1738
+ "type": "string",
1739
+ "minLength": 1
1740
+ }
1741
+ }
1742
+ }
1743
+ },
1744
+ "replay": {
1745
+ "anyOf": [
1746
+ {
1747
+ "type": "string",
1748
+ "const": "idempotent"
1749
+ },
1750
+ {
1751
+ "type": "string",
1752
+ "const": "at-most-once"
1753
+ }
1754
+ ]
1755
+ },
1756
+ "network": {
1757
+ "type": "boolean"
1758
+ },
1759
+ "origin": {
1760
+ "anyOf": [
1761
+ {
1762
+ "type": "string",
1763
+ "const": "builtin"
1764
+ },
1765
+ {
1766
+ "type": "string",
1767
+ "const": "project-config"
1768
+ },
1769
+ {
1770
+ "type": "string",
1771
+ "const": "project-checks"
1772
+ }
1773
+ ]
1774
+ }
1775
+ }
1776
+ }
1777
+ }
1778
+ }
1779
+ },
1780
+ "dangerousCommands": {
1781
+ "type": "array",
1782
+ "items": {
1783
+ "type": "object",
1784
+ "required": [
1785
+ "id",
1786
+ "program",
1787
+ "decision",
1788
+ "replay",
1789
+ "network",
1790
+ "origin"
1791
+ ],
1792
+ "properties": {
1793
+ "id": {
1794
+ "type": "string",
1795
+ "minLength": 1
1796
+ },
1797
+ "program": {
1798
+ "type": "string",
1799
+ "pattern": "^[^/\\\\\\s]+$"
1800
+ },
1801
+ "subcommand": {
1802
+ "type": "array",
1803
+ "items": {
1804
+ "type": "string",
1805
+ "minLength": 1
1806
+ }
1807
+ },
1808
+ "flags": {
1809
+ "type": "object",
1810
+ "required": [
1811
+ "allow"
1812
+ ],
1813
+ "properties": {
1814
+ "allow": {
1815
+ "type": "array",
1816
+ "items": {
1817
+ "type": "string",
1818
+ "minLength": 1
1819
+ }
1820
+ },
1821
+ "deny": {
1822
+ "type": "array",
1823
+ "items": {
1824
+ "type": "string",
1825
+ "minLength": 1
1826
+ }
1827
+ }
1828
+ }
1829
+ },
1830
+ "positionals": {
1831
+ "anyOf": [
1832
+ {
1833
+ "type": "object",
1834
+ "required": [
1835
+ "kind"
1836
+ ],
1837
+ "properties": {
1838
+ "kind": {
1839
+ "type": "string",
1840
+ "const": "none"
1841
+ }
1842
+ }
1843
+ },
1844
+ {
1845
+ "type": "object",
1846
+ "required": [
1847
+ "kind",
1848
+ "max"
1849
+ ],
1850
+ "properties": {
1851
+ "kind": {
1852
+ "type": "string",
1853
+ "const": "paths-in-worktree"
1854
+ },
1855
+ "max": {
1856
+ "type": "integer",
1857
+ "minimum": 0
1858
+ }
1859
+ }
1860
+ },
1861
+ {
1862
+ "type": "object",
1863
+ "required": [
1864
+ "kind",
1865
+ "values",
1866
+ "max"
1867
+ ],
1868
+ "properties": {
1869
+ "kind": {
1870
+ "type": "string",
1871
+ "const": "enum"
1872
+ },
1873
+ "values": {
1874
+ "type": "array",
1875
+ "items": {
1876
+ "type": "string",
1877
+ "minLength": 1
1878
+ }
1879
+ },
1880
+ "max": {
1881
+ "type": "integer",
1882
+ "minimum": 0
1883
+ }
1884
+ }
1885
+ },
1886
+ {
1887
+ "type": "object",
1888
+ "required": [
1889
+ "kind",
1890
+ "values"
1891
+ ],
1892
+ "properties": {
1893
+ "kind": {
1894
+ "type": "string",
1895
+ "const": "exact"
1896
+ },
1897
+ "values": {
1898
+ "type": "array",
1899
+ "items": {
1900
+ "type": "string"
1901
+ }
1902
+ }
1903
+ }
1904
+ }
1905
+ ]
1906
+ },
1907
+ "decision": {
1908
+ "anyOf": [
1909
+ {
1910
+ "type": "string",
1911
+ "const": "allow"
1912
+ },
1913
+ {
1914
+ "type": "string",
1915
+ "const": "ask"
1916
+ },
1917
+ {
1918
+ "type": "string",
1919
+ "const": "deny"
1920
+ }
1921
+ ]
1922
+ },
1923
+ "when": {
1924
+ "type": "object",
1925
+ "properties": {
1926
+ "branch": {
1927
+ "anyOf": [
1928
+ {
1929
+ "type": "string",
1930
+ "const": "any"
1931
+ },
1932
+ {
1933
+ "type": "string",
1934
+ "const": "unprotected-only"
1935
+ }
1936
+ ]
1937
+ },
1938
+ "roles": {
1939
+ "type": "array",
1940
+ "items": {
1941
+ "type": "string",
1942
+ "minLength": 1
1943
+ }
1944
+ },
1945
+ "phases": {
1946
+ "type": "array",
1947
+ "items": {
1948
+ "type": "string",
1949
+ "minLength": 1
1950
+ }
1951
+ }
1952
+ }
1953
+ },
1954
+ "replay": {
1955
+ "anyOf": [
1956
+ {
1957
+ "type": "string",
1958
+ "const": "idempotent"
1959
+ },
1960
+ {
1961
+ "type": "string",
1962
+ "const": "at-most-once"
1963
+ }
1964
+ ]
1965
+ },
1966
+ "network": {
1967
+ "type": "boolean"
1968
+ },
1969
+ "origin": {
1970
+ "anyOf": [
1971
+ {
1972
+ "type": "string",
1973
+ "const": "builtin"
1974
+ },
1975
+ {
1976
+ "type": "string",
1977
+ "const": "project-config"
1978
+ },
1979
+ {
1980
+ "type": "string",
1981
+ "const": "project-checks"
1982
+ }
1983
+ ]
1984
+ }
1985
+ }
1986
+ }
1987
+ },
1988
+ "symlinks": {
1989
+ "type": "object",
1990
+ "required": [
1991
+ "mode",
1992
+ "hardlinksOnWrite"
1993
+ ],
1994
+ "properties": {
1995
+ "mode": {
1996
+ "anyOf": [
1997
+ {
1998
+ "type": "string",
1999
+ "const": "deny-outgoing"
2000
+ },
2001
+ {
2002
+ "type": "string",
2003
+ "const": "deny-all"
2004
+ },
2005
+ {
2006
+ "type": "string",
2007
+ "const": "allow"
2008
+ }
2009
+ ]
2010
+ },
2011
+ "hardlinksOnWrite": {
2012
+ "anyOf": [
2013
+ {
2014
+ "type": "string",
2015
+ "const": "deny"
2016
+ },
2017
+ {
2018
+ "type": "string",
2019
+ "const": "allow"
2020
+ }
2021
+ ]
2022
+ }
2023
+ }
2024
+ },
2025
+ "approvals": {
2026
+ "type": "object",
2027
+ "required": [
2028
+ "unattended",
2029
+ "parkAfterMinutes",
2030
+ "ship",
2031
+ "notify",
2032
+ "autoResume"
2033
+ ],
2034
+ "properties": {
2035
+ "unattended": {
2036
+ "type": "string",
2037
+ "enum": [
2038
+ "deny",
2039
+ "wait"
2040
+ ]
2041
+ },
2042
+ "expiryMinutes": {
2043
+ "type": "integer",
2044
+ "minimum": 1
2045
+ },
2046
+ "parkAfterMinutes": {
2047
+ "type": "integer",
2048
+ "minimum": 0
2049
+ },
2050
+ "ship": {
2051
+ "type": "string",
2052
+ "enum": [
2053
+ "human",
2054
+ "auto"
2055
+ ]
2056
+ },
2057
+ "notify": {
2058
+ "type": "boolean"
2059
+ },
2060
+ "autoResume": {
2061
+ "type": "boolean"
2062
+ }
2063
+ }
2064
+ },
2065
+ "inDoubt": {
2066
+ "type": "string",
2067
+ "enum": [
2068
+ "ask",
2069
+ "continue"
2070
+ ]
2071
+ },
2072
+ "skip": {
2073
+ "type": "array",
2074
+ "items": {
2075
+ "type": "string",
2076
+ "enum": [
2077
+ "BRAINSTORM",
2078
+ "SPEC",
2079
+ "PREFLIGHT",
2080
+ "BUILD",
2081
+ "TEST",
2082
+ "REVIEW",
2083
+ "FIX",
2084
+ "SHIP"
2085
+ ]
2086
+ }
2087
+ },
2088
+ "steer": {
2089
+ "type": "object",
2090
+ "required": [
2091
+ "enabled"
2092
+ ],
2093
+ "properties": {
2094
+ "enabled": {
2095
+ "type": "boolean"
2096
+ }
2097
+ }
2098
+ },
2099
+ "admin": {
2100
+ "type": "object",
2101
+ "required": [
2102
+ "runTool"
2103
+ ],
2104
+ "properties": {
2105
+ "runTool": {
2106
+ "type": "boolean"
2107
+ }
2108
+ }
2109
+ },
2110
+ "quota": {
2111
+ "type": "object",
2112
+ "required": [
2113
+ "autoResume"
2114
+ ],
2115
+ "properties": {
2116
+ "autoResume": {
2117
+ "type": "boolean"
2118
+ }
2119
+ }
2120
+ }
2121
+ }
2122
+ },
2123
+ "host": {
2124
+ "type": "object",
2125
+ "required": [
2126
+ "idleExitMinutes",
2127
+ "pauseKeepAliveMinutes",
2128
+ "pollMs"
2129
+ ],
2130
+ "properties": {
2131
+ "idleExitMinutes": {
2132
+ "type": "integer",
2133
+ "minimum": 0
2134
+ },
2135
+ "pauseKeepAliveMinutes": {
2136
+ "type": "integer",
2137
+ "minimum": 0
2138
+ },
2139
+ "pollMs": {
2140
+ "type": "integer",
2141
+ "minimum": 1
2142
+ }
2143
+ }
2144
+ },
2145
+ "network": {
2146
+ "type": "object",
2147
+ "required": [
2148
+ "proxyEnv"
2149
+ ],
2150
+ "properties": {
2151
+ "proxyEnv": {
2152
+ "type": "boolean"
2153
+ }
2154
+ }
2155
+ },
2156
+ "sandbox": {
2157
+ "type": "object",
2158
+ "required": [
2159
+ "brain"
2160
+ ],
2161
+ "properties": {
2162
+ "require": {
2163
+ "type": "string",
2164
+ "enum": [
2165
+ "native",
2166
+ "best-effort"
2167
+ ]
2168
+ },
2169
+ "brain": {
2170
+ "type": "string",
2171
+ "enum": [
2172
+ "os-if-available",
2173
+ "os",
2174
+ "process"
2175
+ ]
2176
+ }
2177
+ }
2178
+ },
2179
+ "git": {
2180
+ "type": "object",
2181
+ "required": [
2182
+ "branchPrefix",
2183
+ "commitIdentity",
2184
+ "keepWorktrees"
2185
+ ],
2186
+ "properties": {
2187
+ "worktreeRoot": {
2188
+ "type": "string",
2189
+ "minLength": 1
2190
+ },
2191
+ "branchPrefix": {
2192
+ "type": "string",
2193
+ "minLength": 1
2194
+ },
2195
+ "commitIdentity": {
2196
+ "type": "string",
2197
+ "enum": [
2198
+ "user",
2199
+ "cohorte"
2200
+ ]
2201
+ },
2202
+ "keepWorktrees": {
2203
+ "type": "string",
2204
+ "enum": [
2205
+ "on-failure",
2206
+ "always",
2207
+ "never"
2208
+ ]
2209
+ }
2210
+ }
2211
+ },
2212
+ "retention": {
2213
+ "type": "object",
2214
+ "required": [
2215
+ "transcriptsDays",
2216
+ "eventsDays",
2217
+ "artifactsDays",
2218
+ "compressAfterDays"
2219
+ ],
2220
+ "properties": {
2221
+ "transcriptsDays": {
2222
+ "type": "integer",
2223
+ "minimum": 0
2224
+ },
2225
+ "eventsDays": {
2226
+ "anyOf": [
2227
+ {
2228
+ "type": "integer",
2229
+ "minimum": 0
2230
+ },
2231
+ {
2232
+ "type": "string",
2233
+ "const": "forever"
2234
+ }
2235
+ ]
2236
+ },
2237
+ "artifactsDays": {
2238
+ "type": "integer",
2239
+ "minimum": 0
2240
+ },
2241
+ "compressAfterDays": {
2242
+ "type": "integer",
2243
+ "minimum": 0
2244
+ }
2245
+ }
2246
+ },
2247
+ "telemetry": {
2248
+ "type": "object",
2249
+ "required": [
2250
+ "remote"
2251
+ ],
2252
+ "properties": {
2253
+ "remote": {
2254
+ "type": "boolean"
2255
+ }
2256
+ }
2257
+ }
2258
+ }
2259
+ }