ex-workflow 0.1.0-stage → 0.3.0-stage

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +63 -11
  3. package/dist/chunk-23P7C25E.cjs +2 -0
  4. package/dist/chunk-23P7C25E.cjs.map +1 -0
  5. package/dist/chunk-2IKIBB73.cjs +2 -0
  6. package/dist/chunk-2IKIBB73.cjs.map +1 -0
  7. package/dist/chunk-4A4TD4MH.cjs +2 -0
  8. package/dist/chunk-4A4TD4MH.cjs.map +1 -0
  9. package/dist/chunk-7HZXZF3L.cjs +2 -0
  10. package/dist/chunk-7HZXZF3L.cjs.map +1 -0
  11. package/dist/chunk-AUZIQPFT.cjs +2 -0
  12. package/dist/chunk-AUZIQPFT.cjs.map +1 -0
  13. package/dist/chunk-BJEOTG6P.mjs +2 -0
  14. package/dist/chunk-BJEOTG6P.mjs.map +1 -0
  15. package/dist/chunk-FLCYD2QF.mjs +2 -0
  16. package/dist/chunk-FLCYD2QF.mjs.map +1 -0
  17. package/dist/chunk-NN3XJUHP.cjs +2 -0
  18. package/dist/chunk-NN3XJUHP.cjs.map +1 -0
  19. package/dist/chunk-P4P4JTE5.mjs +2 -0
  20. package/dist/chunk-P4P4JTE5.mjs.map +1 -0
  21. package/dist/chunk-R27STIER.mjs +2 -0
  22. package/dist/chunk-R27STIER.mjs.map +1 -0
  23. package/dist/chunk-TMKCALFT.cjs +2 -0
  24. package/dist/chunk-TMKCALFT.cjs.map +1 -0
  25. package/dist/chunk-UOGNVWVO.mjs +2 -0
  26. package/dist/chunk-UOGNVWVO.mjs.map +1 -0
  27. package/dist/chunk-WOKNWJKU.mjs +2 -0
  28. package/dist/chunk-WOKNWJKU.mjs.map +1 -0
  29. package/dist/chunk-ZX4DAMTG.mjs +2 -0
  30. package/dist/chunk-ZX4DAMTG.mjs.map +1 -0
  31. package/dist/cli/bin.cjs +1 -1
  32. package/dist/cli/bin.cjs.map +1 -1
  33. package/dist/cli/bin.mjs +1 -1
  34. package/dist/cli/bin.mjs.map +1 -1
  35. package/dist/cli/index.cjs +1 -1
  36. package/dist/cli/index.mjs +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.d.cts +17 -16
  40. package/dist/index.d.ts +17 -16
  41. package/dist/index.mjs +1 -1
  42. package/dist/index.mjs.map +1 -1
  43. package/dist/kanban/index.cjs +2 -0
  44. package/dist/kanban/index.cjs.map +1 -0
  45. package/dist/kanban/index.d.cts +225 -0
  46. package/dist/kanban/index.d.ts +225 -0
  47. package/dist/kanban/index.mjs +2 -0
  48. package/dist/kanban/index.mjs.map +1 -0
  49. package/dist/roles-BLBRKhUZ.d.ts +14 -0
  50. package/dist/roles-aneKYJ3Z.d.cts +14 -0
  51. package/dist/scrum/index.cjs +1 -1
  52. package/dist/scrum/index.d.cts +3 -3
  53. package/dist/scrum/index.d.ts +3 -3
  54. package/dist/scrum/index.mjs +1 -1
  55. package/dist/types.d.cts +42 -3
  56. package/dist/types.d.ts +42 -3
  57. package/dist/waterfall/index.cjs +2 -0
  58. package/dist/waterfall/index.cjs.map +1 -0
  59. package/dist/waterfall/index.d.cts +148 -0
  60. package/dist/waterfall/index.d.ts +148 -0
  61. package/dist/waterfall/index.mjs +2 -0
  62. package/dist/waterfall/index.mjs.map +1 -0
  63. package/package.json +27 -1
  64. package/dist/chunk-5XAKW64K.cjs +0 -2
  65. package/dist/chunk-5XAKW64K.cjs.map +0 -1
  66. package/dist/chunk-B7MP6Y3W.mjs +0 -2
  67. package/dist/chunk-B7MP6Y3W.mjs.map +0 -1
  68. package/dist/chunk-CPGDAHAU.cjs +0 -2
  69. package/dist/chunk-CPGDAHAU.cjs.map +0 -1
  70. package/dist/chunk-D7U3ES2L.mjs +0 -2
  71. package/dist/chunk-D7U3ES2L.mjs.map +0 -1
  72. package/dist/chunk-DZ7AN6H5.mjs +0 -2
  73. package/dist/chunk-DZ7AN6H5.mjs.map +0 -1
  74. package/dist/chunk-LPQSNYYT.cjs +0 -2
  75. package/dist/chunk-LPQSNYYT.cjs.map +0 -1
  76. package/dist/chunk-ROH3RYBI.mjs +0 -2
  77. package/dist/chunk-ROH3RYBI.mjs.map +0 -1
  78. package/dist/chunk-WAMNJUQ4.cjs +0 -2
  79. package/dist/chunk-WAMNJUQ4.cjs.map +0 -1
