maestro-flow-one 0.2.26 → 0.2.27

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.
@@ -20,6 +20,8 @@ Combines structured 6-dimension scoring with iterative deepening and decision ex
20
20
  Use `-q` for quick decision extraction only (skip exploration + scoring).
21
21
 
22
22
  Use `--gaps` for issue-focused root cause analysis (replaces manage-issue-analyze). Loads issues from issues.jsonl, performs CLI exploration against issue context/location, synthesizes root cause into issue.analysis, and outputs context.md for downstream `plan --gaps`.
23
+
24
+ Pipeline position: downstream of maestro-grill, maestro-brainstorm, and maestro-blueprint (optional upstream enrichment); upstream of maestro-plan and maestro-roadmap (consumes analysis context).
23
25
  </purpose>
24
26
 
25
27
  <required_reading>
@@ -45,31 +47,47 @@ $ARGUMENTS -- phase number for micro mode, topic text for macro/adhoc mode, no a
45
47
  - Mixed input like `"1 phase"` is treated as text → macro mode (only bare numerics trigger micro)
46
48
 
47
49
  **Flags:**
48
- - `-y` / `--yes`: Auto mode — skip interactive scoping, use recommended defaults, auto-deepen
49
- - `-c` / `--continue`: Resume from existing session (auto-detect session folder + discussion.md)
50
- - `-q` / `--quick`: Quick mode — skip exploration + scoring, go straight to decision extraction (context.md only)
51
- - `--from <source>`: Load upstream context package (grill:ID, brainstorm:ID, blueprint:BLP-xxx, @file, or path)
52
- - `--gaps [ISS-ID]`: Issue root cause analysis mode. If ISS-ID provided, analyze single issue. If omitted, analyze all open/registered issues from issues.jsonl.
53
50
 
54
- Scope routing, output directory format, artifact registration schema, and output artifact listing are defined in workflow analyze.md (Scope Routing and Output Structure sections).
51
+ | Flag | Effect | Default |
52
+ |------|--------|---------|
53
+ | `-y` / `--yes` | Auto mode — skip interactive scoping, use recommended defaults, auto-deepen | false |
54
+ | `-c` / `--continue` | Resume from existing session (auto-detect session folder + discussion.md) | false |
55
+ | `-q` / `--quick` | Quick mode — skip exploration + scoring, go straight to decision extraction (context.md only) | false |
56
+ | `--from <source>` | Load upstream context package (grill:ID, brainstorm:ID, blueprint:BLP-xxx, @file, or path) | — |
57
+ | `--gaps [ISS-ID]` | Issue root cause analysis mode. If ISS-ID provided, analyze single issue. If omitted, analyze all open/registered issues from issues.jsonl | — |
58
+
59
+ **Scope routing:**
60
+ | Input | Mode | Scope |
61
+ |-------|------|-------|
62
+ | Pure digits (e.g. `1`, `42`) | micro | Phase-level deep analysis |
63
+ | Non-numeric text (e.g. `auth-refactor`) | macro | Topic impact surface |
64
+ | No positional arg + roadmap | micro | Milestone-wide |
65
+ | No positional arg + no roadmap | macro | Fallback |
66
+ | `--gaps [ISS-ID]` | gaps | Issue root cause analysis |
67
+
68
+ Output directory format, artifact registration schema, and output artifact listing are defined in workflow analyze.md (Output Structure section).
69
+
70
+ ### Pre-load
71
+
72
+ 1. **Codebase docs**: IF `.workflow/codebase/doc-index.json` exists → Read ARCHITECTURE.md for module boundaries
73
+ 2. **Specs**: `maestro spec load --category arch` — load architecture constraints
74
+ 3. **Wiki search**: `maestro wiki search "{topic keywords}" --json` → top 5-10 entries as prior knowledge
75
+ 4. All optional — proceed without if unavailable (log warning)
55
76
 
56
77
  ### Role Knowledge
57
78
  `maestro wiki list --category debug` → select relevant → `maestro wiki load`
58
79
  </context>
59
80
 
60
81
  <interview_protocol>
61
- Interview the user relentlessly until shared understanding is reached. Active only in interactive mode; skip when `-y/--yes`, `-c/--continue`, or input is already specific (explicit phase number or unambiguous topic).
62
-
63
- - One decision per turn via AskUserQuestion with 2–4 options + a (Recommended) default. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
64
- - Search-first when uncertain: before asking, resolve via `state.json`, `roadmap.md`, `issues.jsonl`, `maestro spec load`, `maestro wiki search`, Grep, Read, or — for open-ended multi-file scans — spawn `Agent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user search first, then ask only what truly needs human judgment.
65
- - Writeback cadence: each settled decision is immediately appended/updated in `discussion.md` (top table) and mirrored into `context.md` "Interview Decisions". Do NOT batch writeback to the end — partial decisions must already be on disk before the next question.
66
- - Walk the decision dependency tree strictly: scope → depth → dimensions → Go/No-Go threshold. Do not open the next branch until the current one is settled.
67
- - Scope guard: only ask about decisions owned by `analyze`. Do not prejudge plan/execute concerns.
68
-
69
- Decision points: scope (phase / topic / milestone-wide / adhoc / --gaps) depth (quick / standard / deep) → dimensions (which of the 6 to keep) → Go/No-Go threshold.
70
-
71
- Exit: when all decision points are settled (or user explicitly signals to proceed), finalize session metadata. The decision table (populated incrementally during interview) uses this schema:
72
- `| # | Decision | Choice | Source (user / code / default) |`
82
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
83
+
84
+ **Interaction mode**: convergent menu-driven
85
+ **Decision tree** (strict order): scope (phase / topic / milestone-wide / adhoc / --gaps) depth (quick / standard / deep) dimensions (which of the 6 to keep) Go/No-Go threshold
86
+ **Scope guard**: only analyze decisions; do not prejudge plan/execute concerns
87
+ **Writeback target**: discussion.md (top table) + context.md "Interview Decisions"
88
+ **Additional search sources**: issues.jsonl (--gaps mode), roadmap.md
89
+ **Additional skip conditions**: input is already specific (explicit phase number or unambiguous topic)
90
+ **Exit condition**: all decision points settledfinalize session metadata
73
91
  </interview_protocol>
74
92
 
75
93
  <execution>
@@ -106,23 +124,52 @@ Phase 4: Output context.md for downstream plan --gaps
106
124
  - `large` (3+ independent subsystems or hard serial dependencies) → suggest `/maestro-roadmap --from analyze:ANL-xxx`
107
125
  - `medium` (1-2 subsystems, parallelizable) → suggest `/maestro-plan --from analyze:ANL-xxx`
108
126
  - `small` (single-file or few-file change) → suggest `/maestro-plan --from analyze:ANL-xxx`
127
+ </execution>
109
128
 
110
- **Next-step routing on completion:**
129
+ <completion>
130
+ ### Standalone report
111
131
 
112
- Phase/Milestone scope (micro mode):
113
- - Go recommendation, UI work needed → `/maestro-impeccable build {target}`
114
- - Go recommendation, ready to plan → `/maestro-plan` or `/maestro-plan {phase}`
115
- - No-Go recommendation → revisit requirements or `/maestro-brainstorm {topic}`
132
+ ```
133
+ === ANALYSIS READY ===
134
+ Artifact: ANL-{id}
135
+ Scope: {micro|macro|adhoc|gaps}
136
+ Go/No-Go: {GO|NO-GO|CONDITIONAL}
137
+ Confidence: {high|medium|low}
138
+ Outputs: analysis.md, context.md, conclusions.json, discussion.md
139
+ Session dir: {output_dir}
140
+ ===
141
+ ```
116
142
 
117
- Macro/Adhoc/Standalone scope:
118
- - scope_verdict = large → `/maestro-roadmap --from analyze:ANL-xxx`
119
- - scope_verdict = medium/small → `/maestro-plan --from analyze:ANL-xxx`
120
- - Need more exploration → `/maestro-analyze {topic} -c`
143
+ ### Ralph-invoked completion
121
144
 
