maestro-flow 0.4.12 → 0.4.13

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.
Files changed (129) hide show
  1. package/.agents/agents/role-design-author.md +6 -4
  2. package/.agents/skills/learn-decompose/SKILL.md +6 -6
  3. package/.agents/skills/learn-follow/SKILL.md +4 -4
  4. package/.agents/skills/learn-investigate/SKILL.md +6 -6
  5. package/.agents/skills/learn-retro/SKILL.md +7 -7
  6. package/.agents/skills/learn-second-opinion/SKILL.md +4 -4
  7. package/.agents/skills/maestro-amend/SKILL.md +1 -0
  8. package/.agents/skills/maestro-analyze/SKILL.md +10 -3
  9. package/.agents/skills/maestro-blueprint/SKILL.md +4 -3
  10. package/.agents/skills/maestro-brainstorm/SKILL.md +5 -4
  11. package/.agents/skills/maestro-fork/SKILL.md +1 -1
  12. package/.agents/skills/maestro-guard/SKILL.md +3 -2
  13. package/.agents/skills/maestro-impeccable/SKILL.md +13 -11
  14. package/.agents/skills/maestro-milestone-release/SKILL.md +1 -1
  15. package/.agents/skills/maestro-plan/SKILL.md +3 -1
  16. package/.agents/skills/maestro-ralph-execute/SKILL.md +4 -3
  17. package/.agents/skills/maestro-roadmap/SKILL.md +4 -3
  18. package/.agents/skills/manage-harvest/SKILL.md +1 -0
  19. package/.agents/skills/manage-issue-discover/SKILL.md +1 -1
  20. package/.agents/skills/manage-knowhow/SKILL.md +1 -1
  21. package/.agents/skills/manage-learn/SKILL.md +4 -4
  22. package/.agents/skills/quality-auto-test/SKILL.md +5 -5
  23. package/.agents/skills/quality-refactor/SKILL.md +1 -1
  24. package/.agents/skills/quality-retrospective/SKILL.md +2 -2
  25. package/.agents/skills/security-audit/SKILL.md +24 -0
  26. package/.agents/skills/spec-remove/SKILL.md +6 -2
  27. package/.agy/agents/role-design-author.md +6 -4
  28. package/.agy/skills/learn-decompose/SKILL.md +6 -6
  29. package/.agy/skills/learn-follow/SKILL.md +4 -4
  30. package/.agy/skills/learn-investigate/SKILL.md +6 -6
  31. package/.agy/skills/learn-retro/SKILL.md +7 -7
  32. package/.agy/skills/learn-second-opinion/SKILL.md +4 -4
  33. package/.agy/skills/maestro-amend/SKILL.md +1 -0
  34. package/.agy/skills/maestro-analyze/SKILL.md +10 -3
  35. package/.agy/skills/maestro-blueprint/SKILL.md +4 -3
  36. package/.agy/skills/maestro-brainstorm/SKILL.md +5 -4
  37. package/.agy/skills/maestro-fork/SKILL.md +1 -1
  38. package/.agy/skills/maestro-guard/SKILL.md +3 -2
  39. package/.agy/skills/maestro-impeccable/SKILL.md +13 -11
  40. package/.agy/skills/maestro-milestone-release/SKILL.md +1 -1
  41. package/.agy/skills/maestro-plan/SKILL.md +3 -1
  42. package/.agy/skills/maestro-ralph-execute/SKILL.md +4 -3
  43. package/.agy/skills/maestro-roadmap/SKILL.md +4 -3
  44. package/.agy/skills/manage-harvest/SKILL.md +1 -0
  45. package/.agy/skills/manage-issue-discover/SKILL.md +1 -1
  46. package/.agy/skills/manage-knowhow/SKILL.md +1 -1
  47. package/.agy/skills/manage-learn/SKILL.md +4 -4
  48. package/.agy/skills/quality-auto-test/SKILL.md +5 -5
  49. package/.agy/skills/quality-refactor/SKILL.md +1 -1
  50. package/.agy/skills/quality-retrospective/SKILL.md +2 -2
  51. package/.agy/skills/security-audit/SKILL.md +24 -0
  52. package/.agy/skills/spec-remove/SKILL.md +6 -2
  53. package/.claude/agents/role-design-author.md +6 -4
  54. package/.claude/commands/learn-decompose.md +6 -6
  55. package/.claude/commands/learn-follow.md +4 -4
  56. package/.claude/commands/learn-investigate.md +6 -6
  57. package/.claude/commands/learn-retro.md +7 -7
  58. package/.claude/commands/learn-second-opinion.md +4 -4
  59. package/.claude/commands/maestro-amend.md +1 -0
  60. package/.claude/commands/maestro-analyze.md +10 -3
  61. package/.claude/commands/maestro-blueprint.md +4 -3
  62. package/.claude/commands/maestro-brainstorm.md +5 -4
  63. package/.claude/commands/maestro-fork.md +1 -1
  64. package/.claude/commands/maestro-guard.md +3 -2
  65. package/.claude/commands/maestro-impeccable.md +13 -11
  66. package/.claude/commands/maestro-milestone-release.md +1 -1
  67. package/.claude/commands/maestro-plan.md +3 -1
  68. package/.claude/commands/maestro-ralph-execute.md +4 -3
  69. package/.claude/commands/maestro-roadmap.md +4 -3
  70. package/.claude/commands/manage-harvest.md +1 -0
  71. package/.claude/commands/manage-issue-discover.md +1 -1
  72. package/.claude/commands/manage-knowhow.md +1 -1
  73. package/.claude/commands/manage-learn.md +4 -4
  74. package/.claude/commands/quality-auto-test.md +5 -5
  75. package/.claude/commands/quality-refactor.md +1 -1
  76. package/.claude/commands/quality-retrospective.md +2 -2
  77. package/.claude/commands/security-audit.md +24 -0
  78. package/.claude/commands/spec-remove.md +6 -2
  79. package/.codex/skills/learn-decompose/SKILL.md +4 -4
  80. package/.codex/skills/learn-follow/SKILL.md +3 -3
  81. package/.codex/skills/learn-investigate/SKILL.md +3 -3
  82. package/.codex/skills/learn-retro/SKILL.md +3 -3
  83. package/.codex/skills/learn-second-opinion/SKILL.md +3 -3
  84. package/.codex/skills/maestro-analyze/SKILL.md +4 -3
  85. package/.codex/skills/maestro-blueprint/SKILL.md +4 -3
  86. package/.codex/skills/maestro-brainstorm/SKILL.md +148 -7
  87. package/.codex/skills/maestro-fork/SKILL.md +2 -0
  88. package/.codex/skills/maestro-guard/SKILL.md +3 -2
  89. package/.codex/skills/maestro-impeccable/SKILL.md +13 -11
  90. package/.codex/skills/maestro-ralph/SKILL.md +1 -1
  91. package/.codex/skills/maestro-roadmap/SKILL.md +4 -3
  92. package/.codex/skills/manage-codebase-rebuild/SKILL.md +9 -5
  93. package/.codex/skills/manage-harvest/SKILL.md +1 -1
  94. package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
  95. package/.codex/skills/manage-knowhow/SKILL.md +1 -1
  96. package/.codex/skills/manage-learn/SKILL.md +3 -3
  97. package/.codex/skills/quality-refactor/SKILL.md +2 -2
  98. package/.codex/skills/quality-retrospective/SKILL.md +3 -3
  99. package/.codex/skills/security-audit/SKILL.md +24 -0
  100. package/.codex/skills/spec-remove/SKILL.md +8 -2
  101. package/package.json +1 -1
  102. package/workflows/agy-instructions.md +2 -0
  103. package/workflows/auto-test.md +6 -1
  104. package/workflows/brainstorm.md +22 -8
  105. package/workflows/claude-instructions.md +2 -0
  106. package/workflows/codex-instructions.md +16 -83
  107. package/workflows/debug.md +1 -1
  108. package/workflows/harvest.md +1 -1
  109. package/workflows/impeccable.md +2 -0
  110. package/workflows/issue-analyze.md +14 -100
  111. package/workflows/issue-discover.md +2 -3
  112. package/workflows/issue-execute.md +1 -1
  113. package/workflows/issue-gaps-analyze.md +2 -0
  114. package/workflows/learn.md +1 -1
  115. package/workflows/maestro-chain-execute.md +10 -228
  116. package/workflows/maestro.md +1 -0
  117. package/workflows/milestone-complete.md +3 -3
  118. package/workflows/milestone-release.md +82 -0
  119. package/workflows/plan.md +4 -4
  120. package/workflows/retrospective.md +1 -1
  121. package/workflows/roadmap.md +1 -1
  122. package/workflows/spec-generate.md +2 -0
  123. package/workflows/specs-add.md +6 -1
  124. package/workflows/specs-load.md +6 -1
  125. package/workflows/specs-setup.md +6 -1
  126. package/workflows/sync.md +13 -0
  127. package/workflows/tools-spec.md +4 -0
  128. package/workflows/ui-design.md +3 -3
  129. package/workflows/wiki-manage.md +2 -0
