mainflow 0.6.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/LICENSE +21 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +324 -0
- package/dist/dist-BktkzRuK.js +1615 -0
- package/dist/dist-D2NK-QQP.js +511 -0
- package/dist/facts.d.ts +518 -0
- package/dist/facts.js +516 -0
- package/dist/hooks.d.ts +41 -0
- package/dist/hooks.js +171 -0
- package/dist/host.d.ts +24 -0
- package/dist/host.js +89 -0
- package/dist/launch-BR70uSMc.js +584 -0
- package/dist/launch.d.ts +44 -0
- package/dist/launch.js +2 -0
- package/dist/web/assets/index-BshtZ25f.js +78 -0
- package/dist/web/assets/index-qO7SaeFe.css +1 -0
- package/dist/web/assets/index.browser-C_4gp6WJ.js +169 -0
- package/dist/web/index.html +13 -0
- package/package.json +48 -0
package/dist/facts.d.ts
ADDED
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region ../schema/dist/index.d.ts
|
|
3
|
+
export declare const FORMAT_VERSION = 2;
|
|
4
|
+
export declare const ID_PATTERNS: {
|
|
5
|
+
readonly mainline: RegExp;
|
|
6
|
+
readonly task: RegExp;
|
|
7
|
+
readonly checklistItem: RegExp;
|
|
8
|
+
readonly criterion: RegExp;
|
|
9
|
+
readonly decision: RegExp;
|
|
10
|
+
readonly action: RegExp;
|
|
11
|
+
readonly issue: RegExp;
|
|
12
|
+
readonly finding: RegExp;
|
|
13
|
+
};
|
|
14
|
+
export declare const CHECKLIST_REF: RegExp;
|
|
15
|
+
export declare const SLUG: RegExp;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/facts.d.ts
|
|
18
|
+
export interface CommandSpec {
|
|
19
|
+
usage: string;
|
|
20
|
+
summary: string;
|
|
21
|
+
/** Number of positional arguments after the command words */
|
|
22
|
+
args: number;
|
|
23
|
+
/** Extra positional arguments the command also accepts */
|
|
24
|
+
optionalArgs?: number;
|
|
25
|
+
needsHub: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const COMMAND_SPECS: {
|
|
28
|
+
readonly init: {
|
|
29
|
+
readonly usage: 'init <hub-name>';
|
|
30
|
+
readonly summary: 'Create .mainflow/ in the current directory';
|
|
31
|
+
readonly args: 1;
|
|
32
|
+
readonly needsHub: false;
|
|
33
|
+
};
|
|
34
|
+
readonly status: {
|
|
35
|
+
readonly usage: 'status [--all]';
|
|
36
|
+
readonly summary: 'List mainlines with checklist progress';
|
|
37
|
+
readonly args: 0;
|
|
38
|
+
readonly needsHub: true;
|
|
39
|
+
};
|
|
40
|
+
readonly check: {
|
|
41
|
+
readonly usage: 'check';
|
|
42
|
+
readonly summary: 'Validate every file under .mainflow/';
|
|
43
|
+
readonly args: 0;
|
|
44
|
+
readonly needsHub: true;
|
|
45
|
+
};
|
|
46
|
+
readonly migrate: {
|
|
47
|
+
readonly usage: 'migrate [--dry-run]';
|
|
48
|
+
readonly summary: 'Convert the hub to the data format this CLI reads; --dry-run lists the changes without writing';
|
|
49
|
+
readonly args: 0;
|
|
50
|
+
readonly needsHub: true;
|
|
51
|
+
};
|
|
52
|
+
readonly ui: {
|
|
53
|
+
readonly usage: 'ui [--port <port>] [--no-open]';
|
|
54
|
+
readonly summary: 'Open the web interface at {hub}.mainflow.localhost, starting it on a free port if it is not running';
|
|
55
|
+
readonly args: 0;
|
|
56
|
+
readonly needsHub: true;
|
|
57
|
+
};
|
|
58
|
+
readonly 'repo add': {
|
|
59
|
+
readonly usage: 'repo add <name> <path>';
|
|
60
|
+
readonly summary: 'Register a repository that tasks can point at (path relative to the hub root)';
|
|
61
|
+
readonly args: 2;
|
|
62
|
+
readonly needsHub: true;
|
|
63
|
+
};
|
|
64
|
+
readonly 'hub add': {
|
|
65
|
+
readonly usage: 'hub add <name> <path>';
|
|
66
|
+
readonly summary: 'Register another hub that references may point into as {name}:m001 (path relative to the hub root)';
|
|
67
|
+
readonly args: 2;
|
|
68
|
+
readonly needsHub: true;
|
|
69
|
+
};
|
|
70
|
+
readonly 'session start': {
|
|
71
|
+
readonly usage: 'session start [--agent <agent>] [--id <id>] [--delegated-from <session>] [--handoff-from <session>]';
|
|
72
|
+
readonly summary: 'Start a session; --handoff-from carries over its unfinished actions';
|
|
73
|
+
readonly args: 0;
|
|
74
|
+
readonly needsHub: true;
|
|
75
|
+
};
|
|
76
|
+
readonly 'session show': {
|
|
77
|
+
readonly usage: 'session show [session]';
|
|
78
|
+
readonly summary: 'Print the briefing a hook would give this session';
|
|
79
|
+
readonly args: 0;
|
|
80
|
+
readonly optionalArgs: 1;
|
|
81
|
+
readonly needsHub: true;
|
|
82
|
+
};
|
|
83
|
+
readonly 'session set': {
|
|
84
|
+
readonly usage: 'session set <session> --status <status>';
|
|
85
|
+
readonly summary: 'Change session status';
|
|
86
|
+
readonly args: 1;
|
|
87
|
+
readonly needsHub: true;
|
|
88
|
+
};
|
|
89
|
+
readonly 'session end': {
|
|
90
|
+
readonly usage: 'session end [session]';
|
|
91
|
+
readonly summary: 'Mark a session as ended';
|
|
92
|
+
readonly args: 0;
|
|
93
|
+
readonly optionalArgs: 1;
|
|
94
|
+
readonly needsHub: true;
|
|
95
|
+
};
|
|
96
|
+
readonly 'session archive': {
|
|
97
|
+
readonly usage: 'session archive <session>';
|
|
98
|
+
readonly summary: 'Hide a session from default views; the status stays as it is';
|
|
99
|
+
readonly args: 1;
|
|
100
|
+
readonly needsHub: true;
|
|
101
|
+
};
|
|
102
|
+
readonly 'session unarchive': {
|
|
103
|
+
readonly usage: 'session unarchive <session>';
|
|
104
|
+
readonly summary: 'Show an archived session again';
|
|
105
|
+
readonly args: 1;
|
|
106
|
+
readonly needsHub: true;
|
|
107
|
+
};
|
|
108
|
+
readonly 'action add': {
|
|
109
|
+
readonly usage: 'action add <text> --serves <m/t#c>[,<m/t#c>] [--before <a>] [--session <session>]';
|
|
110
|
+
readonly summary: 'Add an action to the session queue';
|
|
111
|
+
readonly args: 1;
|
|
112
|
+
readonly needsHub: true;
|
|
113
|
+
};
|
|
114
|
+
readonly 'action set': {
|
|
115
|
+
readonly usage: 'action set <a|session#a> [--status] [--text] [--serves] [--before <a>] [--note <text>] [--session <session>]';
|
|
116
|
+
readonly summary: 'Change, reorder or finish an action';
|
|
117
|
+
readonly args: 1;
|
|
118
|
+
readonly needsHub: true;
|
|
119
|
+
};
|
|
120
|
+
readonly hook: {
|
|
121
|
+
readonly usage: 'hook <platform> <event>';
|
|
122
|
+
readonly summary: 'Handle a host hook event read from stdin, e.g. hook claude-code session-start';
|
|
123
|
+
readonly args: 2;
|
|
124
|
+
readonly needsHub: false;
|
|
125
|
+
};
|
|
126
|
+
readonly 'new mainline': {
|
|
127
|
+
readonly usage: 'new mainline <slug> --title <title>';
|
|
128
|
+
readonly summary: 'Create mainline.md with the next id and the section template; write the rest in the file';
|
|
129
|
+
readonly args: 1;
|
|
130
|
+
readonly needsHub: true;
|
|
131
|
+
};
|
|
132
|
+
readonly 'new task': {
|
|
133
|
+
readonly usage: 'new task <m> <slug> --title <title> [--kind phase|branch] [--parent <t>] [--repo <name>]';
|
|
134
|
+
readonly summary: 'Create task.md with the next id and the section template; write the rest in the file';
|
|
135
|
+
readonly args: 2;
|
|
136
|
+
readonly needsHub: true;
|
|
137
|
+
};
|
|
138
|
+
readonly 'new decision': {
|
|
139
|
+
readonly usage: 'new decision <m> <slug> --title <title> [--status proposed] [--by user|ai|relay] [--affects <m/t or m/t#c>,...]';
|
|
140
|
+
readonly summary: 'Create a decision file; proposed while the question is still open';
|
|
141
|
+
readonly args: 2;
|
|
142
|
+
readonly needsHub: true;
|
|
143
|
+
};
|
|
144
|
+
readonly 'new issue': {
|
|
145
|
+
readonly usage: 'new issue <slug> --title <title> [--origin <ref>]';
|
|
146
|
+
readonly summary: 'Create an issue file for a follow-up that must outlive its mainline';
|
|
147
|
+
readonly args: 1;
|
|
148
|
+
readonly needsHub: true;
|
|
149
|
+
};
|
|
150
|
+
readonly 'new finding': {
|
|
151
|
+
readonly usage: 'new finding <slug> --title <title> [--origin <ref>] [--labels a,b]';
|
|
152
|
+
readonly summary: 'Create a finding file for a lesson the next task should read';
|
|
153
|
+
readonly args: 1;
|
|
154
|
+
readonly needsHub: true;
|
|
155
|
+
};
|
|
156
|
+
readonly 'mainline set': {
|
|
157
|
+
readonly usage: 'mainline set <m> --status <status>';
|
|
158
|
+
readonly summary: 'Change status; done needs every criterion met and no proposed decision';
|
|
159
|
+
readonly args: 1;
|
|
160
|
+
readonly needsHub: true;
|
|
161
|
+
};
|
|
162
|
+
readonly 'mainline archive': {
|
|
163
|
+
readonly usage: 'mainline archive <m>';
|
|
164
|
+
readonly summary: 'Hide a mainline from default lists';
|
|
165
|
+
readonly args: 1;
|
|
166
|
+
readonly needsHub: true;
|
|
167
|
+
};
|
|
168
|
+
readonly 'mainline unarchive': {
|
|
169
|
+
readonly usage: 'mainline unarchive <m>';
|
|
170
|
+
readonly summary: 'Show an archived mainline again';
|
|
171
|
+
readonly args: 1;
|
|
172
|
+
readonly needsHub: true;
|
|
173
|
+
};
|
|
174
|
+
readonly 'criterion check': {
|
|
175
|
+
readonly usage: 'criterion check <m#r> --evidence <evidence>';
|
|
176
|
+
readonly summary: 'Mark a criterion as met';
|
|
177
|
+
readonly args: 1;
|
|
178
|
+
readonly needsHub: true;
|
|
179
|
+
};
|
|
180
|
+
readonly 'criterion uncheck': {
|
|
181
|
+
readonly usage: 'criterion uncheck <m#r>';
|
|
182
|
+
readonly summary: 'Mark a criterion as not met';
|
|
183
|
+
readonly args: 1;
|
|
184
|
+
readonly needsHub: true;
|
|
185
|
+
};
|
|
186
|
+
readonly 'task set': {
|
|
187
|
+
readonly usage: 'task set <m/t> [--status] [--reason --waiting-for --signal] [--repo] [--branch --worktree --base --merge]';
|
|
188
|
+
readonly summary: 'Change status, repository or branch state; --status blocked needs --reason';
|
|
189
|
+
readonly args: 1;
|
|
190
|
+
readonly needsHub: true;
|
|
191
|
+
};
|
|
192
|
+
readonly 'item check': {
|
|
193
|
+
readonly usage: 'item check <m/t#c> --evidence <evidence>';
|
|
194
|
+
readonly summary: 'Check an item with evidence';
|
|
195
|
+
readonly args: 1;
|
|
196
|
+
readonly needsHub: true;
|
|
197
|
+
};
|
|
198
|
+
readonly 'item uncheck': {
|
|
199
|
+
readonly usage: 'item uncheck <m/t#c>';
|
|
200
|
+
readonly summary: 'Uncheck an item';
|
|
201
|
+
readonly args: 1;
|
|
202
|
+
readonly needsHub: true;
|
|
203
|
+
};
|
|
204
|
+
readonly 'decision accept': {
|
|
205
|
+
readonly usage: 'decision accept <m/d> [--by user|ai|relay]';
|
|
206
|
+
readonly summary: 'Settle a proposed decision; the items it affects stop waiting for it';
|
|
207
|
+
readonly args: 1;
|
|
208
|
+
readonly needsHub: true;
|
|
209
|
+
};
|
|
210
|
+
readonly 'item drop': {
|
|
211
|
+
readonly usage: 'item drop <m/t#c> [--by <ref>] [--note <text>]';
|
|
212
|
+
readonly summary: 'Mark an item as no longer needed, naming what replaced it';
|
|
213
|
+
readonly args: 1;
|
|
214
|
+
readonly needsHub: true;
|
|
215
|
+
};
|
|
216
|
+
readonly 'issue plan': {
|
|
217
|
+
readonly usage: 'issue plan <i> <m/t>';
|
|
218
|
+
readonly summary: 'Schedule an issue into the task that will carry it out';
|
|
219
|
+
readonly args: 2;
|
|
220
|
+
readonly needsHub: true;
|
|
221
|
+
};
|
|
222
|
+
readonly 'issue close': {
|
|
223
|
+
readonly usage: 'issue close <i> --by <what closed it>';
|
|
224
|
+
readonly summary: 'Close an issue';
|
|
225
|
+
readonly args: 1;
|
|
226
|
+
readonly needsHub: true;
|
|
227
|
+
};
|
|
228
|
+
readonly 'issue reopen': {
|
|
229
|
+
readonly usage: 'issue reopen <i>';
|
|
230
|
+
readonly summary: 'Reopen an issue';
|
|
231
|
+
readonly args: 1;
|
|
232
|
+
readonly needsHub: true;
|
|
233
|
+
};
|
|
234
|
+
readonly 'issue archive': {
|
|
235
|
+
readonly usage: 'issue archive <i>';
|
|
236
|
+
readonly summary: 'Hide an issue from default views; the status stays as it is';
|
|
237
|
+
readonly args: 1;
|
|
238
|
+
readonly needsHub: true;
|
|
239
|
+
};
|
|
240
|
+
readonly 'issue unarchive': {
|
|
241
|
+
readonly usage: 'issue unarchive <i>';
|
|
242
|
+
readonly summary: 'Show an archived issue again';
|
|
243
|
+
readonly args: 1;
|
|
244
|
+
readonly needsHub: true;
|
|
245
|
+
};
|
|
246
|
+
readonly 'issue list': {
|
|
247
|
+
readonly usage: 'issue list [--all]';
|
|
248
|
+
readonly summary: 'List open and planned issues (--all includes closed)';
|
|
249
|
+
readonly args: 0;
|
|
250
|
+
readonly needsHub: true;
|
|
251
|
+
};
|
|
252
|
+
readonly 'finding set': {
|
|
253
|
+
readonly usage: 'finding set <f> --status valid|obsolete';
|
|
254
|
+
readonly summary: 'Mark a finding obsolete or valid again';
|
|
255
|
+
readonly args: 1;
|
|
256
|
+
readonly needsHub: true;
|
|
257
|
+
};
|
|
258
|
+
readonly 'finding archive': {
|
|
259
|
+
readonly usage: 'finding archive <f>';
|
|
260
|
+
readonly summary: 'Hide a finding from default views; the status stays as it is';
|
|
261
|
+
readonly args: 1;
|
|
262
|
+
readonly needsHub: true;
|
|
263
|
+
};
|
|
264
|
+
readonly 'finding unarchive': {
|
|
265
|
+
readonly usage: 'finding unarchive <f>';
|
|
266
|
+
readonly summary: 'Show an archived finding again';
|
|
267
|
+
readonly args: 1;
|
|
268
|
+
readonly needsHub: true;
|
|
269
|
+
};
|
|
270
|
+
readonly 'finding list': {
|
|
271
|
+
readonly usage: 'finding list [--all]';
|
|
272
|
+
readonly summary: 'List valid findings (--all includes obsolete)';
|
|
273
|
+
readonly args: 0;
|
|
274
|
+
readonly needsHub: true;
|
|
275
|
+
};
|
|
276
|
+
readonly 'ops add': {
|
|
277
|
+
readonly usage: 'ops add --target <system> --op <operation> --result <result> [--ref <ref>]';
|
|
278
|
+
readonly summary: 'Append an external operation to the audit log';
|
|
279
|
+
readonly args: 0;
|
|
280
|
+
readonly needsHub: true;
|
|
281
|
+
};
|
|
282
|
+
readonly 'ops list': {
|
|
283
|
+
readonly usage: 'ops list [--month YYYY-MM]';
|
|
284
|
+
readonly summary: 'List logged external operations';
|
|
285
|
+
readonly args: 0;
|
|
286
|
+
readonly needsHub: true;
|
|
287
|
+
};
|
|
288
|
+
readonly 'decision supersede': {
|
|
289
|
+
readonly usage: 'decision supersede <m/d> --by <d>';
|
|
290
|
+
readonly summary: 'Mark a decision as replaced by another';
|
|
291
|
+
readonly args: 1;
|
|
292
|
+
readonly needsHub: true;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
export type CommandName = keyof typeof COMMAND_SPECS;
|
|
296
|
+
export declare const OPTIONS: {
|
|
297
|
+
readonly title: {
|
|
298
|
+
readonly type: 'string';
|
|
299
|
+
};
|
|
300
|
+
readonly status: {
|
|
301
|
+
readonly type: 'string';
|
|
302
|
+
};
|
|
303
|
+
readonly kind: {
|
|
304
|
+
readonly type: 'string';
|
|
305
|
+
};
|
|
306
|
+
readonly parent: {
|
|
307
|
+
readonly type: 'string';
|
|
308
|
+
};
|
|
309
|
+
readonly repo: {
|
|
310
|
+
readonly type: 'string';
|
|
311
|
+
};
|
|
312
|
+
readonly evidence: {
|
|
313
|
+
readonly type: 'string';
|
|
314
|
+
};
|
|
315
|
+
readonly by: {
|
|
316
|
+
readonly type: 'string';
|
|
317
|
+
};
|
|
318
|
+
readonly port: {
|
|
319
|
+
readonly type: 'string';
|
|
320
|
+
};
|
|
321
|
+
readonly 'no-open': {
|
|
322
|
+
readonly type: 'boolean';
|
|
323
|
+
readonly default: false;
|
|
324
|
+
};
|
|
325
|
+
readonly session: {
|
|
326
|
+
readonly type: 'string';
|
|
327
|
+
};
|
|
328
|
+
readonly agent: {
|
|
329
|
+
readonly type: 'string';
|
|
330
|
+
};
|
|
331
|
+
readonly id: {
|
|
332
|
+
readonly type: 'string';
|
|
333
|
+
};
|
|
334
|
+
readonly 'delegated-from': {
|
|
335
|
+
readonly type: 'string';
|
|
336
|
+
};
|
|
337
|
+
readonly 'handoff-from': {
|
|
338
|
+
readonly type: 'string';
|
|
339
|
+
};
|
|
340
|
+
readonly text: {
|
|
341
|
+
readonly type: 'string';
|
|
342
|
+
};
|
|
343
|
+
readonly serves: {
|
|
344
|
+
readonly type: 'string';
|
|
345
|
+
};
|
|
346
|
+
readonly before: {
|
|
347
|
+
readonly type: 'string';
|
|
348
|
+
};
|
|
349
|
+
readonly note: {
|
|
350
|
+
readonly type: 'string';
|
|
351
|
+
};
|
|
352
|
+
readonly reason: {
|
|
353
|
+
readonly type: 'string';
|
|
354
|
+
};
|
|
355
|
+
readonly 'waiting-for': {
|
|
356
|
+
readonly type: 'string';
|
|
357
|
+
};
|
|
358
|
+
readonly signal: {
|
|
359
|
+
readonly type: 'string';
|
|
360
|
+
};
|
|
361
|
+
readonly branch: {
|
|
362
|
+
readonly type: 'string';
|
|
363
|
+
};
|
|
364
|
+
readonly worktree: {
|
|
365
|
+
readonly type: 'string';
|
|
366
|
+
};
|
|
367
|
+
readonly base: {
|
|
368
|
+
readonly type: 'string';
|
|
369
|
+
};
|
|
370
|
+
readonly merge: {
|
|
371
|
+
readonly type: 'string';
|
|
372
|
+
};
|
|
373
|
+
readonly affects: {
|
|
374
|
+
readonly type: 'string';
|
|
375
|
+
};
|
|
376
|
+
readonly origin: {
|
|
377
|
+
readonly type: 'string';
|
|
378
|
+
};
|
|
379
|
+
readonly labels: {
|
|
380
|
+
readonly type: 'string';
|
|
381
|
+
};
|
|
382
|
+
readonly target: {
|
|
383
|
+
readonly type: 'string';
|
|
384
|
+
};
|
|
385
|
+
readonly op: {
|
|
386
|
+
readonly type: 'string';
|
|
387
|
+
};
|
|
388
|
+
readonly result: {
|
|
389
|
+
readonly type: 'string';
|
|
390
|
+
};
|
|
391
|
+
readonly ref: {
|
|
392
|
+
readonly type: 'string';
|
|
393
|
+
};
|
|
394
|
+
readonly month: {
|
|
395
|
+
readonly type: 'string';
|
|
396
|
+
};
|
|
397
|
+
readonly all: {
|
|
398
|
+
readonly type: 'boolean';
|
|
399
|
+
readonly default: false;
|
|
400
|
+
};
|
|
401
|
+
readonly 'dry-run': {
|
|
402
|
+
readonly type: 'boolean';
|
|
403
|
+
readonly default: false;
|
|
404
|
+
};
|
|
405
|
+
readonly version: {
|
|
406
|
+
readonly type: 'boolean';
|
|
407
|
+
readonly default: false;
|
|
408
|
+
};
|
|
409
|
+
readonly help: {
|
|
410
|
+
readonly type: 'boolean';
|
|
411
|
+
readonly default: false;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
export declare const STATUSES: {
|
|
415
|
+
readonly mainline: readonly ["planning", "active", "paused", "done", "dropped"];
|
|
416
|
+
readonly task: readonly ["todo", "doing", "blocked", "done", "dropped"];
|
|
417
|
+
readonly action: readonly ["todo", "doing", "blocked", "done", "dropped"];
|
|
418
|
+
readonly decision: readonly ["proposed", "accepted", "superseded"];
|
|
419
|
+
readonly issue: readonly ["open", "planned", "closed"];
|
|
420
|
+
readonly finding: readonly ["valid", "obsolete"];
|
|
421
|
+
readonly session: readonly ["active", "paused", "ended", "handed-off"];
|
|
422
|
+
readonly merge: readonly ["open", "merged", "abandoned"];
|
|
423
|
+
readonly decider: readonly ["user", "ai", "relay"];
|
|
424
|
+
};
|
|
425
|
+
/** Reference formats, one example each, in the order a reader meets them. */
|
|
426
|
+
export declare const REFERENCES: readonly [{
|
|
427
|
+
readonly target: 'mainline';
|
|
428
|
+
readonly format: 'm{NNN}';
|
|
429
|
+
readonly example: 'm001';
|
|
430
|
+
}, {
|
|
431
|
+
readonly target: 'task';
|
|
432
|
+
readonly format: 'm{NNN}/t{NNN}';
|
|
433
|
+
readonly example: 'm001/t002';
|
|
434
|
+
}, {
|
|
435
|
+
readonly target: 'checklist item';
|
|
436
|
+
readonly format: 'm{NNN}/t{NNN}#c{NNN}';
|
|
437
|
+
readonly example: 'm001/t002#c003';
|
|
438
|
+
}, {
|
|
439
|
+
readonly target: 'criterion';
|
|
440
|
+
readonly format: 'm{NNN}#r{NNN}';
|
|
441
|
+
readonly example: 'm001#r001';
|
|
442
|
+
}, {
|
|
443
|
+
readonly target: 'decision';
|
|
444
|
+
readonly format: 'm{NNN}/d{NNN}';
|
|
445
|
+
readonly example: 'm001/d001';
|
|
446
|
+
}, {
|
|
447
|
+
readonly target: 'issue';
|
|
448
|
+
readonly format: 'i{NNN}';
|
|
449
|
+
readonly example: 'i001';
|
|
450
|
+
}, {
|
|
451
|
+
readonly target: 'finding';
|
|
452
|
+
readonly format: 'f{NNN}';
|
|
453
|
+
readonly example: 'f001';
|
|
454
|
+
}, {
|
|
455
|
+
readonly target: 'another hub';
|
|
456
|
+
readonly format: '{hub}:{reference}';
|
|
457
|
+
readonly example: 'other-hub:m001/t002';
|
|
458
|
+
}, {
|
|
459
|
+
readonly target: 'action';
|
|
460
|
+
readonly format: '{sessionId}#a{NNN}';
|
|
461
|
+
readonly example: 'claude-code-1a2b3c4d#a003';
|
|
462
|
+
}];
|
|
463
|
+
/** Relation types a document's links take; readers derive the reverse direction. */
|
|
464
|
+
export declare const LINKS: {
|
|
465
|
+
readonly rels: readonly ["depends-on", "relates", "split-from"];
|
|
466
|
+
};
|
|
467
|
+
/** Where each kind of entry lives under the hub root. */
|
|
468
|
+
export declare const LAYOUT: {
|
|
469
|
+
readonly config: '.mainflow/config.yaml';
|
|
470
|
+
readonly mainline: '.mainflow/mainlines/m{NNN}-{slug}/mainline.md';
|
|
471
|
+
readonly decision: '.mainflow/mainlines/m{NNN}-{slug}/decisions/d{NNN}-{slug}.md';
|
|
472
|
+
readonly task: '.mainflow/mainlines/m{NNN}-{slug}/tasks/t{NNN}-{slug}/task.md';
|
|
473
|
+
readonly issue: '.mainflow/issues/i{NNN}-{slug}.md';
|
|
474
|
+
readonly finding: '.mainflow/findings/f{NNN}-{slug}.md';
|
|
475
|
+
readonly ops: '.mainflow/ops/{YYYY-MM}.log';
|
|
476
|
+
readonly sessions: '.mainflow/local/sessions/{sessionId}.yaml';
|
|
477
|
+
};
|
|
478
|
+
/** Statuses that close each kind of document; the CLI stamps closedAt when a document enters one. */
|
|
479
|
+
export declare const CLOSED_STATUSES: {
|
|
480
|
+
readonly mainline: readonly ['done', 'dropped'];
|
|
481
|
+
readonly task: readonly ['done', 'dropped'];
|
|
482
|
+
readonly decision: readonly ['superseded'];
|
|
483
|
+
readonly issue: readonly ['closed'];
|
|
484
|
+
readonly finding: readonly ['obsolete'];
|
|
485
|
+
};
|
|
486
|
+
/** Classification every document shares: one category from the list (a hub adds more in config.yaml), P0 to P3. */
|
|
487
|
+
export declare const CLASSIFICATION: {
|
|
488
|
+
readonly categories: readonly ["feature", "fix", "refactor", "docs", "research", "ops", "chore"];
|
|
489
|
+
readonly priorities: readonly ["P0", "P1", "P2", "P3"];
|
|
490
|
+
readonly defaultPriority: "P2";
|
|
491
|
+
};
|
|
492
|
+
/** Body sections each document is created with; the task sections in `taskRequired` must be filled while it is open. */
|
|
493
|
+
export declare const SECTIONS: {
|
|
494
|
+
readonly mainline: readonly ["概述", "背景與前置", "範圍與不做", "限制"];
|
|
495
|
+
readonly task: readonly ["目標", "背景", "做法", "完成定義", "不做", "紀錄", "接手須知"];
|
|
496
|
+
readonly taskRequired: readonly ["目標", "完成定義"];
|
|
497
|
+
readonly decision: readonly ["背景", "選項", "建議", "決定", "理由"];
|
|
498
|
+
readonly issue: readonly ["背景", "要做的事", "完成條件"];
|
|
499
|
+
readonly finding: readonly ["發現", "影響", "做法"];
|
|
500
|
+
};
|
|
501
|
+
/** One front matter field: its name, whether a document is invalid without it, and what it holds. */
|
|
502
|
+
export interface FieldSpec {
|
|
503
|
+
name: string;
|
|
504
|
+
required: boolean;
|
|
505
|
+
description: string;
|
|
506
|
+
}
|
|
507
|
+
/** Every front matter field of each document and list entry; facts.test keeps it equal to the schema. */
|
|
508
|
+
export declare const FIELDS: {
|
|
509
|
+
readonly mainline: readonly [...FieldSpec[], FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec];
|
|
510
|
+
readonly task: readonly [...FieldSpec[], FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec];
|
|
511
|
+
readonly decision: readonly [...FieldSpec[], FieldSpec, FieldSpec, FieldSpec, FieldSpec, FieldSpec];
|
|
512
|
+
readonly issue: readonly [...FieldSpec[], FieldSpec, FieldSpec, FieldSpec, FieldSpec];
|
|
513
|
+
readonly finding: readonly [...FieldSpec[], FieldSpec, FieldSpec, FieldSpec];
|
|
514
|
+
readonly criterion: FieldSpec[];
|
|
515
|
+
readonly checklistItem: readonly [...FieldSpec[], FieldSpec];
|
|
516
|
+
readonly link: readonly [FieldSpec, FieldSpec, FieldSpec];
|
|
517
|
+
};
|
|
518
|
+
//#endregion
|