maestro-flow-one 0.2.17 → 0.2.18

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.
@@ -1,116 +1,132 @@
1
- ---
2
- name: maestro-brainstorm
3
- description: Use when exploring ideas, evaluating approaches, or needing multi-perspective analysis before implementation
4
- argument-hint: "[topic|role-name] [--yes] [--count N] [--session ID] [--update] [--skip-questions] [--include-questions] [--style-skill PKG]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Bash
9
- - Glob
10
- - Grep
11
- - Agent
12
- - AskUserQuestion
13
- ---
14
- <purpose>
15
- Unified brainstorming combining interactive framework generation, multi-role parallel analysis, and cross-role synthesis. Two modes: Auto (full pipeline with guidance-specification → parallel role analysis → synthesis) and Single Role (individual role analysis for an existing session). Outputs structured artifacts in .brainstorming/ directory ready for downstream planning.
16
- </purpose>
17
-
18
- <required_reading>
19
- @~/.maestro/workflows/brainstorm.md
20
- </required_reading>
21
-
22
- <deferred_reading>
23
- - [scratch-index.json](~/.maestro/templates/scratch-index.json) — read when operating in scratch mode
24
- - [index.json](~/.maestro/templates/index.json) — read when operating in phase mode
25
- - [brainstorm-visualize.md](~/.maestro/workflows/brainstorm-visualize.md) — read when html-prototypes/ produced and user wants to browse them
26
- </deferred_reading>
27
-
28
- <context>
29
- $ARGUMENTS -- topic text for auto mode, or role name for single role mode.
30
-
31
- **Auto mode**: topic text (e.g., "Build real-time collaboration platform") triggers full pipeline.
32
- **Single role mode**: valid role name (e.g., "system-architect") runs one role analysis.
33
- **All output** goes to `.workflow/scratch/{YYYYMMDD}-brainstorm-{slug}/`.
34
- **Artifact registration**: On completion, registers artifact (type=brainstorm) in state.json.
35
- **Output boundary**: ALL file writes MUST target `{output_dir}/` or `.workflow/state.json` only. NEVER modify source code or files outside these paths.
36
-
37
- **Valid roles**: data-architect, product-manager, product-owner, scrum-master, subject-matter-expert, system-architect, test-strategist, ui-designer, ux-expert
38
-
39
- **Flags**:
40
- - `--yes` / `-y`: Auto mode, skip interactive questions, use defaults
41
- - `--count N`: Number of roles to select (default 3, max 9)
42
- - `--session ID`: Use existing session
43
- - `--update`: Update existing analysis (single role)
44
- - `--skip-questions`: Skip context gathering questions
45
- - `--include-questions`: Force context gathering even if analysis exists
46
- - `--style-skill PKG`: Style package for ui-designer role
47
-
48
- ### Pre-load specs
49
- 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.
50
- 2. Optionalproceed without if unavailable.
51
-
52
- ### Role Knowledge
53
- 1. Browse accumulated knowledge for this role:
54
- `maestro wiki list --category arch`
55
- 2. Analyze the index, identify entries relevant to the current task
56
- 3. Load selected documents:
57
- `maestro wiki load <id1> [id2] [id3...]`
58
- 4. Review loaded knowledge before proceeding
59
- </context>
60
-
61
- <execution>
62
- Follow '~/.maestro/workflows/brainstorm.md' completely.
63
-
64
- **Next-step routing on completion:**
65
-
66
- Auto mode:
67
- - Project not initialized Skill({ skill: "maestro-init" })
68
- - Project initialized, need spec package Skill({ skill: "maestro-roadmap", args: "--mode full --from-brainstorm {session_id}" })
69
- - Project initialized, quick roadmap → Skill({ skill: "maestro-roadmap", args: "--from-brainstorm {session_id}" })
70
- - Need deeper analysis first Skill({ skill: "maestro-analyze", args: "{topic}" })
71
- - `html-prototypes/` produced with 2+ files and user wants to browse → load `~/.maestro/workflows/brainstorm-visualize.md` and launch visualizer server (optional, user-triggered)
72
- - DESIGN.md established during Step 3.5 suggest: "Run `/maestro-impeccable build <feature-description>` to build with the established design system"
73
-
74
- Single role mode:
75
- - More roles needed → Skill({ skill: "maestro-brainstorm", args: "{next_role} --session {session_id}" })
76
- - All roles done, run synthesis → Skill({ skill: "maestro-brainstorm", args: "{topic} --session {session_id}" })
77
- </execution>
78
-
79
- <error_codes>
80
- | Code | Severity | Condition | Recovery |
81
- |------|----------|-----------|----------|
82
- | E001 | error | Topic or role argument required | Prompt user for topic text or role name |
83
- | E002 | error | No active session for single role mode | Guide user to run auto mode first |
84
- | E003 | error | Invalid role name | Show valid roles list |
85
- | W001 | warning | Fewer than 10 ideas in divergent phase | Proceed with available ideas |
86
- | W002 | warning | Project context (.workflow/) not found | Continue without project context |
87
- | W003 | warning | Role template not found | Use generic analysis structure |
88
- | W004 | warning | Validation score < 60 | Log warning, suggest manual review |
89
- | W005 | warning | External research agent failed | Continue without designResearchContext |
90
- </error_codes>
91
-
92
- <success_criteria>
93
- **Auto mode**:
94
- - [ ] guidance-specification.md with RFC 2119 keywords, terminology, non-goals, feature decomposition
95
- - [ ] design-research.md persisted when Step 1.7 external research ran (fail-soft: absence not a failure)
96
- - [ ] Spec Review Gate passed (Step 3.5) or `--yes` bypassed
97
- - [ ] Role analysis files for each selected NON-UI role in `.brainstorming/{role}/`
98
- - [ ] If `ui-designer` in selected_roles AND Step 3.5 ran: `.workflow/impeccable/DESIGN.md` exists (visual style established via impeccable explore)
99
- - [ ] If `ui-designer` in selected_roles: `ui-designer/analysis.md` exists with UX analysis (interaction flows, state design, information architecture)
100
- - [ ] Feature specs in `.brainstorming/feature-specs/` (or synthesis-specification.md)
101
- - [ ] UI-bearing feature specs reference DESIGN.md for visual constraints in Section 3 (Interface Contract)
102
- - [ ] feature-index.json and synthesis-changelog.md
103
- - [ ] Final Output Gate passed (Step 5.5) or `--yes` bypassed
104
- - [ ] All user decisions captured with Decision Recording Protocol
105
- - [ ] Session metadata updated with completion status
106
- - [ ] Confidence scored per role completion and after cross-role analysis
107
- - [ ] Readiness gate checked before spec generation
108
- - [ ] Pressure pass completed on at least 1 feature spec
109
- - [ ] Confidence summary appended to synthesis-changelog.md
110
-
111
- **Single role mode**:
112
- - [ ] analysis.md written to `{output_dir}/{role}/`
113
- - [ ] Feature-point organization used when feature list available
114
- - [ ] Framework reference included when guidance-specification.md exists
115
- - [ ] Session metadata updated
116
- </success_criteria>
1
+ ---
2
+ name: maestro-brainstorm
3
+ description: Use when exploring ideas, evaluating approaches, or needing multi-perspective analysis before implementation
4
+ argument-hint: "[topic|role-name] [--yes] [--count N] [--session ID] [--update] [--skip-questions] [--include-questions] [--style-skill PKG]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Agent
12
+ - AskUserQuestion
13
+ ---
14
+ <purpose>
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/brainstorm-{slug}-{date}/` ready for downstream planning (roadmap / analyze / blueprint consume `guidance-specification.md`).
16
+ </purpose>
17
+
18
+ <required_reading>
19
+ @~/.maestro/workflows/brainstorm.md
20
+ </required_reading>
21
+
22
+ <deferred_reading>
23
+ - [scratch-index.json](~/.maestro/templates/scratch-index.json) — read when operating in scratch mode
24
+ - [index.json](~/.maestro/templates/index.json) — read when operating in phase mode
25
+ - [brainstorm-visualize.md](~/.maestro/workflows/brainstorm-visualize.md) — read when html-prototypes/ produced and user wants to browse them
26
+ </deferred_reading>
27
+
28
+ <context>
29
+ $ARGUMENTS -- topic text for auto mode, or role name for single role mode.
30
+
31
+ **Auto mode**: topic text (e.g., "Build real-time collaboration platform") triggers full pipeline.
32
+ **Single role mode**: valid role name (e.g., "system-architect") runs one role analysis.
33
+ **All output** goes to `.workflow/scratch/{YYYYMMDD}-brainstorm-{slug}/`.
34
+ **Artifact registration**: On completion, registers artifact (type=brainstorm) in state.json.
35
+ **Output boundary**: ALL file writes MUST target `{output_dir}/` or `.workflow/state.json` only. NEVER modify source code or files outside these paths.
36
+ **Produced files**: `guidance-specification.md`, `design-research.md` (optional), `{role}/analysis.md` + `{role}/analysis-F-*.md` + `{role}/findings-*.md` (per selected role).
37
+
38
+ **Valid roles**: data-architect, product-manager, product-owner, scrum-master, subject-matter-expert, system-architect, test-strategist, ui-designer, ux-expert
39
+
40
+ **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
48
+
49
+ ### Pre-load specs
50
+ 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.
51
+ 2. Optional — proceed without if unavailable.
52
+
53
+ ### Role Knowledge
54
+ 1. Browse accumulated knowledge for this role:
55
+ `maestro wiki list --category arch`
56
+ 2. Analyze the index, identify entries relevant to the current task
57
+ 3. Load selected documents:
58
+ `maestro wiki load <id1> [id2] [id3...]`
59
+ 4. Review loaded knowledge before proceeding
60
+ </context>
61
+
62
+ <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; every question must include a `Proceed now` option.
66
+ - Never ask what code can verify — resolve via `state.json`, the session directory, `maestro spec load`, or `maestro wiki search`.
67
+ - 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.
68
+ - Scope guard: only ask about decisions owned by `brainstorm`. Do not pre-resolve roadmap/plan choices.
69
+
70
+ Decision points: mode (auto / single-role / review-only) / role selection and `--count` / `--from` upstream source / whether to enable design-research and the DESIGN.md sub-pipeline.
71
+
72
+ Exit: on consensus or `Proceed now`, write the table below into `guidance-specification.md` §11 and session metadata:
73
+ `| # | Decision | Choice | Source (user / code / default) |`
74
+ </interview_protocol>
75
+
76
+ <execution>
77
+ Follow '~/.maestro/workflows/brainstorm.md' completely.
78
+
79
+ **Next-step routing on completion:**
80
+
81
+ Auto mode:
82
+ - Project not initialized Skill({ skill: "maestro-init" })
83
+ - Project initialized, need formal spec package Skill({ skill: "maestro-blueprint", args: "--from brainstorm:{artifact_id}" })
84
+ - Project initialized, quick roadmap Skill({ skill: "maestro-roadmap", args: "--from brainstorm:{artifact_id}" })
85
+ - Need deeper analysis first Skill({ skill: "maestro-analyze", args: "{topic} --from brainstorm:{artifact_id}" })
86
+ - `html-prototypes/` produced with 2+ files and user wants to browse load `~/.maestro/workflows/brainstorm-visualize.md` and launch visualizer server (optional, user-triggered)
87
+ - DESIGN.md established during Step 3.5 suggest: "Run `/maestro-impeccable build <feature-description>` to build with the established design system"
88
+
89
+ Single role mode:
90
+ - More roles needed → Skill({ skill: "maestro-brainstorm", args: "{next_role} --session {session_id}" })
91
+ - All roles done, run synthesis → Skill({ skill: "maestro-brainstorm", args: "{topic} --session {session_id}" })
92
+ </execution>
93
+
94
+ <error_codes>
95
+ | Code | Severity | Condition | Recovery |
96
+ |------|----------|-----------|----------|
97
+ | E001 | error | Topic or role argument required | Prompt user for topic text or role name |
98
+ | E002 | error | No active session for single role mode | Guide user to run auto mode first |
99
+ | E003 | error | Invalid role name | Show valid roles list |
100
+ | E006 | error | `--review-only` but no `{role}/analysis.md` found | Run auto or single-role mode first |
101
+ | E007 | error | `--review-only` but `guidance-specification.md` missing | Run auto mode to generate guidance first |
102
+ | W001 | warning | Fewer than 10 ideas in divergent phase | Proceed with available ideas |
103
+ | W002 | warning | Project context (.workflow/) not found | Continue without project context |
104
+ | W003 | warning | Role template not found | Use generic analysis structure |
105
+ | W004 | warning | Validation score < 60 | Log warning, suggest manual review |
106
+ | W005 | warning | External research agent failed | Continue without designResearchContext |
107
+ | W006 | warning | Reviewer patch_targets heading drift (no match) | Skip that patch; report in final summary |
108
+ </error_codes>
109
+
110
+ <success_criteria>
111
+ **Auto mode**:
112
+ - [ ] Interactive mode: interview decision table written to `guidance-specification.md` §11 and session metadata
113
+ - [ ] `guidance-specification.md` with RFC 2119 keywords, terminology, non-goals, feature decomposition (§10), decision tracking (§11), cross-role resolutions placeholder (§12)
114
+ - [ ] `design-research.md` persisted when Step 1.7 external research ran (fail-soft: absence not a failure)
115
+ - [ ] If `ui-designer` in selected_roles AND Step 3.5 ran: `.workflow/impeccable/DESIGN.md` exists (visual style established via impeccable explore)
116
+ - [ ] `{role}/analysis.md` written for each selected role, containing §2 Decision Digest (4 tables) + §3 Cross-Cutting Foundations + §4 File Index
117
+ - [ ] `{role}/analysis-F-{id}-{slug}.md` written per feature (one file per feature, < 2000 words)
118
+ - [ ] `system-architect/analysis.md` §3 includes Data Model + State Machine when system-architect is selected
119
+ - [ ] `ui-designer/analysis.md` references DESIGN.md visual constraints when ui-designer is selected
120
+ - [ ] Each `{role}/analysis.md` §2 Decisions table has ≥ 1 row per feature
121
+ - [ ] Cross-role review (Step 4.5) executed; reviewer compares §2 Decision Digests; output includes `patch_targets[]` for every finding
122
+ - [ ] If findings exist: each accepted resolution applied via Edit (annotate / strikeout / append) AND logged in `guidance-specification.md` §12 "Cross-Role Resolutions"
123
+ - [ ] If zero findings: final report explicitly states "No cross-role issues detected"; guidance §12 unchanged
124
+ - [ ] Heading-drift patch failures surfaced in final report (if any)
125
+ - [ ] Session metadata updated with completion status (review_findings_count, resolutions_applied, patches_skipped)
126
+
127
+ **Single role mode**:
128
+ - [ ] `{role}/analysis.md` written with §2 Decision Digest + §4 File Index
129
+ - [ ] `{role}/analysis-F-*.md` written when guidance §10 feature list available
130
+ - [ ] §2 Decisions table references guidance decision IDs
131
+ - [ ] Session metadata updated
132
+ </success_criteria>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-init
3
3
  description: Initialize project with auto state detection
