maestro-flow 0.4.11 → 0.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/.agents/agents/cli-explore-agent.md +1 -3
  2. package/.agents/agents/cross-role-reviewer.md +173 -0
  3. package/.agents/agents/role-design-author.md +218 -0
  4. package/.agents/agents/ui-design-agent.md +1 -18
  5. package/.agents/agents/workflow-analyzer.md +1 -1
  6. package/.agents/agents/workflow-external-researcher.md +1 -1
  7. package/.agents/skills/maestro/SKILL.md +61 -27
  8. package/.agents/skills/maestro-analyze/SKILL.md +30 -4
  9. package/.agents/skills/maestro-blueprint/SKILL.md +132 -0
  10. package/.agents/skills/maestro-brainstorm/SKILL.md +119 -103
  11. package/.agents/skills/maestro-help/SKILL.md +48 -14
  12. package/.agents/skills/maestro-help/index/catalog.json +29 -11
  13. package/.agents/skills/maestro-help/phases/01-parse-intent.md +1 -1
  14. package/.agents/skills/maestro-help/phases/02-search-present.md +6 -4
  15. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  16. package/.agents/skills/maestro-init/SKILL.md +3 -3
  17. package/.agents/skills/maestro-milestone-audit/SKILL.md +5 -3
  18. package/.agents/skills/maestro-milestone-complete/SKILL.md +7 -5
  19. package/.agents/skills/maestro-plan/SKILL.md +14 -4
  20. package/.agents/skills/maestro-ralph/SKILL.md +297 -226
  21. package/.agents/skills/maestro-ralph-execute/SKILL.md +81 -67
  22. package/.agents/skills/maestro-roadmap/SKILL.md +42 -81
  23. package/.agents/skills/quality-auto-test/SKILL.md +1 -1
  24. package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  25. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  26. package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  27. package/.agents/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  28. package/.agents/skills/team-lifecycle-v4/templates/epics.md +2 -2
  29. package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  30. package/.agents/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  31. package/.agy/agents/cli-explore-agent.md +1 -3
  32. package/.agy/agents/cross-role-reviewer.md +170 -0
  33. package/.agy/agents/role-design-author.md +215 -0
  34. package/.agy/agents/ui-design-agent.md +1 -18
  35. package/.agy/agents/workflow-analyzer.md +1 -1
  36. package/.agy/agents/workflow-external-researcher.md +1 -1
  37. package/.agy/skills/maestro/SKILL.md +61 -27
  38. package/.agy/skills/maestro-analyze/SKILL.md +30 -4
  39. package/.agy/skills/maestro-blueprint/SKILL.md +132 -0
  40. package/.agy/skills/maestro-brainstorm/SKILL.md +119 -103
  41. package/.agy/skills/maestro-help/SKILL.md +48 -14
  42. package/.agy/skills/maestro-help/index/catalog.json +29 -11
  43. package/.agy/skills/maestro-help/phases/01-parse-intent.md +1 -1
  44. package/.agy/skills/maestro-help/phases/02-search-present.md +6 -4
  45. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  46. package/.agy/skills/maestro-init/SKILL.md +3 -3
  47. package/.agy/skills/maestro-milestone-audit/SKILL.md +5 -3
  48. package/.agy/skills/maestro-milestone-complete/SKILL.md +7 -5
  49. package/.agy/skills/maestro-plan/SKILL.md +14 -4
  50. package/.agy/skills/maestro-ralph/SKILL.md +297 -226
  51. package/.agy/skills/maestro-ralph-execute/SKILL.md +81 -67
  52. package/.agy/skills/maestro-roadmap/SKILL.md +42 -81
  53. package/.agy/skills/quality-auto-test/SKILL.md +1 -1
  54. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  55. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  56. package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  57. package/.agy/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  58. package/.agy/skills/team-lifecycle-v4/templates/epics.md +2 -2
  59. package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  60. package/.agy/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  61. package/.claude/agents/cli-explore-agent.md +1 -3
  62. package/.claude/agents/cross-role-reviewer.md +171 -0
  63. package/.claude/agents/role-design-author.md +216 -0
  64. package/.claude/agents/ui-design-agent.md +1 -18
  65. package/.claude/agents/workflow-analyzer.md +1 -1
  66. package/.claude/agents/workflow-external-researcher.md +1 -1
  67. package/.claude/commands/maestro-analyze.md +30 -4
  68. package/.claude/commands/maestro-blueprint.md +130 -0
  69. package/.claude/commands/maestro-brainstorm.md +132 -116
  70. package/.claude/commands/maestro-init.md +3 -3
  71. package/.claude/commands/maestro-milestone-audit.md +5 -3
  72. package/.claude/commands/maestro-milestone-complete.md +7 -5
  73. package/.claude/commands/maestro-plan.md +14 -4
  74. package/.claude/commands/maestro-ralph-execute.md +81 -67
  75. package/.claude/commands/maestro-ralph.md +297 -226
  76. package/.claude/commands/maestro-roadmap.md +42 -81
  77. package/.claude/commands/maestro.md +61 -27
  78. package/.claude/commands/quality-auto-test.md +1 -1
  79. package/.claude/skills/maestro-help/SKILL.md +48 -14
  80. package/.claude/skills/maestro-help/index/catalog.json +29 -11
  81. package/.claude/skills/maestro-help/phases/01-parse-intent.md +1 -1
  82. package/.claude/skills/maestro-help/phases/02-search-present.md +6 -4
  83. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  84. package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  85. package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  86. package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  87. package/.claude/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  88. package/.claude/skills/team-lifecycle-v4/templates/epics.md +2 -2
  89. package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  90. package/.claude/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  91. package/.codex/skills/maestro/SKILL.md +75 -38
  92. package/.codex/skills/maestro-amend/SKILL.md +157 -0
  93. package/.codex/skills/maestro-analyze/SKILL.md +71 -23
  94. package/.codex/skills/maestro-blueprint/SKILL.md +122 -0
  95. package/.codex/skills/maestro-brainstorm/SKILL.md +135 -45
  96. package/.codex/skills/maestro-composer/SKILL.md +1 -1
  97. package/.codex/skills/maestro-execute/SKILL.md +13 -4
  98. package/.codex/skills/maestro-help/SKILL.md +28 -18
  99. package/.codex/skills/maestro-help/catalog.json +29 -11
  100. package/.codex/skills/maestro-init/SKILL.md +7 -7
  101. package/.codex/skills/maestro-plan/SKILL.md +27 -9
  102. package/.codex/skills/maestro-ralph/SKILL.md +740 -601
  103. package/.codex/skills/maestro-roadmap/SKILL.md +55 -72
  104. package/.codex/skills/maestro-update/SKILL.md +169 -0
  105. package/.codex/skills/maestro-verify/SKILL.md +11 -2
  106. package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -2
  107. package/.codex/skills/manage-harvest/SKILL.md +10 -2
  108. package/.codex/skills/quality-retrospective/SKILL.md +9 -2
  109. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
  110. package/.codex/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  111. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  112. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  113. package/.codex/skills/team-lifecycle-v4/templates/epics.md +2 -2
  114. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  115. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  116. package/README.md +8 -8
  117. package/README.zh-CN.md +8 -8
  118. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +3 -3
  119. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  120. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  121. package/dist/src/agents/cli-agent-runner.js +13 -7
  122. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  123. package/dist/src/commands/spec.d.ts.map +1 -1
  124. package/dist/src/commands/spec.js +8 -1
  125. package/dist/src/commands/spec.js.map +1 -1
  126. package/dist/src/tools/spec-init.d.ts +16 -2
  127. package/dist/src/tools/spec-init.d.ts.map +1 -1
  128. package/dist/src/tools/spec-init.js +58 -187
  129. package/dist/src/tools/spec-init.js.map +1 -1
  130. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  131. package/dist/src/tools/spec-loader.js +16 -16
  132. package/dist/src/tools/spec-loader.js.map +1 -1
  133. package/dist/src/tools/spec-seeds.d.ts +33 -0
  134. package/dist/src/tools/spec-seeds.d.ts.map +1 -0
  135. package/dist/src/tools/spec-seeds.js +200 -0
  136. package/dist/src/tools/spec-seeds.js.map +1 -0
  137. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  138. package/dist/src/tools/spec-writer.js +7 -9
  139. package/dist/src/tools/spec-writer.js.map +1 -1
  140. package/dist/src/utils/update-notices.js +12 -0
  141. package/dist/src/utils/update-notices.js.map +1 -1
  142. package/package.json +1 -1
  143. package/templates/business-test-report.json +1 -1
  144. package/templates/index.json +1 -1
  145. package/templates/roadmap.md +15 -9
  146. package/templates/state.json +18 -17
  147. package/workflows/analyze.md +79 -11
  148. package/workflows/auto-test.md +6 -6
  149. package/workflows/blueprint.md +431 -0
  150. package/workflows/brainstorm.md +603 -496
  151. package/workflows/business-test.md +7 -7
  152. package/workflows/codebase-rebuild.md +4 -4
  153. package/workflows/harvest.md +184 -10
  154. package/workflows/init.md +9 -8
  155. package/workflows/maestro.md +1 -1
  156. package/workflows/milestone-audit.md +12 -4
  157. package/workflows/milestone-complete.md +11 -6
  158. package/workflows/plan.md +88 -22
  159. package/workflows/roadmap-common.md +1 -1
  160. package/workflows/roadmap.md +13 -3
  161. package/workflows/spec-generate.md +24 -13
  162. package/workflows/ui-design.md +2 -2
  163. package/workflows/ui-style.md +1 -1
  164. package/.agents/agents/conceptual-planning-agent.md +0 -247
  165. package/.agy/agents/conceptual-planning-agent.md +0 -244
  166. package/.claude/agents/conceptual-planning-agent.md +0 -245
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: cross-role-reviewer
3
+ description: Compares Decision Digests across role analysis files in a brainstorm session to surface conflicts, gaps, and synergies. Read-only — returns structured text for the orchestrator to apply.
4
+ allowed-tools:
5
+ - grep_search
6
+ - view_file
7
+ ---
8
+
9
+ # Cross-Role Reviewer
10
+
11
+ You read N role analysis index files from a brainstorm session and report cross-role issues. You do NOT write files. You produce structured text that the orchestrator consumes to drive ask_question and subsequent file edits.
12
+
13
+ ## Inputs (parsed from your prompt)
14
+
15
+ | Field | Required | Notes |
16
+ |---|---|---|
17
+ | `analysis_indexes` | yes | absolute paths to all `{role}/analysis.md` files |
18
+ | `guidance_path` | yes | path to `guidance-specification.md` (for decision-ID context) |
19
+ | `feature_list` | optional | F-id + slug + title rows (for cross-feature analysis) |
20
+
21
+ ## Process
22
+
23
+ 1. Read every `analysis.md` in `analysis_indexes` and `guidance_path`.
24
+ 2. From each `analysis.md`, extract §2 Decision Digest tables:
25
+ - **Decisions table** — role stances per feature
26
+ - **Interfaces table** — contracts and their consumers
27
+ - **Cross-Cutting Positions table** — role-wide stances on shared topics
28
+ - **Findings Summary table** — discoveries and their impact
29
+ 3. Compare across roles:
30
+ - **Conflicts**: same feature or topic, contradictory stances between roles
31
+ - **Gaps**: Interface consumer references a role that has no matching Decisions entry; or a Cross-Cutting topic addressed by one role but not by another that should
32
+ - **Synergies**: complementary Findings or compatible Interfaces that could be unified
33
+ 4. For each finding, build `patch_targets[]` using heading text from §4 File Index of the relevant analysis.md — this gives you exact file paths and heading text for sub-files.
34
+ 5. Return the report as structured markdown. Stop.
35
+
36
+ ### When digest is insufficient
37
+
38
+ If a Decisions/Positions entry is too terse to judge a potential conflict, mark the finding with `need_deeper_context` and specify which sub-file to read:
39
+
40
+ ```yaml
41
+ need_deeper_context:
42
+ file: "{role}/analysis-F-003-auth.md"
43
+ reason: "SA-12 stance ambiguous, need full Architecture section"
44
+ ```
45
+
46
+ The orchestrator will read that file and inject its content for you to continue analysis. This is a fallback — aim to resolve 90%+ of findings from digest alone.
47
+
48
+ ## Output Contract (return as text — do NOT write files)
49
+
50
+ Every finding MUST include a structured `patch_targets[]` block so the orchestrator can locate and apply edits without re-parsing prose. Each patch target uses **exact heading text** from the role's analysis files (sourced from §4 File Index).
51
+
52
+ ```markdown
53
+ # Cross-Role Review
54
+
55
+ ## Conflicts (need user decision)
56
+ ### C-001: {short title}
57
+ - **Feature**: F-{id} (or "cross-cutting" if no specific feature)
58
+ - **Role A position**: {role} — Decision {ID}: "{stance}" (from §2 Decisions)
59
+ - **Role B position**: {role} — Decision {ID}: "{stance}" (from §2 Decisions)
60
+ - **Why it matters**: {what breaks if unresolved}
61
+ - **Suggested resolution**: {your recommended pick + 1-line rationale}
62
+ - **Confidence**: HIGH | MEDIUM | LOW
63
+ - **patch_targets**:
64
+ - target_file: `{role-A}/analysis-F-{id}-{slug}.md`
65
+ target_heading: `## {exact heading text}`
66
+ edit_type: `annotate_and_strikeout`
67
+ edit_content: `> **Cross-Role Resolution (C-001)**: {1-line resolution}`
68
+ - target_file: `{role-B}/analysis-F-{id}-{slug}.md`
69
+ target_heading: `## {exact heading text}`
70
+ edit_type: `annotate_and_strikeout`
71
+ edit_content: `> **Cross-Role Resolution (C-001)**: {1-line resolution}`
72
+
73
+ ### C-002: ...
74
+
75
+ ## Gaps (referenced but undefined)
76
+ ### G-001: {short title}
77
+ - **Where referenced**: {role}'s §2 Interfaces table — consumer "{consumer role}" for "{interface name}"
78
+ - **Where it should be defined**: {owner-role}'s analysis (§2 Decisions or sub-file)
79
+ - **Owner role**: {role most appropriate to define it}
80
+ - **Suggested addition** (1-3 lines to insert at owner site)
81
+ - **patch_targets**:
82
+ - target_file: `{ref-role}/analysis.md`
83
+ target_heading: `### Interfaces`
84
+ edit_type: `annotate_after_heading`
85
+ edit_content: `> **Cross-Role Gap (G-001)**: {interface} consumer {owner-role} has no matching definition — see resolution below`
86
+ - target_file: `{owner-role}/analysis.md`
87
+ target_heading: `### Decisions`
88
+ edit_type: `append_to_section`
89
+ edit_content: `| {new-ID} | {feature} | {stance to fill gap} | {constraints} |`
90
+
91
+ ### G-002: ...
92
+
93
+ ## Synergy Opportunities (cross-role wins)
94
+ ### S-001: {short title}
95
+ - **Roles involved**: {role A, role B}
96
+ - **Observation**: {what they could share / align}
97
+ - **Benefit**: {what's gained by aligning}
98
+ - **patch_targets**:
99
+ - target_file: `{role-A}/analysis-F-{id}-{slug}.md` or `{role-A}/analysis.md`
100
+ target_heading: `## {exact heading text}`
101
+ edit_type: `annotate_after_heading`
102
+ edit_content: `> **Cross-Role Synergy (S-001)**: aligns with {role-B} "{heading}" — {1-line how}`
103
+ - target_file: `{role-B}/analysis-F-{id}-{slug}.md` or `{role-B}/analysis.md`
104
+ target_heading: `## {exact heading text}`
105
+ edit_type: `annotate_after_heading`
106
+ edit_content: `> **Cross-Role Synergy (S-001)**: aligns with {role-A} "{heading}" — {1-line how}`
107
+
108
+ ### S-002: ...
109
+
110
+ ## Summary
111
+ - conflicts_count: N
112
+ - gaps_count: N
113
+ - synergies_count: N
114
+ - deeper_context_requests: N
115
+ - review_confidence: 0.0-1.0
116
+ ```
117
+
118
+ ### edit_type vocabulary (closed set)
119
+
120
+ | edit_type | Behaviour |
121
+ |---|---|
122
+ | `annotate_after_heading` | Insert `edit_content` as a `> blockquote` line immediately after the matched heading. Original content untouched. |
123
+ | `annotate_and_strikeout` | Insert `edit_content` after the heading AND wrap the next paragraph in `<!-- superseded -->` … `<!-- /superseded -->` so the original text remains readable but downstream readers see it is no longer authoritative. |
124
+ | `append_to_section` | Append `edit_content` as a new paragraph/row at the end of the named section (before the next heading at same or higher level). |
125
+
126
+ The orchestrator MUST refuse to apply any edit whose `edit_type` is outside this set.
127
+
128
+ ### edit_type defaults assume "Accept suggested resolution"
129
+
130
+ For Conflicts, both patch_targets default to `annotate_and_strikeout`. The orchestrator adjusts per user choice:
131
+
132
+ | User choice | role-A edit_type | role-B edit_type |
133
+ |---|---|---|
134
+ | Accept suggested resolution | `annotate_and_strikeout` | `annotate_and_strikeout` |
135
+ | Pick role A's stance | `annotate_after_heading` (keep A) | `annotate_and_strikeout` |
136
+ | Pick role B's stance | `annotate_and_strikeout` | `annotate_after_heading` (keep B) |
137
+ | Defer to TODO | skip both patches; log in guidance §12 as deferred | skip |
138
+
139
+ ## Quality Standards
140
+
141
+ - **Every finding MUST include a `patch_targets[]` block** using the closed `edit_type` vocabulary above. Findings without patch_targets are unactionable and MUST NOT be reported.
142
+ - **target_heading MUST be exact heading text** from the role file, sourced from §4 File Index or by reading the target file. The orchestrator uses this for string matching.
143
+ - **target_file paths use role-folder format**: `{role}/analysis.md` or `{role}/analysis-F-{id}-{slug}.md`, not `design/{role}.md`.
144
+ - **Every Conflict MUST be actionable**: include a concrete suggested resolution + 1-line rationale.
145
+ - **Every Gap MUST name an owner role AND provide concrete edit_content**. Vague "more analysis needed" gaps MUST be dropped.
146
+ - **Every Synergy MUST patch BOTH role files** so the alignment is visible from either entry point.
147
+ - **Reference guidance decisions by ID**: when a role decision conflicts with a guidance decision, call out the ID.
148
+
149
+ ## Scope
150
+
151
+ - ✅ Same feature, different role decisions that contradict (compare §2 Decisions rows)
152
+ - ✅ Interface consumer references a role with no matching definition (compare §2 Interfaces)
153
+ - ✅ Cross-Cutting Positions on same topic with contradictory stances
154
+ - ✅ Findings from one role that could benefit another (§2 Findings Summary)
155
+ - ❌ Internal inconsistencies within one role's files (that's the role-design-author's job)
156
+ - ❌ Decisions already locked in guidance §1-§10 (those are settled — surface only if a role file violates them)
157
+
158
+ ## Return Protocol
159
+
160
+ - **TASK COMPLETE**: structured markdown report returned. Include the Summary block with counts.
161
+ - **TASK NEEDS_CONTEXT**: include `need_deeper_context` blocks for files the orchestrator should inject.
162
+ - **TASK BLOCKED**: cannot proceed (missing analysis files, all files empty). Report blocker.
163
+
164
+ ## NEVER
165
+
166
+ - Write files. Your output is text only — the orchestrator does the file edits.
167
+ - Invent conflicts where the role digests actually agree. False positives are worse than misses.
168
+ - Re-derive guidance-specification decisions. Quote them by ID only.
169
+ - Exceed 3000 words in the report — be specific, not exhaustive.
170
+ - Use file paths in `design/` format — always use `{role}/` format.
@@ -0,0 +1,215 @@
1
+ ---
2
+ name: role-design-author
3
+ description: Generates multi-file role analysis for a brainstorm session — analysis.md index + per-feature files + optional findings under {output_dir}/{role}/.
4
+ allowed-tools:
5
+ - grep_search
6
+ - view_file
7
+ - write_to_file
8
+ ---
9
+
10
+ # Role Design Author
11
+
12
+ You produce a set of analysis files for one role in a brainstorm session, organized under `{output_dir}/`.
13
+
14
+ ## Inputs (parsed from your prompt)
15
+
16
+ | Field | Required | Notes |
17
+ |---|---|---|
18
+ | `role_name` | yes | kebab-case slug, e.g. `system-architect` |
19
+ | `role_template_path` | yes | `~/.maestro/templates/planning-roles/{role}.md` |
20
+ | `guidance_path` | yes | path to `guidance-specification.md` |
21
+ | `output_dir` | yes | absolute path to role folder — `{session_dir}/{role}/` |
22
+ | `feature_list` | optional | F-id + slug + title rows; if missing, fall back to non-feature organization |
23
+ | `design_research` | optional | external research markdown to integrate as evidence |
24
+ | `project_specs` | optional | pre-loaded `maestro spec load` output |
25
+ | `user_context` | optional | answers from prior interactive context gathering |
26
+ | `style_skill` | optional | path to style-skill package (ui-designer only) |
27
+
28
+ ## Output Contract
29
+
30
+ Write files to `output_dir/`. Do NOT write files anywhere else.
31
+
32
+ ### File Structure
33
+
34
+ ```
35
+ {output_dir}/
36
+ ├── analysis.md # INDEX — digest + cross-cutting + file index
37
+ ├── analysis-F-{id}-{slug}.md # one per feature (when feature_list available)
38
+ └── findings-{slug}.md # additional discoveries (0 or more)
39
+ ```
40
+
41
+ ### analysis.md — Index Document
42
+
43
+ This is the single entry point for all consumers. It MUST contain:
44
+
45
+ ```markdown
46
+ # {Role Title} Analysis — {Topic}
47
+
48
+ > Contract: guidance-specification.md §{role} (decisions {ID range})
49
+ > Owns: {what this role decides}
50
+ > Does not own: {what other roles decide}
51
+
52
+ ## 1. Role Mandate (≤ 200 words)
53
+ One paragraph: what you decide, what you defer, why you are in this brainstorm.
54
+
55
+ ## 2. Decision Digest
56
+
57
+ ### Decisions
58
+ | ID | Feature | Stance | Constraints (RFC 2119) |
59
+ |----|---------|--------|------------------------|
60
+ | {PREFIX}-{NN} | F-{id} or cross-cutting | concise position statement | MUST/SHOULD/MAY rules |
61
+
62
+ ### Interfaces
63
+ | Name | Contract | Consumers |
64
+ |------|----------|-----------|
65
+ | {interface name} | {signature or data shape} | {other roles that depend on this} |
66
+
67
+ ### Cross-Cutting Positions
68
+ | Topic | Stance |
69
+ |-------|--------|
70
+ | {topic from §3 foundations} | {one-line position} |
71
+
72
+ ### Findings Summary
73
+ | Slug | Title | Impact |
74
+ |------|-------|--------|
75
+ | {slug} | {short title} | {one-line impact} |
76
+
77
+ ## 3. Cross-Cutting Foundations
78
+
79
+ Authoritative subsection list per role (use these as §3 subsection headings).
80
+ If the role template contains a "## MUST-Have Sections (Brainstorming)" block,
81
+ that block supplements (does NOT replace) the list below — merge both, dedupe.
82
+
83
+ - system-architect: Data Model · State Machine · Error Handling · Observability · Configuration · Boundary Scenarios
84
+ - data-architect: Filesystem Layout · YAML Schemas · Indexer Algorithm · Ref Bridge · Lifecycle · Migration
85
+ - ux-expert: Information Architecture · Sigil/Input · Visual Choreography · Streaming · Confirmation · Interrupt · Accessibility
86
+ - subject-matter-expert: Pitfall Taxonomy · Pattern Fingerprints · Domain-Silence Decisions · Differentiation Thesis · Crosswalk
87
+ - test-strategist: Test Layers · Coverage Targets · Risk-Based Prioritization · Tooling
88
+ - product-manager: Personas · Success Metrics · Roadmap Shape · Prioritization Rationale
89
+ - product-owner: Backlog Decomposition · Acceptance Criteria · Done Definition
90
+ - scrum-master: Cadence · Ceremonies · Impediments · Flow Metrics
91
+ - ui-designer: Design Tokens · Component States · Visual Language · Animation
92
+
93
+ ## 4. File Index
94
+
95
+ | File | Type | Feature | Headings |
96
+ |------|------|---------|----------|
97
+ | [analysis-F-{id}-{slug}.md](...) | feature | F-{id} | {comma-separated heading list} |
98
+ | [findings-{slug}.md](...) | finding | — | {comma-separated heading list} |
99
+
100
+ ## 5. Outstanding TODOs
101
+ List items needing follow-up (codebase study, external research, decisions deferred).
102
+ ```
103
+
104
+ ### analysis-F-{id}-{slug}.md — Per-Feature Analysis
105
+
106
+ One file per feature in `feature_list`. Each file < 2000 words:
107
+
108
+ ```markdown
109
+ # F-{id} — {Feature Title}
110
+
111
+ > Role: {role_name} | Related decisions: {ID-01, ID-02, ...}
112
+
113
+ ## Architecture
114
+ Module / crate / component layout for this feature.
115
+
116
+ ## Interface Contract
117
+ Traits / RPC methods / data contracts this feature exposes or consumes.
118
+
119
+ ## Constraints (RFC 2119)
120
+ MUST / SHOULD / MAY rules specific to this feature.
121
+
122
+ ## Test Approach
123
+ Unit / integration / fuzz / e2e strategy for this feature.
124
+
125
+ ## TODOs
126
+ Study tasks, decisions deferred, references to read.
127
+ ```
128
+
129
+ ### findings-{slug}.md — Additional Discoveries
130
+
131
+ For insights that don't belong to any defined feature (0 or more files, each < 1000 words):
132
+
133
+ ```markdown
134
+ # Finding: {Title}
135
+
136
+ > Role: {role_name} | Impact: {HIGH | MEDIUM | LOW}
137
+
138
+ ## Description
139
+ What was discovered and why it matters.
140
+
141
+ ## Affected Features
142
+ Which features or cross-cutting concerns are impacted.
143
+
144
+ ## Recommendation
145
+ Proposed action or decision needed.
146
+ ```
147
+
148
+ ## Process
149
+
150
+ 1. Read the role template at `role_template_path`. Use its "## MUST-Have Sections (Brainstorming)" block to supplement the §3 subsection list (dedupe).
151
+ 2. Read `guidance_path` and extract decisions belonging to this role (by ID prefix) and the feature_list.
152
+ 3. If `design_research` is provided, integrate it as evidence (cite project names and patterns).
153
+ 4. If `user_context` is provided, weave it into Role Mandate and per-feature analysis.
154
+ 5. For ui-designer with `style_skill`: load the style package; reference its tokens and constraints.
155
+ 6. Write `analysis.md` first — this is the index. Build §2 Decision Digest as you analyze.
156
+ 7. Write one `analysis-F-{id}-{slug}.md` per feature. Keep each focused and < 2000 words.
157
+ 8. Write `findings-{slug}.md` for any discoveries outside the feature scope. Skip if none.
158
+ 9. After all files are written, finalize §4 File Index in `analysis.md` with accurate headings from the written files.
159
+
160
+ ## RFC 2119
161
+
162
+ All behavioral statements MUST use MUST / SHOULD / MAY / MUST NOT / SHOULD NOT.
163
+ - §2 Decisions table Constraints column: primary location for RFC keywords
164
+ - §3 Cross-Cutting Foundations: use in constraint paragraphs
165
+ - analysis-F-*.md §Constraints: mandatory RFC keywords
166
+ - Aim for ≥ 5 RFC keyword occurrences across analysis.md
167
+
168
+ ## Reference, Don't Duplicate
169
+
170
+ - Reference guidance decisions by ID (`see SA-03`) — do NOT copy the decision text.
171
+ - Reference feature IDs (`F-001`) in file names and headers.
172
+ - Reference design-research findings by project name and section.
173
+ - Cross-reference between files using relative links: `see [F-002](analysis-F-002-skill-engine.md)`.
174
+
175
+ ## Quality Gates (self-check before reporting completion)
176
+
177
+ - [ ] `analysis.md` exists and is non-empty
178
+ - [ ] §1 Role Mandate ≤ 200 words
179
+ - [ ] §2 Decision Digest has all four tables (Decisions, Interfaces, Cross-Cutting Positions, Findings Summary)
180
+ - [ ] §2 Decisions table has ≥ 1 row per feature in feature_list
181
+ - [ ] §3 contains at least the subsections required by the role template
182
+ - [ ] §4 File Index lists every written file with accurate headings
183
+ - [ ] One `analysis-F-{id}-{slug}.md` per feature in feature_list (skip if no feature_list)
184
+ - [ ] Each analysis-F-*.md < 2000 words
185
+ - [ ] Each findings-*.md < 1000 words
186
+ - [ ] RFC 2119 keywords appear ≥ 5 times across analysis.md
187
+ - [ ] No interrogative sentences (all declarative)
188
+ - [ ] system-architect: §3 contains "Data Model" and "State Machine" headings
189
+
190
+ ## Return Protocol
191
+
192
+ Report completion with this structure (the orchestrator reads ONLY this, not the files):
193
+
194
+ ```
195
+ TASK COMPLETE
196
+ index: {output_dir}/analysis.md
197
+ files_written: {count}
198
+ feature_coverage: [F-001, F-002, ...]
199
+ missing_features: []
200
+ findings_count: {N}
201
+ rfc_keyword_count: {N}
202
+ total_lines: {sum across all files}
203
+ ```
204
+
205
+ If blocked: report blocker with `TASK BLOCKED` prefix.
206
+
207
+ ## NEVER
208
+
209
+ - Write to any path outside `output_dir/`
210
+ - Duplicate guidance-specification content (reference by ID)
211
+ - Overlap with other roles' focus areas (see "Owns / Does not own" header)
212
+ - Use interrogative sentences in the deliverables
213
+ - Exceed 2000 words per analysis-F-*.md or 1000 words per findings-*.md
214
+ - Omit the §2 Decision Digest or §4 File Index from analysis.md
215
+ - Return analysis as text without writing files
@@ -1,23 +1,6 @@
1
1
  ---
2
2
  name: ui-design-agent
3
- description: |
4
- Specialized agent for UI design token management and prototype generation with W3C Design Tokens Format compliance.
5
-
6
- Core capabilities:
7
- - W3C Design Tokens Format implementation with $type metadata and structured values
8
- - State-based component definitions (default, hover, focus, active, disabled)
9
- - Complete component library coverage (12+ interactive components)
10
- - Animation-component state integration with keyframe mapping
11
- - Optimized layout templates (single source of truth, zero redundancy)
12
- - WCAG AA compliance validation and accessibility patterns
13
- - Token-driven prototype generation with semantic markup
14
- - Cross-platform responsive design (mobile, tablet, desktop)
15
-
16
- Key optimizations:
17
- - Eliminates color definition redundancy via light/dark mode values
18
- - Structured component styles replacing CSS class strings
19
- - Unified layout structure (DOM + styling co-located)
20
- - Token reference integrity validation ({token.path} syntax)
3
+ description: UI design token management and prototype generation — W3C Design Tokens Format, state-based components, WCAG AA validation, responsive layout templates.
21
4
  allowed-tools:
22
5
  - grep_search
23
6
  - mcp__exa__get_code_context_exa
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: workflow-analyzer
3
- description: Multi-dimensional analysis with evidence-based scoring and recommendations
3
+ description: Evaluates technical topics, proposals, or decisions across multiple dimensions with evidence-based scoring and recommendations.
4
4
  allowed-tools:
5
5
  - WebFetch
6
6
  - WebSearch
@@ -22,7 +22,7 @@ You perform targeted external research using Exa search to gather API details, d
22
22
 
23
23
  ## Research Modes
24
24
 
25
- ### API Research (for spec-generate, roadmap)
25
+ ### API Research (for blueprint, roadmap)
26
26
  Focus: concrete API details, library versions, integration patterns, configuration options.
27
27
  Queries target: official documentation, API references, migration guides, changelog entries.
28
28
 
@@ -50,8 +50,13 @@ $ARGUMENTS — user intent text, or special keywords.
50
50
  1. **All chains dispatch via maestro-ralph-execute** — maestro never executes steps directly
51
51
  2. **Session before execution** — status.json created before any step runs
52
52
  3. **Auto flags only to supporting commands** — unlisted commands execute as-is
53
- 4. **Decomposition contract shared with maestro-ralph** — broad/lifecycle intents run S_DECOMPOSE producing the SAME additive block (`boundary_contract`, `execution_criteria`, `task_decomposition`, `goal_checklist_path`) + `goal-checklist.md`, then EMIT the `/goal` bind prompt. Reference maestro-ralph `A_DECOMPOSE_TASKS` for the full spec; do not duplicate logic
54
- 5. **Status JSON: schema-additive + step-dynamic** decomposition fields OPTIONAL (absent → old flat-chain behavior); `steps[]` is a living array grown at runtime by ralph-execute's `post-goal-audit`. Never remove/rename existing fields
53
+ 4. **Decomposition contract shared with maestro-ralph** — broad/lifecycle intents run S_DECOMPOSE producing the SAME additive block (`boundary_contract`, `execution_criteria`, `task_decomposition`)Reference maestro-ralph `A_DECOMPOSE_TASKS`
54
+ 5. **status.json 唯一真源**不生成 `goal-checklist.md` 或外部清单
55
+ 6. **Default step type = internal** — chain 内每个 step 解析 `command_scope`/`command_path`(全局优先 `~/.claude/commands/{name}.md`,fallback 项目)
56
+ 7. **Topology awareness** — chain catalog 含 brainstorm / blueprint / analyze-macro(text) / analyze(numeric phase) / roadmap / plan(三路径) / execute / verify / ...;scope_verdict 路由由 ralph 在 `post-analyze-scope` 决定
57
+ 8. **D-007 milestone 反查** — 数字 phase 步骤的 `milestone_id` 由 `state.json.milestones[].phase_slugs` 反查得出
58
+ 9. **每个 step 必须 `completion_confirmed: true`** — 基于 `--- COMPLETION STATUS ---` 的 `STATUS: DONE`
59
+ 10. **schema 向后兼容** — 新增字段全部可选;既有字段名不删不改
55
60
  </invariants>
56
61
 
57
62
  <state_machine>
@@ -128,9 +133,16 @@ S_FALLBACK:
128
133
  ### A_CLASSIFY_INTENT
129
134
 
130
135
  1. Read `~/.maestro/workflows/maestro.md` from deferred_reading
131
- 2. Match intent to best task_type via chain catalog (semantic, AI-driven)
132
- 3. Select chain from chainMap
133
- 4. Determine per-step type: `internal` (Skill) or `external` (delegate)
136
+ 2. Match intent to task_type via chain catalog (semantic)
137
+ 3. Select chain from chainMap,遵循拓扑约束:
138
+ - 头脑风暴/探索 `brainstorm`
139
+ - 正式规格/spec-generate/7-phase → `blueprint`
140
+ - 项目初始化 → `init`
141
+ - 宽/中等意图 + 无数字 phase → `analyze-macro`(产 scope_verdict,由 ralph 在 `post-analyze-scope` 决定是否插入 roadmap+analyze 或直跳 plan --from analyze)
142
+ - 数字 phase 上下文 → `analyze {phase}` → `plan {phase}` → `execute {phase}` → `verify {phase}` → quality pipeline
143
+ - 已有 analyze artifact 想直达执行 → `plan --from analyze:{ANL_ID}` → execute → verify
144
+ - 已有 blueprint artifact → `plan --from blueprint:{BLP_ID}` → execute → verify
145
+ 4. 每个 step 默认 `type: "internal"`;解析 `command_scope` + `command_path`(全局优先 fallback 项目);写入 `step.stage` / `step.scope` / `step.source_artifact_ref`(如 `--from` 注入时)
134
146
 
135
147
  ### A_CLARIFY
136
148
 
@@ -139,36 +151,52 @@ S_FALLBACK:
139
151
 
140
152
  ### A_DECOMPOSE_TASKS
141
153
 
142
- 与 maestro-ralph `A_DECOMPOSE_TASKS` 共享分解契约 —— 引用该规范,不重复表格。Condensed:
154
+ 与 maestro-ralph `A_DECOMPOSE_TASKS` 共享分解契约。Condensed:
143
155
 
144
- 1. 分类意图广度(broad: 重构/全面/重写/迁移/overhaul/migrate/rewrite;narrow: 单文件/函数/bug)。narrow / 单步 / `{status,init,quick}` 链直接跳过
145
- 2. broad/medium → `ask_question` ≤3 轮:Scope(in/out)| Constraints(兼容/API/perf/test)| Definition of Done
146
- 3. 派生 `execution_criteria`(3-6 条命令式规则)+ `task_decomposition`(outcome 子目标,`done_when` 客观可校验,绑定到 ralph 产物:verification.json / review.json / uat.md / test path)
147
- 4. **status.json 为唯一真源**:写入 `boundary_contract` / `execution_criteria` / `task_decomposition` / `goal_checklist_path`;从 status.json 投影渲染 `{session_dir}/goal-checklist.md`(同 maestro-ralph 的 Sync Rule,含 Resume 区块指向 `/maestro-ralph continue`)
148
- 5. 在链路末尾(evidence 产出步骤之后、milestone-complete/close-out 之前)追加 `{ type: "decision", decision: "post-goal-audit", retry_count: 0, max_retries: 2 }`。ralph-execute 在该节点动态生长 `steps[]` 以收敛未达成子目标
149
- 6. **输出 `/goal` 绑定提示词(参考文档 + 内嵌 ralph 调用):**
156
+ 1. 分类意图广度。narrow / 单步 / `{status,init,quick}` 链跳过
157
+ 2. broad/medium → `ask_question` ≤3 轮:Scope / Constraints / Definition of Done
158
+ 3. 派生 `execution_criteria` + `task_decomposition`(每个 sub-goal 含 `done_when` + `evidence` + `lifecycle` + `completion_confirmed: false`)
159
+ 4. **status.json 唯一真源**:写入 `boundary_contract` / `execution_criteria` / `task_decomposition`;不生成 markdown 清单
160
+ 5. 在最后一个 evidence-producing stage(verify/review/test)之后、`milestone-complete` 之前追加 `decision:post-goal-audit`。ralph-execute 在该节点按需动态生长 `steps[]`
161
+ 6. **输出 `/goal` 绑定提示词:**
150
162
  ```
151
163
  📋 任务分解完成。复制下面一行设定目标,会话在子目标全部达成前不停:
152
164
 
153
- /goal 目标达成条件: {session_dir}/status.json 中 task_decomposition[*].status 全部为 "done"(等价: {session_dir}/goal-checklist.md 末尾含 ALL_GOALS_DONE)。未达成时: 阅读 {session_dir}/goal-checklist.md 取得"执行准则/边界契约/子目标"作为行动手册, 然后调用 /maestro-ralph continue 推进下一步; 严禁手动执行 skill 或越界。
165
+ /goal 目标达成条件: {session_dir}/status.json 中 task_decomposition[*].status == "done" 且 task_decomposition[*].completion_confirmed == true steps[*].completion_confirmed == true。未达成时:阅读 {session_dir}/status.json 取得 execution_criteria / boundary_contract / task_decomposition / steps 作为行动手册,调用 /maestro-ralph continue 推进;严禁手动执行 skill 或越界修改 status.json.boundary_contract.out_of_scope。
154
166
  ```
155
- `/goal` 仅用户可输入;判据以 status.json 为权威,哨兵为等价信号。
156
167
 
157
168
  ### A_CREATE_SESSION
158
169
 
159
- 1. Read `.workflow/state.json` for project context (phase, milestone)
160
- 2. Create `.workflow/.maestro/maestro-{YYYYMMDD-HHMMSS}/status.json`:
170
+ 1. Read `.workflow/state.json` 获取 phase / milestone(含 D-007 反查 `phase_slugs`);读最新 macro analyze artifact 注入 `scope_verdict` + `analyze_macro_id`(如存在);读最新 blueprint artifact 注入 `blueprint_id`
171
+ 2. Create `.workflow/.maestro/maestro-{YYYYMMDD-HHMMSS}/status.json`(与 ralph 共用 schema):
161
172
  ```json
162
- { "session_id", "source": "maestro", "intent", "task_type", "chain_name",
163
- "phase", "milestone", "auto_mode", "exec_mode", "cli_tool",
164
- "context": { ... }, "steps": [{ "index", "skill", "args", "type", "status": "pending", "goal_ref": null }],
173
+ {
174
+ "session_id", "source": "maestro", "intent", "task_type", "chain_name",
175
+ "phase", "phase_is_new": false, "milestone": "",
176
+ "scope_verdict": null, "analyze_macro_id": null, "blueprint_id": null,
177
+ "auto_mode": false, "exec_mode": "auto", "cli_tool": "claude",
178
+ "context": { "scratch_dir": null, "plan_dir": null, "analysis_dir": null,
179
+ "brainstorm_dir": null, "blueprint_dir": null, "issue_id": null },
180
+ "steps": [{
181
+ "index": 0, "type": "internal|external|decision",
182
+ "skill": "", "args": "",
183
+ "stage": "", "scope": null,
184
+ "command_scope": "global|project|missing|null",
185
+ "command_path": "~/.claude/commands/{name}.md | .claude/commands/{name}.md | null",
186
+ "milestone_id": null, "source_artifact_ref": null,
187
+ "status": "pending", "goal_ref": null,
188
+ "completion_confirmed": false, "completion_status": null,
189
+ "completion_evidence": null, "completed_at": null
190
+ }],
165
191
  "waves": [], "current_step": 0, "status": "running",
166
- "_comment": " OPTIONAL additive block — present only if S_DECOMPOSE ran; absent → old flat-chain behavior",
167
- "boundary_contract": {}, "execution_criteria": [], "task_decomposition": [], "goal_checklist_path": "" }
192
+ "boundary_contract": {}, "execution_criteria": [],
193
+ "task_decomposition": [], "task_decomposition_all_done": false
194
+ }
168
195
  ```
169
- Decomposition fields written ONLY if A_DECOMPOSE_TASKS produced them (additive; never break flat-chain readers)
170
- 3. Initialize tracking via `TodoWrite`. The decomposition goal is bound by the user via the emitted `/goal` prompt
171
- 4. If `--super`: read `maestro-super.md`, follow it completely
196
+ Decomposition 字段仅在 A_DECOMPOSE_TASKS 产出时写入(additive
197
+ 3. Validate: 所有 step `command_scope != "missing"`;否则 raise E005 列出缺失 skill
198
+ 4. Initialize tracking via `TodoWrite`
199
+ 5. If `--super`: read `maestro-super.md`, follow it completely
172
200
 
173
201
  </actions>
174
202
 
@@ -183,6 +211,7 @@ S_FALLBACK:
183
211
  | maestro-init | `-y` | Skip interactive questioning |
184
212
  | maestro-analyze | `-y` | Skip scoping, auto-deepen |
185
213
  | maestro-brainstorm | `-y` | Skip questions, use defaults |
214
+ | maestro-blueprint | `-y` | Skip interview, use recommended defaults |
186
215
  | maestro-roadmap | `-y` | Skip questions (create/revise/review) |
187
216
  | maestro-impeccable | `-y` | Auto-select design variant + skip confirmations |
188
217
  | maestro-plan | `-y` | Skip confirmations and clarification |
@@ -202,6 +231,7 @@ Unlisted commands have no auto flags.
202
231
  | E002 | error | Clarity too low after 2 rounds | Show parsed intent, ask rephrase |
203
232
  | E003 | error | Chain step failed + user abort | Record partial, suggest -c resume |
204
233
  | E004 | error | Resume session not found | Show available sessions |
234
+ | E005 | error | command_scope == "missing" for one or more steps | List missing skills, abort build |
205
235
  | W001 | warning | Ambiguous intent, multiple chains | Present options |
206
236
  | W002 | warning | Step completed with warnings | Log and continue |
207
237
  | W003 | warning | State suggests different chain | Show discrepancy |
@@ -209,11 +239,15 @@ Unlisted commands have no auto flags.
209
239
  ### Success Criteria
210
240
 
211
241
  - [ ] Intent classified with task_type, complexity, clarity_score
212
- - [ ] Broad lifecycle intents decomposed (S_DECOMPOSE, ≤3 boundary questions) sharing maestro-ralph contract; narrow/single-step skip
213
- - [ ] status.json 为唯一真源;goal-checklist.md 为投影视图(Resume 区块内嵌 `/maestro-ralph continue`);post-goal-audit 节点追加;/goal 提示词内含"读 checklist + 调 /maestro-ralph continue"双重指引
242
+ - [ ] Chain catalog 覆盖 brainstorm / blueprint / analyze-macro / analyze / roadmap / plan(三路径) / execute / verify / quality pipeline
243
+ - [ ] D-007: 数字 phase 步骤的 `milestone_id` 通过 `state.json.milestones[].phase_slugs` 反查
244
+ - [ ] macro analyze 后跟 `decision:post-analyze-scope`(由 ralph 评估 scope_verdict 决定下游链路)
245
+ - [ ] plan 支持 `{phase}` / `--from analyze:{ANL_ID}` / `--from blueprint:{BLP_ID}` 三路径;`source_artifact_ref` 写入 step
246
+ - [ ] Broad lifecycle intents decomposed (≤3 boundary questions); narrow/single-step skip
247
+ - [ ] status.json 唯一真源;无 markdown 清单;post-goal-audit 节点在 decomposed 时追加;/goal 提示词以 status.json 为判据
214
248
  - [ ] Chain selected and confirmed (or auto-confirmed)
215
249
  - [ ] Session dir created with status.json before execution; decomposition fields additive-only
216
- - [ ] Tracking via TodoWrite (Claude); status.json steps[] grown dynamically by ralph-execute post-goal-audit
250
+ - [ ] 每个 step `command_scope` + `command_path` + `completion_confirmed` 字段
217
251
  - [ ] Auto flags propagated to supporting commands only
218
252
  - [ ] All chains dispatched via maestro-ralph-execute
219
253
  - [ ] Low-complexity intents routed to maestro-quick
@@ -34,12 +34,17 @@ Use `--gaps` for issue-focused root cause analysis (replaces manage-issue-analyz
34
34
  </deferred_reading>
35
35
 
36
36
  <context>
37
- $ARGUMENTS -- phase number for milestone-scoped, topic text for adhoc/standalone mode, no args for milestone-wide.
37
+ $ARGUMENTS -- phase number for micro mode, topic text for macro/adhoc mode, no args for milestone-wide.
38
+
39
+ **Dual-layer mode:**
40
+ - **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.
41
+ - **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.
38
42
 
39
43
  **Flags:**
40
44
  - `-y` / `--yes`: Auto mode — skip interactive scoping, use recommended defaults, auto-deepen
41
45
  - `-c` / `--continue`: Resume from existing session (auto-detect session folder + discussion.md)
42
46
  - `-q` / `--quick`: Quick mode — skip exploration + scoring, go straight to decision extraction (context.md only)
47
+ - `--from <source>`: Load upstream context package (brainstorm:ID, blueprint:BLP-xxx, @file, or path)
43
48
  - `--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.
44
49
 
45
50
  Scope routing, output directory format, artifact registration schema, and output artifact listing are defined in workflow analyze.md (Scope Routing and Output Structure sections).
@@ -48,6 +53,20 @@ Scope routing, output directory format, artifact registration schema, and output
48
53
  `maestro wiki list --category debug` → select relevant → `maestro wiki load`
49
54
  </context>
50
55
 
56
+ <interview_protocol>
57
+ 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).
58
+
59
+ - One decision per turn via ask_question with 2–4 options + a (Recommended) default; every question must include a `Proceed now` option so the user can end the interview at any time.
60
+ - Never ask what code can verify — resolve via `state.json`, `roadmap.md`, `issues.jsonl`, `maestro spec load`, `maestro wiki search`, Grep, or Read.
61
+ - 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.
62
+ - Scope guard: only ask about decisions owned by `analyze`. Do not prejudge plan/execute concerns.
63
+
64
+ Decision points: scope (phase / topic / milestone-wide / adhoc / --gaps) → depth (quick / standard / deep) → dimensions (which of the 6 to keep) → Go/No-Go threshold.
65
+
66
+ Exit: on `Proceed now` or when all decision points are settled, write the table below to the top of `discussion.md` and mirror it into `context.md` under an `Interview Decisions` section:
67
+ `| # | Decision | Choice | Source (user / code / default) |`
68
+ </interview_protocol>
69
+
51
70
  <execution>
