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
@@ -42,13 +42,13 @@ $ARGUMENTS 匹配关键词 → 路由到对应模式:
42
42
 
43
43
  | 字段 | 内容 |
44
44
  |------|------|
45
- | `commands[]` | 55 个 slash 命令(name, command, category, description, source) |
45
+ | `commands[]` | 56 个 slash 命令(name, command, category, description, source) |
46
46
  | `skills[]` | 10 个 Skill(name, category, description, source) |
47
47
  | `agents[]` | 22 个 Agent(name, category, description) |
48
48
  | `cli_commands[]` | 21 个终端命令(command, description, category) |
49
49
  | `guide_files[]` | 17 个 Guide 文档索引 |
50
50
  | `essential_commands[]` | 10 个核心命令 |
51
- | `workflows` | 4 大工作流模板(main_pipeline, quick, issue_loop, init_paths) |
51
+ | `workflows` | 拓扑 + 6 条合法路径 (Path A-F) + 3 个辅助流程 |
52
52
 
53
53
  ## Project State Detection
54
54
 
@@ -96,7 +96,7 @@ Mode 3 (Smart Recommendations) 需要检测项目状态:
96
96
 
97
97
  Guide 映射:
98
98
  - analyze/plan/execute/verify → `guide/command-usage-guide.md`
99
- - init/roadmap → `guide/quick-start-guide.md`
99
+ - init/roadmap/blueprint → `guide/quick-start-guide.md`
100
100
  - ralph → `guide/maestro-ralph-guide.md`
101
101
  - maestro (协调器) → `guide/maestro-coordinator-guide.md`
102
102
  - delegate → `guide/delegate-async-guide.md`
@@ -109,9 +109,11 @@ Guide 映射:
109
109
  | 当前状态 | 推荐命令 | 原因 |
110
110
  |---------|---------|------|
111
111
  | 无 .workflow/ | `/maestro-init` | 项目未初始化 |
112
- | init 完成,无 roadmap | `/maestro-roadmap` | 需要路线图 |
113
- | roadmap 完成 | `/maestro-analyze` | 开始分析 |
114
- | analyze 完成 | `/maestro-plan` | 进入规划 |
112
+ | init 完成,无上游 context | `/maestro-brainstorm` 或 `/maestro-analyze "topic"` | 先探索再规划;brainstorm 发散,analyze 宏观探索影响面 |
113
+ | analyze 完成,scope_verdict=large | `/maestro-roadmap --from analyze:ANL-xxx` | 大范围需求,需要 Milestone > Phase 分解 |
114
+ | analyze 完成,scope_verdict=medium/small | `/maestro-plan --from analyze:ANL-xxx` | 跳过 roadmap 直达规划(Path C) |
115
+ | roadmap 完成,phase=pending | `/maestro-analyze 1` | 微观分析:Phase 级深入探索 |
116
+ | analyze (微观) 完成 | `/maestro-plan 1` | Phase 级规划 |
115
117
  | plan 完成 | `/maestro-execute` | 开始执行 |
116
118
  | execute 完成 | `/maestro-verify` | 验证成果 |
117
119
  | verify 有 gaps | `/maestro-analyze --gaps` | 重新分析 |
@@ -123,16 +125,24 @@ Guide 映射:
123
125
 
124
126
  根据任务类型推荐工作流和命令序列:
125
127
 
126
- **新项目**:
127
- - 最简: `/maestro-init` → `/maestro-roadmap "目标" -y`
128
- - 头脑风暴: `/maestro-brainstorm "描述"` → `/maestro-init --from-brainstorm ANL-xxx`
129
- - 完整规范: `/maestro-init` → `/maestro-spec-generate`
128
+ **Path A — 完整新项目**:
129
+ - `brainstorm` `blueprint`(可选)`analyze "topic"`(宏观) `roadmap` → `analyze 1`(微观) → `plan 1` → `execute` → `verify`
130
130
 
131
- **功能开发**:
132
- - 标准: analyze → plan → execute → verify
131
+ **Path B — 旧项目大功能**:
132
+ - `analyze "feature X"`(宏观) → `roadmap` → `analyze 1`(微观) `plan 1` `execute``verify`
133
+
134
+ **Path C — 中等功能(跳过 roadmap)**:
135
+ - `analyze "feature X"` → `plan --from analyze:ANL-xxx` → `execute` → `verify`
136
+
137
+ **Path D — 小改动**:
138
+ - `plan "fix auth bug"` → `execute` → `verify`
133
139
  - 快速: `/maestro-quick "功能描述"`
134
140
  - 全自动: `/maestro -y "功能描述"`