4
- argument-hint: "[-y] [--from-brainstorm SESSION-ID]"
4
+ argument-hint: "[-y] [--from <source>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -25,7 +25,7 @@ Initialize a new project through auto state detection and unified flow. Invoked
25
25
  <context>
26
26
  **Flags:**
27
27
  - `-y` -- Automatic mode. After config questions, runs research without further interaction. Expects idea document via @ reference.
28
- - `--from-brainstorm SESSION-ID` -- Import from a brainstorm session. Reads guidance-specification.md to pre-fill project vision, goals, constraints, and terminology. Skips interactive questioning.
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`
29
29
 
30
30
  **Load project state if exists:**
31
31
  Check for `.workflow/state.json` -- loads context if project already initialized.
@@ -63,7 +63,7 @@ Other commands:
63
63
  |------|----------|-----------|----------|
64
64
  | E001 | error | No arguments provided when -y requires @ reference | Check arguments format, re-run with correct input |
65
65
  | E002 | error | .workflow/ already exists for greenfield init | Check .workflow/ directory state, resolve conflicts |
66
- | E003 | error | Brainstorm session not found (--from-brainstorm) | Check arguments format, re-run with correct input |
66
+ | E003 | error | Context source not found (--from / --from-brainstorm) | Check arguments format, re-run with correct input |
67
67
  | W001 | warning | Research agent failed, continuing with partial results | Retry research or proceed with partial results |
68
68
  </error_codes>
69
69
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-plan
3
3
  description: Use when creating, revising, or verifying an execution plan for a phase or task
4
- argument-hint: "[phase] [--collab] [--spec SPEC-xxx] [-y] [--gaps] [--tdd] [--dir <path>] [--revise [instructions]] [--check <plan-dir>]"
4
+ argument-hint: "[phase] [--collab] [--spec SPEC-xxx] [-y] [--gaps] [--tdd] [--dir <path>] [--from <source>] [--revise [instructions]] [--check <plan-dir>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -39,12 +39,22 @@ $ARGUMENTS — phase number, or no args for milestone-wide planning, with option
39
39
  Scope routing, base flags (`--collab`, `--spec`, `-y`, `--gaps`, `--dir`), output directory format, and artifact registration are defined in workflow plan.md.
40
40
 
41
41
  **Command-level flags** (extensions beyond workflow base):
42
+ - `--from <source>`: Load upstream context directly (bypasses roadmap requirement):
43
+ - `analyze:ANL-xxx` → CONTEXT_DIR = artifact path, scope = "standalone"
44
+ - `blueprint:BLP-xxx` → CONTEXT_DIR = blueprint path, scope = "standalone"
45
+ - `@file` or `path/` → load context-package.json from path
42
46
  - `--revise [instructions]` -- See workflow plan.md § Revise Mode
43
47
  - `--check <plan-dir>` -- See workflow plan.md § Check Mode
44
48
 
45
- **Upstream context:**
46
- - Reads `context.md` from prior analyze artifact (auto-discovered from state.json or via --dir)
47
- - Reads `conclusions.json` if available (implementation_scope seeds task generation)
49
+ **Upstream context (resolution priority):**
50
+ 1. `--from analyze:ANL-xxx` uses analyze conclusions.implementation_scope directly
51
+ 2. `--from blueprint:BLP-xxx` uses blueprint requirements + architecture
52
+ 3. `--dir <path>` → explicit context directory (unchanged)
53
+ 4. Numeric arg → scope = "phase", resolve from roadmap (unchanged)
54
+ 5. No args + roadmap → scope = "milestone" (unchanged)
55
+ 6. No args + no roadmap → search state.json for latest analyze artifact, fallback standalone
56
+
57
+ **Ad-hoc milestone (D-008):** When scope resolves to "standalone" and `current_milestone == null`, plan auto-creates an adhoc milestone (`type: "adhoc"`) in state.json before proceeding. This ensures downstream milestone-audit/complete have a valid milestone context. See workflow plan.md § "Ad-hoc Milestone Auto-Creation".
48
58
 
49
59
  ### Role Knowledge
50
60
  `maestro wiki list --category arch` → select relevant → `maestro wiki load`
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-roadmap
3
- description: Generate roadmap from requirements (light or full mode)
4
- argument-hint: "<requirement> [--mode light|full] [-y] [-c] [-m progressive|direct|auto] [--from-brainstorm SESSION-ID] [--revise [instructions]] [--review]"
3
+ description: Generate roadmap with milestone/phase structure from requirements or upstream context
4
+ argument-hint: "<requirement> [-y] [-c] [-m progressive|direct|auto] [--from <source>] [--revise [instructions]] [--review]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -13,16 +13,14 @@ allowed-tools:
13
13
  - AskUserQuestion
14
14
  ---
15
15
  <purpose>
16
- Unified roadmap generation with two execution paths:
16
+ Generate a milestone/phase roadmap from requirements or upstream context. Produces `.workflow/roadmap.md` with Milestone > Phase hierarchy ready for maestro-analyze and maestro-plan.
17
17
 
18
- - **Light mode** (default): Directly from requirements to roadmap. No specification documents.
19
- - **Full mode** (`--mode full`): 7-phase document chain (Product Brief PRD → Architecture → Epics → Roadmap) producing a complete specification package in `.workflow/.spec/` plus `.workflow/roadmap.md`.
20
-
21
- Additional operation modes (light mode only):
18
+ Operation modes:
19
+ - **Create** (default): Build roadmap from requirements or upstream context
22
20
  - **Revise** (`--revise`): Modify existing roadmap while preserving completed phase progress
23
21
  - **Review** (`--review`): Health assessment of current roadmap (read-only)
24
22
 
25
- Both modes produce `.workflow/roadmap.md` with milestone/phase structure ready for maestro-plan.
23
+ For formal specification documents (Product Brief, PRD, Architecture, Epics), use `/maestro-blueprint` instead.
26
24
  </purpose>
27
25
 
28
26
  <required_reading>
@@ -31,73 +29,67 @@ Both modes produce `.workflow/roadmap.md` with milestone/phase structure ready f
31
29
  </required_reading>
32
30
 
33
31
  <deferred_reading>
34
- - [roadmap.md](~/.maestro/workflows/roadmap.md) — read when mode is light (default)
35
- - [spec-generate.md](~/.maestro/workflows/spec-generate.md) — read when mode is full
36
- - [spec-config.json](~/.maestro/templates/spec-config.json) — read when initializing spec configuration (full mode)
32
+ - [roadmap.md](~/.maestro/workflows/roadmap.md) — read for roadmap generation workflow
37
33
  </deferred_reading>
38
34
 
39
35
  <context>
40
- $ARGUMENTS -- requirement text, @file reference, or brainstorm session reference.
36
+ $ARGUMENTS -- requirement text, @file reference, or upstream context source.
41
37
 
42
- **Flags (shared):**
43
- - `--mode light|full`: Execution path (default: light)
38
+ **Flags:**
44
39
  - `-y` / `--yes`: Auto mode — skip interactive questions, use recommended defaults
45
40
  - `-c` / `--continue`: Resume from last checkpoint
46
- - `--from-brainstorm SESSION-ID`: Import guidance-specification.md from a brainstorm session as seed
47
-
48
- **Flags (light mode only):**
49
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`)
50
44
  - `--revise [instructions]`: Revise existing roadmap. If instructions provided, apply directly. If omitted, ask user. Preserves completed phase progress.