122
- Gaps scope:
123
- - Issues analyzed → `/maestro-plan --gaps` (plan fix tasks linked to issues)
124
- - Need more context `/maestro-analyze --gaps {ISS-ID}` (re-analyze specific issue)
125
- </execution>
145
+ End the step by calling the CLI (no text block output):
146
+ ```
147
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
148
+ ```
149
+
150
+ Status verdicts:
151
+ - **DONE** — Normal completion
152
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
153
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
154
+ - **BLOCKED** — External hard blocker; pass `--reason`
155
+
156
+ ### Next-step routing
157
+
158
+ | Condition | Suggestion |
159
+ |-----------|-----------|
160
+ | Phase/Milestone scope, Go, UI work needed | `/maestro-impeccable build {target}` |
161
+ | Phase/Milestone scope, Go, ready to plan | `/maestro-plan` or `/maestro-plan {phase}` |
162
+ | Phase/Milestone scope, No-Go | Revisit requirements or `/maestro-brainstorm {topic}` |
163
+ | Macro/Adhoc, scope_verdict = large | `/maestro-roadmap --from analyze:ANL-xxx` |
164
+ | Macro/Adhoc, scope_verdict = medium/small | `/maestro-plan --from analyze:ANL-xxx` |
165
+ | Need more exploration | `/maestro-analyze {topic} -c` |
166
+ | Gaps scope, issues analyzed | `/maestro-plan --gaps` |
167
+ | Gaps scope, need more context | `/maestro-analyze --gaps {ISS-ID}` |
168
+
169
+ ### Session seal
170
+
171
+ @~/.maestro/workflows/finish-work.md — SESSION_DIR=OUTPUT_DIR, SESSION_TYPE=analyze, SESSION_ID={artifact_id}, LINKED_MILESTONE={target_milestone or null}
172
+ </completion>
126
173
 
127
174
  <error_codes>
128
175
  | Code | Severity | Condition | Recovery |
@@ -166,6 +213,3 @@ Both modes (full + quick):
166
213
  - [ ] Session sealed via finish-work (archive.json written, optional spec/knowhow extraction)
167
214
  </success_criteria>
168
215
 
169
- <on_complete>
170
- @~/.maestro/workflows/finish-work.md — SESSION_DIR=OUTPUT_DIR, SESSION_TYPE=analyze, SESSION_ID={artifact_id}, LINKED_MILESTONE={target_milestone or null}
171
- </on_complete>
@@ -20,6 +20,8 @@ Parallel to `brainstorm` as an upstream origin command:
20
20
  - **blueprint** = convergent documentation (heavyweight, 6-phase formal spec chain)
21
21
 
22
22
  Output: `.workflow/blueprint/BLP-{slug}-{date}/` containing Product Brief, PRD, Architecture, and Epics.
23
+
24
+ Pipeline position: downstream of maestro-brainstorm (optional). Upstream of maestro-analyze, maestro-roadmap, and maestro-plan.
23
25
  </purpose>
24
26
 
25
27
  <required_reading>
@@ -34,10 +36,13 @@ Output: `.workflow/blueprint/BLP-{slug}-{date}/` containing Product Brief, PRD,
34
36
  $ARGUMENTS -- idea text, @file reference, or upstream context source.
35
37
 
36
38
  **Flags:**
37
- - `-y` / `--yes`: Auto mode — skip interactive questions, use recommended defaults
38
- - `-c` / `--continue`: Resume from last checkpoint (reads blueprint-config.json)
39
- - `--from <source>`: Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json
40
- - `--from-brainstorm SESSION-ID`: (backward compat alias for `--from brainstorm:ID`)
39
+
40
+ | Flag | Effect | Default |
41
+ |------|--------|---------|
42
+ | `-y` / `--yes` | Auto mode skip interactive questions, use recommended defaults | false |
43
+ | `-c` / `--continue` | Resume from last checkpoint (reads blueprint-config.json) | false |
44
+ | `--from <source>` | Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json | — |
45
+ | `--from-brainstorm SESSION-ID` | Backward compat alias for `--from brainstorm:ID` | — |
41
46
 
42
47
  **Input types:**
43
48
  - Direct text: `"Build a real-time collaboration platform with WebSocket"`
@@ -56,23 +61,22 @@ maestro-analyze → maestro-roadmap → maestro-plan
56
61
 
57
62
  **Output boundary**: ALL file writes MUST target `.workflow/blueprint/BLP-{slug}-{date}/` or `.workflow/state.json` only. NEVER modify source code or files outside these paths.
58
63
 
59
- ### Pre-load specs
60
- 1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for architecture decisions (Phase 4).
61
- 2. Optionalproceed without if unavailable.
64
+ ### Pre-load
65
+
66
+ 1. **Specs**: `maestro spec load --category arch` load architecture constraints for Phase 4 decisions
67
+ 2. **Wiki search**: `maestro wiki search "{topic keywords}" --json` → prior knowledge context
68
+ 3. All optional — proceed without if unavailable
62
69
  </context>
63
70
 
64
71
  <interview_protocol>