135
141
 
142
+ **Path E/F — 纯文档/纯探索**:
143
+ - `blueprint "project idea"` → (供人阅读)
144
+ - `brainstorm "idea"` → (供人决策)
145
+
136
146
  **Bug 修复**:
137
147
  - 快速: `/maestro-quick "Bug 描述"`
138
148
  - Issue 闭环: discover → create → analyze --gaps → plan --gaps → execute → close
@@ -149,14 +159,14 @@ Guide 映射:
149
159
  |------|------|---------|
150
160
  | `/maestro` | 智能协调器 | 不确定用哪个命令时 |
151
161
  | `/maestro-init` | 初始化项目 | 首次使用 |
152
- | `/maestro-roadmap` | 路线图 | 初始化后规划 |
153
- | `/maestro-analyze` | 分析 | 开始 Phase 分析 |
154
- | `/maestro-plan` | 规划 | 分析完成后 |
162
+ | `/maestro-brainstorm` | 头脑风暴 | 新项目发散探索、多角色创意 |
163
+ | `/maestro-blueprint` | 规格文档化 | 正式 7-phase 收敛规格链 |
164
+ | `/maestro-analyze` | 双层分析 | 宏观: `"topic"` 探索影响面;微观: `1` Phase 级深入 |
165
+ | `/maestro-roadmap` | 路线图编排 | scope_verdict=large 时,Milestone > Phase 分解 |
166
+ | `/maestro-plan` | 规划 | 分析完成后,支持 `--from analyze:ANL-xxx` 直达 |
155
167
  | `/maestro-execute` | 执行 | 计划完成后 |
156
168
  | `/maestro-verify` | 验证 | 执行完成后 |
157
169
  | `/maestro-quick` | 快速任务 | 简单任务跳过管线 |
158
- | `/quality-review` | 代码审查 | 执行后质量检查 |
159
- | `/manage-issue` | Issue 管理 | 追踪和解决 Bug |
160
170
 
161
171
  快速上手路径:
162
172
  1. `maestro install --force`
@@ -175,7 +185,7 @@ Guide 映射:
175
185
 
176
186
  - **Workflow (15)**: analyzer, planner, executor, verifier, reviewer, debugger, research-agent, roadmapper, plan-checker, phase-researcher, project-researcher, research-synthesizer, codebase-mapper, nyquist-auditor, integration-checker, external-researcher, collab-planner
177
187
  - **Team (2)**: supervisor, worker
178
- - **Planning (1)**: conceptual-planning-agent
188
+ - **Brainstorm (2)**: role-design-author, cross-role-reviewer
179
189
  - **CLI (1)**: cli-explore-agent
180
190
  - **UI (1)**: ui-design-agent
181
191
 