@@ -0,0 +1,14 @@
1
+ import { WorkflowState, Role, Capability } from './types.js';
2
+
3
+ declare function registerRole(state: WorkflowState, role: Role, by: string, now?: string): WorkflowState;
4
+ declare function retireRole(state: WorkflowState, roleId: string, by: string, now?: string): WorkflowState;
5
+ declare function hasCapability(role: Role, cap: Capability): boolean;
6
+ declare function rolesWith(state: WorkflowState, cap: Capability): Role[];
7
+ declare function approversFor(state: WorkflowState, gateId: string): Role[];
8
+ declare function requireCapabilities(state: WorkflowState, required: Capability[], exclusive: Capability[]): void;
9
+ declare function separationLost(state: WorkflowState, required: Capability[]): Role[];
10
+ /** `human` may do anything; a role must hold at least one of `caps`; unknown ids may do nothing. */
11
+ declare function canDo(state: WorkflowState, by: string, ...caps: Capability[]): boolean;
12
+ declare function requireCap(state: WorkflowState, by: string, ...caps: Capability[]): void;
13
+
14
+ export { approversFor as a, requireCap as b, canDo as c, requireCapabilities as d, retireRole as e, rolesWith as f, hasCapability as h, registerRole as r, separationLost as s };
@@ -0,0 +1,14 @@
1
+ import { WorkflowState, Role, Capability } from './types.cjs';
2
+
3
+ declare function registerRole(state: WorkflowState, role: Role, by: string, now?: string): WorkflowState;
4
+ declare function retireRole(state: WorkflowState, roleId: string, by: string, now?: string): WorkflowState;
5
+ declare function hasCapability(role: Role, cap: Capability): boolean;
6
+ declare function rolesWith(state: WorkflowState, cap: Capability): Role[];
7
+ declare function approversFor(state: WorkflowState, gateId: string): Role[];
8
+ declare function requireCapabilities(state: WorkflowState, required: Capability[], exclusive: Capability[]): void;
9
+ declare function separationLost(state: WorkflowState, required: Capability[]): Role[];
10
+ /** `human` may do anything; a role must hold at least one of `caps`; unknown ids may do nothing. */
11
+ declare function canDo(state: WorkflowState, by: string, ...caps: Capability[]): boolean;
12
+ declare function requireCap(state: WorkflowState, by: string, ...caps: Capability[]): void;
13
+
14
+ export { approversFor as a, requireCap as b, canDo as c, requireCapabilities as d, retireRole as e, rolesWith as f, hasCapability as h, registerRole as r, separationLost as s };
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkLPQSNYYT_cjs=require('../chunk-LPQSNYYT.cjs');require('../chunk-5XAKW64K.cjs'),require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"SCRUM_VOCABULARY",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.i}});Object.defineProperty(exports,"canDo",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.a}});Object.defineProperty(exports,"closeSprint",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.k}});Object.defineProperty(exports,"configOf",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.j}});Object.defineProperty(exports,"dailyReport",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.b}});Object.defineProperty(exports,"scrum",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.l}});Object.defineProperty(exports,"scrumCeremonies",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.c}});Object.defineProperty(exports,"scrumMetrics",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.e}});Object.defineProperty(exports,"scrumRoles",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.f}});Object.defineProperty(exports,"scrumRules",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.g}});Object.defineProperty(exports,"scrumStages",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.h}});Object.defineProperty(exports,"validateScrumConfig",{enumerable:true,get:function(){return chunkLPQSNYYT_cjs.d}});//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunk4A4TD4MH_cjs=require('../chunk-4A4TD4MH.cjs');require('../chunk-2IKIBB73.cjs');var chunk23P7C25E_cjs=require('../chunk-23P7C25E.cjs');require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"SCRUM_VOCABULARY",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.h}});Object.defineProperty(exports,"closeSprint",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.j}});Object.defineProperty(exports,"configOf",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.i}});Object.defineProperty(exports,"dailyReport",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.a}});Object.defineProperty(exports,"scrum",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.k}});Object.defineProperty(exports,"scrumCeremonies",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.b}});Object.defineProperty(exports,"scrumMetrics",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.d}});Object.defineProperty(exports,"scrumRoles",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.e}});Object.defineProperty(exports,"scrumRules",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.f}});Object.defineProperty(exports,"scrumStages",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.g}});Object.defineProperty(exports,"validateScrumConfig",{enumerable:true,get:function(){return chunk4A4TD4MH_cjs.c}});Object.defineProperty(exports,"canDo",{enumerable:true,get:function(){return chunk23P7C25E_cjs.n}});//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,5 @@
1
- import { Budget, Policy, WorkflowState, Role, Rule, Stage, ItemStatus, Capability, Methodology, Ceremony, CoreTerm } from '../types.cjs';
1
+ import { Budget, Policy, WorkflowState, Role, Rule, Stage, ItemStatus, Methodology, Ceremony, CoreTerm } from '../types.cjs';
2
+ export { c as canDo } from '../roles-aneKYJ3Z.cjs';
2
3
 
