ex-workflow 1.2.0 → 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.
- package/CHANGELOG.md +25 -0
- package/README.md +145 -13
- package/dist/adapters/index.cjs +1 -1
- package/dist/adapters/index.d.cts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/adapters/index.mjs +1 -1
- package/dist/{budget-Gckmqj74.d.ts → budget-BuQ9GWsg.d.ts} +1 -1
- package/dist/{budget-Bm839Qw0.d.cts → budget-DDqQQIgp.d.cts} +1 -1
- package/dist/{chunk-VXOZIP77.cjs → chunk-2FBA7RBS.cjs} +2 -2
- package/dist/{chunk-VXOZIP77.cjs.map → chunk-2FBA7RBS.cjs.map} +1 -1
- package/dist/chunk-3S7F5QXK.mjs +2 -0
- package/dist/{chunk-BYPFTO7P.mjs.map → chunk-3S7F5QXK.mjs.map} +1 -1
- package/dist/{chunk-K4VSMIJZ.cjs → chunk-3ZUBCA7Q.cjs} +2 -2
- package/dist/{chunk-K4VSMIJZ.cjs.map → chunk-3ZUBCA7Q.cjs.map} +1 -1
- package/dist/chunk-4F5HZLKD.cjs +2 -0
- package/dist/{chunk-SFYUJQYW.cjs.map → chunk-4F5HZLKD.cjs.map} +1 -1
- package/dist/{chunk-4HG6A3SF.mjs → chunk-5DCOXGRW.mjs} +2 -2
- package/dist/{chunk-4HG6A3SF.mjs.map → chunk-5DCOXGRW.mjs.map} +1 -1
- package/dist/chunk-5GXB6GMX.mjs +2 -0
- package/dist/chunk-5GXB6GMX.mjs.map +1 -0
- package/dist/chunk-5ZGNEY2I.mjs +2 -0
- package/dist/{chunk-32NVJV5C.mjs.map → chunk-5ZGNEY2I.mjs.map} +1 -1
- package/dist/chunk-6PFJYRM7.cjs +2 -0
- package/dist/chunk-6PFJYRM7.cjs.map +1 -0
- package/dist/{chunk-W2P27645.cjs → chunk-BANKVCYY.cjs} +2 -2
- package/dist/{chunk-W2P27645.cjs.map → chunk-BANKVCYY.cjs.map} +1 -1
- package/dist/chunk-BD665RYK.mjs +2 -0
- package/dist/chunk-BD665RYK.mjs.map +1 -0
- package/dist/chunk-COPYGMHE.mjs +2 -0
- package/dist/chunk-COPYGMHE.mjs.map +1 -0
- package/dist/{chunk-3O5MPAJT.cjs → chunk-CVGEIXW6.cjs} +2 -2
- package/dist/{chunk-3O5MPAJT.cjs.map → chunk-CVGEIXW6.cjs.map} +1 -1
- package/dist/chunk-CX2E7ZTQ.mjs +2 -0
- package/dist/{chunk-JNLWI4JM.mjs.map → chunk-CX2E7ZTQ.mjs.map} +1 -1
- package/dist/chunk-DVFTTBCT.cjs +3 -0
- package/dist/chunk-DVFTTBCT.cjs.map +1 -0
- package/dist/{chunk-U3RU5LOF.cjs → chunk-EQXYFHHD.cjs} +2 -2
- package/dist/{chunk-U3RU5LOF.cjs.map → chunk-EQXYFHHD.cjs.map} +1 -1
- package/dist/{chunk-OVR5CK3R.cjs → chunk-H26KXQ3I.cjs} +2 -2
- package/dist/{chunk-OVR5CK3R.cjs.map → chunk-H26KXQ3I.cjs.map} +1 -1
- package/dist/chunk-ILDXZWEL.mjs +2 -0
- package/dist/{chunk-OZAYOPLB.mjs.map → chunk-ILDXZWEL.mjs.map} +1 -1
- package/dist/{chunk-RXY434DX.cjs → chunk-KA6DVHO5.cjs} +4 -4
- package/dist/{chunk-RXY434DX.cjs.map → chunk-KA6DVHO5.cjs.map} +1 -1
- package/dist/chunk-KLOSFZFK.cjs +2 -0
- package/dist/chunk-KLOSFZFK.cjs.map +1 -0
- package/dist/{chunk-WPVL27G4.mjs → chunk-LG23WXAP.mjs} +2 -2
- package/dist/{chunk-WPVL27G4.mjs.map → chunk-LG23WXAP.mjs.map} +1 -1
- package/dist/chunk-MU26QW32.cjs +2 -0
- package/dist/chunk-MU26QW32.cjs.map +1 -0
- package/dist/chunk-OEHVWRJG.mjs +2 -0
- package/dist/{chunk-7EF47R2J.mjs.map → chunk-OEHVWRJG.mjs.map} +1 -1
- package/dist/{chunk-3GKYL6VB.mjs → chunk-ONVAUZOD.mjs} +3 -3
- package/dist/{chunk-3GKYL6VB.mjs.map → chunk-ONVAUZOD.mjs.map} +1 -1
- package/dist/{chunk-LIATP6LY.mjs → chunk-PFHVB2WT.mjs} +2 -2
- package/dist/{chunk-LIATP6LY.mjs.map → chunk-PFHVB2WT.mjs.map} +1 -1
- package/dist/chunk-QJMOCISZ.mjs +3 -0
- package/dist/chunk-QJMOCISZ.mjs.map +1 -0
- package/dist/chunk-RGHM3JJM.cjs +2 -0
- package/dist/chunk-RGHM3JJM.cjs.map +1 -0
- package/dist/chunk-UMG3WOD7.cjs +2 -0
- package/dist/{chunk-QAENYYU6.cjs.map → chunk-UMG3WOD7.cjs.map} +1 -1
- package/dist/{chunk-6D6FL3XK.mjs → chunk-UT7QV6CE.mjs} +2 -2
- package/dist/{chunk-6D6FL3XK.mjs.map → chunk-UT7QV6CE.mjs.map} +1 -1
- package/dist/chunk-WU5JELOM.mjs +2 -0
- package/dist/chunk-WU5JELOM.mjs.map +1 -0
- package/dist/{chunk-IIEKK2S3.cjs → chunk-YGCNLXPJ.cjs} +2 -2
- package/dist/{chunk-IIEKK2S3.cjs.map → chunk-YGCNLXPJ.cjs.map} +1 -1
- package/dist/cli/bin.cjs +1 -1
- package/dist/cli/bin.cjs.map +1 -1
- package/dist/cli/bin.mjs +1 -1
- package/dist/cli/bin.mjs.map +1 -1
- package/dist/cli/index.cjs +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/experimentation/index.cjs +1 -1
- package/dist/experimentation/index.d.cts +2 -2
- package/dist/experimentation/index.d.ts +2 -2
- package/dist/experimentation/index.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/investigation/index.cjs +1 -1
- package/dist/investigation/index.d.cts +2 -2
- package/dist/investigation/index.d.ts +2 -2
- package/dist/investigation/index.mjs +1 -1
- package/dist/kanban/index.cjs +1 -1
- package/dist/kanban/index.d.cts +1 -1
- package/dist/kanban/index.d.ts +1 -1
- package/dist/kanban/index.mjs +1 -1
- package/dist/policies/index.cjs +2 -0
- package/dist/policies/index.cjs.map +1 -0
- package/dist/policies/index.d.cts +199 -0
- package/dist/policies/index.d.ts +199 -0
- package/dist/policies/index.mjs +2 -0
- package/dist/policies/index.mjs.map +1 -0
- package/dist/registry/index.cjs +1 -1
- package/dist/registry/index.d.cts +1 -1
- package/dist/registry/index.d.ts +1 -1
- package/dist/registry/index.mjs +1 -1
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.mjs +1 -1
- package/dist/scrum/index.cjs +1 -1
- package/dist/scrum/index.d.cts +3 -3
- package/dist/scrum/index.d.ts +3 -3
- package/dist/scrum/index.mjs +1 -1
- package/dist/{types-DjePDfms.d.cts → types-DLOtndDY.d.cts} +61 -1
- package/dist/{types-DjePDfms.d.ts → types-DLOtndDY.d.ts} +61 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/waterfall/index.cjs +1 -1
- package/dist/waterfall/index.d.cts +1 -1
- package/dist/waterfall/index.d.ts +1 -1
- package/dist/waterfall/index.mjs +1 -1
- package/package.json +14 -1
- package/dist/chunk-32NVJV5C.mjs +0 -2
- package/dist/chunk-43GLYYA2.cjs +0 -3
- package/dist/chunk-43GLYYA2.cjs.map +0 -1
- package/dist/chunk-7EF47R2J.mjs +0 -2
- package/dist/chunk-BD76VFI4.mjs +0 -3
- package/dist/chunk-BD76VFI4.mjs.map +0 -1
- package/dist/chunk-BHAEPYRJ.cjs +0 -2
- package/dist/chunk-BHAEPYRJ.cjs.map +0 -1
- package/dist/chunk-BYPFTO7P.mjs +0 -2
- package/dist/chunk-FDZB73PH.mjs +0 -2
- package/dist/chunk-FDZB73PH.mjs.map +0 -1
- package/dist/chunk-JNLWI4JM.mjs +0 -2
- package/dist/chunk-LCN4UNYK.cjs +0 -2
- package/dist/chunk-LCN4UNYK.cjs.map +0 -1
- package/dist/chunk-MB465DI4.mjs +0 -2
- package/dist/chunk-MB465DI4.mjs.map +0 -1
- package/dist/chunk-OZAYOPLB.mjs +0 -2
- package/dist/chunk-QAENYYU6.cjs +0 -2
- package/dist/chunk-SFYUJQYW.cjs +0 -2
- package/dist/chunk-UUWDQVIJ.mjs +0 -2
- package/dist/chunk-UUWDQVIJ.mjs.map +0 -1
- package/dist/chunk-Z43GUETW.cjs +0 -2
- package/dist/chunk-Z43GUETW.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":"qCAIO,IAAMA,CAAAA,CAA+C,CAC1D,UAAA,CAAY,CACV,KAAM,QAAA,CACN,UAAA,CAAY,CACV,IAAA,CAAM,CACJ,IAAA,CAAM,QACR,CAAA,CACA,IAAA,CAAM,CACJ,IAAA,CAAM,QACR,CAAA,CACA,KAAA,CAAO,CACL,IAAA,CAAM,QACR,CAAA,CACA,QAAA,CAAU,CACR,IAAA,CAAM,QACR,CAAA,CACA,SAAA,CAAW,CACT,IAAA,CAAM,QACR,CAAA,CACA,UAAA,CAAY,CACV,IAAA,CAAM,QACR,CAAA,CACA,SA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A,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-QJMOCISZ.mjs","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 chunkMU26QW32_cjs=require('./chunk-MU26QW32.cjs'),chunkOSHBJIYD_cjs=require('./chunk-OSHBJIYD.cjs');var oe=new Set(["in_progress","review","blocked"]);function ue(n,o,e,s){chunkOSHBJIYD_cjs.c(o.id,"role id"),chunkMU26QW32_cjs.e(n,o.id)&&chunkOSHBJIYD_cjs.b("duplicate-role",`role "${o.id}" already exists`,`use a different id or retireRole("${o.id}") first`);let u={...n,roles:{...n.roles,[o.id]:o}};return chunkMU26QW32_cjs.c(u,"role.registered",e,{role:o.id,capabilities:o.capabilities},s)}function pe(n,o,e,s){chunkMU26QW32_cjs.e(n,o)||chunkOSHBJIYD_cjs.b("unknown-role",`role "${o}" does not exist`,`registered roles: ${Object.keys(n.roles).join(", ")||"(none)"}`);let u=Object.values(n.items).filter(i=>i.role===o&&oe.has(i.status)).map(i=>i.id);u.length&&chunkOSHBJIYD_cjs.b("role-has-open-items",`role "${o}" still holds ${u.length} open item(s)`,`complete or reassign ${u.join(", ")} before retiring the role`,{items:u});let l={...n.roles};return delete l[o],chunkMU26QW32_cjs.c({...n,roles:l},"role.retired",e,{role:o},s)}function K(n,o){let e=[];for(let s of n.events)s.type==="item.completed"&&s.payload.id===o&&e.push({...s.payload,at:s.at});return e}function X(n,o){let e=K(n,o);return e[e.length-1]}function ne(n,o,e){e.role||chunkOSHBJIYD_cjs.b("unknown-role",`item "${e.id}" has no role assigned`,"dispatch it with next() or set item.role",{items:[e.id]});let s=chunkMU26QW32_cjs.e(n,e.role);s||chunkOSHBJIYD_cjs.b("unknown-role",`role "${e.role}" does not exist`,`registered roles: ${Object.keys(n.roles).join(", ")}`);let u=[],l=[...s.do_not],i=[...e.dependsOn,...e.type==="bug"||e.type==="change-request"?e.affects??[]:[]];for(let r of i){let g=X(n,r);if(g){u.push({item:r,produced:g.produced,notes:g.notes});for(let m of g.do_not)l.includes(m)||l.push(m);}}let d=K(n,e.id).map(r=>({role:r.role,verdict:r.verdict,notes:r.notes,produced:r.produced,at:r.at})),t=new Set([e.id,...e.dependsOn]),f=Object.values(n.items).filter(r=>(r.type==="bug"||r.type==="change-request")&&r.id!==e.id&&r.status!=="done"&&r.status!=="dropped"&&(r.affects??[]).some(g=>t.has(g))).map(r=>({id:r.id,title:r.title,affects:r.affects??[]})),S=chunkMU26QW32_cjs.P(n),k=chunkMU26QW32_cjs.n(n,e.stage).gate,w={item:e,role:s,modelTier:s.modelTier,invariants:[...o.invariants(n,e),...n.agreements],do_not:l,acceptance:e.acceptance,upstream:u,priorHandoffs:d,relatedBugs:f,budgetRemaining:S?chunkMU26QW32_cjs.M(S.budget,S.spent):{}};k&&(w.gateAhead=k);let a=o.briefContext?.(n,e);if(a&&(w.context=a),e.type==="question"&&e.parent){let r=X(n,e.parent);if(r){w.parent={item:e.parent,role:r.role,notes:r.notes,produced:r.produced,open_questions:r.open_questions??[],do_not:r.do_not};for(let g of r.do_not)l.includes(g)||l.push(g);}}return w}function he(n){let o=new Map;for(let e of n.events){if(e.type!=="item.completed")continue;let s=e.payload;o.delete(s.id),o.set(s.id,{...s,at:e.at});}return [...o.values()].filter(e=>(e.verdict==="done"||e.verdict==="needs-review")&&(e.open_questions??[]).length>0).map(e=>({item:e.id,role:e.role,questions:e.open_questions??[],at:e.at}))}function ve(n,o,e={}){let s=chunkMU26QW32_cjs.T(n,o,e),u=s.dispatched.map(l=>ne(s.state,o,s.state.items[l.id]));return s.reason?{state:s.state,briefs:u,skipped:s.skipped,reason:s.reason}:{state:s.state,briefs:u,skipped:s.skipped}}var Y=["done","needs-review","rework","blocked","escalate"],Z=["policy","skill","memory","spec","review"],P=n=>typeof n=="object"&&n!==null&&!Array.isArray(n),W=n=>typeof n=="string";function se(n,o,e){let s=chunkMU26QW32_cjs.r(n,o.item);s.status!=="in_progress"&&chunkOSHBJIYD_cjs.b("invalid-transition",`item "${s.id}" is ${s.status}, not in_progress`,"only dispatched items can be completed; call next() first",{items:[s.id]}),Array.isArray(o.do_not)||chunkOSHBJIYD_cjs.b("handoff-invalid",`handoff for "${s.id}" has no do_not array`,"set handoff.do_not to [] when there is nothing to forbid",{items:[s.id]}),(!Array.isArray(o.produced)||!Array.isArray(o.open_questions))&&chunkOSHBJIYD_cjs.b("handoff-invalid",`handoff for "${s.id}" needs produced[] and open_questions[]`,"pass empty arrays when there is nothing",{items:[s.id]});let u=(t,f)=>chunkOSHBJIYD_cjs.b("handoff-invalid",`handoff for "${s.id}": ${t}`,f,{items:[s.id]}),l=o.verdict??"done";Y.includes(l)||u(`unknown verdict ${JSON.stringify(l)}`,`use one of: ${Y.join(", ")}`),o.produced.every(t=>P(t)&&W(t.kind)&&W(t.ref))||u("produced[] entries need string kind and ref",'use { "kind": "code", "ref": "src/a.ts" }');let i=o.lessons??[];(!Array.isArray(i)||!i.every(t=>P(t)&&W(t.text)&&Z.includes(t.scope)))&&u("lessons[] entries need a text and a scope",`scope is one of: ${Z.join(", ")}`);let d=o.follow_ups??[];(!Array.isArray(d)||!d.every(t=>P(t)&&W(t.id)&&W(t.title)))&&u("follow_ups[] entries need a string id and title","describe each follow-up as a new item"),o.role!==s.role&&chunkOSHBJIYD_cjs.b("handoff-invalid",`handoff role "${o.role}" differs from the dispatched role "${s.role}"`,`complete as "${s.role}" or re-dispatch`,{items:[s.id]}),(!e.model||e.model.trim()==="")&&chunkOSHBJIYD_cjs.b("accounting-invalid",`accounting for "${s.id}" has no model`,"record the model id that actually ran the work",{items:[s.id]});for(let t of ["tokensIn","tokensOut","durationMs"])(!Number.isFinite(e[t])||e[t]<0)&&chunkOSHBJIYD_cjs.b("accounting-invalid",`accounting.${t} must be a non-negative number`,`measure ${t} from the host's usage report`,{items:[s.id]});e.tokensIn+e.tokensOut===0&&e.estimate!==true&&chunkOSHBJIYD_cjs.b("accounting-invalid",`accounting for "${s.id}" records 0 tokens`,"pass the host's usage figures, or set estimate: true (CLI --estimate) to record a placeholder and correct it later with correctAccounting / exwf account",{items:[s.id]});}function ee(n){for(let o=n.transitions.length-1;o>=0;o--){let e=n.transitions[o];if(e.to.status==="in_progress")return e.from.stage}return n.stage}function ie(n,o){return chunkMU26QW32_cjs.F(n,o)?.from.stage??ee(o)}function je(n,o,e,s,u){se(n,e,s);let l,i=chunkMU26QW32_cjs.W(n,o,{type:"item.complete",by:e.role,payload:{item:e.item,handoff:e}},()=>(l=re(n,o,e,s,u),l.state));return {state:i.state,warnings:[...i.warnings,...l.warnings]}}function re(n,o,e,s,u){let l=chunkMU26QW32_cjs.a(u),i=e.item,d=e.role,t={...n,accounting:[...n.accounting,s]};for(let a of e.produced)t=chunkMU26QW32_cjs.z(t,i,{kind:a.kind,ref:a.ref,by:d},l);let f=chunkMU26QW32_cjs.P(t);f&&(f.committed.includes(i)||chunkMU26QW32_cjs.r(t,i).iteration===f.id)&&(t={...t,iterations:t.iterations.map(a=>a.id===f.id?{...a,spent:chunkMU26QW32_cjs.L(a.spent,s)}:a)});for(let a of e.lessons??[]){let r=`L${t.lessons.length+1}`;t={...t,lessons:[...t.lessons,{id:r,at:l,text:a.text,scope:a.scope,status:"raised",from:d,item:i}]},t=chunkMU26QW32_cjs.c(t,"lesson.raised",d,{id:r,from:d,item:i,scope:a.scope},l);}let S=[];for(let a of e.follow_ups??[]){let r=t.stages[0],{iteration:g,...m}=a;t=chunkMU26QW32_cjs.s(t,{...m,stage:r.id,parent:i,tags:[...a.tags??[],"follow-up"]},d,l),S.push(a.id);}let k=e.verdict??"done",w=[];if((k==="done"||k==="needs-review")&&e.open_questions.length>0&&w.push({rule:"open-questions-ignored",severity:"warning",item:i,message:`"${i}" finished with ${e.open_questions.length} open question(s) nobody will see: ${e.open_questions.join(" | ")}`,fix:'use verdict "escalate" to route them to a role with capability escalate, or answer them in the next brief'}),k==="rework"){(!e.notes||e.notes.trim()==="")&&chunkOSHBJIYD_cjs.b("handoff-invalid",`rework on "${i}" needs notes`,"say what must change in handoff.notes",{items:[i]});let a=chunkMU26QW32_cjs.r(t,i);t=chunkMU26QW32_cjs.v(chunkMU26QW32_cjs.u(t,i,{stage:ie(t,a),status:"todo"},d,l),i),t=chunkMU26QW32_cjs.c(t,"item.rework",d,{id:i,by:d,notes:e.notes},l);}else if((k==="done"||k==="needs-review")&&chunkMU26QW32_cjs.r(t,i).type==="question"){let a=t.stages[t.stages.length-1].id;t=chunkMU26QW32_cjs.u(t,i,{stage:a,status:"done"},d,l);}else if(k==="done"||k==="needs-review"){let a=chunkMU26QW32_cjs.r(t,i),r=chunkMU26QW32_cjs.n(t,a.stage);if(chunkMU26QW32_cjs.D(t,a,r.exitPolicy,`leave "${r.id}"`,o),r.gate){let g=o.escalateGate?.(t,a,r.gate),m=chunkMU26QW32_cjs.E(r.gate,g),v=chunkMU26QW32_cjs.H(t,a,m,d);v.outcome==="fail"&&chunkOSHBJIYD_cjs.b("gate-unmet",`gate "${m.id}" blocks "${i}": ${v.violations.map(h=>h.message).join("; ")}`,v.violations.map(h=>h.fix).join("; "),{items:[i],rule:v.violations[0].rule}),o.escalateGate&&(t=chunkMU26QW32_cjs.c(t,"gate.resolved",d,{item:i,gate:m.id,requires:m.requires,evidence:m.evidence,reason:g?.reason??{}},l)),v.outcome==="human"?t=chunkMU26QW32_cjs.I(t,{kind:"gate",item:i,gate:r.gate.id,question:`Approve gate "${r.gate.id}" for "${a.title}" (${i})?`},l):t=chunkMU26QW32_cjs.c(chunkMU26QW32_cjs.w(t,i,d,k==="needs-review",l),"gate.passed",d,{item:i,gate:r.gate.id},l);}else t=chunkMU26QW32_cjs.w(t,i,d,k==="needs-review",l);}else if(k==="blocked")t=chunkMU26QW32_cjs.A(t,i,e.notes||"blocked by worker",d,d,l);else if(k==="escalate"){let a=chunkMU26QW32_cjs.g(t,"escalate")[0];a||chunkOSHBJIYD_cjs.b("missing-capability",`no role has capability "escalate" to receive the question from "${i}"`,"register a role with capability escalate",{items:[i]});let r=Object.keys(t.items).filter(N=>N.startsWith(`${i}-q`)).length+1,g=`${i}-q${r}`,m=chunkMU26QW32_cjs.r(t,i),v=ee(m),h={id:g,type:"question",title:e.open_questions.join(" | ")||e.notes||`question from ${i}`,parent:i,role:a.id,priority:Number.MAX_SAFE_INTEGER,stage:v};m.iteration!==void 0&&(h.iteration=m.iteration),t=chunkMU26QW32_cjs.s(t,h,d,l),t=chunkMU26QW32_cjs.u(t,i,{stage:v,status:"todo"},d,l),t=chunkMU26QW32_cjs.q(t,i,N=>({...N,dependsOn:[...N.dependsOn,g]})),t=chunkMU26QW32_cjs.c(t,"item.escalated",d,{id:i,question:g,to:a.id},l);}return t=chunkMU26QW32_cjs.c(t,"item.completed",d,{id:i,role:d,verdict:k,produced:e.produced,notes:e.notes,do_not:e.do_not,open_questions:e.open_questions,followUps:S,tokens:s.tokensIn+s.tokensOut,durationMs:s.durationMs,model:s.model},l),o.afterComplete&&(t=o.afterComplete(t,i,l)),{state:t,warnings:w}}var ae=[["tokensIn","tokens-in"],["tokensOut","tokens-out"],["durationMs","duration-ms"]],te=n=>({tokensIn:n.tokensIn,tokensOut:n.tokensOut,durationMs:n.durationMs,model:n.model});function Ge(n,o,e,s,u,l){chunkMU26QW32_cjs.r(n,o);let i=[];n.accounting.forEach((p,b)=>{p.item===o&&i.push(b);}),i.length===0&&chunkOSHBJIYD_cjs.b("invalid-input",`item "${o}" has no accounting line to correct`,`complete "${o}" first (exwf complete), then exwf account`,{items:[o]});let d=l??i.length;(!Number.isInteger(d)||d<1||d>i.length)&&chunkOSHBJIYD_cjs.b("invalid-input",`item "${o}" has ${i.length} accounting line(s), not line ${String(l)}`,`pass --line 1..${i.length}`,{items:[o]});let t=i[d-1],f=n.accounting[t];for(let[p,b]of ae){let q=e[p];q!==void 0&&(!Number.isFinite(q)||q<0)&&chunkOSHBJIYD_cjs.b("accounting-invalid",`${p} must be a non-negative number`,`pass --${b} <n> with a measured figure`,{items:[o]});}e.model!==void 0&&e.model.trim()===""&&chunkOSHBJIYD_cjs.b("accounting-invalid","model must not be empty","pass --model with the model id that ran the work",{items:[o]});let{estimate:S,...k}=f,w={...k,tokensIn:e.tokensIn??f.tokensIn,tokensOut:e.tokensOut??f.tokensOut,durationMs:e.durationMs??f.durationMs,model:e.model??f.model};w.tokensIn+w.tokensOut===0&&chunkOSHBJIYD_cjs.b("accounting-invalid",`the correction leaves "${o}" at 0 tokens`,"pass the host's usage figures with --tokens-in / --tokens-out",{items:[o]});let a=te(f),r=te(w);a.tokensIn===r.tokensIn&&a.tokensOut===r.tokensOut&&a.durationMs===r.durationMs&&a.model===r.model&&f.estimate!==true&&chunkOSHBJIYD_cjs.b("no-op",`accounting for "${o}" line ${d} already has these figures`,"pass at least one different value to exwf account",{items:[o]});let m={tokens:r.tokensIn+r.tokensOut-(a.tokensIn+a.tokensOut),durationMs:r.durationMs-a.durationMs},v=n.items[o],h;for(let p of n.iterations)(p.committed.includes(o)||v.iteration===p.id)&&p.startedAt<=f.endedAt&&(p.endedAt===void 0||f.endedAt<=p.endedAt)&&(h=p);let N={...n,accounting:n.accounting.map((p,b)=>b===t?w:p)};return h&&(N={...N,iterations:N.iterations.map(p=>p.id===h.id?{...p,spent:{...p.spent,tokens:Math.max(0,p.spent.tokens+m.tokens),wallclockMs:Math.max(0,p.spent.wallclockMs+m.durationMs)}}:p)}),chunkMU26QW32_cjs.c(N,"accounting.corrected",s,{item:o,line:d,iteration:h?.id??null,before:a,after:r,delta:m},chunkMU26QW32_cjs.a(u))}exports.a=ue;exports.b=pe;exports.c=ne;exports.d=he;exports.e=ve;exports.f=je;exports.g=Ge;//# sourceMappingURL=chunk-RGHM3JJM.cjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-RGHM3JJM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/roles/registry.ts","../src/core/brief.ts","../src/core/complete.ts","../src/core/accounting.ts"],"names":["OPEN","registerRole","state","role","by","now","assertId","roleOf","fail","next","appendEvent","retireRole","roleId","open","roles","completions","itemId","out","ev","lastCompletion","all","synthesizeBrief","methodology","item","upstream","doNot","sources","dep","p","d","priorHandoffs","touched","relatedBugs","b","a","it","openIteration","gate","stageOf","brief","remaining","context","openQuestions","last","opts","res","plan","briefs","VERDICTS","LESSON_SCOPES","isObj","x","str","validate","handoff","acc","getItem","bad","what","fix","verdict","lessons","l","followUps","f","k","pulledFromStage","i","t","reworkStage","lastDispatchBefore","complete","result","ruled","applyAction","completeBody","at","nowOf","id","s","addEvidence","addSpent","lid","n","first","_drop","rest","addItem","warnings","clearRole","moveItem","lastStageId","stage","assertPolicies","widenGate","checkGate","v","raisePending","advanceItem","raiseBlocker","thinker","rolesWith","qid","parent","pulledFrom","q","patchItem","NUMERIC","pick","correctAccounting","patch","line","indexes","idx","before","flag","after","delta","owner"],"mappings":"qHAKA,IAAMA,EAAAA,CAA4B,IAAI,GAAA,CAAI,CAAC,cAAe,QAAA,CAAU,SAAS,CAAC,CAAA,CAcvE,SAASC,EAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,EACAC,CAAAA,CACkB,CAClBC,mBAAAA,CAASH,CAAAA,CAAK,EAAA,CAAI,SAAS,CAAA,CACvBI,mBAAAA,CAAOL,EAAOC,CAAAA,CAAK,EAAE,CAAA,EACvBK,mBAAAA,CACE,gBAAA,CACA,CAAA,MAAA,EAASL,CAAAA,CAAK,EAAE,mBAChB,CAAA,kCAAA,EAAqCA,CAAAA,CAAK,EAAE,CAAA,QAAA,CAC9C,CAAA,CACF,IAAMM,CAAAA,CAAO,CAAE,GAAGP,CAAAA,CAAO,KAAA,CAAO,CAAE,GAAGA,CAAAA,CAAM,KAAA,CAAO,CAACC,CAAAA,CAAK,EAAE,EAAGA,CAAK,CAAE,CAAA,CACpE,OAAOO,mBAAAA,CACLD,CAAAA,CACA,iBAAA,CACAL,EACA,CAAE,IAAA,CAAMD,CAAAA,CAAK,EAAA,CAAI,aAAcA,CAAAA,CAAK,YAAa,CAAA,CACjDE,CACF,CACF,CAcO,SAASM,EAAAA,CACdT,CAAAA,CACAU,CAAAA,CACAR,CAAAA,CACAC,CAAAA,CACkB,CACbE,oBAAOL,CAAAA,CAAOU,CAAM,CAAA,EACvBJ,mBAAAA,CACE,cAAA,CACA,CAAA,MAAA,EAASI,CAAM,CAAA,gBAAA,CAAA,CACf,qBAAqB,MAAA,CAAO,IAAA,CAAKV,CAAAA,CAAM,KAAK,CAAA,CAAE,IAAA,CAAK,IAAI,CAAA,EAAK,QAAQ,CAAA,CACtE,CAAA,CACF,IAAMW,CAAAA,CAAO,MAAA,CAAO,MA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BAAAA,CACLqE,CAAAA,CACA,sBAAA,CACA3E,EACA,CACE,IAAA,CAAMY,CAAAA,CACN,IAAA,CAAMmE,CAAAA,CACN,SAAA,CAAWmC,CAAAA,EAAO,EAAA,EAAM,KACxB,MAAA,CAAQrF,CAAAA,CACR,KAAA,CAAOC,CAAAA,CACP,MAAAmF,CACF,CAAA,CACAxC,mBAAAA,CAAMxE,CAAG,CACX,CACF","file":"chunk-RGHM3JJM.cjs","sourcesContent":["import { assertId, fail } from \"../errors.ts\";\nimport { appendEvent } from \"../state.ts\";\nimport type { Role, WorkflowState } from \"../types.ts\";\nimport { roleOf } from \"./lookup.ts\";\n\nconst OPEN: ReadonlySet<string> = new Set([\"in_progress\", \"review\", \"blocked\"]);\n\nexport function registerRole<N extends string>(\n state: WorkflowState<N>,\n role: Role,\n by: string,\n now?: string,\n): WorkflowState<N>;\nexport function registerRole(\n state: WorkflowState,\n role: Role,\n by: string,\n now?: string,\n): WorkflowState;\nexport function registerRole<N extends string>(\n state: WorkflowState<N>,\n role: Role,\n by: string,\n now?: string,\n): WorkflowState<N> {\n assertId(role.id, \"role id\");\n if (roleOf(state, role.id))\n fail(\n \"duplicate-role\",\n `role \"${role.id}\" already exists`,\n `use a different id or retireRole(\"${role.id}\") first`,\n );\n const next = { ...state, roles: { ...state.roles, [role.id]: role } };\n return appendEvent(\n next,\n \"role.registered\",\n by,\n { role: role.id, capabilities: role.capabilities },\n now,\n );\n}\n\nexport function retireRole<N extends string>(\n state: WorkflowState<N>,\n roleId: string,\n by: string,\n now?: string,\n): WorkflowState<N>;\nexport function retireRole(\n state: WorkflowState,\n roleId: string,\n by: string,\n now?: string,\n): WorkflowState;\nexport function retireRole<N extends string>(\n state: WorkflowState<N>,\n roleId: string,\n by: string,\n now?: string,\n): WorkflowState<N> {\n if (!roleOf(state, roleId))\n fail(\n \"unknown-role\",\n `role \"${roleId}\" does not exist`,\n `registered roles: ${Object.keys(state.roles).join(\", \") || \"(none)\"}`,\n );\n const open = Object.values(state.items)\n .filter((i) => i.role === roleId && OPEN.has(i.status))\n .map((i) => i.id);\n if (open.length)\n fail(\n \"role-has-open-items\",\n `role \"${roleId}\" still holds ${open.length} open item(s)`,\n `complete or reassign ${open.join(\", \")} before retiring the role`,\n { items: open },\n );\n const roles = { ...state.roles };\n delete roles[roleId];\n return appendEvent({ ...state, roles }, \"role.retired\", by, { role: roleId }, now);\n}\n","import { remaining } from \"./budget.ts\";\nimport { fail } from \"./errors.ts\";\nimport { stageOf } from \"./items/stage.ts\";\nimport { openIteration, plan, type PlanOptions, type PlanReason, type Skipped } from \"./planner.ts\";\nimport { roleOf } from \"./roles/lookup.ts\";\nimport type {\n Brief,\n Handoff,\n Methodology,\n MethodologyName,\n Verdict,\n WorkItem,\n WorkflowState,\n} from \"./types.ts\";\n\ninterface CompletedPayload {\n id: string;\n role: string;\n verdict: Verdict;\n produced: Handoff[\"produced\"];\n notes: string;\n do_not: string[];\n open_questions?: string[];\n}\n\nfunction completions(\n state: WorkflowState<string>,\n itemId: string,\n): Array<CompletedPayload & { at: string }> {\n const out: Array<CompletedPayload & { at: string }> = [];\n for (const ev of state.events) {\n if (ev.type === \"item.completed\" && (ev.payload as CompletedPayload).id === itemId)\n out.push({ ...(ev.payload as CompletedPayload), at: ev.at });\n }\n return out;\n}\n\nfunction lastCompletion(\n state: WorkflowState<string>,\n itemId: string,\n): CompletedPayload | undefined {\n const all = completions(state, itemId);\n return all[all.length - 1];\n}\n\nexport function synthesizeBrief<N extends string>(\n state: WorkflowState<N>,\n methodology: Methodology<unknown, N>,\n item: WorkItem,\n): Brief;\nexport function synthesizeBrief(\n state: WorkflowState,\n methodology: Methodology,\n item: WorkItem,\n): Brief;\nexport function synthesizeBrief<N extends string>(\n state: WorkflowState<N>,\n methodology: Methodology<unknown, N>,\n item: WorkItem,\n): Brief {\n if (!item.role)\n fail(\n \"unknown-role\",\n `item \"${item.id}\" has no role assigned`,\n \"dispatch it with next() or set item.role\",\n { items: [item.id] },\n );\n const role = roleOf(state, item.role);\n if (!role)\n fail(\n \"unknown-role\",\n `role \"${item.role}\" does not exist`,\n `registered roles: ${Object.keys(state.roles).join(\", \")}`,\n );\n const upstream: Brief[\"upstream\"] = [];\n const doNot = [...role.do_not];\n const sources = [\n ...item.dependsOn,\n ...(item.type === \"bug\" || item.type === \"change-request\" ? (item.affects ?? []) : []),\n ];\n for (const dep of sources) {\n const p = lastCompletion(state, dep);\n if (!p) continue;\n upstream.push({ item: dep, produced: p.produced, notes: p.notes });\n for (const d of p.do_not) if (!doNot.includes(d)) doNot.push(d);\n }\n const priorHandoffs: Brief[\"priorHandoffs\"] = completions(state, item.id).map((p) => ({\n role: p.role,\n verdict: p.verdict,\n notes: p.notes,\n produced: p.produced,\n at: p.at,\n }));\n const touched = new Set([item.id, ...item.dependsOn]);\n const relatedBugs: Brief[\"relatedBugs\"] = Object.values(state.items)\n .filter(\n (b) =>\n (b.type === \"bug\" || b.type === \"change-request\") &&\n b.id !== item.id &&\n b.status !== \"done\" &&\n b.status !== \"dropped\" &&\n (b.affects ?? []).some((a) => touched.has(a)),\n )\n .map((b) => ({ id: b.id, title: b.title, affects: b.affects ?? [] }));\n const it = openIteration(state);\n const gate = stageOf(state, item.stage).gate;\n const brief: Brief = {\n item,\n role,\n modelTier: role.modelTier,\n invariants: [...methodology.invariants(state, item), ...state.agreements],\n do_not: doNot,\n acceptance: item.acceptance,\n upstream,\n priorHandoffs,\n relatedBugs,\n budgetRemaining: it ? remaining(it.budget, it.spent) : {},\n };\n if (gate) brief.gateAhead = gate;\n const context = methodology.briefContext?.(state, item);\n if (context) brief.context = context;\n if (item.type === \"question\" && item.parent) {\n const p = lastCompletion(state, item.parent);\n if (p) {\n brief.parent = {\n item: item.parent,\n role: p.role,\n notes: p.notes,\n produced: p.produced,\n open_questions: p.open_questions ?? [],\n do_not: p.do_not,\n };\n for (const d of p.do_not) if (!doNot.includes(d)) doNot.push(d);\n }\n }\n return brief;\n}\n\n/** Open questions of finished items: the last completion per item, verdict done/needs-review, with open_questions left unanswered. */\nexport function openQuestions(\n state: WorkflowState<string>,\n): Array<{ item: string; role: string; questions: string[]; at: string }>;\nexport function openQuestions(\n state: WorkflowState,\n): Array<{ item: string; role: string; questions: string[]; at: string }>;\nexport function openQuestions(\n state: WorkflowState<string>,\n): Array<{ item: string; role: string; questions: string[]; at: string }> {\n const last = new Map<string, CompletedPayload & { at: string }>();\n for (const ev of state.events) {\n if (ev.type !== \"item.completed\") continue;\n const p = ev.payload as CompletedPayload;\n last.delete(p.id);\n last.set(p.id, { ...p, at: ev.at });\n }\n return [...last.values()]\n .filter(\n (p) =>\n (p.verdict === \"done\" || p.verdict === \"needs-review\") &&\n (p.open_questions ?? []).length > 0,\n )\n .map((p) => ({ item: p.id, role: p.role, questions: p.open_questions ?? [], at: p.at }));\n}\n\nexport interface NextResult<N extends string = MethodologyName> {\n state: WorkflowState<N>;\n briefs: Brief[];\n skipped: Skipped[];\n reason?: PlanReason;\n}\n\nexport function next<N extends string>(\n state: WorkflowState<N>,\n methodology: Methodology<unknown, N>,\n opts?: PlanOptions,\n): NextResult<N>;\nexport function next(\n state: WorkflowState,\n methodology: Methodology,\n opts?: PlanOptions,\n): NextResult;\nexport function next<N extends string>(\n state: WorkflowState<N>,\n methodology: Methodology<unknown, N>,\n opts: PlanOptions = {},\n): NextResult<N> {\n const res = plan(state, methodology, opts);\n const briefs = res.dispatched.map((d) =>\n synthesizeBrief(res.state, methodology, res.state.items[d.id]!),\n );\n return res.reason\n ? { state: res.state, briefs, skipped: res.skipped, reason: res.reason }\n : { state: res.state, briefs, skipped: res.skipped };\n}\n","import { addSpent } from \"./budget.ts\";\nimport { fail } from \"./errors.ts\";\nimport { checkGate, lastDispatchBefore, raisePending } from \"./gates.ts\";\nimport { widenGate } from \"./gate-escalation.ts\";\nimport { addEvidence } from \"./items/evidence.ts\";\nimport { addItem, getItem, patchItem } from \"./items/record.ts\";\nimport { advanceItem, clearRole, moveItem } from \"./items/move.ts\";\nimport { raiseBlocker } from \"./items/blockers.ts\";\nimport { stageOf } from \"./items/stage.ts\";\nimport { applyAction } from \"./methodology.ts\";\nimport { assertPolicies } from \"./policies.ts\";\nimport { openIteration } from \"./planner.ts\";\nimport { rolesWith } from \"./roles/lookup.ts\";\nimport { appendEvent, nowOf } from \"./state.ts\";\nimport type {\n Accounting,\n ApplyResult,\n Handoff,\n Methodology,\n NewItem,\n Violation,\n WorkItem,\n WorkflowState,\n} from \"./types.ts\";\n\nconst VERDICTS: readonly string[] = [\"done\", \"needs-review\", \"rework\", \"blocked\", \"escalate\"];\nconst LESSON_SCOPES: readonly string[] = [\"policy\", \"skill\", \"memory\", \"spec\", \"review\"];\n\nconst isObj = (x: unknown): x is Record<string, unknown> =>\n typeof x === \"object\" && x !== null && !Array.isArray(x);\nconst str = (x: unknown) => typeof x === \"string\";\n\nfunction validate(state: WorkflowState<string>, handoff: Handoff, acc: Accounting): void {\n const item = getItem(state, handoff.item);\n if (item.status !== \"in_progress\")\n fail(\n \"invalid-transition\",\n `item \"${item.id}\" is ${item.status}, not in_progress`,\n \"only dispatched items can be completed; call next() first\",\n { items: [item.id] },\n );\n if (!Array.isArray(handoff.do_not))\n fail(\n \"handoff-invalid\",\n `handoff for \"${item.id}\" has no do_not array`,\n \"set handoff.do_not to [] when there is nothing to forbid\",\n { items: [item.id] },\n );\n if (!Array.isArray(handoff.produced) || !Array.isArray(handoff.open_questions))\n fail(\n \"handoff-invalid\",\n `handoff for \"${item.id}\" needs produced[] and open_questions[]`,\n \"pass empty arrays when there is nothing\",\n { items: [item.id] },\n );\n const bad = (what: string, fix: string) =>\n fail(\"handoff-invalid\", `handoff for \"${item.id}\": ${what}`, fix, { items: [item.id] });\n const verdict = handoff.verdict ?? \"done\";\n if (!VERDICTS.includes(verdict))\n bad(`unknown verdict ${JSON.stringify(verdict)}`, `use one of: ${VERDICTS.join(\", \")}`);\n if (!handoff.produced.every((p) => isObj(p) && str(p.kind) && str(p.ref)))\n bad(\"produced[] entries need string kind and ref\", 'use { \"kind\": \"code\", \"ref\": \"src/a.ts\" }');\n const lessons: unknown = handoff.lessons ?? [];\n if (\n !Array.isArray(lessons) ||\n !lessons.every((l) => isObj(l) && str(l.text) && LESSON_SCOPES.includes(l.scope as string))\n )\n bad(\n \"lessons[] entries need a text and a scope\",\n `scope is one of: ${LESSON_SCOPES.join(\", \")}`,\n );\n const followUps: unknown = handoff.follow_ups ?? [];\n if (!Array.isArray(followUps) || !followUps.every((f) => isObj(f) && str(f.id) && str(f.title)))\n bad(\"follow_ups[] entries need a string id and title\", \"describe each follow-up as a new item\");\n if (handoff.role !== item.role)\n fail(\n \"handoff-invalid\",\n `handoff role \"${handoff.role}\" differs from the dispatched role \"${item.role}\"`,\n `complete as \"${item.role}\" or re-dispatch`,\n { items: [item.id] },\n );\n if (!acc.model || acc.model.trim() === \"\")\n fail(\n \"accounting-invalid\",\n `accounting for \"${item.id}\" has no model`,\n \"record the model id that actually ran the work\",\n { items: [item.id] },\n );\n for (const k of [\"tokensIn\", \"tokensOut\", \"durationMs\"] as const) {\n if (!Number.isFinite(acc[k]) || acc[k] < 0)\n fail(\n \"accounting-invalid\",\n `accounting.${k} must be a non-negative number`,\n `measure ${k} from the host's usage report`,\n { items: [item.id] },\n );\n }\n if (acc.tokensIn + acc.tokensOut === 0 && acc.estimate !== true)\n fail(\n \"accounting-invalid\",\n `accounting for \"${item.id}\" records 0 tokens`,\n \"pass the host's usage figures, or set estimate: true (CLI --estimate) to record a placeholder and correct it later with correctAccounting / exwf account\",\n { items: [item.id] },\n );\n}\n\n/** Stage the item was pulled from: the `from.stage` of its last transition into in_progress, else its current stage. */\nfunction pulledFromStage(item: WorkItem): string {\n for (let i = item.transitions.length - 1; i >= 0; i--) {\n const t = item.transitions[i]!;\n if (t.to.status === \"in_progress\") return t.from.stage;\n }\n return item.stage;\n}\n\n/** Stage a reworked item returns to: the from.stage of the last dispatch made from a stage strictly before the current one (so a reviewer's rework lands where the work was pulled from), else the plain pulled-from stage. */\nfunction reworkStage(state: WorkflowState<string>, item: WorkItem): string {\n return lastDispatchBefore(state, item)?.from.stage ?? pulledFromStage(item);\n}\n\nexport function complete<N extends string>(\n state: WorkflowState<N>,\n methodology: Methodology<unknown, N>,\n handoff: Handoff,\n acc: Accounting,\n now?: string,\n): ApplyResult<N>;\nexport function complete(\n state: WorkflowState,\n methodology: Methodology,\n handoff: Handoff,\n acc: Accounting,\n now?: string,\n): ApplyResult;\nexport function complete<N extends string>(\n state: WorkflowState<N>,\n methodology: Methodology<unknown, N>,\n handoff: Handoff,\n acc: Accounting,\n now?: string,\n): ApplyResult<N> {\n validate(state, handoff, acc);\n // the methodology's rules see the completion (applyAction validates, appends nothing, then reduces)\n let result: ApplyResult<N> | undefined;\n const ruled = applyAction(\n state,\n methodology,\n { type: \"item.complete\", by: handoff.role, payload: { item: handoff.item, handoff } },\n () => {\n result = completeBody(state, methodology, handoff, acc, now);\n return result.state;\n },\n );\n return { state: ruled.state, warnings: [...ruled.warnings, ...result!.warnings] };\n}\n\nfunction completeBody<N extends string>(\n state: WorkflowState<N>,\n methodology: Methodology<unknown, N>,\n handoff: Handoff,\n acc: Accounting,\n now?: string,\n): ApplyResult<N> {\n const at = nowOf(now);\n const id = handoff.item;\n const role = handoff.role;\n let s: WorkflowState<N> = { ...state, accounting: [...state.accounting, acc] };\n for (const p of handoff.produced)\n s = addEvidence(s, id, { kind: p.kind, ref: p.ref, by: role }, at);\n const it = openIteration(s);\n if (it && (it.committed.includes(id) || getItem(s, id).iteration === it.id)) {\n s = {\n ...s,\n iterations: s.iterations.map((x) =>\n x.id === it.id ? { ...x, spent: addSpent(x.spent, acc) } : x,\n ),\n };\n }\n\n for (const l of handoff.lessons ?? []) {\n const lid = `L${s.lessons.length + 1}`;\n s = {\n ...s,\n lessons: [\n ...s.lessons,\n { id: lid, at, text: l.text, scope: l.scope, status: \"raised\", from: role, item: id },\n ],\n };\n s = appendEvent(\n s,\n \"lesson.raised\",\n role,\n { id: lid, from: role, item: id, scope: l.scope },\n at,\n );\n }\n\n const followUps: string[] = [];\n for (const n of handoff.follow_ups ?? []) {\n const first = s.stages[0]!;\n const { iteration: _drop, ...rest } = n;\n s = addItem(\n s,\n { ...rest, stage: first.id, parent: id, tags: [...(n.tags ?? []), \"follow-up\"] },\n role,\n at,\n );\n followUps.push(n.id);\n }\n\n const verdict = handoff.verdict ?? \"done\";\n const warnings: Violation[] = [];\n if ((verdict === \"done\" || verdict === \"needs-review\") && handoff.open_questions.length > 0)\n warnings.push({\n rule: \"open-questions-ignored\",\n severity: \"warning\",\n item: id,\n message: `\"${id}\" finished with ${handoff.open_questions.length} open question(s) nobody will see: ${handoff.open_questions.join(\" | \")}`,\n fix: 'use verdict \"escalate\" to route them to a role with capability escalate, or answer them in the next brief',\n });\n if (verdict === \"rework\") {\n if (!handoff.notes || handoff.notes.trim() === \"\")\n fail(\n \"handoff-invalid\",\n `rework on \"${id}\" needs notes`,\n \"say what must change in handoff.notes\",\n { items: [id] },\n );\n const item = getItem(s, id);\n s = clearRole(moveItem(s, id, { stage: reworkStage(s, item), status: \"todo\" }, role, at), id);\n s = appendEvent(s, \"item.rework\", role, { id, by: role, notes: handoff.notes }, at);\n } else if (\n (verdict === \"done\" || verdict === \"needs-review\") &&\n getItem(s, id).type === \"question\"\n ) {\n // a question is answered, not delivered: it skips exit policies and gates\n const lastStageId = s.stages[s.stages.length - 1]!.id;\n s = moveItem(s, id, { stage: lastStageId, status: \"done\" }, role, at);\n } else if (verdict === \"done\" || verdict === \"needs-review\") {\n const item = getItem(s, id);\n const stage = stageOf(s, item.stage);\n assertPolicies(s, item, stage.exitPolicy, `leave \"${stage.id}\"`, methodology);\n if (stage.gate) {\n // a methodology's escalation hook can only widen the static gate (spec 27, #35)\n const x = methodology.escalateGate?.(s, item, stage.gate);\n const gate = widenGate(stage.gate, x);\n const res = checkGate(s, item, gate, role);\n if (res.outcome === \"fail\")\n fail(\n \"gate-unmet\",\n `gate \"${gate.id}\" blocks \"${id}\": ${res.violations.map((v) => v.message).join(\"; \")}`,\n res.violations.map((v) => v.fix).join(\"; \"),\n { items: [id], rule: res.violations[0]!.rule },\n );\n if (methodology.escalateGate)\n s = appendEvent(\n s,\n \"gate.resolved\",\n role,\n {\n item: id,\n gate: gate.id,\n requires: gate.requires,\n evidence: gate.evidence,\n reason: x?.reason ?? {},\n },\n at,\n );\n if (res.outcome === \"human\") {\n s = raisePending(\n s,\n {\n kind: \"gate\",\n item: id,\n gate: stage.gate.id,\n question: `Approve gate \"${stage.gate.id}\" for \"${item.title}\" (${id})?`,\n },\n at,\n );\n } else {\n s = appendEvent(\n advanceItem(s, id, role, verdict === \"needs-review\", at),\n \"gate.passed\",\n role,\n { item: id, gate: stage.gate.id },\n at,\n );\n }\n } else {\n s = advanceItem(s, id, role, verdict === \"needs-review\", at);\n }\n } else if (verdict === \"blocked\") {\n s = raiseBlocker(s, id, handoff.notes || \"blocked by worker\", role, role, at);\n } else if (verdict === \"escalate\") {\n const thinker = rolesWith(s, \"escalate\")[0];\n if (!thinker)\n fail(\n \"missing-capability\",\n `no role has capability \"escalate\" to receive the question from \"${id}\"`,\n \"register a role with capability escalate\",\n { items: [id] },\n );\n const n = Object.keys(s.items).filter((k) => k.startsWith(`${id}-q`)).length + 1;\n const qid = `${id}-q${n}`;\n const parent = getItem(s, id);\n const pulledFrom = pulledFromStage(parent);\n const q: NewItem = {\n id: qid,\n type: \"question\",\n title: handoff.open_questions.join(\" | \") || handoff.notes || `question from ${id}`,\n parent: id,\n role: thinker.id,\n priority: Number.MAX_SAFE_INTEGER,\n stage: pulledFrom,\n };\n if (parent.iteration !== undefined) q.iteration = parent.iteration;\n s = addItem(s, q, role, at);\n s = moveItem(s, id, { stage: pulledFrom, status: \"todo\" }, role, at);\n s = patchItem(s, id, (x) => ({ ...x, dependsOn: [...x.dependsOn, qid] }));\n s = appendEvent(s, \"item.escalated\", role, { id, question: qid, to: thinker.id }, at);\n }\n\n s = appendEvent(\n s,\n \"item.completed\",\n role,\n {\n id,\n role,\n verdict,\n produced: handoff.produced,\n notes: handoff.notes,\n do_not: handoff.do_not,\n open_questions: handoff.open_questions,\n followUps,\n tokens: acc.tokensIn + acc.tokensOut,\n durationMs: acc.durationMs,\n model: acc.model,\n },\n at,\n );\n if (methodology.afterComplete) s = methodology.afterComplete(s, id, at);\n return { state: s, warnings };\n}\n","import { fail } from \"./errors.ts\";\nimport { getItem } from \"./items/record.ts\";\nimport { appendEvent, nowOf } from \"./state.ts\";\nimport type { Accounting, Iteration, WorkflowState } from \"./types.ts\";\n\nexport interface AccountingPatch {\n tokensIn?: number;\n tokensOut?: number;\n durationMs?: number;\n model?: string;\n}\n\nconst NUMERIC = [\n [\"tokensIn\", \"tokens-in\"],\n [\"tokensOut\", \"tokens-out\"],\n [\"durationMs\", \"duration-ms\"],\n] as const;\n\nconst pick = (a: Accounting) => ({\n tokensIn: a.tokensIn,\n tokensOut: a.tokensOut,\n durationMs: a.durationMs,\n model: a.model,\n});\n\n/**\n * Rewrite one accounting line of an item (`line` is 1-based among the item's lines, default the last).\n * The owning iteration's spent follows the delta, open or closed; the event records before/after.\n */\nexport function correctAccounting<N extends string>(\n state: WorkflowState<N>,\n itemId: string,\n patch: AccountingPatch,\n by: string,\n now?: string,\n line?: number,\n): WorkflowState<N>;\nexport function correctAccounting(\n state: WorkflowState,\n itemId: string,\n patch: AccountingPatch,\n by: string,\n now?: string,\n line?: number,\n): WorkflowState;\nexport function correctAccounting<N extends string>(\n state: WorkflowState<N>,\n itemId: string,\n patch: AccountingPatch,\n by: string,\n now?: string,\n line?: number,\n): WorkflowState<N> {\n getItem(state, itemId);\n const indexes: number[] = [];\n state.accounting.forEach((a, i) => {\n if (a.item === itemId) indexes.push(i);\n });\n if (indexes.length === 0)\n fail(\n \"invalid-input\",\n `item \"${itemId}\" has no accounting line to correct`,\n `complete \"${itemId}\" first (exwf complete), then exwf account`,\n { items: [itemId] },\n );\n const n = line ?? indexes.length;\n if (!Number.isInteger(n) || n < 1 || n > indexes.length)\n fail(\n \"invalid-input\",\n `item \"${itemId}\" has ${indexes.length} accounting line(s), not line ${String(line)}`,\n `pass --line 1..${indexes.length}`,\n { items: [itemId] },\n );\n const idx = indexes[n - 1]!;\n const before = state.accounting[idx]!;\n for (const [k, flag] of NUMERIC) {\n const v = patch[k];\n if (v !== undefined && (!Number.isFinite(v) || v < 0))\n fail(\n \"accounting-invalid\",\n `${k} must be a non-negative number`,\n `pass --${flag} <n> with a measured figure`,\n { items: [itemId] },\n );\n }\n if (patch.model !== undefined && patch.model.trim() === \"\")\n fail(\n \"accounting-invalid\",\n \"model must not be empty\",\n \"pass --model with the model id that ran the work\",\n { items: [itemId] },\n );\n const { estimate: _drop, ...rest } = before;\n const after: Accounting = {\n ...rest,\n tokensIn: patch.tokensIn ?? before.tokensIn,\n tokensOut: patch.tokensOut ?? before.tokensOut,\n durationMs: patch.durationMs ?? before.durationMs,\n model: patch.model ?? before.model,\n };\n if (after.tokensIn + after.tokensOut === 0)\n fail(\n \"accounting-invalid\",\n `the correction leaves \"${itemId}\" at 0 tokens`,\n \"pass the host's usage figures with --tokens-in / --tokens-out\",\n { items: [itemId] },\n );\n const b = pick(before);\n const a = pick(after);\n const unchanged =\n b.tokensIn === a.tokensIn &&\n b.tokensOut === a.tokensOut &&\n b.durationMs === a.durationMs &&\n b.model === a.model;\n // replacing a placeholder with the same figures still settles it, so it is not a no-op\n if (unchanged && before.estimate !== true)\n fail(\n \"no-op\",\n `accounting for \"${itemId}\" line ${n} already has these figures`,\n \"pass at least one different value to exwf account\",\n { items: [itemId] },\n );\n const delta = {\n tokens: a.tokensIn + a.tokensOut - (b.tokensIn + b.tokensOut),\n durationMs: a.durationMs - b.durationMs,\n };\n const item = state.items[itemId]!;\n let owner: Iteration | undefined;\n for (const it of state.iterations) {\n // the last iteration that was open when the line was recorded and carried the item\n if (\n (it.committed.includes(itemId) || item.iteration === it.id) &&\n it.startedAt <= before.endedAt &&\n (it.endedAt === undefined || before.endedAt <= it.endedAt)\n )\n owner = it;\n }\n let s: WorkflowState<N> = {\n ...state,\n accounting: state.accounting.map((x, i) => (i === idx ? after : x)),\n };\n if (owner)\n s = {\n ...s,\n iterations: s.iterations.map((it) =>\n it.id === owner.id\n ? {\n ...it,\n spent: {\n ...it.spent,\n tokens: Math.max(0, it.spent.tokens + delta.tokens),\n wallclockMs: Math.max(0, it.spent.wallclockMs + delta.durationMs),\n },\n }\n : it,\n ),\n };\n return appendEvent(\n s,\n \"accounting.corrected\",\n by,\n {\n item: itemId,\n line: n,\n iteration: owner?.id ?? null,\n before: b,\n after: a,\n delta,\n },\n nowOf(now),\n );\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkKLOSFZFK_cjs=require('./chunk-KLOSFZFK.cjs'),chunk6PFJYRM7_cjs=require('./chunk-6PFJYRM7.cjs'),chunkBBI7AKJK_cjs=require('./chunk-BBI7AKJK.cjs'),chunkMU26QW32_cjs=require('./chunk-MU26QW32.cjs'),chunkOSHBJIYD_cjs=require('./chunk-OSHBJIYD.cjs');var m=e=>chunkBBI7AKJK_cjs.a(e,"investigation"),_=(e,i)=>chunkBBI7AKJK_cjs.b(e,"investigation",i);function v(e,i){return [...new Set([...e.events.filter(d=>d.type==="item.completed"&&d.payload.id===i).map(d=>d.by),...(e.items[i]?.transitions??[]).filter(d=>d.to.status==="in_progress").map(d=>d.by)])]}function N(e,i){let d;for(let p=e.events.length-1;p>=0;p--){let s=e.events[p];if(s.type==="item.completed"&&s.payload.id===i){d=s.payload;break}}return d&&["done","needs-review"].includes(d.verdict)?d.produced.filter(p=>p.kind==="experiment-output").map(p=>p.ref):[]}function I(e){return chunkOSHBJIYD_cjs.b("invalid-input",`the investigation state is inconsistent: ${e}`,"restore .workflow/state.json from git, or start a new investigation")}function O(e){return e.rounds.at(-1)??I(`phase ${e.phase} has no round`)}function S(e){return e.iterations.find(i=>i.id==="investigation")??I('there is no "investigation" iteration')}function R(e){let i=e;return (!i||typeof i!="object"||Array.isArray(i)||typeof i.question!="string"||!i.question.trim()||!Number.isSafeInteger(i.maxRounds)||i.maxRounds<1||!i.budget||typeof i.budget!="object"||Array.isArray(i.budget)||!Object.keys(i.budget).length||Object.entries(i.budget).some(([d,p])=>!["tokens","turns","wallclockMs"].includes(d)||typeof p!="number"||!Number.isFinite(p)||p<=0))&&chunkOSHBJIYD_cjs.b("config-invalid","investigation requires question, positive maxRounds and a finite positive budget","provide bounded investigation config"),{question:i.question,maxRounds:i.maxRounds,budget:{...i.budget}}}function H(e,i,d,p){let s=m(e);return chunkOSHBJIYD_cjs.b("invalid-input",`${i} (phase ${s?.phase??"intake"}): ${d}`,p,{items:s?[s.item,...s.rounds.at(-1)?[s.rounds.at(-1).item]:[]]:[]})}var F=(e,i)=>!!e&&!!i&&!chunkKLOSFZFK_cjs.a(e,i,["id","claim","falsifiedBy"]).length,y=e=>typeof e=="string"&&e.trim().length>0,B=e=>Array.isArray(e)&&e.length>0&&e.every(y)&&new Set(e).size===e.length,D=(e,i)=>e&&typeof e=="object"&&!Array.isArray(e)?Object.keys(e).find(d=>!i.includes(d)):void 0,E=(e,i)=>Array.isArray(e)?e.map(d=>D(d,i)).find(Boolean):void 0;function Q(e,i,d){chunkMU26QW32_cjs.e(e,i)?.capabilities.includes(d)||chunkOSHBJIYD_cjs.b("missing-capability",`${i} needs ${d}`,"use a registered role with the required capability");}function b(e,i,d,p){return chunkMU26QW32_cjs.c(_(e,i),`investigation.${p}`,d.by,{...i},chunkMU26QW32_cjs.a(d.now))}function C(e,i,d,p,s){let n=chunkMU26QW32_cjs.a(d.now),t=b(e,{...i,phase:"closed",outcome:p,...s?{stopReason:s}:{}},d,p);t={...t,iterations:t.iterations.map(a=>a.id==="investigation"?{...a,endedAt:n,outcome:p==="stopped"?"cancelled":"completed"}:a)};for(let a of Object.values(t.items).filter(r=>r.id===i.item||i.rounds.some(u=>u.item===r.id)))a.status!=="done"&&a.status!=="dropped"&&(t=chunkMU26QW32_cjs.u(t,a.id,{status:p==="resolved"&&a.id===i.item?"done":"dropped"},d.by,n));return t}function U(e){let i,d=()=>i??=e(),p=(s,n,t,a)=>(r,u)=>{Q(r,u.by,n);let o=m(r);return (!o||o.phase==="closed")&&H(r,s,"no active investigation","start a new investigation with intake {item}"),t&&o.phase!==t&&!(s==="hypotheses"&&o.phase==="preregister")&&H(r,s,`expected ${t}, got ${o.phase}`,`finish phase ${o.phase} before calling ${s}; ${s} requires phase ${t}`),chunkMU26QW32_cjs.W(r,d(),{type:`ceremony.${s}`,by:u.by,payload:u},()=>a(r,o,u,(l,g)=>H(r,s,l,g)))};return {intake(s,n){Q(s,n.by,"facilitate");let t=(r,u)=>H(s,"intake",r,u);s.methodology!=="investigation"&&t(`workflow methodology is ${s.methodology}, not investigation`,"init a workflow with the investigation methodology before intake"),m(s)&&t("investigation already started","use the existing investigation or initialize a new workflow"),y(n.item)||t("item is required","set intake.item to a unique investigation item ID");let a=R(s.config);return chunkMU26QW32_cjs.W(s,d(),{type:"ceremony.intake",by:n.by,payload:n},()=>{let r=chunkMU26QW32_cjs.s(s,{id:n.item,title:a.question,acceptance:["Independent evidence-based conclusion"],stage:"intake"},n.by,n.now);return r={...r,iterations:[...r.iterations,{id:"investigation",goal:a.question,budget:{...a.budget},spent:{tokens:0,turns:0,wallclockMs:0},startedAt:chunkMU26QW32_cjs.a(n.now),committed:[],carryover:[]}]},b(r,{item:n.item,phase:"hypotheses",hypotheses:[],rounds:[],contributors:[n.by]},n,"intake")})},hypotheses:p("hypotheses","define-acceptance","hypotheses",(s,n,t,a)=>{let r=t.hypotheses,u=E(r,["id","claim","falsifiedBy"]);return u&&a(`unknown key "${u}" in a hypotheses entry`,"use only id, claim and falsifiedBy in each hypotheses entry"),(!Array.isArray(r)||!r.length||r.some(o=>!o||!y(o.id)||!y(o.claim)||!y(o.falsifiedBy))||new Set(r.map(o=>o.id)).size!==r.length||r.length<2&&!y(t.singleHypothesisRationale))&&a("provide competing falsifiable hypotheses or single-testable rationale","set hypotheses to unique {id, claim, falsifiedBy} entries; supply singleHypothesisRationale when there is only one"),b(s,{...n,hypotheses:r.map(o=>({id:o.id,claim:o.claim,falsifiedBy:o.falsifiedBy})),...y(t.singleHypothesisRationale)?{singleHypothesisRationale:t.singleHypothesisRationale}:{},contributors:[...new Set([...n.contributors,t.by])],phase:"preregister"},t,"hypotheses")}),preregister:p("preregister","define-acceptance","preregister",(s,n,t,a)=>{let r=R(s.config),u=s.iterations.find(c=>c.id==="investigation");(n.rounds.length>=r.maxRounds||!u||chunkMU26QW32_cjs.N(r.budget,u.spent))&&a(`round limit or budget exhausted (${n.rounds.length} of ${r.maxRounds} rounds used)`,"call stop {reason} to close this investigation, or start a new one with a larger maxRounds or budget");let o=t.experiment,l=D(o,["id","procedureRef","predictions","replayOf"])??E(o?.predictions,["hypothesis","prediction"]);if(l&&a(`unknown key "${l}" in experiment`,"use only id, procedureRef, predictions [{hypothesis, prediction}] and replayOf in experiment"),(!o||!y(o.id)||!y(o.procedureRef)||n.rounds.some(c=>c.experiment.id===o.id)||!Array.isArray(o.predictions)||o.predictions.length!==n.hypotheses.length||n.hypotheses.some(c=>o.predictions.filter(f=>f?.hypothesis===c.id&&y(f.prediction)).length!==1)||new Set(o.predictions.map(c=>c.prediction)).size!==o.predictions.length)&&a("preregister unique experiment with differing predictions for every hypothesis","set experiment.id to a new ID, experiment.procedureRef, and one distinct experiment.predictions entry per hypothesis"),o.replayOf){let c=n.rounds.find(f=>f.experiment.id===o.replayOf&&f.result?.valid);(!c||chunkKLOSFZFK_cjs.a(c.experiment,o,["procedureRef"]).length||c.hypotheses.length!==n.hypotheses.length||n.hypotheses.some(f=>!F(f,c.hypotheses.find(q=>q.id===f.id)))||o.predictions.some(f=>!c.experiment.predictions.some(q=>!chunkKLOSFZFK_cjs.a(q,f,["hypothesis","prediction"]).length)))&&a("replay must repeat the procedure, predictions and hypotheses of a prior valid experiment","set experiment.replayOf to a valid prior experiment with identical procedureRef, predictions and hypothesis definitions");}let g=`${n.item}-run-${n.rounds.length+1}`,w=chunkMU26QW32_cjs.s(s,{id:g,title:`Experiment ${o.id}`,stage:"execute",acceptance:[o.procedureRef],iteration:"investigation"},t.by,t.now);return w={...w,iterations:w.iterations.map(c=>c.id==="investigation"?{...c,committed:[...c.committed,g]}:c)},b(w,{...n,phase:"observe",rounds:[...n.rounds,{experiment:{id:o.id,procedureRef:o.procedureRef,predictions:o.predictions.map(c=>({hypothesis:c.hypothesis,prediction:c.prediction})),...o.replayOf?{replayOf:o.replayOf}:{}},hypotheses:n.hypotheses.map(c=>({...c})),item:g,by:t.by}],contributors:[...new Set([...n.contributors,t.by])]},t,"preregister")}),observe:p("observe","verify","observe",(s,n,t,a)=>{let r=O(n),u=t.result,o=D(u,["id","valid","summary","provenanceRefs"]);return o&&a(`unknown key "${o}" in result`,"use only id, valid, summary and provenanceRefs in result"),(t.experiment!==r.experiment.id||!u||!y(u.id)||typeof u.valid!="boolean"||!y(u.summary)||!B(u.provenanceRefs)||n.rounds.some(l=>l.result?.id===u.id))&&a("observation needs current experiment, unique result and provenance","set experiment to the active experiment ID and result to {id, valid, summary, provenanceRefs} with a new result.id"),s.items[r.item]?.status!=="done"&&a("complete experiment execution before recording observations","dispatch and complete the active experiment item before calling observe"),N(s,r.item).some(l=>u.provenanceRefs.includes(l))||a("observation must link fresh experiment-output evidence from the latest completion",`include an experiment-output ref produced by the latest successful completion of item "${r.item}" in result.provenanceRefs`),b(s,{...n,phase:"update-belief",rounds:n.rounds.map(l=>l===r?{...l,result:{id:u.id,valid:u.valid,summary:u.summary,provenanceRefs:[...u.provenanceRefs]}}:l),contributors:[...new Set([...n.contributors,t.by,...v(s,r.item)])]},t,"observe")}),"update-belief":p("update-belief","define-acceptance","update-belief",(s,n,t,a)=>{let r=O(n),u=t.assessments,o=E(u,["hypothesis","assessment","reason"]);o&&a(`unknown key "${o}" in an assessments entry`,"use only hypothesis, assessment and reason in each assessments entry"),(t.result!==r.result?.id||!Array.isArray(u)||u.length!==n.hypotheses.length||n.hypotheses.some(c=>u.filter(f=>f?.hypothesis===c.id&&["supported","refuted","uncertain"].includes(f.assessment)&&y(f.reason)).length!==1)||!["round","conclusion"].includes(t.next))&&a("belief update must assess every hypothesis against current result","set result to the latest result ID, assessments to one {hypothesis, assessment, reason} per hypothesis, and next to round or conclusion"),!(r.result??I(`round ${r.experiment.id} has no result`)).valid&&u.some(c=>c.assessment!=="uncertain")&&a("invalid experiments cannot support beliefs","set every assessment to uncertain for an invalid experiment result");let g=b(s,{...n,phase:t.next==="round"?"preregister":"conclusion",rounds:n.rounds.map(c=>c===r?{...c,update:{result:t.result,assessments:u.map(f=>({hypothesis:f.hypothesis,assessment:f.assessment,reason:f.reason}))}}:c),contributors:[...new Set([...n.contributors,t.by])]},t,"belief-updated"),w=S(g);return t.next==="round"&&(n.rounds.length>=R(s.config).maxRounds||chunkMU26QW32_cjs.N(w.budget,w.spent))&&(g=C(g,m(g),t,"stopped","budget or round limit exhausted")),g}),conclude:p("conclude","define-acceptance","conclusion",(s,n,t,a)=>{let r=t;return (!["resolved","inconclusive"].includes(r.outcome)||!y(r.summary)||!B(r.evidenceRefs)||r.evidenceRefs.some(u=>!n.rounds.some(o=>o.result?.provenanceRefs.includes(u))))&&a("conclusion needs observed evidence references","set outcome, summary and evidenceRefs to references preserved in recorded observations"),r.outcome==="resolved"&&(!y(r.supportedHypothesis)||!n.rounds.slice(-1).some(u=>u.result?.valid&&u.update?.assessments.some(o=>o.hypothesis===r.supportedHypothesis&&o.assessment==="supported")))&&a("resolved conclusion needs a supported hypothesis","set supportedHypothesis to a hypothesis supported by the latest valid round, or choose outcome inconclusive"),b(s,{...n,phase:"review",conclusion:{outcome:r.outcome,summary:r.summary,evidenceRefs:[...r.evidenceRefs],...r.supportedHypothesis?{supportedHypothesis:r.supportedHypothesis}:{},by:t.by},contributors:[...new Set([...n.contributors,t.by])]},t,"conclusion")}),"review-conclusion":p("review-conclusion","review","review",(s,n,t,a)=>{let r=n.conclusion??I("phase review has no conclusion");if(chunk6PFJYRM7_cjs.a(t.by,n.contributors).length&&a("conclusion reviewer must be independent of investigation contributors","use a review-capable role that did not contribute to or execute this investigation"),(typeof t.approve!="boolean"||!y(t.reason))&&a("review needs approval and reason","set approve to a boolean and reason to a nonempty review explanation"),!t.approve){let o=t.next??"conclusion";o!=="round"&&o!=="conclusion"&&a("review rejection next must be round or conclusion","set next to round for more evidence or conclusion for a revised conclusion");let l=b(s,{...n,phase:o==="round"?"preregister":"conclusion",reviewHistory:[...n.reviewHistory??[],{by:t.by,reason:t.reason,approve:false,next:o,replayRefs:[]}]},t,"review-rejected"),g=S(s);return o==="round"&&(n.rounds.length>=R(s.config).maxRounds||chunkMU26QW32_cjs.N(g.budget,g.spent))?C(l,m(l),t,"stopped","budget or round limit exhausted after review requested another round"):l}let u=Array.isArray(t.replayRefs)?t.replayRefs:[];return r.outcome==="resolved"&&(!B(u)||!n.rounds.some(o=>o.experiment.replayOf&&!chunk6PFJYRM7_cjs.a(v(s,o.item),v(s,(n.rounds.find(l=>l.experiment.id===o.experiment.replayOf)??I(`round ${o.experiment.id} replays the unknown experiment ${o.experiment.replayOf}`)).item)).length&&F(o.hypotheses.find(l=>l.id===r.supportedHypothesis),O(n).hypotheses.find(l=>l.id===r.supportedHypothesis))&&o.result?.valid&&u.includes(o.result.id)&&o.update?.assessments.some(l=>l.hypothesis===r.supportedHypothesis&&l.assessment==="supported")))&&a("resolved conclusion requires valid replay result and supporting belief update","set replayRefs to a valid independent replay result supporting the latest supported hypothesis definition, or reject with next round"),C(s,{...n,review:{by:t.by,reason:t.reason,replayRefs:u},reviewHistory:[...n.reviewHistory??[],{by:t.by,reason:t.reason,approve:true,replayRefs:u}]},t,r.outcome)}),stop:p("stop","facilitate",void 0,(s,n,t,a)=>(y(t.reason)||a("stop needs reason","set reason to a nonempty explanation for stopping this investigation"),C(s,n,t,"stopped",t.reason)))}}function V(){return [{id:"independent-replay",severity:"error",check(e,i){if(i.type!=="item.complete")return [];let d=m(e)?.rounds.find(s=>s.item===i.payload?.item),p=m(e)?.rounds.find(s=>s.experiment.id===d?.experiment.replayOf);return p&&chunk6PFJYRM7_cjs.a(i.by,v(e,p.item)).length?[{rule:"independent-replay",item:d.item,severity:"error",message:"Replay executor also executed the original experiment",fix:"assign a different deliver-capable role"}]:[]}},{id:"investigation-execution-only",severity:"error",check(e,i){if(i.type!=="item.complete")return [];let d=i.payload,p=m(e);return p?.phase==="observe"&&p.rounds.at(-1)?.item===d.item?[]:[{rule:"investigation-execution-only",item:d.item,severity:"error",message:"Only the active preregistered experiment can complete",fix:`complete only the active experiment item in phase observe; current phase is ${p?.phase??"intake"}`}]}}]}function G(){return [{id:"replay-worker",name:"Independent replay worker",modelTier:"small",capabilities:["deliver","verify"],canApprove:[],inputs:["preregistered-experiment"],outputs:["experiment-output"],do_not:["Do not change the replay procedure"]},{id:"investigator",name:"Investigator",modelTier:"large",capabilities:["facilitate","define-acceptance","deliver","verify"],canApprove:[],inputs:["question","prior-results"],outputs:["hypotheses","preregistered-experiment","belief-update"],do_not:["Do not revise predictions after execution","Do not approve your own conclusions"]},{id:"conclusion-reviewer",name:"Independent conclusion reviewer",modelTier:"large",capabilities:["review"],canApprove:["investigation-conclusion"],inputs:["evidence","replay","conclusion"],outputs:["conclusion-review"],do_not:["Do not approve unsupported conclusions"]}]}function J(){return [{id:"intake",name:"Intake",entryPolicy:[],exitPolicy:[{kind:"acceptance-written"}]},{id:"execute",name:"Execute preregistered experiment",entryPolicy:[{kind:"acceptance-written"},{kind:"no-open-blockers"}],exitPolicy:[{kind:"evidence",evidenceKind:"experiment-output"}]},{id:"observed",name:"Execution recorded",entryPolicy:[],exitPolicy:[]}]}function L(){return {name:"investigation",validateConfig:R,lockedConfigKeys:["question","maxRounds","budget"],vocabulary:{backlog:"Questions",item:"Investigation artifact",stage:"Investigation phase",iteration:"Investigation budget",increment:"Conclusion",ceremony:"Investigation ceremony",gate:"Independent conclusion review"},defaultStages:J,defaultRoles:G,requiredCapabilities:["facilitate","define-acceptance","deliver","verify","review"],exclusiveCapabilities:[],humanDefaults:{gates:"none"},ceremonies:U(L),plannerOptions:e=>({schedulerMode:"level",concurrencyCap:1,roleFor:i=>{let d=m(e)?.rounds.find(a=>a.item===i.id),p=m(e)?.rounds.find(a=>a.experiment.id===d?.experiment.replayOf),s=p?v(e,p.item):[],n=Object.values(e.roles),t=(p?void 0:n.find(a=>a.capabilities.includes("deliver")&&a.capabilities.includes("define-acceptance")))??n.find(a=>a.capabilities.includes("deliver")&&!chunk6PFJYRM7_cjs.a(a.id,s).length);return t||chunkOSHBJIYD_cjs.b("missing-capability",`No eligible executor for experiment item "${i.id}"`,p?`register an independent deliver-capable role that did not execute "${p.item}"`:"register a role with deliver capability",{items:[i.id]}),t.id},estimateMode:"per-call",fallbackTokensPerWeight:1}),candidates:e=>{let i=m(e),d=i?.rounds.at(-1)?.item;return i?.phase==="observe"&&!chunkMU26QW32_cjs.N(e.config.budget,S(e).spent)?Object.values(e.items).filter(p=>p.id===d&&p.stage==="execute"&&p.status==="todo"):[]},afterComplete:(e,i,d)=>{let p=m(e),s=e.iterations.find(n=>n.id==="investigation");return p?.phase!=="observe"||p.rounds.at(-1)?.item!==i||e.items[i]?.status==="done"||!s||!chunkMU26QW32_cjs.N(s.budget,s.spent)?e:C(e,p,{by:"investigation",now:d},"stopped",`budget exhausted before experiment item "${i}" completed; start a new investigation with sufficient budget`)},invariants:e=>[`Question: ${e.config.question}`,"Execute only the preregistered procedure; retain raw observation provenance; report invalid runs."],rules:V(),metrics:e=>({rounds:m(e)?.rounds.length??0,validRuns:m(e)?.rounds.filter(i=>i.result?.valid).length??0,invalidRuns:m(e)?.rounds.filter(i=>i.result&&!i.result.valid).length??0}),report:e=>({phase:m(e)?.phase??"intake",outcome:m(e)?.outcome??null,rounds:m(e)?.rounds.length??0,conclusion:m(e)?.conclusion??null,stopReason:m(e)?.stopReason??null})}}exports.a=R;exports.b=L;//# sourceMappingURL=chunk-UMG3WOD7.cjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-UMG3WOD7.cjs.map
|