@@ -7,10 +7,11 @@
7
7
  "commands": [
8
8
  {"name": "maestro", "command": "/maestro", "category": "core", "description": "智能协调器 — 根据意图和项目状态自动选择最优命令链", "source": "../../commands/maestro.md"},
9
9
  {"name": "maestro-init", "command": "/maestro-init", "category": "core", "description": "项目初始化 — 创建 .workflow/ 目录结构和状态文件", "source": "../../commands/maestro-init.md"},
10
- {"name": "maestro-roadmap", "command": "/maestro-roadmap", "category": "core", "description": "路线图生成基于目标创建里程碑和 Phase 分解", "source": "../../commands/maestro-roadmap.md"},
11
- {"name": "maestro-brainstorm", "command": "/maestro-brainstorm", "category": "core", "description": "多角色头脑风暴生成分析文档和功能规格", "source": "../../commands/maestro-brainstorm.md"},
12
- {"name": "maestro-analyze", "command": "/maestro-analyze", "category": "pipeline", "description": "多维度分析Phase 分析、CLI 辅助探索、gap 分析", "source": "../../commands/maestro-analyze.md"},
13
- {"name": "maestro-plan", "command": "/maestro-plan", "category": "pipeline", "description": "任务规划生成执行计划、碰撞检测、gap 修复计划", "source": "../../commands/maestro-plan.md"},
10
+ {"name": "maestro-roadmap", "command": "/maestro-roadmap", "category": "core", "description": "路线图编排消费上游 context,纯 Milestone > Phase 分解(不做技术探索)", "source": "../../commands/maestro-roadmap.md"},
11
+ {"name": "maestro-brainstorm", "command": "/maestro-brainstorm", "category": "core", "description": "头脑风暴发散探索,多角色创意,上游起源命令", "source": "../../commands/maestro-brainstorm.md"},
12
+ {"name": "maestro-blueprint", "command": "/maestro-blueprint", "category": "core", "description": "正式规格文档化7-phase 收敛规格链,上游起源命令,产出 .workflow/blueprint/", "source": "../../commands/maestro-blueprint.md"},
13
+ {"name": "maestro-analyze", "command": "/maestro-analyze", "category": "pipeline", "description": "双层分析宏观(文本参数)探索影响面+scope_verdict / 微观(数字参数)Phase 级深入", "source": "../../commands/maestro-analyze.md"},
14
+ {"name": "maestro-plan", "command": "/maestro-plan", "category": "pipeline", "description": "任务规划 — 支持 --from analyze:ANL-xxx 直达、碰撞检测、gap 修复计划", "source": "../../commands/maestro-plan.md"},
14
15
  {"name": "maestro-execute", "command": "/maestro-execute", "category": "pipeline", "description": "任务执行 — wave 并行执行、delegate 编排、自动提交", "source": "../../commands/maestro-execute.md"},
15
16
  {"name": "maestro-verify", "command": "/maestro-verify", "category": "pipeline", "description": "验证确认 — 成果检查、gap 发现、下一阶段建议", "source": "../../commands/maestro-verify.md"},
16
17
  {"name": "maestro-quick", "command": "/maestro-quick", "category": "core", "description": "快速任务 — 跳过 Phase 管线直接完成,支持 --full/--discuss 模式", "source": "../../commands/maestro-quick.md"},
@@ -147,16 +148,33 @@
147
148
  "essential_commands": [
148
149
  "/maestro",
149
150
  "/maestro-init",
150
- "/maestro-roadmap",
151
+ "/maestro-brainstorm",
152
+ "/maestro-blueprint",
151
153
  "/maestro-analyze",
154
+ "/maestro-roadmap",
152
155
  "/maestro-plan",
153
156
  "/maestro-execute",
154
157
  "/maestro-verify",
155
- "/maestro-quick",
156
- "/quality-review",
157
- "/manage-issue"
158
+ "/maestro-quick"
158
159
  ],
159
160
  "workflows": {
161
+ "topology": {
162
+ "hierarchy": "Roadmap > Milestone > Phase > Task",
163
+ "layers": {
164
+ "upstream_origin": ["brainstorm (发散/轻量)", "blueprint (收敛/重型)"],
165
+ "understanding": "analyze 双层: 宏观(文本参数) + 微观(数字参数)",
166
+ "orchestration": "roadmap (可选,消费上游 context)",
167
+ "execution": ["plan", "execute", "verify"]
168
+ }
169
+ },
170
+ "paths": {
171
+ "A_full_project": "brainstorm → blueprint(可选) → analyze 宏观 → roadmap → analyze 微观 → plan → execute → verify",
172
+ "B_large_feature": "analyze 宏观 → roadmap → analyze 微观 → plan → execute → verify",
173
+ "C_medium_feature": "analyze 宏观 → plan --from analyze:ANL-xxx → execute → verify",
174
+ "D_small_fix": "plan → execute → verify",
175
+ "E_spec_only": "blueprint → (供人阅读)",
176
+ "F_explore_only": "brainstorm → (供人决策)"
177
+ },
160
178
  "main_pipeline": {
161
179
  "name": "主干管线",
162
180
  "phases": ["analyze", "plan", "execute", "verify"],
@@ -174,9 +192,9 @@
174
192
  },
175
193
  "init_paths": {
176
194
  "name": "初始化路径",
177
- "minimal": "/maestro-init → /maestro-roadmap",
178
- "from_brainstorm": "/maestro-brainstorm → /maestro-init --from-brainstorm → /maestro-roadmap",
179
- "full_spec": "/maestro-init → /maestro-spec-generate"
195
+ "from_brainstorm": "/maestro-brainstorm → /maestro-init --from brainstorm:<id> → /maestro-analyze 宏观",
196
+ "from_blueprint": "/maestro-blueprint → /maestro-init → /maestro-analyze 宏观",
197
+ "direct": "/maestro-init → /maestro-analyze 宏观"
180
198
  }
181
199
  }
182
200
  }
@@ -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: Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
6
  ---
7
7
 
@@ -16,12 +16,12 @@ When `-y`: After config questions, run research without further interaction. Exp
16
16
  ```bash
17
17
  $maestro-init ""
18
18
  $maestro-init "-y"
19
- $maestro-init "--from-brainstorm 20260318-brainstorm-auth"
19
+ $maestro-init "--from brainstorm:20260318-brainstorm-auth"
20
20
  ```
21
21
 
22
22
  **Flags**:
