ex-workflow 1.1.1 → 1.3.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 (193) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +209 -44
  3. package/dist/adapters/index.cjs +1 -1
  4. package/dist/adapters/index.d.cts +1 -1
  5. package/dist/adapters/index.d.ts +1 -1
  6. package/dist/adapters/index.mjs +1 -1
  7. package/dist/{budget-Bd8KpGIr.d.ts → budget-BuQ9GWsg.d.ts} +8 -7
  8. package/dist/{budget-CezCinPF.d.cts → budget-DDqQQIgp.d.cts} +8 -7
  9. package/dist/chunk-2FBA7RBS.cjs +2 -0
  10. package/dist/chunk-2FBA7RBS.cjs.map +1 -0
  11. package/dist/chunk-3S7F5QXK.mjs +2 -0
  12. package/dist/chunk-3S7F5QXK.mjs.map +1 -0
  13. package/dist/chunk-3ZUBCA7Q.cjs +2 -0
  14. package/dist/chunk-3ZUBCA7Q.cjs.map +1 -0
  15. package/dist/chunk-4F5HZLKD.cjs +2 -0
  16. package/dist/chunk-4F5HZLKD.cjs.map +1 -0
  17. package/dist/chunk-5DCOXGRW.mjs +2 -0
  18. package/dist/chunk-5DCOXGRW.mjs.map +1 -0
  19. package/dist/chunk-5GXB6GMX.mjs +2 -0
  20. package/dist/chunk-5GXB6GMX.mjs.map +1 -0
  21. package/dist/chunk-5ZGNEY2I.mjs +2 -0
  22. package/dist/chunk-5ZGNEY2I.mjs.map +1 -0
  23. package/dist/chunk-6PFJYRM7.cjs +2 -0
  24. package/dist/chunk-6PFJYRM7.cjs.map +1 -0
  25. package/dist/chunk-BANKVCYY.cjs +2 -0
  26. package/dist/chunk-BANKVCYY.cjs.map +1 -0
  27. package/dist/chunk-BBI7AKJK.cjs +2 -0
  28. package/dist/chunk-BBI7AKJK.cjs.map +1 -0
  29. package/dist/chunk-BD665RYK.mjs +2 -0
  30. package/dist/chunk-BD665RYK.mjs.map +1 -0
  31. package/dist/chunk-C4ISBUZR.mjs +2 -0
  32. package/dist/chunk-C4ISBUZR.mjs.map +1 -0
  33. package/dist/chunk-COPYGMHE.mjs +2 -0
  34. package/dist/chunk-COPYGMHE.mjs.map +1 -0
  35. package/dist/chunk-CVGEIXW6.cjs +2 -0
  36. package/dist/chunk-CVGEIXW6.cjs.map +1 -0
  37. package/dist/chunk-CX2E7ZTQ.mjs +2 -0
  38. package/dist/chunk-CX2E7ZTQ.mjs.map +1 -0
  39. package/dist/chunk-DVFTTBCT.cjs +3 -0
  40. package/dist/chunk-DVFTTBCT.cjs.map +1 -0
  41. package/dist/chunk-EQXYFHHD.cjs +2 -0
  42. package/dist/chunk-EQXYFHHD.cjs.map +1 -0
  43. package/dist/chunk-GKN5M4B7.cjs +2 -0
  44. package/dist/chunk-GKN5M4B7.cjs.map +1 -0
  45. package/dist/chunk-H26KXQ3I.cjs +2 -0
  46. package/dist/chunk-H26KXQ3I.cjs.map +1 -0
  47. package/dist/chunk-IDZ435YZ.mjs +2 -0
  48. package/dist/{chunk-KIQOUUEZ.mjs.map → chunk-IDZ435YZ.mjs.map} +1 -1
  49. package/dist/chunk-ILDXZWEL.mjs +2 -0
  50. package/dist/chunk-ILDXZWEL.mjs.map +1 -0
  51. package/dist/chunk-KA6DVHO5.cjs +6 -0
  52. package/dist/chunk-KA6DVHO5.cjs.map +1 -0
  53. package/dist/chunk-KLOSFZFK.cjs +2 -0
  54. package/dist/chunk-KLOSFZFK.cjs.map +1 -0
  55. package/dist/chunk-LG23WXAP.mjs +2 -0
  56. package/dist/chunk-LG23WXAP.mjs.map +1 -0
  57. package/dist/chunk-MU26QW32.cjs +2 -0
  58. package/dist/chunk-MU26QW32.cjs.map +1 -0
  59. package/dist/chunk-OEHVWRJG.mjs +2 -0
  60. package/dist/chunk-OEHVWRJG.mjs.map +1 -0
  61. package/dist/chunk-ONVAUZOD.mjs +6 -0
  62. package/dist/chunk-ONVAUZOD.mjs.map +1 -0
  63. package/dist/chunk-OSHBJIYD.cjs +2 -0
  64. package/dist/chunk-OSHBJIYD.cjs.map +1 -0
  65. package/dist/chunk-PFHVB2WT.mjs +2 -0
  66. package/dist/chunk-PFHVB2WT.mjs.map +1 -0
  67. package/dist/chunk-PNWRA4JU.cjs +2 -0
  68. package/dist/{chunk-PO2SPQJP.cjs.map → chunk-PNWRA4JU.cjs.map} +1 -1
  69. package/dist/chunk-QJMOCISZ.mjs +3 -0
  70. package/dist/chunk-QJMOCISZ.mjs.map +1 -0
  71. package/dist/chunk-RGHM3JJM.cjs +2 -0
  72. package/dist/chunk-RGHM3JJM.cjs.map +1 -0
  73. package/dist/chunk-TQR3VFZU.mjs +2 -0
  74. package/dist/chunk-TQR3VFZU.mjs.map +1 -0
  75. package/dist/chunk-UMG3WOD7.cjs +2 -0
  76. package/dist/chunk-UMG3WOD7.cjs.map +1 -0
  77. package/dist/chunk-UT7QV6CE.mjs +2 -0
  78. package/dist/chunk-UT7QV6CE.mjs.map +1 -0
  79. package/dist/chunk-WU5JELOM.mjs +2 -0
  80. package/dist/chunk-WU5JELOM.mjs.map +1 -0
  81. package/dist/chunk-YGCNLXPJ.cjs +2 -0
  82. package/dist/chunk-YGCNLXPJ.cjs.map +1 -0
  83. package/dist/chunk-YS6CXERQ.mjs +2 -0
  84. package/dist/chunk-YS6CXERQ.mjs.map +1 -0
  85. package/dist/cli/bin.cjs +1 -1
  86. package/dist/cli/bin.cjs.map +1 -1
  87. package/dist/cli/bin.mjs +1 -1
  88. package/dist/cli/bin.mjs.map +1 -1
  89. package/dist/cli/index.cjs +1 -1
  90. package/dist/cli/index.mjs +1 -1
  91. package/dist/experimentation/index.cjs +1 -1
  92. package/dist/experimentation/index.d.cts +2 -2
  93. package/dist/experimentation/index.d.ts +2 -2
  94. package/dist/experimentation/index.mjs +1 -1
  95. package/dist/index.cjs +1 -1
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.d.cts +145 -15
  98. package/dist/index.d.ts +145 -15
  99. package/dist/index.mjs +1 -1
  100. package/dist/index.mjs.map +1 -1
  101. package/dist/investigation/index.cjs +1 -1
  102. package/dist/investigation/index.d.cts +2 -2
  103. package/dist/investigation/index.d.ts +2 -2
  104. package/dist/investigation/index.mjs +1 -1
  105. package/dist/kanban/index.cjs +1 -1
  106. package/dist/kanban/index.d.cts +2 -1
  107. package/dist/kanban/index.d.ts +2 -1
  108. package/dist/kanban/index.mjs +1 -1
  109. package/dist/policies/index.cjs +2 -0
  110. package/dist/policies/index.cjs.map +1 -0
  111. package/dist/policies/index.d.cts +199 -0
  112. package/dist/policies/index.d.ts +199 -0
  113. package/dist/policies/index.mjs +2 -0
  114. package/dist/policies/index.mjs.map +1 -0
  115. package/dist/registry/index.cjs +2 -0
  116. package/dist/registry/index.cjs.map +1 -0
  117. package/dist/registry/index.d.cts +25 -0
  118. package/dist/registry/index.d.ts +25 -0
  119. package/dist/registry/index.mjs +2 -0
  120. package/dist/registry/index.mjs.map +1 -0
  121. package/dist/schema/index.cjs +1 -1
  122. package/dist/schema/index.d.cts +2 -0
  123. package/dist/schema/index.d.ts +2 -0
  124. package/dist/schema/index.mjs +1 -1
  125. package/dist/scrum/index.cjs +1 -1
  126. package/dist/scrum/index.d.cts +3 -3
  127. package/dist/scrum/index.d.ts +3 -3
  128. package/dist/scrum/index.mjs +1 -1
  129. package/dist/{types-BScHXlRx.d.ts → types-DLOtndDY.d.cts} +121 -22
  130. package/dist/{types-BScHXlRx.d.cts → types-DLOtndDY.d.ts} +121 -22
  131. package/dist/types.cjs +1 -1
  132. package/dist/types.d.cts +1 -1
  133. package/dist/types.d.ts +1 -1
  134. package/dist/types.mjs +1 -1
  135. package/dist/waterfall/index.cjs +1 -1
  136. package/dist/waterfall/index.d.cts +1 -1
  137. package/dist/waterfall/index.d.ts +1 -1
  138. package/dist/waterfall/index.mjs +1 -1
  139. package/package.json +30 -3
  140. package/dist/chunk-2FRRD6A3.mjs +0 -2
  141. package/dist/chunk-2FRRD6A3.mjs.map +0 -1
  142. package/dist/chunk-6P3OKXSK.mjs +0 -2
  143. package/dist/chunk-6P3OKXSK.mjs.map +0 -1
  144. package/dist/chunk-7FS6KWTG.cjs +0 -2
  145. package/dist/chunk-7FS6KWTG.cjs.map +0 -1
  146. package/dist/chunk-7QQY4KJ2.mjs +0 -2
  147. package/dist/chunk-7QQY4KJ2.mjs.map +0 -1
  148. package/dist/chunk-AD4Z3JBL.cjs +0 -2
  149. package/dist/chunk-AD4Z3JBL.cjs.map +0 -1
  150. package/dist/chunk-ATCJ4IHP.mjs +0 -2
  151. package/dist/chunk-ATCJ4IHP.mjs.map +0 -1
  152. package/dist/chunk-C2IYMWE6.cjs +0 -3
  153. package/dist/chunk-C2IYMWE6.cjs.map +0 -1
  154. package/dist/chunk-EACZBAP3.cjs +0 -2
  155. package/dist/chunk-EACZBAP3.cjs.map +0 -1
  156. package/dist/chunk-EFCUM6DK.mjs +0 -2
  157. package/dist/chunk-EFCUM6DK.mjs.map +0 -1
  158. package/dist/chunk-EHBQBXWA.cjs +0 -2
  159. package/dist/chunk-EHBQBXWA.cjs.map +0 -1
  160. package/dist/chunk-FTS75UIU.mjs +0 -2
  161. package/dist/chunk-FTS75UIU.mjs.map +0 -1
  162. package/dist/chunk-HCRVWMG4.cjs +0 -2
  163. package/dist/chunk-HCRVWMG4.cjs.map +0 -1
  164. package/dist/chunk-KIQOUUEZ.mjs +0 -2
  165. package/dist/chunk-KLWZEXZU.mjs +0 -3
  166. package/dist/chunk-KLWZEXZU.mjs.map +0 -1
  167. package/dist/chunk-NDCQTRIV.mjs +0 -2
  168. package/dist/chunk-NDCQTRIV.mjs.map +0 -1
  169. package/dist/chunk-PMUGU5UJ.cjs +0 -2
  170. package/dist/chunk-PMUGU5UJ.cjs.map +0 -1
  171. package/dist/chunk-PO2SPQJP.cjs +0 -2
  172. package/dist/chunk-QZ6HD6DE.mjs +0 -6
  173. package/dist/chunk-QZ6HD6DE.mjs.map +0 -1
  174. package/dist/chunk-RL27372B.cjs +0 -2
  175. package/dist/chunk-RL27372B.cjs.map +0 -1
  176. package/dist/chunk-S3BXVHO7.cjs +0 -2
  177. package/dist/chunk-S3BXVHO7.cjs.map +0 -1
  178. package/dist/chunk-SP5MC7RR.mjs +0 -2
  179. package/dist/chunk-SP5MC7RR.mjs.map +0 -1
  180. package/dist/chunk-SVGTSPZF.cjs +0 -2
  181. package/dist/chunk-SVGTSPZF.cjs.map +0 -1
  182. package/dist/chunk-SYLO7FUL.mjs +0 -2
  183. package/dist/chunk-SYLO7FUL.mjs.map +0 -1
  184. package/dist/chunk-T3V5UE34.mjs +0 -2
  185. package/dist/chunk-T3V5UE34.mjs.map +0 -1
  186. package/dist/chunk-TS66RAJR.cjs +0 -2
  187. package/dist/chunk-TS66RAJR.cjs.map +0 -1
  188. package/dist/chunk-U23FUYPD.cjs +0 -6
  189. package/dist/chunk-U23FUYPD.cjs.map +0 -1
  190. package/dist/chunk-U6GHFKKE.mjs +0 -2
  191. package/dist/chunk-U6GHFKKE.mjs.map +0 -1
  192. package/dist/chunk-YJQ5YJ7S.cjs +0 -2
  193. package/dist/chunk-YJQ5YJ7S.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schema/generated.ts","../src/schema/validate.ts","../src/schema/index.ts"],"names":["CORE_DEFINITIONS","SCRUM_DEFINITIONS","KANBAN_DEFINITIONS","WATERFALL_DEFINITIONS","INVESTIGATION_DEFINITIONS","EXPERIMENTATION_DEFINITIONS","DEFS","kindOf","v","isType","t","show","s","esc","key","same","a","b","err","path","keyword","message","expected","found","resolve","ref","root","fail","name","def","rank","errors","branchPath","own","e","collapse","branches","first","candidate","consts","c","validate","schema","value","walk","out","types","items","i","obj","prop","at","known","best","failed","branch","merged","assertValid","what","more","DRAFT_07","document","definitions","workflowStateSchema","roleSchema","newItemSchema","itemPatchSchema","handoffSchema","scrumConfigSchema","kanbanConfigSchema","waterfallConfigSchema","investigationConfigSchema","experimentationConfigSchema"],"mappings":"mEAIO,IAAMA,CAAAA,CAA+C,CAC1D,UAAA,CAAY,CAC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A,IAAA,EAAOD,CAAI,CAAA,IAAA,EAAOrB,EAAM,IAAI,CAAA,WAAA,EAAcA,CAAAA,CAAM,QAAQ,CAAA,QAAA,EAAWA,CAAAA,CAAM,KAAK,CAAA,CAChF,EACF,CCzMO,IAAMuB,CAAAA,CAAW,0CAExB,SAASC,CAAAA,CAASjC,CAAAA,CAAckC,CAAAA,CAA6D,CAC3F,OAAO,CAAE,OAAA,CAASF,CAAAA,CAAU,IAAA,CAAM,iBAAiBhC,CAAI,CAAA,CAAA,CAAI,WAAA,CAAAkC,CAAY,CACzE,CAGO,IAAMC,CAAAA,CAAsBF,CAAAA,CAAS,gBAAiB7D,CAAgB,CAAA,CAEhEgE,CAAAA,CAAaH,CAAAA,CAAS,OAAQ7D,CAAgB,CAAA,CAE9CiE,CAAAA,CAAgBJ,CAAAA,CAAS,UAAW7D,CAAgB,CAAA,CAEpDkE,CAAAA,CAAkBL,CAAAA,CAAS,YAAa7D,CAAgB,CAAA,CAExDmE,CAAAA,CAAgBN,CAAAA,CAAS,UAAW7D,CAAgB,CAAA,CAEpDoE,CAAAA,CAAoBP,CAAAA,CAAS,cAAe5D,CAAiB,CAAA,CAC7DoE,CAAAA,CAAqBR,CAAAA,CAAS,eAAgB3D,CAAkB,CAAA,CAChEoE,CAAAA,CAAwBT,CAAAA,CAAS,kBAAmB1D,CAAqB,CAAA,CACzEoE,CAAAA,CAA4BV,CAAAA,CAAS,sBAAuBzD,CAAyB,CAAA,CACrFoE,CAAAA,CAA8BX,CAAAA,CACzC,wBACAxD,CACF","file":"chunk-DVFTTBCT.cjs","sourcesContent":["// GENERATED by scripts/gen-schema.mjs from src/core/types.ts and methodology config.ts files.\n// Do not edit. Run `pnpm schema:gen`; `pnpm schema:check` fails the build when this file is stale.\nimport type { JsonSchema } from \"./types.ts\";\n\nexport const CORE_DEFINITIONS: Record<string, JsonSchema> = {\n Accounting: {\n type: \"object\",\n properties: {\n item: {\n type: \"string\",\n },\n role: {\n type: \"string\",\n },\n model: {\n type: \"string\",\n },\n tokensIn: {\n type: \"number\",\n },\n tokensOut: {\n type: \"number\",\n },\n durationMs: {\n type: \"number\",\n },\n startedAt: {\n type: \"string\",\n },\n endedAt: {\n type: \"string\",\n },\n estimate: {\n type: \"boolean\",\n },\n },\n required: [\n \"item\",\n \"role\",\n \"model\",\n \"tokensIn\",\n \"tokensOut\",\n \"durationMs\",\n \"startedAt\",\n \"endedAt\",\n ],\n additionalProperties: false,\n },\n Baseline: {\n type: \"object\",\n properties: {\n phase: {\n type: \"string\",\n },\n version: {\n type: \"number\",\n },\n at: {\n type: \"string\",\n },\n approvedBy: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n itemSnapshot: {\n type: \"object\",\n additionalProperties: {\n $ref: \"#/definitions/WorkItem\",\n },\n },\n },\n required: [\"phase\", \"version\", \"at\", \"approvedBy\", \"itemSnapshot\"],\n additionalProperties: false,\n },\n BeliefUpdate: {\n type: \"object\",\n properties: {\n result: {\n type: \"string\",\n },\n assessments: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n hypothesis: {\n type: \"string\",\n },\n assessment: {\n type: \"string\",\n enum: [\"supported\", \"refuted\", \"uncertain\"],\n },\n reason: {\n type: \"string\",\n },\n },\n required: [\"hypothesis\", \"assessment\", \"reason\"],\n additionalProperties: false,\n },\n },\n },\n required: [\"result\", \"assessments\"],\n additionalProperties: false,\n },\n Blocker: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n reason: {\n type: \"string\",\n },\n owner: {\n type: \"string\",\n },\n raisedAt: {\n type: \"string\",\n },\n clearedAt: {\n type: \"string\",\n },\n },\n required: [\"id\", \"reason\", \"owner\", \"raisedAt\"],\n additionalProperties: false,\n },\n Budget: {\n type: \"object\",\n properties: {\n tokens: {\n type: \"number\",\n },\n turns: {\n type: \"number\",\n },\n wallclockMs: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n Capability: {\n type: \"string\",\n enum: [\n \"order-backlog\",\n \"define-acceptance\",\n \"facilitate\",\n \"deliver\",\n \"review\",\n \"verify\",\n \"approve-gate\",\n \"manage-flow\",\n \"control-change\",\n \"escalate\",\n ],\n },\n ClassOfService: {\n type: \"string\",\n enum: [\"expedite\", \"fixed-date\", \"standard\", \"intangible\"],\n },\n Event: {\n type: \"object\",\n properties: {\n seq: {\n type: \"number\",\n },\n at: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n },\n by: {\n type: \"string\",\n },\n payload: {},\n },\n required: [\"seq\", \"at\", \"type\", \"by\", \"payload\"],\n additionalProperties: false,\n },\n Evidence: {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n },\n ref: {\n type: \"string\",\n },\n by: {\n type: \"string\",\n },\n at: {\n type: \"string\",\n },\n data: {\n type: \"object\",\n additionalProperties: {},\n },\n },\n required: [\"kind\", \"ref\", \"by\", \"at\"],\n additionalProperties: false,\n },\n Experiment: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n procedureRef: {\n type: \"string\",\n },\n predictions: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n hypothesis: {\n type: \"string\",\n },\n prediction: {\n type: \"string\",\n },\n },\n required: [\"hypothesis\", \"prediction\"],\n additionalProperties: false,\n },\n },\n replayOf: {\n type: \"string\",\n },\n },\n required: [\"id\", \"procedureRef\", \"predictions\"],\n additionalProperties: false,\n },\n ExperimentCandidate: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n item: {\n type: \"string\",\n },\n author: {\n type: \"string\",\n },\n status: {\n type: \"string\",\n enum: [\n \"pending\",\n \"ready\",\n \"running\",\n \"submitted\",\n \"validated\",\n \"failed\",\n \"timed-out\",\n \"cancelled\",\n ],\n },\n workspace: {\n type: \"string\",\n },\n sha: {\n type: \"string\",\n },\n score: {\n type: \"number\",\n },\n spent: {\n $ref: \"#/definitions/Spent\",\n },\n validation: {\n type: \"object\",\n properties: {\n sha: {\n type: \"string\",\n },\n harness: {\n type: \"string\",\n },\n by: {\n type: \"string\",\n },\n passed: {\n type: \"boolean\",\n },\n reproducible: {\n type: \"boolean\",\n },\n evidence: {\n type: \"string\",\n },\n },\n required: [\"sha\", \"harness\", \"by\", \"passed\", \"reproducible\", \"evidence\"],\n additionalProperties: false,\n },\n reason: {\n type: \"string\",\n },\n command: {\n type: \"string\",\n },\n log: {\n type: \"string\",\n },\n terminalLog: {\n type: \"string\",\n },\n },\n required: [\"id\", \"item\", \"author\", \"status\", \"spent\"],\n additionalProperties: false,\n },\n ExperimentationState: {\n type: \"object\",\n properties: {\n status: {\n type: \"string\",\n enum: [\"running\", \"selected\", \"integrating\", \"integrated\", \"stopped\"],\n },\n baseSha: {\n type: \"string\",\n },\n harness: {\n type: \"string\",\n },\n candidates: {\n type: \"object\",\n additionalProperties: {\n $ref: \"#/definitions/ExperimentCandidate\",\n },\n },\n selected: {\n type: \"string\",\n },\n reason: {\n type: \"string\",\n },\n integration: {\n type: \"object\",\n properties: {\n selectedSha: {\n type: \"string\",\n },\n targetSha: {\n type: \"string\",\n },\n sha: {\n type: \"string\",\n },\n by: {\n type: \"string\",\n },\n validation: {\n type: \"object\",\n properties: {\n by: {\n type: \"string\",\n },\n sha: {\n type: \"string\",\n },\n harness: {\n type: \"string\",\n },\n evidence: {\n type: \"string\",\n },\n passed: {\n type: \"boolean\",\n },\n },\n required: [\"by\", \"sha\", \"harness\", \"evidence\", \"passed\"],\n additionalProperties: false,\n },\n },\n required: [\"selectedSha\", \"targetSha\", \"sha\", \"by\"],\n additionalProperties: false,\n },\n released: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n overhead: {\n $ref: \"#/definitions/Spent\",\n },\n },\n required: [\"status\", \"baseSha\", \"harness\", \"candidates\", \"released\", \"overhead\"],\n additionalProperties: false,\n },\n Gate: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n requires: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/GateRequirement\",\n },\n },\n evidence: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n onFail: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n action: {\n type: \"string\",\n const: \"block\",\n },\n },\n required: [\"action\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n action: {\n type: \"string\",\n const: \"return-to\",\n },\n stage: {\n type: \"string\",\n },\n },\n required: [\"action\", \"stage\"],\n additionalProperties: false,\n },\n ],\n },\n },\n required: [\"id\", \"requires\", \"evidence\", \"onFail\"],\n additionalProperties: false,\n },\n GateRequirement: {\n anyOf: [\n {\n type: \"string\",\n const: \"human\",\n },\n {\n type: \"object\",\n properties: {\n capability: {\n type: \"string\",\n },\n },\n required: [\"capability\"],\n additionalProperties: false,\n },\n ],\n },\n Handoff: {\n type: \"object\",\n properties: {\n item: {\n type: \"string\",\n },\n role: {\n type: \"string\",\n },\n produced: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n },\n ref: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"ref\"],\n additionalProperties: false,\n },\n },\n notes: {\n type: \"string\",\n },\n do_not: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n open_questions: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n verdict: {\n $ref: \"#/definitions/Verdict\",\n },\n follow_ups: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/NewItem\",\n },\n },\n lessons: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n text: {\n type: \"string\",\n },\n scope: {\n type: \"string\",\n enum: [\"policy\", \"skill\", \"memory\", \"spec\", \"review\"],\n },\n },\n required: [\"text\", \"scope\"],\n additionalProperties: false,\n },\n },\n },\n required: [\"item\", \"role\", \"produced\", \"notes\", \"do_not\", \"open_questions\"],\n additionalProperties: false,\n },\n Hypothesis: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n claim: {\n type: \"string\",\n },\n falsifiedBy: {\n type: \"string\",\n },\n },\n required: [\"id\", \"claim\", \"falsifiedBy\"],\n additionalProperties: false,\n },\n ImpactAnalysis: {\n type: \"object\",\n properties: {\n summary: {\n type: \"string\",\n },\n reopen: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n weight: {\n type: \"number\",\n },\n },\n required: [\"summary\", \"reopen\", \"weight\"],\n additionalProperties: false,\n },\n InvestigationConclusion: {\n type: \"object\",\n properties: {\n outcome: {\n type: \"string\",\n enum: [\"resolved\", \"inconclusive\"],\n },\n summary: {\n type: \"string\",\n },\n supportedHypothesis: {\n type: \"string\",\n },\n evidenceRefs: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n by: {\n type: \"string\",\n },\n },\n required: [\"outcome\", \"summary\", \"evidenceRefs\", \"by\"],\n additionalProperties: false,\n },\n InvestigationRound: {\n type: \"object\",\n properties: {\n hypotheses: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Hypothesis\",\n },\n },\n experiment: {\n $ref: \"#/definitions/Experiment\",\n },\n item: {\n type: \"string\",\n },\n by: {\n type: \"string\",\n },\n result: {\n $ref: \"#/definitions/Observation\",\n },\n update: {\n $ref: \"#/definitions/BeliefUpdate\",\n },\n },\n required: [\"hypotheses\", \"experiment\", \"item\", \"by\"],\n additionalProperties: false,\n },\n InvestigationState: {\n type: \"object\",\n properties: {\n item: {\n type: \"string\",\n },\n phase: {\n type: \"string\",\n enum: [\n \"hypotheses\",\n \"preregister\",\n \"observe\",\n \"update-belief\",\n \"conclusion\",\n \"review\",\n \"closed\",\n ],\n },\n hypotheses: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Hypothesis\",\n },\n },\n singleHypothesisRationale: {\n type: \"string\",\n },\n rounds: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/InvestigationRound\",\n },\n },\n conclusion: {\n $ref: \"#/definitions/InvestigationConclusion\",\n },\n outcome: {\n type: \"string\",\n enum: [\"resolved\", \"inconclusive\", \"stopped\"],\n },\n stopReason: {\n type: \"string\",\n },\n contributors: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n reviewHistory: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n by: {\n type: \"string\",\n },\n reason: {\n type: \"string\",\n },\n approve: {\n type: \"boolean\",\n },\n next: {\n type: \"string\",\n enum: [\"round\", \"conclusion\"],\n },\n replayRefs: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n required: [\"by\", \"reason\", \"approve\", \"replayRefs\"],\n additionalProperties: false,\n },\n },\n review: {\n type: \"object\",\n properties: {\n by: {\n type: \"string\",\n },\n reason: {\n type: \"string\",\n },\n replayRefs: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n required: [\"by\", \"reason\", \"replayRefs\"],\n additionalProperties: false,\n },\n },\n required: [\"item\", \"phase\", \"hypotheses\", \"rounds\", \"contributors\"],\n additionalProperties: false,\n },\n ItemPatch: {\n type: \"object\",\n properties: {\n type: {\n $ref: \"#/definitions/ItemType\",\n },\n title: {\n type: \"string\",\n },\n description: {\n type: \"string\",\n },\n dependsOn: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n priority: {\n type: \"number\",\n },\n weight: {\n type: \"number\",\n },\n deadline: {\n type: \"string\",\n },\n classOfService: {\n $ref: \"#/definitions/ClassOfService\",\n },\n role: {\n type: \"string\",\n },\n parent: {\n type: \"string\",\n },\n acceptance: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n iteration: {\n type: \"string\",\n },\n traces: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n tags: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n affects: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n phase: {\n type: \"string\",\n },\n impactAnalysis: {\n $ref: \"#/definitions/ImpactAnalysis\",\n },\n },\n additionalProperties: false,\n },\n ItemStatus: {\n type: \"string\",\n enum: [\"todo\", \"in_progress\", \"blocked\", \"review\", \"awaiting_human\", \"done\", \"dropped\"],\n },\n ItemType: {\n type: \"string\",\n enum: [\"epic\", \"story\", \"task\", \"bug\", \"change-request\", \"deliverable\", \"question\"],\n },\n Iteration: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n goal: {\n type: \"string\",\n },\n budget: {\n $ref: \"#/definitions/Budget\",\n },\n spent: {\n $ref: \"#/definitions/Spent\",\n },\n startedAt: {\n type: \"string\",\n },\n endedAt: {\n type: \"string\",\n },\n committed: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n carryover: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n outcome: {\n type: \"string\",\n enum: [\"completed\", \"cancelled\"],\n },\n closing: {\n type: \"boolean\",\n },\n },\n required: [\"id\", \"goal\", \"budget\", \"spent\", \"startedAt\", \"committed\", \"carryover\"],\n additionalProperties: false,\n },\n Lesson: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n at: {\n type: \"string\",\n },\n text: {\n type: \"string\",\n },\n scope: {\n type: \"string\",\n enum: [\"policy\", \"skill\", \"memory\", \"spec\", \"review\"],\n },\n status: {\n type: \"string\",\n enum: [\"raised\", \"adopted\", \"dismissed\"],\n },\n from: {\n type: \"string\",\n },\n item: {\n type: \"string\",\n },\n suggestedChange: {\n $ref: \"#/definitions/LessonChange\",\n },\n },\n required: [\"id\", \"at\", \"text\", \"scope\", \"status\"],\n additionalProperties: false,\n },\n LessonChange: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"agreement\",\n },\n text: {\n type: \"string\",\n },\n replaces: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"text\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"dod\",\n },\n policy: {\n $ref: \"#/definitions/Policy\",\n },\n },\n required: [\"kind\", \"policy\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"backlog\",\n },\n item: {\n $ref: \"#/definitions/NewItem\",\n },\n },\n required: [\"kind\", \"item\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"skill\",\n },\n note: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"note\"],\n additionalProperties: false,\n },\n ],\n },\n MethodologyName: {\n type: \"string\",\n enum: [\"scrum\", \"kanban\", \"waterfall\", \"investigation\", \"experimentation\"],\n },\n ModelTier: {\n type: \"string\",\n enum: [\"small\", \"medium\", \"large\"],\n },\n NewItem: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n stage: {\n type: \"string\",\n },\n type: {\n $ref: \"#/definitions/ItemType\",\n },\n description: {\n type: \"string\",\n },\n dependsOn: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n priority: {\n type: \"number\",\n },\n weight: {\n type: \"number\",\n },\n deadline: {\n type: \"string\",\n },\n classOfService: {\n $ref: \"#/definitions/ClassOfService\",\n },\n role: {\n type: \"string\",\n },\n parent: {\n type: \"string\",\n },\n acceptance: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n iteration: {\n type: \"string\",\n },\n traces: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n tags: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n affects: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n phase: {\n type: \"string\",\n },\n impactAnalysis: {\n $ref: \"#/definitions/ImpactAnalysis\",\n },\n id: {\n type: \"string\",\n },\n title: {\n type: \"string\",\n },\n },\n required: [\"id\", \"title\"],\n },\n Observation: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n valid: {\n type: \"boolean\",\n },\n summary: {\n type: \"string\",\n },\n provenanceRefs: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n required: [\"id\", \"valid\", \"summary\", \"provenanceRefs\"],\n additionalProperties: false,\n },\n PendingHuman: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n kind: {\n type: \"string\",\n enum: [\"gate\", \"decision\"],\n },\n item: {\n type: \"string\",\n },\n gate: {\n type: \"string\",\n },\n question: {\n type: \"string\",\n },\n raisedAt: {\n type: \"string\",\n },\n },\n required: [\"id\", \"kind\", \"question\", \"raisedAt\"],\n additionalProperties: false,\n },\n Phase: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n deliverables: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n gate: {\n $ref: \"#/definitions/Gate\",\n },\n status: {\n type: \"string\",\n enum: [\"pending\", \"open\", \"baselined\", \"reopened\"],\n },\n budget: {\n $ref: \"#/definitions/Budget\",\n },\n produced: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Produced\",\n },\n },\n },\n required: [\"id\", \"name\", \"deliverables\", \"gate\", \"status\"],\n additionalProperties: false,\n },\n Policy: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"evidence\",\n },\n evidenceKind: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"evidenceKind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"acceptance-written\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"estimate-present\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"no-open-blockers\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"dependencies-done\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"custom\",\n },\n id: {\n type: \"string\",\n },\n description: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"id\", \"description\"],\n additionalProperties: false,\n },\n ],\n },\n Produced: {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n },\n ref: {\n type: \"string\",\n },\n by: {\n type: \"string\",\n },\n at: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"ref\", \"by\", \"at\"],\n additionalProperties: false,\n },\n Role: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n modelTier: {\n $ref: \"#/definitions/ModelTier\",\n },\n resourceClass: {\n type: \"string\",\n },\n maxConcurrent: {\n type: \"number\",\n },\n capabilities: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Capability\",\n },\n },\n canApprove: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n inputs: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n outputs: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n do_not: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n constraints: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n required: [\n \"id\",\n \"name\",\n \"modelTier\",\n \"capabilities\",\n \"canApprove\",\n \"inputs\",\n \"outputs\",\n \"do_not\",\n ],\n additionalProperties: false,\n },\n Spent: {\n type: \"object\",\n properties: {\n tokens: {\n type: \"number\",\n },\n turns: {\n type: \"number\",\n },\n wallclockMs: {\n type: \"number\",\n },\n },\n required: [\"tokens\", \"turns\", \"wallclockMs\"],\n additionalProperties: false,\n },\n Stage: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n wipLimit: {\n type: \"number\",\n },\n entryPolicy: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Policy\",\n },\n },\n exitPolicy: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Policy\",\n },\n },\n gate: {\n $ref: \"#/definitions/Gate\",\n },\n commitmentPoint: {\n type: \"boolean\",\n },\n deliveryPoint: {\n type: \"boolean\",\n },\n review: {\n type: \"boolean\",\n },\n },\n required: [\"id\", \"name\", \"entryPolicy\", \"exitPolicy\"],\n additionalProperties: false,\n },\n Transition: {\n type: \"object\",\n properties: {\n from: {\n type: \"object\",\n properties: {\n stage: {\n type: \"string\",\n },\n status: {\n $ref: \"#/definitions/ItemStatus\",\n },\n },\n required: [\"stage\", \"status\"],\n additionalProperties: false,\n },\n to: {\n type: \"object\",\n properties: {\n stage: {\n type: \"string\",\n },\n status: {\n $ref: \"#/definitions/ItemStatus\",\n },\n },\n required: [\"stage\", \"status\"],\n additionalProperties: false,\n },\n at: {\n type: \"string\",\n },\n by: {\n type: \"string\",\n },\n },\n required: [\"from\", \"to\", \"at\", \"by\"],\n additionalProperties: false,\n },\n Verdict: {\n type: \"string\",\n enum: [\"done\", \"blocked\", \"needs-review\", \"rework\", \"escalate\"],\n },\n WorkItem: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n $ref: \"#/definitions/ItemType\",\n },\n title: {\n type: \"string\",\n },\n description: {\n type: \"string\",\n },\n dependsOn: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n priority: {\n type: \"number\",\n },\n weight: {\n type: \"number\",\n },\n deadline: {\n type: \"string\",\n },\n classOfService: {\n $ref: \"#/definitions/ClassOfService\",\n },\n stage: {\n type: \"string\",\n },\n status: {\n $ref: \"#/definitions/ItemStatus\",\n },\n role: {\n type: \"string\",\n },\n parent: {\n type: \"string\",\n },\n acceptance: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n evidence: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Evidence\",\n },\n },\n blockers: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Blocker\",\n },\n },\n transitions: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Transition\",\n },\n },\n iteration: {\n type: \"string\",\n },\n traces: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n tags: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n affects: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n phase: {\n type: \"string\",\n },\n impactAnalysis: {\n $ref: \"#/definitions/ImpactAnalysis\",\n },\n },\n required: [\n \"id\",\n \"type\",\n \"title\",\n \"dependsOn\",\n \"stage\",\n \"status\",\n \"acceptance\",\n \"evidence\",\n \"blockers\",\n \"transitions\",\n ],\n additionalProperties: false,\n },\n WorkflowExt: {\n type: \"object\",\n properties: {\n investigation: {\n $ref: \"#/definitions/InvestigationState\",\n },\n experimentation: {\n $ref: \"#/definitions/ExperimentationState\",\n },\n },\n additionalProperties: {},\n },\n WorkflowState: {\n type: \"object\",\n properties: {\n version: {\n type: \"number\",\n const: 1,\n },\n methodology: {\n $ref: \"#/definitions/MethodologyName\",\n },\n config: {},\n investigation: {\n $ref: \"#/definitions/InvestigationState\",\n deprecated: true,\n },\n experimentation: {\n $ref: \"#/definitions/ExperimentationState\",\n deprecated: true,\n },\n ext: {\n $ref: \"#/definitions/WorkflowExt\",\n },\n items: {\n type: \"object\",\n additionalProperties: {\n $ref: \"#/definitions/WorkItem\",\n },\n },\n stages: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Stage\",\n },\n },\n roles: {\n type: \"object\",\n additionalProperties: {\n $ref: \"#/definitions/Role\",\n },\n },\n iterations: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Iteration\",\n },\n },\n phases: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Phase\",\n },\n },\n baseline: {\n $ref: \"#/definitions/Baseline\",\n },\n baselines: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Baseline\",\n },\n },\n events: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Event\",\n },\n },\n accounting: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Accounting\",\n },\n },\n pending: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/PendingHuman\",\n },\n },\n lessons: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Lesson\",\n },\n },\n agreements: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n required: [\n \"version\",\n \"methodology\",\n \"config\",\n \"items\",\n \"stages\",\n \"roles\",\n \"iterations\",\n \"events\",\n \"accounting\",\n \"pending\",\n \"lessons\",\n \"agreements\",\n ],\n additionalProperties: false,\n },\n};\n\nexport const SCRUM_DEFINITIONS: Record<string, JsonSchema> = {\n Budget: {\n type: \"object\",\n properties: {\n tokens: {\n type: \"number\",\n },\n turns: {\n type: \"number\",\n },\n wallclockMs: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n EstimateMode: {\n type: \"string\",\n enum: [\"per-weight\", \"per-call\"],\n },\n Policy: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"evidence\",\n },\n evidenceKind: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"evidenceKind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"acceptance-written\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"estimate-present\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"no-open-blockers\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"dependencies-done\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"custom\",\n },\n id: {\n type: \"string\",\n },\n description: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"id\", \"description\"],\n additionalProperties: false,\n },\n ],\n },\n ScrumConfig: {\n type: \"object\",\n properties: {\n sprintBudget: {\n $ref: \"#/definitions/Budget\",\n },\n productGoal: {\n type: \"string\",\n },\n definitionOfDone: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Policy\",\n },\n },\n refinementSharePct: {\n type: \"number\",\n },\n allowMidSprintAdd: {\n type: \"string\",\n enum: [\"never\", \"po-only\", \"any\"],\n },\n inProgressWipLimit: {\n type: \"number\",\n },\n autoClose: {\n type: \"boolean\",\n },\n estimateMode: {\n $ref: \"#/definitions/EstimateMode\",\n },\n fallbackTokensPerWeight: {\n type: \"number\",\n },\n },\n required: [\n \"sprintBudget\",\n \"productGoal\",\n \"definitionOfDone\",\n \"refinementSharePct\",\n \"allowMidSprintAdd\",\n ],\n additionalProperties: false,\n },\n};\n\nexport const KANBAN_DEFINITIONS: Record<string, JsonSchema> = {\n ClassConfig: {\n type: \"object\",\n properties: {\n wipBypass: {\n type: \"number\",\n },\n sle: {\n $ref: \"#/definitions/ServiceLevel\",\n },\n },\n additionalProperties: false,\n },\n KanbanColumn: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n wipLimit: {\n type: \"number\",\n },\n policies: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/Policy\",\n },\n },\n commitmentPoint: {\n type: \"boolean\",\n },\n deliveryPoint: {\n type: \"boolean\",\n },\n review: {\n type: \"boolean\",\n },\n },\n required: [\"id\", \"name\", \"policies\"],\n additionalProperties: false,\n },\n KanbanConfig: {\n type: \"object\",\n properties: {\n columns: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/KanbanColumn\",\n },\n },\n classesOfService: {\n type: \"object\",\n properties: {\n expedite: {\n $ref: \"#/definitions/ClassConfig\",\n },\n \"fixed-date\": {\n $ref: \"#/definitions/ClassConfig\",\n },\n standard: {\n $ref: \"#/definitions/ClassConfig\",\n },\n intangible: {\n $ref: \"#/definitions/ClassConfig\",\n },\n },\n additionalProperties: false,\n },\n fairness: {\n type: \"object\",\n properties: {\n aging: {\n type: \"boolean\",\n },\n maxDeferralRounds: {\n type: \"number\",\n },\n },\n required: [\"aging\", \"maxDeferralRounds\"],\n additionalProperties: false,\n },\n cadences: {\n type: \"object\",\n properties: {\n replenishment: {\n type: \"object\",\n properties: {\n everyTurns: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n \"delivery-planning\": {\n type: \"object\",\n properties: {\n everyTurns: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n \"service-delivery-review\": {\n type: \"object\",\n properties: {\n everyTurns: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n \"operations-review\": {\n type: \"object\",\n properties: {\n everyTurns: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n \"risk-review\": {\n type: \"object\",\n properties: {\n everyTurns: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n \"strategy-review\": {\n type: \"object\",\n properties: {\n everyTurns: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n },\n throughputWindowMs: {\n type: \"number\",\n },\n maxExpedite: {\n type: \"number\",\n },\n },\n required: [\n \"columns\",\n \"classesOfService\",\n \"fairness\",\n \"cadences\",\n \"throughputWindowMs\",\n \"maxExpedite\",\n ],\n additionalProperties: false,\n },\n Policy: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"evidence\",\n },\n evidenceKind: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"evidenceKind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"acceptance-written\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"estimate-present\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"no-open-blockers\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"dependencies-done\",\n },\n },\n required: [\"kind\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n kind: {\n type: \"string\",\n const: \"custom\",\n },\n id: {\n type: \"string\",\n },\n description: {\n type: \"string\",\n },\n },\n required: [\"kind\", \"id\", \"description\"],\n additionalProperties: false,\n },\n ],\n },\n ServiceLevel: {\n type: \"object\",\n properties: {\n percentile: {\n type: \"number\",\n },\n targetMs: {\n type: \"number\",\n },\n },\n required: [\"percentile\", \"targetMs\"],\n additionalProperties: false,\n },\n};\n\nexport const WATERFALL_DEFINITIONS: Record<string, JsonSchema> = {\n Budget: {\n type: \"object\",\n properties: {\n tokens: {\n type: \"number\",\n },\n turns: {\n type: \"number\",\n },\n wallclockMs: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n Gate: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n requires: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/GateRequirement\",\n },\n },\n evidence: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n onFail: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n action: {\n type: \"string\",\n const: \"block\",\n },\n },\n required: [\"action\"],\n additionalProperties: false,\n },\n {\n type: \"object\",\n properties: {\n action: {\n type: \"string\",\n const: \"return-to\",\n },\n stage: {\n type: \"string\",\n },\n },\n required: [\"action\", \"stage\"],\n additionalProperties: false,\n },\n ],\n },\n },\n required: [\"id\", \"requires\", \"evidence\", \"onFail\"],\n additionalProperties: false,\n },\n GateRequirement: {\n anyOf: [\n {\n type: \"string\",\n const: \"human\",\n },\n {\n type: \"object\",\n properties: {\n capability: {\n type: \"string\",\n },\n },\n required: [\"capability\"],\n additionalProperties: false,\n },\n ],\n },\n WaterfallConfig: {\n type: \"object\",\n properties: {\n phases: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/WaterfallPhaseConfig\",\n },\n },\n changeControl: {\n type: \"object\",\n properties: {\n requiresImpactAnalysis: {\n type: \"boolean\",\n },\n approvers: {\n type: \"array\",\n items: {\n $ref: \"#/definitions/GateRequirement\",\n },\n },\n },\n required: [\"requiresImpactAnalysis\", \"approvers\"],\n additionalProperties: false,\n },\n traceability: {\n type: \"object\",\n properties: {\n from: {\n type: \"string\",\n },\n to: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n },\n required: [\"from\", \"to\"],\n additionalProperties: false,\n },\n humanGates: {\n anyOf: [\n {\n type: \"string\",\n const: \"all\",\n },\n {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n ],\n },\n fallbackTokensPerWeight: {\n type: \"number\",\n },\n },\n required: [\"phases\", \"changeControl\", \"traceability\", \"humanGates\"],\n additionalProperties: false,\n },\n WaterfallPhaseConfig: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n },\n name: {\n type: \"string\",\n },\n deliverables: {\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n gate: {\n $ref: \"#/definitions/Gate\",\n },\n budget: {\n $ref: \"#/definitions/Budget\",\n },\n deliverBy: {\n type: \"string\",\n },\n },\n required: [\"id\", \"name\", \"deliverables\", \"gate\"],\n additionalProperties: false,\n },\n};\n\nexport const INVESTIGATION_DEFINITIONS: Record<string, JsonSchema> = {\n Budget: {\n type: \"object\",\n properties: {\n tokens: {\n type: \"number\",\n },\n turns: {\n type: \"number\",\n },\n wallclockMs: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n InvestigationConfig: {\n type: \"object\",\n properties: {\n question: {\n type: \"string\",\n },\n maxRounds: {\n type: \"number\",\n },\n budget: {\n $ref: \"#/definitions/Budget\",\n },\n },\n required: [\"question\", \"maxRounds\", \"budget\"],\n additionalProperties: false,\n },\n};\n\nexport const EXPERIMENTATION_DEFINITIONS: Record<string, JsonSchema> = {\n Budget: {\n type: \"object\",\n properties: {\n tokens: {\n type: \"number\",\n },\n turns: {\n type: \"number\",\n },\n wallclockMs: {\n type: \"number\",\n },\n },\n additionalProperties: false,\n },\n ExperimentationConfig: {\n type: \"object\",\n properties: {\n objective: {\n type: \"string\",\n },\n direction: {\n type: \"string\",\n enum: [\"minimize\", \"maximize\"],\n },\n tieBreak: {\n type: \"string\",\n const: \"candidate-id\",\n },\n concurrencyCap: {\n type: \"number\",\n },\n maxCandidates: {\n type: \"number\",\n },\n candidateBudget: {\n $ref: \"#/definitions/Budget\",\n },\n totalBudget: {\n $ref: \"#/definitions/Budget\",\n },\n },\n required: [\n \"objective\",\n \"direction\",\n \"tieBreak\",\n \"concurrencyCap\",\n \"maxCandidates\",\n \"candidateBudget\",\n \"totalBudget\",\n ],\n additionalProperties: false,\n },\n};\n","import { fail } from \"../core/errors.ts\";\nimport type { JsonSchema, SchemaError } from \"./types.ts\";\n\nconst DEFS = \"#/definitions/\";\n\nfunction kindOf(v: unknown): string {\n if (v === null) return \"null\";\n if (Array.isArray(v)) return \"array\";\n return typeof v;\n}\nfunction isType(t: string, v: unknown): boolean {\n if (t === \"integer\") return typeof v === \"number\" && Number.isInteger(v);\n return kindOf(v) === t;\n}\nfunction show(v: unknown): string {\n const s = JSON.stringify(v);\n if (s === undefined) return String(v);\n return s.length > 60 ? `${s.slice(0, 57)}...` : s;\n}\n/** JSON-pointer escaping for one key. */\nfunction esc(key: string): string {\n return key.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nfunction same(a: unknown, b: unknown): boolean {\n return JSON.stringify(a) === JSON.stringify(b);\n}\nfunction err(\n path: string,\n keyword: string,\n message: string,\n expected: string,\n found: string,\n): SchemaError {\n return { path: path === \"\" ? \"/\" : path, keyword, message, expected, found };\n}\n\nfunction resolve(ref: string, root: JsonSchema): JsonSchema {\n if (!ref.startsWith(DEFS))\n fail(\n \"invalid-input\",\n `schema $ref ${JSON.stringify(ref)} is not #/definitions/<name>`,\n \"regenerate the schema with pnpm schema:gen\",\n );\n const name = ref.slice(DEFS.length);\n const def =\n root.definitions && Object.hasOwn(root.definitions, name) ? root.definitions[name] : undefined;\n if (!def)\n fail(\n \"invalid-input\",\n `schema $ref ${JSON.stringify(ref)} names no definition`,\n \"regenerate the schema with pnpm schema:gen\",\n );\n return def;\n}\n\n/**\n * Misfit of one anyOf branch (lower is a better fit): a `type` error at the branch's own path (the value is the\n * wrong kind entirely) weighs 1000, a `const` mismatch (a discriminator) 100, anything else 1.\n */\nfunction rank(errors: SchemaError[], branchPath: string): number {\n const own = branchPath === \"\" ? \"/\" : branchPath;\n return errors.reduce(\n (n, e) => n + (e.keyword === \"type\" && e.path === own ? 1000 : e.keyword === \"const\" ? 100 : 1),\n 0,\n );\n}\n\n/** When every failed branch has a `const` error at one pointer (the discriminator), report that once as an enum. */\nfunction collapse(branches: SchemaError[][]): SchemaError | undefined {\n const first = branches[0]?.filter((e) => e.keyword === \"const\") ?? [];\n for (const candidate of first) {\n const consts = branches.map((b) =>\n b.find((e) => e.keyword === \"const\" && e.path === candidate.path),\n );\n if (consts.some((c) => c === undefined)) continue;\n const expected = [...new Set(consts.map((c) => c?.expected))].join(\" | \");\n return {\n path: candidate.path,\n keyword: \"enum\",\n message: `expected one of ${expected}`,\n expected,\n found: candidate.found,\n };\n }\n return undefined;\n}\n\n/** Validate `value` against `schema` (a document: `$ref`s resolve against its `definitions`). Returns every error found. */\nexport function validate(schema: JsonSchema, value: unknown): SchemaError[] {\n return walk(schema, value, schema, \"\");\n}\n\nfunction walk(schema: JsonSchema, value: unknown, root: JsonSchema, path: string): SchemaError[] {\n if (schema.$ref !== undefined) return walk(resolve(schema.$ref, root), value, root, path);\n const out: SchemaError[] = [];\n if (schema.type !== undefined) {\n const types = Array.isArray(schema.type) ? schema.type : [schema.type];\n if (!types.some((t) => isType(t, value))) {\n const expected = types.join(\" | \");\n return [\n err(path, \"type\", `expected ${expected}, got ${kindOf(value)}`, expected, show(value)),\n ];\n }\n }\n if (schema.const !== undefined && !same(value, schema.const))\n out.push(err(path, \"const\", `expected ${show(schema.const)}`, show(schema.const), show(value)));\n if (schema.enum !== undefined && !schema.enum.some((e) => same(e, value))) {\n const expected = schema.enum.map(show).join(\" | \");\n out.push(err(path, \"enum\", `expected one of ${expected}`, expected, show(value)));\n }\n if (typeof value === \"number\") {\n if (schema.minimum !== undefined && value < schema.minimum)\n out.push(\n err(path, \"minimum\", `expected >= ${schema.minimum}`, `>= ${schema.minimum}`, show(value)),\n );\n if (schema.maximum !== undefined && value > schema.maximum)\n out.push(\n err(path, \"maximum\", `expected <= ${schema.maximum}`, `<= ${schema.maximum}`, show(value)),\n );\n }\n if (typeof value === \"string\") {\n if (schema.minLength !== undefined && value.length < schema.minLength)\n out.push(\n err(\n path,\n \"minLength\",\n `expected at least ${schema.minLength} characters`,\n `length >= ${schema.minLength}`,\n show(value),\n ),\n );\n if (schema.pattern !== undefined && !new RegExp(schema.pattern, \"u\").test(value))\n out.push(\n err(\n path,\n \"pattern\",\n `expected to match /${schema.pattern}/`,\n `/${schema.pattern}/`,\n show(value),\n ),\n );\n }\n if (Array.isArray(value) && schema.items !== undefined) {\n const items = schema.items;\n value.forEach((v, i) => out.push(...walk(items, v, root, `${path}/${i}`)));\n }\n if (kindOf(value) === \"object\") {\n const obj = value as Record<string, unknown>;\n for (const [key, v] of Object.entries(obj)) {\n const prop =\n schema.properties && Object.hasOwn(schema.properties, key)\n ? schema.properties[key]\n : undefined;\n const at = `${path}/${esc(key)}`;\n if (prop) out.push(...walk(prop, v, root, at));\n else if (schema.additionalProperties === false) {\n const known = Object.keys(schema.properties ?? {}).join(\", \");\n out.push(\n err(\n at,\n \"additionalProperties\",\n `unknown property ${JSON.stringify(key)}`,\n known ? `one of ${known}` : \"no properties\",\n key,\n ),\n );\n } else if (typeof schema.additionalProperties === \"object\")\n out.push(...walk(schema.additionalProperties, v, root, at));\n }\n for (const key of schema.required ?? [])\n if (!Object.hasOwn(obj, key))\n out.push(\n err(\n `${path}/${esc(key)}`,\n \"required\",\n `missing required property ${JSON.stringify(key)}`,\n \"present\",\n \"absent\",\n ),\n );\n }\n if (schema.anyOf !== undefined) {\n let best: SchemaError[] | undefined;\n const failed: SchemaError[][] = [];\n for (const branch of schema.anyOf) {\n const errors = walk(branch, value, root, path);\n if (errors.length === 0) {\n best = [];\n break;\n }\n failed.push(errors);\n if (best === undefined || rank(errors, path) < rank(best, path)) best = errors;\n }\n const merged = best && best.length > 0 ? collapse(failed) : undefined;\n if (merged) out.push(merged);\n else if (best) out.push(...best);\n }\n return out;\n}\n\n/** Throw WorkflowError(\"invalid-input\") describing the first problem when `value` does not match `schema`. */\nexport function assertValid(schema: JsonSchema, value: unknown, what: string): void {\n const errors = validate(schema, value);\n const first = errors[0];\n if (!first) return;\n const more = errors.length > 1 ? ` (+${errors.length - 1} more)` : \"\";\n fail(\n \"invalid-input\",\n `${what} does not match its schema: ${first.path} ${first.message}${more}`,\n `fix ${what} at ${first.path}: expected ${first.expected}, found ${first.found}`,\n );\n}\n","import {\n CORE_DEFINITIONS,\n KANBAN_DEFINITIONS,\n SCRUM_DEFINITIONS,\n WATERFALL_DEFINITIONS,\n INVESTIGATION_DEFINITIONS,\n EXPERIMENTATION_DEFINITIONS,\n} from \"./generated.ts\";\nimport type { JsonSchema, JsonSchemaDocument } from \"./types.ts\";\n\nexport const DRAFT_07 = \"http://json-schema.org/draft-07/schema#\";\n\nfunction document(name: string, definitions: Record<string, JsonSchema>): JsonSchemaDocument {\n return { $schema: DRAFT_07, $ref: `#/definitions/${name}`, definitions };\n}\n\n/** `.workflow/state.json` */\nexport const workflowStateSchema = document(\"WorkflowState\", CORE_DEFINITIONS);\n/** a role manifest (`.workflow/roles/*.json`, `exwf role add`) */\nexport const roleSchema = document(\"Role\", CORE_DEFINITIONS);\n/** `exwf add <item.json>` */\nexport const newItemSchema = document(\"NewItem\", CORE_DEFINITIONS);\n/** `exwf edit <id> <patch.json>` */\nexport const itemPatchSchema = document(\"ItemPatch\", CORE_DEFINITIONS);\n/** `exwf complete <id> <handoff.json>` */\nexport const handoffSchema = document(\"Handoff\", CORE_DEFINITIONS);\n/** `exwf init scrum --config` / the scrum-master policy.json */\nexport const scrumConfigSchema = document(\"ScrumConfig\", SCRUM_DEFINITIONS);\nexport const kanbanConfigSchema = document(\"KanbanConfig\", KANBAN_DEFINITIONS);\nexport const waterfallConfigSchema = document(\"WaterfallConfig\", WATERFALL_DEFINITIONS);\nexport const investigationConfigSchema = document(\"InvestigationConfig\", INVESTIGATION_DEFINITIONS);\nexport const experimentationConfigSchema = document(\n \"ExperimentationConfig\",\n EXPERIMENTATION_DEFINITIONS,\n);\n\nexport { validate, assertValid } from \"./validate.ts\";\nexport type { JsonSchema, JsonSchemaDocument, SchemaError } from \"./types.ts\";\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunk3ZUBCA7Q_cjs=require('./chunk-3ZUBCA7Q.cjs'),chunkYGCNLXPJ_cjs=require('./chunk-YGCNLXPJ.cjs'),chunk2FBA7RBS_cjs=require('./chunk-2FBA7RBS.cjs'),chunkUMG3WOD7_cjs=require('./chunk-UMG3WOD7.cjs'),chunk4F5HZLKD_cjs=require('./chunk-4F5HZLKD.cjs'),chunkOSHBJIYD_cjs=require('./chunk-OSHBJIYD.cjs');var N=[["vocabulary","object"],["validateConfig","function"],["defaultStages","function"],["defaultRoles","function"],["requiredCapabilities","array"],["exclusiveCapabilities","array"],["plannerOptions","function"],["candidates","function"],["invariants","function"],["ceremonies","object"],["rules","array"],["metrics","function"],["humanDefaults","object"]],b=r=>{try{return String(r)}catch{return "a non-Error value"}};function M(r){let e=new Map,l=(o,t,w=false)=>{if(chunkOSHBJIYD_cjs.c(o,"methodology name"),typeof t!="function"&&chunkOSHBJIYD_cjs.b("invalid-input",`methodology "${o}" factory must be a function`,'pass the factory itself, e.g. registerMethodology("triage", triage)'),e.has(o)&&chunkOSHBJIYD_cjs.b("invalid-input",`methodology "${o}" is already registered`,`pick a name that is not one of: ${[...e.keys()].join(", ")}`),!w){let n;try{n=t();}catch(i){if(i instanceof chunkOSHBJIYD_cjs.a)throw i;chunkOSHBJIYD_cjs.b("invalid-input",`methodology "${o}" factory threw: ${b(i)}`,"fix the factory: registration calls it once");}let y=typeof n!="object"||n===null?"an object":n.name!==o?`name "${o}"`:N.find(([i,d])=>d==="array"?!Array.isArray(n[i]):typeof n[i]!==d||!n[i])?.[0];y&&chunkOSHBJIYD_cjs.b("invalid-input",`methodology "${o}" factory must return a Methodology; it lacks ${y}`,"return the full Methodology object (name, vocabulary, validateConfig, defaultStages, defaultRoles, capabilities, plannerOptions, candidates, invariants, ceremonies, rules, metrics, humanDefaults)");}e.set(o,t);};for(let[o,t]of Object.entries(r))l(o,t,true);return {registerMethodology:(o,t)=>l(o,t),methodologyFactory(o){chunkOSHBJIYD_cjs.c(o,"methodology name");let t=e.get(o);return t||chunkOSHBJIYD_cjs.b("invalid-input",`unknown methodology "${o}"`,`known methodologies: ${[...e.keys()].join(", ")||"(none)"}; register a custom one with registerMethodology`),t},registeredMethodologies:()=>[...e.keys()]}}var v,g=()=>v??=M({scrum:chunk3ZUBCA7Q_cjs.l,kanban:chunkYGCNLXPJ_cjs.I,waterfall:chunk2FBA7RBS_cjs.N,investigation:chunkUMG3WOD7_cjs.b,experimentation:chunk4F5HZLKD_cjs.h});function S(r,e){g().registerMethodology(r,e);}function O(r){return g().methodologyFactory(r)}function A(){return g().registeredMethodologies()}exports.a=S;exports.b=O;exports.c=A;//# sourceMappingURL=chunk-EQXYFHHD.cjs.map