65
- Interview the user relentlessly about every aspect of the spec until shared understanding is reached. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one; if a question can be answered by exploring the codebase, explore the codebase instead. Active only in interactive mode; skip when `-y/--yes`, `-c/--continue`, or input is already specific (clear idea + scope).
66
-
67
- - Ask one question per turn via AskUserQuestion and wait for the user's feedback before continuing; every question must carry a recommended answer marked `(Recommended)`, 2–4 options total. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
68
- - Search-first when uncertain: before asking, resolve via `state.json`, existing artifacts, `maestro spec load`, direct codebase exploration (Glob/Grep/Read), or for open-ended multi-file scans — spawn `Agent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user search first, then ask only what truly needs human judgment.
69
- - Writeback cadence: each settled decision is immediately persisted into `blueprint-config.json` before the next question. Do NOT batch writeback to the end — partial decisions must already be on disk.
70
- - Walk the decision dependency tree depth-first: scope → spec type → focus areas → requirement priorities. Do not open the next branch until the current one is settled.
71
- - Scope guard: only decide the shape of the specification. Do not pre-resolve roadmap phases or plan tasks — those belong to downstream commands.
72
-
73
- Decision points: scope (full product / feature set / single feature) → spec type (service / api / library / platform) → focus areas → whether to run codebase exploration.
74
-
75
- Exit: on consensus or explicit user signal to proceed, finalize blueprint-config.json (decisions already written incrementally) and proceed to Phase 1.
72
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
73
+
74
+ **Interaction mode**: convergent menu-driven, depth-first
75
+ **Decision tree** (strict depth-first): scope (full product / feature set / single feature) spec type (service / api / library / platform) focus areas whether to run codebase exploration requirement priorities
76
+ **Scope guard**: only specification shape; do not pre-resolve roadmap phases or plan tasks
77
+ **Writeback target**: blueprint-config.json (each decision persisted before next question)
78
+ **Additional skip conditions**: none beyond standard (-y, -c)
79
+ **Exit condition**: all decision points settled → finalize blueprint-config.json, proceed to Phase 1
76
80
  </interview_protocol>
77
81
 
78
82
  <execution>
@@ -86,15 +90,44 @@ P0: Spec Study → P1: Discovery → P1.5: Req Expansion → P2: Product Brief
86
90
 
87
91
  P6 gate: Pass (>=80%) → Handoff | Review (60-79%) → Handoff w/caveats | Fail (<60%) → P6.5 Auto-Fix (max 2 iter) → re-check
88
92
 
89
- ### Next-step routing on completion
93
+ </execution>
94
+
95
+ <completion>
96
+ ### Standalone report
97
+
98
+ ```
99
+ === BLUEPRINT READY ===
100
+ Session: BLP-{slug}-{date}
101
+ Phases completed: P0–P6
102
+ Readiness score: {score}%
103
+ Gate verdict: {Pass|Review|Fail}
104
+ Output: .workflow/blueprint/BLP-{slug}-{date}/
105
+ Key artifacts: product-brief.md, requirements/, architecture/, epics/, readiness-report.md
106
+ ===
107
+ ```
108
+
109
+ ### Ralph-invoked completion
110
+
111
+ End the step by calling the CLI (no text block output):
112
+ ```
113
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
114
+ ```
115
+
116
+ Status verdicts:
117
+ - **DONE** — Normal completion
118
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
119
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
120
+ - **BLOCKED** — External hard blocker; pass `--reason`
121
+
122
+ ### Next-step routing
90
123
 
91
124
  | Condition | Suggestion |
92
125
  |-----------|-----------|
93
- | Need codebase analysis | /maestro-analyze {topic} --from blueprint:BLP-xxx |
94
- | Ready for roadmap | /maestro-roadmap --from blueprint:BLP-xxx |
95
- | Small scope, direct plan | /maestro-plan --from blueprint:BLP-xxx |
96
- | Need project setup | /maestro-init |
97
- </execution>
126
+ | Need codebase analysis | `/maestro-analyze {topic} --from blueprint:BLP-xxx` |
127
+ | Ready for roadmap | `/maestro-roadmap --from blueprint:BLP-xxx` |
128
+ | Small scope, direct plan | `/maestro-plan --from blueprint:BLP-xxx` |
129
+ | Need project setup | `/maestro-init` |
130
+ </completion>
98
131
 
99
132
  <error_codes>
100
133
  | Code | Severity | Condition | Recovery |
@@ -13,6 +13,8 @@ allowed-tools:
13
13
  ---
14
14
  <purpose>
15
15
  Unified brainstorming combining interactive framework generation, multi-role parallel analysis, cross-role review, and resolution writeback. Two modes: Auto (full pipeline: guidance-specification → parallel {role}/ multi-file analysis → cross-role-reviewer compares Decision Digests for conflicts/gaps/synergies → user-confirmed resolutions patched into role files + logged in guidance §12) and Single Role (individual role analysis for an existing session). Outputs structured artifacts in `.workflow/scratch/{YYYYMMDD}-brainstorm-{slug}/` ready for downstream planning (roadmap / analyze / blueprint consume `guidance-specification.md`).
16
+
17
+ Pipeline position: downstream of maestro-grill (optional stress-test). Upstream of maestro-roadmap, maestro-analyze, and maestro-blueprint (all consume brainstorm output).
16
18
  </purpose>
17
19
 
18
20
  <required_reading>
@@ -38,13 +40,16 @@ $ARGUMENTS -- topic text for auto mode, or role name for single role mode.
38
40
  **Valid roles**: data-architect, product-manager, product-owner, scrum-master, subject-matter-expert, system-architect, test-strategist, ui-designer, ux-expert
39
41
 
40
42
  **Flags**:
41
- - `--yes` / `-y`: Auto mode, skip interactive questions, use defaults
42
- - `--count N`: Number of roles to select (default 3, max 9)
43
- - `--session ID`: Use existing session
44
- - `--update`: Update existing analysis (single role)
45
- - `--skip-questions`: Skip context gathering questions
46
- - `--include-questions`: Force context gathering even if analysis exists
47
- - `--style-skill PKG`: Style package for ui-designer role
43
+
44
+ | Flag | Effect | Default |
45
+ |------|--------|---------|
46
+ | `--yes` / `-y` | Auto mode — skip interactive questions, use defaults | false |
47
+ | `--count N` | Number of roles to select (max 9) | 3 |
48
+ | `--session ID` | Use existing session | — |
49
+ | `--update` | Update existing analysis (single role) | false |
50
+ | `--skip-questions` | Skip context gathering questions | false |
51
+ | `--include-questions` | Force context gathering even if analysis exists | false |
52
+ | `--style-skill PKG` | Style package for ui-designer role | — |
48
53
 
49
54
  ### Pre-load specs
50
55
  1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for multi-role analysis — ensures roles respect documented decisions.
@@ -60,39 +65,69 @@ $ARGUMENTS -- topic text for auto mode, or role name for single role mode.
60
65
  </context>
61
66
 
62
67
  <interview_protocol>
63
- Interview the user relentlessly until shared understanding is reached. Active only in interactive mode; skip when `--yes/-y`, `--skip-questions`, `--session` (existing session), or input is already specific.
64
-
65
- - One decision per turn via AskUserQuestion with 2–4 options + a (Recommended) default. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
66
- - Search-first when uncertain: before asking, resolve via `state.json`, the session directory, `maestro spec load`, `maestro wiki search`, Glob/Grep/Read, or — for open-ended multi-file scans — spawn `Agent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user search first, then ask only what truly needs human judgment.
67
- - Writeback cadence: each time a decision settles, immediately append/update its row in `guidance-specification.md` §11 (create the section if absent). Do NOT batch writeback to the end — partial decisions must already be on disk before the next question.
68
- - Branch jumps allowed: the user may switch freely between mode / role / upstream / sub-pipeline branches; sequence is not enforced, but every decision point must end with a definite answer.
69
- - Scope guard: only ask about decisions owned by `brainstorm`. Do not pre-resolve roadmap/plan choices.
70
-
71
- Decision points: mode (auto / single-role / review-only) / role selection and `--count` / `--from` upstream source (grill:ID, blueprint:ID, @file, path) / whether to enable design-research and the DESIGN.md sub-pipeline.
72
-
73
- Exit: on consensus or explicit user signal to proceed, finalize session metadata. The §11 table (already populated incrementally) uses this schema:
74
- `| # | Decision | Choice | Source (user / code / default) |`
68
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
69
+
70
+ **Interaction mode**: convergent menu-driven
71
+ **Decision tree** (flexible order user may jump between branches): mode (auto / single-role / review-only) role selection and --count --from upstream source (grill:ID, blueprint:ID, @file, path) whether to enable design-research and DESIGN.md sub-pipeline
72
+ **Scope guard**: only brainstorm decisions; do not pre-resolve roadmap/plan choices
73
+ **Writeback target**: guidance-specification.md §11 (create section if absent)
74
+ **Additional skip conditions**: --skip-questions, --session (existing session)
75
+ **Exit condition**: on consensus or explicit user signal → finalize session metadata
75
76
  </interview_protocol>
76
77
 
77
78
  <execution>
78
79
  Follow '~/.maestro/workflows/brainstorm.md' completely.
79
-
80
- **Next-step routing on completion:**
81
-
82
- Auto mode:
83
- - Project not initialized → Skill({ skill: "maestro-init" })
84
- - Project initialized, need formal spec package → Skill({ skill: "maestro-blueprint", args: "--from brainstorm:{artifact_id}" })
85
- - Project initialized, quick roadmap → Skill({ skill: "maestro-roadmap", args: "--from brainstorm:{artifact_id}" })
86
- - Need deeper analysis first → Skill({ skill: "maestro-analyze", args: "{topic} --from brainstorm:{artifact_id}" })
87
- - Need stress-testing first → Skill({ skill: "maestro-grill", args: "{topic}" })
88
- - `html-prototypes/` produced with 2+ files and user wants to browse → load `~/.maestro/workflows/brainstorm-visualize.md` and launch visualizer server (optional, user-triggered)
89
- - DESIGN.md established during Step 3.5 → suggest: "Run `/maestro-impeccable build <feature-description>` to build with the established design system"
90
-
91
- Single role mode:
92
- - More roles needed → Skill({ skill: "maestro-brainstorm", args: "{next_role} --session {session_id}" })
93
- - All roles done, run synthesis → Skill({ skill: "maestro-brainstorm", args: "{topic} --session {session_id}" })
94
80
  </execution>
95
81
 
82
+ <completion>
83
+ ### Standalone report
84
+
85
+ ```
86
+ === BRAINSTORM READY ===
87
+ Session: {session_id}
88
+ Output: {output_dir}
89
+ Mode: {auto|single-role}
90
+ Roles: {selected_roles}
91
+ Findings: {review_findings_count} cross-role issues, {resolutions_applied} resolutions applied
92
+ Status: COMPLETE
93
+ ========================
94
+ ```
95
+
96
+ ### Ralph-invoked completion
97
+
98
+ End the step by calling the CLI (no text block output):
99
+ ```
100
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
101
+ ```
102
+
103
+ Status verdicts:
104
+ - **DONE** — Normal completion
105
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
106
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
107
+ - **BLOCKED** — External hard blocker; pass `--reason`
108
+
109
+ ### Next-step routing
110
+
111
+ **Auto mode:**
112
+
113
+ | Condition | Suggestion |
114
+ |-----------|-----------|
115
+ | Project not initialized | `/maestro-init` |
116
+ | Need formal spec package | `/maestro-blueprint --from brainstorm:{artifact_id}` |
117
+ | Quick roadmap needed | `/maestro-roadmap --from brainstorm:{artifact_id}` |
118
+ | Need deeper analysis first | `/maestro-analyze {topic} --from brainstorm:{artifact_id}` |
119
+ | Need stress-testing first | `/maestro-grill {topic}` |
120
+ | `html-prototypes/` produced with 2+ files and user wants to browse | Load `~/.maestro/workflows/brainstorm-visualize.md` and launch visualizer server |
121
+ | DESIGN.md established during Step 3.5 | `/maestro-impeccable build <feature-description>` |
122
+
123
+ **Single role mode:**
124
+
125
+ | Condition | Suggestion |
126
+ |-----------|-----------|
127
+ | More roles needed | `/maestro-brainstorm {next_role} --session {session_id}` |
128
+ | All roles done, run synthesis | `/maestro-brainstorm {topic} --session {session_id}` |
129
+ </completion>
130
+
96
131
  <error_codes>
97
132
  | Code | Severity | Condition | Recovery |
98
133
  |------|----------|-----------|----------|
@@ -16,6 +16,8 @@ allowed-tools:
16
16
  Execute all tasks in a plan using wave-based parallel execution with dependency-aware ordering. Each plan is executed independently (plans串行, plan内wave并行). Task summaries are written to the plan's scratch directory under `.summaries/`. Registers EXC artifact in state.json.
17
17
 
18
18
  Invoked after /maestro-plan produces a confirmed plan. When called without args on a milestone, finds all pending plans and executes them sequentially.
19
+
20
+ Pipeline position: upstream from maestro-plan (consumes confirmed plan), downstream to maestro-verify.
19
21
  </purpose>