51
45
  - `--review`: Roadmap health assessment (read-only)
52
46
 
53
47
  **Input types:**
54
48
  - Direct text: `"Implement user authentication system with OAuth and 2FA"`
55
49
  - File reference: `@requirements.md`
56
- - Brainstorm import: `--from-brainstorm WFS-xxx`
50
+ - Context import: `--from brainstorm:BRN-001` or `--from analyze:ANL-xxx` or `--from blueprint:BLP-xxx`
57
51
  - No args + `--revise` / `--review`: Operate on existing `.workflow/roadmap.md`
58
52
 
59
53
  **Pipeline position:**
60
54
  ```
61
- maestro-brainstorm (optional upstream)
62
- guidance-specification.md
63
- maestro-init (project setup)
64
- project.md, state.json, config.json
65
- maestro-roadmap [--mode light] → roadmap.md directly
66
- maestro-roadmap --mode full → spec package + roadmap.md
55
+ maestro-brainstorm ─┐
56
+ maestro-blueprint ─┤ (optional upstream, parallel)
57
+ maestro-analyze ─┘ context-package.json
58
+
59
+ maestro-roadmap → .workflow/roadmap.md (Milestone > Phase hierarchy)
67
60
 
68
- maestro-plan → maestro-execute → maestro-verify
61
+ maestro-analyze {phase} → maestro-plan → maestro-execute → maestro-verify
69
62
  ```
