ex-workflow 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +145 -13
- package/dist/adapters/index.cjs +1 -1
- package/dist/adapters/index.d.cts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/adapters/index.mjs +1 -1
- package/dist/{budget-Gckmqj74.d.ts → budget-BuQ9GWsg.d.ts} +1 -1
- package/dist/{budget-Bm839Qw0.d.cts → budget-DDqQQIgp.d.cts} +1 -1
- package/dist/{chunk-VXOZIP77.cjs → chunk-2FBA7RBS.cjs} +2 -2
- package/dist/{chunk-VXOZIP77.cjs.map → chunk-2FBA7RBS.cjs.map} +1 -1
- package/dist/chunk-3S7F5QXK.mjs +2 -0
- package/dist/{chunk-BYPFTO7P.mjs.map → chunk-3S7F5QXK.mjs.map} +1 -1
- package/dist/{chunk-K4VSMIJZ.cjs → chunk-3ZUBCA7Q.cjs} +2 -2
- package/dist/{chunk-K4VSMIJZ.cjs.map → chunk-3ZUBCA7Q.cjs.map} +1 -1
- package/dist/chunk-4F5HZLKD.cjs +2 -0
- package/dist/{chunk-SFYUJQYW.cjs.map → chunk-4F5HZLKD.cjs.map} +1 -1
- package/dist/{chunk-4HG6A3SF.mjs → chunk-5DCOXGRW.mjs} +2 -2
- package/dist/{chunk-4HG6A3SF.mjs.map → chunk-5DCOXGRW.mjs.map} +1 -1
- package/dist/chunk-5GXB6GMX.mjs +2 -0
- package/dist/chunk-5GXB6GMX.mjs.map +1 -0
- package/dist/chunk-5ZGNEY2I.mjs +2 -0
- package/dist/{chunk-32NVJV5C.mjs.map → chunk-5ZGNEY2I.mjs.map} +1 -1
- package/dist/chunk-6PFJYRM7.cjs +2 -0
- package/dist/chunk-6PFJYRM7.cjs.map +1 -0
- package/dist/{chunk-W2P27645.cjs → chunk-BANKVCYY.cjs} +2 -2
- package/dist/{chunk-W2P27645.cjs.map → chunk-BANKVCYY.cjs.map} +1 -1
- package/dist/chunk-BD665RYK.mjs +2 -0
- package/dist/chunk-BD665RYK.mjs.map +1 -0
- package/dist/chunk-COPYGMHE.mjs +2 -0
- package/dist/chunk-COPYGMHE.mjs.map +1 -0
- package/dist/{chunk-3O5MPAJT.cjs → chunk-CVGEIXW6.cjs} +2 -2
- package/dist/{chunk-3O5MPAJT.cjs.map → chunk-CVGEIXW6.cjs.map} +1 -1
- package/dist/chunk-CX2E7ZTQ.mjs +2 -0
- package/dist/{chunk-JNLWI4JM.mjs.map → chunk-CX2E7ZTQ.mjs.map} +1 -1
- package/dist/chunk-DVFTTBCT.cjs +3 -0
- package/dist/chunk-DVFTTBCT.cjs.map +1 -0
- package/dist/{chunk-U3RU5LOF.cjs → chunk-EQXYFHHD.cjs} +2 -2
- package/dist/{chunk-U3RU5LOF.cjs.map → chunk-EQXYFHHD.cjs.map} +1 -1
- package/dist/{chunk-OVR5CK3R.cjs → chunk-H26KXQ3I.cjs} +2 -2
- package/dist/{chunk-OVR5CK3R.cjs.map → chunk-H26KXQ3I.cjs.map} +1 -1
- package/dist/chunk-ILDXZWEL.mjs +2 -0
- package/dist/{chunk-OZAYOPLB.mjs.map → chunk-ILDXZWEL.mjs.map} +1 -1
- package/dist/{chunk-RXY434DX.cjs → chunk-KA6DVHO5.cjs} +4 -4
- package/dist/{chunk-RXY434DX.cjs.map → chunk-KA6DVHO5.cjs.map} +1 -1
- package/dist/chunk-KLOSFZFK.cjs +2 -0
- package/dist/chunk-KLOSFZFK.cjs.map +1 -0
- package/dist/{chunk-WPVL27G4.mjs → chunk-LG23WXAP.mjs} +2 -2
- package/dist/{chunk-WPVL27G4.mjs.map → chunk-LG23WXAP.mjs.map} +1 -1
- package/dist/chunk-MU26QW32.cjs +2 -0
- package/dist/chunk-MU26QW32.cjs.map +1 -0
- package/dist/chunk-OEHVWRJG.mjs +2 -0
- package/dist/{chunk-7EF47R2J.mjs.map → chunk-OEHVWRJG.mjs.map} +1 -1
- package/dist/{chunk-3GKYL6VB.mjs → chunk-ONVAUZOD.mjs} +3 -3
- package/dist/{chunk-3GKYL6VB.mjs.map → chunk-ONVAUZOD.mjs.map} +1 -1
- package/dist/{chunk-LIATP6LY.mjs → chunk-PFHVB2WT.mjs} +2 -2
- package/dist/{chunk-LIATP6LY.mjs.map → chunk-PFHVB2WT.mjs.map} +1 -1
- package/dist/chunk-QJMOCISZ.mjs +3 -0
- package/dist/chunk-QJMOCISZ.mjs.map +1 -0
- package/dist/chunk-RGHM3JJM.cjs +2 -0
- package/dist/chunk-RGHM3JJM.cjs.map +1 -0
- package/dist/chunk-UMG3WOD7.cjs +2 -0
- package/dist/{chunk-QAENYYU6.cjs.map → chunk-UMG3WOD7.cjs.map} +1 -1
- package/dist/{chunk-6D6FL3XK.mjs → chunk-UT7QV6CE.mjs} +2 -2
- package/dist/{chunk-6D6FL3XK.mjs.map → chunk-UT7QV6CE.mjs.map} +1 -1
- package/dist/chunk-WU5JELOM.mjs +2 -0
- package/dist/chunk-WU5JELOM.mjs.map +1 -0
- package/dist/{chunk-IIEKK2S3.cjs → chunk-YGCNLXPJ.cjs} +2 -2
- package/dist/{chunk-IIEKK2S3.cjs.map → chunk-YGCNLXPJ.cjs.map} +1 -1
- package/dist/cli/bin.cjs +1 -1
- package/dist/cli/bin.cjs.map +1 -1
- package/dist/cli/bin.mjs +1 -1
- package/dist/cli/bin.mjs.map +1 -1
- package/dist/cli/index.cjs +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/experimentation/index.cjs +1 -1
- package/dist/experimentation/index.d.cts +2 -2
- package/dist/experimentation/index.d.ts +2 -2
- package/dist/experimentation/index.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/investigation/index.cjs +1 -1
- package/dist/investigation/index.d.cts +2 -2
- package/dist/investigation/index.d.ts +2 -2
- package/dist/investigation/index.mjs +1 -1
- package/dist/kanban/index.cjs +1 -1
- package/dist/kanban/index.d.cts +1 -1
- package/dist/kanban/index.d.ts +1 -1
- package/dist/kanban/index.mjs +1 -1
- package/dist/policies/index.cjs +2 -0
- package/dist/policies/index.cjs.map +1 -0
- package/dist/policies/index.d.cts +199 -0
- package/dist/policies/index.d.ts +199 -0
- package/dist/policies/index.mjs +2 -0
- package/dist/policies/index.mjs.map +1 -0
- package/dist/registry/index.cjs +1 -1
- package/dist/registry/index.d.cts +1 -1
- package/dist/registry/index.d.ts +1 -1
- package/dist/registry/index.mjs +1 -1
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.mjs +1 -1
- package/dist/scrum/index.cjs +1 -1
- package/dist/scrum/index.d.cts +3 -3
- package/dist/scrum/index.d.ts +3 -3
- package/dist/scrum/index.mjs +1 -1
- package/dist/{types-DjePDfms.d.cts → types-DLOtndDY.d.cts} +61 -1
- package/dist/{types-DjePDfms.d.ts → types-DLOtndDY.d.ts} +61 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/waterfall/index.cjs +1 -1
- package/dist/waterfall/index.d.cts +1 -1
- package/dist/waterfall/index.d.ts +1 -1
- package/dist/waterfall/index.mjs +1 -1
- package/package.json +14 -1
- package/dist/chunk-32NVJV5C.mjs +0 -2
- package/dist/chunk-43GLYYA2.cjs +0 -3
- package/dist/chunk-43GLYYA2.cjs.map +0 -1
- package/dist/chunk-7EF47R2J.mjs +0 -2
- package/dist/chunk-BD76VFI4.mjs +0 -3
- package/dist/chunk-BD76VFI4.mjs.map +0 -1
- package/dist/chunk-BHAEPYRJ.cjs +0 -2
- package/dist/chunk-BHAEPYRJ.cjs.map +0 -1
- package/dist/chunk-BYPFTO7P.mjs +0 -2
- package/dist/chunk-FDZB73PH.mjs +0 -2
- package/dist/chunk-FDZB73PH.mjs.map +0 -1
- package/dist/chunk-JNLWI4JM.mjs +0 -2
- package/dist/chunk-LCN4UNYK.cjs +0 -2
- package/dist/chunk-LCN4UNYK.cjs.map +0 -1
- package/dist/chunk-MB465DI4.mjs +0 -2
- package/dist/chunk-MB465DI4.mjs.map +0 -1
- package/dist/chunk-OZAYOPLB.mjs +0 -2
- package/dist/chunk-QAENYYU6.cjs +0 -2
- package/dist/chunk-SFYUJQYW.cjs +0 -2
- package/dist/chunk-UUWDQVIJ.mjs +0 -2
- package/dist/chunk-UUWDQVIJ.mjs.map +0 -1
- package/dist/chunk-Z43GUETW.cjs +0 -2
- package/dist/chunk-Z43GUETW.cjs.map +0 -1
|
@@ -121,6 +121,8 @@ interface Evidence {
|
|
|
121
121
|
ref: string;
|
|
122
122
|
by: string;
|
|
123
123
|
at: string;
|
|
124
|
+
/** Structured content a policy reads (e.g. a risk level); the policy that owns the kind validates it. */
|
|
125
|
+
data?: Record<string, unknown>;
|
|
124
126
|
}
|
|
125
127
|
interface Blocker {
|
|
126
128
|
id: string;
|
|
@@ -213,6 +215,48 @@ interface Gate {
|
|
|
213
215
|
stage: string;
|
|
214
216
|
};
|
|
215
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* What a methodology's `escalateGate` hook adds to a static gate (design spec section 27, #35).
|
|
220
|
+
* Core only appends these to the gate (`widenGate`); it never removes or replaces a requirement.
|
|
221
|
+
*/
|
|
222
|
+
interface GateEscalation {
|
|
223
|
+
requires: GateRequirement[];
|
|
224
|
+
evidence: string[];
|
|
225
|
+
/** Why the gate was widened; recorded in the `gate.resolved` event (e.g. the risk level and its assessment). */
|
|
226
|
+
reason: Record<string, string | null>;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* One claim of a context snapshot (design spec section 27, #36). With no `source` it is
|
|
230
|
+
* unverified. `source.path` is repository-relative POSIX (as Git lists it); the engine compares
|
|
231
|
+
* paths and hashes only, it never reads a file.
|
|
232
|
+
*/
|
|
233
|
+
interface ContextAssumption {
|
|
234
|
+
claim: string;
|
|
235
|
+
/** A required claim must be verified (carry a `source`) for the context-grounded policy to pass. */
|
|
236
|
+
required?: boolean;
|
|
237
|
+
source?: {
|
|
238
|
+
path: string;
|
|
239
|
+
lines?: [number, number];
|
|
240
|
+
hash: string;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
/** `data` of a `context-snapshot` evidence entry. */
|
|
244
|
+
interface ContextSnapshotData {
|
|
245
|
+
/** The repository revision the snapshot was taken at. */
|
|
246
|
+
revision: string;
|
|
247
|
+
assumptions: ContextAssumption[];
|
|
248
|
+
}
|
|
249
|
+
/** An item's current context snapshot as a worker's brief carries it. */
|
|
250
|
+
interface BriefContext extends ContextSnapshotData {
|
|
251
|
+
/** The snapshot artifact (the evidence `ref`). */
|
|
252
|
+
snapshot: string;
|
|
253
|
+
/** Who recorded it. */
|
|
254
|
+
by: string;
|
|
255
|
+
/** Cited paths a later `repo.changed` event listed; empty while the snapshot is fresh. */
|
|
256
|
+
stale: string[];
|
|
257
|
+
/** Claims with no `source`. */
|
|
258
|
+
unverified: string[];
|
|
259
|
+
}
|
|
216
260
|
interface Stage {
|
|
217
261
|
id: string;
|
|
218
262
|
name: string;
|
|
@@ -467,6 +511,8 @@ interface Brief {
|
|
|
467
511
|
}>;
|
|
468
512
|
budgetRemaining: Budget;
|
|
469
513
|
gateAhead?: Gate;
|
|
514
|
+
/** the item's context snapshot, from the methodology's `briefContext` hook (spec 27, #36) */
|
|
515
|
+
context?: BriefContext;
|
|
470
516
|
/** for a question item: the escalating item's last handoff */
|
|
471
517
|
parent?: {
|
|
472
518
|
item: string;
|
|
@@ -540,9 +586,23 @@ interface Methodology<C = unknown, N extends string = MethodologyName> {
|
|
|
540
586
|
report?(state: WorkflowState<N>): Record<string, unknown>;
|
|
541
587
|
/** 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). */
|
|
542
588
|
afterDecide?(state: WorkflowState<N>, entry: PendingHuman, decision: "approve" | "reject", by: string, note: string, now: string): WorkflowState<N>;
|
|
589
|
+
/**
|
|
590
|
+
* Called by complete() before a gated completion is checked; what it returns is appended to the
|
|
591
|
+
* static gate (escalation only) and the widened gate is recorded as `gate.resolved`.
|
|
592
|
+
*/
|
|
593
|
+
escalateGate?(state: WorkflowState<N>, item: WorkItem, gate: Gate): GateEscalation | undefined;
|
|
594
|
+
/**
|
|
595
|
+
* Answers a `custom` stage policy (spec 27, #36) for `plan()` and `complete()`: an array is the
|
|
596
|
+
* policy's violations (empty passes); `undefined` keeps the 1.2 check (`policy:<id>` evidence).
|
|
597
|
+
*/
|
|
598
|
+
customPolicy?(state: WorkflowState<N>, item: WorkItem, policy: Extract<Policy, {
|
|
599
|
+
kind: "custom";
|
|
600
|
+
}>): Violation[] | undefined;
|
|
601
|
+
/** What `synthesizeBrief` puts in `Brief.context` (spec 27, #36); `undefined` leaves it out. */
|
|
602
|
+
briefContext?(state: WorkflowState<N>, item: WorkItem): BriefContext | undefined;
|
|
543
603
|
}
|
|
544
604
|
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"
|
|
545
605
|
/** reserved: never thrown; kept for type compatibility */
|
|
546
606
|
| "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";
|
|
547
607
|
|
|
548
|
-
export type { Accounting as A, Brief as B, Capability as C,
|
|
608
|
+
export type { Produced as $, Accounting as A, Brief as B, Capability as C, Iteration as D, Experiment as E, Action as F, GateRequirement as G, Handoff as H, InvestigationConclusion as I, Baseline as J, Blocker as K, ContextSnapshotData as L, Methodology as M, NewItem as N, Observation as O, Policy as P, ImpactAnalysis as Q, Role as R, Stage as S, Transition as T, ItemType as U, Violation as V, WorkflowState as W, Lesson as X, LessonChange as Y, ModelTier as Z, PlannerOptions as _, Budget as a, Spent as a0, Verdict as a1, WorkflowExt as a2, BeliefUpdate as b, Hypothesis as c, InvestigationRound as d, InvestigationState as e, Ceremony as f, Rule as g, ExperimentCandidate as h, ExperimentationState as i, ItemStatus as j, CoreTerm as k, WorkItem as l, Gate as m, GateEscalation as n, ApplyResult as o, ContextAssumption as p, BriefContext as q, ClassOfService as r, CeremonyInput as s, Event as t, Phase as u, PendingHuman as v, ErrorCode as w, MethodologyName as x, ItemPatch as y, Evidence as z };
|
|
@@ -121,6 +121,8 @@ interface Evidence {
|
|
|
121
121
|
ref: string;
|
|
122
122
|
by: string;
|
|
123
123
|
at: string;
|
|
124
|
+
/** Structured content a policy reads (e.g. a risk level); the policy that owns the kind validates it. */
|
|
125
|
+
data?: Record<string, unknown>;
|
|
124
126
|
}
|
|
125
127
|
interface Blocker {
|
|
126
128
|
id: string;
|
|
@@ -213,6 +215,48 @@ interface Gate {
|
|
|
213
215
|
stage: string;
|
|
214
216
|
};
|
|
215
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* What a methodology's `escalateGate` hook adds to a static gate (design spec section 27, #35).
|
|
220
|
+
* Core only appends these to the gate (`widenGate`); it never removes or replaces a requirement.
|
|
221
|
+
*/
|
|
222
|
+
interface GateEscalation {
|
|
223
|
+
requires: GateRequirement[];
|
|
224
|
+
evidence: string[];
|
|
225
|
+
/** Why the gate was widened; recorded in the `gate.resolved` event (e.g. the risk level and its assessment). */
|
|
226
|
+
reason: Record<string, string | null>;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* One claim of a context snapshot (design spec section 27, #36). With no `source` it is
|
|
230
|
+
* unverified. `source.path` is repository-relative POSIX (as Git lists it); the engine compares
|
|
231
|
+
* paths and hashes only, it never reads a file.
|
|
232
|
+
*/
|
|
233
|
+
interface ContextAssumption {
|
|
234
|
+
claim: string;
|
|
235
|
+
/** A required claim must be verified (carry a `source`) for the context-grounded policy to pass. */
|
|
236
|
+
required?: boolean;
|
|
237
|
+
source?: {
|
|
238
|
+
path: string;
|
|
239
|
+
lines?: [number, number];
|
|
240
|
+
hash: string;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
/** `data` of a `context-snapshot` evidence entry. */
|
|
244
|
+
interface ContextSnapshotData {
|
|
245
|
+
/** The repository revision the snapshot was taken at. */
|
|
246
|
+
revision: string;
|
|
247
|
+
assumptions: ContextAssumption[];
|
|
248
|
+
}
|
|
249
|
+
/** An item's current context snapshot as a worker's brief carries it. */
|
|
250
|
+
interface BriefContext extends ContextSnapshotData {
|
|
251
|
+
/** The snapshot artifact (the evidence `ref`). */
|
|
252
|
+
snapshot: string;
|
|
253
|
+
/** Who recorded it. */
|
|
254
|
+
by: string;
|
|
255
|
+
/** Cited paths a later `repo.changed` event listed; empty while the snapshot is fresh. */
|
|
256
|
+
stale: string[];
|
|
257
|
+
/** Claims with no `source`. */
|
|
258
|
+
unverified: string[];
|
|
259
|
+
}
|
|
216
260
|
interface Stage {
|
|
217
261
|
id: string;
|
|
218
262
|
name: string;
|
|
@@ -467,6 +511,8 @@ interface Brief {
|
|
|
467
511
|
}>;
|
|
468
512
|
budgetRemaining: Budget;
|
|
469
513
|
gateAhead?: Gate;
|
|
514
|
+
/** the item's context snapshot, from the methodology's `briefContext` hook (spec 27, #36) */
|
|
515
|
+
context?: BriefContext;
|
|
470
516
|
/** for a question item: the escalating item's last handoff */
|
|
471
517
|
parent?: {
|
|
472
518
|
item: string;
|
|
@@ -540,9 +586,23 @@ interface Methodology<C = unknown, N extends string = MethodologyName> {
|
|
|
540
586
|
report?(state: WorkflowState<N>): Record<string, unknown>;
|
|
541
587
|
/** 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). */
|
|
542
588
|
afterDecide?(state: WorkflowState<N>, entry: PendingHuman, decision: "approve" | "reject", by: string, note: string, now: string): WorkflowState<N>;
|
|
589
|
+
/**
|
|
590
|
+
* Called by complete() before a gated completion is checked; what it returns is appended to the
|
|
591
|
+
* static gate (escalation only) and the widened gate is recorded as `gate.resolved`.
|
|
592
|
+
*/
|
|
593
|
+
escalateGate?(state: WorkflowState<N>, item: WorkItem, gate: Gate): GateEscalation | undefined;
|
|
594
|
+
/**
|
|
595
|
+
* Answers a `custom` stage policy (spec 27, #36) for `plan()` and `complete()`: an array is the
|
|
596
|
+
* policy's violations (empty passes); `undefined` keeps the 1.2 check (`policy:<id>` evidence).
|
|
597
|
+
*/
|
|
598
|
+
customPolicy?(state: WorkflowState<N>, item: WorkItem, policy: Extract<Policy, {
|
|
599
|
+
kind: "custom";
|
|
600
|
+
}>): Violation[] | undefined;
|
|
601
|
+
/** What `synthesizeBrief` puts in `Brief.context` (spec 27, #36); `undefined` leaves it out. */
|
|
602
|
+
briefContext?(state: WorkflowState<N>, item: WorkItem): BriefContext | undefined;
|
|
543
603
|
}
|
|
544
604
|
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"
|
|
545
605
|
/** reserved: never thrown; kept for type compatibility */
|
|
546
606
|
| "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";
|
|
547
607
|
|
|
548
|
-
export type { Accounting as A, Brief as B, Capability as C,
|
|
608
|
+
export type { Produced as $, Accounting as A, Brief as B, Capability as C, Iteration as D, Experiment as E, Action as F, GateRequirement as G, Handoff as H, InvestigationConclusion as I, Baseline as J, Blocker as K, ContextSnapshotData as L, Methodology as M, NewItem as N, Observation as O, Policy as P, ImpactAnalysis as Q, Role as R, Stage as S, Transition as T, ItemType as U, Violation as V, WorkflowState as W, Lesson as X, LessonChange as Y, ModelTier as Z, PlannerOptions as _, Budget as a, Spent as a0, Verdict as a1, WorkflowExt as a2, BeliefUpdate as b, Hypothesis as c, InvestigationRound as d, InvestigationState as e, Ceremony as f, Rule as g, ExperimentCandidate as h, ExperimentationState as i, ItemStatus as j, CoreTerm as k, WorkItem as l, Gate as m, GateEscalation as n, ApplyResult as o, ContextAssumption as p, BriefContext as q, ClassOfService as r, CeremonyInput as s, Event as t, Phase as u, PendingHuman as v, ErrorCode as w, MethodologyName as x, ItemPatch as y, Evidence as z };
|
package/dist/types.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as Accounting,
|
|
1
|
+
export { A as Accounting, F as Action, o as ApplyResult, J as Baseline, K as Blocker, B as Brief, q as BriefContext, a as Budget, C as Capability, f as Ceremony, s as CeremonyInput, r as ClassOfService, p as ContextAssumption, L as ContextSnapshotData, k as CoreTerm, w as ErrorCode, t as Event, z as Evidence, m as Gate, n as GateEscalation, G as GateRequirement, H as Handoff, Q as ImpactAnalysis, y as ItemPatch, j as ItemStatus, U as ItemType, D as Iteration, X as Lesson, Y as LessonChange, M as Methodology, x as MethodologyName, Z as ModelTier, N as NewItem, v as PendingHuman, u as Phase, _ as PlannerOptions, P as Policy, $ as Produced, R as Role, g as Rule, a0 as Spent, S as Stage, T as Transition, a1 as Verdict, V as Violation, l as WorkItem, a2 as WorkflowExt, W as WorkflowState } from './types-DLOtndDY.cjs';
|
package/dist/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as Accounting,
|
|
1
|
+
export { A as Accounting, F as Action, o as ApplyResult, J as Baseline, K as Blocker, B as Brief, q as BriefContext, a as Budget, C as Capability, f as Ceremony, s as CeremonyInput, r as ClassOfService, p as ContextAssumption, L as ContextSnapshotData, k as CoreTerm, w as ErrorCode, t as Event, z as Evidence, m as Gate, n as GateEscalation, G as GateRequirement, H as Handoff, Q as ImpactAnalysis, y as ItemPatch, j as ItemStatus, U as ItemType, D as Iteration, X as Lesson, Y as LessonChange, M as Methodology, x as MethodologyName, Z as ModelTier, N as NewItem, v as PendingHuman, u as Phase, _ as PlannerOptions, P as Policy, $ as Produced, R as Role, g as Rule, a0 as Spent, S as Stage, T as Transition, a1 as Verdict, V as Violation, l as WorkItem, a2 as WorkflowExt, W as WorkflowState } from './types-DLOtndDY.js';
|
package/dist/waterfall/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk2FBA7RBS_cjs=require('../chunk-2FBA7RBS.cjs');require('../chunk-GKN5M4B7.cjs'),require('../chunk-BANKVCYY.cjs'),require('../chunk-H26KXQ3I.cjs'),require('../chunk-MU26QW32.cjs'),require('../chunk-OSHBJIYD.cjs');Object.defineProperty(exports,"CHANGE_GATE",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.e}});Object.defineProperty(exports,"DEFAULT_DELIVERABLES",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.b}});Object.defineProperty(exports,"DEFAULT_DELIVER_BY",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.c}});Object.defineProperty(exports,"DEFAULT_PHASE_IDS",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.a}});Object.defineProperty(exports,"DONE",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.k}});Object.defineProperty(exports,"GATE_ID",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.d}});Object.defineProperty(exports,"REVIEW",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.j}});Object.defineProperty(exports,"WATERFALL_VOCABULARY",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.K}});Object.defineProperty(exports,"WORK",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.i}});Object.defineProperty(exports,"approveChange",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.z}});Object.defineProperty(exports,"baselinePhase",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.x}});Object.defineProperty(exports,"configOf",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.g}});Object.defineProperty(exports,"currentPhase",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.s}});Object.defineProperty(exports,"defaultPhases",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.f}});Object.defineProperty(exports,"deliverRoleFor",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.L}});Object.defineProperty(exports,"getPhase",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.o}});Object.defineProperty(exports,"isFrozen",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.t}});Object.defineProperty(exports,"itemsInPhase",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.q}});Object.defineProperty(exports,"lastToPhase",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.w}});Object.defineProperty(exports,"missingDeliverables",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.v}});Object.defineProperty(exports,"missingTraces",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.C}});Object.defineProperty(exports,"openPhase",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.r}});Object.defineProperty(exports,"phaseIndex",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.n}});Object.defineProperty(exports,"phaseOf",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.p}});Object.defineProperty(exports,"phaseReport",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.M}});Object.defineProperty(exports,"phasesOf",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.l}});Object.defineProperty(exports,"producedKinds",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.u}});Object.defineProperty(exports,"rejectChange",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.A}});Object.defineProperty(exports,"reopenPhases",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.y}});Object.defineProperty(exports,"traceabilityMatrix",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.B}});Object.defineProperty(exports,"validateWaterfallConfig",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.h}});Object.defineProperty(exports,"wantPhase",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.D}});Object.defineProperty(exports,"waterfall",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.N}});Object.defineProperty(exports,"waterfallAfterDecide",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.F}});Object.defineProperty(exports,"waterfallCeremonies",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.E}});Object.defineProperty(exports,"waterfallMetrics",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.G}});Object.defineProperty(exports,"waterfallRoles",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.H}});Object.defineProperty(exports,"waterfallRules",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.I}});Object.defineProperty(exports,"waterfallStages",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.J}});Object.defineProperty(exports,"withPhases",{enumerable:true,get:function(){return chunk2FBA7RBS_cjs.m}});//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as Gate, a as Budget, G as GateRequirement, W as WorkflowState, u as Phase, l as WorkItem, S as Stage, R as Role, g as Rule, s as CeremonyInput, v as PendingHuman, M as Methodology, f as Ceremony, k as CoreTerm } from '../types-DLOtndDY.cjs';
|
|
2
2
|
|
|
3
3
|
interface WaterfallPhaseConfig {
|
|
4
4
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as Gate, a as Budget, G as GateRequirement, W as WorkflowState, u as Phase, l as WorkItem, S as Stage, R as Role, g as Rule, s as CeremonyInput, v as PendingHuman, M as Methodology, f as Ceremony, k as CoreTerm } from '../types-DLOtndDY.js';
|
|
2
2
|
|
|
3
3
|
interface WaterfallPhaseConfig {
|
|
4
4
|
id: string;
|
package/dist/waterfall/index.mjs
CHANGED
|
@@ -1,2 +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-
|
|
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-CX2E7ZTQ.mjs';import'../chunk-C4ISBUZR.mjs';import'../chunk-5DCOXGRW.mjs';import'../chunk-PFHVB2WT.mjs';import'../chunk-COPYGMHE.mjs';import'../chunk-YS6CXERQ.mjs';//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ex-workflow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Methodology engine for AI teams: Scrum, Kanban, Waterfall, Investigation and Experimentation as data-driven state machines on top of ex-flow",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -141,6 +141,16 @@
|
|
|
141
141
|
"types": "./dist/registry/index.d.cts",
|
|
142
142
|
"default": "./dist/registry/index.cjs"
|
|
143
143
|
}
|
|
144
|
+
},
|
|
145
|
+
"./policies": {
|
|
146
|
+
"import": {
|
|
147
|
+
"types": "./dist/policies/index.d.ts",
|
|
148
|
+
"default": "./dist/policies/index.mjs"
|
|
149
|
+
},
|
|
150
|
+
"require": {
|
|
151
|
+
"types": "./dist/policies/index.d.cts",
|
|
152
|
+
"default": "./dist/policies/index.cjs"
|
|
153
|
+
}
|
|
144
154
|
}
|
|
145
155
|
},
|
|
146
156
|
"typesVersions": {
|
|
@@ -174,6 +184,9 @@
|
|
|
174
184
|
],
|
|
175
185
|
"registry": [
|
|
176
186
|
"dist/registry/index.d.ts"
|
|
187
|
+
],
|
|
188
|
+
"policies": [
|
|
189
|
+
"dist/policies/index.d.ts"
|
|
177
190
|
]
|
|
178
191
|
}
|
|
179
192
|
},
|
package/dist/chunk-32NVJV5C.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a,b as b$1}from'./chunk-4HG6A3SF.mjs';import {N as N$1,K as K$1,m,h,r,l,c,L,U as U$1,a as a$1,s,u,x,q,t,C,n,B,M}from'./chunk-UUWDQVIJ.mjs';import {b}from'./chunk-YS6CXERQ.mjs';import {timSort}from'exsorted';var ye=["todo","in_progress","blocked","review","awaiting_human","done","dropped"];function be(o){let n=o.events.filter(i=>i.type==="sprint.closed"&&i.payload.reason!=="cancel");return n.length===0?null:n.reduce((i,r)=>i+r.payload.doneWeight,0)/n.length}function ae(o){let n=N$1(o),i=Object.fromEntries(ye.map(t=>[t,0])),r=[],g=0;for(let t of n?.committed??[]){let e=Object.hasOwn(o.items,t)?o.items[t]:void 0;if(e){i[e.status]+=1,e.status!=="done"&&(g+=e.weight??0);for(let s of e.blockers)s.clearedAt||r.push({item:t,blocker:s.id,owner:s.owner,reason:s.reason});}}let p=n?.spent??{tokens:0,turns:0,wallclockMs:0},f=n?K$1(n.budget,n.spent):{},y=be(o),k="unknown";if(n&&y!==null&&n.budget.tokens){let t=(f.tokens??0)/n.budget.tokens;k=g<=y*t?"on-track":"at-risk";}let d=o.lessons.filter(t=>t.status==="raised").length;return {sprint:n?.id??null,goal:n?.goal??null,byStatus:i,blockers:r,spent:p,remaining:f,remainingWeight:g,raisedLessons:d,velocity:y,forecast:k}}function U(o){for(let n=o.iterations.length-1;n>=0;n--){let i=o.iterations[n];if(i.endedAt!==void 0)return i}}function F(o,n){return o.events.find(i=>i.type==="sprint.closed"&&i.payload.id===n)?.seq??Number.POSITIVE_INFINITY}function he(o){let n=new Set(U(o)?.carryover??[]),i=Object.values(o.items).filter(r=>r.stage==="backlog"&&r.status==="todo"&&r.type!=="question");return timSort([...i],(r,g)=>{let p=n.has(r.id)?1:0,f=n.has(g.id)?1:0;return p!==f?f-p:(g.priority??0)-(r.priority??0)})}function re(o,n$1){let i=r(o,n$1);(i.stage!=="backlog"||i.status!=="todo")&&b("invalid-input",`item "${n$1}" is not in the Product Backlog (${i.stage}/${i.status})`,"only backlog items can be committed",{items:[n$1]}),C(o,i,n(o,"backlog").exitPolicy,"enter the Sprint Backlog");}function se(o,n,i,r,g){let p=o;for(let f of Object.values(o.items))f.type!=="question"||f.parent===void 0||!n.includes(f.parent)||f.status==="done"||f.status==="dropped"||((f.stage!=="sprint"||f.status!=="todo")&&(p=u(p,f.id,{stage:"sprint",status:"todo"},r,g)),p=q(p,f.id,y=>({...y,iteration:i})));return p}function N(o,n){return {...o,config:{...W(o),definitionOfDone:n},stages:o.stages.map(i=>i.id==="review"?{...i,exitPolicy:n}:i)}}function ke(o,n$1){let i=W(o),r=[],g=[],p=n(o,"backlog").exitPolicy,f=0;for(let y of he(o)){let k=B(o,y,p);if(k.length>0){g.push({id:y.id,reason:"policy",detail:k.map(d=>d.message).join("; ")});continue}if(n$1.turns!==void 0&&r.length>=n$1.turns){g.push({id:y.id,reason:"budget",detail:"turns budget full"});continue}if(n$1.tokens!==void 0){let d=M(o,y.weight,i.fallbackTokensPerWeight,i.estimateMode);if(f+d>n$1.tokens){g.push({id:y.id,reason:"budget",detail:`needs about ${d} tokens, ${n$1.tokens-f} left`});continue}f+=d;}r.push(y.id);}return {ids:r,skipped:g}}function K(o){let n=(t,e,s,m)=>U$1(t,o(),{type:e,by:s.by,payload:s},c=>m(c,a$1(s.now)));return {refine:(t$1,e)=>{m(t$1,e.by,"define-acceptance","deliver");let s$1=e.items??[],m$1=e.split??[],c$1=e.reestimate??[];(!Array.isArray(c$1)||!c$1.every(u=>typeof u=="string"))&&b("invalid-input","refine.reestimate must be a list of item ids",'pass reestimate: ["A"]');let l=c$1;s$1.length===0&&m$1.length===0&&l.length===0&&b("invalid-input","refine needs items[], split[] or reestimate[]","pass at least one patch, split or reestimate");for(let u of l){let h=r(t$1,u);(h.stage!=="backlog"||h.status!=="todo"||h.weight===void 0)&&b("invalid-input",`item "${u}" has no weight to confirm in the Product Backlog`,"refine it with a patch { weight } instead",{items:[u]});}return n(t$1,"ceremony.refine",e,(u$1,h)=>{for(let{id:a,patch:w}of s$1)u$1=t(u$1,a,w,e.by,h);for(let a of l)u$1=c(u$1,"item.reestimated",e.by,{id:a,weight:r(u$1,a).weight},h);for(let a of m$1){r(u$1,a.from);for(let w of a.into)u$1=s(u$1,{...w,parent:a.from},e.by,h);u$1=u(u$1,a.from,{status:"dropped"},e.by,h);}return c(u$1,"ceremony.refine",e.by,{edited:s$1.map(a=>a.id),split:m$1.map(a=>({from:a.from,into:a.into.map(w=>w.id)})),reestimated:l},h)})},plan:(t,e)=>{m(t,e.by,"facilitate");let s=e.goal;(typeof s!="string"||s.trim()==="")&&b("invalid-input","sprint planning needs a non-empty goal","state the Sprint Goal in one sentence");let m$1=W(t),c$1=e.budget??m$1.sprintBudget,l=e.items==="auto"?ke(t,c$1):void 0,u$1=l?.skipped??[],h=l?l.ids:e.items;Array.isArray(h)||b("invalid-input",'sprint planning needs items: string[] or "auto"','pass ["A","B"] or "auto"'),h.length===0&&b("invalid-input",`no backlog items fit the sprint${u$1.length?`; skipped: ${u$1.map(a=>`${a.id} (${a.reason}: ${a.detail})`).join(", ")}`:""}`,"refine the backlog (acceptance + estimates) or raise the budget with exwf config set");for(let a of h)re(t,a);return n(t,"ceremony.plan",e,(a,w)=>{let C=`S${a.iterations.length+1}`,M=U(a),O=h.filter(A=>M?.carryover.includes(A)),B=[];for(let A of h){let T=j(r(a,A),a);T&&B.push(A),a=u(a,A,T?{stage:T,status:"review"}:{stage:"sprint",status:"todo"},e.by,w),a=q(a,A,fe=>({...fe,iteration:C}));}a=se(a,h,C,e.by,w);let J=h.reduce((A,T)=>A+(a.items[T]?.weight??0),0);return a={...a,iterations:[...a.iterations,{id:C,goal:s,budget:c$1,spent:{tokens:0,turns:0,wallclockMs:0},startedAt:w,committed:[...h],carryover:O}]},c(a,"sprint.opened",e.by,{id:C,goal:s,committed:h,committedWeight:J,budget:c$1,skipped:u$1,resumed:B},w)})},commit:(t,e)=>{let s=N$1(t);s||b("invalid-input","no open sprint to commit into","run the plan ceremony first");let m=e.items;(!Array.isArray(m)||m.length===0)&&b("invalid-input","commit needs items[]",'pass ["A"]');let c$1=new Set;for(let l of m)c$1.has(l)&&b("invalid-input",`item "${l}" appears twice in items[]`,"list each item once",{items:[l]}),c$1.add(l),r(t,l),s.committed.includes(l)&&b("invalid-input",`item "${l}" is already committed to ${s.id}`,"nothing to do",{items:[l]}),re(t,l);return n(t,"ceremony.commit",e,(l,u$1)=>{let h=[];for(let a of m){let w=j(r(l,a),l);w&&h.push(a),l=u(l,a,w?{stage:w,status:"review"}:{stage:"sprint",status:"todo"},e.by,u$1),l=q(l,a,C=>({...C,iteration:s.id}));}return l=se(l,m,s.id,e.by,u$1),l={...l,iterations:l.iterations.map(a=>a.id===s.id?{...a,committed:[...a.committed,...m]}:a)},c(l,"sprint.committed",e.by,{id:s.id,items:m,goalImpact:e.goalImpact??null,resumed:h},u$1)})},uncommit:(t,e)=>{m(t,e.by,"order-backlog");let s=N$1(t);s||b("invalid-input","no open sprint","nothing to uncommit from");let m$1=e.items;(!Array.isArray(m$1)||m$1.length===0)&&b("invalid-input","uncommit needs items[]",'pass ["A"]');for(let c of m$1)r(t,c).status==="done"&&b("invalid-input",`item "${c}" is done`,"finished work cannot be uncommitted",{items:[c]});for(let c of m$1)s.committed.includes(c)||b("invalid-input",`item "${c}" is not committed to ${s.id}`,`committed: ${s.committed.join(", ")}`,{items:[c]});return n(t,"ceremony.uncommit",e,(c$1,l)=>{for(let u$1 of m$1)c$1=u(c$1,u$1,{stage:"backlog",status:"todo"},e.by,l),c$1=x(c$1,u$1,["iteration","role"]);return c$1={...c$1,iterations:c$1.iterations.map(u=>u.id===s.id?{...u,committed:u.committed.filter(h=>!m$1.includes(h))}:u)},c(c$1,"sprint.uncommitted",e.by,{id:s.id,items:m$1,reason:e.reason??""},l)})},daily:(t,e)=>n(t,"ceremony.daily",e,(s,m)=>c(s,"daily",e.by,ae(s),m)),review:(t,e)=>{let s$1=N$1(t);s$1||b("invalid-input","no open sprint to review","run the plan ceremony first");let m=h(t,"sprint-review");e.by!=="human"&&!m.includes(e.by)&&b("gate-unmet",`"${e.by}" may not accept the Sprint Review`,`run review as "human" or as ${m.join(", ")||"a role with canApprove sprint-review"}`,{rule:"sprint-review"});let c$1=e.feedback??[];return n(t,"ceremony.review",e,(l,u)=>{for(let a of c$1)l=s(l,{...a,stage:"backlog"},e.by,u);let h=s$1.committed.filter(a=>l.items[a]?.status==="done");return l=c(l,"increment",e.by,{sprint:s$1.id,done:h,goalMet:e.goalMet===true,accepted:e.accepted===true,feedback:c$1.map(a=>a.id)},u),E(l,"review",u)})},retro:(t,e)=>{m(t,e.by,"facilitate");let s$1=U(t);s$1||b("invalid-input","no closed sprint to retrospect","close the sprint (review or cancel) first"),N$1(t)&&b("invalid-input","a sprint is still open","retro runs between sprints; review or cancel the open one");let m$1=F(t,s$1.id);t.events.some(u=>u.type==="retro"&&u.seq>m$1)&&b("invalid-input",`sprint ${s$1.id} already has a retrospective`,"plan the next sprint");let c$1=a(t,e,"retro"),l=e.dodChanges;return n(t,"ceremony.retro",e,(u,h)=>{let a=[],w=false,C=b$1(u,c$1,e.by,h,(M,O)=>{if(O.kind==="dod"){let B=W(M).definitionOfDone;return B.some(J=>JSON.stringify(J)===JSON.stringify(O.policy))?M:(w=true,N(M,[...B,O.policy]))}return O.kind==="backlog"?(a.push(O.item.id),s(M,{...O.item,stage:"backlog",tags:[...O.item.tags??[],"retro"]},e.by,h)):M});return u=C.state,l&&(w=true,u=N(u,l)),c(u,"retro",e.by,{sprint:s$1.id,adopted:C.adopted,dismissed:C.dismissed,agreements:C.agreements,retired:C.retired,dodChanged:w,backlogAdded:a},h)})},cancel:(t,e)=>{m(t,e.by,"order-backlog");let s=N$1(t);return s||b("invalid-input","no open sprint to cancel","nothing to do"),n(t,"ceremony.cancel",e,(m,c$1)=>(m=c(m,"sprint.cancelled",e.by,{id:s.id,reason:e.reason??""},c$1),E(m,"cancel",c$1)))}}}var ve=new Set(["never","po-only","any"]);function ce(o){let n=o??{},i=n.sprintBudget;(!i||typeof i!="object"||i.tokens===void 0&&i.turns===void 0&&i.wallclockMs===void 0)&&b("config-invalid","scrum config.sprintBudget must define tokens, turns or wallclockMs",'e.g. { "sprintBudget": { "tokens": 400000, "turns": 60 } }'),(typeof n.productGoal!="string"||n.productGoal.trim()==="")&&b("config-invalid","scrum config.productGoal must be a non-empty string","state the Product Goal in one sentence"),Array.isArray(n.definitionOfDone)||b("config-invalid","scrum config.definitionOfDone must be a Policy[]",'e.g. [{ "kind": "evidence", "evidenceKind": "test-output" }]');let r=n.refinementSharePct??10;(typeof r!="number"||r<0||r>100)&&b("config-invalid","scrum config.refinementSharePct must be 0..100","omit it for the default 10");let g=n.allowMidSprintAdd??"po-only";(typeof g!="string"||!ve.has(g))&&b("config-invalid",`scrum config.allowMidSprintAdd must be never | po-only | any (got ${JSON.stringify(g)})`,'use "po-only" unless you have a reason');let p=n.inProgressWipLimit;p!==void 0&&(typeof p!="number"||p<1)&&b("config-invalid","scrum config.inProgressWipLimit must be a positive number","omit it for no limit");let f=n.autoClose;f!==void 0&&typeof f!="boolean"&&b("config-invalid","scrum config.autoClose must be true or false","omit it for the default true");let y=n.estimateMode;y!==void 0&&y!=="per-weight"&&y!=="per-call"&&b("config-invalid",`scrum config.estimateMode must be per-weight | per-call (got ${JSON.stringify(y)})`,'use "per-weight" (the default) or "per-call"');let k=n.fallbackTokensPerWeight;k!==void 0&&(typeof k!="number"||!Number.isFinite(k)||k<=0)&&b("config-invalid","scrum config.fallbackTokensPerWeight must be a positive finite number","omit it for the default 20000");let d={sprintBudget:i,productGoal:n.productGoal,definitionOfDone:n.definitionOfDone,refinementSharePct:r,allowMidSprintAdd:g};return p!==void 0&&(d.inProgressWipLimit=p),f!==void 0&&(d.autoClose=f),y!==void 0&&(d.estimateMode=y),k!==void 0&&(d.fallbackTokensPerWeight=k),d}var $=(o,n)=>n===0?0:o/n;function de(o){let n=o.events.filter(t=>t.type==="accounting.corrected"),i=o.events.filter(t=>t.type==="sprint.closed").map(t=>{let e=t.payload,s=n.filter(m=>m.seq>t.seq&&e.id!==void 0&&m.payload.iteration===e.id).reduce((m,c)=>m+c.payload.delta.tokens,0);return s===0?e:{...e,spent:{...e.spent,tokens:e.spent.tokens+s}}}),r=i.filter(t=>t.reason!=="cancel"),g=r.map(t=>t.doneWeight),p=r.reduce((t,e)=>t+e.doneWeight,0),f=r.reduce((t,e)=>t+e.committedWeight,0),y=o.events.filter(t=>t.type==="increment").map(t=>t.payload),k=i.filter(t=>t.budget.tokens!==void 0),d=r.reduce((t,e)=>t+e.spent.tokens,0);return {velocity:g,meanVelocity:$(g.reduce((t,e)=>t+e,0),g.length),burndown:o.events.filter(t=>t.type==="daily").map(t=>t.payload.remainingWeight),commitmentReliability:$(p,f),sprintGoalHitRate:$(y.filter(t=>t.goalMet).length,y.length),carryoverRatio:$(i.reduce((t,e)=>t+e.carryover.length,0),i.reduce((t,e)=>t+e.done.length+e.carryover.length,0)),budgetUtilisation:$(k.reduce((t,e)=>t+e.spent.tokens,0),k.reduce((t,e)=>t+(e.budget.tokens??0),0)),costPerPoint:$(d,p),current:we(o)}}function we(o){let n=N$1(o),i=(n?.committed??[]).map(k=>o.items[k]).filter(k=>k!==void 0),r=k=>k.reduce((d,t)=>d+(t.weight??0),0),g=r(i),p=r(i.filter(k=>k.status==="done")),f=n?.spent.tokens??0,y=n?.budget.tokens??0;return {spentTokens:f,spentTurns:n?.spent.turns??0,budgetTokens:y,committedWeight:g,doneWeight:p,remainingWeight:g-p,costPerPoint:$(f,p),budgetUtilisation:$(f,y)}}function le(){return [{id:"product-owner",name:"Product Owner",modelTier:"large",capabilities:["order-backlog","define-acceptance","escalate"],canApprove:["sprint-review"],inputs:["stakeholder-needs","product-goal"],outputs:["ordered-backlog","acceptance-criteria"],do_not:["do not implement items yourself"]},{id:"scrum-master",name:"Scrum Master",modelTier:"large",capabilities:["facilitate","escalate"],canApprove:[],inputs:["board","blockers"],outputs:["ceremony-records","lessons"],do_not:["do not reorder the Product Backlog","do not assign work; the planner pulls"]},{id:"developer",name:"Developer",modelTier:"small",capabilities:["deliver","review","verify"],canApprove:[],inputs:["brief"],outputs:["code","test-output"],do_not:["do not change acceptance criteria","do not touch items outside your brief"]}]}var I=(o,n,i,r,g)=>g?{rule:o,severity:n,item:g,message:i,fix:r}:{rule:o,severity:n,message:i,fix:r};function me(o){for(let n=o.iterations.length-1;n>=0;n--){let i=o.iterations[n];if(i.endedAt!==void 0)return i}}var H=o=>o.kind==="evidence"?`evidence:${o.evidenceKind}`:o.kind==="custom"?`custom:${o.id}`:o.kind;function ue(){return [{id:"one-open-sprint",severity:"error",check:(d,t)=>t.type==="ceremony.plan"&&N$1(d)?[I("one-open-sprint","error",`sprint ${N$1(d).id} is still open`,"review or cancel it before planning the next sprint")]:[]},{id:"retro-before-plan",severity:"error",check:(d,t)=>{if(t.type!=="ceremony.plan")return [];let e=me(d);if(!e)return [];let s=F(d,e.id);if(d.events.some(c=>c.type==="retro"&&c.seq>s))return [];let m=e.outcome==="cancelled"?"warning":"error";return [I("retro-before-plan",m,`sprint ${e.id} has no retrospective yet`,"run the retro ceremony first (lessons may be empty)")]}},{id:"sprint-budget-fixed",severity:"error",check:(d,t)=>{if(t.type!=="ceremony.plan")return [];let e=t.payload?.budget;return e===void 0||JSON.stringify(e)===JSON.stringify(W(d).sprintBudget)?[]:[I("sprint-budget-fixed","error","sprint length is fixed by config.sprintBudget","change sprintBudget between sprints with changeConfig / exwf config set, not per plan")]}},{id:"sprint-closing",severity:"error",check:(d,t)=>{let e=N$1(d);return t.type==="ceremony.commit"&&e?.closing?[I("sprint-closing","error",`sprint ${e.id} is closing: its budget is spent and no new work can start`,"run ceremony review or cancel first, then plan the next sprint")]:[]}},{id:"scrum-stage-ids",severity:"error",check:(d,t)=>{if(t.type!=="init")return [];let e=["backlog","sprint","review"].filter(s=>!d.stages.some(m=>m.id===s));return e.length&&b("config-invalid",`scrum stages lack the required id(s): ${e.join(", ")}`,"keep the stages backlog, sprint and review (omit stages to use the defaults), then run exwf init scrum again"),[]}},{id:"scope-protects-goal",severity:"error",check:(d,t)=>{if(t.type!=="ceremony.commit")return [];let e=W(d),s=t.payload??{};return e.allowMidSprintAdd==="never"?[I("scope-protects-goal","error","mid-sprint additions are disabled",'set allowMidSprintAdd to "po-only" or wait for the next sprint')]:e.allowMidSprintAdd==="po-only"&&!l(d,t.by,"order-backlog")?[I("scope-protects-goal","error",`"${t.by}" may not add work mid-sprint`,"ask the Product Owner (order-backlog) to commit it")]:s.goalImpact!=="none"?[I("scope-protects-goal","error",`adding work with goalImpact "${s.goalImpact??"unset"}" endangers the Sprint Goal`,'only commit items with goalImpact: "none"; otherwise cancel and re-plan')]:[]}},{id:"po-orders-backlog",severity:"error",check:(d,t)=>t.type!=="ceremony.refine"||l(d,t.by,"order-backlog")?[]:((t.payload??{}).items??[]).filter(s=>s.patch.priority!==void 0).map(s=>I("po-orders-backlog","error",`"${t.by}" may not change the priority of "${s.id}"`,"only the Product Owner orders the backlog; drop priority from the patch",s.id))},{id:"dod-not-weakened",severity:"error",check:(d,t)=>{if(t.type!=="ceremony.retro")return [];let e=t.payload??{};if(e.dodChanges===void 0)return [];if(N$1(d))return [I("dod-not-weakened","error","Definition of Done cannot change while a sprint is open","close the sprint first; DoD changes apply to the next sprint")];if(!Array.isArray(e.dodChanges)||e.allowWeaken===true)return [];let s=e.dodChanges,m=new Set(s.map(H)),c=W(d).definitionOfDone.filter(u=>!m.has(H(u)));if(c.length===0)return [];let l=c.map(u=>H(u).replace(":"," "));return [I("dod-not-weakened","error",`retro dodChanges drops ${c.length} Definition of Done policy(ies): ${l.join(", ")}`,'keep them in dodChanges (it replaces the whole list; suggestedChange { kind: "dod" } appends one), or pass allowWeaken: true to weaken the Definition of Done knowingly')]}},{id:"carryover-reestimated",severity:"error",check:(d,t)=>{if(t.type!=="ceremony.plan")return [];let e=t.payload?.items;if(!Array.isArray(e))return [];let s=me(d);if(!s)return [];let m=F(d,s.id);return e.filter(c=>s.carryover.includes(c)&&!(d.items[c]&&j(d.items[c],d)!==void 0)&&!d.events.some(l=>l.seq>m&&l.payload.id===c&&(l.type==="item.edited"&&l.payload.changed.includes("weight")||l.type==="item.reestimated"))).map(c=>I("carryover-reestimated","error",`carried-over item "${c}" was not re-estimated after ${s.id}`,"refine it with a new weight before committing",c))}}]}function pe(o){let n={id:"in_progress",name:"In progress",entryPolicy:[{kind:"dependencies-done"}],exitPolicy:[]};return o.inProgressWipLimit!==void 0&&(n.wipLimit=o.inProgressWipLimit),[{id:"backlog",name:"Product Backlog",entryPolicy:[],exitPolicy:[{kind:"acceptance-written"},{kind:"estimate-present"}]},{id:"sprint",name:"Sprint Backlog",entryPolicy:[],exitPolicy:[]},n,{id:"review",name:"Review",entryPolicy:[],exitPolicy:o.definitionOfDone,review:true},{id:"done",name:"Increment",entryPolicy:[],exitPolicy:[]}]}var Se=Object.freeze({backlog:"Product Backlog",item:"Product Backlog Item",stage:"Column",iteration:"Sprint",increment:"Increment",ceremony:"Scrum Event",gate:"Sprint Review"});function W(o){return o.config}function j(o,n){let i=o.transitions.at(-1);return !i||i.by!=="system"||i.to.stage!=="backlog"||i.to.status!=="todo"?void 0:n?n.stages.find(g=>g.id===i.from.stage)?.review||i.from.status==="review"?i.from.stage:void 0:i.from.status==="review"?i.from.stage:void 0}function Pe(o,n,i){let r$1=o,g=r(r$1,n).blockers.filter(f=>!f.clearedAt);if(g.length){r$1=q(r$1,n,f=>({...f,blockers:f.blockers.map(y=>y.clearedAt?y:{...y,clearedAt:i})}));for(let f of g)r$1=c(r$1,"blocker.cleared","system",{id:n,blocker:f.id,reason:"sprint closed"},i);}for(let f of r$1.pending.filter(y=>y.item===n))r$1={...r$1,pending:r$1.pending.filter(y=>y.id!==f.id)},r$1=c(r$1,"pending.dropped","system",{id:f.id,item:n,reason:"sprint closed"},i);let p=r(r$1,n);return (p.stage!=="backlog"||p.status!=="todo")&&(r$1=u(r$1,n,{stage:"backlog",status:"todo"},"system",i)),x(r$1,n,p.type==="question"?["iteration"]:["iteration","role"])}function E(o,n,i){let r$1=N$1(o);if(!r$1)return o;let g=r$1.committed.map(e=>r(o,e)),p=g.filter(e=>e.status==="done").map(e=>e.id),f=g.filter(e=>e.status==="dropped").map(e=>e.id),y=g.filter(e=>e.status!=="done"&&e.status!=="dropped").map(e=>e.id),k=Object.values(o.items).filter(e=>e.type==="question"&&e.parent!==void 0&&y.includes(e.parent)&&e.status!=="done"&&e.status!=="dropped").map(e=>e.id),d=o;for(let e of [...y,...k])d=Pe(d,e,i);let t=e=>e.reduce((s,m)=>s+(o.items[m]?.weight??0),0);return d={...d,iterations:d.iterations.map(e=>{if(e.id!==r$1.id)return e;let{closing:s,...m}=e;return {...m,endedAt:i,outcome:n==="cancel"?"cancelled":"completed",carryover:y}})},c(d,"sprint.closed","system",{id:r$1.id,reason:n,done:p,carryover:y,carriedQuestions:k,dropped:f,doneWeight:t(p),committedWeight:t(r$1.committed),spent:r$1.spent,budget:r$1.budget},i)}function We(){return {name:"scrum",vocabulary:Se,validateConfig:ce,defaultStages:pe,defaultRoles:le,requiredCapabilities:["order-backlog","facilitate","deliver"],exclusiveCapabilities:["order-backlog"],plannerOptions(o){let n=W(o),i={schedulerMode:"level",dispatchStage:"in_progress"};return n.inProgressWipLimit!==void 0&&(i.concurrencyCap=n.inProgressWipLimit),n.estimateMode!==void 0&&(i.estimateMode=n.estimateMode),n.fallbackTokensPerWeight!==void 0&&(i.fallbackTokensPerWeight=n.fallbackTokensPerWeight),i},candidates(o){let n=N$1(o);return !n||n.closing?[]:Object.values(o.items).filter(i=>i.iteration===n.id&&(i.status==="todo"||i.status==="review")&&(i.stage==="sprint"||i.stage==="review"))},invariants(o,n){let i=N$1(o),r=W(o),g=i?K$1(i.budget,i.spent):{};return [`Sprint Goal: ${i?.goal??"(no open sprint)"}; Product Goal: ${r.productGoal}`,`Budget remaining: ${JSON.stringify(g)}; stop and hand off when it is gone`,`Definition of Done: ${r.definitionOfDone.map(p=>p.kind==="evidence"?`evidence ${p.evidenceKind}`:p.kind).join(", ")||"(none)"}`,`Do not change the scope of "${n.id}" or its acceptance criteria; raise open_questions instead`]},ceremonies:K(We),rules:ue(),metrics:o=>({...de(o)}),report(o){let n=N$1(o);return {closing:n?.closing===true,sprint:n?.id??null,reason:n?.closing?"budget":null,inFlight:n?Object.values(o.items).filter(i=>(i.iteration===n.id||n.committed.includes(i.id))&&i.status==="in_progress").map(i=>i.id):[]}},humanDefaults:{gates:["sprint-review"]},afterConfigChange(o){return N(o,W(o).definitionOfDone)},afterComplete(o,n,i){let r=N$1(o);return !r||!r.closing&&!L(r.budget,r.spent)?o:!Object.values(o.items).some(p=>(p.iteration===r.id||r.committed.includes(p.id))&&p.status==="in_progress")&&W(o).autoClose!==false?E(o,"budget",i):r.closing?o:c({...o,iterations:o.iterations.map(p=>p.id===r.id?{...p,closing:true}:p)},"sprint.closing","system",{id:r.id},i)}}}export{ae as a,K as b,ce as c,de as d,le as e,ue as f,pe as g,Se as h,W as i,j,E as k,We as l};//# sourceMappingURL=chunk-32NVJV5C.mjs.map
|
|
2
|
-
//# sourceMappingURL=chunk-32NVJV5C.mjs.map
|
package/dist/chunk-43GLYYA2.cjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkOSHBJIYD_cjs=require('./chunk-OSHBJIYD.cjs');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)||chunkOSHBJIYD_cjs.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||chunkOSHBJIYD_cjs.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)`:"";chunkOSHBJIYD_cjs.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
|
-
exports.a=I;exports.b=C;exports.c=N;exports.d=J;exports.e=M;exports.f=_;exports.g=D;exports.h=F;exports.i=L;exports.j=W;exports.k=G;exports.l=K;exports.m=H;//# sourceMappingURL=chunk-43GLYYA2.cjs.map
|
|
3
|
-
//# sourceMappingURL=chunk-43GLYYA2.cjs.map
|