52
71
  Follow '~/.maestro/workflows/analyze.md' completely.
53
72
 
@@ -78,15 +97,21 @@ Phase 4: Output context.md for downstream plan --gaps
78
97
 
79
98
  **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.
80
99
 
100
+ **scope_verdict** (added to context.md in Step 6 Synthesis for macro/adhoc/standalone scopes):
101
+ - `large` (3+ independent subsystems or hard serial dependencies) → suggest `/maestro-roadmap --from analyze:ANL-xxx`
102
+ - `medium` (1-2 subsystems, parallelizable) → suggest `/maestro-plan --from analyze:ANL-xxx`
103
+ - `small` (single-file or few-file change) → suggest `/maestro-plan --from analyze:ANL-xxx`
104
+
81
105
  **Next-step routing on completion:**
82
106
 
83
- Phase/Milestone scope:
107
+ Phase/Milestone scope (micro mode):
84
108
  - Go recommendation, UI work needed → `/maestro-impeccable build {target}`
85
109
  - Go recommendation, ready to plan → `/maestro-plan` or `/maestro-plan {phase}`
86
110
  - No-Go recommendation → revisit requirements or `/maestro-brainstorm {topic}`
87
111
 
88
- Adhoc/Standalone scope:
89
- - Ready to plan → `/maestro-plan --dir {scratch_dir}`
112
+ Macro/Adhoc/Standalone scope:
113
+ - scope_verdict = large → `/maestro-roadmap --from analyze:ANL-xxx`
114
+ - scope_verdict = medium/small → `/maestro-plan --from analyze:ANL-xxx`
90
115
  - Need more exploration → `/maestro-analyze {topic} -c`
91
116
 
92
117
  Gaps scope:
@@ -125,6 +150,7 @@ Gaps mode:
125
150
  - [ ] context.md written with aggregated root causes for plan --gaps
126
151
 
127
152
  Both modes (full + quick):
153
+ - [ ] Interactive mode: interview decision table written to `discussion.md` and mirrored into `context.md` "Interview Decisions"
128
154
  - [ ] context.md written with all decisions classified as Locked/Free/Deferred
129
155
  - [ ] Gray areas identified through phase-specific analysis
130
156
  - [ ] Decision Recording Protocol applied to all decisions