20
22
 
21
23
  <required_reading>
@@ -30,7 +32,26 @@ Invoked after /maestro-plan produces a confirmed plan. When called without args
30
32
  <context>
31
33
  $ARGUMENTS — phase number, or no args for milestone-wide execution, with optional flags.
32
34
 
33
- Scope routing, flags, resolution logic, output directory format, artifact registration schema, and incremental knowhow extraction are defined in workflow `execute.md`.
35
+ ### Flags
36
+
37
+ | Flag | Effect | Default |
38
+ |------|--------|---------|
39
+ | `--auto-commit` | Auto-commit after each completed task | false |
40
+ | `--method agent\|cli\|auto` | Execution method: Agent tool, CLI delegate, or auto-select | `auto` |
41
+ | `--executor <tool>` | Explicit executor tool for CLI delegate mode | First enabled in config |
42
+ | `--dir <path>` | Execute a specific plan directory instead of auto-discovery | — |
43
+ | `-y` / `--yes` | Auto mode — skip interactive questions | false |
44
+
45
+ ### Scope routing
46
+
47
+ | Input | Scope | Resolution |
48
+ |-------|-------|------------|
49
+ | numeric arg | phase | Resolve plan from roadmap phase |
50
+ | `--dir <path>` | explicit | Use specified plan directory |
51
+ | no args + milestone | milestone | Find all pending plans, execute sequentially |
52
+ | no args + no milestone | error E001 | No plan found |
53
+
54
+ Full resolution logic, output directory format, artifact registration schema, and incremental knowhow extraction are defined in workflow `execute.md`.
34
55
 
35
56
  ### Pre-load context (before task execution)
36
57
 
@@ -81,7 +102,10 @@ For each completed/failed TASK with issue_id:
81
102
  Write updated issue back to issues.jsonl
82
103
  ```
83
104
 
84
- **Report format on completion:**
105
+ </execution>
106
+
107
+ <completion>
108
+ ### Standalone report
85
109
 
86
110
  ```
87
111
  === EXECUTION COMPLETE ===
@@ -91,24 +115,30 @@ Failed: {failed_count} tasks
91
115
 
92
116
  Summaries: {plan_dir}/.summaries/
93
117
  Tasks: {plan_dir}/.task/
94
-
95
- Next steps:
96
- /maestro-verify -- Verify execution results
97
- /maestro-verify --dir {dir} -- Verify specific plan
98
- /manage-status -- View project dashboard
99
118
  ```
100
119
 
101
- **Completion status:**
120
+ ### Ralph-invoked completion
121
+
122
+ End the step by calling the CLI (no text block output):
102
123
  ```
103
- --- COMPLETION STATUS ---
104
- STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
105
- CONCERNS: {failed_count} tasks failed (if any)
106
- NEXT: /maestro-verify
107
- --- END STATUS ---
124
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
108
125
  ```
109
126
 
110
- If failed tasks exist, suggest /quality-debug for investigation.
111
- </execution>
127
+ Status verdicts:
128
+ - **DONE** — Normal completion
129
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
130
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
131
+ - **BLOCKED** — External hard blocker; pass `--reason`
132
+
133
+ ### Next-step routing
134
+
135
+ | Condition | Suggestion |
136
+ |-----------|-----------|
137
+ | All tasks completed successfully | `/maestro-verify` |
138
+ | Specific plan needs verification | `/maestro-verify --dir {dir}` |
139
+ | Failed tasks exist | `/quality-debug` |
140
+ | View project dashboard | `/manage-status` |
141
+ </completion>
112
142
 
113
143
  <error_codes>
114
144
  | Code | Severity | Condition | Recovery |
@@ -35,57 +35,82 @@ $ARGUMENTS -- topic/plan text for interactive mode, or --from source for upstrea
35
35
  - **Resume mode** (`-c` or `--session ID`): Continue from a previous grill session
36
36
 
37
37
  **Flags:**
38
- - `-y` / `--yes`: Auto mode — CLI exploration replaces human answers
39
- - `-c` / `--continue`: Resume from last grill session
40
- - `--session ID`: Resume specific session
41
- - `--depth shallow|standard|deep`: Branch count 3/5/8 (default: standard)
42
- - `--from <source>`: Load upstream material (`blueprint:ID`, `@file`, or path)
38
+
39
+ | Flag | Effect | Default |
40
+ |------|--------|---------|
41
+ | `-y` / `--yes` | Auto mode CLI exploration replaces human answers | `false` |
42
+ | `-c` / `--continue` | Resume from last grill session | — |
43
+ | `--session ID` | Resume specific session | — |
44
+ | `--depth shallow\|standard\|deep` | Branch count 3/5/8 | `standard` |
45
+ | `--from <source>` | Load upstream material (`blueprint:ID`, `@file`, or path) | — |
43
46
 
44
47
  **Output directory**: `.workflow/scratch/{YYYYMMDD}-grill-{slug}/`
45
48
  **Produced files**: `grill-report.md`, `terminology.md`, `context-package.json`
46
49
 
47
- ### Role Knowledge
48
- `maestro wiki search "{topic keywords}"` → load relevant entries before grilling.
49
- `maestro spec load --category arch` load architecture constraints.
50
+ ### Pre-load
51
+
52
+ 1. **Specs**: `maestro spec load --category arch` load architecture constraints
53
+ 2. **Wiki search**: `maestro wiki search "{topic keywords}"` → load relevant entries before grilling
54
+ 3. All optional — proceed without if unavailable
50
55
  </context>
51
56
 
52
57
  <interview_protocol>
53
- Grill the user relentlessly until every branch of the decision tree is walked. This is NOT a menu-driven interview — it is adversarial Socratic questioning. Active only in interactive mode; skip when `-y/--yes` or `-c/--continue`.
54
-
55
- Core protocol:
56
- - **One question per turn**. Each question probes ONE specific aspect. Never ask compound questions.
57
- - **Code-grounded**: Before asking, search the codebase for evidence. Use findings to sharpen the question or challenge the user's answer. Never ask what code can verify — search first, then confront.
58
- - **Escalating depth**: Start with scope boundaries, progress to data model, edge cases, failure modes. Each branch goes basic → specific → adversarial.
59
- - **Immediate writeback**: After each answered question, immediately append the Q&A + decision to `grill-report.md`. Do NOT batch — partial progress must be on disk before the next question.
60
- - **Challenge contradictions**: If an answer conflicts with code evidence or a prior answer, immediately surface the contradiction and demand resolution.
61
- - **Terminology enforcement**: When the user uses a term that conflicts with codebase naming, challenge it immediately. Propose the code-consistent alternative. Update `terminology.md` as terms crystallize.
62
-
63
- Question framing rules:
64
- - Reference specific code findings: "The codebase uses `{symbol}` at `{file:line}` — your proposal calls it `{term}`. Which wins?"
65
- - Use concrete scenarios: "What happens when a user does {action} while {condition} is true?"
66
- - Probe boundaries: "You said {X} is in scope — does that include {edge_case}, or is that separate?"
67
- - Challenge scale: "This touches `{table}` — at 10x current data volume, which query breaks first?"
68
-
69
- Branch walking order: Scope & Boundaries → Data Model & State → Edge Cases & Failure Modes → Integration & Dependencies → Scale & Performance → Security & Access Control → Observability & Operations → Migration & Rollback. Number of branches determined by `--depth`.
70
-
71
- Exit: When all depth-selected branches are fully walked (every question answered or explicitly deferred), finalize the report and generate context-package.json.
58
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
59
+
60
+ **Interaction mode override**: adversarial Socratic — NOT menu-driven
61
+ **Question style**:
62
+ - Reference specific code: "The codebase uses `{symbol}` at `{file:line}` your proposal calls it `{term}`. Which wins?"
63
+ - Concrete scenarios: "What happens when {action} while {condition}?"
64
+ - Challenge contradictions: immediately surface conflicts with code evidence or prior answers
65
+ - Escalating depth: per branch basic specific adversarial
66
+ **Branch traversal** (depth-gated, --depth controls count): Scope & Boundaries Data Model & State Edge Cases & Failure Modes Integration & Dependencies Scale & Performance → Security & Access Control → Observability & Operations → Migration & Rollback
67
+ **Writeback target**: grill-report.md (Q&A append per question) + terminology.md (term crystallization)
68
+ **Additional skip conditions**: none beyond standard (-y, -c)
69
+ **Exit condition**: all depth-selected branches fully walked finalize report + context-package.json
72
70
  </interview_protocol>
73
71
 
74
72
  <execution>
75
73
  Follow '~/.maestro/workflows/grill.md' completely.
76
-
77
- **Next-step routing on completion:**
78
-
79
- Standard routing:
80
- - Need multi-role elaboration → Skill({ skill: "maestro-brainstorm", args: "{topic} --from grill:{artifact_id}" })
81
- - Need deep technical analysis → Skill({ skill: "maestro-analyze", args: "{topic} --from grill:{artifact_id}" })
82
- - Scope is clear, ready for roadmap → Skill({ skill: "maestro-roadmap", args: "--from grill:{artifact_id}" })
83
- - Need formal spec package → Skill({ skill: "maestro-blueprint", args: "--from grill:{artifact_id}" })
84
-
85
- Resume routing:
86
- - More branches to walk → Skill({ skill: "maestro-grill", args: "{topic} -c" })
87
74
  </execution>
88
75
 
76
+ <completion>
77
+ ### Standalone report
78
+
79
+ ```
80
+ === GRILL READY ===
81
+ Topic: {topic}
82
+ Branches walked: {count}/{depth_target}
83
+ Decisions locked: {locked_count}
84
+ Open risks: {risk_count}
85
+ Output: {output_dir}
86
+ Artifact: GRL-{id}
87
+ === END GRILL ===
88
+ ```
89
+
90
+ ### Ralph-invoked completion
91
+
92
+ End the step by calling the CLI (no text block output):
93
+ ```
94
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
95
+ ```
96
+
97
+ Status verdicts:
98
+ - **DONE** — Normal completion
99
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
100
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
101
+ - **BLOCKED** — External hard blocker; pass `--reason`
102
+
103
+ ### Next-step routing
104
+
105
+ | Condition | Suggestion |
106
+ |-----------|-----------|
107
+ | Need multi-role elaboration | `Skill({ skill: "maestro-brainstorm", args: "{topic} --from grill:{artifact_id}" })` |
108
+ | Need deep technical analysis | `Skill({ skill: "maestro-analyze", args: "{topic} --from grill:{artifact_id}" })` |
109
+ | Scope is clear, ready for roadmap | `Skill({ skill: "maestro-roadmap", args: "--from grill:{artifact_id}" })` |
110
+ | Need formal spec package | `Skill({ skill: "maestro-blueprint", args: "--from grill:{artifact_id}" })` |
111
+ | More branches to walk | `Skill({ skill: "maestro-grill", args: "{topic} -c" })` |
112
+ </completion>
113
+
89
114
  <error_codes>
90
115
  | Code | Severity | Condition | Recovery |
91
116
  |------|----------|-----------|----------|
@@ -13,28 +13,56 @@ allowed-tools:
13
13
  ---
14
14
  <purpose>
15
15
  Initialize a new project through auto state detection and unified flow. Invoked when starting a fresh project or onboarding an existing codebase into workflow management. Produces the `.workflow/` directory structure with project.md, state.json, config.json, and specs. Does NOT create roadmap — use maestro-roadmap (light mode, default) or maestro-roadmap --mode full (spec package) as the next step.
16
+
17
+ Pipeline position: entry point (no upstream). Downstream: `maestro-roadmap` or `maestro-brainstorm`.
16
18
  </purpose>
17
19
 
18
20
  <required_reading>
19
21
  @~/.maestro/workflows/init.md
20
- @~/.maestro/templates/project.md
21
- @~/.maestro/templates/state.json
22
- @~/.maestro/templates/config.json
23
22
  </required_reading>
24
23
 
24
+ <deferred_reading>
25
+ - [project.md](~/.maestro/templates/project.md) — read when generating project description
26
+ - [state.json](~/.maestro/templates/state.json) — read when creating initial state
27
+ - [config.json](~/.maestro/templates/config.json) — read when creating workflow configuration
28
+ </deferred_reading>
29
+
25
30
  <context>
31
+ $ARGUMENTS — none for interactive mode, or `-y` with `@file` reference for auto mode.
32
+
26
33
  **Flags:**
27
- - `-y` -- Automatic mode. After config questions, runs research without further interaction. Expects idea document via @ reference.
28
- - `--from <source>` -- Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json to pre-fill project vision, goals, constraints, and terminology. Skips interactive questioning. Alias: `--from-brainstorm`
34
+
35
+ | Flag | Effect | Default |
36
+ |------|--------|---------|
37
+ | `-y` / `--yes` | Automatic mode. After config questions, runs research without further interaction. Expects idea document via @ reference. | `false` |
38
+ | `--from <source>` | Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json to pre-fill project vision, goals, constraints, and terminology. Skips interactive questioning. Alias: `--from-brainstorm` | — |
29
39
 
30
40
  **Load project state if exists:**
31
41
  Check for `.workflow/state.json` -- loads context if project already initialized.
32
42
  </context>
33
43
 
44
+ <interview_protocol>
45
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
46
+
47
+ **Interaction mode**: convergent menu-driven
48
+ **Decision tree** (strict order): project type (greenfield / existing codebase onboarding) → tech stack detection and confirmation → directory structure preferences → initial configuration (specs categories, wiki bootstrap)
49
+ **Scope guard**: only init decisions; do not prejudge roadmap structure or plan scope
50
+ **Writeback target**: project.md (project description) + config.json (settings) + state.json (initial state)
51
+ **Additional skip conditions**: --from source (upstream context pre-fills decisions)
52
+ **Exit condition**: all configuration questions settled → proceed to workflow execution
53
+ </interview_protocol>
54
+
34
55
  <execution>
56
+ ### Pre-flight
57
+
58
+ 1. Check if `.workflow/` already exists — if so, load state and warn (E002 for greenfield conflicts)
59
+ 2. Validate `--from` source is accessible if provided
60
+
35
61
  Follow '~/.maestro/workflows/init.md' completely.
62
+ </execution>
36
63
 
37
- **Report format on completion:**
64
+ <completion>
65
+ ### Standalone report
38
66
 
39
67
  ```