@@ -1,5 +1,7 @@
1
1
  # Workflow: Issue Gaps Analysis
2
2
 
3
+ > **CLI variants**: see `issue-gaps-analyze.codex.md` for codex-specific notes (CSV-wave variant using `spawn_agents_on_csv`).
4
+
3
5
  Root cause analysis for issues using CLI exploration and codebase context gathering.
4
6
  Supports single issue (ISS-ID) or batch (all open/registered) with classification and parallel analysis.
5
7
  Produces analysis records in issues.jsonl and context.md for downstream `plan --gaps`.
@@ -8,7 +8,7 @@ Storage:
8
8
 
9
9
  **Shared store rationale:** Manual captures (`source: "manual"`), tips (`source: "tip"`), retrospective-distilled insights (`source: "retrospective"`, `lens: <name>` from `quality-retrospective`), and learn-retro insights (`source: "retro-git"` or `source: "retro-decision"` from `learn-retro`) all live in the same store so search and list see the entire knowledge corpus. The `source` field disambiguates origin.
10
10
 
11
- This workflow does NOT spawn agents or call CLI tools. It is a thin file operation: parse → infer → append → confirm.
11
+ This workflow does NOT spawn sub-agents; it may invoke maestro CLI utilities (e.g. `maestro wiki search`, `maestro wiki list`) for list/search subcommands. The core capture flow is a thin file operation: parse → infer → append → confirm.
12
12
 