70
63
 
71
- **Note (full mode):** `maestro-init` MUST run before `--mode full`. It creates the `.workflow/` directory and project context.
72
-
73
64
  ### Pre-load specs
74
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.
75
66
  2. Optional — proceed without if unavailable.
76
67
  </context>
77
68
 
78
- <execution>
69
+ <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).
79
71
 
80
- ### Mode routing
72
+ - One decision per turn via AskUserQuestion with 2–4 options + a (Recommended) default; every question must include a `Proceed now` option.
73
+ - Never ask what code can verify — resolve via `state.json`, existing `roadmap.md`, `project.md`, or `maestro spec load`.
74
+ - 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.
75
+ - Scope guard: only decide the shape of the roadmap. Do not pre-resolve intra-phase task breakdown — that belongs to `plan`.
81
76
 
82
- 1. Read `@~/.maestro/workflows/roadmap-common.md` (always shared logic)
83
- 2. Parse `--mode` flag:
84
- - `light` or omitted → read `@~/.maestro/workflows/roadmap.md`, follow its process
85
- - `full` → read `@~/.maestro/workflows/spec-generate.md`, follow its process
86
- 3. If `--revise` or `--review` present → force light mode (these are light-mode-only operations)
77
+ Decision points: scope (MVP / complete / phased) → strategy (progressive / direct / auto) → milestone boundaries → phase dependencies and order.
87
78
 
