ex-workflow 1.0.0 → 1.1.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 +12 -0
- package/README.md +314 -141
- 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-Cx63FX2K.d.ts → budget-Bd8KpGIr.d.ts} +1 -1
- package/dist/{budget-JyNKxP5N.d.cts → budget-CezCinPF.d.cts} +1 -1
- package/dist/chunk-6P3OKXSK.mjs +2 -0
- package/dist/chunk-6P3OKXSK.mjs.map +1 -0
- package/dist/{chunk-5PHK72VM.cjs → chunk-7FS6KWTG.cjs} +2 -2
- package/dist/{chunk-5PHK72VM.cjs.map → chunk-7FS6KWTG.cjs.map} +1 -1
- package/dist/chunk-APKA5FOU.cjs +2 -0
- package/dist/chunk-APKA5FOU.cjs.map +1 -0
- package/dist/chunk-ATCJ4IHP.mjs +2 -0
- package/dist/{chunk-Z2G7DGDF.mjs.map → chunk-ATCJ4IHP.mjs.map} +1 -1
- package/dist/chunk-C2IYMWE6.cjs +3 -0
- package/dist/chunk-C2IYMWE6.cjs.map +1 -0
- package/dist/chunk-EACZBAP3.cjs +2 -0
- package/dist/chunk-EACZBAP3.cjs.map +1 -0
- package/dist/chunk-EHBQBXWA.cjs +2 -0
- package/dist/{chunk-VXH2FAKV.cjs.map → chunk-EHBQBXWA.cjs.map} +1 -1
- package/dist/chunk-FQW2LETC.cjs +2 -0
- package/dist/chunk-FQW2LETC.cjs.map +1 -0
- package/dist/chunk-FTS75UIU.mjs +2 -0
- package/dist/{chunk-U3OXAO67.mjs.map → chunk-FTS75UIU.mjs.map} +1 -1
- package/dist/chunk-HCRVWMG4.cjs +2 -0
- package/dist/chunk-HCRVWMG4.cjs.map +1 -0
- package/dist/chunk-KLWZEXZU.mjs +3 -0
- package/dist/chunk-KLWZEXZU.mjs.map +1 -0
- package/dist/chunk-MW4HR7HC.mjs +2 -0
- package/dist/chunk-MW4HR7HC.mjs.map +1 -0
- package/dist/chunk-NDCQTRIV.mjs +2 -0
- package/dist/chunk-NDCQTRIV.mjs.map +1 -0
- package/dist/{chunk-7IG6EQI4.mjs → chunk-QZ6HD6DE.mjs} +3 -3
- package/dist/{chunk-7IG6EQI4.mjs.map → chunk-QZ6HD6DE.mjs.map} +1 -1
- package/dist/{chunk-HIHMBMB5.cjs → chunk-RL27372B.cjs} +2 -2
- package/dist/{chunk-HIHMBMB5.cjs.map → chunk-RL27372B.cjs.map} +1 -1
- package/dist/chunk-SP5MC7RR.mjs +2 -0
- package/dist/{chunk-QDMEM62U.mjs.map → chunk-SP5MC7RR.mjs.map} +1 -1
- package/dist/chunk-SYLO7FUL.mjs +2 -0
- package/dist/{chunk-3KFQPSRX.mjs.map → chunk-SYLO7FUL.mjs.map} +1 -1
- package/dist/chunk-T3V5UE34.mjs +2 -0
- package/dist/{chunk-UZQV73X7.mjs.map → chunk-T3V5UE34.mjs.map} +1 -1
- package/dist/{chunk-FKTCGQYB.cjs → chunk-TS66RAJR.cjs} +2 -2
- package/dist/{chunk-FKTCGQYB.cjs.map → chunk-TS66RAJR.cjs.map} +1 -1
- package/dist/{chunk-YRATJT7P.cjs → chunk-U23FUYPD.cjs} +4 -4
- package/dist/{chunk-YRATJT7P.cjs.map → chunk-U23FUYPD.cjs.map} +1 -1
- package/dist/{chunk-CYXVGHQM.cjs → chunk-YJQ5YJ7S.cjs} +2 -2
- package/dist/{chunk-CYXVGHQM.cjs.map → chunk-YJQ5YJ7S.cjs.map} +1 -1
- package/dist/chunk-YOS77GL3.mjs +2 -0
- package/dist/chunk-YOS77GL3.mjs.map +1 -0
- package/dist/chunk-YTG2MOD7.cjs +2 -0
- package/dist/chunk-YTG2MOD7.cjs.map +1 -0
- package/dist/chunk-YZJ6WFH4.mjs +2 -0
- package/dist/chunk-YZJ6WFH4.mjs.map +1 -0
- package/dist/cli/bin.cjs +1 -1
- package/dist/cli/bin.cjs.map +1 -1
- package/dist/cli/bin.mjs +1 -1
- package/dist/cli/bin.mjs.map +1 -1
- package/dist/cli/index.cjs +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/experimentation/index.cjs +2 -0
- package/dist/experimentation/index.cjs.map +1 -0
- package/dist/experimentation/index.d.cts +28 -0
- package/dist/experimentation/index.d.ts +28 -0
- package/dist/experimentation/index.mjs +2 -0
- package/dist/experimentation/index.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/investigation/index.cjs +2 -0
- package/dist/investigation/index.cjs.map +1 -0
- package/dist/investigation/index.d.cts +13 -0
- package/dist/investigation/index.d.ts +13 -0
- package/dist/investigation/index.mjs +2 -0
- package/dist/investigation/index.mjs.map +1 -0
- 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/schema/index.cjs +1 -1
- package/dist/schema/index.d.cts +3 -1
- package/dist/schema/index.d.ts +3 -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-BScHXlRx.d.cts +509 -0
- package/dist/types-BScHXlRx.d.ts +509 -0
- package/dist/types.d.cts +1 -388
- package/dist/types.d.ts +1 -388
- 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 +43 -20
- package/dist/chunk-3KFQPSRX.mjs +0 -2
- package/dist/chunk-5TXYMLBF.mjs +0 -3
- package/dist/chunk-5TXYMLBF.mjs.map +0 -1
- package/dist/chunk-MQWMQ4PD.mjs +0 -2
- package/dist/chunk-MQWMQ4PD.mjs.map +0 -1
- package/dist/chunk-QDMEM62U.mjs +0 -2
- package/dist/chunk-U3OXAO67.mjs +0 -2
- package/dist/chunk-UZQV73X7.mjs +0 -2
- package/dist/chunk-VXH2FAKV.cjs +0 -2
- package/dist/chunk-WOGK54HB.cjs +0 -3
- package/dist/chunk-WOGK54HB.cjs.map +0 -1
- package/dist/chunk-XMO2RCXB.cjs +0 -2
- package/dist/chunk-XMO2RCXB.cjs.map +0 -1
- package/dist/chunk-YBHHICTZ.mjs +0 -2
- package/dist/chunk-YBHHICTZ.mjs.map +0 -1
- package/dist/chunk-YJN4JEJU.cjs +0 -2
- package/dist/chunk-YJN4JEJU.cjs.map +0 -1
- package/dist/chunk-Z2G7DGDF.mjs +0 -2
package/dist/types.d.cts
CHANGED
|
@@ -1,388 +1 @@
|
|
|
1
|
-
|
|
2
|
-
type ItemStatus = "todo" | "in_progress" | "blocked" | "review" | "awaiting_human" | "done" | "dropped";
|
|
3
|
-
type ClassOfService = "expedite" | "fixed-date" | "standard" | "intangible";
|
|
4
|
-
interface Evidence {
|
|
5
|
-
kind: string;
|
|
6
|
-
ref: string;
|
|
7
|
-
by: string;
|
|
8
|
-
at: string;
|
|
9
|
-
}
|
|
10
|
-
interface Blocker {
|
|
11
|
-
id: string;
|
|
12
|
-
reason: string;
|
|
13
|
-
owner: string;
|
|
14
|
-
raisedAt: string;
|
|
15
|
-
clearedAt?: string;
|
|
16
|
-
}
|
|
17
|
-
interface Transition {
|
|
18
|
-
from: {
|
|
19
|
-
stage: string;
|
|
20
|
-
status: ItemStatus;
|
|
21
|
-
};
|
|
22
|
-
to: {
|
|
23
|
-
stage: string;
|
|
24
|
-
status: ItemStatus;
|
|
25
|
-
};
|
|
26
|
-
at: string;
|
|
27
|
-
by: string;
|
|
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
|
-
}
|
|
37
|
-
interface WorkItem {
|
|
38
|
-
id: string;
|
|
39
|
-
type: ItemType;
|
|
40
|
-
title: string;
|
|
41
|
-
description?: string;
|
|
42
|
-
dependsOn: string[];
|
|
43
|
-
priority?: number;
|
|
44
|
-
weight?: number;
|
|
45
|
-
deadline?: string;
|
|
46
|
-
classOfService?: ClassOfService;
|
|
47
|
-
stage: string;
|
|
48
|
-
status: ItemStatus;
|
|
49
|
-
role?: string;
|
|
50
|
-
parent?: string;
|
|
51
|
-
acceptance: string[];
|
|
52
|
-
evidence: Evidence[];
|
|
53
|
-
blockers: Blocker[];
|
|
54
|
-
transitions: Transition[];
|
|
55
|
-
iteration?: string;
|
|
56
|
-
traces?: string[];
|
|
57
|
-
tags?: string[];
|
|
58
|
-
/** bug / change-request: ids of items whose finished work this invalidates */
|
|
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;
|
|
64
|
-
}
|
|
65
|
-
/** Fields `editItem` / `exwf edit` may change. */
|
|
66
|
-
type ItemPatch = Partial<Omit<WorkItem, "id" | "stage" | "status" | "transitions" | "evidence" | "blockers">>;
|
|
67
|
-
/** Fields a caller supplies to addItem; the rest are defaulted. */
|
|
68
|
-
type NewItem = Pick<WorkItem, "id" | "title"> & Partial<Omit<WorkItem, "id" | "title" | "stage" | "status" | "evidence" | "blockers" | "transitions">> & {
|
|
69
|
-
stage?: string;
|
|
70
|
-
};
|
|
71
|
-
type Policy = {
|
|
72
|
-
kind: "evidence";
|
|
73
|
-
evidenceKind: string;
|
|
74
|
-
} | {
|
|
75
|
-
kind: "acceptance-written";
|
|
76
|
-
} | {
|
|
77
|
-
kind: "estimate-present";
|
|
78
|
-
} | {
|
|
79
|
-
kind: "no-open-blockers";
|
|
80
|
-
} | {
|
|
81
|
-
kind: "dependencies-done";
|
|
82
|
-
} | {
|
|
83
|
-
kind: "custom";
|
|
84
|
-
id: string;
|
|
85
|
-
description: string;
|
|
86
|
-
};
|
|
87
|
-
type GateRequirement = "human" | {
|
|
88
|
-
capability: string;
|
|
89
|
-
};
|
|
90
|
-
interface Gate {
|
|
91
|
-
id: string;
|
|
92
|
-
requires: GateRequirement[];
|
|
93
|
-
evidence: string[];
|
|
94
|
-
onFail: {
|
|
95
|
-
action: "block";
|
|
96
|
-
} | {
|
|
97
|
-
action: "return-to";
|
|
98
|
-
stage: string;
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
interface Stage {
|
|
102
|
-
id: string;
|
|
103
|
-
name: string;
|
|
104
|
-
wipLimit?: number;
|
|
105
|
-
entryPolicy: Policy[];
|
|
106
|
-
exitPolicy: Policy[];
|
|
107
|
-
gate?: Gate;
|
|
108
|
-
commitmentPoint?: boolean;
|
|
109
|
-
deliveryPoint?: boolean;
|
|
110
|
-
/** Items entering this stage wait for a reviewer (status "review") instead of "todo". */
|
|
111
|
-
review?: boolean;
|
|
112
|
-
}
|
|
113
|
-
interface Budget {
|
|
114
|
-
tokens?: number;
|
|
115
|
-
turns?: number;
|
|
116
|
-
wallclockMs?: number;
|
|
117
|
-
}
|
|
118
|
-
interface Spent {
|
|
119
|
-
tokens: number;
|
|
120
|
-
turns: number;
|
|
121
|
-
wallclockMs: number;
|
|
122
|
-
}
|
|
123
|
-
interface Iteration {
|
|
124
|
-
id: string;
|
|
125
|
-
goal: string;
|
|
126
|
-
budget: Budget;
|
|
127
|
-
spent: Spent;
|
|
128
|
-
startedAt: string;
|
|
129
|
-
endedAt?: string;
|
|
130
|
-
committed: string[];
|
|
131
|
-
carryover: string[];
|
|
132
|
-
outcome?: "completed" | "cancelled";
|
|
133
|
-
/** Budget is exhausted; in-flight items may finish, nothing new is dispatched. */
|
|
134
|
-
closing?: boolean;
|
|
135
|
-
}
|
|
136
|
-
type ModelTier = "small" | "medium" | "large";
|
|
137
|
-
type Capability = "order-backlog" | "define-acceptance" | "facilitate" | "deliver" | "review" | "verify" | "approve-gate" | "manage-flow" | "control-change" | "escalate";
|
|
138
|
-
interface Role {
|
|
139
|
-
id: string;
|
|
140
|
-
name: string;
|
|
141
|
-
modelTier: ModelTier;
|
|
142
|
-
resourceClass?: string;
|
|
143
|
-
maxConcurrent?: number;
|
|
144
|
-
capabilities: Capability[];
|
|
145
|
-
canApprove: string[];
|
|
146
|
-
inputs: string[];
|
|
147
|
-
outputs: string[];
|
|
148
|
-
do_not: string[];
|
|
149
|
-
constraints?: string[];
|
|
150
|
-
}
|
|
151
|
-
type Verdict = "done" | "blocked" | "needs-review" | "rework" | "escalate";
|
|
152
|
-
interface Handoff {
|
|
153
|
-
item: string;
|
|
154
|
-
role: string;
|
|
155
|
-
produced: Array<{
|
|
156
|
-
kind: string;
|
|
157
|
-
ref: string;
|
|
158
|
-
}>;
|
|
159
|
-
notes: string;
|
|
160
|
-
do_not: string[];
|
|
161
|
-
open_questions: string[];
|
|
162
|
-
verdict?: Verdict;
|
|
163
|
-
/** new work discovered while doing this item; lands in the FIRST stage (backlog), never in the iteration */
|
|
164
|
-
follow_ups?: NewItem[];
|
|
165
|
-
/** raised by the worker the moment it happens, e.g. "spec was vague here" */
|
|
166
|
-
lessons?: Array<{
|
|
167
|
-
text: string;
|
|
168
|
-
scope: Lesson["scope"];
|
|
169
|
-
}>;
|
|
170
|
-
}
|
|
171
|
-
interface Accounting {
|
|
172
|
-
item: string;
|
|
173
|
-
role: string;
|
|
174
|
-
model: string;
|
|
175
|
-
tokensIn: number;
|
|
176
|
-
tokensOut: number;
|
|
177
|
-
durationMs: number;
|
|
178
|
-
startedAt: string;
|
|
179
|
-
endedAt: string;
|
|
180
|
-
/** The tokens are a placeholder the host will correct with correctAccounting, not the host's usage figures. */
|
|
181
|
-
estimate?: boolean;
|
|
182
|
-
}
|
|
183
|
-
interface Event {
|
|
184
|
-
seq: number;
|
|
185
|
-
at: string;
|
|
186
|
-
type: string;
|
|
187
|
-
by: string;
|
|
188
|
-
payload: unknown;
|
|
189
|
-
}
|
|
190
|
-
interface PendingHuman {
|
|
191
|
-
id: string;
|
|
192
|
-
kind: "gate" | "decision";
|
|
193
|
-
item?: string;
|
|
194
|
-
gate?: string;
|
|
195
|
-
question: string;
|
|
196
|
-
raisedAt: string;
|
|
197
|
-
}
|
|
198
|
-
type LessonChange = {
|
|
199
|
-
kind: "agreement";
|
|
200
|
-
text: string;
|
|
201
|
-
replaces?: string;
|
|
202
|
-
} | {
|
|
203
|
-
kind: "dod";
|
|
204
|
-
policy: Policy;
|
|
205
|
-
} | {
|
|
206
|
-
kind: "backlog";
|
|
207
|
-
item: NewItem;
|
|
208
|
-
} | {
|
|
209
|
-
kind: "skill";
|
|
210
|
-
note: string;
|
|
211
|
-
};
|
|
212
|
-
interface Lesson {
|
|
213
|
-
id: string;
|
|
214
|
-
at: string;
|
|
215
|
-
text: string;
|
|
216
|
-
scope: "policy" | "skill" | "memory" | "spec" | "review";
|
|
217
|
-
status: "raised" | "adopted" | "dismissed";
|
|
218
|
-
from?: string;
|
|
219
|
-
item?: string;
|
|
220
|
-
suggestedChange?: LessonChange;
|
|
221
|
-
}
|
|
222
|
-
/** A deliverable recorded on a phase (gateReview input or engine-generated). */
|
|
223
|
-
interface Produced {
|
|
224
|
-
kind: string;
|
|
225
|
-
ref: string;
|
|
226
|
-
by: string;
|
|
227
|
-
at: string;
|
|
228
|
-
}
|
|
229
|
-
interface Phase {
|
|
230
|
-
id: string;
|
|
231
|
-
name: string;
|
|
232
|
-
deliverables: string[];
|
|
233
|
-
gate: Gate;
|
|
234
|
-
status: "pending" | "open" | "baselined" | "reopened";
|
|
235
|
-
/** planned budget; spent is tracked on the Iteration kickoff opens for the phase */
|
|
236
|
-
budget?: Budget;
|
|
237
|
-
/** phase-level deliverables (item evidence counts too) */
|
|
238
|
-
produced?: Produced[];
|
|
239
|
-
}
|
|
240
|
-
interface Baseline {
|
|
241
|
-
phase: string;
|
|
242
|
-
version: number;
|
|
243
|
-
at: string;
|
|
244
|
-
approvedBy: string[];
|
|
245
|
-
itemSnapshot: Record<string, WorkItem>;
|
|
246
|
-
}
|
|
247
|
-
type MethodologyName = "scrum" | "kanban" | "waterfall";
|
|
248
|
-
interface WorkflowState {
|
|
249
|
-
version: 1;
|
|
250
|
-
methodology: MethodologyName;
|
|
251
|
-
config: unknown;
|
|
252
|
-
items: Record<string, WorkItem>;
|
|
253
|
-
stages: Stage[];
|
|
254
|
-
roles: Record<string, Role>;
|
|
255
|
-
iterations: Iteration[];
|
|
256
|
-
phases?: Phase[];
|
|
257
|
-
baseline?: Baseline;
|
|
258
|
-
/** waterfall: every baseline ever taken, oldest first; `baseline` is the last one */
|
|
259
|
-
baselines?: Baseline[];
|
|
260
|
-
events: Event[];
|
|
261
|
-
accounting: Accounting[];
|
|
262
|
-
pending: PendingHuman[];
|
|
263
|
-
lessons: Lesson[];
|
|
264
|
-
/** adopted working agreements; synthesizeBrief appends them to invariants */
|
|
265
|
-
agreements: string[];
|
|
266
|
-
}
|
|
267
|
-
interface Action {
|
|
268
|
-
type: string;
|
|
269
|
-
by: string;
|
|
270
|
-
payload?: unknown;
|
|
271
|
-
}
|
|
272
|
-
interface Violation {
|
|
273
|
-
rule: string;
|
|
274
|
-
severity: "error" | "warning";
|
|
275
|
-
item?: string;
|
|
276
|
-
message: string;
|
|
277
|
-
fix: string;
|
|
278
|
-
}
|
|
279
|
-
interface Rule {
|
|
280
|
-
id: string;
|
|
281
|
-
severity: "error" | "warning";
|
|
282
|
-
check(state: WorkflowState, action: Action): Violation[];
|
|
283
|
-
}
|
|
284
|
-
interface ApplyResult {
|
|
285
|
-
state: WorkflowState;
|
|
286
|
-
warnings: Violation[];
|
|
287
|
-
}
|
|
288
|
-
interface Brief {
|
|
289
|
-
item: WorkItem;
|
|
290
|
-
role: Role;
|
|
291
|
-
modelTier: ModelTier;
|
|
292
|
-
invariants: string[];
|
|
293
|
-
do_not: string[];
|
|
294
|
-
acceptance: string[];
|
|
295
|
-
upstream: Array<{
|
|
296
|
-
item: string;
|
|
297
|
-
produced: Handoff["produced"];
|
|
298
|
-
notes: string;
|
|
299
|
-
}>;
|
|
300
|
-
/** earlier completions of THIS item (rework feedback) */
|
|
301
|
-
priorHandoffs: Array<{
|
|
302
|
-
role: string;
|
|
303
|
-
verdict: Verdict;
|
|
304
|
-
notes: string;
|
|
305
|
-
produced: Handoff["produced"];
|
|
306
|
-
at: string;
|
|
307
|
-
}>;
|
|
308
|
-
/** open bug/change-request items whose `affects` touches this item or its dependsOn */
|
|
309
|
-
relatedBugs: Array<{
|
|
310
|
-
id: string;
|
|
311
|
-
title: string;
|
|
312
|
-
affects: string[];
|
|
313
|
-
}>;
|
|
314
|
-
budgetRemaining: Budget;
|
|
315
|
-
gateAhead?: Gate;
|
|
316
|
-
/** for a question item: the escalating item's last handoff */
|
|
317
|
-
parent?: {
|
|
318
|
-
item: string;
|
|
319
|
-
role: string;
|
|
320
|
-
notes: string;
|
|
321
|
-
produced: Handoff["produced"];
|
|
322
|
-
open_questions: string[];
|
|
323
|
-
do_not: string[];
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
type CoreTerm = "backlog" | "item" | "stage" | "iteration" | "increment" | "ceremony" | "gate";
|
|
327
|
-
type CeremonyInput = {
|
|
328
|
-
by: string;
|
|
329
|
-
now?: string;
|
|
330
|
-
} & Record<string, unknown>;
|
|
331
|
-
type Ceremony = (state: WorkflowState, input: CeremonyInput) => ApplyResult;
|
|
332
|
-
interface PlannerOptions {
|
|
333
|
-
schedulerMode: "level" | "throughput";
|
|
334
|
-
/** Stage a todo item is pulled into when dispatched; a function decides per item; omitted/undefined = stay in its current stage. */
|
|
335
|
-
dispatchStage?: string | ((item: WorkItem) => string | undefined);
|
|
336
|
-
concurrencyCap?: number;
|
|
337
|
-
fairnessPolicy?: "none" | "aging";
|
|
338
|
-
maxDeferralRounds?: number;
|
|
339
|
-
deadlineStrategy?: "earliest-first" | "latest-first";
|
|
340
|
-
weightStrategy?: "higher-first" | "lower-first";
|
|
341
|
-
/** Priority the planner orders by; defaults to item.priority. */
|
|
342
|
-
priorityOf?(item: WorkItem): number | undefined;
|
|
343
|
-
/** Orders items of equal priority (after deadline/weight strategies); e.g. class of service, then age. */
|
|
344
|
-
tieBreaker?(a: WorkItem, b: WorkItem): number;
|
|
345
|
-
/** Statuses that occupy a stage's wipLimit slot; default ["in_progress"]. */
|
|
346
|
-
wipCounts?: ItemStatus[];
|
|
347
|
-
/** Per-item replacement for the target stage's wipLimit (e.g. an expedite bypass); undefined = no limit. */
|
|
348
|
-
wipLimitOf?(stage: Stage, item: WorkItem): number | undefined;
|
|
349
|
-
/** Role id to dispatch a todo item to (e.g. the phase's deliverer); undefined = default (item.role, then reviewer/deliverer by capability). */
|
|
350
|
-
roleFor?(item: WorkItem): string | undefined;
|
|
351
|
-
/** How estimateTokens prices a candidate; default "per-weight". */
|
|
352
|
-
estimateMode?: "per-weight" | "per-call";
|
|
353
|
-
/** Tokens per weight unit when no accounting history exists; default 20000. PlanOptions.fallbackTokensPerWeight wins. */
|
|
354
|
-
fallbackTokensPerWeight?: number;
|
|
355
|
-
}
|
|
356
|
-
interface Methodology<C = unknown> {
|
|
357
|
-
name: MethodologyName;
|
|
358
|
-
vocabulary: Record<CoreTerm, string>;
|
|
359
|
-
validateConfig(config: unknown): C;
|
|
360
|
-
defaultStages(config: C): Stage[];
|
|
361
|
-
defaultRoles(config: C): Role[];
|
|
362
|
-
requiredCapabilities: Capability[];
|
|
363
|
-
exclusiveCapabilities: Capability[];
|
|
364
|
-
plannerOptions(state: WorkflowState): PlannerOptions;
|
|
365
|
-
candidates(state: WorkflowState): WorkItem[];
|
|
366
|
-
invariants(state: WorkflowState, item: WorkItem): string[];
|
|
367
|
-
ceremonies: Record<string, Ceremony>;
|
|
368
|
-
rules: Rule[];
|
|
369
|
-
metrics(state: WorkflowState): Record<string, number | number[] | Record<string, number>>;
|
|
370
|
-
humanDefaults: {
|
|
371
|
-
gates: "all" | "none" | string[];
|
|
372
|
-
};
|
|
373
|
-
/** Called after complete(); lets the methodology react (e.g. close a sprint when the budget is gone). */
|
|
374
|
-
afterComplete?(state: WorkflowState, itemId: string, now: string): WorkflowState;
|
|
375
|
-
/** Config keys that cannot change after init (changeConfig refuses them). */
|
|
376
|
-
lockedConfigKeys?: string[];
|
|
377
|
-
/** Called by changeConfig after the new config is stored; keeps derived state (e.g. stage policies) in step. */
|
|
378
|
-
afterConfigChange?(state: WorkflowState, now: string): WorkflowState;
|
|
379
|
-
/** Methodology-specific status for hosts (e.g. cadences due); printed by `exwf status`. */
|
|
380
|
-
report?(state: WorkflowState): Record<string, unknown>;
|
|
381
|
-
/** 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). */
|
|
382
|
-
afterDecide?(state: WorkflowState, entry: PendingHuman, decision: "approve" | "reject", by: string, note: string, now: string): WorkflowState;
|
|
383
|
-
}
|
|
384
|
-
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"
|
|
385
|
-
/** reserved: never thrown; kept for type compatibility */
|
|
386
|
-
| "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";
|
|
387
|
-
|
|
388
|
-
export type { Accounting, Action, ApplyResult, Baseline, Blocker, Brief, Budget, Capability, Ceremony, CeremonyInput, ClassOfService, CoreTerm, ErrorCode, Event, Evidence, Gate, GateRequirement, Handoff, ImpactAnalysis, ItemPatch, ItemStatus, ItemType, Iteration, Lesson, LessonChange, Methodology, MethodologyName, ModelTier, NewItem, PendingHuman, Phase, PlannerOptions, Policy, Produced, Role, Rule, Spent, Stage, Transition, Verdict, Violation, WorkItem, WorkflowState };
|
|
1
|
+
export { A as Accounting, y as Action, x as ApplyResult, z as Baseline, D as Blocker, B as Brief, a as Budget, C as Capability, f as Ceremony, n as CeremonyInput, m as ClassOfService, k as CoreTerm, s as ErrorCode, o as Event, u as Evidence, G as Gate, p as GateRequirement, H as Handoff, F as ImpactAnalysis, v as ItemPatch, j as ItemStatus, J as ItemType, w as Iteration, L as Lesson, K as LessonChange, M as Methodology, t as MethodologyName, Q as ModelTier, N as NewItem, r as PendingHuman, q as Phase, U as PlannerOptions, P as Policy, X as Produced, R as Role, g as Rule, Y as Spent, S as Stage, T as Transition, Z as Verdict, V as Violation, l as WorkItem, W as WorkflowState } from './types-BScHXlRx.cjs';
|