13
13
  ---
14
14
 
@@ -4,235 +4,17 @@
4
4
  > Both maestro and ralph sessions now use `maestro-ralph-execute` for step execution.
5
5
  > This file is kept for reference only and will be removed in a future version.
6
6
 
7
- Original description: Upgraded version of maestro's original direct execution strategy.
8
- Reads session status.json, loops through steps with per-step engine selection,
9
- context propagation, post-step Gemini analysis, and error handling.
10
- Dual-track progress: status.json (persistence + resume) and TodoWrite (UI visibility).
7
+ ## Migration
11
8
 
12
- **Prerequisites:**
13
- - Session directory with valid status.json (status: "running", pending steps)
14
- - TodoWrite initialized by selection workflow (Step 3h) with `MAESTRO:{chain_name}:` prefix
15
- - $SESSION_PATH passed from maestro.md dispatch
9
+ - Caller dispatching from `maestro.md` → use `Skill({ skill: "maestro-ralph-execute" })`
10
+ - Resume from session `Skill({ skill: "maestro-ralph-execute" })` (auto-discovers latest running session via `.workflow/.maestro/*/status.json`)
16
11
 
17
- ## Step 1: Load Session
12
+ ## References
18
13
 
19
- Read status.json from `$SESSION_PATH`.
14
+ - `~/.maestro/workflows/maestro.md` coordinator that creates sessions and dispatches to the unified executor
15
+ - `~/.maestro/workflows/maestro-ralph-execute.md` — current canonical executor (handles both maestro static chains and ralph adaptive chains)
20
16
 