23
23
  - `-y`: Skip interactive questioning; extract from provided document
24
- - `--from-brainstorm SESSION-ID`: Import vision/goals/constraints from brainstorm guidance-specification.md
24
+ - `--from <source>`: Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json. Alias: `--from-brainstorm`
25
25
 
26
26
  **Output**: `.workflow/` directory with project.md, state.json, config.json, specs/
27
27
 
@@ -41,7 +41,7 @@ $maestro-init "--from-brainstorm 20260318-brainstorm-auth"
41
41
 
42
42
  Extract flags from arguments:
43
43
  - `-y` flag presence
44
- - `--from-brainstorm SESSION-ID` value
44
+ - `--from <source>` value (or `--from-brainstorm SESSION-ID` alias)
45
45
  - Remaining text as project description
46
46
 
47
47
  ### Step 2: Detect Project State
@@ -55,7 +55,7 @@ Classify as:
55
55
 
56
56
  ### Step 3: Gather Project Information
57
57
 
58
- **If `--from-brainstorm`**:
58
+ **If `--from` (or `--from-brainstorm`)**:
59
59
  - Read `.workflow/.brainstorm/{SESSION-ID}/guidance-specification.md`
60
60
  - Extract these fields from the document (match by heading or frontmatter key):
61
61
  - `## Vision` or `vision:` → project.md Core Value Proposition
@@ -132,7 +132,7 @@ If project state is **empty** (greenfield, no source files found in Step 2):
132
132
 
133
133
  ### Step 10: Completion Report
134
134
 
135
- Display created files and next steps: `$maestro-roadmap --mode full` (full spec), `$maestro-roadmap` (light), `$manage-status`, `$maestro-brainstorm`, `$maestro-quick`.
135
+ Display created files and next steps: `$maestro-blueprint` (full spec), `$maestro-roadmap` (roadmap), `$manage-status`, `$maestro-brainstorm`, `$maestro-quick`.
136
136
 
137
137
  </execution>
138
138
 
@@ -142,7 +142,7 @@ Display created files and next steps: `$maestro-roadmap --mode full` (full spec)
142
142
  |------|----------|-------------|----------|
143
143
  | E001 | error | No arguments when -y requires document | Ask user for document reference |
144
144
  | E002 | error | .workflow/ already exists | Show status, suggest manage-status |
145
- | E003 | error | Brainstorm session not found | List available sessions |
145
+ | E003 | error | Context source not found (--from / --from-brainstorm) | List available sessions |
146
146
  | W001 | warning | Could not detect tech stack | Continue with manual input |
147
147
 
148
148
  </error_codes>
@@ -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: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--dir <path>] [--gaps] [--spec SPEC-xxx] [--collab]\""
4
+ argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--dir <path>] [--from <source>] [--gaps] [--spec SPEC-xxx] [--collab]\""
5
5
  allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
6
  ---
7
7
 
@@ -65,14 +65,30 @@ All mean: **follow the cycle anyway**.
65
65
  <context>
66
66
  $ARGUMENTS — phase number/text and optional flags.
67
67
 
68
- **Flags**: `-y` (auto), `-c N` (concurrency, default 4), `--continue` (resume), `--dir <path>`, `--gaps` (issue-linked), `--spec SPEC-xxx`, `--collab`, `--revise`, `--check`, `--tdd` (RED-GREEN-REFACTOR task chains)
68
+ **Flags**: `-y` (auto), `-c N` (concurrency, default 4), `--continue` (resume), `--dir <path>`, `--from <source>` (load upstream context directly: analyze:ANL-xxx, blueprint:BLP-xxx, brainstorm:ID, @file, path), `--gaps` (issue-linked), `--spec SPEC-xxx`, `--collab`, `--revise`, `--check`, `--tdd` (RED-GREEN-REFACTOR task chains)
69
69
 
70
- **Scope routing** (priority): --dir from parent artifact; no args → milestone; digit → phase; text → adhoc/standalone.
70
+ **Scope routing** (priority, per redesign §5.2):
71
+ 1. `--from analyze:ANL-xxx` → CONTEXT_DIR = ANL artifact path; scope=`standalone`
72
+ 2. `--from blueprint:BLP-xxx` → CONTEXT_DIR = BLP path; scope=`standalone`
73
+ 3. `--dir <path>` → CONTEXT_DIR = path; scope=`standalone`
74
+ 4. Numeric arg + roadmap → scope=`phase`; D-007 reverse-lookup milestone via `state.json.milestones[].phase_slugs`
75
+ 5. No args + roadmap → scope=`milestone` (plans all pending phases in current milestone)
76
+ 6. No args + no roadmap → search `state.json.artifacts[]` for latest `type=="analyze"` (DESC by created_at). Found → scope=`standalone`, CONTEXT_DIR = artifact.path. None → ERROR E001.
77
+ 7. Text arg + no upstream → scope=`adhoc/standalone`
78
+
79
+ **D-007 milestone reverse lookup** (numeric scope only):
80
+ ```
81
+ resolve_milestone(phase_number):
82
+ for ms in state.json.milestones[]:
83
+ if str(phase_number) in ms.phase_slugs: return ms.id
84
+ return state.json.current_milestone # fallback
85
+ ```
86
+ Write resolved milestone into PLN artifact registration and `plan.json.milestone`; NEVER read `current_milestone` directly for phase-scoped runs.
71
87
 