40
68
  === WORKFLOW INITIALIZED ===
@@ -46,17 +74,31 @@ Created:
46
74
  .workflow/state.json
47
75
  .workflow/config.json
48
76
  .workflow/specs/
77
+ ```
49
78
 
50
- Next steps (choose one path to create roadmap):
51
- /maestro-roadmap <requirement> -- Direct interactive roadmap (light, default)
52
- /maestro-roadmap --mode full <idea> -- Full spec package + roadmap (heavy)
79
+ ### Ralph-invoked completion
53
80
 
54
- Other commands:
55
- /manage-status -- View project dashboard
56
- /maestro-brainstorm <topic> -- Explore ideas first
57
- /maestro-quick <task> -- Quick ad-hoc task
81
+ End the step by calling the CLI (no text block output):
58
82
  ```
59
- </execution>
83
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
84
+ ```
85
+
86
+ Status verdicts:
87
+ - **DONE** — Normal completion
88
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
89
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
90
+ - **BLOCKED** — External hard blocker; pass `--reason`
91
+
92
+ ### Next-step routing
93
+
94
+ | Condition | Suggestion |
95
+ |-----------|-----------|
96
+ | Roadmap needed (default light) | `/maestro-roadmap <requirement>` |
97
+ | Full spec package + roadmap | `/maestro-roadmap --mode full <idea>` |
98
+ | Explore ideas first | `/maestro-brainstorm <topic>` |
99
+ | View project dashboard | `/manage-status` |
100
+ | Quick ad-hoc task | `/maestro-quick <task>` |
101
+ </completion>
60
102
 
61
103
  <error_codes>
62
104
  | Code | Severity | Condition | Recovery |
@@ -68,11 +110,11 @@ Other commands:
68
110
  </error_codes>
69
111
 
70
112
  <success_criteria>
71
- - [ ] Deep questioning completed (threads followed, not rushed) — or extracted from document/brainstorm
72
113
  - [ ] `.workflow/project.md` created with Core Value, Requirements (Validated/Active/Out of Scope), Key Decisions
73
114
  - [ ] `.workflow/state.json` created with artifacts[] array, initialized to idle state
74
115
  - [ ] `.workflow/config.json` created with workflow / execution / git / gates / codebase / guard / collab / specInjection / dashboard segments
75
116
  - [ ] `.workflow/specs/` initialized with convention files
76
- - [ ] Research completed (if enabled) 4 parallel agents spawned
77
- - [ ] User knows next step is `/maestro-roadmap` (light) or `/maestro-roadmap --mode full` (spec package)
117
+ - [ ] All interview decisions written to project.md / config.json before proceeding
118
+ - [ ] Research completed (if enabled) parallel agents spawned with results merged
119
+ - [ ] Next-step routing displayed in completion report
78
120
  </success_criteria>
@@ -120,7 +120,13 @@ For each created TASK-{NNN}.json that has issue_id:
120
120
 
121
121
  This ensures issue → TASK traceability. The `task_refs[]` and `task_plan_dir` fields on the issue allow the dashboard to resolve and display associated TASK details.
122
122
 
123
- **Report format on completion:**
123
+ ### Mode: Revise / Check
124
+
125
+ Follow workflow plan.md § "Revise Mode" and § "Check Mode" respectively. These modes bypass the standard P1-P5 create pipeline.
126
+ </execution>
127
+
128
+ <completion>
129
+ ### Standalone report
124
130
 
125
131
  ```
