maestro-flow 0.3.22 → 0.3.24
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/.claude/commands/maestro-analyze.md +1 -1
- package/.claude/commands/maestro-brainstorm.md +1 -1
- package/.claude/commands/maestro-composer.md +3 -3
- package/.claude/commands/maestro-init.md +4 -4
- package/.claude/commands/maestro-roadmap.md +164 -108
- package/.claude/commands/maestro.md +19 -10
- package/.claude/commands/quality-business-test.md +2 -2
- package/.claude/skills/team-quality-assurance/roles/scout/role.md +1 -1
- package/.claude/skills/team-review/roles/reviewer/role.md +1 -1
- package/.claude/skills/team-review/roles/scanner/role.md +1 -1
- package/.claude/skills/team-tech-debt/roles/scanner/role.md +3 -3
- package/.codex/skills/maestro/SKILL.md +12 -9
- package/.codex/skills/maestro-brainstorm/SKILL.md +1 -1
- package/.codex/skills/maestro-composer/SKILL.md +3 -3
- package/.codex/skills/maestro-init/SKILL.md +1 -1
- package/.codex/skills/maestro-link-coordinate/SKILL.md +1 -1
- package/.codex/skills/maestro-player/SKILL.md +2 -2
- package/.codex/skills/maestro-roadmap/SKILL.md +443 -332
- package/.codex/skills/quality-business-test/SKILL.md +2 -2
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-quality-assurance/roles/scout/role.md +1 -1
- package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
- package/.codex/skills/team-review/roles/scanner/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +3 -3
- package/chains/singles/spec-generate.json +3 -3
- package/chains/spec-driven.json +2 -2
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +4 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install-utils.d.ts +5 -12
- package/dashboard/dist-server/dashboard/src/server/routes/install-utils.js +10 -65
- package/dashboard/dist-server/dashboard/src/server/routes/install-utils.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js +17 -11
- package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
- package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +4 -0
- package/dashboard/dist-server/src/agents/cli-agent-runner.js +4 -2
- package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
- package/dashboard/dist-server/src/commands/delegate.d.ts +2 -0
- package/dashboard/dist-server/src/commands/delegate.js +20 -4
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dashboard/dist-server/src/config/cli-tools-config.d.ts +68 -3
- package/dashboard/dist-server/src/config/cli-tools-config.js +248 -9
- package/dashboard/dist-server/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts +4 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +4 -2
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/cli.js +2 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/cli.d.ts.map +1 -1
- package/dist/src/commands/cli.js +21 -4
- package/dist/src/commands/cli.js.map +1 -1
- package/dist/src/commands/delegate.d.ts +2 -0
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +20 -4
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts +5 -16
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +8 -104
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install-ui/ExecutionView.js +1 -1
- package/dist/src/commands/install-ui/ExecutionView.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts +1 -0
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +19 -4
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallResult.js +1 -1
- package/dist/src/commands/install-ui/InstallResult.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +28 -3
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/tools-ui/CommandReference.d.ts +7 -0
- package/dist/src/commands/tools-ui/CommandReference.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/CommandReference.js +33 -0
- package/dist/src/commands/tools-ui/CommandReference.js.map +1 -0
- package/dist/src/commands/tools-ui/ConfigSources.d.ts +6 -0
- package/dist/src/commands/tools-ui/ConfigSources.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/ConfigSources.js +27 -0
- package/dist/src/commands/tools-ui/ConfigSources.js.map +1 -0
- package/dist/src/commands/tools-ui/RegisterSettings.d.ts +8 -0
- package/dist/src/commands/tools-ui/RegisterSettings.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/RegisterSettings.js +125 -0
- package/dist/src/commands/tools-ui/RegisterSettings.js.map +1 -0
- package/dist/src/commands/tools-ui/RoleMappings.d.ts +9 -0
- package/dist/src/commands/tools-ui/RoleMappings.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/RoleMappings.js +104 -0
- package/dist/src/commands/tools-ui/RoleMappings.js.map +1 -0
- package/dist/src/commands/tools-ui/ToolsDashboard.d.ts +8 -0
- package/dist/src/commands/tools-ui/ToolsDashboard.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/ToolsDashboard.js +60 -0
- package/dist/src/commands/tools-ui/ToolsDashboard.js.map +1 -0
- package/dist/src/commands/tools-ui/ToolsOverview.d.ts +9 -0
- package/dist/src/commands/tools-ui/ToolsOverview.d.ts.map +1 -0
- package/dist/src/commands/tools-ui/ToolsOverview.js +84 -0
- package/dist/src/commands/tools-ui/ToolsOverview.js.map +1 -0
- package/dist/src/commands/tools.d.ts +3 -0
- package/dist/src/commands/tools.d.ts.map +1 -0
- package/dist/src/commands/tools.js +78 -0
- package/dist/src/commands/tools.js.map +1 -0
- package/dist/src/config/cli-tools-config.d.ts +68 -3
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +248 -9
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/core/component-defs.d.ts +16 -0
- package/dist/src/core/component-defs.d.ts.map +1 -0
- package/dist/src/core/component-defs.js +142 -0
- package/dist/src/core/component-defs.js.map +1 -0
- package/dist/src/core/manifest.d.ts +8 -1
- package/dist/src/core/manifest.d.ts.map +1 -1
- package/dist/src/core/manifest.js +29 -40
- package/dist/src/core/manifest.js.map +1 -1
- package/dist/src/core/tag-injector.d.ts +72 -0
- package/dist/src/core/tag-injector.d.ts.map +1 -0
- package/dist/src/core/tag-injector.js +228 -0
- package/dist/src/core/tag-injector.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +1 -1
- package/templates/cli/prompts/workflow-skill-lessons-learned.txt +1 -1
- package/templates/search-tools.md +1 -1
- package/templates/workflows/specs/node-catalog.md +1 -1
- package/workflows/brainstorm.md +1 -1
- package/{.claude/CLAUDE.md → workflows/claude-instructions.md} +25 -26
- package/workflows/cli-tools-usage.md +16 -2
- package/workflows/codex-instructions.md +150 -0
- package/workflows/delegate-usage.md +16 -2
- package/workflows/execute.md +28 -14
- package/workflows/init.md +2 -2
- package/workflows/issue-discover.md +2 -2
- package/workflows/maestro-super.md +120 -0
- package/workflows/maestro.codex.md +4 -4
- package/workflows/maestro.md +5 -5
- package/workflows/roadmap-common.md +197 -0
- package/workflows/roadmap.md +190 -355
- package/workflows/spec-generate.md +457 -544
- package/.claude/commands/maestro-spec-generate.md +0 -78
- package/.codex/skills/maestro-spec-generate/SKILL.md +0 -355
|
@@ -1,544 +1,457 @@
|
|
|
1
|
-
# Workflow: Spec Generate
|
|
2
|
-
|
|
3
|
-
Specification document chain producing a complete specification package (Product Brief, PRD, Architecture, Epics, Roadmap) through 7 sequential phases with multi-CLI analysis and interactive refinement. Pure documentation — no code generation.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
.
|
|
39
|
-
├──
|
|
40
|
-
├──
|
|
41
|
-
├──
|
|
42
|
-
├──
|
|
43
|
-
├──
|
|
44
|
-
├──
|
|
45
|
-
│
|
|
46
|
-
|
|
47
|
-
│
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
│
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
| Document |
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
- `
|
|
88
|
-
- `
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
-
|
|
171
|
-
- `--yes`:
|
|
172
|
-
|
|
173
|
-
**Step
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
- For
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
|
|
231
|
-
**Step
|
|
232
|
-
-
|
|
233
|
-
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
**
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
-
|
|
260
|
-
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
-
|
|
269
|
-
|
|
270
|
-
**
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
**
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
-
|
|
287
|
-
-
|
|
288
|
-
|
|
289
|
-
**
|
|
290
|
-
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
-
|
|
347
|
-
-
|
|
348
|
-
|
|
349
|
-
**
|
|
350
|
-
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
**
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
**
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
**
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
|
447
|
-
|
|
448
|
-
|
|
|
449
|
-
|
|
|
450
|
-
|
|
|
451
|
-
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
Output: .workflow/.spec/{session_id}/
|
|
459
|
-
spec-config.json, product-brief.md, requirements/, architecture/, epics/,
|
|
460
|
-
readiness-report.md, spec-summary.md, roadmap.md
|
|
461
|
-
|
|
462
|
-
Next: maestro-init (setup) | maestro-plan 1 (plan first phase)
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
---
|
|
466
|
-
|
|
467
|
-
## Key Design Principles
|
|
468
|
-
|
|
469
|
-
1. **Document Chain**: Each phase builds on previous outputs with traceability
|
|
470
|
-
2. **Multi-Perspective Analysis**: CLI tools provide product, technical, and user perspectives
|
|
471
|
-
3. **Interactive by Default**: Each phase offers user confirmation; `-y` enables auto mode
|
|
472
|
-
4. **Resumable Sessions**: spec-config.json tracks phases; `-c` resumes from checkpoint
|
|
473
|
-
5. **Template-Driven**: All documents from standardized templates with YAML frontmatter
|
|
474
|
-
6. **Spec Type Specialization**: Templates adapt to service/api/library/platform via profiles
|
|
475
|
-
7. **Terminology Consistency**: glossary.json from Phase 2 injected into all subsequent phases
|
|
476
|
-
8. **Iterative Quality**: Phase 6.5 auto-fix loop (max 2 iterations)
|
|
477
|
-
9. **Brainstorm Integration**: `--from-brainstorm` imports guidance-specification.md as seed
|
|
478
|
-
|
|
479
|
-
## State Management
|
|
480
|
-
|
|
481
|
-
**spec-config.json**:
|
|
482
|
-
```json
|
|
483
|
-
{
|
|
484
|
-
"session_id": "SPEC-xxx-2026-03-15",
|
|
485
|
-
"seed_input": "User input text",
|
|
486
|
-
"input_type": "text|file|brainstorm",
|
|
487
|
-
"timestamp": "ISO8601",
|
|
488
|
-
"mode": "interactive|auto",
|
|
489
|
-
"complexity": "simple|moderate|complex",
|
|
490
|
-
"depth": "light|standard|comprehensive",
|
|
491
|
-
"focus_areas": [],
|
|
492
|
-
"spec_type": "service|api|library|platform",
|
|
493
|
-
"iteration_count": 0,
|
|
494
|
-
"iteration_history": [],
|
|
495
|
-
"seed_analysis": {
|
|
496
|
-
"problem_statement": "...",
|
|
497
|
-
"target_users": [],
|
|
498
|
-
"domain": "...",
|
|
499
|
-
"constraints": [],
|
|
500
|
-
"dimensions": []
|
|
501
|
-
},
|
|
502
|
-
"has_codebase": false,
|
|
503
|
-
"phasesCompleted": [
|
|
504
|
-
{ "phase": 1, "name": "discovery", "output_file": "spec-config.json", "completed_at": "ISO8601" }
|
|
505
|
-
]
|
|
506
|
-
}
|
|
507
|
-
```
|
|
508
|
-
|
|
509
|
-
Resume: `-c` reads spec-config.json, resumes from first incomplete phase.
|
|
510
|
-
|
|
511
|
-
## Quality Dimensions (Phase 6)
|
|
512
|
-
|
|
513
|
-
| Dimension | Weight | Focus |
|
|
514
|
-
|-----------|--------|-------|
|
|
515
|
-
| Completeness | 25% | All sections present with substance |
|
|
516
|
-
| Consistency | 25% | Terminology, scope, non-goals alignment |
|
|
517
|
-
| Traceability | 25% | Goals → Reqs → Arch → Epics chain |
|
|
518
|
-
| Depth | 25% | Testable criteria, justified decisions, estimable stories |
|
|
519
|
-
|
|
520
|
-
**Gate**: Pass (>=80%) / Review (60-79%) / Fail (<60%)
|
|
521
|
-
|
|
522
|
-
## Handoff to maestro-init
|
|
523
|
-
|
|
524
|
-
When spec-generate completes, `roadmap.md` is already generated (Phase 7).
|
|
525
|
-
Run `maestro-init` to set up project infrastructure (project.md, state.json, config.json, specs/).
|
|
526
|
-
Init detects existing `.workflow/roadmap.md` and skips roadmap creation.
|
|
527
|
-
|
|
528
|
-
## Error Handling
|
|
529
|
-
|
|
530
|
-
| Phase | Error | Blocking? | Action |
|
|
531
|
-
|-------|-------|-----------|--------|
|
|
532
|
-
| Phase 1 | Empty input | Yes | Error and exit |
|
|
533
|
-
| Phase 1 | CLI analysis fails | No | Basic parsing fallback |
|
|
534
|
-
| Phase 1.5 | Gap analysis fails | No | Skip to basic prompts |
|
|
535
|
-
| Phase 2 | Single CLI fails | No | Continue with available |
|
|
536
|
-
| Phase 3 | Gemini fails | No | Codex fallback |
|
|
537
|
-
| Phase 4 | Review fails | No | Skip review |
|
|
538
|
-
| Phase 5 | Story generation fails | No | Generate epics only |
|
|
539
|
-
| Phase 6 | Validation fails | No | Partial report |
|
|
540
|
-
| Phase 6.5 | Max iterations (2) | No | Force handoff |
|
|
541
|
-
|
|
542
|
-
| Step 2.5 | External research fails | No | apiResearchContext = null, continue |
|
|
543
|
-
|
|
544
|
-
CLI Fallback Chain: Gemini → Codex → Claude → degraded mode (local only)
|
|
1
|
+
# Workflow: Spec Generate (Full Mode)
|
|
2
|
+
|
|
3
|
+
Specification document chain producing a complete specification package (Product Brief, PRD, Architecture, Epics, Roadmap) through 7 sequential phases with multi-CLI analysis and interactive refinement. Pure documentation — no code generation.
|
|
4
|
+
|
|
5
|
+
**Shared logic**: `@roadmap-common.md` (worktree guard, context loading, codebase exploration, external research, minimum-phase principle, roadmap write logic)
|
|
6
|
+
|
|
7
|
+
## Pipeline Position
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
brainstorm (optional) → init (REQUIRED) → spec-generate → plan → execute → verify
|
|
11
|
+
Alternative light path: init → roadmap (light mode) → plan (skip spec-generate)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Architecture
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
P0: Spec Study → P1: Discovery → P1.5: Req Expansion → P2: Product Brief → P3: PRD → P4: Architecture → P5: Epics → P6: Readiness Check → P7: Roadmap
|
|
18
|
+
|
|
19
|
+
P6 gate: Pass (>=80%) → P7 | Review (60-79%) → P7 w/caveats | Fail (<60%) → P6.5 Auto-Fix (max 2 iter) → re-check
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Arguments
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
$ARGUMENTS: "<idea or @file> [-y] [-c] [--from-brainstorm SESSION-ID]"
|
|
26
|
+
|
|
27
|
+
<idea> -- Idea text or @file reference
|
|
28
|
+
-y / --yes -- Auto mode, skip interactive questions
|
|
29
|
+
-c / --continue -- Resume from last checkpoint
|
|
30
|
+
--from-brainstorm -- Import brainstorm session as enriched seed
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Output Structure
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
.workflow/.spec/SPEC-{slug}-{YYYY-MM-DD}/
|
|
37
|
+
├── spec-config.json # Session configuration + phase state
|
|
38
|
+
├── discovery-context.json # Codebase exploration (optional)
|
|
39
|
+
├── refined-requirements.json # Phase 1.5: Confirmed requirements
|
|
40
|
+
├── glossary.json # Phase 2: Terminology glossary
|
|
41
|
+
├── product-brief.md # Phase 2: Product brief
|
|
42
|
+
├── requirements/ # Phase 3: Detailed PRD
|
|
43
|
+
│ ├── _index.md # Summary, MoSCoW table, traceability
|
|
44
|
+
│ ├── REQ-NNN-{slug}.md # Functional requirement
|
|
45
|
+
│ └── NFR-{type}-NNN-{slug}.md # Non-functional requirement
|
|
46
|
+
├── architecture/ # Phase 4: Architecture decisions
|
|
47
|
+
│ ├── _index.md # Overview, components, tech stack
|
|
48
|
+
│ └── ADR-NNN-{slug}.md # Architecture Decision Record
|
|
49
|
+
├── epics/ # Phase 5: Epic/Story breakdown
|
|
50
|
+
│ ├── _index.md # Epic table, dependency map, MVP
|
|
51
|
+
│ └── EPIC-NNN-{slug}.md # Individual Epic with Stories
|
|
52
|
+
├── readiness-report.md # Phase 6: Quality report
|
|
53
|
+
├── spec-summary.md # Phase 6: Executive summary
|
|
54
|
+
└── roadmap.md # Phase 7: Project roadmap (also written to .workflow/roadmap.md)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Process
|
|
60
|
+
|
|
61
|
+
### Step 1: Prerequisite Loading (Phase 0)
|
|
62
|
+
|
|
63
|
+
Load specification and template documents:
|
|
64
|
+
|
|
65
|
+
| Document | Purpose | Priority |
|
|
66
|
+
|----------|---------|----------|
|
|
67
|
+
| Document standards | Format, frontmatter, naming conventions | P0 - must read |
|
|
68
|
+
| Quality gates | Per-phase quality criteria and scoring | P0 - must read |
|
|
69
|
+
| Templates | product-brief, requirements-prd, architecture-doc, epics-template | Read on-demand per phase |
|
|
70
|
+
|
|
71
|
+
**Load project specs and history**: Follow roadmap-common.md "Load Project Context".
|
|
72
|
+
|
|
73
|
+
Additional full-mode rules:
|
|
74
|
+
- Features in `already_shipped` are EXCLUDED from spec generation scope
|
|
75
|
+
- `lessons_learned` inform risk assessment in Phase 1 and architecture decisions in Phase 4
|
|
76
|
+
- Pass assembled `project_context` to Phase 1 seed analysis and Phase 7 roadmap generation
|
|
77
|
+
|
|
78
|
+
### Step 2: Discovery & Seed Analysis (Phase 1)
|
|
79
|
+
|
|
80
|
+
Parse input, analyze the seed idea, optionally explore codebase, establish session.
|
|
81
|
+
|
|
82
|
+
**Step 2.1: Input Parsing**
|
|
83
|
+
- Parse $ARGUMENTS: extract idea/topic, flags (-y, -c, --from-brainstorm)
|
|
84
|
+
- If `-c`: read spec-config.json, resume from first incomplete phase
|
|
85
|
+
- If `--from-brainstorm SESSION-ID`:
|
|
86
|
+
- Locate brainstorm session directory
|
|
87
|
+
- Read `guidance-specification.md` as enriched seed
|
|
88
|
+
- Set `input_type: "brainstorm"` — skip Phase 1.5
|
|
89
|
+
- If `@file`: read file content as seed
|
|
90
|
+
- If text: use directly as seed
|
|
91
|
+
- Missing input → error E001
|
|
92
|
+
|
|
93
|
+
**Step 2.2: Session Initialization**
|
|
94
|
+
```
|
|
95
|
+
Session ID: SPEC-{slug}-{YYYY-MM-DD}
|
|
96
|
+
Output dir: .workflow/.spec/{session_id}/
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Step 2.3: Seed Analysis via CLI**
|
|
100
|
+
- Spawn CLI analysis to extract: problem_statement, target_users, domain, constraints, dimensions (3-5)
|
|
101
|
+
- Assess complexity: simple (1-2 components) / moderate (3-5) / complex (6+)
|
|
102
|
+
- For brainstorm input: enrich with feature decomposition data
|
|
103
|
+
|
|
104
|
+
**Step 2.4: Codebase Exploration** — follow roadmap-common.md
|
|
105
|
+
- Output: `discovery-context.json` with relevant_files, patterns, tech_stack
|
|
106
|
+
|
|
107
|
+
**Step 2.5: External Research** — follow roadmap-common.md
|
|
108
|
+
|
|
109
|
+
`apiResearchContext` is passed into:
|
|
110
|
+
- Step 4 (Product Brief): technology feasibility assessment
|
|
111
|
+
- Step 5 (Requirements): API-aware requirement writing with concrete constraints
|
|
112
|
+
- Step 6 (Architecture): informed ADR decisions with version-specific details
|
|
113
|
+
- Step 7 (Epics): realistic story sizing based on API complexity
|
|
114
|
+
|
|
115
|
+
**Step 2.6: Spec Type Selection**
|
|
116
|
+
- Interactive (AskUserQuestion): Service / API / Library / Platform
|
|
117
|
+
- `--yes`: default to "service"
|
|
118
|
+
- Each type loads a profile template for domain-specific sections
|
|
119
|
+
|
|
120
|
+
**Step 2.7: User Confirmation (interactive)**
|
|
121
|
+
- Confirm problem statement, select depth (Light/Standard/Comprehensive), select focus areas
|
|
122
|
+
- `--yes`: accept all defaults
|
|
123
|
+
|
|
124
|
+
**Output**: `spec-config.json`, `discovery-context.json` (optional), `apiResearchContext` (in-memory, optional)
|
|
125
|
+
|
|
126
|
+
### Step 3: Requirement Expansion & Clarification (Phase 1.5)
|
|
127
|
+
|
|
128
|
+
Skip if `--from-brainstorm` (requirements already in guidance-specification.md).
|
|
129
|
+
|
|
130
|
+
**Step 3.1: CLI Gap Analysis**
|
|
131
|
+
- Analyze seed for completeness (score 1-10), identify missing dimensions
|
|
132
|
+
- Generate 3-5 clarification areas with questions and expansion suggestions
|
|
133
|
+
- Dimensions checked: functional scope, user scenarios, NFRs, integrations, data model, error handling
|
|
134
|
+
|
|
135
|
+
**Step 3.2: Interactive Discussion Loop (max 5 rounds)**
|
|
136
|
+
- Round 1: present gap analysis + expansion suggestions via AskUserQuestion
|
|
137
|
+
- Round N: CLI follow-up analysis based on user responses, refine requirements
|
|
138
|
+
- User can: answer questions, accept suggestions, or skip to generation
|
|
139
|
+
- `--yes`: CLI auto-expansion without interaction
|
|
140
|
+
|
|
141
|
+
**Step 3.3: User Confirmation**
|
|
142
|
+
- Present requirement summary, user confirms or requests adjustments
|
|
143
|
+
- `--yes`: auto-confirm
|
|
144
|
+
|
|
145
|
+
**Output**: `refined-requirements.json` (confirmed features, NFRs, boundaries, assumptions)
|
|
146
|
+
|
|
147
|
+
### Step 4: Product Brief (Phase 2)
|
|
148
|
+
|
|
149
|
+
Generate product brief through multi-perspective CLI analysis.
|
|
150
|
+
|
|
151
|
+
**Step 4.1: Load Context**
|
|
152
|
+
- Read refined-requirements.json (preferred) or seed_analysis fallback
|
|
153
|
+
- Read discovery-context.json (if codebase detected)
|
|
154
|
+
- For brainstorm input: read guidance-specification.md sections
|
|
155
|
+
|
|
156
|
+
**Step 4.2: Multi-CLI Parallel Analysis (3 perspectives)**
|
|
157
|
+
|
|
158
|
+
| Perspective | Role | Focus |
|
|
159
|
+
|-------------|------|-------|
|
|
160
|
+
| Product | analyze | Vision, market fit, success criteria, scope boundaries |
|
|
161
|
+
| Technical | review | Feasibility, constraints, integration complexity, tech recommendations |
|
|
162
|
+
| User | explore | Personas, journey maps, pain points, UX criteria |
|
|
163
|
+
|
|
164
|
+
**Step 4.3: Synthesis**
|
|
165
|
+
- Extract convergent themes (all agree), conflicts (need resolution), unique insights
|
|
166
|
+
- For brainstorm input: cross-reference with guidance-specification decisions
|
|
167
|
+
- If `apiResearchContext` is set: inject API details into technical feasibility assessment
|
|
168
|
+
|
|
169
|
+
**Step 4.4: Interactive Refinement**
|
|
170
|
+
- Present synthesis, user adjusts scope/vision
|
|
171
|
+
- `--yes`: accept synthesis as-is
|
|
172
|
+
|
|
173
|
+
**Step 4.5: Generate Outputs**
|
|
174
|
+
- `product-brief.md` from template (YAML frontmatter + filled content)
|
|
175
|
+
- `glossary.json` — 5+ core terms extracted from product brief and CLI analysis
|
|
176
|
+
- Each term: canonical name, definition, aliases, category (core/technical/business)
|
|
177
|
+
- Injected into all subsequent phase CLI prompts for terminology consistency
|
|
178
|
+
|
|
179
|
+
**Output**: `product-brief.md`, `glossary.json`
|
|
180
|
+
|
|
181
|
+
### Step 5: Requirements / PRD (Phase 3)
|
|
182
|
+
|
|
183
|
+
Generate detailed PRD with functional/non-functional requirements.
|
|
184
|
+
|
|
185
|
+
**Step 5.1: Requirement Expansion via CLI**
|
|
186
|
+
- For each product brief goal, generate 3-7 functional requirements
|
|
187
|
+
- Each requirement: REQ-NNN ID, title, description, user story, 2-4 acceptance criteria
|
|
188
|
+
- Generate non-functional requirements: performance, security, scalability, usability
|
|
189
|
+
- Apply RFC 2119 keywords (MUST/SHOULD/MAY) to all behavioral constraints
|
|
190
|
+
- Define core entity data models: fields, types, constraints, relationships
|
|
191
|
+
- Inject glossary.json for terminology consistency
|
|
192
|
+
|
|
193
|
+
**Step 5.2: MoSCoW Priority Sorting (interactive)**
|
|
194
|
+
- Present requirements grouped by initial priority
|
|
195
|
+
- User adjusts Must/Should/Could/Won't labels
|
|
196
|
+
- Select MVP scope: Must-only / Must+key Should / Comprehensive
|
|
197
|
+
- `--yes`: accept CLI-suggested priorities
|
|
198
|
+
|
|
199
|
+
**Step 5.3: Generate Directory**
|
|
200
|
+
- `requirements/_index.md` — summary table, MoSCoW breakdown, traceability matrix
|
|
201
|
+
- `requirements/REQ-NNN-{slug}.md` — one per functional requirement
|
|
202
|
+
- `requirements/NFR-{type}-NNN-{slug}.md` — one per non-functional requirement
|
|
203
|
+
|
|
204
|
+
**Output**: `requirements/` directory (index + individual files)
|
|
205
|
+
|
|
206
|
+
### Step 6: Architecture (Phase 4)
|
|
207
|
+
|
|
208
|
+
Generate architecture decisions, component design, and technology selections.
|
|
209
|
+
|
|
210
|
+
**Step 6.1: Architecture Analysis via CLI (role: review)**
|
|
211
|
+
- System architecture style with justification
|
|
212
|
+
- Core components and responsibilities
|
|
213
|
+
- Component interaction diagram (Mermaid graph TD)
|
|
214
|
+
- Technology stack: languages, frameworks, databases, infrastructure
|
|
215
|
+
- 2-4 Architecture Decision Records (ADRs): context, decision, alternatives, consequences
|
|
216
|
+
- Data model: entities and relationships (Mermaid erDiagram)
|
|
217
|
+
- Security architecture: auth, authorization, data protection
|
|
218
|
+
- **State machine**: ASCII diagram + transition table for lifecycle entities (service/platform type)
|
|
219
|
+
- **Configuration model**: all configurable fields with type, default, constraint
|
|
220
|
+
- **Error handling strategy**: per-component classification (transient/permanent/degraded), recovery mechanisms
|
|
221
|
+
- **Observability**: key metrics (5+), structured log events, health checks
|
|
222
|
+
- Spec type profile injection for domain-specific depth
|
|
223
|
+
- Glossary injection for terminology consistency
|
|
224
|
+
- If `apiResearchContext` is set: inject as "External API Research" context
|
|
225
|
+
|
|
226
|
+
**Step 6.2: Architecture Review via CLI (role: review)**
|
|
227
|
+
- Challenge each ADR, identify scalability bottlenecks
|
|
228
|
+
- Assess security gaps, evaluate technology choices
|
|
229
|
+
- Rate overall quality 1-5
|
|
230
|
+
|
|
231
|
+
**Step 6.3: Interactive ADR Decisions**
|
|
232
|
+
- Present ADRs with review feedback, user decides: accept / incorporate feedback / simplify
|
|
233
|
+
- `--yes`: auto-accept
|
|
234
|
+
|
|
235
|
+
**Step 6.4: Codebase Integration Mapping (conditional)**
|
|
236
|
+
- Map new components to existing code modules
|
|
237
|
+
|
|
238
|
+
**Step 6.5: Generate Directory**
|
|
239
|
+
- `architecture/_index.md` — overview, component diagram, tech stack, data model, security
|
|
240
|
+
- `architecture/ADR-NNN-{slug}.md` — one per Architecture Decision Record
|
|
241
|
+
|
|
242
|
+
**Output**: `architecture/` directory (index + individual ADR files)
|
|
243
|
+
|
|
244
|
+
### Step 7: Epics & Stories (Phase 5)
|
|
245
|
+
|
|
246
|
+
Decompose specification into executable Epics and Stories.
|
|
247
|
+
|
|
248
|
+
**Step 7.1: Epic Decomposition via CLI**
|
|
249
|
+
- Group requirements into logical Epics (EPIC-NNN IDs). Epic count is unconstrained — Phase 7 will merge Epics into minimal phases via the minimum-phase principle.
|
|
250
|
+
- Tag MVP subset
|
|
251
|
+
- For each Epic: 2-5 Stories in "As a...I want...So that..." format
|
|
252
|
+
- Each Story: 2-4 testable acceptance criteria, relative size (S/M/L/XL), trace to REQ-NNN
|
|
253
|
+
- Cross-Epic dependency map (Mermaid graph LR)
|
|
254
|
+
- Recommended execution order with rationale
|
|
255
|
+
- MVP definition of done (3-5 criteria)
|
|
256
|
+
|
|
257
|
+
**Epic sizing awareness** (informs Phase 7 roadmap generation):
|
|
258
|
+
- Epics that are too small (1-2 Stories, all size S) should be flagged for merge in Phase 7
|
|
259
|
+
- Each Epic should carry enough substance to become part of a phase with 5+ tasks
|
|
260
|
+
- Prefer fewer, larger Epics over many tiny ones
|
|
261
|
+
|
|
262
|
+
**Step 7.2: Interactive Validation**
|
|
263
|
+
- Present Epic overview, user adjusts: merge/split epics, adjust MVP scope
|
|
264
|
+
- `--yes`: accept as-is
|
|
265
|
+
|
|
266
|
+
**Step 7.3: Generate Directory**
|
|
267
|
+
- `epics/_index.md` — overview table, dependency map, MVP scope, execution order, traceability
|
|
268
|
+
- `epics/EPIC-NNN-{slug}.md` — one per Epic with embedded Stories
|
|
269
|
+
|
|
270
|
+
**Output**: `epics/` directory (index + individual Epic files)
|
|
271
|
+
|
|
272
|
+
### Step 8: Readiness Check & Handoff (Phase 6)
|
|
273
|
+
|
|
274
|
+
Validate specification package and provide execution handoff.
|
|
275
|
+
|
|
276
|
+
**Step 8.1: Cross-Document Validation via CLI**
|
|
277
|
+
Score on 4 dimensions (25% each):
|
|
278
|
+
1. **Completeness**: all required sections present with substantive content
|
|
279
|
+
2. **Consistency**: terminology uniform (glossary compliance), scope containment, non-goals respected
|
|
280
|
+
3. **Traceability**: goals → requirements → architecture → epics (matrix generated)
|
|
281
|
+
4. **Depth**: acceptance criteria testable, ADRs justified, stories estimable
|
|
282
|
+
|
|
283
|
+
Gate decision: Pass (>=80) / Review (60-79) / Fail (<60)
|
|
284
|
+
|
|
285
|
+
**Step 8.2: Generate Reports**
|
|
286
|
+
- `readiness-report.md` — quality scores, issue list (Error/Warning/Info), traceability matrix
|
|
287
|
+
- `spec-summary.md` — one-page executive summary
|
|
288
|
+
|
|
289
|
+
**Step 8.3: Update Document Status**
|
|
290
|
+
- All document frontmatter updated to `status: complete`
|
|
291
|
+
|
|
292
|
+
**Step 8.4: Gate Routing**
|
|
293
|
+
|
|
294
|
+
| Gate Result | Action |
|
|
295
|
+
|-------------|--------|
|
|
296
|
+
| Pass (>=80%) | Proceed to Step 11 (Phase 7: Roadmap) |
|
|
297
|
+
| Review (60-79%) | Proceed to Step 11 with caveats logged |
|
|
298
|
+
| Fail (<60%) | Trigger Step 9 (Auto-Fix), then re-run Step 8 |
|
|
299
|
+
|
|
300
|
+
### Step 9: Auto-Fix (Phase 6.5, conditional)
|
|
301
|
+
|
|
302
|
+
Triggered when Phase 6 score < 60%.
|
|
303
|
+
|
|
304
|
+
**Step 9.1: Parse Readiness Report**
|
|
305
|
+
- Extract Error and Warning items, group by originating phase (2-5), map to affected files
|
|
306
|
+
|
|
307
|
+
**Step 9.2: Fix Affected Phases (sequential, Phase 2→3→4→5)**
|
|
308
|
+
- Read current phase output
|
|
309
|
+
- CLI re-generation with error context injected
|
|
310
|
+
- Inject glossary for terminology consistency
|
|
311
|
+
- Preserve unflagged content, only fix flagged issues
|
|
312
|
+
- Increment document version
|
|
313
|
+
|
|
314
|
+
**Step 9.3: Re-run Phase 6**
|
|
315
|
+
- Generate new readiness-report.md
|
|
316
|
+
- If still Fail and iteration_count < 2: loop back
|
|
317
|
+
- If Pass or max iterations (2) reached: proceed to handoff
|
|
318
|
+
|
|
319
|
+
**Output**: Updated Phase 2-5 documents, updated spec-config.json with iteration tracking
|
|
320
|
+
|
|
321
|
+
### Step 11: Roadmap Generation (Phase 7)
|
|
322
|
+
|
|
323
|
+
Convert Epics into an interactive roadmap with user confirmation.
|
|
324
|
+
|
|
325
|
+
**Step 11.1: Epic→Phase Mapping**
|
|
326
|
+
- Read `epics/_index.md` for Epic table, dependency map, MVP tags
|
|
327
|
+
- Read individual `EPIC-NNN-{slug}.md` for Stories and acceptance criteria
|
|
328
|
+
- Read `architecture/_index.md` for technical constraints (ADR decisions)
|
|
329
|
+
|
|
330
|
+
Apply **Minimum-Phase Principle** from roadmap-common.md for Epic→Phase mapping:
|
|
331
|
+
- Default: ALL Epics → 1 Phase (wave DAG orders tasks by Epic dependencies)
|
|
332
|
+
- Only split if hard dependency conditions are all met
|
|
333
|
+
- MVP-tagged Epics → Milestone 1, Post-MVP → Milestone 2+
|
|
334
|
+
- Small Epics (1-2 Stories, all size S) MUST be merged
|
|
335
|
+
- Epic dependencies → wave ordering within phase (not phase splits)
|
|
336
|
+
- Stories within Epics → phase success criteria
|
|
337
|
+
- ADR decisions → phase technical constraints
|
|
338
|
+
|
|
339
|
+
**Step 11.2: Generate Draft Roadmap**
|
|
340
|
+
Follow roadmap-common.md **Roadmap Template** format. For full mode, populate from product-brief.md vision and Epic→Stories acceptance criteria.
|
|
341
|
+
|
|
342
|
+
**Step 11.3: Interactive Refinement (max 3 rounds)**
|
|
343
|
+
- Present roadmap overview: phase count, milestone structure, dependency graph
|
|
344
|
+
- **Before presenting**: validate minimum-phase principle. Auto-merge violations and inform user.
|
|
345
|
+
- User feedback via AskUserQuestion:
|
|
346
|
+
- **Approve**: Run final sizing check before accepting
|
|
347
|
+
- **Adjust Scope**: Move Epics between milestones, merge phases
|
|
348
|
+
- **Reorder**: Change phase sequencing
|
|
349
|
+
- **Split/Merge**: Combine small phases (min 5 tasks enforced); splits require hard-dependency justification
|
|
350
|
+
- `--yes`: auto-approve (minimum-phase principle still enforced automatically)
|
|
351
|
+
|
|
352
|
+
**Step 11.4: Write Outputs**
|
|
353
|
+
- Write `roadmap.md` to spec directory: `{spec_dir}/roadmap.md`
|
|
354
|
+
- Write `.workflow/roadmap.md` — follow roadmap-common.md **Overwrite vs Edit Rules**
|
|
355
|
+
- Update `spec-config.json`: add Phase 7 completion
|
|
356
|
+
- Update `state.json` — follow roadmap-common.md **state.json Update Rules**
|
|
357
|
+
|
|
358
|
+
**Step 11.5: Handoff Options (AskUserQuestion)**
|
|
359
|
+
|
|
360
|
+
| Option | Action |
|
|
361
|
+
|--------|--------|
|
|
362
|
+
| Initialize project | Skill({ skill: "maestro-init" }) |
|
|
363
|
+
| Plan first phase | Skill({ skill: "maestro-plan", args: "1" }) |
|
|
364
|
+
| Create issues | Generate issues per phase via Skill({ skill: "manage-issue" }) |
|
|
365
|
+
| Export only | Spec + roadmap complete, no further action |
|
|
366
|
+
|
|
367
|
+
### Step 12: Final Report
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
== spec-generate complete ==
|
|
371
|
+
Session: SPEC-{slug}-{date} | Quality: {score}% ({gate}) | Phases: {completed_count}/7
|
|
372
|
+
Output: .workflow/.spec/{session_id}/
|
|
373
|
+
spec-config.json, product-brief.md, requirements/, architecture/, epics/,
|
|
374
|
+
readiness-report.md, spec-summary.md, roadmap.md
|
|
375
|
+
|
|
376
|
+
Next: maestro-init (setup) | maestro-plan 1 (plan first phase)
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## Key Design Principles
|
|
382
|
+
|
|
383
|
+
1. **Document Chain**: Each phase builds on previous outputs with traceability
|
|
384
|
+
2. **Multi-Perspective Analysis**: CLI tools provide product, technical, and user perspectives
|
|
385
|
+
3. **Interactive by Default**: Each phase offers user confirmation; `-y` enables auto mode
|
|
386
|
+
4. **Resumable Sessions**: spec-config.json tracks phases; `-c` resumes from checkpoint
|
|
387
|
+
5. **Template-Driven**: All documents from standardized templates with YAML frontmatter
|
|
388
|
+
6. **Spec Type Specialization**: Templates adapt to service/api/library/platform via profiles
|
|
389
|
+
7. **Terminology Consistency**: glossary.json from Phase 2 injected into all subsequent phases
|
|
390
|
+
8. **Iterative Quality**: Phase 6.5 auto-fix loop (max 2 iterations)
|
|
391
|
+
9. **Brainstorm Integration**: `--from-brainstorm` imports guidance-specification.md as seed
|
|
392
|
+
|
|
393
|
+
## State Management
|
|
394
|
+
|
|
395
|
+
**spec-config.json**:
|
|
396
|
+
```json
|
|
397
|
+
{
|
|
398
|
+
"session_id": "SPEC-xxx-2026-03-15",
|
|
399
|
+
"seed_input": "User input text",
|
|
400
|
+
"input_type": "text|file|brainstorm",
|
|
401
|
+
"timestamp": "ISO8601",
|
|
402
|
+
"mode": "interactive|auto",
|
|
403
|
+
"complexity": "simple|moderate|complex",
|
|
404
|
+
"depth": "light|standard|comprehensive",
|
|
405
|
+
"focus_areas": [],
|
|
406
|
+
"spec_type": "service|api|library|platform",
|
|
407
|
+
"iteration_count": 0,
|
|
408
|
+
"iteration_history": [],
|
|
409
|
+
"seed_analysis": {
|
|
410
|
+
"problem_statement": "...",
|
|
411
|
+
"target_users": [],
|
|
412
|
+
"domain": "...",
|
|
413
|
+
"constraints": [],
|
|
414
|
+
"dimensions": []
|
|
415
|
+
},
|
|
416
|
+
"has_codebase": false,
|
|
417
|
+
"phasesCompleted": [
|
|
418
|
+
{ "phase": 1, "name": "discovery", "output_file": "spec-config.json", "completed_at": "ISO8601" }
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
Resume: `-c` reads spec-config.json, resumes from first incomplete phase.
|
|
424
|
+
|
|
425
|
+
## Quality Dimensions (Phase 6)
|
|
426
|
+
|
|
427
|
+
| Dimension | Weight | Focus |
|
|
428
|
+
|-----------|--------|-------|
|
|
429
|
+
| Completeness | 25% | All sections present with substance |
|
|
430
|
+
| Consistency | 25% | Terminology, scope, non-goals alignment |
|
|
431
|
+
| Traceability | 25% | Goals → Reqs → Arch → Epics chain |
|
|
432
|
+
| Depth | 25% | Testable criteria, justified decisions, estimable stories |
|
|
433
|
+
|
|
434
|
+
**Gate**: Pass (>=80%) / Review (60-79%) / Fail (<60%)
|
|
435
|
+
|
|
436
|
+
## Handoff to maestro-init
|
|
437
|
+
|
|
438
|
+
When spec-generate completes, `roadmap.md` is already generated (Phase 7).
|
|
439
|
+
Run `maestro-init` to set up project infrastructure (project.md, state.json, config.json, specs/).
|
|
440
|
+
Init detects existing `.workflow/roadmap.md` and skips roadmap creation.
|
|
441
|
+
|
|
442
|
+
## Error Handling
|
|
443
|
+
|
|
444
|
+
| Phase | Error | Blocking? | Action |
|
|
445
|
+
|-------|-------|-----------|--------|
|
|
446
|
+
| Phase 1 | Empty input | Yes | Error and exit |
|
|
447
|
+
| Phase 1 | CLI analysis fails | No | Basic parsing fallback |
|
|
448
|
+
| Phase 1.5 | Gap analysis fails | No | Skip to basic prompts |
|
|
449
|
+
| Phase 2 | Single CLI fails | No | Continue with available |
|
|
450
|
+
| Phase 3 | Gemini fails | No | Codex fallback |
|
|
451
|
+
| Phase 4 | Review fails | No | Skip review |
|
|
452
|
+
| Phase 5 | Story generation fails | No | Generate epics only |
|
|
453
|
+
| Phase 6 | Validation fails | No | Partial report |
|
|
454
|
+
| Phase 6.5 | Max iterations (2) | No | Force handoff |
|
|
455
|
+
| Step 2.5 | External research fails | No | apiResearchContext = null, continue |
|
|
456
|
+
|
|
457
|
+
CLI Fallback Chain: Role-based resolution → degraded mode (local only)
|