ex-workflow 1.1.0 → 1.2.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 +62 -1
- package/README.md +125 -40
- 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-CezCinPF.d.cts → budget-Bm839Qw0.d.cts} +8 -7
- package/dist/{budget-Bd8KpGIr.d.ts → budget-Gckmqj74.d.ts} +8 -7
- package/dist/chunk-32NVJV5C.mjs +2 -0
- package/dist/chunk-32NVJV5C.mjs.map +1 -0
- package/dist/chunk-3GKYL6VB.mjs +6 -0
- package/dist/chunk-3GKYL6VB.mjs.map +1 -0
- package/dist/chunk-3O5MPAJT.cjs +2 -0
- package/dist/chunk-3O5MPAJT.cjs.map +1 -0
- package/dist/{chunk-C2IYMWE6.cjs → chunk-43GLYYA2.cjs} +3 -3
- package/dist/chunk-43GLYYA2.cjs.map +1 -0
- package/dist/chunk-4HG6A3SF.mjs +2 -0
- package/dist/chunk-4HG6A3SF.mjs.map +1 -0
- package/dist/chunk-6D6FL3XK.mjs +2 -0
- package/dist/chunk-6D6FL3XK.mjs.map +1 -0
- package/dist/chunk-7EF47R2J.mjs +2 -0
- package/dist/chunk-7EF47R2J.mjs.map +1 -0
- package/dist/chunk-BBI7AKJK.cjs +2 -0
- package/dist/chunk-BBI7AKJK.cjs.map +1 -0
- package/dist/{chunk-KLWZEXZU.mjs → chunk-BD76VFI4.mjs} +3 -3
- package/dist/chunk-BD76VFI4.mjs.map +1 -0
- package/dist/chunk-BHAEPYRJ.cjs +2 -0
- package/dist/chunk-BHAEPYRJ.cjs.map +1 -0
- package/dist/chunk-BYPFTO7P.mjs +2 -0
- package/dist/chunk-BYPFTO7P.mjs.map +1 -0
- package/dist/chunk-C4ISBUZR.mjs +2 -0
- package/dist/chunk-C4ISBUZR.mjs.map +1 -0
- package/dist/chunk-FDZB73PH.mjs +2 -0
- package/dist/chunk-FDZB73PH.mjs.map +1 -0
- package/dist/chunk-GKN5M4B7.cjs +2 -0
- package/dist/chunk-GKN5M4B7.cjs.map +1 -0
- package/dist/chunk-IDZ435YZ.mjs +2 -0
- package/dist/{chunk-KIQOUUEZ.mjs.map → chunk-IDZ435YZ.mjs.map} +1 -1
- package/dist/chunk-IIEKK2S3.cjs +2 -0
- package/dist/chunk-IIEKK2S3.cjs.map +1 -0
- package/dist/chunk-JNLWI4JM.mjs +2 -0
- package/dist/chunk-JNLWI4JM.mjs.map +1 -0
- package/dist/chunk-K4VSMIJZ.cjs +2 -0
- package/dist/chunk-K4VSMIJZ.cjs.map +1 -0
- package/dist/chunk-LCN4UNYK.cjs +2 -0
- package/dist/chunk-LCN4UNYK.cjs.map +1 -0
- package/dist/chunk-LIATP6LY.mjs +2 -0
- package/dist/chunk-LIATP6LY.mjs.map +1 -0
- package/dist/chunk-MB465DI4.mjs +2 -0
- package/dist/chunk-MB465DI4.mjs.map +1 -0
- package/dist/chunk-OSHBJIYD.cjs +2 -0
- package/dist/chunk-OSHBJIYD.cjs.map +1 -0
- package/dist/chunk-OVR5CK3R.cjs +2 -0
- package/dist/chunk-OVR5CK3R.cjs.map +1 -0
- package/dist/chunk-OZAYOPLB.mjs +2 -0
- package/dist/chunk-OZAYOPLB.mjs.map +1 -0
- package/dist/chunk-PNWRA4JU.cjs +2 -0
- package/dist/{chunk-PO2SPQJP.cjs.map → chunk-PNWRA4JU.cjs.map} +1 -1
- package/dist/chunk-QAENYYU6.cjs +2 -0
- package/dist/chunk-QAENYYU6.cjs.map +1 -0
- package/dist/chunk-RXY434DX.cjs +6 -0
- package/dist/chunk-RXY434DX.cjs.map +1 -0
- package/dist/chunk-SFYUJQYW.cjs +2 -0
- package/dist/chunk-SFYUJQYW.cjs.map +1 -0
- package/dist/chunk-TQR3VFZU.mjs +2 -0
- package/dist/chunk-TQR3VFZU.mjs.map +1 -0
- package/dist/chunk-U3RU5LOF.cjs +2 -0
- package/dist/chunk-U3RU5LOF.cjs.map +1 -0
- package/dist/chunk-UUWDQVIJ.mjs +2 -0
- package/dist/chunk-UUWDQVIJ.mjs.map +1 -0
- package/dist/chunk-VXOZIP77.cjs +2 -0
- package/dist/chunk-VXOZIP77.cjs.map +1 -0
- package/dist/chunk-W2P27645.cjs +2 -0
- package/dist/chunk-W2P27645.cjs.map +1 -0
- package/dist/chunk-WPVL27G4.mjs +2 -0
- package/dist/chunk-WPVL27G4.mjs.map +1 -0
- package/dist/chunk-YS6CXERQ.mjs +2 -0
- package/dist/chunk-YS6CXERQ.mjs.map +1 -0
- package/dist/chunk-Z43GUETW.cjs +2 -0
- package/dist/chunk-Z43GUETW.cjs.map +1 -0
- 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 +143 -15
- package/dist/index.d.ts +143 -15
- 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 +2 -1
- package/dist/kanban/index.d.ts +2 -1
- package/dist/kanban/index.mjs +1 -1
- package/dist/registry/index.cjs +2 -0
- package/dist/registry/index.cjs.map +1 -0
- package/dist/registry/index.d.cts +25 -0
- package/dist/registry/index.d.ts +25 -0
- package/dist/registry/index.mjs +2 -0
- package/dist/registry/index.mjs.map +1 -0
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.d.cts +2 -0
- package/dist/schema/index.d.ts +2 -0
- 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-BScHXlRx.d.cts → types-DjePDfms.d.cts} +61 -22
- package/dist/{types-BScHXlRx.d.ts → types-DjePDfms.d.ts} +61 -22
- package/dist/types.cjs +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.mjs +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 +20 -4
- package/dist/chunk-2FRRD6A3.mjs +0 -2
- package/dist/chunk-2FRRD6A3.mjs.map +0 -1
- package/dist/chunk-6P3OKXSK.mjs +0 -2
- package/dist/chunk-6P3OKXSK.mjs.map +0 -1
- package/dist/chunk-7FS6KWTG.cjs +0 -2
- package/dist/chunk-7FS6KWTG.cjs.map +0 -1
- package/dist/chunk-APKA5FOU.cjs +0 -2
- package/dist/chunk-APKA5FOU.cjs.map +0 -1
- package/dist/chunk-ATCJ4IHP.mjs +0 -2
- package/dist/chunk-ATCJ4IHP.mjs.map +0 -1
- package/dist/chunk-C2IYMWE6.cjs.map +0 -1
- package/dist/chunk-EACZBAP3.cjs +0 -2
- package/dist/chunk-EACZBAP3.cjs.map +0 -1
- package/dist/chunk-EHBQBXWA.cjs +0 -2
- package/dist/chunk-EHBQBXWA.cjs.map +0 -1
- package/dist/chunk-FQW2LETC.cjs +0 -2
- package/dist/chunk-FQW2LETC.cjs.map +0 -1
- package/dist/chunk-FTS75UIU.mjs +0 -2
- package/dist/chunk-FTS75UIU.mjs.map +0 -1
- package/dist/chunk-HCRVWMG4.cjs +0 -2
- package/dist/chunk-HCRVWMG4.cjs.map +0 -1
- package/dist/chunk-KIQOUUEZ.mjs +0 -2
- package/dist/chunk-KLWZEXZU.mjs.map +0 -1
- package/dist/chunk-MW4HR7HC.mjs +0 -2
- package/dist/chunk-MW4HR7HC.mjs.map +0 -1
- package/dist/chunk-NDCQTRIV.mjs +0 -2
- package/dist/chunk-NDCQTRIV.mjs.map +0 -1
- package/dist/chunk-PO2SPQJP.cjs +0 -2
- package/dist/chunk-QZ6HD6DE.mjs +0 -6
- package/dist/chunk-QZ6HD6DE.mjs.map +0 -1
- package/dist/chunk-RL27372B.cjs +0 -2
- package/dist/chunk-RL27372B.cjs.map +0 -1
- package/dist/chunk-S3BXVHO7.cjs +0 -2
- package/dist/chunk-S3BXVHO7.cjs.map +0 -1
- package/dist/chunk-SP5MC7RR.mjs +0 -2
- package/dist/chunk-SP5MC7RR.mjs.map +0 -1
- package/dist/chunk-SYLO7FUL.mjs +0 -2
- package/dist/chunk-SYLO7FUL.mjs.map +0 -1
- package/dist/chunk-T3V5UE34.mjs +0 -2
- package/dist/chunk-T3V5UE34.mjs.map +0 -1
- package/dist/chunk-TS66RAJR.cjs +0 -2
- package/dist/chunk-TS66RAJR.cjs.map +0 -1
- package/dist/chunk-U23FUYPD.cjs +0 -6
- package/dist/chunk-U23FUYPD.cjs.map +0 -1
- package/dist/chunk-YJQ5YJ7S.cjs +0 -2
- package/dist/chunk-YJQ5YJ7S.cjs.map +0 -1
- package/dist/chunk-YOS77GL3.mjs +0 -2
- package/dist/chunk-YOS77GL3.mjs.map +0 -1
- package/dist/chunk-YTG2MOD7.cjs +0 -2
- package/dist/chunk-YTG2MOD7.cjs.map +0 -1
- package/dist/chunk-YZJ6WFH4.mjs +0 -2
- package/dist/chunk-YZJ6WFH4.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/methodologies/investigation/record.ts","../src/methodologies/investigation/execution.ts","../src/methodologies/investigation/invariants.ts","../src/methodologies/investigation/config.ts","../src/methodologies/investigation/ceremonies.ts","../src/methodologies/investigation/rules.ts","../src/methodologies/investigation/roles.ts","../src/methodologies/investigation/stages.ts","../src/methodologies/investigation/index.ts"],"names":["readInvestigation","s","readExt","writeInvestigation","x","writeExt","executionActors","state","item","event","transition","freshOutputRefs","completion","index","output","brokenInvestigation","what","fail","lastRound","investigationIteration","it","validateInvestigationConfig","raw","c","k","v","reject","name","message","fix","sameHypothesis","a","b","frozenChanges","text","refs","extraKey","keys","extraKeyIn","list","authorize","by","cap","roleOf","save","i","appendEvent","nowOf","closeInvestigation","outcome","reason","at","n","candidate","r","moveItem","investigationCeremonies","factory","built","methodology","make","phase","fn","applyAction","bad","addItem","h","extra","isExhausted","e","extraExperiment","p","prior","id","iteration","o","ref","entry","conclusion","independenceConflicts","target","replayRefs","investigationRules","round","investigationRoles","investigationStages","investigation","excluded","roles","selected","role","now"],"mappings":"qNAKO,IAAMA,EAAqBC,CAAAA,EAChCC,GAAAA,CAAQD,EAAG,eAAe,CAAA,CAGfE,EAAqB,CAACF,CAAAA,CAAkBG,CAAAA,GACnDC,GAAAA,CAASJ,EAAG,eAAA,CAAiBG,CAAC,ECDzB,SAASE,CAAAA,CAAgBC,EAAsBC,CAAAA,CAAwB,CAC5E,OAAO,CACL,GAAG,IAAI,GAAA,CAAI,CACT,GAAGD,CAAAA,CAAM,OACN,MAAA,CACEE,CAAAA,EAAUA,EAAM,IAAA,GAAS,gBAAA,EAAqBA,EAAM,OAAA,CAAuB,EAAA,GAAOD,CACrF,CAAA,CACC,GAAA,CAAKC,GAAUA,CAAAA,CAAM,EAAE,CAAA,CAC1B,GAAA,CAAIF,EAAM,KAAA,CAAMC,CAAI,GAAG,WAAA,EAAe,IACnC,MAAA,CAAQE,CAAAA,EAAeA,EAAW,EAAA,CAAG,MAAA,GAAW,aAAa,CAAA,CAC7D,GAAA,CAAKA,GAAeA,CAAAA,CAAW,EAAE,CACtC,CAAC,CACH,CACF,CAGO,SAASC,CAAAA,CAAgBJ,CAAAA,CAAsBC,EAAwB,CAC5E,IAAII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C,GAAG,MAAA,CAAO,MAAA,CAAQqD,GAAMA,CAAAA,CAAE,MAAA,EAAQ,KAAK,CAAA,CAAE,MAAA,EAAU,EACjF,WAAA,CACEtD,CAAAA,CAAkBC,CAAC,CAAA,EAAG,MAAA,CAAO,OAAQqD,CAAAA,EAAMA,CAAAA,CAAE,MAAA,EAAU,CAACA,EAAE,MAAA,CAAO,KAAK,EAAE,MAAA,EAAU,CACtF,GACA,MAAA,CAASrD,CAAAA,GAAO,CACd,KAAA,CAAOD,CAAAA,CAAkBC,CAAC,CAAA,EAAG,KAAA,EAAS,SACtC,OAAA,CAASD,CAAAA,CAAkBC,CAAC,CAAA,EAAG,OAAA,EAAW,IAAA,CAC1C,MAAA,CAAQD,EAAkBC,CAAC,CAAA,EAAG,OAAO,MAAA,EAAU,CAAA,CAC/C,WAAYD,CAAAA,CAAkBC,CAAC,GAAG,UAAA,EAAc,IAAA,CAChD,WAAYD,CAAAA,CAAkBC,CAAC,GAAG,UAAA,EAAc,IAClD,EACF,CACF","file":"chunk-7EF47R2J.mjs","sourcesContent":["import { readExt, writeExt } from \"../../interface/ext.ts\";\nimport type { WorkflowState } from \"../../core/types.ts\";\nimport type { InvestigationState } from \"./state.ts\";\n\n/** The investigation record: `ext.investigation`, or the legacy field of a state written before 1.2. */\nexport const readInvestigation = (s: WorkflowState): InvestigationState | undefined =>\n readExt(s, \"investigation\");\n\n/** Stores the investigation record in `ext.investigation` and its deprecated legacy mirror (spec 26). */\nexport const writeInvestigation = (s: WorkflowState, x: InvestigationState): WorkflowState =>\n writeExt(s, \"investigation\", x);\n","import type { Handoff, Verdict, WorkflowState } from \"../../core/types.ts\";\n\ninterface Completion {\n id: string;\n verdict: Verdict;\n produced: Handoff[\"produced\"];\n}\n\n/** Completion actors come from validated handoffs, never caller-supplied accounting identity. */\nexport function executionActors(state: WorkflowState, item: string): string[] {\n return [\n ...new Set([\n ...state.events\n .filter(\n (event) => event.type === \"item.completed\" && (event.payload as Completion).id === item,\n )\n .map((event) => event.by),\n ...(state.items[item]?.transitions ?? [])\n .filter((transition) => transition.to.status === \"in_progress\")\n .map((transition) => transition.by),\n ]),\n ];\n}\n\n/** Only outputs of the latest successful completion can establish observation provenance. */\nexport function freshOutputRefs(state: WorkflowState, item: string): string[] {\n let completion: Completion | undefined;\n for (let index = state.events.length - 1; index >= 0; index--) {\n const event = state.events[index]!;\n if (event.type === \"item.completed\" && (event.payload as Completion).id === item) {\n completion = event.payload as Completion;\n break;\n }\n }\n return completion && [\"done\", \"needs-review\"].includes(completion.verdict)\n ? completion.produced\n .filter((output) => output.kind === \"experiment-output\")\n .map((output) => output.ref)\n : [];\n}\n","import { fail } from \"../../core/errors.ts\";\nimport type { Iteration, WorkflowState } from \"../../core/types.ts\";\nimport type { InvestigationState } from \"./state.ts\";\n\n/** A loaded state that breaks an invariant the ceremonies keep (a hand-edited or damaged file). */\nexport function brokenInvestigation(what: string): never {\n return fail(\n \"invalid-input\",\n `the investigation state is inconsistent: ${what}`,\n \"restore .workflow/state.json from git, or start a new investigation\",\n );\n}\n\n/** The latest round; the phases after preregister always have one. */\nexport function lastRound(x: InvestigationState): InvestigationState[\"rounds\"][number] {\n return x.rounds.at(-1) ?? brokenInvestigation(`phase ${x.phase} has no round`);\n}\n\n/** The `investigation` iteration intake opens; its budget bounds every round. */\nexport function investigationIteration(s: WorkflowState<string>): Iteration {\n return (\n s.iterations.find((it) => it.id === \"investigation\") ??\n brokenInvestigation('there is no \"investigation\" iteration')\n );\n}\n","import { fail } from \"../../core/errors.ts\";\nimport type { Budget } from \"../../core/types.ts\";\nexport interface InvestigationConfig {\n question: string;\n maxRounds: number;\n budget: Budget;\n}\nexport function validateInvestigationConfig(raw: unknown): InvestigationConfig {\n const c = raw as InvestigationConfig;\n if (\n !c ||\n typeof c !== \"object\" ||\n Array.isArray(c) ||\n typeof c.question !== \"string\" ||\n !c.question.trim() ||\n !Number.isSafeInteger(c.maxRounds) ||\n c.maxRounds < 1 ||\n !c.budget ||\n typeof c.budget !== \"object\" ||\n Array.isArray(c.budget) ||\n !Object.keys(c.budget).length ||\n Object.entries(c.budget).some(\n ([k, v]) =>\n ![\"tokens\", \"turns\", \"wallclockMs\"].includes(k) ||\n typeof v !== \"number\" ||\n !Number.isFinite(v) ||\n v <= 0,\n )\n )\n fail(\n \"config-invalid\",\n \"investigation requires question, positive maxRounds and a finite positive budget\",\n \"provide bounded investigation config\",\n );\n return { question: c.question, maxRounds: c.maxRounds, budget: { ...c.budget } };\n}\n","import { readInvestigation, writeInvestigation } from \"./record.ts\";\nimport { executionActors, freshOutputRefs } from \"./execution.ts\";\nimport { independenceConflicts } from \"../../common/independence.ts\";\nimport { frozenChanges } from \"../../common/frozen.ts\";\nimport { fail } from \"../../core/errors.ts\";\nimport { brokenInvestigation, investigationIteration, lastRound } from \"./invariants.ts\";\nimport { roleOf } from \"../../core/roles/lookup.ts\";\nimport { addItem } from \"../../core/items/record.ts\";\nimport { moveItem } from \"../../core/items/move.ts\";\nimport { applyAction } from \"../../core/methodology.ts\";\nimport { appendEvent, nowOf } from \"../../core/state.ts\";\nimport { isExhausted } from \"../../core/budget.ts\";\nimport type {\n Capability,\n Ceremony,\n CeremonyInput,\n Methodology,\n WorkflowState,\n} from \"../../core/types.ts\";\nimport { validateInvestigationConfig, type InvestigationConfig } from \"./config.ts\";\nimport type {\n BeliefUpdate,\n Experiment,\n Hypothesis,\n InvestigationConclusion,\n InvestigationState,\n Observation,\n} from \"./state.ts\";\nfunction reject(s: WorkflowState, name: string, message: string, fix: string): never {\n const x = readInvestigation(s);\n return fail(\"invalid-input\", `${name} (phase ${x?.phase ?? \"intake\"}): ${message}`, fix, {\n items: x ? [x.item, ...(x.rounds.at(-1) ? [x.rounds.at(-1)!.item] : [])] : [],\n });\n}\nconst sameHypothesis = (a: Hypothesis | undefined, b: Hypothesis | undefined) =>\n !!a && !!b && !frozenChanges(a, b, [\"id\", \"claim\", \"falsifiedBy\"]).length;\nconst text = (v: unknown): v is string => typeof v === \"string\" && v.trim().length > 0;\nconst refs = (v: unknown): v is string[] =>\n Array.isArray(v) && v.length > 0 && v.every(text) && new Set(v).size === v.length;\n/** First key of a caller record outside its contract; stored records are closed objects (state schema). */\nconst extraKey = (v: unknown, keys: readonly string[]): string | undefined =>\n v && typeof v === \"object\" && !Array.isArray(v)\n ? Object.keys(v).find((k) => !keys.includes(k))\n : undefined;\nconst extraKeyIn = (list: unknown, keys: readonly string[]): string | undefined =>\n Array.isArray(list) ? list.map((v) => extraKey(v, keys)).find(Boolean) : undefined;\nfunction authorize(s: WorkflowState, by: string, cap: Capability) {\n if (!roleOf(s, by)?.capabilities.includes(cap))\n fail(\n \"missing-capability\",\n `${by} needs ${cap}`,\n \"use a registered role with the required capability\",\n );\n}\nfunction save(s: WorkflowState, x: InvestigationState, i: CeremonyInput, name: string) {\n return appendEvent(\n writeInvestigation(s, x),\n `investigation.${name}`,\n i.by,\n { ...x },\n nowOf(i.now),\n );\n}\nexport function closeInvestigation(\n s: WorkflowState,\n x: InvestigationState,\n i: CeremonyInput,\n outcome: \"stopped\" | \"resolved\" | \"inconclusive\",\n reason?: string,\n) {\n const at = nowOf(i.now);\n let n = save(\n s,\n { ...x, phase: \"closed\", outcome, ...(reason ? { stopReason: reason } : {}) },\n i,\n outcome,\n );\n n = {\n ...n,\n iterations: n.iterations.map((it) =>\n it.id === \"investigation\"\n ? { ...it, endedAt: at, outcome: outcome === \"stopped\" ? \"cancelled\" : \"completed\" }\n : it,\n ),\n };\n for (const item of Object.values(n.items).filter(\n (candidate) => candidate.id === x.item || x.rounds.some((r) => r.item === candidate.id),\n ))\n if (item.status !== \"done\" && item.status !== \"dropped\")\n n = moveItem(\n n,\n item.id,\n { status: outcome === \"resolved\" && item.id === x.item ? \"done\" : \"dropped\" },\n i.by,\n at,\n );\n return n;\n}\nexport function investigationCeremonies(\n factory: () => Methodology<InvestigationConfig>,\n): Record<string, Ceremony> {\n let built: Methodology<InvestigationConfig> | undefined;\n const methodology = () => (built ??= factory());\n const make =\n (\n name: string,\n cap: Capability,\n phase: string | undefined,\n fn: (\n s: WorkflowState,\n x: InvestigationState,\n i: CeremonyInput,\n bad: (message: string, fix: string) => never,\n ) => WorkflowState,\n ): Ceremony =>\n (s, i) => {\n authorize(s, i.by, cap);\n const x = readInvestigation(s);\n if (!x || x.phase === \"closed\")\n reject(s, name, \"no active investigation\", \"start a new investigation with intake {item}\");\n if (phase && x.phase !== phase && !(name === \"hypotheses\" && x.phase === \"preregister\"))\n reject(\n s,\n name,\n `expected ${phase}, got ${x.phase}`,\n `finish phase ${x.phase} before calling ${name}; ${name} requires phase ${phase}`,\n );\n return applyAction(s, methodology(), { type: `ceremony.${name}`, by: i.by, payload: i }, () =>\n fn(s, x, i, (message, fix) => reject(s, name, message, fix)),\n );\n };\n return {\n intake(s, i) {\n authorize(s, i.by, \"facilitate\");\n const bad = (message: string, fix: string) => reject(s, \"intake\", message, fix);\n if (s.methodology !== \"investigation\")\n bad(\n `workflow methodology is ${s.methodology}, not investigation`,\n \"init a workflow with the investigation methodology before intake\",\n );\n if (readInvestigation(s))\n bad(\n \"investigation already started\",\n \"use the existing investigation or initialize a new workflow\",\n );\n if (!text(i.item))\n bad(\"item is required\", \"set intake.item to a unique investigation item ID\");\n const c = validateInvestigationConfig(s.config);\n return applyAction(\n s,\n methodology(),\n { type: \"ceremony.intake\", by: i.by, payload: i },\n () => {\n let n = addItem(\n s,\n {\n id: i.item as string,\n title: c.question,\n acceptance: [\"Independent evidence-based conclusion\"],\n stage: \"intake\",\n },\n i.by,\n i.now,\n );\n n = {\n ...n,\n iterations: [\n ...n.iterations,\n {\n id: \"investigation\",\n goal: c.question,\n budget: { ...c.budget },\n spent: { tokens: 0, turns: 0, wallclockMs: 0 },\n startedAt: nowOf(i.now),\n committed: [],\n carryover: [],\n },\n ],\n };\n return save(\n n,\n {\n item: i.item as string,\n phase: \"hypotheses\",\n hypotheses: [],\n rounds: [],\n contributors: [i.by],\n },\n i,\n \"intake\",\n );\n },\n );\n },\n hypotheses: make(\"hypotheses\", \"define-acceptance\", \"hypotheses\", (s, x, i, bad) => {\n const h = i.hypotheses as Hypothesis[];\n const extra = extraKeyIn(h, [\"id\", \"claim\", \"falsifiedBy\"]);\n if (extra)\n bad(\n `unknown key \"${extra}\" in a hypotheses entry`,\n \"use only id, claim and falsifiedBy in each hypotheses entry\",\n );\n if (\n !Array.isArray(h) ||\n !h.length ||\n h.some((v) => !v || !text(v.id) || !text(v.claim) || !text(v.falsifiedBy)) ||\n new Set(h.map((v) => v.id)).size !== h.length ||\n (h.length < 2 && !text(i.singleHypothesisRationale))\n )\n bad(\n \"provide competing falsifiable hypotheses or single-testable rationale\",\n \"set hypotheses to unique {id, claim, falsifiedBy} entries; supply singleHypothesisRationale when there is only one\",\n );\n return save(\n s,\n {\n ...x,\n hypotheses: h.map((v) => ({ id: v.id, claim: v.claim, falsifiedBy: v.falsifiedBy })),\n ...(text(i.singleHypothesisRationale)\n ? { singleHypothesisRationale: i.singleHypothesisRationale }\n : {}),\n contributors: [...new Set([...x.contributors, i.by])],\n phase: \"preregister\",\n },\n i,\n \"hypotheses\",\n );\n }),\n preregister: make(\"preregister\", \"define-acceptance\", \"preregister\", (s, x, i, bad) => {\n const c = validateInvestigationConfig(s.config),\n it = s.iterations.find((v) => v.id === \"investigation\");\n if (x.rounds.length >= c.maxRounds || !it || isExhausted(c.budget, it.spent))\n bad(\n `round limit or budget exhausted (${x.rounds.length} of ${c.maxRounds} rounds used)`,\n \"call stop {reason} to close this investigation, or start a new one with a larger maxRounds or budget\",\n );\n const e = i.experiment as Experiment;\n const extraExperiment =\n extraKey(e, [\"id\", \"procedureRef\", \"predictions\", \"replayOf\"]) ??\n extraKeyIn(e?.predictions, [\"hypothesis\", \"prediction\"]);\n if (extraExperiment)\n bad(\n `unknown key \"${extraExperiment}\" in experiment`,\n \"use only id, procedureRef, predictions [{hypothesis, prediction}] and replayOf in experiment\",\n );\n if (\n !e ||\n !text(e.id) ||\n !text(e.procedureRef) ||\n x.rounds.some((r) => r.experiment.id === e.id) ||\n !Array.isArray(e.predictions) ||\n e.predictions.length !== x.hypotheses.length ||\n x.hypotheses.some(\n (h) =>\n e.predictions.filter((p) => p?.hypothesis === h.id && text(p.prediction)).length !== 1,\n ) ||\n new Set(e.predictions.map((p) => p.prediction)).size !== e.predictions.length\n )\n bad(\n \"preregister unique experiment with differing predictions for every hypothesis\",\n \"set experiment.id to a new ID, experiment.procedureRef, and one distinct experiment.predictions entry per hypothesis\",\n );\n if (e.replayOf) {\n const prior = x.rounds.find((r) => r.experiment.id === e.replayOf && r.result?.valid);\n if (\n !prior ||\n frozenChanges(prior.experiment, e, [\"procedureRef\"]).length ||\n prior.hypotheses.length !== x.hypotheses.length ||\n x.hypotheses.some(\n (h) =>\n !sameHypothesis(\n h,\n prior.hypotheses.find((p) => p.id === h.id),\n ),\n ) ||\n e.predictions.some(\n (p) =>\n !prior.experiment.predictions.some(\n (q) => !frozenChanges(q, p, [\"hypothesis\", \"prediction\"]).length,\n ),\n )\n )\n bad(\n \"replay must repeat the procedure, predictions and hypotheses of a prior valid experiment\",\n \"set experiment.replayOf to a valid prior experiment with identical procedureRef, predictions and hypothesis definitions\",\n );\n }\n const id = `${x.item}-run-${x.rounds.length + 1}`;\n let n = addItem(\n s,\n {\n id,\n title: `Experiment ${e.id}`,\n stage: \"execute\",\n acceptance: [e.procedureRef],\n iteration: \"investigation\",\n },\n i.by,\n i.now,\n );\n n = {\n ...n,\n iterations: n.iterations.map((iteration) =>\n iteration.id === \"investigation\"\n ? { ...iteration, committed: [...iteration.committed, id] }\n : iteration,\n ),\n };\n return save(\n n,\n {\n ...x,\n phase: \"observe\",\n rounds: [\n ...x.rounds,\n {\n experiment: {\n id: e.id,\n procedureRef: e.procedureRef,\n predictions: e.predictions.map((p) => ({\n hypothesis: p.hypothesis,\n prediction: p.prediction,\n })),\n ...(e.replayOf ? { replayOf: e.replayOf } : {}),\n },\n hypotheses: x.hypotheses.map((v) => ({ ...v })),\n item: id,\n by: i.by,\n },\n ],\n contributors: [...new Set([...x.contributors, i.by])],\n },\n i,\n \"preregister\",\n );\n }),\n observe: make(\"observe\", \"verify\", \"observe\", (s, x, i, bad) => {\n const r = lastRound(x),\n o = i.result as Observation;\n const extra = extraKey(o, [\"id\", \"valid\", \"summary\", \"provenanceRefs\"]);\n if (extra)\n bad(\n `unknown key \"${extra}\" in result`,\n \"use only id, valid, summary and provenanceRefs in result\",\n );\n if (\n i.experiment !== r.experiment.id ||\n !o ||\n !text(o.id) ||\n typeof o.valid !== \"boolean\" ||\n !text(o.summary) ||\n !refs(o.provenanceRefs) ||\n x.rounds.some((prior) => prior.result?.id === o.id)\n )\n bad(\n \"observation needs current experiment, unique result and provenance\",\n \"set experiment to the active experiment ID and result to {id, valid, summary, provenanceRefs} with a new result.id\",\n );\n if (s.items[r.item]?.status !== \"done\")\n bad(\n \"complete experiment execution before recording observations\",\n \"dispatch and complete the active experiment item before calling observe\",\n );\n if (!freshOutputRefs(s, r.item).some((ref) => o.provenanceRefs.includes(ref)))\n bad(\n \"observation must link fresh experiment-output evidence from the latest completion\",\n `include an experiment-output ref produced by the latest successful completion of item \"${r.item}\" in result.provenanceRefs`,\n );\n return save(\n s,\n {\n ...x,\n phase: \"update-belief\",\n rounds: x.rounds.map((v) =>\n v === r\n ? {\n ...v,\n result: {\n id: o.id,\n valid: o.valid,\n summary: o.summary,\n provenanceRefs: [...o.provenanceRefs],\n },\n }\n : v,\n ),\n contributors: [...new Set([...x.contributors, i.by, ...executionActors(s, r.item)])],\n },\n i,\n \"observe\",\n );\n }),\n \"update-belief\": make(\"update-belief\", \"define-acceptance\", \"update-belief\", (s, x, i, bad) => {\n const r = lastRound(x),\n a = i.assessments as BeliefUpdate[\"assessments\"];\n const extra = extraKeyIn(a, [\"hypothesis\", \"assessment\", \"reason\"]);\n if (extra)\n bad(\n `unknown key \"${extra}\" in an assessments entry`,\n \"use only hypothesis, assessment and reason in each assessments entry\",\n );\n if (\n i.result !== r.result?.id ||\n !Array.isArray(a) ||\n a.length !== x.hypotheses.length ||\n x.hypotheses.some(\n (h) =>\n a.filter(\n (v) =>\n v?.hypothesis === h.id &&\n [\"supported\", \"refuted\", \"uncertain\"].includes(v.assessment) &&\n text(v.reason),\n ).length !== 1,\n ) ||\n ![\"round\", \"conclusion\"].includes(i.next as string)\n )\n bad(\n \"belief update must assess every hypothesis against current result\",\n \"set result to the latest result ID, assessments to one {hypothesis, assessment, reason} per hypothesis, and next to round or conclusion\",\n );\n const result = r.result ?? brokenInvestigation(`round ${r.experiment.id} has no result`);\n if (!result.valid && a.some((v) => v.assessment !== \"uncertain\"))\n bad(\n \"invalid experiments cannot support beliefs\",\n \"set every assessment to uncertain for an invalid experiment result\",\n );\n let n = save(\n s,\n {\n ...x,\n phase: i.next === \"round\" ? \"preregister\" : \"conclusion\",\n rounds: x.rounds.map((v) =>\n v === r\n ? {\n ...v,\n update: {\n result: i.result as string,\n assessments: a.map((entry) => ({\n hypothesis: entry.hypothesis,\n assessment: entry.assessment,\n reason: entry.reason,\n })),\n },\n }\n : v,\n ),\n contributors: [...new Set([...x.contributors, i.by])],\n },\n i,\n \"belief-updated\",\n );\n const it = investigationIteration(n);\n if (\n i.next === \"round\" &&\n (x.rounds.length >= validateInvestigationConfig(s.config).maxRounds ||\n isExhausted(it.budget, it.spent))\n )\n n = closeInvestigation(\n n,\n readInvestigation(n)!,\n i,\n \"stopped\",\n \"budget or round limit exhausted\",\n );\n return n;\n }),\n conclude: make(\"conclude\", \"define-acceptance\", \"conclusion\", (s, x, i, bad) => {\n const c = i as unknown as InvestigationConclusion;\n if (\n ![\"resolved\", \"inconclusive\"].includes(c.outcome) ||\n !text(c.summary) ||\n !refs(c.evidenceRefs) ||\n c.evidenceRefs.some((ref) => !x.rounds.some((r) => r.result?.provenanceRefs.includes(ref)))\n )\n bad(\n \"conclusion needs observed evidence references\",\n \"set outcome, summary and evidenceRefs to references preserved in recorded observations\",\n );\n if (\n c.outcome === \"resolved\" &&\n (!text(c.supportedHypothesis) ||\n !x.rounds\n .slice(-1)\n .some(\n (r) =>\n r.result?.valid &&\n r.update?.assessments.some(\n (a) => a.hypothesis === c.supportedHypothesis && a.assessment === \"supported\",\n ),\n ))\n )\n bad(\n \"resolved conclusion needs a supported hypothesis\",\n \"set supportedHypothesis to a hypothesis supported by the latest valid round, or choose outcome inconclusive\",\n );\n return save(\n s,\n {\n ...x,\n phase: \"review\",\n conclusion: {\n outcome: c.outcome,\n summary: c.summary,\n evidenceRefs: [...c.evidenceRefs],\n ...(c.supportedHypothesis ? { supportedHypothesis: c.supportedHypothesis } : {}),\n by: i.by,\n },\n contributors: [...new Set([...x.contributors, i.by])],\n },\n i,\n \"conclusion\",\n );\n }),\n \"review-conclusion\": make(\"review-conclusion\", \"review\", \"review\", (s, x, i, bad) => {\n const conclusion = x.conclusion ?? brokenInvestigation(\"phase review has no conclusion\");\n if (independenceConflicts(i.by, x.contributors).length)\n bad(\n \"conclusion reviewer must be independent of investigation contributors\",\n \"use a review-capable role that did not contribute to or execute this investigation\",\n );\n if (typeof i.approve !== \"boolean\" || !text(i.reason))\n bad(\n \"review needs approval and reason\",\n \"set approve to a boolean and reason to a nonempty review explanation\",\n );\n if (!i.approve) {\n const target = i.next ?? \"conclusion\";\n if (target !== \"round\" && target !== \"conclusion\")\n bad(\n \"review rejection next must be round or conclusion\",\n \"set next to round for more evidence or conclusion for a revised conclusion\",\n );\n const n = save(\n s,\n {\n ...x,\n phase: target === \"round\" ? \"preregister\" : \"conclusion\",\n reviewHistory: [\n ...(x.reviewHistory ?? []),\n {\n by: i.by,\n reason: i.reason as string,\n approve: false,\n next: target as \"round\" | \"conclusion\",\n replayRefs: [],\n },\n ],\n },\n i,\n \"review-rejected\",\n );\n const iteration = investigationIteration(s);\n if (\n target === \"round\" &&\n (x.rounds.length >= validateInvestigationConfig(s.config).maxRounds ||\n isExhausted(iteration.budget, iteration.spent))\n )\n return closeInvestigation(\n n,\n readInvestigation(n)!,\n i,\n \"stopped\",\n \"budget or round limit exhausted after review requested another round\",\n );\n return n;\n }\n const replayRefs = Array.isArray(i.replayRefs) ? i.replayRefs : [];\n if (\n conclusion.outcome === \"resolved\" &&\n (!refs(replayRefs) ||\n !x.rounds.some(\n (r) =>\n r.experiment.replayOf &&\n !independenceConflicts(\n executionActors(s, r.item),\n executionActors(\n s,\n (\n x.rounds.find((p) => p.experiment.id === r.experiment.replayOf) ??\n brokenInvestigation(\n `round ${r.experiment.id} replays the unknown experiment ${r.experiment.replayOf}`,\n )\n ).item,\n ),\n ).length &&\n sameHypothesis(\n r.hypotheses.find((h) => h.id === conclusion.supportedHypothesis),\n lastRound(x).hypotheses.find((h) => h.id === conclusion.supportedHypothesis),\n ) &&\n r.result?.valid &&\n replayRefs.includes(r.result.id) &&\n r.update?.assessments.some(\n (a) =>\n a.hypothesis === conclusion.supportedHypothesis && a.assessment === \"supported\",\n ),\n ))\n )\n bad(\n \"resolved conclusion requires valid replay result and supporting belief update\",\n \"set replayRefs to a valid independent replay result supporting the latest supported hypothesis definition, or reject with next round\",\n );\n return closeInvestigation(\n s,\n {\n ...x,\n review: { by: i.by, reason: i.reason as string, replayRefs: replayRefs as string[] },\n reviewHistory: [\n ...(x.reviewHistory ?? []),\n {\n by: i.by,\n reason: i.reason as string,\n approve: true,\n replayRefs: replayRefs as string[],\n },\n ],\n },\n i,\n conclusion.outcome,\n );\n }),\n stop: make(\"stop\", \"facilitate\", undefined, (s, x, i, bad) => {\n if (!text(i.reason))\n bad(\n \"stop needs reason\",\n \"set reason to a nonempty explanation for stopping this investigation\",\n );\n return closeInvestigation(s, x, i, \"stopped\", i.reason as string);\n }),\n };\n}\n","import { readInvestigation } from \"./record.ts\";\nimport { executionActors } from \"./execution.ts\";\nimport { independenceConflicts } from \"../../common/independence.ts\";\nimport type { Rule } from \"../../core/types.ts\";\nexport function investigationRules(): Rule[] {\n return [\n {\n id: \"independent-replay\",\n severity: \"error\",\n check(s, a) {\n if (a.type !== \"item.complete\") return [];\n const round = readInvestigation(s)?.rounds.find(\n (r) => r.item === (a.payload as { item?: string })?.item,\n );\n const prior = readInvestigation(s)?.rounds.find(\n (r) => r.experiment.id === round?.experiment.replayOf,\n );\n return prior && independenceConflicts(a.by, executionActors(s, prior.item)).length\n ? [\n {\n rule: \"independent-replay\",\n item: round!.item,\n severity: \"error\",\n message: \"Replay executor also executed the original experiment\",\n fix: \"assign a different deliver-capable role\",\n },\n ]\n : [];\n },\n },\n {\n id: \"investigation-execution-only\",\n severity: \"error\",\n check(s, a) {\n if (a.type !== \"item.complete\") return [];\n const p = a.payload as { item: string };\n const x = readInvestigation(s);\n return x?.phase === \"observe\" && x.rounds.at(-1)?.item === p.item\n ? []\n : [\n {\n rule: \"investigation-execution-only\",\n item: p.item,\n severity: \"error\",\n message: \"Only the active preregistered experiment can complete\",\n fix: `complete only the active experiment item in phase observe; current phase is ${x?.phase ?? \"intake\"}`,\n },\n ];\n },\n },\n ];\n}\n","import type { Role } from \"../../core/types.ts\";\nexport function investigationRoles(): Role[] {\n return [\n {\n id: \"replay-worker\",\n name: \"Independent replay worker\",\n modelTier: \"small\",\n capabilities: [\"deliver\", \"verify\"],\n canApprove: [],\n inputs: [\"preregistered-experiment\"],\n outputs: [\"experiment-output\"],\n do_not: [\"Do not change the replay procedure\"],\n },\n {\n id: \"investigator\",\n name: \"Investigator\",\n modelTier: \"large\",\n capabilities: [\"facilitate\", \"define-acceptance\", \"deliver\", \"verify\"],\n canApprove: [],\n inputs: [\"question\", \"prior-results\"],\n outputs: [\"hypotheses\", \"preregistered-experiment\", \"belief-update\"],\n do_not: [\"Do not revise predictions after execution\", \"Do not approve your own conclusions\"],\n },\n {\n id: \"conclusion-reviewer\",\n name: \"Independent conclusion reviewer\",\n modelTier: \"large\",\n capabilities: [\"review\"],\n canApprove: [\"investigation-conclusion\"],\n inputs: [\"evidence\", \"replay\", \"conclusion\"],\n outputs: [\"conclusion-review\"],\n do_not: [\"Do not approve unsupported conclusions\"],\n },\n ];\n}\n","import type { Stage } from \"../../core/types.ts\";\nexport function investigationStages(): Stage[] {\n return [\n {\n id: \"intake\",\n name: \"Intake\",\n entryPolicy: [],\n exitPolicy: [{ kind: \"acceptance-written\" }],\n },\n {\n id: \"execute\",\n name: \"Execute preregistered experiment\",\n entryPolicy: [{ kind: \"acceptance-written\" }, { kind: \"no-open-blockers\" }],\n exitPolicy: [{ kind: \"evidence\", evidenceKind: \"experiment-output\" }],\n },\n { id: \"observed\", name: \"Execution recorded\", entryPolicy: [], exitPolicy: [] },\n ];\n}\n","import { readInvestigation } from \"./record.ts\";\nimport { fail } from \"../../core/errors.ts\";\nimport { executionActors } from \"./execution.ts\";\nimport { independenceConflicts } from \"../../common/independence.ts\";\nimport { closeInvestigation, investigationCeremonies } from \"./ceremonies.ts\";\nimport { investigationIteration } from \"./invariants.ts\";\nimport { investigationRules } from \"./rules.ts\";\nimport { investigationRoles } from \"./roles.ts\";\nimport { investigationStages } from \"./stages.ts\";\nimport { isExhausted } from \"../../core/budget.ts\";\nimport type { Methodology } from \"../../core/types.ts\";\nimport { validateInvestigationConfig, type InvestigationConfig } from \"./config.ts\";\nexport { validateInvestigationConfig };\nexport type { InvestigationConfig };\nexport type * from \"./state.ts\";\nexport function investigation(): Methodology<InvestigationConfig> {\n return {\n name: \"investigation\",\n validateConfig: validateInvestigationConfig,\n lockedConfigKeys: [\"question\", \"maxRounds\", \"budget\"],\n vocabulary: {\n backlog: \"Questions\",\n item: \"Investigation artifact\",\n stage: \"Investigation phase\",\n iteration: \"Investigation budget\",\n increment: \"Conclusion\",\n ceremony: \"Investigation ceremony\",\n gate: \"Independent conclusion review\",\n },\n defaultStages: investigationStages,\n defaultRoles: investigationRoles,\n requiredCapabilities: [\"facilitate\", \"define-acceptance\", \"deliver\", \"verify\", \"review\"],\n exclusiveCapabilities: [],\n humanDefaults: { gates: \"none\" },\n ceremonies: investigationCeremonies(investigation),\n plannerOptions: (state) => ({\n schedulerMode: \"level\",\n concurrencyCap: 1,\n roleFor: (item) => {\n const r = readInvestigation(state)?.rounds.find((candidate) => candidate.item === item.id);\n const prior = readInvestigation(state)?.rounds.find(\n (p) => p.experiment.id === r?.experiment.replayOf,\n );\n const excluded = prior ? executionActors(state, prior.item) : [];\n const roles = Object.values(state.roles);\n const selected =\n (!prior\n ? roles.find(\n (role) =>\n role.capabilities.includes(\"deliver\") &&\n role.capabilities.includes(\"define-acceptance\"),\n )\n : undefined) ??\n roles.find(\n (role) =>\n role.capabilities.includes(\"deliver\") &&\n !independenceConflicts(role.id, excluded).length,\n );\n if (!selected)\n fail(\n \"missing-capability\",\n `No eligible executor for experiment item \"${item.id}\"`,\n prior\n ? `register an independent deliver-capable role that did not execute \"${prior.item}\"`\n : \"register a role with deliver capability\",\n { items: [item.id] },\n );\n return selected.id;\n },\n estimateMode: \"per-call\",\n fallbackTokensPerWeight: 1,\n }),\n candidates: (s) => {\n // read the record once, not once per item (U10 F2)\n const x = readInvestigation(s);\n const round = x?.rounds.at(-1)?.item;\n return x?.phase === \"observe\" &&\n !isExhausted((s.config as InvestigationConfig).budget, investigationIteration(s).spent)\n ? Object.values(s.items).filter(\n (i) => i.id === round && i.stage === \"execute\" && i.status === \"todo\",\n )\n : [];\n },\n afterComplete: (state, item, now) => {\n const x = readInvestigation(state);\n const iteration = state.iterations.find((it) => it.id === \"investigation\");\n if (\n x?.phase !== \"observe\" ||\n x.rounds.at(-1)?.item !== item ||\n state.items[item]?.status === \"done\" ||\n !iteration ||\n !isExhausted(iteration.budget, iteration.spent)\n )\n return state;\n return closeInvestigation(\n state,\n x,\n { by: \"investigation\", now },\n \"stopped\",\n `budget exhausted before experiment item \"${item}\" completed; start a new investigation with sufficient budget`,\n );\n },\n invariants: (s) => [\n `Question: ${(s.config as InvestigationConfig).question}`,\n \"Execute only the preregistered procedure; retain raw observation provenance; report invalid runs.\",\n ],\n rules: investigationRules(),\n metrics: (s) => ({\n rounds: readInvestigation(s)?.rounds.length ?? 0,\n validRuns: readInvestigation(s)?.rounds.filter((r) => r.result?.valid).length ?? 0,\n invalidRuns:\n readInvestigation(s)?.rounds.filter((r) => r.result && !r.result.valid).length ?? 0,\n }),\n report: (s) => ({\n phase: readInvestigation(s)?.phase ?? \"intake\",\n outcome: readInvestigation(s)?.outcome ?? null,\n rounds: readInvestigation(s)?.rounds.length ?? 0,\n conclusion: readInvestigation(s)?.conclusion ?? null,\n stopReason: readInvestigation(s)?.stopReason ?? null,\n }),\n };\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkOSHBJIYD_cjs=require('./chunk-OSHBJIYD.cjs');var a=["investigation","experimentation"],c=t=>t==="investigation"||t==="experimentation";function x(t,e){return chunkOSHBJIYD_cjs.c(e,"ext key"),t.ext&&Object.hasOwn(t.ext,e)?t.ext[e]:c(e)?t[e]:void 0}function d(t,e,o){chunkOSHBJIYD_cjs.c(e,"ext key");let n={...t.ext},r={...t,ext:n};for(let s of c(e)?[n,r]:[n])o===void 0?delete s[e]:s[e]=o;return !t.ext&&!Object.keys(n).length&&delete r.ext,r}function g(t){let e=t.ext;if(!e)return t;let o={...t};for(let n of a)Object.hasOwn(e,n)&&delete o[n];return o}function u(t){let e=t.ext;if(!e)return t;let o={...t};for(let n of a)Object.hasOwn(e,n)&&(o[n]=e[n]);return o}exports.a=x;exports.b=d;exports.c=g;exports.d=u;//# sourceMappingURL=chunk-BBI7AKJK.cjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-BBI7AKJK.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/interface/ext.ts"],"names":["LEGACY_KEYS","isLegacy","key","readExt","state","assertId","writeExt","value","ext","out","target","withoutLegacyMirrors","withLegacyMirrors"],"mappings":"mEAeA,IAAMA,EAAoC,CAAC,eAAA,CAAiB,iBAAiB,CAAA,CACvEC,EAAYC,CAAAA,EAChBA,CAAAA,GAAQ,eAAA,EAAmBA,CAAAA,GAAQ,kBAY9B,SAASC,CAAAA,CAAQC,EAA8BF,CAAAA,CAAsB,CAE1E,O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I,CAAAA,CAAK,OAAOJ,CAAAA,CACjB,IAAMK,CAAAA,CAAM,CAAE,GAAGL,CAAM,CAAA,CACvB,QAAWF,CAAAA,IAAOF,CAAAA,CAAiB,OAAO,MAAA,CAAOQ,CAAAA,CAAKN,CAAG,CAAA,GAAGO,EAAIP,CAAG,CAAA,CAAIM,EAAIN,CAAG,CAAA,CAAA,CAC9E,OAAOO,CACT","file":"chunk-BBI7AKJK.cjs","sourcesContent":["import { assertId } from \"../core/errors.ts\";\nimport type { ExperimentationState } from \"../core/records/experimentation.ts\";\nimport type { InvestigationState } from \"../core/records/investigation.ts\";\nimport type { WorkflowState } from \"../core/types.ts\";\n\n/**\n * Extension records that 1.1 stored as top-level state fields. Writing one also writes its\n * deprecated legacy mirror (`state.investigation`, `state.experimentation`) in memory; on disk\n * only `ext` is stored (spec 26). 2.0 drops the mirror.\n */\nexport interface LegacyExtRecords {\n investigation: InvestigationState;\n experimentation: ExperimentationState;\n}\ntype LegacyKey = keyof LegacyExtRecords;\nconst LEGACY_KEYS: readonly LegacyKey[] = [\"investigation\", \"experimentation\"];\nconst isLegacy = (key: string): key is LegacyKey =>\n key === \"investigation\" || key === \"experimentation\";\n\n/**\n * Reads the extension record `key` (a methodology name or a common piece id) from `state.ext`.\n * A state written before 1.2 has no `ext`; for `investigation` and `experimentation` the legacy\n * top-level field is read instead.\n */\nexport function readExt<K extends LegacyKey>(\n state: WorkflowState<string>,\n key: K,\n): LegacyExtRecords[K] | undefined;\nexport function readExt<T = unknown>(state: WorkflowState<string>, key: string): T | undefined;\nexport function readExt(state: WorkflowState<string>, key: string): unknown {\n assertId(key, \"ext key\");\n if (state.ext && Object.hasOwn(state.ext, key)) return state.ext[key];\n return isLegacy(key) ? state[key] : undefined;\n}\n\n/**\n * Returns a copy of `state` with `state.ext[key] = value`; `undefined` removes the key, and adds\n * no empty `ext` to a state that had none. For `investigation` and `experimentation` the legacy\n * top-level field is written (or removed) too, so SDK code reading `state.investigation` /\n * `state.experimentation` sees the same record (dual-write, spec 26). The mirror is read-only:\n * once `ext.<key>` exists, `readExt` ignores the legacy field. It does not make the state\n * loadable by 1.1.x, whose schema rejects `ext`.\n */\nexport function writeExt<N extends string, K extends LegacyKey>(\n state: WorkflowState<N>,\n key: K,\n value: LegacyExtRecords[K] | undefined,\n): WorkflowState<N>;\nexport function writeExt<N extends string, T>(\n state: WorkflowState<N>,\n key: string,\n value: T | undefined,\n): WorkflowState<N>;\nexport function writeExt<N extends string>(\n state: WorkflowState<N>,\n key: string,\n value: unknown,\n): WorkflowState<N> {\n assertId(key, \"ext key\");\n const ext: Record<string, unknown> = { ...state.ext };\n const out: Record<string, unknown> = { ...state, ext };\n for (const target of isLegacy(key) ? [ext, out] : [ext]) {\n if (value === undefined) delete target[key];\n else target[key] = value;\n }\n // removing a key from a state that had no ext adds no empty ext (U11 N4)\n if (!state.ext && !Object.keys(ext).length) delete out.ext;\n return out as unknown as WorkflowState<N>;\n}\n\n/**\n * The state as the file adapter stores it: a legacy mirror whose `ext.<key>` exists is left out,\n * so the record is written once (spec 26, U10 F1). A legacy field without `ext.<key>` (a state\n * written before 1.2) is kept. Does not mutate `state`.\n */\nexport function withoutLegacyMirrors<S extends WorkflowState<string>>(state: S): S {\n const ext = state.ext;\n if (!ext) return state;\n const out = { ...state } as Record<string, unknown>;\n for (const key of LEGACY_KEYS) if (Object.hasOwn(ext, key)) delete out[key];\n return out as S;\n}\n\n/**\n * The reverse of `withoutLegacyMirrors` for a loaded state: each legacy field whose `ext.<key>`\n * exists is set to that record by reference, replacing whatever the file held there (`ext` wins\n * over a hand-edited legacy field). Does not mutate `state`.\n */\nexport function withLegacyMirrors<S extends WorkflowState<string>>(state: S): S {\n const ext = state.ext;\n if (!ext) return state;\n const out = { ...state } as Record<string, unknown>;\n for (const key of LEGACY_KEYS) if (Object.hasOwn(ext, key)) out[key] = ext[key];\n return out as S;\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {b}from'./chunk-2FRRD6A3.mjs';var l={Accounting:{type:"object",properties:{item:{type:"string"},role:{type:"string"},model:{type:"string"},tokensIn:{type:"number"},tokensOut:{type:"number"},durationMs:{type:"number"},startedAt:{type:"string"},endedAt:{type:"string"},estimate:{type:"boolean"}},required:["item","role","model","tokensIn","tokensOut","durationMs","startedAt","endedAt"],additionalProperties:false},Baseline:{type:"object",properties:{phase:{type:"string"},version:{type:"number"},at:{type:"string"},approvedBy:{type:"array",items:{type:"string"}},itemSnapshot:{type:"object",additionalProperties:{$ref:"#/definitions/WorkItem"}}},required:["phase","version","at","approvedBy","itemSnapshot"],additionalProperties:false},BeliefUpdate:{type:"object",properties:{result:{type:"string"},assessments:{type:"array",items:{type:"object",properties:{hypothesis:{type:"string"},assessment:{type:"string",enum:["supported","refuted","uncertain"]},reason:{type:"string"}},required:["hypothesis","assessment","reason"],additionalProperties:false}}},required:["result","assessments"],additionalProperties:false},Blocker:{type:"object",properties:{id:{type:"string"},reason:{type:"string"},owner:{type:"string"},raisedAt:{type:"string"},clearedAt:{type:"string"}},required:["id","reason","owner","raisedAt"],additionalProperties:false},Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},Capability:{type:"string",enum:["order-backlog","define-acceptance","facilitate","deliver","review","verify","approve-gate","manage-flow","control-change","escalate"]},ClassOfService:{type:"string",enum:["expedite","fixed-date","standard","intangible"]},Event:{type:"object",properties:{seq:{type:"number"},at:{type:"string"},type:{type:"string"},by:{type:"string"},payload:{}},required:["seq","at","type","by","payload"],additionalProperties:false},Evidence:{type:"object",properties:{kind:{type:"string"},ref:{type:"string"},by:{type:"string"},at:{type:"string"}},required:["kind","ref","by","at"],additionalProperties:false},Experiment:{type:"object",properties:{id:{type:"string"},procedureRef:{type:"string"},predictions:{type:"array",items:{type:"object",properties:{hypothesis:{type:"string"},prediction:{type:"string"}},required:["hypothesis","prediction"],additionalProperties:false}},replayOf:{type:"string"}},required:["id","procedureRef","predictions"],additionalProperties:false},ExperimentCandidate:{type:"object",properties:{id:{type:"string"},item:{type:"string"},author:{type:"string"},status:{type:"string",enum:["pending","ready","running","submitted","validated","failed","timed-out","cancelled"]},workspace:{type:"string"},sha:{type:"string"},score:{type:"number"},spent:{$ref:"#/definitions/Spent"},validation:{type:"object",properties:{sha:{type:"string"},harness:{type:"string"},by:{type:"string"},passed:{type:"boolean"},reproducible:{type:"boolean"},evidence:{type:"string"}},required:["sha","harness","by","passed","reproducible","evidence"],additionalProperties:false},reason:{type:"string"},command:{type:"string"},log:{type:"string"},terminalLog:{type:"string"}},required:["id","item","author","status","spent"],additionalProperties:false},ExperimentationState:{type:"object",properties:{status:{type:"string",enum:["running","selected","integrating","integrated","stopped"]},baseSha:{type:"string"},harness:{type:"string"},candidates:{type:"object",additionalProperties:{$ref:"#/definitions/ExperimentCandidate"}},selected:{type:"string"},reason:{type:"string"},integration:{type:"object",properties:{selectedSha:{type:"string"},targetSha:{type:"string"},sha:{type:"string"},by:{type:"string"},validation:{type:"object",properties:{by:{type:"string"},sha:{type:"string"},harness:{type:"string"},evidence:{type:"string"},passed:{type:"boolean"}},required:["by","sha","harness","evidence","passed"],additionalProperties:false}},required:["selectedSha","targetSha","sha","by"],additionalProperties:false},released:{type:"array",items:{type:"string"}},overhead:{$ref:"#/definitions/Spent"}},required:["status","baseSha","harness","candidates","released","overhead"],additionalProperties:false},Gate:{type:"object",properties:{id:{type:"string"},requires:{type:"array",items:{$ref:"#/definitions/GateRequirement"}},evidence:{type:"array",items:{type:"string"}},onFail:{anyOf:[{type:"object",properties:{action:{type:"string",const:"block"}},required:["action"],additionalProperties:false},{type:"object",properties:{action:{type:"string",const:"return-to"},stage:{type:"string"}},required:["action","stage"],additionalProperties:false}]}},required:["id","requires","evidence","onFail"],additionalProperties:false},GateRequirement:{anyOf:[{type:"string",const:"human"},{type:"object",properties:{capability:{type:"string"}},required:["capability"],additionalProperties:false}]},Handoff:{type:"object",properties:{item:{type:"string"},role:{type:"string"},produced:{type:"array",items:{type:"object",properties:{kind:{type:"string"},ref:{type:"string"}},required:["kind","ref"],additionalProperties:false}},notes:{type:"string"},do_not:{type:"array",items:{type:"string"}},open_questions:{type:"array",items:{type:"string"}},verdict:{$ref:"#/definitions/Verdict"},follow_ups:{type:"array",items:{$ref:"#/definitions/NewItem"}},lessons:{type:"array",items:{type:"object",properties:{text:{type:"string"},scope:{type:"string",enum:["policy","skill","memory","spec","review"]}},required:["text","scope"],additionalProperties:false}}},required:["item","role","produced","notes","do_not","open_questions"],additionalProperties:false},Hypothesis:{type:"object",properties:{id:{type:"string"},claim:{type:"string"},falsifiedBy:{type:"string"}},required:["id","claim","falsifiedBy"],additionalProperties:false},ImpactAnalysis:{type:"object",properties:{summary:{type:"string"},reopen:{type:"array",items:{type:"string"}},weight:{type:"number"}},required:["summary","reopen","weight"],additionalProperties:false},InvestigationConclusion:{type:"object",properties:{outcome:{type:"string",enum:["resolved","inconclusive"]},summary:{type:"string"},supportedHypothesis:{type:"string"},evidenceRefs:{type:"array",items:{type:"string"}},by:{type:"string"}},required:["outcome","summary","evidenceRefs","by"],additionalProperties:false},InvestigationRound:{type:"object",properties:{hypotheses:{type:"array",items:{$ref:"#/definitions/Hypothesis"}},experiment:{$ref:"#/definitions/Experiment"},item:{type:"string"},by:{type:"string"},result:{$ref:"#/definitions/Observation"},update:{$ref:"#/definitions/BeliefUpdate"}},required:["hypotheses","experiment","item","by"],additionalProperties:false},InvestigationState:{type:"object",properties:{item:{type:"string"},phase:{type:"string",enum:["hypotheses","preregister","observe","update-belief","conclusion","review","closed"]},hypotheses:{type:"array",items:{$ref:"#/definitions/Hypothesis"}},singleHypothesisRationale:{type:"string"},rounds:{type:"array",items:{$ref:"#/definitions/InvestigationRound"}},conclusion:{$ref:"#/definitions/InvestigationConclusion"},outcome:{type:"string",enum:["resolved","inconclusive","stopped"]},stopReason:{type:"string"},contributors:{type:"array",items:{type:"string"}},reviewHistory:{type:"array",items:{type:"object",properties:{by:{type:"string"},reason:{type:"string"},approve:{type:"boolean"},next:{type:"string",enum:["round","conclusion"]},replayRefs:{type:"array",items:{type:"string"}}},required:["by","reason","approve","replayRefs"],additionalProperties:false}},review:{type:"object",properties:{by:{type:"string"},reason:{type:"string"},replayRefs:{type:"array",items:{type:"string"}}},required:["by","reason","replayRefs"],additionalProperties:false}},required:["item","phase","hypotheses","rounds","contributors"],additionalProperties:false},ItemPatch:{type:"object",properties:{type:{$ref:"#/definitions/ItemType"},title:{type:"string"},description:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},priority:{type:"number"},weight:{type:"number"},deadline:{type:"string"},classOfService:{$ref:"#/definitions/ClassOfService"},role:{type:"string"},parent:{type:"string"},acceptance:{type:"array",items:{type:"string"}},iteration:{type:"string"},traces:{type:"array",items:{type:"string"}},tags:{type:"array",items:{type:"string"}},affects:{type:"array",items:{type:"string"}},phase:{type:"string"},impactAnalysis:{$ref:"#/definitions/ImpactAnalysis"}},additionalProperties:false},ItemStatus:{type:"string",enum:["todo","in_progress","blocked","review","awaiting_human","done","dropped"]},ItemType:{type:"string",enum:["epic","story","task","bug","change-request","deliverable","question"]},Iteration:{type:"object",properties:{id:{type:"string"},goal:{type:"string"},budget:{$ref:"#/definitions/Budget"},spent:{$ref:"#/definitions/Spent"},startedAt:{type:"string"},endedAt:{type:"string"},committed:{type:"array",items:{type:"string"}},carryover:{type:"array",items:{type:"string"}},outcome:{type:"string",enum:["completed","cancelled"]},closing:{type:"boolean"}},required:["id","goal","budget","spent","startedAt","committed","carryover"],additionalProperties:false},Lesson:{type:"object",properties:{id:{type:"string"},at:{type:"string"},text:{type:"string"},scope:{type:"string",enum:["policy","skill","memory","spec","review"]},status:{type:"string",enum:["raised","adopted","dismissed"]},from:{type:"string"},item:{type:"string"},suggestedChange:{$ref:"#/definitions/LessonChange"}},required:["id","at","text","scope","status"],additionalProperties:false},LessonChange:{anyOf:[{type:"object",properties:{kind:{type:"string",const:"agreement"},text:{type:"string"},replaces:{type:"string"}},required:["kind","text"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"dod"},policy:{$ref:"#/definitions/Policy"}},required:["kind","policy"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"backlog"},item:{$ref:"#/definitions/NewItem"}},required:["kind","item"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"skill"},note:{type:"string"}},required:["kind","note"],additionalProperties:false}]},MethodologyName:{type:"string",enum:["scrum","kanban","waterfall","investigation","experimentation"]},ModelTier:{type:"string",enum:["small","medium","large"]},NewItem:{type:"object",additionalProperties:false,properties:{stage:{type:"string"},type:{$ref:"#/definitions/ItemType"},description:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},priority:{type:"number"},weight:{type:"number"},deadline:{type:"string"},classOfService:{$ref:"#/definitions/ClassOfService"},role:{type:"string"},parent:{type:"string"},acceptance:{type:"array",items:{type:"string"}},iteration:{type:"string"},traces:{type:"array",items:{type:"string"}},tags:{type:"array",items:{type:"string"}},affects:{type:"array",items:{type:"string"}},phase:{type:"string"},impactAnalysis:{$ref:"#/definitions/ImpactAnalysis"},id:{type:"string"},title:{type:"string"}},required:["id","title"]},Observation:{type:"object",properties:{id:{type:"string"},valid:{type:"boolean"},summary:{type:"string"},provenanceRefs:{type:"array",items:{type:"string"}}},required:["id","valid","summary","provenanceRefs"],additionalProperties:false},PendingHuman:{type:"object",properties:{id:{type:"string"},kind:{type:"string",enum:["gate","decision"]},item:{type:"string"},gate:{type:"string"},question:{type:"string"},raisedAt:{type:"string"}},required:["id","kind","question","raisedAt"],additionalProperties:false},Phase:{type:"object",properties:{id:{type:"string"},name:{type:"string"},deliverables:{type:"array",items:{type:"string"}},gate:{$ref:"#/definitions/Gate"},status:{type:"string",enum:["pending","open","baselined","reopened"]},budget:{$ref:"#/definitions/Budget"},produced:{type:"array",items:{$ref:"#/definitions/Produced"}}},required:["id","name","deliverables","gate","status"],additionalProperties:false},Policy:{anyOf:[{type:"object",properties:{kind:{type:"string",const:"evidence"},evidenceKind:{type:"string"}},required:["kind","evidenceKind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"acceptance-written"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"estimate-present"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"no-open-blockers"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"dependencies-done"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"custom"},id:{type:"string"},description:{type:"string"}},required:["kind","id","description"],additionalProperties:false}]},Produced:{type:"object",properties:{kind:{type:"string"},ref:{type:"string"},by:{type:"string"},at:{type:"string"}},required:["kind","ref","by","at"],additionalProperties:false},Role:{type:"object",properties:{id:{type:"string"},name:{type:"string"},modelTier:{$ref:"#/definitions/ModelTier"},resourceClass:{type:"string"},maxConcurrent:{type:"number"},capabilities:{type:"array",items:{$ref:"#/definitions/Capability"}},canApprove:{type:"array",items:{type:"string"}},inputs:{type:"array",items:{type:"string"}},outputs:{type:"array",items:{type:"string"}},do_not:{type:"array",items:{type:"string"}},constraints:{type:"array",items:{type:"string"}}},required:["id","name","modelTier","capabilities","canApprove","inputs","outputs","do_not"],additionalProperties:false},Spent:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},required:["tokens","turns","wallclockMs"],additionalProperties:false},Stage:{type:"object",properties:{id:{type:"string"},name:{type:"string"},wipLimit:{type:"number"},entryPolicy:{type:"array",items:{$ref:"#/definitions/Policy"}},exitPolicy:{type:"array",items:{$ref:"#/definitions/Policy"}},gate:{$ref:"#/definitions/Gate"},commitmentPoint:{type:"boolean"},deliveryPoint:{type:"boolean"},review:{type:"boolean"}},required:["id","name","entryPolicy","exitPolicy"],additionalProperties:false},Transition:{type:"object",properties:{from:{type:"object",properties:{stage:{type:"string"},status:{$ref:"#/definitions/ItemStatus"}},required:["stage","status"],additionalProperties:false},to:{type:"object",properties:{stage:{type:"string"},status:{$ref:"#/definitions/ItemStatus"}},required:["stage","status"],additionalProperties:false},at:{type:"string"},by:{type:"string"}},required:["from","to","at","by"],additionalProperties:false},Verdict:{type:"string",enum:["done","blocked","needs-review","rework","escalate"]},WorkItem:{type:"object",properties:{id:{type:"string"},type:{$ref:"#/definitions/ItemType"},title:{type:"string"},description:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},priority:{type:"number"},weight:{type:"number"},deadline:{type:"string"},classOfService:{$ref:"#/definitions/ClassOfService"},stage:{type:"string"},status:{$ref:"#/definitions/ItemStatus"},role:{type:"string"},parent:{type:"string"},acceptance:{type:"array",items:{type:"string"}},evidence:{type:"array",items:{$ref:"#/definitions/Evidence"}},blockers:{type:"array",items:{$ref:"#/definitions/Blocker"}},transitions:{type:"array",items:{$ref:"#/definitions/Transition"}},iteration:{type:"string"},traces:{type:"array",items:{type:"string"}},tags:{type:"array",items:{type:"string"}},affects:{type:"array",items:{type:"string"}},phase:{type:"string"},impactAnalysis:{$ref:"#/definitions/ImpactAnalysis"}},required:["id","type","title","dependsOn","stage","status","acceptance","evidence","blockers","transitions"],additionalProperties:false},WorkflowState:{type:"object",properties:{version:{type:"number",const:1},methodology:{$ref:"#/definitions/MethodologyName"},config:{},investigation:{$ref:"#/definitions/InvestigationState"},experimentation:{$ref:"#/definitions/ExperimentationState"},items:{type:"object",additionalProperties:{$ref:"#/definitions/WorkItem"}},stages:{type:"array",items:{$ref:"#/definitions/Stage"}},roles:{type:"object",additionalProperties:{$ref:"#/definitions/Role"}},iterations:{type:"array",items:{$ref:"#/definitions/Iteration"}},phases:{type:"array",items:{$ref:"#/definitions/Phase"}},baseline:{$ref:"#/definitions/Baseline"},baselines:{type:"array",items:{$ref:"#/definitions/Baseline"}},events:{type:"array",items:{$ref:"#/definitions/Event"}},accounting:{type:"array",items:{$ref:"#/definitions/Accounting"}},pending:{type:"array",items:{$ref:"#/definitions/PendingHuman"}},lessons:{type:"array",items:{$ref:"#/definitions/Lesson"}},agreements:{type:"array",items:{type:"string"}}},required:["version","methodology","config","items","stages","roles","iterations","events","accounting","pending","lessons","agreements"],additionalProperties:false}},h={Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},EstimateMode:{type:"string",enum:["per-weight","per-call"]},Policy:{anyOf:[{type:"object",properties:{kind:{type:"string",const:"evidence"},evidenceKind:{type:"string"}},required:["kind","evidenceKind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"acceptance-written"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"estimate-present"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"no-open-blockers"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"dependencies-done"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"custom"},id:{type:"string"},description:{type:"string"}},required:["kind","id","description"],additionalProperties:false}]},ScrumConfig:{type:"object",properties:{sprintBudget:{$ref:"#/definitions/Budget"},productGoal:{type:"string"},definitionOfDone:{type:"array",items:{$ref:"#/definitions/Policy"}},refinementSharePct:{type:"number"},allowMidSprintAdd:{type:"string",enum:["never","po-only","any"]},inProgressWipLimit:{type:"number"},autoClose:{type:"boolean"},estimateMode:{$ref:"#/definitions/EstimateMode"},fallbackTokensPerWeight:{type:"number"}},required:["sprintBudget","productGoal","definitionOfDone","refinementSharePct","allowMidSprintAdd"],additionalProperties:false}},P={ClassConfig:{type:"object",properties:{wipBypass:{type:"number"},sle:{$ref:"#/definitions/ServiceLevel"}},additionalProperties:false},KanbanColumn:{type:"object",properties:{id:{type:"string"},name:{type:"string"},wipLimit:{type:"number"},policies:{type:"array",items:{$ref:"#/definitions/Policy"}},commitmentPoint:{type:"boolean"},deliveryPoint:{type:"boolean"},review:{type:"boolean"}},required:["id","name","policies"],additionalProperties:false},KanbanConfig:{type:"object",properties:{columns:{type:"array",items:{$ref:"#/definitions/KanbanColumn"}},classesOfService:{type:"object",properties:{expedite:{$ref:"#/definitions/ClassConfig"},"fixed-date":{$ref:"#/definitions/ClassConfig"},standard:{$ref:"#/definitions/ClassConfig"},intangible:{$ref:"#/definitions/ClassConfig"}},additionalProperties:false},fairness:{type:"object",properties:{aging:{type:"boolean"},maxDeferralRounds:{type:"number"}},required:["aging","maxDeferralRounds"],additionalProperties:false},cadences:{type:"object",properties:{replenishment:{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"delivery-planning":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"service-delivery-review":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"operations-review":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"risk-review":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"strategy-review":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false}},additionalProperties:false},throughputWindowMs:{type:"number"},maxExpedite:{type:"number"}},required:["columns","classesOfService","fairness","cadences","throughputWindowMs","maxExpedite"],additionalProperties:false},Policy:{anyOf:[{type:"object",properties:{kind:{type:"string",const:"evidence"},evidenceKind:{type:"string"}},required:["kind","evidenceKind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"acceptance-written"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"estimate-present"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"no-open-blockers"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"dependencies-done"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"custom"},id:{type:"string"},description:{type:"string"}},required:["kind","id","description"],additionalProperties:false}]},ServiceLevel:{type:"object",properties:{percentile:{type:"number"},targetMs:{type:"number"}},required:["percentile","targetMs"],additionalProperties:false}},k={Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},Gate:{type:"object",properties:{id:{type:"string"},requires:{type:"array",items:{$ref:"#/definitions/GateRequirement"}},evidence:{type:"array",items:{type:"string"}},onFail:{anyOf:[{type:"object",properties:{action:{type:"string",const:"block"}},required:["action"],additionalProperties:false},{type:"object",properties:{action:{type:"string",const:"return-to"},stage:{type:"string"}},required:["action","stage"],additionalProperties:false}]}},required:["id","requires","evidence","onFail"],additionalProperties:false},GateRequirement:{anyOf:[{type:"string",const:"human"},{type:"object",properties:{capability:{type:"string"}},required:["capability"],additionalProperties:false}]},WaterfallConfig:{type:"object",properties:{phases:{type:"array",items:{$ref:"#/definitions/WaterfallPhaseConfig"}},changeControl:{type:"object",properties:{requiresImpactAnalysis:{type:"boolean"},approvers:{type:"array",items:{$ref:"#/definitions/GateRequirement"}}},required:["requiresImpactAnalysis","approvers"],additionalProperties:false},traceability:{type:"object",properties:{from:{type:"string"},to:{type:"array",items:{type:"string"}}},required:["from","to"],additionalProperties:false},humanGates:{anyOf:[{type:"string",const:"all"},{type:"array",items:{type:"string"}}]},fallbackTokensPerWeight:{type:"number"}},required:["phases","changeControl","traceability","humanGates"],additionalProperties:false},WaterfallPhaseConfig:{type:"object",properties:{id:{type:"string"},name:{type:"string"},deliverables:{type:"array",items:{type:"string"}},gate:{$ref:"#/definitions/Gate"},budget:{$ref:"#/definitions/Budget"},deliverBy:{type:"string"}},required:["id","name","deliverables","gate"],additionalProperties:false}},$={Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},InvestigationConfig:{type:"object",properties:{question:{type:"string"},maxRounds:{type:"number"},budget:{$ref:"#/definitions/Budget"}},required:["question","maxRounds","budget"],additionalProperties:false}},j={Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},ExperimentationConfig:{type:"object",properties:{objective:{type:"string"},direction:{type:"string",enum:["minimize","maximize"]},tieBreak:{type:"string",const:"candidate-id"},concurrencyCap:{type:"number"},maxCandidates:{type:"number"},candidateBudget:{$ref:"#/definitions/Budget"},totalBudget:{$ref:"#/definitions/Budget"}},required:["objective","direction","tieBreak","concurrencyCap","maxCandidates","candidateBudget","totalBudget"],additionalProperties:false}};var S="#/definitions/";function m(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function x(e,t){return e==="integer"?typeof t=="number"&&Number.isInteger(t):m(t)===e}function p(e){let t=JSON.stringify(e);return t===void 0?String(e):t.length>60?`${t.slice(0,57)}...`:t}function q(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function v(e,t){return JSON.stringify(e)===JSON.stringify(t)}function d(e,t,s,n,i){return {path:e===""?"/":e,keyword:t,message:s,expected:n,found:i}}function O(e,t){e.startsWith(S)||b("invalid-input",`schema $ref ${JSON.stringify(e)} is not #/definitions/<name>`,"regenerate the schema with pnpm schema:gen");let s=e.slice(S.length),n=t.definitions&&Object.hasOwn(t.definitions,s)?t.definitions[s]:void 0;return n||b("invalid-input",`schema $ref ${JSON.stringify(e)} names no definition`,"regenerate the schema with pnpm schema:gen"),n}function I(e,t){let s=t===""?"/":t;return e.reduce((n,i)=>n+(i.keyword==="type"&&i.path===s?1e3:i.keyword==="const"?100:1),0)}function C(e){let t=e[0]?.filter(s=>s.keyword==="const")??[];for(let s of t){let n=e.map(r=>r.find(o=>o.keyword==="const"&&o.path===s.path));if(n.some(r=>r===void 0))continue;let i=[...new Set(n.map(r=>r?.expected))].join(" | ");return {path:s.path,keyword:"enum",message:`expected one of ${i}`,expected:i,found:s.found}}}function w(e,t){return f(e,t,e,"")}function f(e,t,s,n){if(e.$ref!==void 0)return f(O(e.$ref,s),t,s,n);let i=[];if(e.type!==void 0){let r=Array.isArray(e.type)?e.type:[e.type];if(!r.some(o=>x(o,t))){let o=r.join(" | ");return [d(n,"type",`expected ${o}, got ${m(t)}`,o,p(t))]}}if(e.const!==void 0&&!v(t,e.const)&&i.push(d(n,"const",`expected ${p(e.const)}`,p(e.const),p(t))),e.enum!==void 0&&!e.enum.some(r=>v(r,t))){let r=e.enum.map(p).join(" | ");i.push(d(n,"enum",`expected one of ${r}`,r,p(t)));}if(typeof t=="number"&&(e.minimum!==void 0&&t<e.minimum&&i.push(d(n,"minimum",`expected >= ${e.minimum}`,`>= ${e.minimum}`,p(t))),e.maximum!==void 0&&t>e.maximum&&i.push(d(n,"maximum",`expected <= ${e.maximum}`,`<= ${e.maximum}`,p(t)))),typeof t=="string"&&(e.minLength!==void 0&&t.length<e.minLength&&i.push(d(n,"minLength",`expected at least ${e.minLength} characters`,`length >= ${e.minLength}`,p(t))),e.pattern!==void 0&&!new RegExp(e.pattern,"u").test(t)&&i.push(d(n,"pattern",`expected to match /${e.pattern}/`,`/${e.pattern}/`,p(t)))),Array.isArray(t)&&e.items!==void 0){let r=e.items;t.forEach((o,c)=>i.push(...f(r,o,s,`${n}/${c}`)));}if(m(t)==="object"){let r=t;for(let[o,c]of Object.entries(r)){let g=e.properties&&Object.hasOwn(e.properties,o)?e.properties[o]:void 0,y=`${n}/${q(o)}`;if(g)i.push(...f(g,c,s,y));else if(e.additionalProperties===false){let b=Object.keys(e.properties??{}).join(", ");i.push(d(y,"additionalProperties",`unknown property ${JSON.stringify(o)}`,b?`one of ${b}`:"no properties",o));}else typeof e.additionalProperties=="object"&&i.push(...f(e.additionalProperties,c,s,y));}for(let o of e.required??[])Object.hasOwn(r,o)||i.push(d(`${n}/${q(o)}`,"required",`missing required property ${JSON.stringify(o)}`,"present","absent"));}if(e.anyOf!==void 0){let r,o=[];for(let g of e.anyOf){let y=f(g,t,s,n);if(y.length===0){r=[];break}o.push(y),(r===void 0||I(y,n)<I(r,n))&&(r=y);}let c=r&&r.length>0?C(o):void 0;c?i.push(c):r&&i.push(...r);}return i}function E(e,t,s){let n=w(e,t),i=n[0];if(!i)return;let r=n.length>1?` (+${n.length-1} more)`:"";b("invalid-input",`${s} does not match its schema: ${i.path} ${i.message}${r}`,`fix ${s} at ${i.path}: expected ${i.expected}, found ${i.found}`);}var N="http://json-schema.org/draft-07/schema#";function a(e,t){return {$schema:N,$ref:`#/definitions/${e}`,definitions:t}}var J=a("WorkflowState",l),M=a("Role",l),_=a("NewItem",l),D=a("ItemPatch",l),F=a("Handoff",l),L=a("ScrumConfig",h),W=a("KanbanConfig",P),G=a("WaterfallConfig",k),K=a("InvestigationConfig",$),H=a("ExperimentationConfig",j);
|
|
2
|
-
export{
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {b}from'./chunk-YS6CXERQ.mjs';var l={Accounting:{type:"object",properties:{item:{type:"string"},role:{type:"string"},model:{type:"string"},tokensIn:{type:"number"},tokensOut:{type:"number"},durationMs:{type:"number"},startedAt:{type:"string"},endedAt:{type:"string"},estimate:{type:"boolean"}},required:["item","role","model","tokensIn","tokensOut","durationMs","startedAt","endedAt"],additionalProperties:false},Baseline:{type:"object",properties:{phase:{type:"string"},version:{type:"number"},at:{type:"string"},approvedBy:{type:"array",items:{type:"string"}},itemSnapshot:{type:"object",additionalProperties:{$ref:"#/definitions/WorkItem"}}},required:["phase","version","at","approvedBy","itemSnapshot"],additionalProperties:false},BeliefUpdate:{type:"object",properties:{result:{type:"string"},assessments:{type:"array",items:{type:"object",properties:{hypothesis:{type:"string"},assessment:{type:"string",enum:["supported","refuted","uncertain"]},reason:{type:"string"}},required:["hypothesis","assessment","reason"],additionalProperties:false}}},required:["result","assessments"],additionalProperties:false},Blocker:{type:"object",properties:{id:{type:"string"},reason:{type:"string"},owner:{type:"string"},raisedAt:{type:"string"},clearedAt:{type:"string"}},required:["id","reason","owner","raisedAt"],additionalProperties:false},Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},Capability:{type:"string",enum:["order-backlog","define-acceptance","facilitate","deliver","review","verify","approve-gate","manage-flow","control-change","escalate"]},ClassOfService:{type:"string",enum:["expedite","fixed-date","standard","intangible"]},Event:{type:"object",properties:{seq:{type:"number"},at:{type:"string"},type:{type:"string"},by:{type:"string"},payload:{}},required:["seq","at","type","by","payload"],additionalProperties:false},Evidence:{type:"object",properties:{kind:{type:"string"},ref:{type:"string"},by:{type:"string"},at:{type:"string"}},required:["kind","ref","by","at"],additionalProperties:false},Experiment:{type:"object",properties:{id:{type:"string"},procedureRef:{type:"string"},predictions:{type:"array",items:{type:"object",properties:{hypothesis:{type:"string"},prediction:{type:"string"}},required:["hypothesis","prediction"],additionalProperties:false}},replayOf:{type:"string"}},required:["id","procedureRef","predictions"],additionalProperties:false},ExperimentCandidate:{type:"object",properties:{id:{type:"string"},item:{type:"string"},author:{type:"string"},status:{type:"string",enum:["pending","ready","running","submitted","validated","failed","timed-out","cancelled"]},workspace:{type:"string"},sha:{type:"string"},score:{type:"number"},spent:{$ref:"#/definitions/Spent"},validation:{type:"object",properties:{sha:{type:"string"},harness:{type:"string"},by:{type:"string"},passed:{type:"boolean"},reproducible:{type:"boolean"},evidence:{type:"string"}},required:["sha","harness","by","passed","reproducible","evidence"],additionalProperties:false},reason:{type:"string"},command:{type:"string"},log:{type:"string"},terminalLog:{type:"string"}},required:["id","item","author","status","spent"],additionalProperties:false},ExperimentationState:{type:"object",properties:{status:{type:"string",enum:["running","selected","integrating","integrated","stopped"]},baseSha:{type:"string"},harness:{type:"string"},candidates:{type:"object",additionalProperties:{$ref:"#/definitions/ExperimentCandidate"}},selected:{type:"string"},reason:{type:"string"},integration:{type:"object",properties:{selectedSha:{type:"string"},targetSha:{type:"string"},sha:{type:"string"},by:{type:"string"},validation:{type:"object",properties:{by:{type:"string"},sha:{type:"string"},harness:{type:"string"},evidence:{type:"string"},passed:{type:"boolean"}},required:["by","sha","harness","evidence","passed"],additionalProperties:false}},required:["selectedSha","targetSha","sha","by"],additionalProperties:false},released:{type:"array",items:{type:"string"}},overhead:{$ref:"#/definitions/Spent"}},required:["status","baseSha","harness","candidates","released","overhead"],additionalProperties:false},Gate:{type:"object",properties:{id:{type:"string"},requires:{type:"array",items:{$ref:"#/definitions/GateRequirement"}},evidence:{type:"array",items:{type:"string"}},onFail:{anyOf:[{type:"object",properties:{action:{type:"string",const:"block"}},required:["action"],additionalProperties:false},{type:"object",properties:{action:{type:"string",const:"return-to"},stage:{type:"string"}},required:["action","stage"],additionalProperties:false}]}},required:["id","requires","evidence","onFail"],additionalProperties:false},GateRequirement:{anyOf:[{type:"string",const:"human"},{type:"object",properties:{capability:{type:"string"}},required:["capability"],additionalProperties:false}]},Handoff:{type:"object",properties:{item:{type:"string"},role:{type:"string"},produced:{type:"array",items:{type:"object",properties:{kind:{type:"string"},ref:{type:"string"}},required:["kind","ref"],additionalProperties:false}},notes:{type:"string"},do_not:{type:"array",items:{type:"string"}},open_questions:{type:"array",items:{type:"string"}},verdict:{$ref:"#/definitions/Verdict"},follow_ups:{type:"array",items:{$ref:"#/definitions/NewItem"}},lessons:{type:"array",items:{type:"object",properties:{text:{type:"string"},scope:{type:"string",enum:["policy","skill","memory","spec","review"]}},required:["text","scope"],additionalProperties:false}}},required:["item","role","produced","notes","do_not","open_questions"],additionalProperties:false},Hypothesis:{type:"object",properties:{id:{type:"string"},claim:{type:"string"},falsifiedBy:{type:"string"}},required:["id","claim","falsifiedBy"],additionalProperties:false},ImpactAnalysis:{type:"object",properties:{summary:{type:"string"},reopen:{type:"array",items:{type:"string"}},weight:{type:"number"}},required:["summary","reopen","weight"],additionalProperties:false},InvestigationConclusion:{type:"object",properties:{outcome:{type:"string",enum:["resolved","inconclusive"]},summary:{type:"string"},supportedHypothesis:{type:"string"},evidenceRefs:{type:"array",items:{type:"string"}},by:{type:"string"}},required:["outcome","summary","evidenceRefs","by"],additionalProperties:false},InvestigationRound:{type:"object",properties:{hypotheses:{type:"array",items:{$ref:"#/definitions/Hypothesis"}},experiment:{$ref:"#/definitions/Experiment"},item:{type:"string"},by:{type:"string"},result:{$ref:"#/definitions/Observation"},update:{$ref:"#/definitions/BeliefUpdate"}},required:["hypotheses","experiment","item","by"],additionalProperties:false},InvestigationState:{type:"object",properties:{item:{type:"string"},phase:{type:"string",enum:["hypotheses","preregister","observe","update-belief","conclusion","review","closed"]},hypotheses:{type:"array",items:{$ref:"#/definitions/Hypothesis"}},singleHypothesisRationale:{type:"string"},rounds:{type:"array",items:{$ref:"#/definitions/InvestigationRound"}},conclusion:{$ref:"#/definitions/InvestigationConclusion"},outcome:{type:"string",enum:["resolved","inconclusive","stopped"]},stopReason:{type:"string"},contributors:{type:"array",items:{type:"string"}},reviewHistory:{type:"array",items:{type:"object",properties:{by:{type:"string"},reason:{type:"string"},approve:{type:"boolean"},next:{type:"string",enum:["round","conclusion"]},replayRefs:{type:"array",items:{type:"string"}}},required:["by","reason","approve","replayRefs"],additionalProperties:false}},review:{type:"object",properties:{by:{type:"string"},reason:{type:"string"},replayRefs:{type:"array",items:{type:"string"}}},required:["by","reason","replayRefs"],additionalProperties:false}},required:["item","phase","hypotheses","rounds","contributors"],additionalProperties:false},ItemPatch:{type:"object",properties:{type:{$ref:"#/definitions/ItemType"},title:{type:"string"},description:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},priority:{type:"number"},weight:{type:"number"},deadline:{type:"string"},classOfService:{$ref:"#/definitions/ClassOfService"},role:{type:"string"},parent:{type:"string"},acceptance:{type:"array",items:{type:"string"}},iteration:{type:"string"},traces:{type:"array",items:{type:"string"}},tags:{type:"array",items:{type:"string"}},affects:{type:"array",items:{type:"string"}},phase:{type:"string"},impactAnalysis:{$ref:"#/definitions/ImpactAnalysis"}},additionalProperties:false},ItemStatus:{type:"string",enum:["todo","in_progress","blocked","review","awaiting_human","done","dropped"]},ItemType:{type:"string",enum:["epic","story","task","bug","change-request","deliverable","question"]},Iteration:{type:"object",properties:{id:{type:"string"},goal:{type:"string"},budget:{$ref:"#/definitions/Budget"},spent:{$ref:"#/definitions/Spent"},startedAt:{type:"string"},endedAt:{type:"string"},committed:{type:"array",items:{type:"string"}},carryover:{type:"array",items:{type:"string"}},outcome:{type:"string",enum:["completed","cancelled"]},closing:{type:"boolean"}},required:["id","goal","budget","spent","startedAt","committed","carryover"],additionalProperties:false},Lesson:{type:"object",properties:{id:{type:"string"},at:{type:"string"},text:{type:"string"},scope:{type:"string",enum:["policy","skill","memory","spec","review"]},status:{type:"string",enum:["raised","adopted","dismissed"]},from:{type:"string"},item:{type:"string"},suggestedChange:{$ref:"#/definitions/LessonChange"}},required:["id","at","text","scope","status"],additionalProperties:false},LessonChange:{anyOf:[{type:"object",properties:{kind:{type:"string",const:"agreement"},text:{type:"string"},replaces:{type:"string"}},required:["kind","text"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"dod"},policy:{$ref:"#/definitions/Policy"}},required:["kind","policy"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"backlog"},item:{$ref:"#/definitions/NewItem"}},required:["kind","item"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"skill"},note:{type:"string"}},required:["kind","note"],additionalProperties:false}]},MethodologyName:{type:"string",enum:["scrum","kanban","waterfall","investigation","experimentation"]},ModelTier:{type:"string",enum:["small","medium","large"]},NewItem:{type:"object",additionalProperties:false,properties:{stage:{type:"string"},type:{$ref:"#/definitions/ItemType"},description:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},priority:{type:"number"},weight:{type:"number"},deadline:{type:"string"},classOfService:{$ref:"#/definitions/ClassOfService"},role:{type:"string"},parent:{type:"string"},acceptance:{type:"array",items:{type:"string"}},iteration:{type:"string"},traces:{type:"array",items:{type:"string"}},tags:{type:"array",items:{type:"string"}},affects:{type:"array",items:{type:"string"}},phase:{type:"string"},impactAnalysis:{$ref:"#/definitions/ImpactAnalysis"},id:{type:"string"},title:{type:"string"}},required:["id","title"]},Observation:{type:"object",properties:{id:{type:"string"},valid:{type:"boolean"},summary:{type:"string"},provenanceRefs:{type:"array",items:{type:"string"}}},required:["id","valid","summary","provenanceRefs"],additionalProperties:false},PendingHuman:{type:"object",properties:{id:{type:"string"},kind:{type:"string",enum:["gate","decision"]},item:{type:"string"},gate:{type:"string"},question:{type:"string"},raisedAt:{type:"string"}},required:["id","kind","question","raisedAt"],additionalProperties:false},Phase:{type:"object",properties:{id:{type:"string"},name:{type:"string"},deliverables:{type:"array",items:{type:"string"}},gate:{$ref:"#/definitions/Gate"},status:{type:"string",enum:["pending","open","baselined","reopened"]},budget:{$ref:"#/definitions/Budget"},produced:{type:"array",items:{$ref:"#/definitions/Produced"}}},required:["id","name","deliverables","gate","status"],additionalProperties:false},Policy:{anyOf:[{type:"object",properties:{kind:{type:"string",const:"evidence"},evidenceKind:{type:"string"}},required:["kind","evidenceKind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"acceptance-written"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"estimate-present"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"no-open-blockers"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"dependencies-done"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"custom"},id:{type:"string"},description:{type:"string"}},required:["kind","id","description"],additionalProperties:false}]},Produced:{type:"object",properties:{kind:{type:"string"},ref:{type:"string"},by:{type:"string"},at:{type:"string"}},required:["kind","ref","by","at"],additionalProperties:false},Role:{type:"object",properties:{id:{type:"string"},name:{type:"string"},modelTier:{$ref:"#/definitions/ModelTier"},resourceClass:{type:"string"},maxConcurrent:{type:"number"},capabilities:{type:"array",items:{$ref:"#/definitions/Capability"}},canApprove:{type:"array",items:{type:"string"}},inputs:{type:"array",items:{type:"string"}},outputs:{type:"array",items:{type:"string"}},do_not:{type:"array",items:{type:"string"}},constraints:{type:"array",items:{type:"string"}}},required:["id","name","modelTier","capabilities","canApprove","inputs","outputs","do_not"],additionalProperties:false},Spent:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},required:["tokens","turns","wallclockMs"],additionalProperties:false},Stage:{type:"object",properties:{id:{type:"string"},name:{type:"string"},wipLimit:{type:"number"},entryPolicy:{type:"array",items:{$ref:"#/definitions/Policy"}},exitPolicy:{type:"array",items:{$ref:"#/definitions/Policy"}},gate:{$ref:"#/definitions/Gate"},commitmentPoint:{type:"boolean"},deliveryPoint:{type:"boolean"},review:{type:"boolean"}},required:["id","name","entryPolicy","exitPolicy"],additionalProperties:false},Transition:{type:"object",properties:{from:{type:"object",properties:{stage:{type:"string"},status:{$ref:"#/definitions/ItemStatus"}},required:["stage","status"],additionalProperties:false},to:{type:"object",properties:{stage:{type:"string"},status:{$ref:"#/definitions/ItemStatus"}},required:["stage","status"],additionalProperties:false},at:{type:"string"},by:{type:"string"}},required:["from","to","at","by"],additionalProperties:false},Verdict:{type:"string",enum:["done","blocked","needs-review","rework","escalate"]},WorkItem:{type:"object",properties:{id:{type:"string"},type:{$ref:"#/definitions/ItemType"},title:{type:"string"},description:{type:"string"},dependsOn:{type:"array",items:{type:"string"}},priority:{type:"number"},weight:{type:"number"},deadline:{type:"string"},classOfService:{$ref:"#/definitions/ClassOfService"},stage:{type:"string"},status:{$ref:"#/definitions/ItemStatus"},role:{type:"string"},parent:{type:"string"},acceptance:{type:"array",items:{type:"string"}},evidence:{type:"array",items:{$ref:"#/definitions/Evidence"}},blockers:{type:"array",items:{$ref:"#/definitions/Blocker"}},transitions:{type:"array",items:{$ref:"#/definitions/Transition"}},iteration:{type:"string"},traces:{type:"array",items:{type:"string"}},tags:{type:"array",items:{type:"string"}},affects:{type:"array",items:{type:"string"}},phase:{type:"string"},impactAnalysis:{$ref:"#/definitions/ImpactAnalysis"}},required:["id","type","title","dependsOn","stage","status","acceptance","evidence","blockers","transitions"],additionalProperties:false},WorkflowExt:{type:"object",properties:{investigation:{$ref:"#/definitions/InvestigationState"},experimentation:{$ref:"#/definitions/ExperimentationState"}},additionalProperties:{}},WorkflowState:{type:"object",properties:{version:{type:"number",const:1},methodology:{$ref:"#/definitions/MethodologyName"},config:{},investigation:{$ref:"#/definitions/InvestigationState",deprecated:true},experimentation:{$ref:"#/definitions/ExperimentationState",deprecated:true},ext:{$ref:"#/definitions/WorkflowExt"},items:{type:"object",additionalProperties:{$ref:"#/definitions/WorkItem"}},stages:{type:"array",items:{$ref:"#/definitions/Stage"}},roles:{type:"object",additionalProperties:{$ref:"#/definitions/Role"}},iterations:{type:"array",items:{$ref:"#/definitions/Iteration"}},phases:{type:"array",items:{$ref:"#/definitions/Phase"}},baseline:{$ref:"#/definitions/Baseline"},baselines:{type:"array",items:{$ref:"#/definitions/Baseline"}},events:{type:"array",items:{$ref:"#/definitions/Event"}},accounting:{type:"array",items:{$ref:"#/definitions/Accounting"}},pending:{type:"array",items:{$ref:"#/definitions/PendingHuman"}},lessons:{type:"array",items:{$ref:"#/definitions/Lesson"}},agreements:{type:"array",items:{type:"string"}}},required:["version","methodology","config","items","stages","roles","iterations","events","accounting","pending","lessons","agreements"],additionalProperties:false}},h={Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},EstimateMode:{type:"string",enum:["per-weight","per-call"]},Policy:{anyOf:[{type:"object",properties:{kind:{type:"string",const:"evidence"},evidenceKind:{type:"string"}},required:["kind","evidenceKind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"acceptance-written"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"estimate-present"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"no-open-blockers"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"dependencies-done"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"custom"},id:{type:"string"},description:{type:"string"}},required:["kind","id","description"],additionalProperties:false}]},ScrumConfig:{type:"object",properties:{sprintBudget:{$ref:"#/definitions/Budget"},productGoal:{type:"string"},definitionOfDone:{type:"array",items:{$ref:"#/definitions/Policy"}},refinementSharePct:{type:"number"},allowMidSprintAdd:{type:"string",enum:["never","po-only","any"]},inProgressWipLimit:{type:"number"},autoClose:{type:"boolean"},estimateMode:{$ref:"#/definitions/EstimateMode"},fallbackTokensPerWeight:{type:"number"}},required:["sprintBudget","productGoal","definitionOfDone","refinementSharePct","allowMidSprintAdd"],additionalProperties:false}},P={ClassConfig:{type:"object",properties:{wipBypass:{type:"number"},sle:{$ref:"#/definitions/ServiceLevel"}},additionalProperties:false},KanbanColumn:{type:"object",properties:{id:{type:"string"},name:{type:"string"},wipLimit:{type:"number"},policies:{type:"array",items:{$ref:"#/definitions/Policy"}},commitmentPoint:{type:"boolean"},deliveryPoint:{type:"boolean"},review:{type:"boolean"}},required:["id","name","policies"],additionalProperties:false},KanbanConfig:{type:"object",properties:{columns:{type:"array",items:{$ref:"#/definitions/KanbanColumn"}},classesOfService:{type:"object",properties:{expedite:{$ref:"#/definitions/ClassConfig"},"fixed-date":{$ref:"#/definitions/ClassConfig"},standard:{$ref:"#/definitions/ClassConfig"},intangible:{$ref:"#/definitions/ClassConfig"}},additionalProperties:false},fairness:{type:"object",properties:{aging:{type:"boolean"},maxDeferralRounds:{type:"number"}},required:["aging","maxDeferralRounds"],additionalProperties:false},cadences:{type:"object",properties:{replenishment:{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"delivery-planning":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"service-delivery-review":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"operations-review":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"risk-review":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false},"strategy-review":{type:"object",properties:{everyTurns:{type:"number"}},additionalProperties:false}},additionalProperties:false},throughputWindowMs:{type:"number"},maxExpedite:{type:"number"}},required:["columns","classesOfService","fairness","cadences","throughputWindowMs","maxExpedite"],additionalProperties:false},Policy:{anyOf:[{type:"object",properties:{kind:{type:"string",const:"evidence"},evidenceKind:{type:"string"}},required:["kind","evidenceKind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"acceptance-written"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"estimate-present"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"no-open-blockers"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"dependencies-done"}},required:["kind"],additionalProperties:false},{type:"object",properties:{kind:{type:"string",const:"custom"},id:{type:"string"},description:{type:"string"}},required:["kind","id","description"],additionalProperties:false}]},ServiceLevel:{type:"object",properties:{percentile:{type:"number"},targetMs:{type:"number"}},required:["percentile","targetMs"],additionalProperties:false}},k={Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},Gate:{type:"object",properties:{id:{type:"string"},requires:{type:"array",items:{$ref:"#/definitions/GateRequirement"}},evidence:{type:"array",items:{type:"string"}},onFail:{anyOf:[{type:"object",properties:{action:{type:"string",const:"block"}},required:["action"],additionalProperties:false},{type:"object",properties:{action:{type:"string",const:"return-to"},stage:{type:"string"}},required:["action","stage"],additionalProperties:false}]}},required:["id","requires","evidence","onFail"],additionalProperties:false},GateRequirement:{anyOf:[{type:"string",const:"human"},{type:"object",properties:{capability:{type:"string"}},required:["capability"],additionalProperties:false}]},WaterfallConfig:{type:"object",properties:{phases:{type:"array",items:{$ref:"#/definitions/WaterfallPhaseConfig"}},changeControl:{type:"object",properties:{requiresImpactAnalysis:{type:"boolean"},approvers:{type:"array",items:{$ref:"#/definitions/GateRequirement"}}},required:["requiresImpactAnalysis","approvers"],additionalProperties:false},traceability:{type:"object",properties:{from:{type:"string"},to:{type:"array",items:{type:"string"}}},required:["from","to"],additionalProperties:false},humanGates:{anyOf:[{type:"string",const:"all"},{type:"array",items:{type:"string"}}]},fallbackTokensPerWeight:{type:"number"}},required:["phases","changeControl","traceability","humanGates"],additionalProperties:false},WaterfallPhaseConfig:{type:"object",properties:{id:{type:"string"},name:{type:"string"},deliverables:{type:"array",items:{type:"string"}},gate:{$ref:"#/definitions/Gate"},budget:{$ref:"#/definitions/Budget"},deliverBy:{type:"string"}},required:["id","name","deliverables","gate"],additionalProperties:false}},$={Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},InvestigationConfig:{type:"object",properties:{question:{type:"string"},maxRounds:{type:"number"},budget:{$ref:"#/definitions/Budget"}},required:["question","maxRounds","budget"],additionalProperties:false}},j={Budget:{type:"object",properties:{tokens:{type:"number"},turns:{type:"number"},wallclockMs:{type:"number"}},additionalProperties:false},ExperimentationConfig:{type:"object",properties:{objective:{type:"string"},direction:{type:"string",enum:["minimize","maximize"]},tieBreak:{type:"string",const:"candidate-id"},concurrencyCap:{type:"number"},maxCandidates:{type:"number"},candidateBudget:{$ref:"#/definitions/Budget"},totalBudget:{$ref:"#/definitions/Budget"}},required:["objective","direction","tieBreak","concurrencyCap","maxCandidates","candidateBudget","totalBudget"],additionalProperties:false}};var S="#/definitions/";function m(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function w(e,t){return e==="integer"?typeof t=="number"&&Number.isInteger(t):m(t)===e}function p(e){let t=JSON.stringify(e);return t===void 0?String(e):t.length>60?`${t.slice(0,57)}...`:t}function q(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function v(e,t){return JSON.stringify(e)===JSON.stringify(t)}function d(e,t,s,n,i){return {path:e===""?"/":e,keyword:t,message:s,expected:n,found:i}}function O(e,t){e.startsWith(S)||b("invalid-input",`schema $ref ${JSON.stringify(e)} is not #/definitions/<name>`,"regenerate the schema with pnpm schema:gen");let s=e.slice(S.length),n=t.definitions&&Object.hasOwn(t.definitions,s)?t.definitions[s]:void 0;return n||b("invalid-input",`schema $ref ${JSON.stringify(e)} names no definition`,"regenerate the schema with pnpm schema:gen"),n}function x(e,t){let s=t===""?"/":t;return e.reduce((n,i)=>n+(i.keyword==="type"&&i.path===s?1e3:i.keyword==="const"?100:1),0)}function E(e){let t=e[0]?.filter(s=>s.keyword==="const")??[];for(let s of t){let n=e.map(r=>r.find(o=>o.keyword==="const"&&o.path===s.path));if(n.some(r=>r===void 0))continue;let i=[...new Set(n.map(r=>r?.expected))].join(" | ");return {path:s.path,keyword:"enum",message:`expected one of ${i}`,expected:i,found:s.found}}}function I(e,t){return f(e,t,e,"")}function f(e,t,s,n){if(e.$ref!==void 0)return f(O(e.$ref,s),t,s,n);let i=[];if(e.type!==void 0){let r=Array.isArray(e.type)?e.type:[e.type];if(!r.some(o=>w(o,t))){let o=r.join(" | ");return [d(n,"type",`expected ${o}, got ${m(t)}`,o,p(t))]}}if(e.const!==void 0&&!v(t,e.const)&&i.push(d(n,"const",`expected ${p(e.const)}`,p(e.const),p(t))),e.enum!==void 0&&!e.enum.some(r=>v(r,t))){let r=e.enum.map(p).join(" | ");i.push(d(n,"enum",`expected one of ${r}`,r,p(t)));}if(typeof t=="number"&&(e.minimum!==void 0&&t<e.minimum&&i.push(d(n,"minimum",`expected >= ${e.minimum}`,`>= ${e.minimum}`,p(t))),e.maximum!==void 0&&t>e.maximum&&i.push(d(n,"maximum",`expected <= ${e.maximum}`,`<= ${e.maximum}`,p(t)))),typeof t=="string"&&(e.minLength!==void 0&&t.length<e.minLength&&i.push(d(n,"minLength",`expected at least ${e.minLength} characters`,`length >= ${e.minLength}`,p(t))),e.pattern!==void 0&&!new RegExp(e.pattern,"u").test(t)&&i.push(d(n,"pattern",`expected to match /${e.pattern}/`,`/${e.pattern}/`,p(t)))),Array.isArray(t)&&e.items!==void 0){let r=e.items;t.forEach((o,c)=>i.push(...f(r,o,s,`${n}/${c}`)));}if(m(t)==="object"){let r=t;for(let[o,c]of Object.entries(r)){let g=e.properties&&Object.hasOwn(e.properties,o)?e.properties[o]:void 0,y=`${n}/${q(o)}`;if(g)i.push(...f(g,c,s,y));else if(e.additionalProperties===false){let b=Object.keys(e.properties??{}).join(", ");i.push(d(y,"additionalProperties",`unknown property ${JSON.stringify(o)}`,b?`one of ${b}`:"no properties",o));}else typeof e.additionalProperties=="object"&&i.push(...f(e.additionalProperties,c,s,y));}for(let o of e.required??[])Object.hasOwn(r,o)||i.push(d(`${n}/${q(o)}`,"required",`missing required property ${JSON.stringify(o)}`,"present","absent"));}if(e.anyOf!==void 0){let r,o=[];for(let g of e.anyOf){let y=f(g,t,s,n);if(y.length===0){r=[];break}o.push(y),(r===void 0||x(y,n)<x(r,n))&&(r=y);}let c=r&&r.length>0?E(o):void 0;c?i.push(c):r&&i.push(...r);}return i}function C(e,t,s){let n=I(e,t),i=n[0];if(!i)return;let r=n.length>1?` (+${n.length-1} more)`:"";b("invalid-input",`${s} does not match its schema: ${i.path} ${i.message}${r}`,`fix ${s} at ${i.path}: expected ${i.expected}, found ${i.found}`);}var N="http://json-schema.org/draft-07/schema#";function a(e,t){return {$schema:N,$ref:`#/definitions/${e}`,definitions:t}}var J=a("WorkflowState",l),M=a("Role",l),_=a("NewItem",l),D=a("ItemPatch",l),F=a("Handoff",l),L=a("ScrumConfig",h),W=a("KanbanConfig",P),G=a("WaterfallConfig",k),K=a("InvestigationConfig",$),H=a("ExperimentationConfig",j);
|
|
2
|
+
export{I as a,C as b,N as c,J as d,M as e,_ as f,D as g,F as h,L as i,W as j,G as k,K as l,H as m};//# sourceMappingURL=chunk-BD76VFI4.mjs.map
|
|
3
|
+
//# sourceMappingURL=chunk-BD76VFI4.mjs.map
|