126
132
  === PLAN READY ===
@@ -131,20 +137,16 @@ Collision: {collision_status}
131
137
 
132
138
  Plan: scratch/{YYYYMMDD}-plan-P{N}-{slug}/plan.json
133
139
  Tasks: scratch/{YYYYMMDD}-plan-P{N}-{slug}/.task/TASK-*.json
134
-
135
- Next steps:
136
- /maestro-execute -- Execute the plan
137
- /maestro-execute --dir {dir} -- Execute specific plan
138
- /maestro-plan {phase} -- Re-plan with modifications
139
140
  ```
140
141
 
141
- **Completion (when invoked from ralph):**
142
- End the step by calling the CLI (no `--- COMPLETION STATUS ---` text block):
142
+ ### Ralph-invoked completion
143
+
144
+ End the step by calling the CLI (no text block output):
143
145
  ```
144
- maestro ralph complete <idx> --status DONE [--evidence scratch/{YYYYMMDD}-plan-P{N}-{slug}/plan.json]
146
+ maestro ralph complete <idx> --status {STATUS} [--evidence scratch/{YYYYMMDD}-plan-P{N}-{slug}/plan.json]
145
147
  ```
146
148
 
147
- STATUS verdicts (CLI-enforced enum):
149
+ Status verdicts:
148
150
  - **DONE** — Plan created/revised and confirmed → next step picks up automatically
149
151
  - **DONE_WITH_CONCERNS** — Plan produced but with explicit caveats; pass `--concerns "..."`
150
152
  - **NEEDS_RETRY** — Plan failed (tooling error, transient issue); ralph will retry
@@ -152,10 +154,14 @@ STATUS verdicts (CLI-enforced enum):
152
154
 
153
155
  > Ambiguous requirements are NOT a completion status — resolve them in-place via `AskUserQuestion` during planning (≤3 rounds), then proceed to DONE. `NEEDS_CONTEXT` has been removed; context shortage is handled by the harness's automatic compaction.
154
156
 
155
- ### Mode: Revise / Check
157
+ ### Next-step routing
156
158
 
157
- Follow workflow plan.md § "Revise Mode" and § "Check Mode" respectively. These modes bypass the standard P1-P5 create pipeline.
158
- </execution>
159
+ | Condition | Suggestion |
160
+ |-----------|-----------|
161
+ | Plan confirmed for execution | `/maestro-execute` |
162
+ | Plan confirmed, specific directory | `/maestro-execute --dir {dir}` |
163
+ | Re-plan with modifications | `/maestro-plan {phase}` |
164
+ </completion>
159
165
 
160
166
  <error_codes>
161
167
  | Code | Severity | Condition | Recovery |
@@ -36,13 +36,16 @@ For formal specification documents (Product Brief, PRD, Architecture, Epics), us
36
36
  $ARGUMENTS -- requirement text, @file reference, or upstream context source.
37
37
 
38
38
  **Flags:**
39
- - `-y` / `--yes`: Auto mode — skip interactive questions, use recommended defaults
40
- - `-c` / `--continue`: Resume from last checkpoint
41
- - `-m progressive|direct|auto`: Decomposition strategy (default: auto)
42
- - `--from <source>`: Load upstream context package (brainstorm:ID, blueprint:BLP-xxx, analyze:ANL-xxx, @file, or path). Consumes context-package.json
43
- - `--from-brainstorm SESSION-ID`: (backward compat alias for `--from brainstorm:ID`)
44
- - `--revise [instructions]`: Revise existing roadmap. If instructions provided, apply directly. If omitted, ask user. Preserves completed phase progress.
45
- - `--review`: Roadmap health assessment (read-only)
39
+
40
+ | Flag | Effect | Default |
41
+ |------|--------|---------|
42
+ | `-y` / `--yes` | Auto mode skip interactive questions, use recommended defaults | false |
43
+ | `-c` / `--continue` | Resume from last checkpoint | false |
44
+ | `-m progressive\|direct\|auto` | Decomposition strategy | auto |
45
+ | `--from <source>` | Load upstream context package (brainstorm:ID, blueprint:BLP-xxx, analyze:ANL-xxx, @file, or path). Consumes context-package.json | — |
46
+ | `--from-brainstorm SESSION-ID` | Backward compat alias for `--from brainstorm:ID` | — |
47
+ | `--revise [instructions]` | Revise existing roadmap. If instructions provided, apply directly. If omitted, ask user. Preserves completed phase progress. | — |
48
+ | `--review` | Roadmap health assessment (read-only) | — |
46
49
 
47
50
  **Input types:**
48
51
  - Direct text: `"Implement user authentication system with OAuth and 2FA"`
@@ -61,24 +64,22 @@ maestro-roadmap → .workflow/roadmap.md (Milestone > Phase hierarchy)
61
64
  maestro-analyze {phase} → maestro-plan → maestro-execute → maestro-verify
62
65
  ```
63
66
 
64
- ### Pre-load specs
65
- 1. **Architecture specs**: Run `maestro spec load --category arch` to load architecture constraints. Use as context for phase decomposition — ensures roadmap respects documented decisions and boundaries.
66
- 2. Optionalproceed without if unavailable.
67
+ ### Pre-load
68
+
69
+ 1. **Specs**: `maestro spec load --category arch` load architecture constraints for phase decomposition
70
+ 2. **Wiki search**: `maestro wiki search "{requirement keywords}" --json` → prior knowledge
71
+ 3. All optional — proceed without if unavailable
67
72
  </context>
68
73
 
69
74
  <interview_protocol>
70
- Interview the user relentlessly until shared understanding is reached. Active only in interactive mode; skip when `-y/--yes`, `--revise`, `--review`, `-c/--continue`, or input is already specific (clear requirement + mode).
71
-
72
- - One decision per turn via AskUserQuestion with 2–4 options + a (Recommended) default. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
73
- - Search-first when uncertain: before asking, resolve via `state.json`, existing `roadmap.md`, `project.md`, `maestro spec load`, `maestro wiki search`, Glob/Grep/Read, or for open-ended multi-file scans — spawn `Agent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user — search first, then ask only what truly needs human judgment.
74
- - Writeback cadence: each settled decision is immediately appended/updated in the `Roadmap Decisions` section at the top of `.workflow/roadmap.md` (create the section if absent). Do NOT batch writeback to the end — partial decisions must already be on disk before the next question.
75
- - Walk the decision dependency tree strictly: mode → requirement scope → decomposition strategy → phase dependencies/order. Do not open the next branch until the current one is settled.
76
- - Scope guard: only decide the shape of the roadmap. Do not pre-resolve intra-phase task breakdown — that belongs to `plan`.
77
-
78
- Decision points: scope (MVP / complete / phased) → strategy (progressive / direct / auto) → milestone boundaries → phase dependencies and order.
79
-
80
- Exit: on consensus or explicit user signal to proceed, finalize the `Roadmap Decisions` section (rows already populated incrementally). Schema:
81
- `| # | Decision | Choice | Source (user / code / default) |`
75
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
76
+
77
+ **Interaction mode**: convergent menu-driven
78
+ **Decision tree** (strict order): mode (create / revise / review) requirement scope (MVP / complete / phased) decomposition strategy (progressive / direct / auto) milestone boundaries phase dependencies and order
79
+ **Scope guard**: only roadmap shape; do not pre-resolve intra-phase task breakdown (belongs to plan)
80
+ **Writeback target**: .workflow/roadmap.md "Roadmap Decisions" section (create if absent)
81
+ **Additional skip conditions**: --revise, --review (skip to respective mode)
82
+ **Exit condition**: on consensus or explicit user signal → finalize Roadmap Decisions section
82
83
  </interview_protocol>
83
84
 
84
85
  <execution>
@@ -91,16 +92,45 @@ Sub-modes:
91
92
  - **Revise** (`--revise`): Follow workflow roadmap.md "Mode: Revise" section
92
93
  - **Review** (`--review`): Follow workflow roadmap.md "Mode: Review" section
93
94
 