2
+ //# sourceMappingURL=chunk-EQXYFHHD.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/interface/registry.ts","../src/registry.ts"],"names":["MEMBERS","thrown","e","createMethodologyRegistry","initial","table","register","name","factory","builtIn","assertId","fail","m","WorkflowError","missing","key","kind","registry","builtins","scrum","kanban","waterfall","investigation","experimentation","registerMethodology","methodologyFactory","registeredMethodologies"],"mappings":"6TAoBA,IAAMA,EAAU,CACd,CAAC,YAAA,CAAc,QAAQ,EACvB,CAAC,gBAAA,CAAkB,UAAU,CAAA,CAC7B,CAAC,eAAA,CAAiB,UAAU,CAAA,CAC5B,CAAC,eAAgB,UAAU,CAAA,CAC3B,CAAC,sBAAA,CAAwB,OAAO,CAAA,CAChC,CAAC,uBAAA,CAAyB,OAAO,EACjC,CAAC,gBAAA,CAAkB,UAAU,CAAA,CAC7B,CAAC,YAAA,CAAc,UAAU,EACzB,CAAC,YAAA,CAAc,UAAU,CAAA,CACzB,CAAC,YAAA,CAAc,QAAQ,EACvB,CAAC,OAAA,CAAS,OAAO,CAAA,CACjB,CAAC,SAAA,CAAW,UAAU,CAAA,CACtB,CAAC,gBAAiB,QAAQ,CAC5B,EAOMC,CAA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U,GAAS,CAAE,mBAAA,CAAoBX,EAAMC,CAAO,EAC9C,CAGO,SAASiB,EAA8ClB,CAAAA,CAAgC,CAC5F,OAAOW,CAAAA,GAAW,kBAAA,CAAmBX,CAAI,CAC3C,CAGO,SAASmB,CAAAA,EAAoC,CAClD,OAAOR,CAAAA,EAAS,CAAE,yBACpB","file":"chunk-EQXYFHHD.cjs","sourcesContent":["import { WorkflowError, assertId, fail } from \"../core/errors.ts\";\nimport type { Methodology } from \"../core/types.ts\";\n\n/** A methodology factory, as the built-in entries export them (`scrum`, `kanban`, ...). */\nexport type MethodologyFactory<N extends string = string> = () => Methodology<unknown, N>;\n\n/** Name -> factory lookup: what `exwf init <name>` and a state's `methodology` resolve through. */\nexport interface MethodologyRegistry {\n /**\n * Adds `name`; a name already registered (a built-in included) fails `invalid-input`. The\n * factory is called once to check that it returns a Methodology named `name`.\n */\n registerMethodology<C, N extends string>(name: N, factory: () => Methodology<C, N>): void;\n /** The factory registered under `name`; an unknown name fails `invalid-input` listing the known ones. */\n methodologyFactory<N extends string = string>(name: N): MethodologyFactory<N>;\n /** Registered names, pre-registered ones first, then in registration order. */\n registeredMethodologies(): string[];\n}\n\n// the required members of a Methodology (src/core/types.ts) and their runtime kinds\nconst MEMBERS = [\n [\"vocabulary\", \"object\"],\n [\"validateConfig\", \"function\"],\n [\"defaultStages\", \"function\"],\n [\"defaultRoles\", \"function\"],\n [\"requiredCapabilities\", \"array\"],\n [\"exclusiveCapabilities\", \"array\"],\n [\"plannerOptions\", \"function\"],\n [\"candidates\", \"function\"],\n [\"invariants\", \"function\"],\n [\"ceremonies\", \"object\"],\n [\"rules\", \"array\"],\n [\"metrics\", \"function\"],\n [\"humanDefaults\", \"object\"],\n] as const;\n\n/**\n * A registry pre-registered with `initial`. The interface layer cannot import the methodologies,\n * so the outer ring passes the five built-ins in (design spec section 26, \"Registry placement\").\n */\n// String() throws on a null-prototype value; for an Error it reads `Name: message`\nconst thrown = (e: unknown): string => {\n try {\n return String(e);\n } catch {\n return \"a non-Error value\";\n }\n};\n\nexport function createMethodologyRegistry(\n // factories of different names share no sound common type (a ceremony is contravariant in\n // its state's name), so the table stores them untyped and lookup restores the name\n initial: Record<string, () => unknown>,\n): MethodologyRegistry {\n const table = new Map<string, () => unknown>();\n const register = (name: string, factory: unknown, builtIn = false) => {\n assertId(name, \"methodology name\");\n if (typeof factory !== \"function\")\n fail(\n \"invalid-input\",\n `methodology \"${name}\" factory must be a function`,\n 'pass the factory itself, e.g. registerMethodology(\"triage\", triage)',\n );\n if (table.has(name))\n fail(\n \"invalid-input\",\n `methodology \"${name}\" is already registered`,\n `pick a name that is not one of: ${[...table.keys()].join(\", \")}`,\n );\n // a custom factory runs once here, so a wrong result fails at registration, not at init\n if (!builtIn) {\n let m: Record<string, unknown> | null;\n try {\n m = (factory as () => unknown)() as Record<string, unknown> | null;\n } catch (e) {\n if (e instanceof WorkflowError) throw e;\n fail(\n \"invalid-input\",\n `methodology \"${name}\" factory threw: ${thrown(e)}`,\n \"fix the factory: registration calls it once\",\n );\n }\n const missing =\n typeof m !== \"object\" || m === null\n ? \"an object\"\n : m[\"name\"] !== name\n ? `name \"${name}\"`\n : MEMBERS.find(([key, kind]) =>\n kind === \"array\" ? !Array.isArray(m[key]) : typeof m[key] !== kind || !m[key],\n )?.[0];\n if (missing)\n fail(\n \"invalid-input\",\n `methodology \"${name}\" factory must return a Methodology; it lacks ${missing}`,\n \"return the full Methodology object (name, vocabulary, validateConfig, defaultStages, defaultRoles, capabilities, plannerOptions, candidates, invariants, ceremonies, rules, metrics, humanDefaults)\",\n );\n }\n table.set(name, factory as () => unknown);\n };\n for (const [name, factory] of Object.entries(initial)) register(name, factory, true);\n return {\n registerMethodology: (name, factory) => register(name, factory),\n methodologyFactory<N extends string>(name: N): MethodologyFactory<N> {\n assertId(name, \"methodology name\");\n const factory = table.get(name);\n if (!factory)\n fail(\n \"invalid-input\",\n `unknown methodology \"${name}\"`,\n `known methodologies: ${[...table.keys()].join(\", \") || \"(none)\"}; register a custom one with registerMethodology`,\n );\n return factory as MethodologyFactory<N>;\n },\n registeredMethodologies: () => [...table.keys()],\n };\n}\n","// The `ex-workflow/registry` entry: the methodology registry with the five built-ins\n// pre-registered (design spec section 26, \"Registry placement\"). Outer ring: src/interface/ may\n// not import src/methodologies/, so the built-in table lives here; the CLI resolves through it. The registry is created on first use, so a bundle that never\n// calls these functions does not keep the built-in factories.\nimport { experimentation } from \"./methodologies/experimentation/index.ts\";\nimport { investigation } from \"./methodologies/investigation/index.ts\";\nimport { kanban } from \"./methodologies/kanban/index.ts\";\nimport { scrum } from \"./methodologies/scrum/index.ts\";\nimport { waterfall } from \"./methodologies/waterfall/index.ts\";\nimport {\n createMethodologyRegistry,\n type MethodologyFactory,\n type MethodologyRegistry,\n} from \"./interface/registry.ts\";\nimport type { Methodology } from \"./core/types.ts\";\n\nexport type { MethodologyFactory, MethodologyRegistry };\n\nlet registry: MethodologyRegistry | undefined;\nconst builtins = (): MethodologyRegistry =>\n (registry ??= createMethodologyRegistry({\n scrum,\n kanban,\n waterfall,\n investigation,\n experimentation,\n }));\n\n/** Registers a custom methodology (SDK only in 1.2); a taken name, a built-in included, fails `invalid-input`. */\nexport function registerMethodology<C, N extends string>(\n name: N,\n factory: () => Methodology<C, N>,\n): void {\n builtins().registerMethodology(name, factory);\n}\n\n/** The factory registered under `name`; an unknown name fails `invalid-input` listing the known ones. */\nexport function methodologyFactory<N extends string = string>(name: N): MethodologyFactory<N> {\n return builtins().methodologyFactory(name);\n}\n\n/** The registered names: the five built-ins, then custom ones in registration order. */\nexport function registeredMethodologies(): string[] {\n return builtins().registeredMethodologies();\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function o(e){if(typeof e=="object"&&e!==null&&!Object.isFrozen(e)){for(let t of Object.values(e))o(t);Object.freeze(e);}return e}exports.a=o;//# sourceMappingURL=chunk-GKN5M4B7.cjs.map
2
+ //# sourceMappingURL=chunk-GKN5M4B7.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common/deep-freeze.ts"],"names":["deepFreeze","value","v"],"mappings":"aAIO,SAASA,CAAAA,CAAcC,CAAAA,CAAa,CACzC,GAAI,OAAOA,CAAAA,EAAU,QAAA,EAAYA,CAAAA,GAAU,IAAA,EAAQ,CAAC,MAAA,CAAO,QAAA,CAASA,CAAK,CAAA,CAAG,CAC1E,IAAA,IAAWC,CAAAA,IAAK,MAAA,CAAO,MAAA,CAAOD,CAAK,CAAA,CAAGD,CAAAA,CAAWE,CAAC,CAAA,CAClD,MAAA,CAAO,MAAA,CAAOD,CAAK,EACrB,CACA,OAAOA,CACT","file":"chunk-GKN5M4B7.cjs","sourcesContent":["/**\n * Freezes `value` and every object or array inside it, and returns it with its declared type, so\n * an exported built-in constant cannot be changed for every other caller in the process.\n */\nexport function deepFreeze<T>(value: T): T {\n if (typeof value === \"object\" && value !== null && !Object.isFrozen(value)) {\n for (const v of Object.values(value)) deepFreeze(v);\n Object.freeze(value);\n }\n return value;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkMU26QW32_cjs=require('./chunk-MU26QW32.cjs'),chunkOSHBJIYD_cjs=require('./chunk-OSHBJIYD.cjs');var l=r=>r.agreements.length===0?"(none)":r.agreements.map(e=>`"${e}"`).join(", ");function a(r,e,n){return chunkOSHBJIYD_cjs.b("invalid-input",`no working agreement ${JSON.stringify(e)} to ${n}`,`current agreements: ${l(r)}; name one of them exactly`)}function m(r,e,n,s){if(e.replaces===e.text)return r;let t=r;return e.replaces!==void 0&&((typeof e.replaces!="string"||!t.agreements.includes(e.replaces))&&a(t,e.replaces,"replace"),t={...t,agreements:t.agreements.filter(i=>i!==e.replaces)},t=chunkMU26QW32_cjs.c(t,"agreement.retired",n,{text:e.replaces,replacedBy:e.text},s)),t.agreements.includes(e.text)||(t={...t,agreements:[...t.agreements,e.text]}),t}function w(r,e,n,s){(typeof e!="string"||!r.agreements.includes(e))&&a(r,e,"retire");let t={...r,agreements:r.agreements.filter(i=>i!==e)};return chunkMU26QW32_cjs.c(t,"agreement.retired",n,{text:e,replacedBy:null},s)}exports.a=m;exports.b=w;//# sourceMappingURL=chunk-H26KXQ3I.cjs.map
2
+ //# sourceMappingURL=chunk-H26KXQ3I.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/agreements.ts"],"names":["listed","s","a","absent","text","what","fail","applyAgreement","state","change","by","now","appendEvent","retireAgreement"],"mappings":"qHAIA,IAAMA,EAAUC,CAAAA,EACdA,CAAAA,CAAE,WAAW,MAAA,GAAW,CAAA,CAAI,SAAWA,CAAAA,CAAE,UAAA,CAAW,GAAA,CAAKC,CAAAA,EAAM,IAAIA,CAAC,CAAA,CAAA,CAAG,EAAE,IAAA,CAAK,IAAI,EAEpF,SAASC,CAAAA,CAAOF,CAAAA,CAA0BG,CAAAA,CAAeC,EAAqB,CAC5E,OAAOC,oBACL,eAAA,CACA,CAAA,qBAAA,EAAwB,KAAK,SAAA,CAAUF,CAAI,CAAC,CAAA,IAAA,EAAOC,CAAI,GACvD,CAAA,oBAAA,EAAuBL,CAAAA,CAAOC,CAAC,CAAC,CAAA,0BAAA,CAClC,CACF,CAeO,SAASM,CAAAA,CACdC,CAAAA,CACAC,EACAC,CAAAA,CACAC,CAAAA,CACkB,CAClB,GAAIF,CAAAA,CAAO,WAAaA,CAAAA,CAAO,IAAA,CAAM,OAAOD,CAAAA,CAC5C,IAAIP,CAAAA,CAAIO,CAAAA,CACR,OAAIC,CAAAA,CAAO,QAAA,GAAa,UAClB,OAAOA,CAAAA,CAAO,QAAA,EAAa,QAAA,EAAY,CAACR,CAAAA,CAAE,UAAA,CAAW,SAASQ,CAAAA,CAAO,QAAQ,IAC/EN,CAAAA,CAAOF,CAAAA,CAAGQ,EAAO,QAAA,CAAU,SAAS,EACtCR,CAAAA,CAAI,CAAE,GAAGA,CAAAA,CAAG,UAAA,CAAYA,EAAE,UAAA,CAAW,MAAA,CAAQC,CAAAA,EAAMA,CAAAA,GAAMO,EAAO,QAAQ,CAAE,EAC1ER,CAAAA,CAAIW,mBAAAA,CACFX,EACA,mBAAA,CACAS,CAAAA,CACA,CAAE,IAAA,CAAMD,EAAO,QAAA,CAAU,UAAA,CAAYA,EAAO,IAAK,CAAA,CACjDE,CACF,CAAA,CAAA,CAEGV,CAAAA,CAAE,UAAA,CAAW,QAAA,CAASQ,EAAO,IAAI,CAAA,GAAGR,EAAI,CAAE,GAAGA,EAAG,UAAA,CAAY,CAAC,GAAGA,CAAAA,CAAE,UAAA,CAAYQ,EAAO,IAAI,CAAE,GACzFR,CACT,CAeO,SAASY,CAAAA,CACdL,CAAAA,CACAJ,CAAAA,CACAM,CAAAA,CACAC,EACkB,CAAA,CACd,OAAOP,GAAS,QAAA,EAAY,CAACI,EAAM,UAAA,CAAW,QAAA,CAASJ,CAAI,CAAA,GAAGD,CAAAA,CAAOK,EAAOJ,CAAAA,CAAM,QAAQ,EAC9F,IAAMH,CAAAA,CAAI,CAAE,GAAGO,CAAAA,CAAO,UAAA,CAAYA,CAAAA,CAAM,WAAW,MAAA,CAAQN,CAAAA,EAAMA,IAAME,CAAI,CAAE,EAC7E,OAAOQ,mBAAAA,CAAYX,EAAG,mBAAA,CAAqBS,CAAAA,CAAI,CAAE,IAAA,CAAAN,CAAAA,CAAM,WAAY,IAAK,CAAA,CAAGO,CAAG,CAChF","file":"chunk-H26KXQ3I.cjs","sourcesContent":["import { fail } from \"./errors.ts\";\nimport { appendEvent } from \"./state.ts\";\nimport type { WorkflowState } from \"./types.ts\";\n\nconst listed = (s: WorkflowState<string>) =>\n s.agreements.length === 0 ? \"(none)\" : s.agreements.map((a) => `\"${a}\"`).join(\", \");\n\nfunction absent(s: WorkflowState<string>, text: unknown, what: string): never {\n return fail(\n \"invalid-input\",\n `no working agreement ${JSON.stringify(text)} to ${what}`,\n `current agreements: ${listed(s)}; name one of them exactly`,\n );\n}\n\n/** Adds an agreement (idempotent); with `replaces`, retires that one in the same step. */\nexport function applyAgreement<N extends string>(\n state: WorkflowState<N>,\n change: { text: string; replaces?: string },\n by: string,\n now: string,\n): WorkflowState<N>;\nexport function applyAgreement(\n state: WorkflowState,\n change: { text: string; replaces?: string },\n by: string,\n now: string,\n): WorkflowState;\nexport function applyAgreement<N extends string>(\n state: WorkflowState<N>,\n change: { text: string; replaces?: string },\n by: string,\n now: string,\n): WorkflowState<N> {\n if (change.replaces === change.text) return state;\n let s = state;\n if (change.replaces !== undefined) {\n if (typeof change.replaces !== \"string\" || !s.agreements.includes(change.replaces))\n absent(s, change.replaces, \"replace\");\n s = { ...s, agreements: s.agreements.filter((a) => a !== change.replaces) };\n s = appendEvent(\n s,\n \"agreement.retired\",\n by,\n { text: change.replaces, replacedBy: change.text },\n now,\n );\n }\n if (!s.agreements.includes(change.text)) s = { ...s, agreements: [...s.agreements, change.text] };\n return s;\n}\n\n/** Removes an agreement and records why it left (replacedBy null). */\nexport function retireAgreement<N extends string>(\n state: WorkflowState<N>,\n text: string,\n by: string,\n now: string,\n): WorkflowState<N>;\nexport function retireAgreement(\n state: WorkflowState,\n text: string,\n by: string,\n now: string,\n): WorkflowState;\nexport function retireAgreement<N extends string>(\n state: WorkflowState<N>,\n text: string,\n by: string,\n now: string,\n): WorkflowState<N> {\n if (typeof text !== \"string\" || !state.agreements.includes(text)) absent(state, text, \"retire\");\n const s = { ...state, agreements: state.agreements.filter((a) => a !== text) };\n return appendEvent(s, \"agreement.retired\", by, { text, replacedBy: null }, now);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=chunk-IDZ435YZ.mjs.map
2
+ //# sourceMappingURL=chunk-IDZ435YZ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-KIQOUUEZ.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-IDZ435YZ.mjs"}
@@ -0,0 +1,2 @@
1
+ import {a as a$3}from'./chunk-BD665RYK.mjs';import {a as a$2}from'./chunk-WU5JELOM.mjs';import {a as a$1,b as b$2}from'./chunk-TQR3VFZU.mjs';import {W as W$1,c,a,e,O,r as r$1,z,u,R,D as D$1,q as q$1}from'./chunk-COPYGMHE.mjs';import {b as b$1,c as c$1}from'./chunk-YS6CXERQ.mjs';var g=e=>a$1(e,"experimentation"),y=(e,t)=>b$2(e,"experimentation",t);var k=["tokens","turns","wallclockMs"];function C(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function r(e){return b$1("invalid-input",e,"supply valid experimentation ceremony input")}function m(e,t){return (typeof e!="string"||!e.trim())&&r(`${t} must be a non-empty string`),e}function v(e,t="sha"){let n=m(e,t);return /^[a-f0-9]{40}$|^[a-f0-9]{64}$/.test(n)||r(`${t} must be a full lowercase commit SHA`),n}function re(e,t){(!C(e)||!k.some(a=>e[a]!==void 0)||Object.keys(e).some(a=>!k.includes(a)))&&r(`${t} needs tokens, turns or wallclockMs limits`);let n={};for(let a of k){let i=e[a];i!==void 0&&((typeof i!="number"||!Number.isSafeInteger(i)||i<=0)&&r(`${t}.${a} must be a positive safe integer`),n[a]=i);}return n}function b(e){try{C(e)||r("experimentation config must be an object");let t=["objective","direction","tieBreak","concurrencyCap","maxCandidates","candidateBudget","totalBudget"];Object.keys(e).some(c=>!t.includes(c))&&r("unknown experimentation config key");let n=m(e.objective,"objective"),a=e.direction??"minimize";a!=="minimize"&&a!=="maximize"&&r("direction must be minimize or maximize");let i=e.tieBreak??"candidate-id";i!=="candidate-id"&&r("tieBreak must be candidate-id");let o=e.concurrencyCap??2,s=e.maxCandidates??4;for(let[c,d]of Object.entries({concurrencyCap:o,maxCandidates:s}))(typeof d!="number"||!Number.isSafeInteger(d)||d<1)&&r(`${c} must be a positive safe integer`);return o>s&&r("concurrencyCap cannot exceed maxCandidates"),{objective:n,direction:a,tieBreak:i,concurrencyCap:o,maxCandidates:s,candidateBudget:re(e.candidateBudget??{turns:10},"candidateBudget"),totalBudget:re(e.totalBudget??{turns:40},"totalBudget")}}catch(t){b$1("config-invalid",t instanceof Error?t.message:"invalid experimentation config","provide objective and positive finite limits");}}function S(e){let t=g(e);return (e.methodology!=="experimentation"||!t)&&r("freeze an experimentation workflow first"),t}function de(e$1,t,n){e(e$1,t)?.capabilities.includes(n)||b$1("missing-capability",`${t} needs ${n}`,"use a role with the required capability");}function ce(e,t,n){return e.events.reduce((a,i)=>{if(i.type!=="item.completed"||!C(i.payload))return a;let o=i.payload;return typeof o.id!="string"||o.role!==i.by||t!==void 0&&o.id!==t||n!==void 0&&o.role!==n||typeof o.tokens!="number"||!Number.isFinite(o.tokens)||o.tokens<0||typeof o.durationMs!="number"||!Number.isFinite(o.durationMs)||o.durationMs<0||t===void 0&&Object.values(g(e)?.candidates??{}).some(s=>s.item===o.id)?a:{tokens:a.tokens+o.tokens,turns:a.turns+1,wallclockMs:a.wallclockMs+o.durationMs}},{tokens:0,turns:0,wallclockMs:0})}function V(e,t){return {tokens:Math.max(e.tokens,t.tokens),turns:Math.max(e.turns,t.turns),wallclockMs:Math.max(e.wallclockMs,t.wallclockMs)}}function E(e,t){return V(t.spent,ce(e,t.item,t.author))}function G(e,t){let n=g(e);if(!n)return e;let a$1=j(e),i=["stopped","integrated"].includes(n.status);return {...e,iterations:e.iterations.map(o=>o.id==="experiment"?{...o,budget:{...b(e.config).totalBudget},spent:a$1,...i?{endedAt:o.endedAt??a(t),outcome:o.outcome??(n.status==="integrated"?"completed":"cancelled")}:{}}:o)}}function j(e,t=S(e)){let n=V(t.overhead,ce(e));return Object.values(t.candidates).reduce((a,i)=>{let o=E(e,i);return {tokens:a.tokens+o.tokens,turns:a.turns+o.turns,wallclockMs:a.wallclockMs+o.wallclockMs}},n)}function L(e){return Object.values(g(e)?.candidates??{}).filter(t=>t.status==="running"||e.items[t.item]?.status==="in_progress").length}function U(e){return Object.values(g(e)?.candidates??{}).reduce((t,n)=>{let a=e.items[n.item];return t+(a?.status==="in_progress"?O(e,a.weight,1):0)},0)}function be(e){let t=b(e.config).totalBudget.tokens;if(t!==void 0)return Math.max(0,t-j(e).tokens-U(e))}function Q(e$1,t){let n=e$1.items[t.item];return !!n&&(!n.role||n.role===t.author)&&!!e(e$1,t.author)?.capabilities.includes("deliver")}function X(e,t){let n=b(e.config),a=E(e,t);return k.some(i=>n.candidateBudget[i]!==void 0&&a[i]>=n.candidateBudget[i])}function I(e){if(!g(e))return false;let t=b(e.config),n=j(e);return k.some(a=>t.totalBudget[a]!==void 0&&n[a]>=t.totalBudget[a])}function W(e,t){let n=m(t.candidate,"candidate");return Object.hasOwn(e.candidates,n)||r(`unknown candidate ${n}`),e.candidates[n]}function se(e){let t=e.selected;return (t===void 0||!Object.hasOwn(e.candidates,t))&&b$1("invalid-input",`the experiment's selected candidate ${JSON.stringify(t)} is not one of its candidates`,"restore .workflow/state.json from git, or run compare again"),e.candidates[t]}function q(e,t){return typeof e[t]!="boolean"&&r(`${t} must be boolean`),e[t]}function J(e){C(e.spent)||r("spent must contain nonnegative tokens, turns and wallclockMs");let t={};for(let n of k){let a=e.spent[n];(typeof a!="number"||!Number.isSafeInteger(a)||a<0)&&r(`spent.${n} must be a nonnegative safe integer`),t[n]=a;}return t}function $(e,t){return {...e,candidates:{...e.candidates,[t.id]:t}}}function P(e,t){let n=J(t);return {...e,overhead:{tokens:e.overhead.tokens+n.tokens,turns:e.overhead.turns+n.turns,wallclockMs:e.overhead.wallclockMs+n.wallclockMs}}}function D(e,t,n){return u(e,t.item,{stage:"done",status:"dropped"},n.by,n.now)}function A(e){e.status!=="running"&&r("experiment is not running");}function N(e){return ["validated","failed","timed-out","cancelled"].includes(e.status)}function K(e,t=new Set){if(e===null||typeof e=="string"||typeof e=="boolean")return true;if(typeof e=="number")return Number.isFinite(e);if(typeof e!="object"||t.has(e)||!Array.isArray(e)&&Object.getPrototypeOf(e)!==Object.prototype)return false;t.add(e);let n=Array.isArray(e)?e.every(a=>K(a,t)):Object.values(e).every(a=>a===void 0||K(a,t));return t.delete(e),n}function w(e,t,n){return (a$1,i)=>((!C(i)||!K(i))&&r("ceremony input must be JSON-safe"),m(i.by,"by"),i.now!==void 0&&(typeof i.now!="string"||!Number.isFinite(Date.parse(i.now)))&&r("now must be a valid timestamp"),de(a$1,i.by,t),W$1(a$1,le(),{type:`ceremony.${e}`,by:i.by,payload:i},o=>c(G(n(o,i),i.now),`experimentation.${e}`,i.by,structuredClone(i),a(i.now))))}function ue(){return {freeze:w("frozen","facilitate",(e,t)=>{(e.methodology!=="experimentation"||g(e))&&r("freeze may run only once in experimentation");let n=b(e.config),a$1=v(t.baseSha,"baseSha"),i=m(t.harness,"harness");(!Array.isArray(t.candidates)||t.candidates.length<1||t.candidates.length>n.maxCandidates)&&r("candidates must be a nonempty array within maxCandidates");let o={},s=new Set;for(let c of t.candidates){C(c)||r("candidate must be an object");let d=m(c.id,"candidate.id");c$1(d,"candidate id"),Object.hasOwn(o,d)&&r("candidate IDs must be unique safe identifiers");let l=m(c.item,"candidate.item"),f=m(c.author,"candidate.author");de(e,f,"deliver");let u=r$1(e,l);u.role&&u.role!==f&&r("candidate item role must match frozen author"),(s.has(l)||u.stage!=="candidate"||u.status!=="todo"||u.acceptance.length===0)&&r("candidate needs a distinct todo candidate item with acceptance criteria"),s.add(l),o[d]={id:d,item:l,author:f,status:"pending",spent:{tokens:0,turns:0,wallclockMs:0}};}return y({...e,iterations:[...e.iterations,{id:"experiment",goal:n.objective,budget:{...n.totalBudget},spent:{tokens:0,turns:0,wallclockMs:0},startedAt:a(t.now),committed:[...s],carryover:[]}]},{status:"running",baseSha:a$1,harness:i,candidates:o,released:[],overhead:{tokens:0,turns:0,wallclockMs:0}})}),provision:w("provisioned","manage-flow",(e,t)=>{let n=S(e);A(n),I(e)&&r("total experiment budget exhausted");let a=W(n,t);a.status!=="pending"&&r("candidate already provisioned");let i=m(t.workspace,"workspace");return (a$3({baseSha:n.baseSha},{baseSha:v(t.baseSha,"baseSha")}).length||t.isolated!==true)&&r("provision must attest isolated workspace at the exact frozen base SHA"),Object.values(n.candidates).some(o=>o.workspace===i)&&r("candidate workspaces must be distinct"),n=$(n,{...a,workspace:i,status:"ready"}),y(e,n)}),start:w("started","deliver",(e$1,t)=>{let n=S(e$1);A(n);let a=W(n,t);(a.status!=="ready"||a.author!==t.by)&&r("only the candidate author may start a ready candidate"),I(e$1)&&r("total experiment budget exhausted");let i=b(e$1.config),o=Object.values(n.candidates).filter(p=>p.status==="running"||e$1.items[p.item]?.status==="in_progress").length;o>=i.concurrencyCap&&r("candidate concurrency cap reached"),Q(e$1,a)||r("candidate author assignment or delivery capability changed");let s=j(e$1);i.totalBudget.turns!==void 0&&s.turns+o>=i.totalBudget.turns&&r("total experiment budget reserved by running candidates");let c=e(e$1,a.author),d=c.resourceClass??c.id,l=R(e$1)[d],f=Object.values(e$1.items).filter(p=>p.status==="in_progress"&&p.role&&(e(e$1,p.role)?.resourceClass??p.role)===d).length;l!==void 0&&f>=l&&r("role resource capacity reached");let u$1=r$1(e$1,a.item),x=be(e$1);x!==void 0&&O(e$1,u$1.weight,1)>x&&r("total experiment token budget reserved or insufficient"),u$1.status!=="todo"&&r("candidate item is already dispatched"),D$1(e$1,u$1,[{kind:"dependencies-done"},{kind:"no-open-blockers"},{kind:"acceptance-written"},...e$1.stages.find(p=>p.id==="building").entryPolicy],"start candidate execution"),X(e$1,a)&&r("candidate budget exhausted");let h=u(e$1,a.item,{stage:"building",status:"in_progress"},t.by,t.now);return h=q$1(h,a.item,p=>({...p,role:t.by})),y(h,$(n,{...a,status:"running"}))}),submit:w("submitted","deliver",(e,t)=>{let n=S(e);A(n);let a=W(n,t),i=r$1(e,a.item);(a.status!=="running"&&!(a.status==="ready"&&i.status==="in_progress")||a.author!==t.by||i.role!==t.by)&&r("only the running candidate author may submit once");let o=v(t.sha);(a$3({workspace:a.workspace,harness:n.harness},t).length||a$3({baseSha:n.baseSha},{baseSha:v(t.baseSha,"baseSha")}).length)&&r("submission provenance must match frozen base SHA, harness and owned workspace"),(typeof t.score!="number"||!Number.isFinite(t.score))&&r("score must be finite");let s=J(t),c=m(t.command,"command"),d=m(t.log,"log"),l=b(e.config),f=E(e,{...a,spent:s}),u=k.some(p=>l.candidateBudget[p]!==void 0&&f[p]>l.candidateBudget[p]),x={...a,status:u?"timed-out":"submitted",sha:o,score:t.score,spent:f,command:c,log:d};u&&(x.reason="candidate budget exceeded");let h=y(e,$(n,x));return h=z(h,a.item,{kind:"candidate-sha",ref:o,by:t.by},t.now),h=z(h,a.item,{kind:"benchmark-result",ref:JSON.stringify({score:t.score,harness:n.harness,sha:o}),by:t.by},t.now),u?D(h,x,t):h}),terminate:w("terminated","manage-flow",(e,t)=>{let n=S(e);A(n);let a=W(n,t);N(a)&&r("candidate is already terminal"),["failed","timed-out","cancelled"].includes(t.status)||r("status must be failed, timed-out or cancelled");let i=m(t.reason,"reason"),o=J(t),s=m(t.log,"log");return D(y({...e},$(n,{...a,status:t.status,reason:i,spent:V(E(e,a),E(e,{...a,spent:o})),terminalLog:s})),a,t)}),validate:w("validated","verify",(e,t)=>{let n=S(e);A(n);let a=W(n,t);a.status!=="submitted"&&r("validate an unvalidated submitted candidate"),a$2(t.by,[a.author]).length&&r("candidate author cannot independently validate"),!e.events.some(x=>x.type==="experimentation.started"&&C(x.payload)&&x.payload.candidate===a.id)&&r$1(e,a.item).status==="in_progress"&&b$1("invalid-input",`candidate "${a.id}" item "${a.item}" is still in progress under the planner`,`complete item "${a.item}" with the builder's handoff (candidate-sha ${a.sha}) and accounting before validating`,{items:[a.item]});let o=v(t.sha),s=m(t.harness,"harness");a$3({sha:a.sha,harness:n.harness},{sha:o,harness:s}).length&&r("validation must match exact submitted SHA and frozen harness");let c=q(t,"passed"),d=q(t,"reproducible"),l=m(t.evidence,"evidence"),f={sha:o,harness:s,by:t.by,passed:c,reproducible:d,evidence:l},u$1=y({...e},$(P(n,t),{...a,status:c&&d?"validated":"failed",validation:f}));return u$1=z(u$1,a.item,{kind:"validation",ref:l,by:t.by},t.now),u$1=u(u$1,a.item,{stage:"done",status:c&&d?"done":"dropped"},t.by,t.now),u$1}),compare:w("compared","facilitate",(e,t)=>{let n=S(e);A(n);let a=Object.values(n.candidates);a.every(N)||r("comparison requires all candidates terminal and submissions independently validated");let i=b(e.config),o=j(e,n);if(k.some(d=>i.totalBudget[d]!==void 0&&o[d]>i.totalBudget[d]))return y(e,{...n,status:"stopped",reason:"total budget exceeded"});let s=a.filter(d=>{let l=E(e,d);return d.status==="validated"&&d.validation?.passed&&d.validation.reproducible&&!a$3({sha:d.sha,harness:n.harness},d.validation).length&&!k.some(f=>i.candidateBudget[f]!==void 0&&l[f]>i.candidateBudget[f])});s.sort((d,l)=>(d.score-l.score)*(i.direction==="minimize"?1:-1)||(d.id<l.id?-1:d.id>l.id?1:0));let c=s[0];return y({...e},c?{...n,status:"selected",selected:c.id}:{...n,status:"stopped",reason:"no eligible candidate"})}),integrate:w("integration-recorded","control-change",(e,t)=>{let n=S(e);(!["selected","integrating"].includes(n.status)||!n.selected)&&r("compare and select before integration"),I(e)&&r("total budget exhausted before integration");let a=se(n),i=v(t.selectedSha,"selectedSha");(i!==a.sha||a.validation?.sha!==i)&&r("integration must promote the exact selected and validated SHA");let o=v(t.targetSha,"targetSha"),s=v(t.integrationSha,"integrationSha");return n.integration?.sha===s&&n.integration.targetSha===o&&r("integration already recorded"),y(e,{...P(n,t),status:"integrating",integration:{selectedSha:i,targetSha:o,sha:s,by:t.by}})}),"validate-integration":w("integration-validated","verify",(e,t)=>{let n=S(e);(n.status!=="integrating"||!n.integration||!n.selected)&&r("record integration before fresh validation");let a=n.integration,i=se(n);a$2(t.by,[a.by,i.author]).length&&r("integration validation must be independent of candidate author and integrator");let o=v(t.sha),s=v(t.targetSha,"targetSha"),c=m(t.harness,"harness");a$3({sha:a.sha,targetSha:a.targetSha,harness:n.harness},{sha:o,targetSha:s,harness:c}).length&&r("fresh validation must match integration SHA, current target SHA and harness");let d=q(t,"passed"),l=m(t.evidence,"evidence"),f=P(n,t),u=b(e.config),x=j(e,f),h=k.some(p=>u.totalBudget[p]!==void 0&&x[p]>u.totalBudget[p]);return y(e,{...f,status:d&&!h?"integrated":"stopped",...d&&!h?{}:{reason:h?"total budget exceeded":"integration validation failed"},integration:{...a,validation:{by:t.by,sha:o,harness:c,evidence:l,passed:d}}})}),stop:w("stopped","manage-flow",(e,t)=>{let n=S(e);(n.status==="stopped"||n.status==="integrated")&&r("experiment already closed");let a=m(t.reason,"reason");Object.values(n.candidates).some(s=>s.status==="running"||s.status==="submitted"||e.items[s.item]?.status==="in_progress")&&r("terminate active attempts with final usage and log before stopping");let i=Object.fromEntries(Object.values(n.candidates).map(s=>[s.id,N(s)?s:{...s,status:"cancelled",reason:a}])),o=e;for(let s of Object.values(n.candidates))N(s)||(o=D(o,s,t));return y(o,{...P(n,t),status:"stopped",reason:a,candidates:i})}),cleanup:w("cleanup-recorded","manage-flow",(e,t)=>{let n=S(e);return n.status!=="stopped"&&n.status!=="integrated"&&r("cleanup requires a closed experiment"),(!Array.isArray(t.workspaces)||t.workspaces.length===0||t.workspaces.some(a=>typeof a!="string"||!Object.values(n.candidates).some(i=>i.workspace===a)||n.released.includes(a))||new Set(t.workspaces).size!==t.workspaces.length)&&r("workspaces must list distinct owned unreleased identities"),y(e,{...n,released:[...n.released,...t.workspaces]})})}}function pe(e){let t=g(e),n=Object.values(t?.candidates??{});return {candidates:n.length,validated:n.filter(a=>a.status==="validated").length,failed:n.filter(a=>a.status==="failed").length,timedOut:n.filter(a=>a.status==="timed-out").length,cancelled:n.filter(a=>a.status==="cancelled").length,integrated:t?.status==="integrated"?1:0,spent:t?{...j(e)}:{tokens:0,turns:0,wallclockMs:0},candidateTokens:Object.fromEntries(n.map(a=>[a.id,E(e,a).tokens]))}}function me(e){let t=g(e);return {status:t?.status??"unfrozen",baseSha:t?.baseSha??null,harness:t?.harness??null,selected:t?.selected??null,reason:t?.reason??null,integration:t?.integration?structuredClone(t.integration):null,candidates:structuredClone(t?.candidates??{}),cleanup:Object.values(t?.candidates??{}).flatMap(n=>n.workspace&&!t?.released.includes(n.workspace)?[n.workspace]:[]),hostResponsibilities:["provision isolated workspaces at baseSha","execute candidates and the frozen harness","integrate selected SHA at the current target","execute fresh integration validation","release owned workspace identities and record cleanup"]}}function fe(){return [{id:"coordinator",name:"Experiment coordinator",modelTier:"large",capabilities:["facilitate","order-backlog","manage-flow"],canApprove:[],inputs:["objective","budgets"],outputs:["comparison"],do_not:["Change the frozen baseline or harness"]},{id:"builder",name:"Candidate builder",modelTier:"large",capabilities:["deliver"],canApprove:[],inputs:["frozen harness","isolated workspace"],outputs:["candidate-sha","benchmark-result"],do_not:["Validate your own candidate","Change another candidate workspace"]},{id:"validator",name:"Independent validator",modelTier:"large",capabilities:["verify","review","approve-gate"],canApprove:["experiment-validation"],inputs:["exact candidate SHA","frozen harness"],outputs:["validation"],do_not:["Approve your own work"]},{id:"integrator",name:"Selected candidate integrator",modelTier:"large",capabilities:["deliver","control-change"],canApprove:[],inputs:["selected SHA","current target SHA"],outputs:["integration SHA"],do_not:["Declare integration validated"]}]}function ge(){return [{id:"experimentation-lifecycle",severity:"error",check(e,t){let n=[],a=g(e),i=t.payload;if(t.type==="item.complete"){["done","needs-review"].includes(i?.handoff?.verdict??"done")||n.push("unsupported completion verdict: terminate this attempt with final usage and log, then freeze a new experiment for retries");let o=a&&Object.values(a.candidates).find(s=>s.item===i?.item);(!o||!["submitted","validated"].includes(o.status))&&n.push("submit the candidate SHA and benchmark before completing work"),o?.status==="submitted"&&!i?.handoff?.produced?.some(s=>s.kind==="candidate-sha"&&s.ref===o.sha)&&n.push("handoff must retain the exact submitted candidate SHA");}return n.map(o=>({rule:"experimentation-lifecycle",severity:"error",message:o,fix:"follow the frozen experimentation lifecycle"}))}}]}function he(){return [{id:"candidate",name:"Frozen candidate",entryPolicy:[],exitPolicy:[{kind:"acceptance-written"},{kind:"no-open-blockers"},{kind:"dependencies-done"}]},{id:"building",name:"Isolated candidate execution",entryPolicy:[{kind:"acceptance-written"},{kind:"no-open-blockers"},{kind:"dependencies-done"}],exitPolicy:[{kind:"evidence",evidenceKind:"candidate-sha"},{kind:"evidence",evidenceKind:"benchmark-result"}]},{id:"validation",name:"Independent exact-SHA validation",review:true,entryPolicy:[],exitPolicy:[{kind:"evidence",evidenceKind:"validation"}],gate:{id:"experiment-validation",requires:[{capability:"verify"}],evidence:["validation"],onFail:{action:"block"}}},{id:"done",name:"Candidate work complete",entryPolicy:[],exitPolicy:[],deliveryPoint:true}]}function le(){return {name:"experimentation",vocabulary:{backlog:"Candidate pool",item:"Candidate work item",stage:"Experiment stage",iteration:"Experiment run",increment:"Validated integration",ceremony:"Experiment control",gate:"Independent validation"},validateConfig:b,defaultStages:he,defaultRoles:fe,requiredCapabilities:["facilitate","manage-flow","deliver","verify","control-change"],exclusiveCapabilities:[],plannerOptions(e){let t=b(e.config);return {schedulerMode:"throughput",dispatchStage:"building",concurrencyCap:Math.max(1,t.concurrencyCap-L(e)),fallbackTokensPerWeight:1,reservedTokens:U(e),roleFor(n){return Object.values(g(e)?.candidates??{}).find(a=>a.item===n.id)?.author}}},candidates(e){let t=g(e);if(!t||t.status!=="running")return [];let n=b(e.config);return I(e)||L(e)>=n.concurrencyCap?[]:Object.values(t.candidates).filter(a=>a.status==="ready"&&Q(e,a)&&e.items[a.item]?.status==="todo"&&!X(e,a)).map(a=>e.items[a.item])},afterComplete(e,t,n){return G(e,n)},invariants(e,t){let n=g(e),a=Object.values(n?.candidates??{}).find(i=>i.item===t.id);return [`Frozen base SHA: ${n?.baseSha??"unfrozen"}; harness: ${n?.harness??"unfrozen"}`,`Candidate: ${a?.id??"unregistered"}; isolated workspace: ${a?.workspace??"not provisioned"}`,`Objective and budget: ${JSON.stringify(e.config)}`,"Submit an exact commit SHA and harness benchmark before completion; independent validation is mandatory.","Host owns process execution, Git integration and workspace cleanup."]},ceremonies:ue(),rules:ge(),metrics:pe,report:me,humanDefaults:{gates:"none"},lockedConfigKeys:["objective","direction","tieBreak","concurrencyCap","maxCandidates","candidateBudget","totalBudget"]}}export{b as a,ue as b,pe as c,me as d,fe as e,ge as f,he as g,le as h};//# sourceMappingURL=chunk-ILDXZWEL.mjs.map
2
+ //# sourceMappingURL=chunk-ILDXZWEL.mjs.map