maestro-flow-one 0.2.33 → 0.2.35
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/maestro-flow/commands/learn/investigate.md +151 -152
- package/maestro-flow/commands/learn/second-opinion.md +118 -122
- package/maestro-flow/commands/lifecycle/analyze.md +215 -266
- package/maestro-flow/commands/lifecycle/blueprint.md +189 -204
- package/maestro-flow/commands/lifecycle/brainstorm.md +209 -213
- package/maestro-flow/commands/lifecycle/companion.md +531 -531
- package/maestro-flow/commands/lifecycle/composer.md +188 -179
- package/maestro-flow/commands/lifecycle/execute.md +183 -184
- package/maestro-flow/commands/lifecycle/fork.md +111 -110
- package/maestro-flow/commands/lifecycle/grill.md +175 -176
- package/maestro-flow/commands/lifecycle/guard.md +103 -102
- package/maestro-flow/commands/lifecycle/impeccable.md +311 -268
- package/maestro-flow/commands/lifecycle/init.md +130 -131
- package/maestro-flow/commands/lifecycle/merge.md +87 -80
- package/maestro-flow/commands/lifecycle/next.md +253 -257
- package/maestro-flow/commands/lifecycle/overlay.md +188 -178
- package/maestro-flow/commands/lifecycle/plan.md +225 -211
- package/maestro-flow/commands/lifecycle/quick.md +83 -77
- package/maestro-flow/commands/lifecycle/roadmap.md +173 -186
- package/maestro-flow/commands/lifecycle/swarm-workflow.md +243 -264
- package/maestro-flow/commands/lifecycle/tools-execute.md +122 -117
- package/maestro-flow/commands/lifecycle/tools-register.md +162 -157
- package/maestro-flow/commands/lifecycle/ui-codify.md +117 -100
- package/maestro-flow/commands/lifecycle/universal-workflow.md +548 -561
- package/maestro-flow/commands/lifecycle/update.md +122 -119
- package/maestro-flow/commands/manage/codebase-rebuild.md +87 -85
- package/maestro-flow/commands/manage/harvest.md +97 -95
- package/maestro-flow/commands/manage/issue-discover.md +83 -81
- package/maestro-flow/commands/manage/issue.md +72 -73
- package/maestro-flow/commands/manage/kg-extractors.md +128 -0
- package/maestro-flow/commands/manage/knowhow-capture.md +92 -82
- package/maestro-flow/commands/manage/knowhow.md +83 -79
- package/maestro-flow/commands/manage/knowledge-audit.md +105 -88
- package/maestro-flow/commands/manage/status.md +62 -52
- package/maestro-flow/commands/manage/wiki.md +82 -71
- package/maestro-flow/commands/milestone/audit.md +4 -10
- package/maestro-flow/commands/milestone/complete.md +6 -7
- package/maestro-flow/commands/milestone/release.md +136 -145
- package/maestro-flow/commands/quality/auto-test.md +153 -136
- package/maestro-flow/commands/quality/debug.md +159 -120
- package/maestro-flow/commands/quality/refactor.md +105 -67
- package/maestro-flow/commands/quality/retrospective.md +123 -77
- package/maestro-flow/commands/quality/review.md +155 -128
- package/maestro-flow/commands/quality/sync.md +88 -52
- package/maestro-flow/commands/quality/test.md +147 -117
- package/maestro-flow/commands/spec/add.md +77 -70
- package/maestro-flow/commands/spec/setup.md +49 -52
- package/package.json +1 -1
|
@@ -1,531 +1,531 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-companion
|
|
3
|
-
description: Knowledge companion — load context, record companion doc, capture insights, route to skills
|
|
4
|
-
argument-hint: "[before|note|after|route] [--task <description>] [--type <task_type>] [--category <cat>]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- Skill
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<purpose>
|
|
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
|
-
<
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
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
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
- [ ]
|
|
513
|
-
- [ ]
|
|
514
|
-
- [ ]
|
|
515
|
-
- [ ]
|
|
516
|
-
- [ ]
|
|
517
|
-
- [ ]
|
|
518
|
-
- [ ]
|
|
519
|
-
- [ ]
|
|
520
|
-
- [ ]
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
</
|
|
1
|
+
---
|
|
2
|
+
name: maestro-companion
|
|
3
|
+
description: Knowledge companion — load context, record companion doc, capture insights, route to skills
|
|
4
|
+
argument-hint: "[before|note|after|route] [--task <description>] [--type <task_type>] [--category <cat>]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Skill
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<purpose>
|
|
17
|
+
Side-car utility for any task: load knowledge context (before), record structured entries (note),
|
|
18
|
+
promote insights to spec/knowhow (after), or route to next command (route).
|
|
19
|
+
</purpose>
|
|
20
|
+
|
|
21
|
+
<context>
|
|
22
|
+
$ARGUMENTS — mode + optional flags.
|
|
23
|
+
|
|
24
|
+
**Mode detection priority:**
|
|
25
|
+
1. Explicit `before` / `note` / `after` / `route`
|
|
26
|
+
2. Intent text that is not a mode keyword → `route`
|
|
27
|
+
3. No arguments → auto-detect (`git status` has changes → `after`, else → `before`)
|
|
28
|
+
|
|
29
|
+
**Flags:**
|
|
30
|
+
- `--task <description>` — Current task description (for targeted knowledge loading and doc title)
|
|
31
|
+
- `--type <task_type>` — Task type for field template selection (see task types below)
|
|
32
|
+
- `--category <cat>` — Spec category filter: coding / arch / test / review / debug / learning / ui
|
|
33
|
+
|
|
34
|
+
**Task types** (determines which recording sections are active):
|
|
35
|
+
|
|
36
|
+
| Type | Description | Key sections |
|
|
37
|
+
|------|-------------|--------------|
|
|
38
|
+
| `implement` | Feature development, code writing | working_files, dependencies, decisions, tests_affected |
|
|
39
|
+
| `debug` | Bug investigation, root cause analysis | symptoms, hypotheses, evidence, root_cause, fix_applied |
|
|
40
|
+
| `analyze` | Code/architecture/performance analysis | scope, findings, risks, recommendations |
|
|
41
|
+
| `design` | Architecture/UI/API design | constraints, alternatives, trade_offs, chosen_approach |
|
|
42
|
+
| `plan` | Task decomposition, roadmap planning | goals, breakdown, estimates, dependencies |
|
|
43
|
+
| `review` | Code review, PR review | files_reviewed, findings, severity_counts, verdict |
|
|
44
|
+
| `test` | Test writing, UAT, coverage expansion | coverage_before, coverage_after, gaps, test_files |
|
|
45
|
+
| `refactor` | Code restructuring, tech debt | affected_modules, before_after, breaking_changes |
|
|
46
|
+
| `learn` | Codebase exploration, knowledge building | questions, answers, mental_model, references |
|
|
47
|
+
| `general` | Default / unclassified | (all universal sections) |
|
|
48
|
+
|
|
49
|
+
Auto-detection: if `--type` not provided, infer from `--task` description keywords.
|
|
50
|
+
|
|
51
|
+
**Companion document:**
|
|
52
|
+
- Path: `.workflow/.scratchpad/companion-{YYYYMMDD-HHmmss}.md`
|
|
53
|
+
- Active doc tracking: `.workflow/.scratchpad/.companion-active` (stores path of current companion doc)
|
|
54
|
+
- Format: YAML frontmatter (rich metadata) + typed sections + timestamped entries
|
|
55
|
+
</context>
|
|
56
|
+
|
|
57
|
+
<state_machine>
|
|
58
|
+
|
|
59
|
+
<states>
|
|
60
|
+
S_PARSE — Parse arguments, detect mode, resolve task type
|
|
61
|
+
S_BEFORE — Load knowledge context, create companion doc with typed template
|
|
62
|
+
S_NOTE — Append structured entry to active companion doc
|
|
63
|
+
S_AFTER — Review companion doc, populate outcome, promote entries, suggest next steps
|
|
64
|
+
S_ROUTE — Skill routing via maestro-next
|
|
65
|
+
</states>
|
|
66
|
+
|
|
67
|
+
<transitions>
|
|
68
|
+
|
|
69
|
+
S_PARSE:
|
|
70
|
+
→ S_BEFORE WHEN: mode == "before" OR (no args AND no uncommitted changes)
|
|
71
|
+
→ S_NOTE WHEN: mode == "note"
|
|
72
|
+
→ S_AFTER WHEN: mode == "after" OR (no args AND has uncommitted changes)
|
|
73
|
+
→ S_ROUTE WHEN: mode == "route" OR intent text present
|
|
74
|
+
|
|
75
|
+
</transitions>
|
|
76
|
+
|
|
77
|
+
</state_machine>
|
|
78
|
+
|
|
79
|
+
<execution>
|
|
80
|
+
|
|
81
|
+
## S_BEFORE — Knowledge Loading + Companion Doc Creation
|
|
82
|
+
|
|
83
|
+
Execute in order, skip unavailable steps:
|
|
84
|
+
|
|
85
|
+
### 1. Load specs
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# With --category: load by category
|
|
89
|
+
maestro spec load --category <cat>
|
|
90
|
+
|
|
91
|
+
# With --task: load by keyword extracted from task description
|
|
92
|
+
maestro spec load --keyword <extracted_keyword>
|
|
93
|
+
|
|
94
|
+
# No flags: load coding (most universal)
|
|
95
|
+
maestro spec load --category coding
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Display loaded rules summary (entry count + key rule names).
|
|
99
|
+
|
|
100
|
+
### 2. Browse knowhow index
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# List recent knowhow entries
|
|
104
|
+
maestro knowhow list --store workflow
|
|
105
|
+
|
|
106
|
+
# With --task: search relevant entries
|
|
107
|
+
maestro search --type knowhow "<task_keyword>"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Display available knowhow entries (ID + title). Hint: `maestro wiki load <id>` for details.
|
|
111
|
+
|
|
112
|
+
### 3. Check codebase index
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
ls .workflow/codebase/doc-index.json
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- Exists → display "Codebase docs ready, last updated: {timestamp}"
|
|
119
|
+
- Missing → suggest `/manage-codebase-rebuild`
|
|
120
|
+
- Stale (>7 days) → suggest `/quality-sync`
|
|
121
|
+
|
|
122
|
+
### 4. Create companion document
|
|
123
|
+
|
|
124
|
+
Create `.workflow/.scratchpad/` if needed. Resolve task type from `--type` flag or infer from `--task` keywords.
|
|
125
|
+
|
|
126
|
+
Write companion doc with the full field template:
|
|
127
|
+
|
|
128
|
+
```markdown
|
|
129
|
+
---
|
|
130
|
+
# === Identity ===
|
|
131
|
+
task: "{task_description or 'Untitled task'}"
|
|
132
|
+
task_type: "{resolved type: implement|debug|analyze|design|plan|review|test|refactor|learn|general}"
|
|
133
|
+
created: "{ISO timestamp}"
|
|
134
|
+
status: active
|
|
135
|
+
|
|
136
|
+
# === Context Loaded ===
|
|
137
|
+
specs_loaded: "{category or 'coding'}"
|
|
138
|
+
specs_count: {N}
|
|
139
|
+
knowhow_searched: "{keyword or 'none'}"
|
|
140
|
+
knowhow_available: {M}
|
|
141
|
+
codebase_index: "{ready|missing|stale}"
|
|
142
|
+
branch: "{current git branch}"
|
|
143
|
+
phase: "{current phase from state.json or 'none'}"
|
|
144
|
+
milestone: "{current milestone from state.json or 'none'}"
|
|
145
|
+
|
|
146
|
+
# === Scope ===
|
|
147
|
+
working_files: []
|
|
148
|
+
dependencies: []
|
|
149
|
+
related_artifacts: []
|
|
150
|
+
|
|
151
|
+
# === Outcome (populated by after mode) ===
|
|
152
|
+
outcome: ""
|
|
153
|
+
files_changed: []
|
|
154
|
+
promoted_specs: 0
|
|
155
|
+
promoted_knowhow: 0
|
|
156
|
+
follow_up: []
|
|
157
|
+
completed: ""
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
# Companion Doc — {task_description}
|
|
161
|
+
|
|
162
|
+
> `/maestro-companion note "<content>"` — add entries
|
|
163
|
+
> `/maestro-companion after` — review, promote, close
|
|
164
|
+
|
|
165
|
+
## Context
|
|
166
|
+
|
|
167
|
+
{Type-specific context section — see templates below}
|
|
168
|
+
|
|
169
|
+
## Entries
|
|
170
|
+
|
|
171
|
+
## Summary
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Type-specific context templates** (written into `## Context`):
|
|
175
|
+
|
|
176
|
+
**implement:**
|
|
177
|
+
```markdown
|
|
178
|
+
### Working Files
|
|
179
|
+
| File | Role | Status |
|
|
180
|
+
|------|------|--------|
|
|
181
|
+
|
|
182
|
+
### Dependencies
|
|
183
|
+
- (modules, APIs, or services this task depends on)
|
|
184
|
+
|
|
185
|
+
### Decisions
|
|
186
|
+
| # | Decision | Rationale | Alternatives Considered |
|
|
187
|
+
|---|----------|-----------|------------------------|
|
|
188
|
+
|
|
189
|
+
### Tests Affected
|
|
190
|
+
- (test files that need creation or update)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**debug:**
|
|
194
|
+
```markdown
|
|
195
|
+
### Symptoms
|
|
196
|
+
- (observable behavior vs expected behavior)
|
|
197
|
+
|
|
198
|
+
### Hypotheses
|
|
199
|
+
| # | Hypothesis | Status | Evidence |
|
|
200
|
+
|---|-----------|--------|----------|
|
|
201
|
+
|
|
202
|
+
### Evidence Trail
|
|
203
|
+
| Time | Source | Type | Finding |
|
|
204
|
+
|------|--------|------|---------|
|
|
205
|
+
|
|
206
|
+
### Root Cause
|
|
207
|
+
- (populated when identified)
|
|
208
|
+
|
|
209
|
+
### Fix Applied
|
|
210
|
+
- (description of fix, files changed)
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**analyze:**
|
|
214
|
+
```markdown
|
|
215
|
+
### Scope
|
|
216
|
+
- (what is being analyzed and boundaries)
|
|
217
|
+
|
|
218
|
+
### Findings
|
|
219
|
+
| # | Finding | Severity | Location |
|
|
220
|
+
|---|---------|----------|----------|
|
|
221
|
+
|
|
222
|
+
### Risks
|
|
223
|
+
- (identified risks or concerns)
|
|
224
|
+
|
|
225
|
+
### Recommendations
|
|
226
|
+
- (actionable recommendations)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**design:**
|
|
230
|
+
```markdown
|
|
231
|
+
### Constraints
|
|
232
|
+
- (hard limits, requirements, compatibility needs)
|
|
233
|
+
|
|
234
|
+
### Alternatives
|
|
235
|
+
| # | Approach | Pros | Cons |
|
|
236
|
+
|---|----------|------|------|
|
|
237
|
+
|
|
238
|
+
### Trade-offs
|
|
239
|
+
- (key trade-off decisions and rationale)
|
|
240
|
+
|
|
241
|
+
### Chosen Approach
|
|
242
|
+
- (selected design with justification)
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**plan:**
|
|
246
|
+
```markdown
|
|
247
|
+
### Goals
|
|
248
|
+
- (what success looks like)
|
|
249
|
+
|
|
250
|
+
### Breakdown
|
|
251
|
+
| # | Task | Estimate | Depends On | Status |
|
|
252
|
+
|---|------|----------|------------|--------|
|
|
253
|
+
|
|
254
|
+
### Dependencies
|
|
255
|
+
- (external dependencies, blockers, prerequisites)
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**review:**
|
|
259
|
+
```markdown
|
|
260
|
+
### Files Reviewed
|
|
261
|
+
| File | Lines | Findings |
|
|
262
|
+
|------|-------|----------|
|
|
263
|
+
|
|
264
|
+
### Findings
|
|
265
|
+
| # | Severity | Category | File:Line | Description |
|
|
266
|
+
|---|----------|----------|-----------|-------------|
|
|
267
|
+
|
|
268
|
+
### Verdict
|
|
269
|
+
- (pass / pass-with-concerns / fail)
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**test:**
|
|
273
|
+
```markdown
|
|
274
|
+
### Coverage
|
|
275
|
+
- Before: {%}
|
|
276
|
+
- After: {%}
|
|
277
|
+
- Target: {%}
|
|
278
|
+
|
|
279
|
+
### Test Files
|
|
280
|
+
| File | Type | Tests Added | Status |
|
|
281
|
+
|------|------|------------|--------|
|
|
282
|
+
|
|
283
|
+
### Gaps
|
|
284
|
+
- (uncovered paths or scenarios)
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**refactor:**
|
|
288
|
+
```markdown
|
|
289
|
+
### Affected Modules
|
|
290
|
+
- (modules being restructured)
|
|
291
|
+
|
|
292
|
+
### Before / After
|
|
293
|
+
| Aspect | Before | After |
|
|
294
|
+
|--------|--------|-------|
|
|
295
|
+
|
|
296
|
+
### Breaking Changes
|
|
297
|
+
- (API or behavior changes that affect consumers)
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**learn:**
|
|
301
|
+
```markdown
|
|
302
|
+
### Questions
|
|
303
|
+
| # | Question | Answered | Source |
|
|
304
|
+
|---|----------|----------|--------|
|
|
305
|
+
|
|
306
|
+
### Mental Model
|
|
307
|
+
- (evolving understanding of how it works)
|
|
308
|
+
|
|
309
|
+
### References
|
|
310
|
+
- (files, docs, wiki entries consulted)
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
**general:**
|
|
314
|
+
```markdown
|
|
315
|
+
### Notes
|
|
316
|
+
- (general working notes)
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Write the companion doc path to `.workflow/.scratchpad/.companion-active`.
|
|
320
|
+
|
|
321
|
+
### 5. Output summary card
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
Knowledge context loaded
|
|
325
|
+
Spec: {N} rules ({category})
|
|
326
|
+
Knowhow: {M} entries available
|
|
327
|
+
Codebase: {status}
|
|
328
|
+
Doc: {companion_doc_path} [{task_type}]
|
|
329
|
+
|
|
330
|
+
Mid-task commands:
|
|
331
|
+
/maestro-companion note "finding or decision"
|
|
332
|
+
/maestro-companion note --file src/auth.ts "changed token validation"
|
|
333
|
+
/spec-load --keyword <keyword>
|
|
334
|
+
maestro search "<query>"
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## S_NOTE — Append Structured Entry to Companion Doc
|
|
340
|
+
|
|
341
|
+
### 1. Locate active companion doc
|
|
342
|
+
|
|
343
|
+
Read `.workflow/.scratchpad/.companion-active` to get the doc path.
|
|
344
|
+
If missing or file not found → create a new companion doc (same as S_BEFORE step 4, minimal — no spec/knowhow loading).
|
|
345
|
+
|
|
346
|
+
### 2. Parse entry content and flags
|
|
347
|
+
|
|
348
|
+
Parse $ARGUMENTS after `note` keyword:
|
|
349
|
+
- `--file <path>` — associate entry with a specific file (appended to frontmatter `working_files`)
|
|
350
|
+
- `--severity <level>` — for findings: critical / high / medium / low
|
|
351
|
+
- Remaining text = entry content
|
|
352
|
+
|
|
353
|
+
### 3. Classify entry type
|
|
354
|
+
|
|
355
|
+
Auto-classify from content signals:
|
|
356
|
+
|
|
357
|
+
| Content signal | Type tag |
|
|
358
|
+
|---------------|----------|
|
|
359
|
+
| "decided/decision/chose/picked/went with" | `decision` |
|
|
360
|
+
| "pattern/convention/rule/always/never/must" | `spec-candidate` |
|
|
361
|
+
| "pitfall/gotcha/careful/warning/trap/beware" | `pitfall` |
|
|
362
|
+
| "learned/realized/discovered/understood/turns out" | `insight` |
|
|
363
|
+
| "hypothesis/suspect/might be/could be" | `hypothesis` |
|
|
364
|
+
| "found bug/root cause/because of/caused by" | `evidence` |
|
|
365
|
+
| "risk/concern/worry/might break" | `risk` |
|
|
366
|
+
| "todo/need to/should also/follow up/remaining" | `todo` |
|
|
367
|
+
| "question/why does/how does/unclear" | `question` |
|
|
368
|
+
| "blocked/stuck/can't/impossible" | `blocker` |
|
|
369
|
+
| Default | `note` |
|
|
370
|
+
|
|
371
|
+
### 4. Append entry
|
|
372
|
+
|
|
373
|
+
Append to the companion doc under `## Entries`:
|
|
374
|
+
|
|
375
|
+
```markdown
|
|
376
|
+
### [{type}] {HH:mm} — {first line of content}
|
|
377
|
+
|
|
378
|
+
{full content}
|
|
379
|
+
|
|
380
|
+
{if --file: **File:** `{path}`}
|
|
381
|
+
{if --severity: **Severity:** {level}}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### 5. Update frontmatter fields
|
|
385
|
+
|
|
386
|
+
- If `--file` provided and not already in `working_files` → append to `working_files`
|
|
387
|
+
- If type is `decision` → also append row to `### Decisions` table (if implement/design type doc)
|
|
388
|
+
- If type is `hypothesis` → also append row to `### Hypotheses` table (if debug type doc)
|
|
389
|
+
- If type is `evidence` → also append row to `### Evidence Trail` table (if debug type doc)
|
|
390
|
+
- If type is `risk` → also append to `### Risks` list (if analyze/design type doc)
|
|
391
|
+
- If type is `question` → also append row to `### Questions` table (if learn type doc)
|
|
392
|
+
|
|
393
|
+
### 6. Confirm
|
|
394
|
+
|
|
395
|
+
```
|
|
396
|
+
[{type}] entry added to companion doc
|
|
397
|
+
/maestro-companion note "..." — add more
|
|
398
|
+
/maestro-companion after — review & promote
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## S_AFTER — Review Companion Doc + Populate Outcome + Promote Entries + Route
|
|
404
|
+
|
|
405
|
+
### 1. Load companion doc
|
|
406
|
+
|
|
407
|
+
Read `.workflow/.scratchpad/.companion-active` → read the companion doc.
|
|
408
|
+
If no active doc or doc is empty → skip to step 4 (accumulation reminder).
|
|
409
|
+
|
|
410
|
+
### 2. Populate outcome fields
|
|
411
|
+
|
|
412
|
+
Collect task outcome data:
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
# Detect files changed since companion doc creation
|
|
416
|
+
git diff --name-only --since="{companion_created_timestamp}"
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Update frontmatter:
|
|
420
|
+
- `files_changed` — from git diff
|
|
421
|
+
- `completed` — current ISO timestamp
|
|
422
|
+
- `status` — `completed`
|
|
423
|
+
|
|
424
|
+
Display entry summary:
|
|
425
|
+
```
|
|
426
|
+
Companion doc review — {task_type}
|
|
427
|
+
Entries: {total} ({by type breakdown})
|
|
428
|
+
Files: {files_changed count} changed
|
|
429
|
+
Duration: {elapsed since created}
|
|
430
|
+
|
|
431
|
+
Promotable entries:
|
|
432
|
+
{list of decision/spec-candidate/pitfall/insight entries}
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### 3. Promote entries
|
|
436
|
+
|
|
437
|
+
If promotable entries exist, AskUserQuestion:
|
|
438
|
+
|
|
439
|
+
- Option 1: "Promote to spec" — short coding/arch/test constraint
|
|
440
|
+
- Option 2: "Promote to knowhow" — detailed recipe/template/decision/tip
|
|
441
|
+
- Option 3: "Promote both" — spec index entry + knowhow document
|
|
442
|
+
- Option 4: "Skip — nothing to promote"
|
|
443
|
+
|
|
444
|
+
**Routing by selection:**
|
|
445
|
+
|
|
446
|
+
| Selection | Action |
|
|
447
|
+
|-----------|--------|
|
|
448
|
+
| Spec | `Skill("spec-add", args)` — guide user through category + content |
|
|
449
|
+
| Knowhow | `Skill("manage-knowhow-capture", args)` — guide through type + content |
|
|
450
|
+
| Both | `Skill("spec-add")` first, then `Skill("manage-knowhow-capture")` |
|
|
451
|
+
| Skip | Proceed to step 4 |
|
|
452
|
+
|
|
453
|
+
Update frontmatter: `promoted_specs`, `promoted_knowhow` counts.
|
|
454
|
+
|
|
455
|
+
Extract any `todo` entries → write to `follow_up` in frontmatter.
|
|
456
|
+
|
|
457
|
+
Clear `.workflow/.scratchpad/.companion-active`.
|
|
458
|
+
|
|
459
|
+
### 4. Output accumulation reminder + routing
|
|
460
|
+
|
|
461
|
+
```
|
|
462
|
+
Knowledge accumulation reminders:
|
|
463
|
+
Reusable pattern found? /spec-add <category> "title" "content" --description "summary"
|
|
464
|
+
Solved a complex problem? /manage-knowhow-capture recipe "description"
|
|
465
|
+
Made an architecture decision? /manage-knowhow-capture decision "description"
|
|
466
|
+
Discovered a useful trick? /manage-knowhow-capture tip "content"
|
|
467
|
+
|
|
468
|
+
Next steps:
|
|
469
|
+
/maestro-next — recommend next command
|
|
470
|
+
/maestro "<intent>" — route intent to full workflow
|
|
471
|
+
/manage-status — view project dashboard
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## S_ROUTE — Skill Routing
|
|
477
|
+
|
|
478
|
+
### 1. Parse intent
|
|
479
|
+
|
|
480
|
+
Extract intent text from $ARGUMENTS after removing the `route` keyword.
|
|
481
|
+
|
|
482
|
+
### 2. Delegate to maestro-next
|
|
483
|
+
|
|
484
|
+
```
|
|
485
|
+
Skill("maestro-next", "<intent_text>")
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
Reuses maestro-next routing table and scoring logic to recommend the best single command.
|
|
489
|
+
|
|
490
|
+
</execution>
|
|
491
|
+
|
|
492
|
+
<error_codes>
|
|
493
|
+
| Code | Severity | Condition | Recovery |
|
|
494
|
+
|------|----------|-----------|----------|
|
|
495
|
+
| W001 | warning | `.workflow/specs/` not initialized | Suggest `/spec-setup` |
|
|
496
|
+
| W002 | warning | `.workflow/knowhow/` is empty | Normal, skip knowhow index |
|
|
497
|
+
| W003 | warning | `.workflow/codebase/` does not exist | Suggest `/manage-codebase-rebuild` |
|
|
498
|
+
| W004 | warning | No active companion doc found (note/after mode) | Create new doc or skip |
|
|
499
|
+
</error_codes>
|
|
500
|
+
|
|
501
|
+
<success_criteria>
|
|
502
|
+
- [ ] Mode correctly detected (before/note/after/route)
|
|
503
|
+
- [ ] Task type resolved from --type flag or inferred from --task keywords
|
|
504
|
+
- [ ] before: spec + knowhow + codebase indexes loaded or hints given
|
|
505
|
+
- [ ] before: companion doc created with full YAML frontmatter (identity + context + scope + outcome placeholders)
|
|
506
|
+
- [ ] before: type-specific context template written (matching task_type)
|
|
507
|
+
- [ ] before: active doc path written to `.companion-active`
|
|
508
|
+
- [ ] before: summary card output with mid-task command hints
|
|
509
|
+
- [ ] note: active companion doc located and entry appended with type tag
|
|
510
|
+
- [ ] note: entry type auto-classified from content signals (11 type tags)
|
|
511
|
+
- [ ] note: --file flag updates working_files in frontmatter
|
|
512
|
+
- [ ] note: typed entries cross-posted to matching context tables (decisions→Decisions, hypothesis→Hypotheses, etc.)
|
|
513
|
+
- [ ] after: companion doc entries reviewed and promotable items identified
|
|
514
|
+
- [ ] after: outcome fields populated (files_changed, completed, status)
|
|
515
|
+
- [ ] after: AskUserQuestion routes to spec-add or manage-knowhow-capture
|
|
516
|
+
- [ ] after: todo entries extracted to follow_up field
|
|
517
|
+
- [ ] after: companion doc marked completed, active pointer cleared
|
|
518
|
+
- [ ] after: accumulation reminder + next-step routing displayed
|
|
519
|
+
- [ ] route: intent correctly forwarded to maestro-next
|
|
520
|
+
- [ ] No session created, no state.json modified
|
|
521
|
+
</success_criteria>
|
|
522
|
+
|
|
523
|
+
<completion>
|
|
524
|
+
### Next-step routing
|
|
525
|
+
| Condition | Suggestion |
|
|
526
|
+
|-----------|-----------|
|
|
527
|
+
| Reusable pattern found | `/spec-add <category> "title" "content"` |
|
|
528
|
+
| Solved complex problem | `/manage-knowhow-capture recipe "description"` |
|
|
529
|
+
| Architecture decision made | `/manage-knowhow-capture decision "description"` |
|
|
530
|
+
| Want next command recommendation | `/maestro-next` |
|
|
531
|
+
</completion>
|