94
- ### Next-step routing on completion
95
+ </execution>
96
+
97
+ <completion>
98
+ ### Standalone report
99
+
100
+ ```
101
+ === ROADMAP READY ===
102
+ Milestones: {count}
103
+ Phases: {total_phases}
104
+ Strategy: {progressive|direct|auto}
105
+ Output: .workflow/roadmap.md
106
+ --- COMPLETION STATUS ---
107
+ Status: {DONE|DONE_WITH_CONCERNS}
108
+ Concerns: {if any}
109
+ ```
110
+
111
+ ### Ralph-invoked completion
112
+
113
+ End the step by calling the CLI (no text block output):
114
+ ```
115
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
116
+ ```
117
+
118
+ Status verdicts:
119
+ - **DONE** — Normal completion
120
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
121
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
122
+ - **BLOCKED** — External hard blocker; pass `--reason`
123
+
124
+ ### Next-step routing
95
125
 
96
126
  | Condition | Suggestion |
97
127
  |-----------|-----------|
98
- | Roadmap approved, need analysis | /maestro-analyze 1 |
99
- | Simple project, ready to plan | /maestro-plan 1 |
100
- | Need UI design first | /maestro-impeccable build |
101
- | View project dashboard | /manage-status |
102
- | Need formal spec documents | /maestro-blueprint |
103
- </execution>
128
+ | Roadmap approved, need analysis | `/maestro-analyze 1` |
129
+ | Simple project, ready to plan | `/maestro-plan 1` |
130
+ | Need UI design first | `/maestro-impeccable build` |
131
+ | View project dashboard | `/manage-status` |
132
+ | Need formal spec documents | `/maestro-blueprint` |
133
+ </completion>
104
134
 
105
135
  <error_codes>
106
136
  | Code | Severity | Condition | Recovery |
@@ -37,7 +37,22 @@ Registers VRF artifact in state.json on completion.
37
37
  <context>
38
38
  $ARGUMENTS — phase number or no args for milestone-wide, with optional flags.
39
39
 
40
- Flags (`--skip-tests`, `--skip-antipattern`, `--dir`), scope routing, output paths, and VRF artifact registration schema are defined in workflow `verify.md`.
40
+ ### Flags
41
+
42
+ | Flag | Effect | Default |
43
+ |------|--------|---------|
44
+ | `--skip-tests` | Skip Nyquist test coverage validation (V2), only run Goal-Backward verification | false |
45
+ | `--skip-antipattern` | Skip anti-pattern scan step | false |
46
+ | `--dir <path>` | Verify a single plan directory instead of milestone-wide | — (milestone mode) |
47
+
48
+ **Scope routing:**
49
+ | Input | Scope | Resolution |
50
+ |-------|-------|------------|
51
+ | `--dir scratch/{dir}` | single plan | Verify one plan, write verification.json into plan dir |
52
+ | numeric arg | phase | Verify all execute artifacts for that phase |
53
+ | no args | milestone | Aggregate all execute artifacts for current milestone |
54
+
55
+ Output paths and VRF artifact registration schema are defined in workflow `verify.md`.
41
56
 
42
57
  ### Pre-load context (before verification)
43
58
 
@@ -63,28 +78,48 @@ Follow '~/.maestro/workflows/verify.md' completely.
63
78
 
64
79
  On confirm → `Skill("spec-add", "<category> <content>")`.
65
80
 
66
- **Next-step routing on completion:**
67
- - All checks pass, no gaps → /quality-review
68
- - Gaps found (must-have failures or anti-pattern blockers) → /maestro-plan --gaps
69
- - Low test coverage (Nyquist gaps) → /quality-auto-test
81
+ </execution>
70
82
 
71
- **Gap-fix closure loop:**
72
- Gaps found → maestro-plan --gaps → maestro-execute → maestro-verify (re-run)
83
+ <completion>
84
+ ### Standalone report
73
85
 
74
- **Completion status:**
75
86
  ```
76
- --- COMPLETION STATUS ---
87
+ === VERIFY COMPLETE ===
77
88
  STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
78
89
  CONCERNS: {description if applicable}
79
90
  NEXT: /quality-review
80
- --- END STATUS ---
91
+ === END VERIFY ===
81
92
  ```
82
93
 
83
94
  Status mapping:
84
95
  - **DONE** — All checks pass, no gaps → NEXT: /quality-review
85
96
  - **DONE_WITH_CONCERNS** — Gaps found (must-have failures or anti-pattern blockers) → NEXT: /maestro-execute (after /maestro-plan --gaps)
86
97
  - **NEEDS_RETRY** — Verification could not complete (missing artifacts, corrupt data)
87
- </execution>
98
+
99
+ ### Ralph-invoked completion
100
+
101
+ End the step by calling the CLI (no text block output):
102
+ ```
103
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
104
+ ```
105
+
106
+ Status verdicts:
107
+ - **DONE** — Normal completion
108
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
109
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
110
+ - **BLOCKED** — External hard blocker; pass `--reason`
111
+
112
+ ### Next-step routing
113
+
114
+ | Condition | Suggestion |
115
+ |-----------|-----------|
116
+ | All checks pass, no gaps | `/quality-review` |
117
+ | Gaps found (must-have failures or anti-pattern blockers) | `/maestro-plan --gaps` |
118
+ | Low test coverage (Nyquist gaps) | `/quality-auto-test` |
119
+
120
+ **Gap-fix closure loop:**
121
+ Gaps found → maestro-plan --gaps → maestro-execute → maestro-verify (re-run)
122
+ </completion>
88
123
 
89
124
  <error_codes>
90
125
  | Code | Severity | Condition | Recovery |
@@ -21,6 +21,8 @@ Audit milestone completion using the artifact registry. Checks:
21
21
 
22
22
  Data source: `state.json.artifacts[]` filtered by current milestone.
23
23
  Produces audit report at `.workflow/milestones/{milestone}/audit-report.md`.
24
+
25
+ Pipeline position: downstream of maestro-verify (all phases verified), upstream of maestro-milestone-complete.
24
26
  </purpose>
25
27
 
26
28
  <required_reading>
@@ -38,19 +40,60 @@ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json
38
40
  - Plan scratch dirs — for task status verification
39
41
 
40
42
  **Adhoc milestone support (D-008):** When the target milestone has `type == "adhoc"` (or `type` field is missing, defaulting to `"standard"`), the audit skips roadmap.md parsing and phase coverage checks. It only validates artifact chain completeness (PLN→EXC exists) and runs integration checks.
43
+
44
+ ### Pre-load
45
+
46
+ 1. **Codebase docs**: IF `.workflow/codebase/doc-index.json` exists → Read ARCHITECTURE.md for integration checks
47
+ 2. **Specs**: `maestro spec load --category review` — load review standards for audit
48
+ 3. All optional — proceed without if unavailable
49
+
50
+ ### Role Knowledge
51
+
52
+ 1. Browse: `maestro wiki list --category review`
53
+ 2. Select entries relevant to milestone integration audit
54
+ 3. Load: `maestro wiki load <id1> [id2...]`
41
55
  </context>
42
56
 
43
57
  <execution>
44
58
  Follow '~/.maestro/workflows/milestone-audit.md' completely.
45
59
 
46
60
  Audit checklist steps (phase coverage, ad-hoc completeness, execution completeness, cross-artifact integration) are defined in workflow `milestone-audit.md`.
47
-
48
- **Next-step routing on completion:**
49
- - Verdict PASS → `/maestro-milestone-complete {milestone}`
50
- - Verdict FAIL, integration gaps → `/maestro-plan --gaps`
51
- - Verdict FAIL, incomplete execution → `/maestro-execute`
52
61
  </execution>
53
62
 
63
+ <completion>
64
+ ### Standalone report
65
+
66
+ ```
67
+ === MILESTONE AUDIT READY ===
68
+ Milestone: {milestone}
69
+ Verdict: {PASS|FAIL}
70
+ Phases audited: {N}
71
+ Integration gaps: {N}
72
+ Report: .workflow/milestones/{milestone}/audit-report.md
73
+ ```
74
+
75
+ ### Ralph-invoked completion
76
+
77
+ End the step by calling the CLI (no text block output):
78
+ ```
79
+ maestro ralph complete <idx> --status {STATUS} [--evidence .workflow/milestones/{milestone}/audit-report.md]
80
+ ```
81
+
82
+ Status verdicts:
83
+ - **DONE** — Audit passed, no gaps found
84
+ - **DONE_WITH_CONCERNS** — Audit passed with minor caveats; pass `--concerns`
85
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
86
+ - **BLOCKED** — External hard blocker; pass `--reason`
87
+
88
+ ### Next-step routing
89
+
90
+ | Condition | Suggestion |
91
+ |-----------|-----------|
92
+ | Verdict PASS | `/maestro-milestone-complete {milestone}` |
93
+ | Verdict FAIL, integration gaps | `/maestro-plan --gaps` |
94
+ | Verdict FAIL, incomplete execution | `/maestro-execute` |
95
+ </completion>
96
+
54
97
  <error_codes>
55
98
  | Code | Severity | Condition | Recovery |