3
4
  interface ScrumConfig {
4
5
  sprintBudget: Budget;
@@ -28,7 +29,6 @@ declare function scrumRules(): Rule[];
28
29
 
29
30
  declare function scrumStages(config: ScrumConfig): Stage[];
30
31
 
31
- declare function canDo(state: WorkflowState, by: string, ...caps: Capability[]): boolean;
32
32
  interface DailyReport {
33
33
  sprint: string | null;
34
34
  goal: string | null;
@@ -56,4 +56,4 @@ declare function configOf(state: WorkflowState): ScrumConfig;
56
56
  declare function closeSprint(state: WorkflowState, reason: "budget" | "review" | "cancel", now: string): WorkflowState;
57
57
  declare function scrum(): Methodology<ScrumConfig>;
58
58
 
59
- export { type DailyReport, SCRUM_VOCABULARY, type ScrumConfig, type ScrumMetrics, canDo, closeSprint, configOf, dailyReport, scrum, scrumCeremonies, scrumMetrics, scrumRoles, scrumRules, scrumStages, validateScrumConfig };
59
+ export { type DailyReport, SCRUM_VOCABULARY, type ScrumConfig, type ScrumMetrics, closeSprint, configOf, dailyReport, scrum, scrumCeremonies, scrumMetrics, scrumRoles, scrumRules, scrumStages, validateScrumConfig };
@@ -1,4 +1,5 @@
1
- import { Budget, Policy, WorkflowState, Role, Rule, Stage, ItemStatus, Capability, Methodology, Ceremony, CoreTerm } from '../types.js';
1
+ import { Budget, Policy, WorkflowState, Role, Rule, Stage, ItemStatus, Methodology, Ceremony, CoreTerm } from '../types.js';
2
+ export { c as canDo } from '../roles-BLBRKhUZ.js';
2
3
 
3
4
  interface ScrumConfig {
4
5
  sprintBudget: Budget;
@@ -28,7 +29,6 @@ declare function scrumRules(): Rule[];
28
29
 
29
30
  declare function scrumStages(config: ScrumConfig): Stage[];
30
31
 
31
- declare function canDo(state: WorkflowState, by: string, ...caps: Capability[]): boolean;
32
32
  interface DailyReport {
33
33
  sprint: string | null;
34
34
  goal: string | null;
@@ -56,4 +56,4 @@ declare function configOf(state: WorkflowState): ScrumConfig;
56
56
  declare function closeSprint(state: WorkflowState, reason: "budget" | "review" | "cancel", now: string): WorkflowState;
57
57
  declare function scrum(): Methodology<ScrumConfig>;
58
58
 
59
- export { type DailyReport, SCRUM_VOCABULARY, type ScrumConfig, type ScrumMetrics, canDo, closeSprint, configOf, dailyReport, scrum, scrumCeremonies, scrumMetrics, scrumRoles, scrumRules, scrumStages, validateScrumConfig };
59
+ export { type DailyReport, SCRUM_VOCABULARY, type ScrumConfig, type ScrumMetrics, closeSprint, configOf, dailyReport, scrum, scrumCeremonies, scrumMetrics, scrumRoles, scrumRules, scrumStages, validateScrumConfig };
@@ -1,2 +1,2 @@
1
- export{i as SCRUM_VOCABULARY,a as canDo,k as closeSprint,j as configOf,b as dailyReport,l as scrum,c as scrumCeremonies,e as scrumMetrics,f as scrumRoles,g as scrumRules,h as scrumStages,d as validateScrumConfig}from'../chunk-ROH3RYBI.mjs';import'../chunk-D7U3ES2L.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{h as SCRUM_VOCABULARY,j as closeSprint,i as configOf,a as dailyReport,k as scrum,b as scrumCeremonies,d as scrumMetrics,e as scrumRoles,f as scrumRules,g as scrumStages,c as validateScrumConfig}from'../chunk-R27STIER.mjs';import'../chunk-ZX4DAMTG.mjs';export{n as canDo}from'../chunk-FLCYD2QF.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
package/dist/types.d.cts CHANGED
@@ -26,6 +26,14 @@ interface Transition {
26
26
  at: string;
27
27
  by: string;
28
28
  }
29
+ /** Change-request: what the change touches and what it costs (waterfall change control). */
30
+ interface ImpactAnalysis {
31
+ summary: string;
32
+ /** phase ids to reopen when the change is approved (each must be baselined or open) */
33
+ reopen: string[];
34
+ /** estimated rework weight (story points / size) */
35
+ weight: number;
36
+ }
29
37
  interface WorkItem {
30
38
  id: string;
31
39
  type: ItemType;
@@ -49,6 +57,10 @@ interface WorkItem {
49
57
  tags?: string[];
50
58
  /** bug / change-request: ids of items whose finished work this invalidates */
51
59
  affects?: string[];
60
+ /** waterfall: Phase.id this item belongs to; questions and follow-ups inherit their parent's */
61
+ phase?: string;
62
+ /** change-request: impact analysis required before the change control board decides */
63
+ impactAnalysis?: ImpactAnalysis;
52
64
  }
53
65
  /** Fields a caller supplies to addItem; the rest are defaulted. */
54
66
  type NewItem = Pick<WorkItem, "id" | "title"> & Partial<Omit<WorkItem, "id" | "title" | "stage" | "status" | "evidence" | "blockers" | "transitions">> & {
@@ -197,12 +209,23 @@ interface Lesson {
197
209
  item?: string;
198
210
  suggestedChange?: LessonChange;
199
211
  }
212
+ /** A deliverable recorded on a phase (gateReview input or engine-generated). */
213
+ interface Produced {
214
+ kind: string;
215
+ ref: string;
216
+ by: string;
217
+ at: string;
218
+ }
200
219
  interface Phase {
201
220
  id: string;
202
221
  name: string;
203
222
  deliverables: string[];
204
223
  gate: Gate;
205
224
  status: "pending" | "open" | "baselined" | "reopened";
225
+ /** planned budget; spent is tracked on the Iteration kickoff opens for the phase */
226
+ budget?: Budget;
227
+ /** phase-level deliverables (item evidence counts too) */
228
+ produced?: Produced[];
206
229
  }
207
230
  interface Baseline {
208
231
  phase: string;
@@ -222,6 +245,8 @@ interface WorkflowState {
222
245
  iterations: Iteration[];
223
246
  phases?: Phase[];
224
247
  baseline?: Baseline;
248
+ /** waterfall: every baseline ever taken, oldest first; `baseline` is the last one */
249
+ baselines?: Baseline[];
225
250
  events: Event[];
226
251
  accounting: Accounting[];
227
252
  pending: PendingHuman[];
@@ -287,13 +312,23 @@ type CeremonyInput = {
287
312
  type Ceremony = (state: WorkflowState, input: CeremonyInput) => ApplyResult;
288
313
  interface PlannerOptions {
289
314
  schedulerMode: "level" | "throughput";
290
- /** Stage a todo item is pulled into when dispatched; omitted = stay in its current stage. */
291
- dispatchStage?: string;
315
+ /** Stage a todo item is pulled into when dispatched; a function decides per item; omitted/undefined = stay in its current stage. */
316
+ dispatchStage?: string | ((item: WorkItem) => string | undefined);
292
317
  concurrencyCap?: number;
293
318
  fairnessPolicy?: "none" | "aging";
294
319
  maxDeferralRounds?: number;
295
320
  deadlineStrategy?: "earliest-first" | "latest-first";
296
321
  weightStrategy?: "higher-first" | "lower-first";
322
+ /** Priority the planner orders by; defaults to item.priority. */
323
+ priorityOf?(item: WorkItem): number | undefined;
324
+ /** Orders items of equal priority (after deadline/weight strategies); e.g. class of service, then age. */
325
+ tieBreaker?(a: WorkItem, b: WorkItem): number;
326
+ /** Statuses that occupy a stage's wipLimit slot; default ["in_progress"]. */
327
+ wipCounts?: ItemStatus[];
328
+ /** Per-item replacement for the target stage's wipLimit (e.g. an expedite bypass); undefined = no limit. */
329
+ wipLimitOf?(stage: Stage, item: WorkItem): number | undefined;
330
+ /** Role id to dispatch a todo item to (e.g. the phase's deliverer); undefined = default (item.role, then reviewer/deliverer by capability). */
331
+ roleFor?(item: WorkItem): string | undefined;
297
332
  }
298
333
  interface Methodology<C = unknown> {
299
334
  name: MethodologyName;
@@ -314,7 +349,11 @@ interface Methodology<C = unknown> {
314
349
  };
315
350
  /** Called after complete(); lets the methodology react (e.g. close a sprint when the budget is gone). */
316
351
  afterComplete?(state: WorkflowState, itemId: string, now: string): WorkflowState;
352
+ /** Methodology-specific status for hosts (e.g. cadences due); printed by `exwf status`. */
353
+ report?(state: WorkflowState): Record<string, unknown>;
354
+ /** Called by decide() after a pending entry is resolved; lets the methodology act on it (e.g. baseline a phase gate, apply a change-request decision). */
355
+ afterDecide?(state: WorkflowState, entry: PendingHuman, decision: "approve" | "reject", by: string, note: string, now: string): WorkflowState;
317
356
  }
318
357
  type ErrorCode = "unknown-item" | "duplicate-item" | "unknown-role" | "duplicate-role" | "unknown-stage" | "missing-capability" | "exclusive-capability" | "role-has-open-items" | "invalid-transition" | "policy-unmet" | "gate-unmet" | "conflict-of-interest" | "handoff-invalid" | "accounting-invalid" | "rule-violation" | "planner-error" | "no-op" | "unknown-pending" | "unknown-ceremony" | "state-version" | "config-invalid" | "budget-exhausted" | "invalid-input";
319
358
 
320
- export type { Accounting, Action, ApplyResult, Baseline, Blocker, Brief, Budget, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, ErrorCode, Event, Evidence, Gate, GateRequirement, Handoff, ItemStatus, ItemType, Iteration, Lesson, LessonChange, Methodology, MethodologyName, ModelTier, NewItem, PendingHuman, Phase, PlannerOptions, Policy, Role, Rule, Stage, Transition, Verdict, Violation, WorkItem, WorkflowState };
359
+ export type { Accounting, Action, ApplyResult, Baseline, Blocker, Brief, Budget, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, ErrorCode, Event, Evidence, Gate, GateRequirement, Handoff, ImpactAnalysis, ItemStatus, ItemType, Iteration, Lesson, LessonChange, Methodology, MethodologyName, ModelTier, NewItem, PendingHuman, Phase, PlannerOptions, Policy, Produced, Role, Rule, Stage, Transition, Verdict, Violation, WorkItem, WorkflowState };
package/dist/types.d.ts CHANGED
@@ -26,6 +26,14 @@ interface Transition {
26
26
  at: string;
27
27
  by: string;
28
28
  }
29
+ /** Change-request: what the change touches and what it costs (waterfall change control). */
30
+ interface ImpactAnalysis {
31
+ summary: string;
32
+ /** phase ids to reopen when the change is approved (each must be baselined or open) */
33
+ reopen: string[];
34
+ /** estimated rework weight (story points / size) */
35
+ weight: number;
36
+ }
29
37
  interface WorkItem {
30
38
  id: string;
31
39
  type: ItemType;
@@ -49,6 +57,10 @@ interface WorkItem {
49
57
  tags?: string[];
50
58
  /** bug / change-request: ids of items whose finished work this invalidates */
51
59
  affects?: string[];
60
+ /** waterfall: Phase.id this item belongs to; questions and follow-ups inherit their parent's */
61
+ phase?: string;
62
+ /** change-request: impact analysis required before the change control board decides */
63
+ impactAnalysis?: ImpactAnalysis;
52
64
  }
53
65
  /** Fields a caller supplies to addItem; the rest are defaulted. */
54
66
  type NewItem = Pick<WorkItem, "id" | "title"> & Partial<Omit<WorkItem, "id" | "title" | "stage" | "status" | "evidence" | "blockers" | "transitions">> & {
@@ -197,12 +209,23 @@ interface Lesson {
197
209
  item?: string;
198
210
  suggestedChange?: LessonChange;
199
211
  }
212
+ /** A deliverable recorded on a phase (gateReview input or engine-generated). */
213
+ interface Produced {
214
+ kind: string;
215
+ ref: string;
216
+ by: string;
217
+ at: string;
218
+ }
200
219
  interface Phase {
201
220
  id: string;
202
221
  name: string;
203
222
  deliverables: string[];
204
223
  gate: Gate;
205
224
  status: "pending" | "open" | "baselined" | "reopened";
225
+ /** planned budget; spent is tracked on the Iteration kickoff opens for the phase */
226
+ budget?: Budget;
227
+ /** phase-level deliverables (item evidence counts too) */
228
+ produced?: Produced[];
206
229
  }
207
230
  interface Baseline {
208
231
  phase: string;
@@ -222,6 +245,8 @@ interface WorkflowState {
222
245
  iterations: Iteration[];
223
246
  phases?: Phase[];
224
247
  baseline?: Baseline;
248
+ /** waterfall: every baseline ever taken, oldest first; `baseline` is the last one */
249
+ baselines?: Baseline[];
225
250
  events: Event[];
226
251
  accounting: Accounting[];
227
252
  pending: PendingHuman[];
@@ -287,13 +312,23 @@ type CeremonyInput = {
287
312
  type Ceremony = (state: WorkflowState, input: CeremonyInput) => ApplyResult;
288
313
  interface PlannerOptions {
289
314
  schedulerMode: "level" | "throughput";
290
- /** Stage a todo item is pulled into when dispatched; omitted = stay in its current stage. */
291
- dispatchStage?: string;
315
+ /** Stage a todo item is pulled into when dispatched; a function decides per item; omitted/undefined = stay in its current stage. */
316
+ dispatchStage?: string | ((item: WorkItem) => string | undefined);
292
317
  concurrencyCap?: number;
293
318
  fairnessPolicy?: "none" | "aging";
294
319
  maxDeferralRounds?: number;
295
320
  deadlineStrategy?: "earliest-first" | "latest-first";
296
321
  weightStrategy?: "higher-first" | "lower-first";
322
+ /** Priority the planner orders by; defaults to item.priority. */
323
+ priorityOf?(item: WorkItem): number | undefined;
324
+ /** Orders items of equal priority (after deadline/weight strategies); e.g. class of service, then age. */
325
+ tieBreaker?(a: WorkItem, b: WorkItem): number;
326
+ /** Statuses that occupy a stage's wipLimit slot; default ["in_progress"]. */
327
+ wipCounts?: ItemStatus[];
328
+ /** Per-item replacement for the target stage's wipLimit (e.g. an expedite bypass); undefined = no limit. */
329
+ wipLimitOf?(stage: Stage, item: WorkItem): number | undefined;
330
+ /** Role id to dispatch a todo item to (e.g. the phase's deliverer); undefined = default (item.role, then reviewer/deliverer by capability). */
331
+ roleFor?(item: WorkItem): string | undefined;
297
332
  }
298
333
  interface Methodology<C = unknown> {
299
334
  name: MethodologyName;
@@ -314,7 +349,11 @@ interface Methodology<C = unknown> {
314
349
  };
315
350
  /** Called after complete(); lets the methodology react (e.g. close a sprint when the budget is gone). */
316
351
  afterComplete?(state: WorkflowState, itemId: string, now: string): WorkflowState;
352
+ /** Methodology-specific status for hosts (e.g. cadences due); printed by `exwf status`. */
353
+ report?(state: WorkflowState): Record<string, unknown>;
354
+ /** Called by decide() after a pending entry is resolved; lets the methodology act on it (e.g. baseline a phase gate, apply a change-request decision). */
355
+ afterDecide?(state: WorkflowState, entry: PendingHuman, decision: "approve" | "reject", by: string, note: string, now: string): WorkflowState;
317
356
  }
318
357
  type ErrorCode = "unknown-item" | "duplicate-item" | "unknown-role" | "duplicate-role" | "unknown-stage" | "missing-capability" | "exclusive-capability" | "role-has-open-items" | "invalid-transition" | "policy-unmet" | "gate-unmet" | "conflict-of-interest" | "handoff-invalid" | "accounting-invalid" | "rule-violation" | "planner-error" | "no-op" | "unknown-pending" | "unknown-ceremony" | "state-version" | "config-invalid" | "budget-exhausted" | "invalid-input";
319
358
 
320
- export type { Accounting, Action, ApplyResult, Baseline, Blocker, Brief, Budget, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, ErrorCode, Event, Evidence, Gate, GateRequirement, Handoff, ItemStatus, ItemType, Iteration, Lesson, LessonChange, Methodology, MethodologyName, ModelTier, NewItem, PendingHuman, Phase, PlannerOptions, Policy, Role, Rule, Stage, Transition, Verdict, Violation, WorkItem, WorkflowState };
359
+ export type { Accounting, Action, ApplyResult, Baseline, Blocker, Brief, Budget, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, ErrorCode, Event, Evidence, Gate, GateRequirement, Handoff, ImpactAnalysis, ItemStatus, ItemType, Iteration, Lesson, LessonChange, Methodology, MethodologyName, ModelTier, NewItem, PendingHuman, Phase, PlannerOptions, Policy, Produced, Role, Rule, Stage, Transition, Verdict, Violation, WorkItem, WorkflowState };
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkTMKCALFT_cjs=require('../chunk-TMKCALFT.cjs');require('../chunk-2IKIBB73.cjs'),require('../chunk-23P7C25E.cjs'),require('../chunk-S3BXVHO7.cjs');Object.defineProperty(exports,"CHANGE_GATE",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.e}});Object.defineProperty(exports,"DEFAULT_DELIVERABLES",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.b}});Object.defineProperty(exports,"DEFAULT_DELIVER_BY",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.c}});Object.defineProperty(exports,"DEFAULT_PHASE_IDS",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.a}});Object.defineProperty(exports,"DONE",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.k}});Object.defineProperty(exports,"GATE_ID",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.d}});Object.defineProperty(exports,"REVIEW",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.j}});Object.defineProperty(exports,"WATERFALL_VOCABULARY",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.K}});Object.defineProperty(exports,"WORK",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.i}});Object.defineProperty(exports,"approveChange",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.z}});Object.defineProperty(exports,"baselinePhase",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.x}});Object.defineProperty(exports,"configOf",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.g}});Object.defineProperty(exports,"currentPhase",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.s}});Object.defineProperty(exports,"defaultPhases",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.f}});Object.defineProperty(exports,"deliverRoleFor",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.L}});Object.defineProperty(exports,"getPhase",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.o}});Object.defineProperty(exports,"isFrozen",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.t}});Object.defineProperty(exports,"itemsInPhase",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.q}});Object.defineProperty(exports,"lastToPhase",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.w}});Object.defineProperty(exports,"missingDeliverables",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.v}});Object.defineProperty(exports,"missingTraces",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.C}});Object.defineProperty(exports,"openPhase",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.r}});Object.defineProperty(exports,"phaseIndex",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.n}});Object.defineProperty(exports,"phaseOf",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.p}});Object.defineProperty(exports,"phaseReport",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.M}});Object.defineProperty(exports,"phasesOf",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.l}});Object.defineProperty(exports,"producedKinds",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.u}});Object.defineProperty(exports,"rejectChange",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.A}});Object.defineProperty(exports,"reopenPhases",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.y}});Object.defineProperty(exports,"traceabilityMatrix",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.B}});Object.defineProperty(exports,"validateWaterfallConfig",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.h}});Object.defineProperty(exports,"wantPhase",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.D}});Object.defineProperty(exports,"waterfall",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.N}});Object.defineProperty(exports,"waterfallAfterDecide",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.F}});Object.defineProperty(exports,"waterfallCeremonies",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.E}});Object.defineProperty(exports,"waterfallMetrics",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.G}});Object.defineProperty(exports,"waterfallRoles",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.H}});Object.defineProperty(exports,"waterfallRules",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.I}});Object.defineProperty(exports,"waterfallStages",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.J}});Object.defineProperty(exports,"withPhases",{enumerable:true,get:function(){return chunkTMKCALFT_cjs.m}});//# sourceMappingURL=index.cjs.map
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,148 @@
1
+ import { Gate, Budget, GateRequirement, WorkflowState, Phase, WorkItem, Stage, Role, Rule, CeremonyInput, PendingHuman, Methodology, Ceremony, CoreTerm } from '../types.cjs';
2
+
3
+ interface WaterfallPhaseConfig {
4
+ id: string;
5
+ name: string;
6
+ deliverables: string[];
7
+ gate: Gate;
8
+ budget?: Budget;
9
+ /** role id that delivers this phase's items; default: the first role with "deliver" */
10
+ deliverBy?: string;
11
+ }
12
+ interface WaterfallConfig {
13
+ phases: WaterfallPhaseConfig[];
14
+ changeControl: {
15
+ requiresImpactAnalysis: boolean;
16
+ approvers: GateRequirement[];
17
+ };
18
+ /** phase ids: every item of `from` must trace to an item of each `to` phase before that phase's gate */
19
+ traceability: {
20
+ from: string;
21
+ to: string[];
22
+ };
23
+ humanGates: "all" | string[];
24
+ }
25
+ declare const DEFAULT_PHASE_IDS: readonly string[];
26
+ declare const DEFAULT_DELIVERABLES: Record<string, string[]>;
27
+ declare const DEFAULT_DELIVER_BY: Record<string, string>;
28
+ declare const GATE_ID: (id: string) => string;
29
+ declare const CHANGE_GATE = "change-control";
30
+ declare function defaultPhases(): WaterfallPhaseConfig[];
31
+ declare function configOf(state: WorkflowState): WaterfallConfig;
32
+ declare function validateWaterfallConfig(raw: unknown): WaterfallConfig;
33
+
34
+ declare const WORK = "work";
35
+ declare const REVIEW = "review";
36
+ declare const DONE = "done";
37
+ /** state.phases, or the config phases as pending (before the first ceremony touches them). */
38
+ declare function phasesOf(state: WorkflowState): Phase[];
39
+ declare function withPhases(state: WorkflowState, phases: Phase[]): WorkflowState;
40
+ declare function phaseIndex(state: WorkflowState, id: string): number;
41
+ declare function getPhase(state: WorkflowState, id: string): Phase;
42
+ /** The item's phase, inherited from its parent chain (questions, follow-ups, retro items). */
43
+ declare function phaseOf(state: WorkflowState, item: WorkItem): string | undefined;
44
+ declare function itemsInPhase(state: WorkflowState, phaseId: string): WorkItem[];
45
+ declare function openPhase(state: WorkflowState): Phase | undefined;
46
+ /** First phase in order that is not baselined: the one to kick off (or the open one). */
47
+ declare function currentPhase(state: WorkflowState): Phase | undefined;
48
+ declare function isFrozen(state: WorkflowState, item: WorkItem): boolean;
49
+ declare function producedKinds(state: WorkflowState, phase: Phase): Set<string>;
50
+ /** Deliverables (and gate evidence kinds) still missing, in declaration order. */
51
+ declare function missingDeliverables(state: WorkflowState, phase: Phase, extra?: string[]): string[];
52
+ /** The traceability `to` phase that comes last in phase order (where the matrix must be complete). */
53
+ declare function lastToPhase(state: WorkflowState): string | undefined;
54
+
55
+ /** Every phase's items share the same three steps; the phase is the unit of governance. */
56
+ declare function waterfallStages(_config: WaterfallConfig): Stage[];
57
+
58
+ /** Order matters: the first role with "deliver" is the fallback deliverer for phases without deliverBy. */
59
+ declare function waterfallRoles(config: WaterfallConfig): Role[];
60
+
61
+ declare function waterfallRules(): Rule[];
62
+
63
+ interface WaterfallMetrics {
64
+ phaseCompletion: Record<string, number>;
65
+ budgetPlanned: Record<string, number>;
66
+ budgetSpent: Record<string, number>;
67
+ scheduleVariance: Record<string, number>;
68
+ requirementCoverage: number;
69
+ requirementsTraced: number;
70
+ requirementsTotal: number;
71
+ defectsPerPhase: Record<string, number>;
72
+ changeRequests: number;
73
+ changesApproved: number;
74
+ changesRejected: number;
75
+ changeApprovalRate: number;
76
+ reworkWeight: number;
77
+ phasesReopened: number;
78
+ }
79
+ /** Phase metrics replayed from events alone (membership from item.added, spend from item.completed). */
80
+ declare function waterfallMetrics(state: WorkflowState): WaterfallMetrics;
81
+
82
+ declare function approveChange(state: WorkflowState, changeId: string, by: string, note: string, now: string): WorkflowState;
83
+ declare function rejectChange(state: WorkflowState, changeId: string, by: string, note: string, now: string): WorkflowState;
84
+
85
+ /** input.phase as an existing phase. */
86
+ declare function wantPhase(state: WorkflowState, input: CeremonyInput, ceremony: string): Phase;
87
+
88
+ declare function waterfallCeremonies(methodology: () => Methodology): Record<string, Ceremony>;
89
+ /** decide() hook: a phase gate's human decision baselines the phase or records the failure. */
90
+ declare function waterfallAfterDecide(state: WorkflowState, entry: PendingHuman, decision: "approve" | "reject", by: string, note: string, now: string): WorkflowState;
91
+
92
+ interface TraceRow {
93
+ item: string;
94
+ /** to-phase id → ids of linked items in that phase */
95
+ links: Record<string, string[]>;
96
+ }
97
+ interface TraceabilityMatrix {
98
+ from: string;
99
+ to: string[];
100
+ rows: TraceRow[];
101
+ missing: Array<{
102
+ item: string;
103
+ phases: string[];
104
+ }>;
105
+ coverage: {
106
+ traced: number;
107
+ total: number;
108
+ };
109
+ }
110
+ declare function traceabilityMatrix(state: WorkflowState): TraceabilityMatrix;
111
+ /** Ids of `from` items with no link into `toPhase`. */
112
+ declare function missingTraces(state: WorkflowState, toPhase: string): string[];
113
+
114
+ /** Pass the phase gate: freeze its items, record the baseline, close its iteration. */
115
+ declare function baselinePhase(state: WorkflowState, phaseId: string, approvedBy: string[], now: string): WorkflowState;
116
+ interface ReopenResult {
117
+ state: WorkflowState;
118
+ reopened: string[];
119
+ suspended: string | null;
120
+ }
121
+ /** Change-control approval: reopen the listed baselined phases; a later open phase is suspended until they are re-baselined. */
122
+ declare function reopenPhases(state: WorkflowState, ids: string[], now: string): ReopenResult;
123
+
124
+ declare const WATERFALL_VOCABULARY: Record<CoreTerm, string>;
125
+ /** The role that delivers the item's phase (config deliverBy); undefined = the planner's default deliverer. */
126
+ declare function deliverRoleFor(state: WorkflowState, item: WorkItem): string | undefined;
127
+ interface PhaseReportRow {
128
+ id: string;
129
+ name: string;
130
+ status: string;
131
+ items: number;
132
+ done: number;
133
+ missingDeliverables: string[];
134
+ readyForGate: boolean;
135
+ }
136
+ interface PhaseReport {
137
+ phases: PhaseReportRow[];
138
+ current: string | null;
139
+ open: string | null;
140
+ pendingGates: Array<{
141
+ pending: string;
142
+ gate: string;
143
+ }>;
144
+ }
145
+ declare function phaseReport(state: WorkflowState): PhaseReport;
146
+ declare function waterfall(): Methodology<WaterfallConfig>;
147
+
148
+ export { CHANGE_GATE, DEFAULT_DELIVERABLES, DEFAULT_DELIVER_BY, DEFAULT_PHASE_IDS, DONE, GATE_ID, type PhaseReport, type PhaseReportRow, REVIEW, type ReopenResult, type TraceRow, type TraceabilityMatrix, WATERFALL_VOCABULARY, WORK, type WaterfallConfig, type WaterfallMetrics, type WaterfallPhaseConfig, approveChange, baselinePhase, configOf, currentPhase, defaultPhases, deliverRoleFor, getPhase, isFrozen, itemsInPhase, lastToPhase, missingDeliverables, missingTraces, openPhase, phaseIndex, phaseOf, phaseReport, phasesOf, producedKinds, rejectChange, reopenPhases, traceabilityMatrix, validateWaterfallConfig, wantPhase, waterfall, waterfallAfterDecide, waterfallCeremonies, waterfallMetrics, waterfallRoles, waterfallRules, waterfallStages, withPhases };
@@ -0,0 +1,148 @@
1
+ import { Gate, Budget, GateRequirement, WorkflowState, Phase, WorkItem, Stage, Role, Rule, CeremonyInput, PendingHuman, Methodology, Ceremony, CoreTerm } from '../types.js';
2
+
3
+ interface WaterfallPhaseConfig {
4
+ id: string;
5
+ name: string;
6
+ deliverables: string[];
7
+ gate: Gate;
8
+ budget?: Budget;
9
+ /** role id that delivers this phase's items; default: the first role with "deliver" */
10
+ deliverBy?: string;
11
+ }
12
+ interface WaterfallConfig {
13
+ phases: WaterfallPhaseConfig[];
14
+ changeControl: {
15
+ requiresImpactAnalysis: boolean;
16
+ approvers: GateRequirement[];
17
+ };
18
+ /** phase ids: every item of `from` must trace to an item of each `to` phase before that phase's gate */
19
+ traceability: {
20
+ from: string;
21
+ to: string[];
22
+ };
23
+ humanGates: "all" | string[];
24
+ }
25
+ declare const DEFAULT_PHASE_IDS: readonly string[];
26
+ declare const DEFAULT_DELIVERABLES: Record<string, string[]>;
27
+ declare const DEFAULT_DELIVER_BY: Record<string, string>;
28
+ declare const GATE_ID: (id: string) => string;
29
+ declare const CHANGE_GATE = "change-control";
30
+ declare function defaultPhases(): WaterfallPhaseConfig[];
31
+ declare function configOf(state: WorkflowState): WaterfallConfig;
32
+ declare function validateWaterfallConfig(raw: unknown): WaterfallConfig;
33
+
34
+ declare const WORK = "work";
35
+ declare const REVIEW = "review";
36
+ declare const DONE = "done";
37
+ /** state.phases, or the config phases as pending (before the first ceremony touches them). */
38
+ declare function phasesOf(state: WorkflowState): Phase[];
39
+ declare function withPhases(state: WorkflowState, phases: Phase[]): WorkflowState;
40
+ declare function phaseIndex(state: WorkflowState, id: string): number;
41
+ declare function getPhase(state: WorkflowState, id: string): Phase;
42
+ /** The item's phase, inherited from its parent chain (questions, follow-ups, retro items). */
43
+ declare function phaseOf(state: WorkflowState, item: WorkItem): string | undefined;
44
+ declare function itemsInPhase(state: WorkflowState, phaseId: string): WorkItem[];
45
+ declare function openPhase(state: WorkflowState): Phase | undefined;
46
+ /** First phase in order that is not baselined: the one to kick off (or the open one). */
47
+ declare function currentPhase(state: WorkflowState): Phase | undefined;
48
+ declare function isFrozen(state: WorkflowState, item: WorkItem): boolean;
49
+ declare function producedKinds(state: WorkflowState, phase: Phase): Set<string>;
50
+ /** Deliverables (and gate evidence kinds) still missing, in declaration order. */
51
+ declare function missingDeliverables(state: WorkflowState, phase: Phase, extra?: string[]): string[];
52
+ /** The traceability `to` phase that comes last in phase order (where the matrix must be complete). */
53
+ declare function lastToPhase(state: WorkflowState): string | undefined;
54
+
55
+ /** Every phase's items share the same three steps; the phase is the unit of governance. */
56
+ declare function waterfallStages(_config: WaterfallConfig): Stage[];
57
+
58
+ /** Order matters: the first role with "deliver" is the fallback deliverer for phases without deliverBy. */
59
+ declare function waterfallRoles(config: WaterfallConfig): Role[];
60
+
61
+ declare function waterfallRules(): Rule[];
62
+
63
+ interface WaterfallMetrics {
64
+ phaseCompletion: Record<string, number>;
65
+ budgetPlanned: Record<string, number>;
66
+ budgetSpent: Record<string, number>;
67
+ scheduleVariance: Record<string, number>;
68
+ requirementCoverage: number;
69
+ requirementsTraced: number;
70
+ requirementsTotal: number;
71
+ defectsPerPhase: Record<string, number>;
72
+ changeRequests: number;
73
+ changesApproved: number;
74
+ changesRejected: number;
75
+ changeApprovalRate: number;
76
+ reworkWeight: number;
77
+ phasesReopened: number;
78
+ }
79
+ /** Phase metrics replayed from events alone (membership from item.added, spend from item.completed). */
80
+ declare function waterfallMetrics(state: WorkflowState): WaterfallMetrics;
81
+
82
+ declare function approveChange(state: WorkflowState, changeId: string, by: string, note: string, now: string): WorkflowState;
83
+ declare function rejectChange(state: WorkflowState, changeId: string, by: string, note: string, now: string): WorkflowState;
84
+
85
+ /** input.phase as an existing phase. */
86
+ declare function wantPhase(state: WorkflowState, input: CeremonyInput, ceremony: string): Phase;
87
+
88
+ declare function waterfallCeremonies(methodology: () => Methodology): Record<string, Ceremony>;
89
+ /** decide() hook: a phase gate's human decision baselines the phase or records the failure. */
90
+ declare function waterfallAfterDecide(state: WorkflowState, entry: PendingHuman, decision: "approve" | "reject", by: string, note: string, now: string): WorkflowState;
91
+
92
+ interface TraceRow {
93
+ item: string;
94
+ /** to-phase id → ids of linked items in that phase */
95
+ links: Record<string, string[]>;
96
+ }
97
+ interface TraceabilityMatrix {
98
+ from: string;
99
+ to: string[];
100
+ rows: TraceRow[];
101
+ missing: Array<{
102
+ item: string;
103
+ phases: string[];
104
+ }>;
105
+ coverage: {
106
+ traced: number;
107
+ total: number;
108
+ };
109
+ }
110
+ declare function traceabilityMatrix(state: WorkflowState): TraceabilityMatrix;
111
+ /** Ids of `from` items with no link into `toPhase`. */
112
+ declare function missingTraces(state: WorkflowState, toPhase: string): string[];
113
+
114
+ /** Pass the phase gate: freeze its items, record the baseline, close its iteration. */
115
+ declare function baselinePhase(state: WorkflowState, phaseId: string, approvedBy: string[], now: string): WorkflowState;
116
+ interface ReopenResult {
117
+ state: WorkflowState;
118
+ reopened: string[];
119
+ suspended: string | null;
120
+ }
121
+ /** Change-control approval: reopen the listed baselined phases; a later open phase is suspended until they are re-baselined. */
122
+ declare function reopenPhases(state: WorkflowState, ids: string[], now: string): ReopenResult;
123
+
124
+ declare const WATERFALL_VOCABULARY: Record<CoreTerm, string>;
125
+ /** The role that delivers the item's phase (config deliverBy); undefined = the planner's default deliverer. */
126
+ declare function deliverRoleFor(state: WorkflowState, item: WorkItem): string | undefined;
127
+ interface PhaseReportRow {
128
+ id: string;
129
+ name: string;
130
+ status: string;
131
+ items: number;
132
+ done: number;
133
+ missingDeliverables: string[];
134
+ readyForGate: boolean;
135
+ }
136
+ interface PhaseReport {
137
+ phases: PhaseReportRow[];
138
+ current: string | null;
139
+ open: string | null;
140
+ pendingGates: Array<{
141
+ pending: string;
142
+ gate: string;
143
+ }>;
144
+ }
145
+ declare function phaseReport(state: WorkflowState): PhaseReport;
146
+ declare function waterfall(): Methodology<WaterfallConfig>;
147
+
148
+ export { CHANGE_GATE, DEFAULT_DELIVERABLES, DEFAULT_DELIVER_BY, DEFAULT_PHASE_IDS, DONE, GATE_ID, type PhaseReport, type PhaseReportRow, REVIEW, type ReopenResult, type TraceRow, type TraceabilityMatrix, WATERFALL_VOCABULARY, WORK, type WaterfallConfig, type WaterfallMetrics, type WaterfallPhaseConfig, approveChange, baselinePhase, configOf, currentPhase, defaultPhases, deliverRoleFor, getPhase, isFrozen, itemsInPhase, lastToPhase, missingDeliverables, missingTraces, openPhase, phaseIndex, phaseOf, phaseReport, phasesOf, producedKinds, rejectChange, reopenPhases, traceabilityMatrix, validateWaterfallConfig, wantPhase, waterfall, waterfallAfterDecide, waterfallCeremonies, waterfallMetrics, waterfallRoles, waterfallRules, waterfallStages, withPhases };
@@ -0,0 +1,2 @@
1
+ export{e as CHANGE_GATE,b as DEFAULT_DELIVERABLES,c as DEFAULT_DELIVER_BY,a as DEFAULT_PHASE_IDS,k as DONE,d as GATE_ID,j as REVIEW,K as WATERFALL_VOCABULARY,i as WORK,z as approveChange,x as baselinePhase,g as configOf,s as currentPhase,f as defaultPhases,L as deliverRoleFor,o as getPhase,t as isFrozen,q as itemsInPhase,w as lastToPhase,v as missingDeliverables,C as missingTraces,r as openPhase,n as phaseIndex,p as phaseOf,M as phaseReport,l as phasesOf,u as producedKinds,A as rejectChange,y as reopenPhases,B as traceabilityMatrix,h as validateWaterfallConfig,D as wantPhase,N as waterfall,F as waterfallAfterDecide,E as waterfallCeremonies,G as waterfallMetrics,H as waterfallRoles,I as waterfallRules,J as waterfallStages,m as withPhases}from'../chunk-BJEOTG6P.mjs';import'../chunk-ZX4DAMTG.mjs';import'../chunk-FLCYD2QF.mjs';import'../chunk-2FRRD6A3.mjs';//# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}