88
- ### Light mode (default)
79
+ Exit: on consensus or `Proceed now`, append the table below to a `Roadmap Decisions` section at the top of `.workflow/roadmap.md`:
80
+ `| # | Decision | Choice | Source (user / code / default) |`
81
+ </interview_protocol>
89
82
 
90
- Follow `~/.maestro/workflows/roadmap.md` completely.
83
+ <execution>
84
+
85
+ 1. Read `@~/.maestro/workflows/roadmap-common.md` (always — shared logic)
86
+ 2. Read `@~/.maestro/workflows/roadmap.md`, follow its process
91
87
 
92
88
  Sub-modes:
93
- - **Create** (default): Build roadmap from requirements
89
+ - **Create** (default): Build roadmap from requirements or upstream context
94
90
  - **Revise** (`--revise`): Follow workflow roadmap.md "Mode: Revise" section
95
91
  - **Review** (`--review`): Follow workflow roadmap.md "Mode: Review" section
96
92
 
97
- ### Full mode (`--mode full`)
98
-
99
- Follow `~/.maestro/workflows/spec-generate.md` completely.
100
-
101
93
  ### Next-step routing on completion
102
94
 
103
95
  | Condition | Suggestion |
@@ -106,63 +98,32 @@ Follow `~/.maestro/workflows/spec-generate.md` completely.
106
98
  | Simple project, ready to plan | /maestro-plan 1 |