21
- Extract: `session_id`, `chain_name`, `steps[]`, `context`, `auto_mode`, `exec_mode`, `cli_tool`, `gemini_session_id`.
22
-
23
- Set `$STEP_INDEX` = `current_step` (first pending step).
24
-
25
- Validate: `status == "running"` and at least one pending step exists.
26
-
27
- **TodoWrite sync (resume mode):** If TodoWrite has no `MAESTRO:{chain_name}:` entries (e.g., fresh context after `/maestro -c`), rebuild from status.json:
28
-
29
- ```javascript
30
- const todos = steps.map((step, i) => ({
31
- content: `MAESTRO:${chain_name}: [${i + 1}/${steps.length}] ${step.skill}`,
32
- status: step.status === 'completed' ? 'completed'
33
- : i === $STEP_INDEX ? 'in_progress'
34
- : 'pending'
35
- }));
36
- TodoWrite({ todos });
37
- ```
38
-
39
- Display banner:
40
-
41
- ```
42
- ============================================================
43
- CHAIN EXECUTOR
44
- ============================================================
45
- Session: {session_id}
46
- Chain: {chain_name}
47
- Steps: {completed}/{total} done, starting from step {$STEP_INDEX}
48
- Auto: {auto_mode}
49
- Exec: {exec_mode}
50
- ```
51
-
52
- ## Step 2: Context & Argument Assembly
53
-
54
- Initialize context object from `status.json.context`:
55
-
56
- ```
57
- context = {
58
- current_phase, // from status.json.context or top-level phase
59
- user_intent, // from status.json.context or top-level intent
60
- issue_id,
61
- milestone_num,
62
- spec_session_id,
63
- scratch_dir
64
- }
65
- ```
66
-
67
- ### assembleArgs(step)
68
-
69
- ```
70
- 1. Substitute placeholders in step.args:
71
- {phase} → context.current_phase
72
- {description} → context.user_intent (chainMap uses {description} as alias for user intent)
73
- {issue_id} → context.issue_id
74
- {spec_session_id} → context.spec_session_id
75
- {scratch_dir} → context.scratch_dir
76
- {milestone_num} → context.milestone_num
77
-
78
- 2. In auto_mode, append per-command flag if not already present:
79
- maestro-analyze / maestro-brainstorm / maestro-roadmap / maestro-impeccable → -y
80
- maestro-plan → --auto
81
- quality-test → --auto-fix
82
- quality-retrospective → --auto-yes
83
-
84
- 3. Shell-escape strings with single quotes for CLI delegate calls.
85
- ```
86
-
87
- ## Step 3: Step Loop
88
-
89
- For each step starting at `$STEP_INDEX`:
90
-
91
- ### 3a. Select engine & display banner
92
-
93
- Read `step.engine` from status.json (pre-computed by selection workflow Step 3e).
94
-
95
- If `step.engine` is missing or null, fallback to auto selection:
96
- ```
97
- CLI: maestro-plan, maestro-execute, maestro-analyze, maestro-brainstorm,
98
- maestro-roadmap, maestro-impeccable, quality-refactor
99
- Internal: everything else (current-session Skill() call)
100
- ```
101
-
102
- Display: `[Step {N}/{total}] /{step.skill} [{engine}] — {args}`
103
-
104
- Update status.json: step `status = "running"`, `engine`, `started_at`.
105
-
106
- Context window hint:
107
- - Step >= 4 and not autoYes: hint user about `/maestro -c` for fresh context resume.
108
- - autoYes and step >= 5: log warning to status.json.
109
-
110
- ### 3b. Execute (engine-dependent)
111
-
112
- **Internal engine** — current-session Skill() call (synchronous, visible):
113
-
114
- ```
115
- Skill({ skill: step.skill, args: assembledArgs })
116
- ```
117
-
118
- **CLI engine** — template-driven, async, context-isolated:
119
-
120
- ```
121
- 1. Load template ~/.maestro/templates/cli/prompts/coordinate-step.txt
122
- 2. Build analysisHints from previous step's next_step_hints
123
- (prompt_additions, cautions, context_to_carry)
124
- 3. Substitute template placeholders:
125
- {{COMMAND}}, {{ARGS}}, {{STEP_N}}, {{AUTO_DIRECTIVE}},
126
- {{CHAIN_NAME}}, {{ANALYSIS_HINTS}}
127
- 4. Run:
128
- Bash(maestro delegate "<prompt>" --to {cli_tool} --mode write,
129
- run_in_background: true, timeout: 600000)
130
- 5. **STOP** — wait for background callback
131
- ```
132
-
133
- ### 3c. Parse output & update context
134
-
135
- Scan step output for context propagation:
136
-
137
- ```
138
- PHASE: N → context.current_phase
139
- SPEC-xxx → context.spec_session_id
140
- scratch_dir: path → context.scratch_dir
141
- ```
142
-
143
- CLI: capture `exec_id` from stderr `[MAESTRO_EXEC_ID=<id>]`.
144
-
145
- **Persist context back to status.json** after each step — write updated `context` field and `current_step`. This enables resume via `/maestro -c`.
146
-
147
- ### 3d. Handle result & sync dual tracking
148
-
149
- **Success:**
150
- 1. status.json: mark step `status = "completed"`, set `completed_at`
151
- 2. TodoWrite: mark current step `completed`, next step `in_progress`
152
- 3. CLI: save output to `step-{N}-output.txt` in session directory
153
-
154
- ```javascript
155
- // Dual-track update after each step
156
- function updateDualTracking(stepIndex, total, chain_name, result) {
157
- // 1. status.json — already updated in 3c
158
- // 2. TodoWrite — sync UI
159
- const todos = getAllTodos().map(todo => {
160
- if (!todo.content.startsWith(`MAESTRO:${chain_name}:`)) return todo;
161
- const num = extractStepNum(todo.content);
162
- if (num === stepIndex + 1) return { ...todo, status: result };
163
- if (num === stepIndex + 2 && result === 'completed') return { ...todo, status: 'in_progress' };
164
- return todo;
165
- });
166
- TodoWrite({ todos });
167
- }
168
- ```
169
-
170
- **Failure:**
171
- 1. status.json: mark step `"failed"` or `"skipped"`
172
- 2. TodoWrite: mark step `completed` (skipped) or keep `in_progress` (retry)
173
- 3. `auto_mode` → retry once, then skip
174
- 4. Interactive → offer: Retry (max 2) / Skip / Abort
175
- 5. Abort → status.json `status = "aborted"`, TodoWrite mark remaining `pending`, display resume hint: `/maestro -c`
176
-
177
- ### 3e. Post-step analysis (CLI steps only)
178
-
179
- Skip if: step failed/skipped, or `engine == 'internal'`.
180
-
181
- Delegate to gemini (analysis mode, `--resume` if `gemini_session_id` exists) with prompt containing:
182
- - Step command, args, chain name, intent
183
- - Last 200 lines of step output
184
- - Next step info (command, args) if any
185
-
186
- Expected JSON response:
187
-
188
- ```json
189
- {
190
- "quality_score": "<0-100>",
191
- "execution_assessment": {
192
- "success": "<bool>",
193
- "completeness": "<full|partial|minimal>",
194
- "key_outputs": [],
195
- "missing_outputs": []
196
- },
197
- "issues": [
198
- { "severity": "critical|high|medium|low", "description": "" }
199
- ],
200
- "next_step_hints": {
201
- "prompt_additions": "<extra context for next step>",
202
- "cautions": ["<things to watch out for>"],
203
- "context_to_carry": "<key facts from this step>"
204
- },
205
- "step_summary": ""
206
- }
207
- ```
208
-
209
- On callback:
210
- 1. Capture gemini `exec_id` → store as `gemini_session_id` in status.json for session continuity.
211
- 2. Store analysis in `step_analyses[]` and `step-{N}-analysis.json` in session directory.
212
- 3. Advance to next step (**3a**).
213
-
214
- ## Step 4: Completion Report
215
-
216
- Finalize dual tracking:
217
- 1. status.json: `status = "completed"`
218
- 2. TodoWrite: all steps marked `completed` (or `completed` for skipped)
219
-
220
- ```
221
- ============================================================
222
- MAESTRO SESSION COMPLETE
223
- ============================================================
224
- Session: {session_id}
225
- Chain: {chain_name}
226
- Steps: {completed}/{total} completed
227
- Phase: {context.current_phase}
228
-
229
- Results:
230
- [✓] 1. maestro-plan — completed [cli] (quality: 85/100)
231
- [✓] 2. maestro-verify — completed [internal]
232
- [—] 3. quality-review — skipped [internal]
233
-
234
- CLI Avg Quality: {avgScore}/100 (based on {cliStepCount} cli steps)
235
-
236
- Next: /maestro continue | /manage-status
237
- ============================================================
238
- ```
17
+ The unified executor preserves all behaviour previously documented here:
18
+ status.json persistence, TodoWrite dual-tracking, per-step engine selection (`Skill` vs `CLI`),
19
+ context propagation across steps, post-step Gemini analysis for CLI steps,
20
+ and retry/skip/abort on failure.
@@ -357,6 +357,7 @@ const chainMap = {
357
357
  'spec-driven': [{ cmd: 'maestro-init' }, { cmd: 'maestro-roadmap', args: '--mode full "{description}"' }, { cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }],
358
358
  'roadmap-driven': [{ cmd: 'maestro-init' }, { cmd: 'maestro-roadmap', args: '"{description}"' }, { cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }],
359
359
  'brainstorm-driven': [{ cmd: 'maestro-brainstorm', args: '"{description}"' }, { cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }],
360
+ 'brainstorm_visualize': [{ cmd: 'brainstorm-visualize', args: '"{description}"' }],
360
361
  'impeccable-build': [{ cmd: 'maestro-impeccable', args: '"{description}" --chain build' }, { cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }],
361
362
  'impeccable-driven': [{ cmd: 'maestro-impeccable', args: '"{description}" --chain build' }, { cmd: 'maestro-verify', args: '{phase}' }],
362
363
  'analyze-plan-execute': [{ cmd: 'maestro-analyze', args: '"{description}" -q' }, { cmd: 'maestro-plan', args: '--dir {scratch_dir}' }, { cmd: 'maestro-execute', args: '--dir {scratch_dir}' }],
@@ -15,9 +15,9 @@ Archive completed milestone, move artifacts to history, and prepare for next.
15
15
  2. Check milestone audit status:
16
16
  - Read `.workflow/milestones/{milestone}/audit-report.md` if exists
17
17
  - If no audit report:
18
- - WARN: "No audit report found. Run `/maestro-milestone-audit` first."
19
- - Ask user: "Complete without audit?"
20
- - If NO exit
18
+ - ERROR E004: "No audit report found. Audit is a required hard contract — cannot complete without it."
19
+ - Guidance: "Run `/maestro-milestone-audit` first, then re-run this command."
20
+ - Exit (skipping audit is not permitted)
21
21
  - If verdict is FAIL: ERROR E002
22
22
 
23
23
  3. Verify all milestone artifacts have status "completed" → ERROR E003 if any incomplete (list ids and statuses)
@@ -0,0 +1,82 @@
1
+ # Workflow: milestone-release
2
+
3
+ Bump version, generate changelog, and tag the current milestone for release.
4
+
5
+ > **STATUS: PLACEHOLDER** — minimal skeleton referenced by `maestro-milestone-release.md`.
6
+ > Full release pipeline is TODO. Do not invoke until contents below are fleshed out.
7
+
8
+ ---
9
+
10
+ ## Arguments
11
+
12
+ | Flag | Description | Default |
13
+ |------|-------------|---------|
14
+ | `<milestone>` | Milestone id from `.workflow/state.json` `milestones[]` | current_milestone |
15
+ | `--bump <level>` | Semver bump: `major` \| `minor` \| `patch` | `minor` |
16
+ | `--dry-run` | Preview changes without writing | `false` |
17
+
18
+ ---
19
+
20
+ ## Step 1: Validation
21
+
22
+ 1. Read `.workflow/state.json`:
23
+ - Determine target milestone (from `$ARGUMENTS` or `current_milestone`).
24
+ - If no milestone: ERROR E001.
25
+ 2. Verify milestone is **completed**:
26
+ - Read `.workflow/milestones/{milestone}/audit-report.md` — verdict must be `PASS`.
27
+ - If missing or non-PASS: ERROR E002 with guidance to run `/maestro-milestone-complete` first.
28
+ 3. Read package manifest (`package.json` / `pyproject.toml` / etc.) — locate current version. TODO: multi-manifest detection.
29
+
30
+ ---
31
+
32
+ ## Step 2: Version Bump
33
+
34
+ 1. Compute next version from `--bump` level (semver). TODO: prerelease/build metadata handling.
35
+ 2. Update manifest file in place. If `--dry-run`: print diff and exit.
36
+
37
+ ---
38
+
39
+ ## Step 3: Changelog Generation
40
+
41
+ 1. Read milestone audit report + retrospective insights (`.workflow/milestones/{milestone}/`).
42
+ 2. Render `CHANGELOG.md` entry — header `## [vX.Y.Z] - YYYY-MM-DD`, body grouped by `Added / Changed / Fixed / Removed`.
43
+ 3. TODO: integrate with `quality-retrospective` output for richer narrative.
44
+
45
+ ---
46
+
47
+ ## Step 4: Tag and Commit
48
+
49
+ 1. Stage updated manifest + `CHANGELOG.md`.
50
+ 2. Commit: `chore(release): vX.Y.Z — {milestone}`.
51
+ 3. Create annotated git tag `vX.Y.Z`.
52
+ 4. TODO: optionally push tag (`--push` flag).
53
+
54
+ ---
55
+
56
+ ## Outputs
57
+
58
+ | Artifact | Status |
59
+ |----------|--------|
60
+ | Updated manifest version | written |
61
+ | `CHANGELOG.md` entry | appended |
62
+ | Git tag `vX.Y.Z` | created locally (not pushed) |
63
+
64
+ ---
65
+
66
+ ## Error Codes
67
+
68
+ | Code | Meaning |
69
+ |------|---------|
70
+ | E001 | No milestone resolvable |
71
+ | E002 | Milestone not completed / audit not PASS |
72
+ | E003 | Manifest file not found |
73
+ | E004 | Git working tree dirty (uncommitted changes block tagging) |
74
+
75
+ ---
76
+
77
+ ## TODO (placeholder gaps)
78
+
79
+ - Multi-package monorepo support.
80
+ - Push tag + GitHub release integration.
81
+ - Roll-back path on failed tag.
82
+ - Wire to `manage-knowhow-capture` for release-note capture.
package/workflows/plan.md CHANGED
@@ -166,12 +166,12 @@ When `--tdd` is active:
166
166
  - Map `insights[].summary` to implementation guidance for relevant tasks
167
167
  - These replace the need for a separate analyze step when brainstorm already provided sufficient role analysis
168
168
 
169
- 5. **Parallel exploration** (skip if `--gaps` or upstream analysis loaded)
169
+ 6. **Parallel exploration** (skip if `--gaps` or upstream analysis loaded)
170
170
  - Exploration angles (1-4 based on complexity): architecture, implementation, integration, risk
171
171
  - Spawn 1-4 `cli-explore-agent` in parallel, each with phase goal + success_criteria + one angle
172
172
  - Output: `.process/exploration-{angle}.json`, `.process/explorations-manifest.json`, `.process/context-package.json`
173
173
 
174
- 5b. **CLI supplementary context** (runs in parallel with step 5, skip if `--gaps` or no CLI tools enabled)
174
+ 6b. **CLI supplementary context** (runs in parallel with step 6, skip if `--gaps` or no CLI tools enabled)
175
175
  ```
176
176
  IF no CLI tools enabled: skip
177
177
 
@@ -188,7 +188,7 @@ When `--tdd` is active:
188
188
  ```
189
189
  **On callback:** Parse result, merge into explorationContext as `cli_context` field. Planner uses patterns for task `read_first[]`, dependencies for wave ordering, conflict_risks for collision detection.
190
190
 
191
- 6. **Gap-mode context** (if `--gaps`)
191
+ 7. **Gap-mode context** (if `--gaps`)
192
192
 
193
193
  Gap sources (in priority order, first non-empty wins, then additionals merged):
194
194
  - **Primary**: `.workflow/issues/issues.jsonl` — filter by phase_ref + status in ["registered","diagnosed"], mark as "planning"
@@ -298,7 +298,7 @@ Every TASK-*.json MUST include these fields — they are NOT optional:
298
298
 
299
299
  ### Gap Mode (`--gaps`)
300
300
 
301
- Spawn `workflow-planner` agent with: explorationContext (gap list from P1 Step 6), spec-ref, doc-index.json, phase goal + success_criteria, templates, mode = `gap-fix`.
301
+ Spawn `workflow-planner` agent with: explorationContext (gap list from P1 Step 7), spec-ref, doc-index.json, phase goal + success_criteria, templates, mode = `gap-fix`.
302
302
 
303
303
  Planner: for each gap emit one task — `type: "fix"`, `description`, `action` (concrete fix_direction), `read_first` (affected files), `convergence.criteria` (grep-verifiable), `issue_id` (if source == "issue"); assign IDs and waves; build plan.json.
304
304
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Multi-lens 复盘 of completed phase artifacts. Consumes existing execution outputs (verification.json, review.json, issues.jsonl, .summaries/, state.json, uat.md, plan.json) and routes distilled insights into the spec / note / issue / knowhow stores.
4
4
 
5
- This is a **post-execution analysis** workflow. It reads only — until the routing stage, where it writes new spec stubs, issue rows, memory entries, and knowhow entries. It never modifies existing phase artifacts.
5
+ This is a **post-execution analysis** workflow. It reads only — until the routing stage, where it writes new spec stubs, issue rows, memory entries, and knowhow entries. It **does not modify existing phase artifacts**; it writes to the spec / issue / knowhow stores as configured outputs (new entries appended; pre-existing phase outputs such as verification.json, review.json, uat.md, .summaries/ are never altered).
6
6
 
7
7
  ---
8
8
 
@@ -102,7 +102,7 @@ Follow roadmap-common.md **Roadmap Write Logic** (overwrite vs edit rules, state
102
102
  ## Step 6: Handoff
103
103
 
104
104
  Display summary (strategy, phase count, milestones, roadmap path) and offer next steps:
105
- - `maestro-init` — set up project (if not yet initialized)
105
+ - `maestro-blueprint` — generate formal spec package for the roadmap (if heavier spec is needed)
106
106
  - `maestro-plan 1` — plan first phase
107
107
  - `maestro-brainstorm 1` — explore first phase ideas
108
108
  - `manage-status` — view project dashboard
@@ -11,6 +11,8 @@ brainstorm (optional) → init (REQUIRED) → spec-generate → plan → execute
11
11
  Alternative light path: init → roadmap (light mode) → plan (skip spec-generate)
12
12
  ```
13
13
 
14
+ > **Relation to blueprint**: `spec-generate` is the full-pipeline superset of `blueprint` (adds P7 roadmap stage on top of P0–P6 spec chain). Use `blueprint` when only specs are needed; use `spec-generate` when downstream `roadmap → plan` execution is intended.
15
+
14
16
  ## Architecture
15
17
 
16
18
  ```
@@ -1,4 +1,9 @@
1
- # Workflow: specs-add
1
+ ---
2
+ name: spec-add
3
+ alias: spec-add
4
+ ---
5
+
6
+ # Workflow: spec-add
2
7
 
3
8
  Add a `<spec-entry>` closed-tag entry to a single target spec file by category.
4
9
 
@@ -1,4 +1,9 @@
1
- # Workflow: specs-load
1
+ ---
2
+ name: spec-load
3
+ alias: spec-load
4
+ ---
5
+
6
+ # Workflow: spec-load
2
7
 
3
8
  Load spec files filtered by category. Supports project, global, team, and personal scopes.
4
9
 
@@ -1,4 +1,9 @@
1
- # Workflow: specs-setup
1
+ ---
2
+ name: spec-setup
3
+ alias: spec-setup
4
+ ---
5
+
6
+ # Workflow: spec-setup
2
7
 
3
8
  System specs initialization -- scan project structure, detect tech stack, generate convention files.
4
9
 
package/workflows/sync.md CHANGED
@@ -47,6 +47,19 @@ Read .workflow/codebase/doc-index.json
47
47
  Extract: components[], features[], requirements[], architecture_decisions[]
48
48
  ```
49
49
 
50
+ **Degradation path — doc-index.json missing:**
51
+
52
+ ```
53
+ If .workflow/codebase/doc-index.json does NOT exist:
54
+ 1. Emit WARNING: "doc-index.json missing — sync cannot perform impact analysis."
55
+ 2. Prompt user with two choices:
56
+ (a) Run `/manage-codebase-rebuild` to build doc-index, then re-run sync (recommended)
57
+ (b) Fall back to git-diff-only mode: skip Steps 3-5, emit raw changed-file
58
+ list from Step 2 as the sync output (no component/feature mapping)
59
+ 3. If user picks (b): set DEGRADED_MODE = true and continue with git diff only.
60
+ 4. If user picks (a) or no answer: exit with code E002.
61
+ ```
62
+
50
63
  ### Step 4: Impact Chain Traversal
51
64
 
52
65
  For each `changed_file` in `changed_files[]`:
@@ -1,5 +1,9 @@
1
1
  # Tool Spec Reference
2
2
 
3
+ <reference>
4
+ Tool specs are a **subtype of knowhow** (`tool: true` frontmatter on knowhow documents). For the full knowhow data model, lifecycle, and management commands, see `knowhow.md`. This file documents only the tool-specific subset.
5
+ </reference>
6
+
3
7
  Shared reference for tool spec registration and execution commands.
4
8
 
5
9
  ## Storage
@@ -6,9 +6,9 @@ User reviews via compare.html, selects winner(s), design solidified as code refe
6
6
 
7
7
  Pipeline position: analyze -> **ui-design** -> plan -> execute -> verify
8
8
 
9
- > **Note:** This is the full self-contained pipeline. When ui-ux-pro-max skill is available,
10
- > the command routes to `ui-style.md` instead (lightweight delegation).
11
- > This workflow runs when the skill is absent or `--full` is explicitly requested.
9
+ > **Note:** This is the primary implementation. When the `ui-ux-pro-max` skill is available,
10
+ > the command may delegate to `ui-style.md` for a lightweight path. This workflow is the
11
+ > fallback when the skill is unavailable, and is also used when `--full` is explicitly requested.
12
12
 
13
13
  ---
14
14
 
@@ -44,6 +44,8 @@ Run in parallel: `maestro wiki health`, `list --json`, `orphans`, `hubs --top 5`
44
44
 
45
45
  Display: health score, entry counts by type, broken links, orphan count, top hubs. Include health status message and quick-action commands (`/wiki-connect --fix`, `/wiki-digest`, `/manage-wiki cleanup --fix`, `maestro wiki graph`).
46
46
 
47
+ > **Scope split (complementary, not conflicting):** `/wiki-connect --fix` repairs/augments `related` links between existing entries (no deletion). `/manage-wiki cleanup --fix` deletes/flags orphans and removes broken-link entries from frontmatter. Run `wiki-connect` first to maximize link recovery, then `cleanup` to handle the true residual orphans.
48
+
47
49
  ---
48
50
 
49
51
  ## Subcommand: search <query>