maestro-flow-one 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/maestro-flow/agents/cli-explore-agent.md +1 -3
- package/maestro-flow/agents/cross-role-reviewer.md +171 -0
- package/maestro-flow/agents/role-design-author.md +218 -0
- package/maestro-flow/agents/ui-design-agent.md +1 -18
- package/maestro-flow/agents/workflow-analyzer.md +1 -1
- package/maestro-flow/agents/workflow-external-researcher.md +1 -1
- package/maestro-flow/commands/learn/decompose.md +6 -6
- package/maestro-flow/commands/learn/follow.md +4 -4
- package/maestro-flow/commands/learn/investigate.md +6 -6
- package/maestro-flow/commands/learn/retro.md +7 -7
- package/maestro-flow/commands/learn/second-opinion.md +4 -4
- package/maestro-flow/commands/lifecycle/amend.md +1 -0
- package/maestro-flow/commands/lifecycle/analyze.md +37 -4
- package/maestro-flow/commands/lifecycle/blueprint.md +131 -0
- package/maestro-flow/commands/lifecycle/brainstorm.md +133 -116
- package/maestro-flow/commands/lifecycle/fork.md +1 -1
- package/maestro-flow/commands/lifecycle/guard.md +3 -2
- package/maestro-flow/commands/lifecycle/impeccable.md +13 -11
- package/maestro-flow/commands/lifecycle/init.md +3 -3
- package/maestro-flow/commands/lifecycle/plan.md +16 -4
- package/maestro-flow/commands/lifecycle/roadmap.md +43 -81
- package/maestro-flow/commands/manage/harvest.md +1 -0
- package/maestro-flow/commands/manage/issue-discover.md +1 -1
- package/maestro-flow/commands/manage/knowhow.md +1 -1
- package/maestro-flow/commands/manage/learn.md +4 -4
- package/maestro-flow/commands/milestone/audit.md +5 -3
- package/maestro-flow/commands/milestone/complete.md +7 -5
- package/maestro-flow/commands/milestone/release.md +1 -1
- package/maestro-flow/commands/quality/auto-test.md +6 -6
- package/maestro-flow/commands/quality/refactor.md +1 -1
- package/maestro-flow/commands/quality/retrospective.md +2 -2
- package/maestro-flow/commands/spec/remove.md +6 -2
- package/package.json +1 -1
- package/maestro-flow/agents/conceptual-planning-agent.md +0 -245
|
@@ -148,6 +148,7 @@ On validation failure: fix JSON, retry (max 2).
|
|
|
148
148
|
| Code | Condition | Recovery |
|
|
149
149
|
|------|-----------|----------|
|
|
150
150
|
| E001 | No signals from any source | Verify artifact paths or provide description |
|
|
151
|
+
| E002 | Signal source path invalid or unreadable | Check `--from-*` path; ensure artifact exists |
|
|
151
152
|
| E003 | All signals are code bugs, not command gaps | Use /maestro-quick or /maestro-plan --gaps |
|
|
152
153
|
| E004 | Overlay validation failed after 2 retries | Review JSON manually |
|
|
153
154
|
| W001 | Some signals skipped (code bugs) | Route to appropriate fix command |
|
|
@@ -32,12 +32,23 @@ Use `--gaps` for issue-focused root cause analysis (replaces manage-issue-analyz
|
|
|
32
32
|
</deferred_reading>
|
|
33
33
|
|
|
34
34
|
<context>
|
|
35
|
-
$ARGUMENTS -- phase number for
|
|
35
|
+
$ARGUMENTS -- phase number for micro mode, topic text for macro/adhoc mode, no args for milestone-wide.
|
|
36
|
+
|
|
37
|
+
**Dual-layer mode:**
|
|
38
|
+
- **Macro mode** (text argument): Explore impact surface of a topic/requirement. Produces coarse-grained context with `scope_verdict` to route next step. Use before roadmap or for standalone analysis.
|
|
39
|
+
- **Micro mode** (numeric argument): Phase-level deep analysis within an existing roadmap. Produces fine-grained context for plan consumption. `analyze 1` = Phase 1 of current milestone.
|
|
40
|
+
|
|
41
|
+
**Disambiguation rule (mode selection):**
|
|
42
|
+
- First positional arg matches `^\d+$` (pure digits, e.g. `1`, `42`) → **micro mode** (treat as phase number)
|
|
43
|
+
- First positional arg is non-numeric text (e.g. `auth-refactor`, `improve search`) → **macro mode** (treat as topic)
|
|
44
|
+
- No positional arg → milestone-wide micro mode (when roadmap present) else macro fallback
|
|
45
|
+
- Mixed input like `"1 phase"` is treated as text → macro mode (only bare numerics trigger micro)
|
|
36
46
|
|
|
37
47
|
**Flags:**
|
|
38
48
|
- `-y` / `--yes`: Auto mode — skip interactive scoping, use recommended defaults, auto-deepen
|
|
39
49
|
- `-c` / `--continue`: Resume from existing session (auto-detect session folder + discussion.md)
|
|
40
50
|
- `-q` / `--quick`: Quick mode — skip exploration + scoring, go straight to decision extraction (context.md only)
|
|
51
|
+
- `--from <source>`: Load upstream context package (brainstorm:ID, blueprint:BLP-xxx, @file, or path)
|
|
41
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.
|
|
42
53
|
|
|
43
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).
|
|
@@ -46,6 +57,21 @@ Scope routing, output directory format, artifact registration schema, and output
|
|
|
46
57
|
`maestro wiki list --category debug` → select relevant → `maestro wiki load`
|
|
47
58
|
</context>
|
|
48
59
|
|
|
60
|
+
<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) |`
|
|
73
|
+
</interview_protocol>
|
|
74
|
+
|
|
49
75
|
<execution>
|
|
50
76
|
Follow '~/.maestro/workflows/analyze.md' completely.
|
|
51
77
|
|
|
@@ -76,15 +102,21 @@ Phase 4: Output context.md for downstream plan --gaps
|
|
|
76
102
|
|
|
77
103
|
**Handoff:** context.md is consumed by maestro-plan (loads Locked/Free/Deferred decisions). In --gaps mode, context.md contains issue root causes for `plan --gaps` consumption.
|
|
78
104
|
|
|
105
|
+
**scope_verdict** (added to context.md in Step 6 Synthesis for macro/adhoc/standalone scopes):
|
|
106
|
+
- `large` (3+ independent subsystems or hard serial dependencies) → suggest `/maestro-roadmap --from analyze:ANL-xxx`
|
|
107
|
+
- `medium` (1-2 subsystems, parallelizable) → suggest `/maestro-plan --from analyze:ANL-xxx`
|
|
108
|
+
- `small` (single-file or few-file change) → suggest `/maestro-plan --from analyze:ANL-xxx`
|
|
109
|
+
|
|
79
110
|
**Next-step routing on completion:**
|
|
80
111
|
|
|
81
|
-
Phase/Milestone scope:
|
|
112
|
+
Phase/Milestone scope (micro mode):
|
|
82
113
|
- Go recommendation, UI work needed → `/maestro-impeccable build {target}`
|
|
83
114
|
- Go recommendation, ready to plan → `/maestro-plan` or `/maestro-plan {phase}`
|
|
84
115
|
- No-Go recommendation → revisit requirements or `/maestro-brainstorm {topic}`
|
|
85
116
|
|
|
86
|
-
Adhoc/Standalone scope:
|
|
87
|
-
-
|
|
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`
|
|
88
120
|
- Need more exploration → `/maestro-analyze {topic} -c`
|
|
89
121
|
|
|
90
122
|
Gaps scope:
|
|
@@ -123,6 +155,7 @@ Gaps mode:
|
|
|
123
155
|
- [ ] context.md written with aggregated root causes for plan --gaps
|
|
124
156
|
|
|
125
157
|
Both modes (full + quick):
|
|
158
|
+
- [ ] Interactive mode: interview decision table written to `discussion.md` and mirrored into `context.md` "Interview Decisions"
|
|
126
159
|
- [ ] context.md written with all decisions classified as Locked/Free/Deferred
|
|
127
160
|
- [ ] Gray areas identified through phase-specific analysis
|
|
128
161
|
- [ ] Decision Recording Protocol applied to all decisions
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-blueprint
|
|
3
|
+
description: Generate formal specification package (Product Brief, PRD, Architecture, Epics) through 6-phase document chain
|
|
4
|
+
argument-hint: "<idea or @file> [-y] [-c] [--from <source>]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Formal specification document chain producing a complete specification package through 6 sequential phases with multi-CLI analysis and interactive refinement. Pure documentation — no code generation, no roadmap generation.
|
|
17
|
+
|
|
18
|
+
Parallel to `brainstorm` as an upstream origin command:
|
|
19
|
+
- **brainstorm** = divergent exploration (lightweight, multi-role creative)
|
|
20
|
+
- **blueprint** = convergent documentation (heavyweight, 6-phase formal spec chain)
|
|
21
|
+
|
|
22
|
+
Output: `.workflow/blueprint/BLP-{slug}-{date}/` containing Product Brief, PRD, Architecture, and Epics.
|
|
23
|
+
</purpose>
|
|
24
|
+
|
|
25
|
+
<required_reading>
|
|
26
|
+
@~/.maestro/workflows/blueprint.md
|
|
27
|
+
</required_reading>
|
|
28
|
+
|
|
29
|
+
<deferred_reading>
|
|
30
|
+
- [blueprint-config.json](~/.maestro/templates/blueprint-config.json) — read when initializing blueprint configuration
|
|
31
|
+
</deferred_reading>
|
|
32
|
+
|
|
33
|
+
<context>
|
|
34
|
+
$ARGUMENTS -- idea text, @file reference, or upstream context source.
|
|
35
|
+
|
|
36
|
+
**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`)
|
|
41
|
+
|
|
42
|
+
**Input types:**
|
|
43
|
+
- Direct text: `"Build a real-time collaboration platform with WebSocket"`
|
|
44
|
+
- File reference: `@requirements.md`
|
|
45
|
+
- Context import: `--from brainstorm:BRN-001` or `--from @requirements.md` or `--from path/`
|
|
46
|
+
- Resume: `-c` (resumes from first incomplete phase)
|
|
47
|
+
|
|
48
|
+
**Pipeline position:**
|
|
49
|
+
```
|
|
50
|
+
maestro-brainstorm (optional upstream)
|
|
51
|
+
↓ guidance-specification.md / context-package.json
|
|
52
|
+
maestro-blueprint
|
|
53
|
+
↓ .workflow/blueprint/BLP-{slug}-{date}/
|
|
54
|
+
maestro-analyze → maestro-roadmap → maestro-plan
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**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
|
+
|
|
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. Optional — proceed without if unavailable.
|
|
62
|
+
</context>
|
|
63
|
+
|
|
64
|
+
<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.
|
|
76
|
+
</interview_protocol>
|
|
77
|
+
|
|
78
|
+
<execution>
|
|
79
|
+
Follow `~/.maestro/workflows/blueprint.md` completely.
|
|
80
|
+
|
|
81
|
+
### Phase chain
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
P0: Spec Study → P1: Discovery → P1.5: Req Expansion → P2: Product Brief → P3: PRD → P4: Architecture → P5: Epics → P6: Readiness Check
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
P6 gate: Pass (>=80%) → Handoff | Review (60-79%) → Handoff w/caveats | Fail (<60%) → P6.5 Auto-Fix (max 2 iter) → re-check
|
|
88
|
+
|
|
89
|
+
### Next-step routing on completion
|
|
90
|
+
|
|
91
|
+
| Condition | Suggestion |
|
|
92
|
+
|-----------|-----------|
|
|
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>
|
|
98
|
+
|
|
99
|
+
<error_codes>
|
|
100
|
+
| Code | Severity | Condition | Recovery |
|
|
101
|
+
|------|----------|-----------|----------|
|
|
102
|
+
| E001 | error | Idea text or @file required | Prompt user for input |
|
|
103
|
+
| E002 | error | Context source not found (--from) | Show available sessions/sources |
|
|
104
|
+
| E006 | error | `.workflow/` not initialized | Run maestro-init first |
|
|
105
|
+
| E007 | error | Phase 6 readiness Fail after 2 auto-fix iterations | Present manual fix options |
|
|
106
|
+
| W001 | warning | CLI analysis failed, using fallback | Continue with available data |
|
|
107
|
+
| W002 | warning | Codebase exploration failed | Continue without codebase context |
|
|
108
|
+
| W003 | warning | Glossary has < 5 terms | Note in readiness check |
|
|
109
|
+
| W004 | warning | Review-level readiness score (60-79%) | Proceed with caveats |
|
|
110
|
+
| W005 | warning | External research agent failed | Continue without apiResearchContext |
|
|
111
|
+
</error_codes>
|
|
112
|
+
|
|
113
|
+
<success_criteria>
|
|
114
|
+
- [ ] Interactive mode: interview decisions persisted in blueprint-config.json
|
|
115
|
+
- [ ] `blueprint-config.json` created with session metadata and phase tracking
|
|
116
|
+
- [ ] `product-brief.md` with vision, goals, scope, multi-perspective synthesis
|
|
117
|
+
- [ ] `glossary.json` with 5+ core terms for cross-document consistency
|
|
118
|
+
- [ ] `requirements/` directory with `_index.md` + individual `REQ-*.md` + `NFR-*.md` files
|
|
119
|
+
- [ ] All requirements have RFC 2119 keywords and acceptance criteria
|
|
120
|
+
- [ ] `architecture/` directory with `_index.md` + individual `ADR-*.md` files
|
|
121
|
+
- [ ] Architecture includes state machine, config model, error handling, observability (service type)
|
|
122
|
+
- [ ] `epics/` directory with `_index.md` + individual `EPIC-*.md` files
|
|
123
|
+
- [ ] Cross-Epic dependency map (Mermaid) and MVP subset tagged
|
|
124
|
+
- [ ] `readiness-report.md` with 4-dimension quality scores and traceability matrix
|
|
125
|
+
- [ ] `blueprint-summary.md` with one-page executive summary
|
|
126
|
+
- [ ] All documents have valid YAML frontmatter with session_id
|
|
127
|
+
- [ ] Glossary terms used consistently across all documents
|
|
128
|
+
- [ ] Readiness gate: Pass (>=80%) or Review (>=60%) with documented caveats
|
|
129
|
+
- [ ] Artifact registered in state.json (type=blueprint)
|
|
130
|
+
- [ ] context-package.json generated for downstream consumption
|
|
131
|
+
</success_criteria>
|
|
@@ -1,116 +1,133 @@
|
|
|
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,
|
|
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/
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- `--
|
|
42
|
-
- `--
|
|
43
|
-
- `--
|
|
44
|
-
- `--
|
|
45
|
-
- `--
|
|
46
|
-
- `--
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
- [ ]
|
|
114
|
-
- [ ]
|
|
115
|
-
- [ ]
|
|
116
|
-
|
|
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/brainstorm-{slug}-{YYYYMMDD}/` (orchestrator MUST resolve this to an absolute path before passing to sub-agents).
|
|
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. 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 / 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) |`
|
|
75
|
+
</interview_protocol>
|
|
76
|
+
|
|
77
|
+
<execution>
|
|
78
|
+
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
|
+
- `html-prototypes/` produced with 2+ files and user wants to browse → load `~/.maestro/workflows/brainstorm-visualize.md` and launch visualizer server (optional, user-triggered)
|
|
88
|
+
- DESIGN.md established during Step 3.5 → suggest: "Run `/maestro-impeccable build <feature-description>` to build with the established design system"
|
|
89
|
+
|
|
90
|
+
Single role mode:
|
|
91
|
+
- More roles needed → Skill({ skill: "maestro-brainstorm", args: "{next_role} --session {session_id}" })
|
|
92
|
+
- All roles done, run synthesis → Skill({ skill: "maestro-brainstorm", args: "{topic} --session {session_id}" })
|
|
93
|
+
</execution>
|
|
94
|
+
|
|
95
|
+
<error_codes>
|
|
96
|
+
| Code | Severity | Condition | Recovery |
|
|
97
|
+
|------|----------|-----------|----------|
|
|
98
|
+
| E001 | error | Topic or role argument required | Prompt user for topic text or role name |
|
|
99
|
+
| E002 | error | No active session for single role mode | Guide user to run auto mode first |
|
|
100
|
+
| E003 | error | Invalid role name | Show valid roles list |
|
|
101
|
+
| E006 | error | `--review-only` but no `{role}/analysis.md` found | Run auto or single-role mode first |
|
|
102
|
+
| E007 | error | `--review-only` but `guidance-specification.md` missing | Run auto mode to generate guidance first |
|
|
103
|
+
| W001 | warning | Fewer than 10 ideas in divergent phase | Proceed with available ideas |
|
|
104
|
+
| W002 | warning | Project context (.workflow/) not found | Continue without project context |
|
|
105
|
+
| W003 | warning | Role template not found | Use generic analysis structure |
|
|
106
|
+
| W004 | warning | Validation score < 60 | Log warning, suggest manual review |
|
|
107
|
+
| W005 | warning | External research agent failed | Continue without designResearchContext |
|
|
108
|
+
| W006 | warning | Reviewer patch_targets heading drift (no match) | Skip that patch; report in final summary |
|
|
109
|
+
</error_codes>
|
|
110
|
+
|
|
111
|
+
<success_criteria>
|
|
112
|
+
**Auto mode**:
|
|
113
|
+
- [ ] Interactive mode: interview decision table written to `guidance-specification.md` §11 and session metadata
|
|
114
|
+
- [ ] `guidance-specification.md` with RFC 2119 keywords, terminology, non-goals, feature decomposition (§10), decision tracking (§11), cross-role resolutions placeholder (§12)
|
|
115
|
+
- [ ] `design-research.md` persisted when Step 1.7 external research ran (fail-soft: absence not a failure)
|
|
116
|
+
- [ ] If `ui-designer` in selected_roles AND Step 3.5 ran: `.workflow/impeccable/DESIGN.md` exists (visual style established via impeccable explore)
|
|
117
|
+
- [ ] `{role}/analysis.md` written for each selected role, containing §2 Decision Digest (4 tables) + §3 Cross-Cutting Foundations + §4 File Index
|
|
118
|
+
- [ ] `{role}/analysis-F-{id}-{slug}.md` written per feature (one file per feature, < 2000 words)
|
|
119
|
+
- [ ] `system-architect/analysis.md` §3 includes Data Model + State Machine when system-architect is selected
|
|
120
|
+
- [ ] `ui-designer/analysis.md` references DESIGN.md visual constraints when ui-designer is selected
|
|
121
|
+
- [ ] Each `{role}/analysis.md` §2 Decisions table has ≥ 1 row per feature
|
|
122
|
+
- [ ] Cross-role review (Step 4.5) executed; reviewer compares §2 Decision Digests; output includes `patch_targets[]` for every finding
|
|
123
|
+
- [ ] If findings exist: each accepted resolution applied via Edit (annotate / strikeout / append) AND logged in `guidance-specification.md` §12 "Cross-Role Resolutions"
|
|
124
|
+
- [ ] If zero findings: final report explicitly states "No cross-role issues detected"; guidance §12 unchanged
|
|
125
|
+
- [ ] Heading-drift patch failures surfaced in final report (if any)
|
|
126
|
+
- [ ] Session metadata updated with completion status (review_findings_count, resolutions_applied, patches_skipped)
|
|
127
|
+
|
|
128
|
+
**Single role mode**:
|
|
129
|
+
- [ ] `{role}/analysis.md` written with §2 Decision Digest + §4 File Index
|
|
130
|
+
- [ ] `{role}/analysis-F-*.md` written when guidance §10 feature list available
|
|
131
|
+
- [ ] §2 Decisions table references guidance decision IDs
|
|
132
|
+
- [ ] Session metadata updated
|
|
133
|
+
</success_criteria>
|
|
@@ -19,7 +19,7 @@ Since `.workflow/` is gitignored, this command explicitly copies project context
|
|
|
19
19
|
|
|
20
20
|
Also supports `--sync` mode to pull latest main branch changes and shared artifacts into an active worktree (prevents source and artifact drift for long-lived worktrees).
|
|
21
21
|
|
|
22
|
-
Produces `.workflow/worktrees.json` registry in the main worktree and `.workflow/worktree-scope.json` marker in the worktree.
|
|
22
|
+
Produces `.workflow/worktrees.json` registry in the main worktree and `.workflow/worktree-scope.json` marker in the worktree, and writes a scoped `state.json` inside the worktree containing only the forked milestone's artifacts.
|
|
23
23
|
</purpose>
|
|
24
24
|
|
|
25
25
|
<required_reading>
|
|
@@ -77,10 +77,11 @@ Read `.workflow/config.json`. If file missing, initialize with empty guard secti
|
|
|
77
77
|
- Write config
|
|
78
78
|
|
|
79
79
|
**`deny <path>`:**
|
|
80
|
-
- Normalize path to forward slashes
|
|
80
|
+
- Normalize path to forward slashes, ensure trailing slash for directories
|
|
81
|
+
- If `guard.mode` is `allow`, switch to `deny` and clear paths with warning
|
|
81
82
|
- Set `guard.mode = "deny"`
|
|
82
83
|
- Add path to `guard.paths` (deduplicate)
|
|
83
|
-
- Set `guard.enabled = true` if not already
|
|
84
|
+
- Set `guard.enabled = true` if not already (symmetric with `allow`: adding a deny path auto-enables the guard)
|
|
84
85
|
- Write config
|
|
85
86
|
|
|
86
87
|
**Step 4: Confirm**
|
|
@@ -74,6 +74,8 @@ responsive-design.md, spatial-design.md, typography.md, ux-writing.md
|
|
|
74
74
|
|
|
75
75
|
## Chains
|
|
76
76
|
|
|
77
|
+
Chain step names below reuse Command Routing names but resolve through the chain runner. To avoid ambiguity with Direct command invocation, internal display, todo items, and session status records always tag chain steps with the `impeccable:` prefix (e.g. `impeccable:craft`, `impeccable:critique`). The bare names in this table refer to the workflow file at `~/.maestro/workflows/impeccable/{name}.md` that the chain step reads.
|
|
78
|
+
|
|
77
79
|
| Chain | Steps | Scenario |
|
|
78
80
|
|-------|-------|----------|
|
|
79
81
|
| build | teach? → explore? → shape → craft → critique → [refine] → audit → polish | New from scratch |
|
|
@@ -181,17 +183,17 @@ Before reading any command workflow:
|
|
|
181
183
|
## Chain Execution
|
|
182
184
|
|
|
183
185
|
1. Prerequisites ✓
|
|
184
|
-
2. **Display chain preview**: parse chain definition, output full step preview:
|
|
186
|
+
2. **Display chain preview**: parse chain definition, output full step preview (chain steps prefixed `impeccable:` to disambiguate from Direct commands):
|
|
185
187
|
```
|
|
186
188
|
── Chain: build ──────────────────────────
|
|
187
|
-
1. teach (conditional: PRODUCT.md missing)
|
|
188
|
-
2. explore (conditional: DESIGN.md missing)
|
|
189
|
-
3. shape
|
|
190
|
-
4. craft
|
|
191
|
-
5. critique ◆ quality gate (threshold: 26/40)
|
|
192
|
-
6. [refine] ↺ auto-fix loop (max: 3)
|
|
193
|
-
7. audit ◆ quality gate (threshold: 14/20)
|
|
194
|
-
8. polish
|
|
189
|
+
1. impeccable:teach (conditional: PRODUCT.md missing)
|
|
190
|
+
2. impeccable:explore (conditional: DESIGN.md missing)
|
|
191
|
+
3. impeccable:shape
|
|
192
|
+
4. impeccable:craft
|
|
193
|
+
5. impeccable:critique ◆ quality gate (threshold: 26/40)
|
|
194
|
+
6. impeccable:[refine] ↺ auto-fix loop (max: 3)
|
|
195
|
+
7. impeccable:audit ◆ quality gate (threshold: 14/20)
|
|
196
|
+
8. impeccable:polish
|
|
195
197
|
─────────────────────────────────────────
|
|
196
198
|
Target: {target}
|
|
197
199
|
```
|
|
@@ -205,9 +207,9 @@ Before reading any command workflow:
|
|
|
205
207
|
"gate_history": [], "loop_count": 0, "status": "running" }
|
|
206
208
|
```
|
|
207
209
|
4. **TodoWrite init**: create todo items for all chain steps
|
|
208
|
-
- One item per step, format: `[chain] step N: {command} — {description}`
|
|
210
|
+
- One item per step, format: `[chain] step N: impeccable:{command} — {description}` (use `impeccable:` prefix to disambiguate from Direct command items)
|
|
209
211
|
- If conditional step is skipped, immediately mark completed
|
|
210
|
-
- Quality gate steps include threshold: `[chain] step 5: critique ◆ gate ≥26/40`
|
|
212
|
+
- Quality gate steps include threshold: `[chain] step 5: impeccable:critique ◆ gate ≥26/40`
|
|
211
213
|
5. For each step:
|
|
212
214
|
- Read `~/.maestro/workflows/impeccable/{command}.md` → execute
|
|
213
215
|
- **Step start**: TodoWrite marks current step in_progress
|
|
@@ -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
|
|
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
|
|
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 |
|
|
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
|
|