107
99
  | Need UI design first | /maestro-impeccable build |
108
100
  | View project dashboard | /manage-status |
109
- | Need project setup (full mode) | /maestro-init |
101
+ | Need formal spec documents | /maestro-blueprint |
110
102
  </execution>
111
103
 
112
104
  <error_codes>
113
-
114
- **Shared:**
115
105
  | Code | Severity | Condition | Recovery |
116
106
  |------|----------|-----------|----------|
117
107
  | E001 | error | Requirement/idea text or @file required | Prompt user for input |
118
- | E002 | error | Brainstorm session not found (--from-brainstorm) | Show available sessions |
119
- | W001 | warning | CLI analysis failed, using fallback | Continue with available data |
120
- | W005 | warning | External research agent failed | Continue without apiResearchContext |
121
-
122
- **Light mode:**
123
- | Code | Severity | Condition | Recovery |
124
- |------|----------|-----------|----------|
108
+ | E002 | error | Context source not found (--from / --from-brainstorm) | Show available sessions/sources |
125
109
  | E003 | error | Circular dependency detected in phases | Prompt user to re-decompose |
126
110
  | E004 | error | roadmap.md not found (--revise/--review) | Run maestro-roadmap first |
127
111
  | E005 | error | Revision invalidates completed phase work | Warn user, ask to confirm or adjust |