56
99
  |------|----------|-----------|----------|
@@ -13,13 +13,23 @@ allowed-tools:
13
13
  ---
14
14
 
15
15
  <purpose>
16
- Mark a milestone as complete after its audit has passed. Archives all scratch artifacts to `milestones/{M}/artifacts/`, moves artifact entries from `state.json.artifacts[]` to `milestone_history`, extracts final knowhow, and advances to the next milestone.
16
+ Mark a milestone as complete after its audit has passed. Performs 6-step archival:
17
+ validation → directory archival → artifact history → knowhow extraction → state advancement → cleanup.
18
+
19
+ Produces `milestones/{M}/artifacts/` archive and `specs/learnings.md` knowhow entries.
20
+ Supports two milestone types: standard (advances to next milestone) and adhoc (self-contained, sets idle).
21
+
22
+ Pipeline position: downstream of `maestro-milestone-audit` (requires PASS verdict). Upstream of `maestro-milestone-release` (cut a release) or next milestone planning (`maestro-analyze` / `maestro-plan`).
17
23
  </purpose>
18
24
 
19
25
  <required_reading>
20
26
  @~/.maestro/workflows/milestone-complete.md
21
27
  </required_reading>
22
28
 
29
+ <deferred_reading>
30
+ - [state.json](~/.maestro/templates/state.json) — read when updating milestone_history and advancing state
31
+ </deferred_reading>
32
+
23
33
  <context>
24
34
  Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
25
35
 
@@ -50,20 +60,52 @@ After knowhow extraction (step 4), scan `learnings.md` for promotion candidates:
50
60
 
51
61
  If user confirms promotion, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })` with promoted content, preserving original date and source traceability.
52
62
 
53
- **Next-step routing on completion:**
54
- - Cut a release → `/maestro-milestone-release`
55
- - Next milestone → `/maestro-analyze` or `/maestro-plan 1` (standard milestones only)
56
- - View state → `/manage-status`
57
-
58
63
  **Adhoc milestone (D-008):** When completing an adhoc milestone, skip roadmap snapshot and do not advance to next milestone. Set `current_milestone = null`, `status = "idle"`. Adhoc milestones are self-contained — no successor in roadmap chain.
59
64
  </execution>
60
65
 
66
+ <completion>
67
+ ### Standalone report
68
+
69
+ ```
70
+ === MILESTONE COMPLETE ===
71
+ Milestone: {milestone_id}
72
+ Status: ARCHIVED
73
+ Artifacts archived: {count}
74
+ Knowhow extracted: {count} entries
75
+ Next milestone: {next_id | "none (adhoc)"}
76
+ ==============================
77
+ ```
78
+
79
+ ### Ralph-invoked completion
80
+
81
+ End the step by calling the CLI (no text block output):
82
+ ```
83
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
84
+ ```
85
+
86
+ Status verdicts:
87
+ - **DONE** — Normal completion
88
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
89
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
90
+ - **BLOCKED** — External hard blocker; pass `--reason`
91
+
92
+ ### Next-step routing
93
+
94
+ | Condition | Suggestion |
95
+ |-----------|-----------|
96
+ | Cut a release | `/maestro-milestone-release` |
97
+ | Next milestone (standard) | `/maestro-analyze` or `/maestro-plan 1` |
98
+ | View state | `/manage-status` |
99
+ </completion>
100
+
61
101
  <error_codes>
62
102
  | Code | Severity | Condition | Recovery |
63
103
  |------|----------|-----------|----------|
64
104
  | E001 | error | Milestone identifier required | Check arguments |
65
105
  | E002 | error | Audit not passed | Run maestro-milestone-audit first |
66
106
  | E003 | error | Incomplete artifacts remain | Complete remaining work first |
107
+ | W001 | warning | Knowhow extraction produced 0 entries | Review milestone work for missed learnings |
108
+ | W002 | warning | Wiki-connect found unlinked knowledge islands | Run `/manage-wiki --fix` manually |
67
109
  </error_codes>
68
110
 
69
111
  <success_criteria>
@@ -15,6 +15,8 @@ allowed-tools:
15
15
 
16
16
  <purpose>
17
17
  Package a completed milestone into a releasable version. Bumps the project version (e.g. `package.json`, `pyproject.toml`, or language-specific manifest), generates or appends a changelog entry from phase/milestone summaries and git log, creates an annotated git tag, and optionally pushes to the remote. Runs after `/maestro-milestone-complete` has archived the milestone; serves as the final delivery step in the SDLC loop.
18
+
19
+ Pipeline position: downstream of `/maestro-milestone-complete` (consumes archived milestone + audit verdict). Terminal command — no downstream consumer.
18
20
  </purpose>
19
21
 
20
22
  <required_reading>
@@ -25,11 +27,14 @@ Package a completed milestone into a releasable version. Bumps the project versi
25
27
  $ARGUMENTS -- optional explicit version string and flags.
26
28
 
27
29
  **Flags:**
28
- - `<version>` -- explicit version (e.g. `1.2.0`). If omitted, version is derived from `--bump` or prompted.
29
- - `--bump patch|minor|major` -- semver bump relative to the current version (default: `minor`)
30
- - `--dry-run` -- compute the next version, changelog diff, and tag name without writing files or creating tags
31
- - `--no-tag` -- skip git tag creation (version bump + changelog only)
32
- - `--no-push` -- skip `git push --follow-tags` after tagging
30
+
31
+ | Flag | Effect | Default |
32
+ |------|--------|---------|
33
+ | `<version>` | Explicit version (e.g. `1.2.0`). If omitted, version is derived from `--bump` or prompted | — |
34
+ | `--bump patch\|minor\|major` | Semver bump relative to the current version | `minor` |
35
+ | `--dry-run` | Compute the next version, changelog diff, and tag name without writing files or creating tags | `false` |
36
+ | `--no-tag` | Skip git tag creation (version bump + changelog only) | `false` |
37
+ | `--no-push` | Skip `git push --follow-tags` after tagging | `false` |
33
38
 
34
39
  **State files:**
35
40
  - `.workflow/state.json` -- current_milestone, previous release version
@@ -43,6 +48,13 @@ $ARGUMENTS -- optional explicit version string and flags.
43
48
  - Working tree must be clean (no uncommitted changes) unless `--dry-run`
44
49
  </context>
45
50
 
51
+ <interview_protocol>
52
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
53
+
54
+ **Decision points**: version bump type (major / minor / patch / custom), changelog review and confirmation
55
+ **Scope guard**: only release decisions; do not prejudge next milestone scope
56
+ </interview_protocol>
57
+
46
58
  <execution>
47
59
  Follow '~/.maestro/workflows/milestone-release.md' completely.
48
60
 
@@ -55,7 +67,12 @@ Follow '~/.maestro/workflows/milestone-release.md' completely.
55
67
  6. Create annotated git tag `v{version}` with release notes body (unless `--no-tag`)
56
68
  7. Push commit + tag to remote (unless `--no-push`)
57
69
 
58
- **Report format on completion:**
70
+ For `--dry-run`, print the computed version, changelog diff, and tag name without side effects.
71
+ </execution>
72
+
73
+ <completion>
74
+ ### Standalone report
75
+
59
76
  ```
60
77
  === RELEASE COMPLETE ===
61
78
  Version: v{previous} → v{new}
@@ -63,14 +80,28 @@ Milestone: {milestone_name}
63
80
  Tag: v{new} {pushed|local-only}
64
81
  Changelog: {N} entries written to CHANGELOG.md
65
82
  Manifest: {file_path} updated
83
+ ```
84
+
85
+ ### Ralph-invoked completion
66
86
 
67
- Next steps:
68
- /maestro-plan {next_phase} -- Start next milestone's first phase
69
- /manage-status -- View project dashboard
87
+ End the step by calling the CLI (no text block output):
88
+ ```
89
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
70
90
  ```
71
91
 
72
- For `--dry-run`, print the computed version, changelog diff, and tag name without side effects.
73
- </execution>
92
+ Status verdicts:
93
+ - **DONE** — Normal completion
94
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
95
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
96
+ - **BLOCKED** — External hard blocker; pass `--reason`
97
+
98
+ ### Next-step routing
99
+
100
+ | Condition | Suggestion |
101
+ |-----------|-----------|
102
+ | Release successful, starting next milestone | `/maestro-plan {next_phase}` |
103
+ | Want to view project dashboard | `/manage-status` |
104
+ </completion>
74
105
 
75
106
  <error_codes>
76
107
  | Code | Severity | Condition | Recovery |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maestro-flow-one",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
4
4
  "description": "All Maestro workflow commands as a single Claude Code skill — intent routing, decision gates, minimal closed-loop chains",
5
5
  "bin": {
6
6
  "maestro-flow": "bin/maestro-flow.js"