72
88
  **Session**: `.workflow/.csv-wave/{YYYYMMDD}-plan-P{N}-{slug}/`
73
89
  **Scratch**: `.workflow/scratch/{YYYYMMDD}-plan-P{N}-{slug}/` (.task/ subdir)
74
90
 
75
- **Pre-load** (optional): context.md (prior analyze), conclusions.json, codebase ARCHITECTURE.md, `maestro wiki search`, `maestro spec load --category arch`, team preflight `maestro collab preflight`.
91
+ **Pre-load** (optional): context-package.json (via `--from`, takes precedence), context.md (prior analyze), conclusions.json, codebase ARCHITECTURE.md, `maestro wiki search`, `maestro spec load --category arch`, team preflight `maestro collab preflight`.
76
92
  </context>
77
93
 
78
94
  <csv_schema>
@@ -110,14 +126,15 @@ S_REGISTER — 注册 PLN artifact、更新 index.json PERSIST: sta
110
126
 
111
127
  <transitions>
112
128
  S_PARSE → S_RESUME WHEN: --continue
113
- S_PARSE → S_CONTEXT WHEN: phase/dir resolved
114
- S_PARSE → ERROR WHEN: no args and no roadmap
129
+ S_PARSE → S_CONTEXT WHEN: phase/dir/--from resolved (D-007 reverse lookup for numeric)
130
+ S_PARSE → S_CONTEXT WHEN: no args + no roadmap AND latest analyze artifact found in state.json (scope=standalone)
131
+ S_PARSE → ERROR WHEN: no args + no roadmap + no analyze artifact
115
132
 
116
133
  S_RESUME → S_WAVE_1 WHEN: W1 incomplete DO: load session, resume
117
134
  S_RESUME → S_WAVE_2 WHEN: W1 done, W2 pending
118
135
  S_RESUME → S_CHECK WHEN: W2 done, check pending
119
136
 
120
- S_CONTEXT → S_CSV_GEN DO: load context.md, conclusions.json, specs, wiki, codebase docs
137
+ S_CONTEXT → S_CSV_GEN DO: if --from: resolve context-package.json (precedence over context.md); load context.md, conclusions.json, specs, wiki, codebase docs
121
138
 
122
139
  S_CSV_GEN → S_WAVE_1 DO: pre-flight (`maestro collab preflight --phase N`; exit 1 → warn + ask), determine exploration angles, generate tasks.csv, user validates (skip -y)
123
140
 
@@ -173,7 +190,7 @@ Collision detection against same-milestone plans.
173
190
  <error_codes>
174
191
  | Condition | Recovery |
175
192
  |-----------|----------|
176
- | No args and no roadmap | Provide phase number or topic |
193
+ | No args and no roadmap and no analyze artifact in state.json | Provide phase number, topic, or run analyze first |
177
194
  | --gaps but no gap source | Run maestro-verify first |
178
195
  | Planning agent fails | Retry once with simplified context |
179
196
  | Plan-checker exceeds 3 rounds | Accept with warnings |
@@ -190,6 +207,7 @@ Collision detection against same-milestone plans.
190
207
  - [ ] Pressure pass completed on highest-complexity task
191
208
  - [ ] Collision detection against same-milestone plans (non-blocking)
192
209
  - [ ] Plan-checker passed (or minor issues acknowledged, max 3 iterations)
193
- - [ ] PLN artifact registered in state.json
210
+ - [ ] PLN artifact registered in state.json (numeric scope: milestone resolved via D-007 `phase_slugs` reverse lookup, NOT direct `current_milestone` read)
211
+ - [ ] No-args fallback honored: latest analyze artifact auto-discovered when roadmap absent (§5.2 priority 6)
194
212
  - [ ] If --gaps: issues linked bidirectionally (task_refs[], task_plan_dir in issues.jsonl)
195
213
  </success_criteria>