112
+ | W001 | warning | CLI analysis failed, using fallback | Continue with available data |
128
113
  | W002 | warning | Max refinement rounds (5) reached | Force proceed with current roadmap |
129
-
130
- **Full mode:**
131
- | Code | Severity | Condition | Recovery |
132
- |------|----------|-----------|----------|
133
- | E006 | error | `.workflow/` not initialized | Run maestro-init first |
134
- | E007 | error | Phase 6 readiness Fail after 2 auto-fix iterations | Present manual fix options |
135
- | W002 | warning | Codebase exploration failed | Continue without codebase context |
136
- | W003 | warning | Glossary has < 5 terms | Note in readiness check |
137
- | W004 | warning | Review-level readiness score (60-79%) | Proceed with caveats |
114
+ | W005 | warning | External research agent failed | Continue without apiResearchContext |
138
115
  </error_codes>
139
116
 
140
117
  <success_criteria>
141
-
142
- **Light mode:**
118
+ - [ ] Interactive mode: interview decision table appended to `.workflow/roadmap.md` "Roadmap Decisions" section
143
119
  - [ ] Requirement parsed with goal, constraints, stakeholders
120
+ - [ ] Milestones defined with deliverable targets and version tags
144
121
  - [ ] Decomposition strategy selected (progressive or direct)
145
- - [ ] Phases defined with success criteria, dependencies, and requirement mappings
122
+ - [ ] Phases defined within milestones with success criteria, dependencies, and requirement mappings
146
123
  - [ ] Every Active requirement from project.md mapped to exactly one phase
147
124
  - [ ] No circular dependencies in phase ordering
148
125
  - [ ] User approved roadmap (or auto-approved with -y)
149
- - [ ] `.workflow/roadmap.md` written with phase details, scope decisions, and progress table
126
+ - [ ] `.workflow/roadmap.md` written with Milestone > Phase hierarchy, scope decisions, and progress table
150
127
  - [ ] No phase directories created (phases are labels in roadmap, not directories)
151
-
152
- **Full mode (in addition to light mode criteria for roadmap):**
153
- - [ ] `spec-config.json` created with session metadata and phase tracking
154
- - [ ] `product-brief.md` with vision, goals, scope, multi-perspective synthesis
155
- - [ ] `glossary.json` with 5+ core terms for cross-document consistency
156
- - [ ] `requirements/` directory with `_index.md` + individual `REQ-*.md` + `NFR-*.md` files
157
- - [ ] All requirements have RFC 2119 keywords and acceptance criteria
158
- - [ ] `architecture/` directory with `_index.md` + individual `ADR-*.md` files
159
- - [ ] Architecture includes state machine, config model, error handling, observability (service type)
160
- - [ ] `epics/` directory with `_index.md` + individual `EPIC-*.md` files
161
- - [ ] Cross-Epic dependency map (Mermaid) and MVP subset tagged
162
- - [ ] `readiness-report.md` with 4-dimension quality scores and traceability matrix
163
- - [ ] `spec-summary.md` with one-page executive summary
164
- - [ ] All documents have valid YAML frontmatter with session_id
165
- - [ ] Glossary terms used consistently across all documents
166
- - [ ] Readiness gate: Pass (>=80%) or Review (>=60%) with documented caveats
167
- - [ ] `.workflow/roadmap.md` written
128
+ - [ ] Artifact registered in state.json with milestone entries
168
129
  </success_criteria>
@@ -34,8 +34,10 @@ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json
34
34
 
35
35
  **Data source:**
