maestro-flow 0.3.10 → 0.3.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.
- package/.claude/agents/conceptual-planning-agent.md +1 -0
- package/.claude/agents/workflow-analyzer.md +114 -114
- package/.claude/agents/workflow-collab-planner.md +144 -144
- package/.claude/agents/workflow-debugger.md +102 -103
- package/.claude/agents/workflow-executor.md +127 -128
- package/.claude/agents/workflow-integration-checker.md +82 -82
- package/.claude/agents/workflow-nyquist-auditor.md +85 -84
- package/.claude/agents/workflow-phase-researcher.md +85 -85
- package/.claude/agents/workflow-plan-checker.md +90 -90
- package/.claude/agents/workflow-planner.md +178 -178
- package/.claude/agents/workflow-roadmapper.md +81 -83
- package/.claude/agents/workflow-verifier.md +119 -119
- package/.claude/commands/learn-decompose.md +176 -176
- package/.claude/commands/learn-follow.md +167 -167
- package/.claude/commands/learn-retro.md +3 -3
- package/.claude/commands/learn-second-opinion.md +2 -2
- package/.claude/commands/maestro-brainstorm.md +1 -0
- package/.claude/commands/maestro-coordinate.md +1 -3
- package/.claude/commands/maestro-fork.md +133 -111
- package/.claude/commands/maestro-merge.md +85 -77
- package/.claude/commands/maestro-plan.md +88 -2
- package/.claude/commands/maestro-roadmap.md +113 -2
- package/.claude/commands/maestro.md +1 -0
- package/.claude/commands/manage-harvest.md +131 -131
- package/.claude/commands/manage-issue.md +2 -2
- package/.claude/commands/quality-business-test.md +5 -5
- package/.claude/commands/quality-debug.md +3 -2
- package/.claude/commands/quality-retrospective.md +6 -4
- package/.claude/commands/quality-review.md +1 -1
- package/.claude/commands/quality-test-gen.md +5 -4
- package/.claude/commands/spec-add.md +67 -56
- package/.claude/commands/spec-load.md +66 -64
- package/.claude/commands/spec-setup.md +5 -9
- package/.codex/skills/learn-decompose/SKILL.md +119 -0
- package/.codex/skills/learn-follow/SKILL.md +83 -0
- package/.codex/skills/learn-investigate/SKILL.md +83 -0
- package/.codex/skills/learn-retro/SKILL.md +83 -0
- package/.codex/skills/learn-second-opinion/SKILL.md +86 -0
- package/.codex/skills/maestro/SKILL.md +151 -279
- package/.codex/skills/maestro-analyze/SKILL.md +59 -71
- package/.codex/skills/maestro-brainstorm/SKILL.md +452 -463
- package/.codex/skills/maestro-chain/SKILL.md +95 -110
- package/.codex/skills/maestro-coordinate/SKILL.md +68 -234
- package/.codex/skills/maestro-execute/SKILL.md +435 -446
- package/.codex/skills/maestro-fork/SKILL.md +98 -0
- package/.codex/skills/maestro-init/SKILL.md +172 -167
- package/.codex/skills/maestro-learn/SKILL.md +80 -0
- package/.codex/skills/maestro-link-coordinate/SKILL.md +224 -220
- package/.codex/skills/maestro-merge/SKILL.md +69 -0
- package/.codex/skills/maestro-milestone-audit/SKILL.md +108 -103
- package/.codex/skills/maestro-milestone-complete/SKILL.md +155 -149
- package/.codex/skills/maestro-milestone-release/SKILL.md +70 -0
- package/.codex/skills/maestro-overlay/SKILL.md +188 -185
- package/.codex/skills/maestro-plan/SKILL.md +58 -69
- package/.codex/skills/maestro-quick/SKILL.md +26 -23
- package/.codex/skills/maestro-roadmap/SKILL.md +65 -73
- package/.codex/skills/maestro-spec-generate/SKILL.md +66 -74
- package/.codex/skills/maestro-ui-design/SKILL.md +35 -32
- package/.codex/skills/maestro-verify/SKILL.md +556 -566
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +397 -405
- package/.codex/skills/manage-codebase-refresh/SKILL.md +93 -82
- package/.codex/skills/manage-harvest/SKILL.md +82 -0
- package/.codex/skills/manage-issue/SKILL.md +80 -65
- package/.codex/skills/manage-issue-discover/SKILL.md +491 -503
- package/.codex/skills/manage-learn/SKILL.md +190 -186
- package/.codex/skills/manage-memory/SKILL.md +95 -72
- package/.codex/skills/manage-memory-capture/SKILL.md +99 -86
- package/.codex/skills/manage-status/SKILL.md +102 -89
- package/.codex/skills/quality-business-test/SKILL.md +228 -223
- package/.codex/skills/quality-debug/SKILL.md +54 -66
- package/.codex/skills/quality-integration-test/SKILL.md +532 -544
- package/.codex/skills/quality-refactor/SKILL.md +197 -191
- package/.codex/skills/quality-retrospective/SKILL.md +512 -505
- package/.codex/skills/quality-review/SKILL.md +95 -107
- package/.codex/skills/quality-sync/SKILL.md +101 -89
- package/.codex/skills/quality-test/SKILL.md +202 -198
- package/.codex/skills/quality-test-gen/SKILL.md +94 -105
- package/.codex/skills/spec-add/SKILL.md +58 -39
- package/.codex/skills/spec-load/SKILL.md +45 -40
- package/.codex/skills/spec-map/SKILL.md +180 -182
- package/.codex/skills/spec-setup/SKILL.md +94 -76
- package/.codex/skills/team-coordinate/SKILL.md +346 -357
- package/.codex/skills/team-executor/SKILL.md +70 -112
- package/.codex/skills/team-lifecycle-v4/SKILL.md +311 -299
- package/.codex/skills/team-quality-assurance/SKILL.md +234 -227
- package/.codex/skills/team-review/SKILL.md +232 -225
- package/.codex/skills/team-tech-debt/SKILL.md +78 -100
- package/.codex/skills/team-testing/SKILL.md +242 -235
- package/.codex/skills/wiki-connect/SKILL.md +75 -0
- package/.codex/skills/wiki-digest/SKILL.md +87 -0
- package/README.md +9 -4
- package/README.zh-CN.md +9 -4
- package/dashboard/dist/assets/{ArtifactsPage-DZNCi6tn.js → ArtifactsPage-CUrrDGgN.js} +1 -1
- package/dashboard/dist/assets/ChatInput-pUOLJIKE.js +49 -0
- package/dashboard/dist/assets/ChatPage-B8Xqkt0v.js +27 -0
- package/dashboard/dist/assets/{CollabPage-B4NAHXS2.js → CollabPage-DIUXeazv.js} +1 -1
- package/dashboard/dist/assets/{ExecutionPanel-CFt4LJyq.js → ExecutionPanel-VmYeADFj.js} +1 -1
- package/dashboard/dist/assets/KanbanPage-DLq8v7hg.js +21 -0
- package/dashboard/dist/assets/{MarkdownRenderer-X4af_WNb.js → MarkdownRenderer-D7AehrnR.js} +1 -1
- package/dashboard/dist/assets/{McpPage-BKfCVIyU.js → McpPage-BY0SjTgw.js} +2 -2
- package/dashboard/dist/assets/{OutputPanel-BlBQFJSW.js → OutputPanel-B-Rjwgmv.js} +1 -1
- package/dashboard/dist/assets/{ProblemsPanel-De3DLvoI.js → ProblemsPanel-GEpF-oi4.js} +1 -1
- package/dashboard/dist/assets/RequirementBoardPage-xs8uDM7I.js +6 -0
- package/dashboard/dist/assets/{RequirementPage-Bllxe2XI.js → RequirementPage-BKDSFwjA.js} +5 -10
- package/dashboard/dist/assets/SpecsPage-DLFb9ZH0.js +36 -0
- package/dashboard/dist/assets/SupervisorPage-SOki_kgz.js +6 -0
- package/dashboard/dist/assets/TeamsPage-BO2kP70F.js +11 -0
- package/dashboard/dist/assets/{TreeBrowser-Q12qobZs.js → TreeBrowser-B9DHdULE.js} +1 -1
- package/dashboard/dist/assets/{WorkflowPage-D_Fzdy3_.js → WorkflowPage-C8hWbYim.js} +1 -1
- package/dashboard/dist/assets/{check-u6fGOwQO.js → check-DJDk3A2a.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-Csu22t58.js → chevron-right-C7bVDreZ.js} +1 -1
- package/dashboard/dist/assets/{circle-CMrkbRNg.js → circle-Qfgy4LB_.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-c3tH1P4z.js → circle-alert-Na1vf6qQ.js} +1 -1
- package/dashboard/dist/assets/{circle-check-gYxxSYuH.js → circle-check-CEGgy3NV.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-TDSeWstm.js → circle-check-big-3JB8zRYj.js} +1 -1
- package/dashboard/dist/assets/{code-CFN2uX9V.js → code-Ble63Idz.js} +1 -1
- package/dashboard/dist/assets/{columns-3-38xIDlzy.js → columns-3-BUcKlxve.js} +1 -1
- package/dashboard/dist/assets/{download-DC7KkKyP.js → download-CMqkfn8x.js} +1 -1
- package/dashboard/dist/assets/{folder-CWq_lAnf.js → folder-B9ewx9LL.js} +1 -1
- package/dashboard/dist/assets/index-C2Mcb4TJ.js +231 -0
- package/dashboard/dist/assets/index-DyBbPc18.css +1 -0
- package/dashboard/dist/assets/{index-Do71weNR.js → index-JTmGteaT.js} +1 -1
- package/dashboard/dist/assets/{list-CgIP_2A-.js → list-DI8Wn2aT.js} +1 -1
- package/dashboard/dist/assets/loader-B5F6PzFT.js +11 -0
- package/dashboard/dist/assets/{minus-DYoN5UGk.js → minus-Lp_BfctG.js} +1 -1
- package/dashboard/dist/assets/{pen-line-Bh_WKYHm.js → pen-line-Ch7sphzZ.js} +1 -1
- package/dashboard/dist/assets/pencil-_yRMHmGT.js +6 -0
- package/dashboard/dist/assets/{proxy-BKxDAKTj.js → proxy-D72Y8a4Y.js} +1 -1
- package/dashboard/dist/assets/{search-SieXnOgr.js → search-BS6fI6Bg.js} +1 -1
- package/dashboard/dist/assets/{shallow-Bme1JY57.js → shallow-BXasQBvr.js} +1 -1
- package/dashboard/dist/assets/table-CeGlFjlP.js +6 -0
- package/dashboard/dist/assets/{terminal-BB3Xfuv5.js → terminal-BJic2yW-.js} +1 -1
- package/dashboard/dist/assets/{trash-2-C8f4vFFM.js → trash-2-Czz4X8Fb.js} +1 -1
- package/dashboard/dist/assets/{zap-4uwlzVm0.js → zap-C3H0jVFA.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js +16 -1
- package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js +1 -2
- package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js +2 -1
- package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/index.js +3 -0
- package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/collab.js +124 -0
- package/dashboard/dist-server/dashboard/src/server/routes/collab.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js +75 -30
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +5 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.d.ts +10 -0
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js +73 -0
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/shared/collab-types.d.ts +31 -0
- package/dashboard/dist-server/dashboard/src/shared/collab-types.js +28 -0
- package/dashboard/dist-server/dashboard/src/shared/collab-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js +10 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/coordinate-types.d.ts +22 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +12 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.js +12 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +22 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.js +7 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/types.d.ts +3 -2
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +28 -2
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
- package/dashboard/dist-server/shared/agent-types.d.ts +4 -0
- package/dashboard/dist-server/src/hooks/constants.d.ts +3 -1
- package/dashboard/dist-server/src/hooks/constants.js +4 -2
- package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
- package/dist/shared/agent-types.d.ts +4 -0
- package/dist/shared/agent-types.d.ts.map +1 -1
- package/dist/src/commands/collab.js +4 -4
- package/dist/src/commands/collab.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +66 -1
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +29 -18
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +7 -2
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.js +23 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -1
- package/dist/src/hooks/constants.d.ts +3 -1
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +4 -2
- package/dist/src/hooks/constants.js.map +1 -1
- package/dist/src/hooks/guards/index.d.ts +1 -0
- package/dist/src/hooks/guards/index.d.ts.map +1 -1
- package/dist/src/hooks/guards/index.js +1 -0
- package/dist/src/hooks/guards/index.js.map +1 -1
- package/dist/src/hooks/guards/spec-validator.d.ts +25 -0
- package/dist/src/hooks/guards/spec-validator.d.ts.map +1 -0
- package/dist/src/hooks/guards/spec-validator.js +66 -0
- package/dist/src/hooks/guards/spec-validator.js.map +1 -0
- package/dist/src/hooks/keyword-spec-injector.d.ts +21 -0
- package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -0
- package/dist/src/hooks/keyword-spec-injector.js +96 -0
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts +2 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +21 -12
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/skill-context.d.ts +3 -0
- package/dist/src/hooks/skill-context.d.ts.map +1 -1
- package/dist/src/hooks/skill-context.js +95 -9
- package/dist/src/hooks/skill-context.js.map +1 -1
- package/dist/src/hooks/spec-bridge.d.ts +40 -0
- package/dist/src/hooks/spec-bridge.d.ts.map +1 -0
- package/dist/src/hooks/spec-bridge.js +97 -0
- package/dist/src/hooks/spec-bridge.js.map +1 -0
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +18 -12
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/statusline.d.ts.map +1 -1
- package/dist/src/hooks/statusline.js +6 -3
- package/dist/src/hooks/statusline.js.map +1 -1
- package/dist/src/team/phase-orchestrator.d.ts +52 -0
- package/dist/src/team/phase-orchestrator.d.ts.map +1 -0
- package/dist/src/team/phase-orchestrator.js +165 -0
- package/dist/src/team/phase-orchestrator.js.map +1 -0
- package/dist/src/team/phase-types.d.ts +51 -0
- package/dist/src/team/phase-types.d.ts.map +1 -0
- package/dist/src/team/phase-types.js +41 -0
- package/dist/src/team/phase-types.js.map +1 -0
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +6 -0
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/merge-validator.d.ts.map +1 -1
- package/dist/src/tools/merge-validator.js +114 -16
- package/dist/src/tools/merge-validator.js.map +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts +56 -0
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -0
- package/dist/src/tools/spec-entry-parser.js +196 -0
- package/dist/src/tools/spec-entry-parser.js.map +1 -0
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +66 -92
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-keyword-index.d.ts +30 -0
- package/dist/src/tools/spec-keyword-index.d.ts.map +1 -0
- package/dist/src/tools/spec-keyword-index.js +101 -0
- package/dist/src/tools/spec-keyword-index.js.map +1 -0
- package/dist/src/tools/spec-loader.d.ts +3 -3
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +49 -23
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/team-agents.d.ts +27 -0
- package/dist/src/tools/team-agents.d.ts.map +1 -0
- package/dist/src/tools/team-agents.js +362 -0
- package/dist/src/tools/team-agents.js.map +1 -0
- package/dist/src/tools/team-mailbox.d.ts +40 -0
- package/dist/src/tools/team-mailbox.d.ts.map +1 -0
- package/dist/src/tools/team-mailbox.js +384 -0
- package/dist/src/tools/team-mailbox.js.map +1 -0
- package/dist/src/tools/team-msg.d.ts +17 -8
- package/dist/src/tools/team-msg.d.ts.map +1 -1
- package/dist/src/tools/team-msg.js +110 -13
- package/dist/src/tools/team-msg.js.map +1 -1
- package/dist/src/tools/team-tasks-mcp.d.ts +27 -0
- package/dist/src/tools/team-tasks-mcp.d.ts.map +1 -0
- package/dist/src/tools/team-tasks-mcp.js +408 -0
- package/dist/src/tools/team-tasks-mcp.js.map +1 -0
- package/package.json +2 -1
- package/shared/agent-types.ts +4 -0
- package/templates/worktree-scope.json +9 -10
- package/templates/worktrees.json +26 -27
- package/workflows/analyze.md +816 -816
- package/workflows/brainstorm.md +480 -471
- package/workflows/codebase-rebuild.md +332 -332
- package/workflows/codebase-refresh.md +240 -240
- package/workflows/debug.md +16 -6
- package/workflows/execute.md +1 -1
- package/workflows/fork.md +100 -36
- package/workflows/harvest.md +420 -420
- package/workflows/integration-test.md +355 -343
- package/workflows/issue-discover.md +414 -414
- package/workflows/issue.md +14 -4
- package/workflows/learn.md +19 -5
- package/workflows/maestro.md +1 -0
- package/workflows/map.md +111 -111
- package/workflows/merge.md +113 -55
- package/workflows/milestone-complete.md +176 -176
- package/workflows/plan.md +1 -1
- package/workflows/quick.md +497 -497
- package/workflows/refactor.md +300 -300
- package/workflows/retrospective.md +61 -22
- package/workflows/review.md +17 -4
- package/workflows/roadmap.md +335 -335
- package/workflows/spec-generate.md +640 -640
- package/workflows/specs-add.md +46 -81
- package/workflows/specs-load.md +15 -17
- package/workflows/specs-setup.md +40 -161
- package/workflows/test.md +12 -2
- package/workflows/ui-style.md +9 -2
- package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +0 -49
- package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +0 -22
- package/dashboard/dist/assets/KanbanPage-C8USth6H.js +0 -21
- package/dashboard/dist/assets/RequirementBoardPage-Bf1trzqs.js +0 -11
- package/dashboard/dist/assets/SpecsPage-9lwxKT27.js +0 -36
- package/dashboard/dist/assets/SupervisorPage-SusdfHFq.js +0 -6
- package/dashboard/dist/assets/TeamsPage-DsuM6OwC.js +0 -6
- package/dashboard/dist/assets/arrow-left-Bqtb2hle.js +0 -6
- package/dashboard/dist/assets/index-DWG-WrzT.js +0 -231
- package/dashboard/dist/assets/index-GUNJodSR.css +0 -1
- package/dashboard/dist/assets/table-llyEtj-7.js +0 -6
package/workflows/brainstorm.md
CHANGED
|
@@ -1,471 +1,480 @@
|
|
|
1
|
-
# Workflow: Brainstorm
|
|
2
|
-
|
|
3
|
-
Unified brainstorming workflow with dual-mode operation: auto pipeline (full multi-role analysis) and single role analysis mode.
|
|
4
|
-
|
|
5
|
-
## Architecture
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
┌─────────────────────────────────────────────────────────┐
|
|
9
|
-
│ /maestro-brainstorm │
|
|
10
|
-
│ Unified Entry Point + Interactive Routing │
|
|
11
|
-
└───────────────────────┬─────────────────────────────────┘
|
|
12
|
-
│
|
|
13
|
-
┌─────────┴─────────┐
|
|
14
|
-
↓ ↓
|
|
15
|
-
┌─────────────────┐ ┌──────────────────┐
|
|
16
|
-
│ Auto Mode │ │ Single Role Mode │
|
|
17
|
-
└────────┬────────┘ └────────┬─────────┘
|
|
18
|
-
│ │
|
|
19
|
-
┌────────┼────────┐ │
|
|
20
|
-
↓ ↓ ↓ ↓
|
|
21
|
-
Phase 2 Phase 3 Phase 4 Phase 3
|
|
22
|
-
Artifacts N×Role Synthesis 1×Role
|
|
23
|
-
并行 Analysis
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Dual-Mode Routing
|
|
27
|
-
|
|
28
|
-
### Auto Mode (full pipeline)
|
|
29
|
-
Triggered by `--yes`/`-y` flag or user selection.
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
Phase 1: Mode Detection → Parse args, detect mode
|
|
33
|
-
Phase 1.5: Terminology & Boundary → Extract terms, collect Non-Goals
|
|
34
|
-
Phase 2: Interactive Framework → 7 sub-phases (context → topic → roles → questions → conflicts → check → spec)
|
|
35
|
-
Phase 3: Parallel Role Analysis → N concurrent role analyses via conceptual-planning-agent
|
|
36
|
-
Phase 4: Synthesis Integration → Cross-role analysis → user clarification → spec generation
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Single Role Mode
|
|
40
|
-
Triggered when first arg is a valid role name.
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
Phase 1: Mode Detection → Parse args, detect mode
|
|
44
|
-
Phase 3: Single Role Analysis → Detection → Context → Agent → Validation
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Input
|
|
48
|
-
|
|
49
|
-
- `$ARGUMENTS`: topic text (auto mode) or role name (single role mode)
|
|
50
|
-
- All output goes to `.workflow/scratch/brainstorm-{slug}-{date}/`
|
|
51
|
-
- Registers artifact (type=brainstorm) in state.json on completion
|
|
52
|
-
|
|
53
|
-
### Parameters
|
|
54
|
-
|
|
55
|
-
| Parameter | Description | Default |
|
|
56
|
-
|-----------|-------------|---------|
|
|
57
|
-
| `--yes`, `-y` | Auto mode, skip all questions | - |
|
|
58
|
-
| `--count N` | Number of roles to select | 3 |
|
|
59
|
-
| `--session ID` | Use existing session | - |
|
|
60
|
-
| `--update` | Update existing analysis | - |
|
|
61
|
-
| `--include-questions` | Interactive context gathering | - |
|
|
62
|
-
| `--skip-questions` | Use default answers | - |
|
|
63
|
-
| `--style-skill PKG` | Style package for ui-designer | - |
|
|
64
|
-
|
|
65
|
-
### Available Roles
|
|
66
|
-
|
|
67
|
-
| Role ID | Title | Focus Area |
|
|
68
|
-
|---------|-------|------------|
|
|
69
|
-
| `data-architect` | 数据架构师 | Data models, storage strategies, data flow |
|
|
70
|
-
| `product-manager` | 产品经理 | Product strategy, roadmap, prioritization |
|
|
71
|
-
| `product-owner` | 产品负责人 | Backlog management, user stories, acceptance criteria |
|
|
72
|
-
| `scrum-master` | 敏捷教练 | Process facilitation, impediment removal |
|
|
73
|
-
| `subject-matter-expert` | 领域专家 | Domain knowledge, business rules, compliance |
|
|
74
|
-
| `system-architect` | 系统架构师 | Technical architecture, scalability, integration |
|
|
75
|
-
| `test-strategist` | 测试策略师 | Test strategy, quality assurance |
|
|
76
|
-
| `ui-designer` | UI设计师 | Visual design, mockups, design systems |
|
|
77
|
-
| `ux-expert` | UX专家 | User research, information architecture, journey |
|
|
78
|
-
|
|
79
|
-
## Output
|
|
80
|
-
|
|
81
|
-
### Directory Structure
|
|
82
|
-
|
|
83
|
-
All brainstorm output goes to scratch:
|
|
84
|
-
```
|
|
85
|
-
.workflow/scratch/brainstorm-{slug}-{date}/
|
|
86
|
-
├── guidance-specification.md # Phase 2 output
|
|
87
|
-
├── feature-index.json # Phase 4 output
|
|
88
|
-
├── synthesis-changelog.md # Phase 4 audit trail
|
|
89
|
-
├── feature-specs/ # Phase 4 feature specs
|
|
90
|
-
│ ├── F-001-{slug}.md
|
|
91
|
-
│ └── F-00N-{slug}.md
|
|
92
|
-
├── {role}/ # Phase 3 role analyses (immutable)
|
|
93
|
-
│ ├── {role}-context.md
|
|
94
|
-
│ ├── analysis.md
|
|
95
|
-
│ ├── analysis-cross-cutting.md
|
|
96
|
-
│ └── analysis-F-{id}-{slug}.md
|
|
97
|
-
└── synthesis-specification.md # Non-feature mode fallback
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Process
|
|
103
|
-
|
|
104
|
-
### Step 1: Parse & Route (Mode Detection)
|
|
105
|
-
|
|
106
|
-
Parse $ARGUMENTS to determine execution mode:
|
|
107
|
-
|
|
108
|
-
**Mode Detection (ordered by priority)**:
|
|
109
|
-
1. `--yes` or `-y` flag → **Auto Mode** (no question asked)
|
|
110
|
-
2. First non-flag arg matches valid role name → **Single Role Mode**
|
|
111
|
-
3. First non-flag arg is a number → **Phase Mode** (resolve phase dir, then auto)
|
|
112
|
-
4. Text provided without flags → Ask user via AskUserQuestion:
|
|
113
|
-
- "自动模式 (推荐)" — 完整流程:框架生成 → 多角色并行分析 → 跨角色综合
|
|
114
|
-
- "单角色分析" — 为单个角色生成分析文档
|
|
115
|
-
|
|
116
|
-
**Parameter Parsing**:
|
|
117
|
-
- `--count N`: cap at 9, default 3
|
|
118
|
-
- `--session ID`: target specific session
|
|
119
|
-
- `--style-skill PKG`: validate `.claude/skills/style-{PKG}/SKILL.md` exists
|
|
120
|
-
- Missing/empty args without flags = error E001
|
|
121
|
-
|
|
122
|
-
**Session Detection**:
|
|
123
|
-
- Check `.workflow/scratch/brainstorm-*/` for existing sessions
|
|
124
|
-
- Multiple → AskUserQuestion to select | Single → use it
|
|
125
|
-
- None + auto mode → will create new session
|
|
126
|
-
- None + single role mode → error E002
|
|
127
|
-
|
|
128
|
-
**Output Directory Resolution**:
|
|
129
|
-
- Phase mode (number):
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
-
|
|
259
|
-
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
-
|
|
266
|
-
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
- Store to `session.
|
|
283
|
-
|
|
284
|
-
**Phase 5:
|
|
285
|
-
-
|
|
286
|
-
-
|
|
287
|
-
-
|
|
288
|
-
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
- `
|
|
324
|
-
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
-
|
|
328
|
-
-
|
|
329
|
-
|
|
330
|
-
**
|
|
331
|
-
-
|
|
332
|
-
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
-
|
|
337
|
-
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
-
|
|
359
|
-
-
|
|
360
|
-
|
|
361
|
-
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
-
|
|
365
|
-
|
|
366
|
-
-
|
|
367
|
-
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
-
|
|
376
|
-
- If
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
**
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
-
|
|
418
|
-
-
|
|
419
|
-
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
-
|
|
432
|
-
-
|
|
433
|
-
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
-
|
|
441
|
-
-
|
|
442
|
-
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
-
|
|
453
|
-
-
|
|
454
|
-
-
|
|
455
|
-
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
-
|
|
463
|
-
-
|
|
464
|
-
-
|
|
465
|
-
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
-
|
|
1
|
+
# Workflow: Brainstorm
|
|
2
|
+
|
|
3
|
+
Unified brainstorming workflow with dual-mode operation: auto pipeline (full multi-role analysis) and single role analysis mode.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─────────────────────────────────────────────────────────┐
|
|
9
|
+
│ /maestro-brainstorm │
|
|
10
|
+
│ Unified Entry Point + Interactive Routing │
|
|
11
|
+
└───────────────────────┬─────────────────────────────────┘
|
|
12
|
+
│
|
|
13
|
+
┌─────────┴─────────┐
|
|
14
|
+
↓ ↓
|
|
15
|
+
┌─────────────────┐ ┌──────────────────┐
|
|
16
|
+
│ Auto Mode │ │ Single Role Mode │
|
|
17
|
+
└────────┬────────┘ └────────┬─────────┘
|
|
18
|
+
│ │
|
|
19
|
+
┌────────┼────────┐ │
|
|
20
|
+
↓ ↓ ↓ ↓
|
|
21
|
+
Phase 2 Phase 3 Phase 4 Phase 3
|
|
22
|
+
Artifacts N×Role Synthesis 1×Role
|
|
23
|
+
并行 Analysis
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Dual-Mode Routing
|
|
27
|
+
|
|
28
|
+
### Auto Mode (full pipeline)
|
|
29
|
+
Triggered by `--yes`/`-y` flag or user selection.
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
Phase 1: Mode Detection → Parse args, detect mode
|
|
33
|
+
Phase 1.5: Terminology & Boundary → Extract terms, collect Non-Goals
|
|
34
|
+
Phase 2: Interactive Framework → 7 sub-phases (context → topic → roles → questions → conflicts → check → spec)
|
|
35
|
+
Phase 3: Parallel Role Analysis → N concurrent role analyses via conceptual-planning-agent
|
|
36
|
+
Phase 4: Synthesis Integration → Cross-role analysis → user clarification → spec generation
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Single Role Mode
|
|
40
|
+
Triggered when first arg is a valid role name.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Phase 1: Mode Detection → Parse args, detect mode
|
|
44
|
+
Phase 3: Single Role Analysis → Detection → Context → Agent → Validation
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Input
|
|
48
|
+
|
|
49
|
+
- `$ARGUMENTS`: topic text (auto mode) or role name (single role mode)
|
|
50
|
+
- All output goes to `.workflow/scratch/brainstorm-{slug}-{date}/`
|
|
51
|
+
- Registers artifact (type=brainstorm) in state.json on completion
|
|
52
|
+
|
|
53
|
+
### Parameters
|
|
54
|
+
|
|
55
|
+
| Parameter | Description | Default |
|
|
56
|
+
|-----------|-------------|---------|
|
|
57
|
+
| `--yes`, `-y` | Auto mode, skip all questions | - |
|
|
58
|
+
| `--count N` | Number of roles to select | 3 |
|
|
59
|
+
| `--session ID` | Use existing session | - |
|
|
60
|
+
| `--update` | Update existing analysis | - |
|
|
61
|
+
| `--include-questions` | Interactive context gathering | - |
|
|
62
|
+
| `--skip-questions` | Use default answers | - |
|
|
63
|
+
| `--style-skill PKG` | Style package for ui-designer | - |
|
|
64
|
+
|
|
65
|
+
### Available Roles
|
|
66
|
+
|
|
67
|
+
| Role ID | Title | Focus Area |
|
|
68
|
+
|---------|-------|------------|
|
|
69
|
+
| `data-architect` | 数据架构师 | Data models, storage strategies, data flow |
|
|
70
|
+
| `product-manager` | 产品经理 | Product strategy, roadmap, prioritization |
|
|
71
|
+
| `product-owner` | 产品负责人 | Backlog management, user stories, acceptance criteria |
|
|
72
|
+
| `scrum-master` | 敏捷教练 | Process facilitation, impediment removal |
|
|
73
|
+
| `subject-matter-expert` | 领域专家 | Domain knowledge, business rules, compliance |
|
|
74
|
+
| `system-architect` | 系统架构师 | Technical architecture, scalability, integration |
|
|
75
|
+
| `test-strategist` | 测试策略师 | Test strategy, quality assurance |
|
|
76
|
+
| `ui-designer` | UI设计师 | Visual design, mockups, design systems |
|
|
77
|
+
| `ux-expert` | UX专家 | User research, information architecture, journey |
|
|
78
|
+
|
|
79
|
+
## Output
|
|
80
|
+
|
|
81
|
+
### Directory Structure
|
|
82
|
+
|
|
83
|
+
All brainstorm output goes to scratch:
|
|
84
|
+
```
|
|
85
|
+
.workflow/scratch/brainstorm-{slug}-{date}/
|
|
86
|
+
├── guidance-specification.md # Phase 2 output
|
|
87
|
+
├── feature-index.json # Phase 4 output
|
|
88
|
+
├── synthesis-changelog.md # Phase 4 audit trail
|
|
89
|
+
├── feature-specs/ # Phase 4 feature specs
|
|
90
|
+
│ ├── F-001-{slug}.md
|
|
91
|
+
│ └── F-00N-{slug}.md
|
|
92
|
+
├── {role}/ # Phase 3 role analyses (immutable)
|
|
93
|
+
│ ├── {role}-context.md
|
|
94
|
+
│ ├── analysis.md
|
|
95
|
+
│ ├── analysis-cross-cutting.md
|
|
96
|
+
│ └── analysis-F-{id}-{slug}.md
|
|
97
|
+
└── synthesis-specification.md # Non-feature mode fallback
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Process
|
|
103
|
+
|
|
104
|
+
### Step 1: Parse & Route (Mode Detection)
|
|
105
|
+
|
|
106
|
+
Parse $ARGUMENTS to determine execution mode:
|
|
107
|
+
|
|
108
|
+
**Mode Detection (ordered by priority)**:
|
|
109
|
+
1. `--yes` or `-y` flag → **Auto Mode** (no question asked)
|
|
110
|
+
2. First non-flag arg matches valid role name → **Single Role Mode**
|
|
111
|
+
3. First non-flag arg is a number → **Phase Mode** (resolve phase dir, then auto)
|
|
112
|
+
4. Text provided without flags → Ask user via AskUserQuestion:
|
|
113
|
+
- "自动模式 (推荐)" — 完整流程:框架生成 → 多角色并行分析 → 跨角色综合
|
|
114
|
+
- "单角色分析" — 为单个角色生成分析文档
|
|
115
|
+
|
|
116
|
+
**Parameter Parsing**:
|
|
117
|
+
- `--count N`: cap at 9, default 3
|
|
118
|
+
- `--session ID`: target specific session
|
|
119
|
+
- `--style-skill PKG`: validate `.claude/skills/style-{PKG}/SKILL.md` exists
|
|
120
|
+
- Missing/empty args without flags = error E001
|
|
121
|
+
|
|
122
|
+
**Session Detection**:
|
|
123
|
+
- Check `.workflow/scratch/brainstorm-*/` for existing sessions
|
|
124
|
+
- Multiple → AskUserQuestion to select | Single → use it
|
|
125
|
+
- None + auto mode → will create new session
|
|
126
|
+
- None + single role mode → error E002
|
|
127
|
+
|
|
128
|
+
**Output Directory Resolution**:
|
|
129
|
+
- Phase mode (number):
|
|
130
|
+
```
|
|
131
|
+
Read .workflow/state.json → state
|
|
132
|
+
artifacts = state.artifacts ?? []
|
|
133
|
+
IF artifacts.length > 0:
|
|
134
|
+
art = artifacts.find(a => a.phase === phaseNum)
|
|
135
|
+
output_dir = ".workflow/" + art.path + "/.brainstorming/"
|
|
136
|
+
ELSE:
|
|
137
|
+
output_dir = ".workflow/phases/{NN}-{slug}/.brainstorming/"
|
|
138
|
+
```
|
|
139
|
+
- All output: `.workflow/scratch/brainstorm-{slug}-{date}/`
|
|
140
|
+
- Existing session: use existing session directory
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### Step 1.5: Load Project Specs
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
specs_content = maestro spec load --category arch
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Pass to conceptual-planning-agent in Step 4 for architecture-aware role analysis.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### Auto Mode Steps (Phase 1.5 → Phase 1.7 → Phase 2 → Phase 3 → Phase 4)
|
|
155
|
+
|
|
156
|
+
### Step 1.7: External Research — Design Routes (Auto Mode, Optional)
|
|
157
|
+
|
|
158
|
+
Spawn `workflow-external-researcher` agent to discover design alternatives, architecture patterns, and competitive approaches for the brainstorm topic. This enriches the framework generation and role analyses with external knowledge.
|
|
159
|
+
|
|
160
|
+
**Trigger**: Always in auto mode. Skip if `--skip-questions` and no tech keywords detected.
|
|
161
|
+
|
|
162
|
+
**Auto-suggest when**: Topic contains technology keywords, architecture terms, or "design" / "pattern" / "alternative" in the description.
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
// Step 1.7.1: Spawn external researcher for design routes
|
|
166
|
+
Agent(
|
|
167
|
+
subagent_type="workflow-external-researcher",
|
|
168
|
+
prompt="""
|
|
169
|
+
<objective>
|
|
170
|
+
Research design alternatives and architecture patterns for: {topic}
|
|
171
|
+
Mode: Design Research
|
|
172
|
+
</objective>
|
|
173
|
+
|
|
174
|
+
<context>
|
|
175
|
+
Project specs: {specs_content or "none"}
|
|
176
|
+
Topic keywords: {extracted_keywords}
|
|
177
|
+
</context>
|
|
178
|
+
|
|
179
|
+
<task>
|
|
180
|
+
Search for:
|
|
181
|
+
1. Reference projects — how 2-3 similar projects/products solve this problem (architecture, key decisions, what worked)
|
|
182
|
+
2. Extractable patterns — reusable design patterns distilled from those projects, with applicability notes
|
|
183
|
+
3. Architecture approaches (at least 2-3 alternatives with trade-offs)
|
|
184
|
+
4. UX/UI patterns if applicable (interaction models, layout strategies)
|
|
185
|
+
5. Common design pitfalls and anti-patterns to avoid
|
|
186
|
+
|
|
187
|
+
IMPORTANT: Output MUST include "Reference Projects / Implementations" and "Extractable Patterns" sections.
|
|
188
|
+
Focus on design ROUTES — alternative approaches the brainstorm roles can evaluate.
|
|
189
|
+
Be prescriptive where evidence is strong, present alternatives where trade-offs exist.
|
|
190
|
+
Return structured markdown only — do NOT write files.
|
|
191
|
+
</task>
|
|
192
|
+
""",
|
|
193
|
+
run_in_background=false
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
// Step 1.7.2: Store as designResearchContext (in-memory)
|
|
197
|
+
designResearchContext = agent_output
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
`designResearchContext` is passed into:
|
|
201
|
+
- Step 2 (Terminology): enriches domain term extraction
|
|
202
|
+
- Step 3 Phase 1 (Topic Analysis): provides external design alternatives
|
|
203
|
+
- Step 4 (Parallel Role Analysis): each role agent receives design research as additional context
|
|
204
|
+
|
|
205
|
+
If research fails (W005): `designResearchContext = null`, continue without external context.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
### Step 1.8: Load Project Context (if `.workflow/` exists)
|
|
210
|
+
|
|
211
|
+
Load existing project history to ground brainstorming in what's already been built:
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
IF .workflow/project.md exists:
|
|
215
|
+
Read project.md:
|
|
216
|
+
- "### Validated" → already_shipped (features already delivered)
|
|
217
|
+
- "### Active" → current_scope
|
|
218
|
+
- "## Context" → project_history (milestone summaries)
|
|
219
|
+
|
|
220
|
+
IF .workflow/state.json exists:
|
|
221
|
+
Read state.json.accumulated_context:
|
|
222
|
+
- deferred[] → deferred_items (candidates for brainstorming focus)
|
|
223
|
+
- key_decisions[] → existing_constraints
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Pass `project_context` into Step 2 (terminology) and Step 3 (framework generation):
|
|
228
|
+
- `already_shipped` informs what exists — brainstorm should explore extensions, not re-invent
|
|
229
|
+
- `deferred_items` are high-value brainstorming seeds
|
|
230
|
+
- `lessons_learned` surface pitfalls to avoid
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
### Step 2: Terminology & Boundary Definition (Auto Mode)
|
|
235
|
+
|
|
236
|
+
Extract core terminology and define scope boundaries before framework generation.
|
|
237
|
+
|
|
238
|
+
1. Analyze topic description and any project context (project.md, roadmap.md, project_context from Step 1.8)
|
|
239
|
+
2. Extract 5-10 core domain terms:
|
|
240
|
+
- term (canonical), definition, aliases, category (core|technical|business)
|
|
241
|
+
3. AskUserQuestion for Non-Goals (multiSelect=true):
|
|
242
|
+
- Generate 4-5 context-aware exclusion candidates based on topic
|
|
243
|
+
- Include "其他(请补充)" option for custom exclusions
|
|
244
|
+
- If user selects "其他", follow up with free-text question
|
|
245
|
+
4. Store terminology table and non_goals to session state
|
|
246
|
+
|
|
247
|
+
**Skip if**: `--yes` flag (use auto-generated terms, empty non-goals)
|
|
248
|
+
|
|
249
|
+
### Step 3: Interactive Framework Generation (Auto Mode)
|
|
250
|
+
|
|
251
|
+
Seven sub-phases producing guidance-specification.md:
|
|
252
|
+
|
|
253
|
+
**Phase 0: Context Collection**
|
|
254
|
+
- Read init outputs directly: `.workflow/project.md` (tech stack, requirements, decisions), `.workflow/state.json` (project state), `.workflow/specs/` (conventions)
|
|
255
|
+
- If `.workflow/` does not exist: continue without project context
|
|
256
|
+
|
|
257
|
+
**Phase 1: Topic Analysis**
|
|
258
|
+
- Load Phase 0 context (tech_stack, modules, conflict_risk)
|
|
259
|
+
- Deep topic analysis (entities, challenges, constraints, metrics)
|
|
260
|
+
- Generate 2-4 context-aware probing questions via AskUserQuestion
|
|
261
|
+
- Questions MUST reference topic keywords (no generic questions)
|
|
262
|
+
- Store to `session.intent_context`
|
|
263
|
+
|
|
264
|
+
**Phase 2: Role Selection**
|
|
265
|
+
- Analyze Phase 1 keywords → recommend count+2 roles with rationale
|
|
266
|
+
- AskUserQuestion (multiSelect=true) for user to select `count` roles
|
|
267
|
+
- If `--yes`: auto-select recommended roles
|
|
268
|
+
- Store to `session.selected_roles`
|
|
269
|
+
|
|
270
|
+
**Phase 3: Role-Specific Questions**
|
|
271
|
+
- FOR each selected role, generate 3-4 deep questions mapping role expertise to Phase 1 challenges
|
|
272
|
+
- AskUserQuestion per role (sequential, one role at a time)
|
|
273
|
+
- Questions must include: implementation depth, trade-offs, edge cases
|
|
274
|
+
- Store to `session.role_decisions[role]`
|
|
275
|
+
- If `--yes`: skip all role questions
|
|
276
|
+
|
|
277
|
+
**Phase 4: Conflict Resolution**
|
|
278
|
+
- Analyze Phase 3 answers for contradictions, missing integrations, implicit dependencies
|
|
279
|
+
- Generate clarification questions referencing SPECIFIC Phase 3 choices
|
|
280
|
+
- AskUserQuestion (max 4 per round)
|
|
281
|
+
- If NO conflicts detected: skip with notification
|
|
282
|
+
- Store to `session.cross_role_decisions`
|
|
283
|
+
|
|
284
|
+
**Phase 4.5: Final Clarification + Feature Decomposition**
|
|
285
|
+
- Ask: "是否有前面未澄清的重点需要补充?" (无需补充 / 需要补充)
|
|
286
|
+
- If "需要补充": progressive questions until resolved
|
|
287
|
+
- Extract candidate features from all Phase 1-4 decisions (max 8)
|
|
288
|
+
- Each feature: F-{3-digit} ID, kebab-case slug, description, related roles, priority
|
|
289
|
+
- Validate: independence, completeness, granularity balance, boundary clarity
|
|
290
|
+
- AskUserQuestion for user to confirm or adjust feature list
|
|
291
|
+
- Store to `session.feature_list`
|
|
292
|
+
|
|
293
|
+
**Phase 5: Generate Specification**
|
|
294
|
+
- Load all decisions + terminology + non_goals + feature_list
|
|
295
|
+
- Transform Q&A to declarative statements (CONFIRMED/SELECTED)
|
|
296
|
+
- Apply RFC 2119 keywords (MUST, SHOULD, MAY, MUST NOT, SHOULD NOT)
|
|
297
|
+
- Write `guidance-specification.md` with sections:
|
|
298
|
+
1. Project Positioning & Goals
|
|
299
|
+
2. Concepts & Terminology (table)
|
|
300
|
+
3. Non-Goals (Out of Scope)
|
|
301
|
+
4-N. [Role] Decisions (with RFC 2119)
|
|
302
|
+
Cross-Role Integration
|
|
303
|
+
Risks & Constraints
|
|
304
|
+
Feature Decomposition (table)
|
|
305
|
+
Appendix: Decision Tracking
|
|
306
|
+
- Validate: no interrogative sentences, all decisions traceable, RFC keywords applied
|
|
307
|
+
|
|
308
|
+
**Output**: `{output_dir}/guidance-specification.md`, session metadata (workflow-session.json)
|
|
309
|
+
|
|
310
|
+
### Step 4: Parallel Role Analysis (Auto Mode)
|
|
311
|
+
|
|
312
|
+
For EACH selected role, spawn a conceptual-planning-agent in parallel:
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
Agent({
|
|
316
|
+
subagent_type: "conceptual-planning-agent",
|
|
317
|
+
prompt: "[role analysis prompt with framework + role template]",
|
|
318
|
+
run_in_background: false
|
|
319
|
+
})
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Each agent receives:
|
|
323
|
+
- `guidance-specification.md` for framework context
|
|
324
|
+
- Role-specific template from `~/.maestro/templates/planning-roles/{role}.md`
|
|
325
|
+
- Feature list for feature-point organization
|
|
326
|
+
- `--skip-questions` flag (context already gathered in Phase 2)
|
|
327
|
+
- For ui-designer: `--style-skill {package}` if provided
|
|
328
|
+
- If `designResearchContext` is set: include as "External Design Research" section in agent prompt (design alternatives, patterns, competitive analysis for the role to evaluate and reference)
|
|
329
|
+
|
|
330
|
+
**Feature-Point Organization** (when feature list available):
|
|
331
|
+
- `analysis.md` — Role overview INDEX only (< 1500 words)
|
|
332
|
+
- `analysis-cross-cutting.md` — Cross-feature decisions (< 2000 words)
|
|
333
|
+
- `analysis-F-{id}-{slug}.md` — Per-feature analysis (< 2000 words each)
|
|
334
|
+
|
|
335
|
+
**Fallback Organization** (no feature list):
|
|
336
|
+
- `analysis.md` — Main analysis (< 3000 words)
|
|
337
|
+
- Optional `analysis-{slug}.md` sub-documents (max 5)
|
|
338
|
+
|
|
339
|
+
**system-architect specific requirements**:
|
|
340
|
+
- MUST include: Data Model (3-5 entities), State Machine (ASCII + transition table), Error Handling, Observability (5+ metrics), Configuration Model, Boundary Scenarios
|
|
341
|
+
- All constraints MUST use RFC 2119 keywords
|
|
342
|
+
|
|
343
|
+
**Quality Validation** (after each role completes, orchestrator self-check):
|
|
344
|
+
- Verify `analysis.md` exists and is non-empty
|
|
345
|
+
- Feature mode: verify `analysis-cross-cutting.md` + `analysis-F-*.md` files match feature list
|
|
346
|
+
- Grep for RFC 2119 keywords (MUST/SHOULD/MAY) — warn if < 5 occurrences
|
|
347
|
+
- Check word count (wc -w) against limits — warn if exceeded
|
|
348
|
+
- system-architect: verify Data Model and State Machine sections exist
|
|
349
|
+
|
|
350
|
+
**Parallel Safety**: Each role operates on its own directory. No cross-agent dependencies.
|
|
351
|
+
|
|
352
|
+
### Step 5: Synthesis Integration (Auto Mode)
|
|
353
|
+
|
|
354
|
+
Six sub-phases producing feature specs from cross-role analysis:
|
|
355
|
+
|
|
356
|
+
**Sub-phase 1: Discovery**
|
|
357
|
+
- Detect session, validate analysis files exist
|
|
358
|
+
- Load user intent from session metadata
|
|
359
|
+
- Detect feature mode (feature decomposition table + analysis-F-*.md files)
|
|
360
|
+
|
|
361
|
+
**Sub-phase 2: File Discovery**
|
|
362
|
+
- Glob `{output_dir}/{role}/analysis*.md`
|
|
363
|
+
- Extract role_analysis_paths and participating_roles
|
|
364
|
+
- Feature mode optimization: read only analysis.md index files (~4.5K total) not sub-documents
|
|
365
|
+
|
|
366
|
+
**Sub-phase 3A: Cross-Role Analysis Agent**
|
|
367
|
+
- Spawn conceptual-planning-agent for cross-role analysis
|
|
368
|
+
- Input: analysis index files (feature mode) or all analysis files (fallback)
|
|
369
|
+
- Output: `enhancement_recommendations` (EP-001, EP-002, ...) + `feature_conflict_map` (per-feature consensus/conflicts/cross_refs)
|
|
370
|
+
- Conflict resolution quality: actionable, justified ("because...tradeoff:..."), scoped, confidence-tagged ([RESOLVED]|[SUGGESTED]|[UNRESOLVED])
|
|
371
|
+
|
|
372
|
+
**Sub-phase 4: User Interaction**
|
|
373
|
+
- Enhancement selection: AskUserQuestion (multiSelect=true, batched by 4)
|
|
374
|
+
- Clarification questions: 9-category taxonomy scan, AskUserQuestion (single-select, multi-round)
|
|
375
|
+
- Build spec_context: selected_enhancements + clarification_answers + original_user_intent
|
|
376
|
+
- If `--yes`: auto-select all enhancements, skip clarifications
|
|
377
|
+
|
|
378
|
+
**Sub-phase 5: Spec Generation + Conditional Review**
|
|
379
|
+
- Single conceptual-planning-agent generates all specs sequentially:
|
|
380
|
+
- Feature mode: one `feature-specs/F-{id}-{slug}.md` per feature (7 sections, 1500-2500 words)
|
|
381
|
+
- Fallback mode: single `synthesis-specification.md`
|
|
382
|
+
- `feature-index.json` (feature mode only)
|
|
383
|
+
- `synthesis-changelog.md` (enhancements applied, clarifications resolved, conflicts resolved)
|
|
384
|
+
- Self-evaluate complexity_score (0-8 scale: feature count, unresolved conflicts, roles, cross-deps)
|
|
385
|
+
- If complexity_score >= 4: trigger review agent for cross-feature consistency check
|
|
386
|
+
- Minor fixes applied directly, major issues flagged with [REVIEW-FLAG]
|
|
387
|
+
|
|
388
|
+
**Feature Spec Template (7 Sections)**:
|
|
389
|
+
1. Requirements Summary (RFC 2119 keywords)
|
|
390
|
+
2. Design Decisions [CORE — 40%+ word count]
|
|
391
|
+
3. Interface Contract
|
|
392
|
+
4. Constraints & Risks
|
|
393
|
+
5. Acceptance Criteria
|
|
394
|
+
6. Detailed Analysis References (@-links)
|
|
395
|
+
7. Cross-Feature Dependencies
|
|
396
|
+
|
|
397
|
+
**Four-Layer Aggregation Rules**:
|
|
398
|
+
- Layer 1: Direct Reference (consensus → quote roles)
|
|
399
|
+
- Layer 2: Structured Extraction (complementary → merge, de-duplicate)
|
|
400
|
+
- Layer 3: Conflict Distillation ([RESOLVED] → decision, [SUGGESTED] → recommended, [UNRESOLVED] → [DECISION NEEDED])
|
|
401
|
+
- Layer 4: Cross-Feature Annotation (dependency notes, integration points)
|
|
402
|
+
|
|
403
|
+
**Sub-phase 6: Finalization**
|
|
404
|
+
- Update context-package.json with spec paths
|
|
405
|
+
- Update session metadata (enhancements_applied, questions_asked, complexity_score, review results)
|
|
406
|
+
- Completion report with next step suggestion
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
### Single Role Mode Steps
|
|
411
|
+
|
|
412
|
+
### Step 6: Single Role Analysis
|
|
413
|
+
|
|
414
|
+
Execute analysis for ONE specified role with optional interactive context gathering.
|
|
415
|
+
|
|
416
|
+
**Step 6.1: Detection & Validation**
|
|
417
|
+
- Validate role_name against VALID_ROLES list
|
|
418
|
+
- Detect session (--session or find existing)
|
|
419
|
+
- Check for guidance-specification.md → framework_mode
|
|
420
|
+
- Extract feature list → feature_mode
|
|
421
|
+
- Check existing analysis → update_mode (ask: update/regenerate/cancel)
|
|
422
|
+
|
|
423
|
+
**Step 6.2: Interactive Context Gathering**
|
|
424
|
+
- Skip if `--skip-questions`
|
|
425
|
+
- Force if `--include-questions`
|
|
426
|
+
- Generate 3-5 role-specific questions (Chinese, with business context)
|
|
427
|
+
- AskUserQuestion per batch (max 4 per round)
|
|
428
|
+
- Save context to `{role}/{role}-context.md`
|
|
429
|
+
|
|
430
|
+
**Step 6.3: Agent Execution**
|
|
431
|
+
- Spawn conceptual-planning-agent with:
|
|
432
|
+
- Role name, framework (if exists), feature list (if exists)
|
|
433
|
+
- User context (if gathered), session metadata
|
|
434
|
+
- Role-specific template
|
|
435
|
+
- For ui-designer: style-skill package
|
|
436
|
+
- Agent generates analysis files in `{output_dir}/{role}/`
|
|
437
|
+
|
|
438
|
+
**Step 6.4: Validation**
|
|
439
|
+
- Verify `analysis.md` exists
|
|
440
|
+
- Check framework reference if framework_mode
|
|
441
|
+
- Update session metadata with completion status
|
|
442
|
+
- Report results with next step suggestions
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
### Step 7: Final Report
|
|
447
|
+
|
|
448
|
+
**Auto mode report:**
|
|
449
|
+
- Session ID and output directory
|
|
450
|
+
- Roles analyzed (N)
|
|
451
|
+
- Features specified (N)
|
|
452
|
+
- Enhancements applied (EP-IDs)
|
|
453
|
+
- Complexity score and review status
|
|
454
|
+
- Next:
|
|
455
|
+
Skill({ skill: "maestro-spec-generate", args: "--from-brainstorm {sessionId}" }) — Generate full spec package
|
|
456
|
+
Skill({ skill: "maestro-analyze", args: "{topic}" }) — Evaluate feasibility + lock decisions
|
|
457
|
+
Skill({ skill: "maestro-analyze", args: "{phase} -q" }) — Quick decision extraction only
|
|
458
|
+
Skill({ skill: "maestro-plan", args: "{phase}" }) — Plan directly (if scope is clear)
|
|
459
|
+
|
|
460
|
+
**Single role mode report:**
|
|
461
|
+
- Role analyzed
|
|
462
|
+
- Framework alignment status
|
|
463
|
+
- Context questions answered
|
|
464
|
+
- Output file location
|
|
465
|
+
- Next: run more roles or Skill({ skill: "maestro-brainstorm", args: "--session {sessionId}" }) for synthesis
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
## Quality Criteria
|
|
470
|
+
|
|
471
|
+
- If `designResearchContext` is set: guidance-specification.md references external design findings
|
|
472
|
+
- guidance-specification.md uses RFC 2119 keywords (MUST/SHOULD/MAY)
|
|
473
|
+
- Concepts & Terminology section with 5-10 core terms
|
|
474
|
+
- Non-Goals section with rationale
|
|
475
|
+
- Feature Decomposition table (max 8 features, independently implementable)
|
|
476
|
+
- Role analyses follow role-specific templates
|
|
477
|
+
- system-architect includes: Data Model, State Machine, Error Handling, Observability
|
|
478
|
+
- Feature specs have 7 sections, Section 2 (Design Decisions) is 40%+ of content
|
|
479
|
+
- All conflicts resolved or marked [DECISION NEEDED]
|
|
480
|
+
- synthesis-changelog.md records all synthesis decisions as audit trail
|