36
36
  - `.workflow/state.json` — artifacts[], current_milestone, milestones[]
37
- - `.workflow/roadmap.md` — milestone-to-phase mapping
37
+ - `.workflow/roadmap.md` — milestone-to-phase mapping (standard milestones only)
38
38
  - Plan scratch dirs — for task status verification
39
+
40
+ **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.
39
41
  </context>
40
42
 
41
43
  <execution>
@@ -59,8 +61,8 @@ Audit checklist steps (phase coverage, ad-hoc completeness, execution completene
59
61
  </error_codes>
60
62
 
61
63
  <success_criteria>
62
- - [ ] All phases in milestone identified from roadmap
63
- - [ ] Artifact chains verified (ANL→PLN→EXC) per phase
64
+ - [ ] All phases in milestone identified from roadmap (standard) or milestone_obj.phases (adhoc)
65
+ - [ ] Artifact chains verified: ANL→PLN→EXC per phase (standard) or PLN→EXC exists (adhoc)
64
66
  - [ ] Ad-hoc artifacts checked for completion
65
67
  - [ ] Integration check completed (shared interfaces, data contracts)
66
68
  - [ ] Audit report written with clear PASS/FAIL verdict
@@ -26,8 +26,8 @@ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json
26
26
  **Requires:** `/maestro-milestone-audit` should have passed.
27
27
 
28
28
  **State files:**
29
- - `.workflow/state.json` — artifacts[], milestones[], current_milestone, milestone_history[]
30
- - `.workflow/roadmap.md` — milestone structure
29
+ - `.workflow/state.json` — artifacts[], milestones[] (with `type` field: `"standard"` | `"adhoc"`), current_milestone, milestone_history[]
30
+ - `.workflow/roadmap.md` — milestone structure (standard milestones only; adhoc milestones may not have roadmap)
31
31
  - `.workflow/milestones/{milestone}/audit-report.md` — audit results
32
32
  </context>
33
33
 
@@ -52,8 +52,10 @@ If user confirms promotion, invoke `Skill({ skill: "spec-add", args: "<category>
52
52
 
53
53
  **Next-step routing on completion:**
54
54
  - Cut a release → `/maestro-milestone-release`
55
- - Next milestone → `/maestro-analyze` or `/maestro-plan 1`
55
+ - Next milestone → `/maestro-analyze` or `/maestro-plan 1` (standard milestones only)
56
56
  - View state → `/manage-status`
57
+
58
+ **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.
57
59
  </execution>
58
60
 
59
61
  <error_codes>
@@ -69,7 +71,7 @@ If user confirms promotion, invoke `Skill({ skill: "spec-add", args: "<category>
69
71
  - [ ] Scratch artifacts moved to milestones/{M}/artifacts/
70
72
  - [ ] Artifact entries archived to milestone_history
71
73
  - [ ] Knowhow extracted to specs/learnings.md
72
- - [ ] state.json updated: next milestone as current, artifacts[] cleared
73
- - [ ] Roadmap snapshot saved
74
+ - [ ] state.json updated: next milestone as current (standard) or current_milestone=null (adhoc), artifacts[] cleared
75
+ - [ ] Roadmap snapshot saved (standard only; adhoc skips)
74
76
  - [ ] project.md Context updated with milestone summary
75
77
  </success_criteria>
@@ -15,7 +15,7 @@ allowed-tools:
15
15
  Run unified automated testing via CSV layer pipeline. Reads project state to auto-select the optimal scenario source — PRD specs (when spec package exists), coverage gaps (when Nyquist audit found gaps), or code exploration (default). All sources converge into a CSV pipeline: discover infrastructure → plan → build scenarios.csv → write tests per layer (spawn_agents_on_csv parallel) → execute → diagnose failures (spawn_agents_on_csv parallel) → iterate → report.
16
16
 
17
17
  Key mechanisms:
18
- - **Intelligent routing**: Reads `.tests/`, `.workflow/.spec/`, `verification.json` to auto-select source — no mode flag needed
18
+ - **Intelligent routing**: Reads `.tests/`, `.workflow/blueprint/`, `verification.json` to auto-select source — no mode flag needed
19
19
  - **CSV parallel test writing**: Per-layer `spawn_agents_on_csv` — each agent writes one test file independently
20
20
  - **CSV parallel failure diagnosis**: Failed scenarios dispatched via `spawn_agents_on_csv` for classification + fix
21
21
  - **Unified iteration engine**: Nested inner loop (fix test_defects via diagnosis CSV, max 3/layer) + outer loop (adaptive strategy, max N iterations)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maestro-flow-one",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
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"