maestro-flow 0.3.22 → 0.3.23

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 (144) hide show
  1. package/.claude/commands/maestro-analyze.md +1 -1
  2. package/.claude/commands/maestro-brainstorm.md +1 -1
  3. package/.claude/commands/maestro-composer.md +3 -3
  4. package/.claude/commands/maestro-init.md +4 -4
  5. package/.claude/commands/maestro-roadmap.md +164 -108
  6. package/.claude/commands/maestro.md +19 -10
  7. package/.claude/commands/quality-business-test.md +2 -2
  8. package/.claude/skills/team-quality-assurance/roles/scout/role.md +1 -1
  9. package/.claude/skills/team-review/roles/reviewer/role.md +1 -1
  10. package/.claude/skills/team-review/roles/scanner/role.md +1 -1
  11. package/.claude/skills/team-tech-debt/roles/scanner/role.md +3 -3
  12. package/.codex/skills/maestro/SKILL.md +12 -9
  13. package/.codex/skills/maestro-brainstorm/SKILL.md +1 -1
  14. package/.codex/skills/maestro-composer/SKILL.md +3 -3
  15. package/.codex/skills/maestro-init/SKILL.md +1 -1
  16. package/.codex/skills/maestro-link-coordinate/SKILL.md +1 -1
  17. package/.codex/skills/maestro-player/SKILL.md +2 -2
  18. package/.codex/skills/maestro-roadmap/SKILL.md +443 -332
  19. package/.codex/skills/quality-business-test/SKILL.md +2 -2
  20. package/.codex/skills/team-coordinate/roles/coordinator/role.md +1 -1
  21. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +1 -1
  22. package/.codex/skills/team-quality-assurance/roles/scout/role.md +1 -1
  23. package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
  24. package/.codex/skills/team-review/roles/scanner/role.md +1 -1
  25. package/.codex/skills/team-tech-debt/roles/scanner/role.md +3 -3
  26. package/chains/singles/spec-generate.json +3 -3
  27. package/chains/spec-driven.json +2 -2
  28. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +4 -0
  29. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
  30. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +2 -2
  31. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
  32. package/dashboard/dist-server/dashboard/src/server/routes/install-utils.d.ts +5 -12
  33. package/dashboard/dist-server/dashboard/src/server/routes/install-utils.js +10 -65
  34. package/dashboard/dist-server/dashboard/src/server/routes/install-utils.js.map +1 -1
  35. package/dashboard/dist-server/dashboard/src/server/routes/install.js +17 -11
  36. package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
  37. package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +4 -0
  38. package/dashboard/dist-server/src/agents/cli-agent-runner.js +4 -2
  39. package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
  40. package/dashboard/dist-server/src/commands/delegate.d.ts +2 -0
  41. package/dashboard/dist-server/src/commands/delegate.js +20 -4
  42. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  43. package/dashboard/dist-server/src/config/cli-tools-config.d.ts +64 -3
  44. package/dashboard/dist-server/src/config/cli-tools-config.js +226 -9
  45. package/dashboard/dist-server/src/config/cli-tools-config.js.map +1 -1
  46. package/dist/src/agents/cli-agent-runner.d.ts +4 -0
  47. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  48. package/dist/src/agents/cli-agent-runner.js +4 -2
  49. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  50. package/dist/src/cli.js +2 -0
  51. package/dist/src/cli.js.map +1 -1
  52. package/dist/src/commands/cli.d.ts.map +1 -1
  53. package/dist/src/commands/cli.js +21 -4
  54. package/dist/src/commands/cli.js.map +1 -1
  55. package/dist/src/commands/delegate.d.ts +2 -0
  56. package/dist/src/commands/delegate.d.ts.map +1 -1
  57. package/dist/src/commands/delegate.js +20 -4
  58. package/dist/src/commands/delegate.js.map +1 -1
  59. package/dist/src/commands/install-backend.d.ts +5 -16
  60. package/dist/src/commands/install-backend.d.ts.map +1 -1
  61. package/dist/src/commands/install-backend.js +8 -104
  62. package/dist/src/commands/install-backend.js.map +1 -1
  63. package/dist/src/commands/install-ui/ExecutionView.js +1 -1
  64. package/dist/src/commands/install-ui/ExecutionView.js.map +1 -1
  65. package/dist/src/commands/install-ui/InstallExecution.d.ts +1 -0
  66. package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
  67. package/dist/src/commands/install-ui/InstallExecution.js +19 -4
  68. package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
  69. package/dist/src/commands/install-ui/InstallResult.d.ts.map +1 -1
  70. package/dist/src/commands/install-ui/InstallResult.js +1 -1
  71. package/dist/src/commands/install-ui/InstallResult.js.map +1 -1
  72. package/dist/src/commands/install.d.ts.map +1 -1
  73. package/dist/src/commands/install.js +23 -3
  74. package/dist/src/commands/install.js.map +1 -1
  75. package/dist/src/commands/tools-ui/CommandReference.d.ts +7 -0
  76. package/dist/src/commands/tools-ui/CommandReference.d.ts.map +1 -0
  77. package/dist/src/commands/tools-ui/CommandReference.js +33 -0
  78. package/dist/src/commands/tools-ui/CommandReference.js.map +1 -0
  79. package/dist/src/commands/tools-ui/ConfigSources.d.ts +6 -0
  80. package/dist/src/commands/tools-ui/ConfigSources.d.ts.map +1 -0
  81. package/dist/src/commands/tools-ui/ConfigSources.js +27 -0
  82. package/dist/src/commands/tools-ui/ConfigSources.js.map +1 -0
  83. package/dist/src/commands/tools-ui/RegisterSettings.d.ts +8 -0
  84. package/dist/src/commands/tools-ui/RegisterSettings.d.ts.map +1 -0
  85. package/dist/src/commands/tools-ui/RegisterSettings.js +125 -0
  86. package/dist/src/commands/tools-ui/RegisterSettings.js.map +1 -0
  87. package/dist/src/commands/tools-ui/RoleMappings.d.ts +9 -0
  88. package/dist/src/commands/tools-ui/RoleMappings.d.ts.map +1 -0
  89. package/dist/src/commands/tools-ui/RoleMappings.js +104 -0
  90. package/dist/src/commands/tools-ui/RoleMappings.js.map +1 -0
  91. package/dist/src/commands/tools-ui/ToolsDashboard.d.ts +8 -0
  92. package/dist/src/commands/tools-ui/ToolsDashboard.d.ts.map +1 -0
  93. package/dist/src/commands/tools-ui/ToolsDashboard.js +60 -0
  94. package/dist/src/commands/tools-ui/ToolsDashboard.js.map +1 -0
  95. package/dist/src/commands/tools-ui/ToolsOverview.d.ts +9 -0
  96. package/dist/src/commands/tools-ui/ToolsOverview.d.ts.map +1 -0
  97. package/dist/src/commands/tools-ui/ToolsOverview.js +84 -0
  98. package/dist/src/commands/tools-ui/ToolsOverview.js.map +1 -0
  99. package/dist/src/commands/tools.d.ts +3 -0
  100. package/dist/src/commands/tools.d.ts.map +1 -0
  101. package/dist/src/commands/tools.js +78 -0
  102. package/dist/src/commands/tools.js.map +1 -0
  103. package/dist/src/config/cli-tools-config.d.ts +64 -3
  104. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  105. package/dist/src/config/cli-tools-config.js +226 -9
  106. package/dist/src/config/cli-tools-config.js.map +1 -1
  107. package/dist/src/core/component-defs.d.ts +16 -0
  108. package/dist/src/core/component-defs.d.ts.map +1 -0
  109. package/dist/src/core/component-defs.js +142 -0
  110. package/dist/src/core/component-defs.js.map +1 -0
  111. package/dist/src/core/manifest.d.ts +8 -1
  112. package/dist/src/core/manifest.d.ts.map +1 -1
  113. package/dist/src/core/manifest.js +29 -40
  114. package/dist/src/core/manifest.js.map +1 -1
  115. package/dist/src/core/tag-injector.d.ts +72 -0
  116. package/dist/src/core/tag-injector.d.ts.map +1 -0
  117. package/dist/src/core/tag-injector.js +228 -0
  118. package/dist/src/core/tag-injector.js.map +1 -0
  119. package/dist/src/index.d.ts +4 -0
  120. package/dist/src/index.d.ts.map +1 -1
  121. package/dist/src/index.js +2 -0
  122. package/dist/src/index.js.map +1 -1
  123. package/dist/tsconfig.tsbuildinfo +1 -0
  124. package/package.json +1 -1
  125. package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +1 -1
  126. package/templates/cli/prompts/workflow-skill-lessons-learned.txt +1 -1
  127. package/templates/search-tools.md +1 -1
  128. package/templates/workflows/specs/node-catalog.md +1 -1
  129. package/workflows/brainstorm.md +1 -1
  130. package/{.claude/CLAUDE.md → workflows/claude-instructions.md} +25 -26
  131. package/workflows/cli-tools-usage.md +16 -2
  132. package/workflows/codex-instructions.md +150 -0
  133. package/workflows/delegate-usage.md +16 -2
  134. package/workflows/execute.md +28 -14
  135. package/workflows/init.md +2 -2
  136. package/workflows/issue-discover.md +2 -2
  137. package/workflows/maestro-super.md +120 -0
  138. package/workflows/maestro.codex.md +4 -4
  139. package/workflows/maestro.md +5 -5
  140. package/workflows/roadmap-common.md +197 -0
  141. package/workflows/roadmap.md +190 -355
  142. package/workflows/spec-generate.md +457 -544
  143. package/.claude/commands/maestro-spec-generate.md +0 -78
  144. package/.codex/skills/maestro-spec-generate/SKILL.md +0 -355
@@ -22,7 +22,8 @@ maestro delegate "<PROMPT>" [options]
22
22
 
23
23
  | Option | Description | Default |
24
24
  |--------|-------------|---------|
25
- | `--to <name>` | Tool: gemini, qwen, codex, claude, opencode | First enabled in config |
25
+ | `--to <tool>` | Explicit tool: gemini, qwen, codex, claude, opencode | First enabled in config |
26
+ | `--role <role>` | Capability role: analyze, explore, review, implement, plan, brainstorm, research | — (resolves via config) |
26
27
  | `--mode <mode>` | `analysis` (read-only) or `write` (create/modify/delete) | `analysis` |
27
28
  | `--model <model>` | Model override | Tool's `primaryModel` |
28
29
  | `--cd <dir>` | Working directory | Current directory |
@@ -32,6 +33,19 @@ maestro delegate "<PROMPT>" [options]
32
33
  | `--resume [id]` | Resume session (last if no id, comma-separated for merge) | — |
33
34
  | `--backend <type>` | Adapter backend: `direct` or `terminal` (tmux/wezterm) | `direct` |
34
35
 
36
+ ### Tool Resolution Priority
37
+
38
+ 1. `--to <tool>` — explicit tool selection (backward compat, highest priority)
39
+ 2. `--role <role>` — capability-based auto-selection via config
40
+ 3. No flag — first enabled tool in config
41
+
42
+ ### Role-Based Tool Selection
43
+
44
+ Roles map to tools via `cli-tools.json` configuration:
45
+ - User-defined roles in `roles` section override built-in defaults
46
+ - Workspace `.maestro/cli-tools.json` overrides global `~/.maestro/cli-tools.json`
47
+ - Built-in roles: `analyze`, `explore`, `review`, `implement`, `plan`, `brainstorm`, `research`
48
+
35
49
  ### Mode Definition (Authoritative)
36
50
 
37
51
  | Mode | Permission | Auto-Invoke Safe | Use For |
@@ -236,6 +250,6 @@ Proactively invoke `maestro delegate` when these conditions are met — no user
236
250
 
237
251
  - Default `--mode analysis` (safe, read-only)
238
252
  - Wait for results before next action
239
- - Tool fallback: `gemini` `qwen` `codex`
253
+ - Use `--role` for capability-based tool selection; fallback chain is config-driven
240
254
  - Rule suggestions are guidelines — choose the best fit
241
255
  </execution>
@@ -0,0 +1,150 @@
1
+ # Codex Code Guidelines
2
+
3
+
4
+ ## Code Quality Standards
5
+
6
+ ### Code Quality
7
+ - Follow project's existing patterns
8
+ - Match import style and naming conventions
9
+ - Single responsibility per function/class
10
+ - DRY (Don't Repeat Yourself)
11
+ - YAGNI (You Aren't Gonna Need It)
12
+
13
+ ### Testing
14
+ - Test all public functions
15
+ - Test edge cases and error conditions
16
+ - Mock external dependencies
17
+ - Target 80%+ coverage
18
+
19
+ ### Error Handling
20
+ - Proper try-catch blocks
21
+ - Clear error messages
22
+ - Graceful degradation
23
+ - Don't expose sensitive info
24
+
25
+ ## Core Principles
26
+
27
+ **Incremental Progress**:
28
+ - Small, testable changes
29
+ - Commit working code frequently
30
+ - Build on previous work (subtasks)
31
+
32
+ **Evidence-Based**:
33
+ - Study 3+ similar patterns before implementing
34
+ - Match project style exactly
35
+ - Verify with existing code
36
+
37
+ **Pragmatic**:
38
+ - Boring solutions over clever code
39
+ - Simple over complex
40
+ - Adapt to project reality
41
+
42
+ **Context Continuity** (Multi-Task):
43
+ - Leverage resume for consistency
44
+ - Maintain established patterns
45
+ - Test integration between subtasks
46
+
47
+ **Git Operations** (Parallel Task Safety):
48
+ - Only stage/commit files directly produced by current task
49
+ - Never touch unrelated changes or other task outputs
50
+ - Use `git add <specific-files>` instead of `git add .`
51
+ - Verify staged files before commit to avoid cross-task conflicts
52
+
53
+ **Multi-CLI Coexistence** (CRITICAL):
54
+ - If your task conflicts with existing uncommitted changes, **STOP and report the conflict** instead of overwriting
55
+ - Treat all pre-existing uncommitted changes as intentional work-in-progress by other tools
56
+
57
+
58
+ ## System Optimization
59
+
60
+ **Direct Binary Calls**: Always call binaries directly in `functions.shell`, set `workdir`, avoid shell wrappers (`bash -lc`, `cmd /c`, etc.)
61
+
62
+ **Text Editing Priority**:
63
+ 1. Use `apply_patch` tool for all routine text edits
64
+ 2. Fall back to `sed` for single-line substitutions if unavailable
65
+ 3. Avoid Python editing scripts unless both fail
66
+
67
+ **apply_patch invocation**:
68
+ ```json
69
+ {
70
+ "command": ["apply_patch", "*** Begin Patch\n*** Update File: path/to/file\n@@\n- old\n+ new\n*** End Patch\n"],
71
+ "workdir": "<workdir>",
72
+ "justification": "Brief reason"
73
+ }
74
+ ```
75
+
76
+ **Windows UTF-8 Encoding** (before commands):
77
+ ```powershell
78
+ [Console]::InputEncoding = [Text.UTF8Encoding]::new($false)
79
+ [Console]::OutputEncoding = [Text.UTF8Encoding]::new($false)
80
+ chcp 65001 > $null
81
+ ```
82
+
83
+ ## Context Acquisition (MCP Tools Priority)
84
+
85
+ **For task context gathering and analysis, ALWAYS prefer MCP tools**:
86
+
87
+ 1. **mcp__ace-tool__search_context** - HIGHEST PRIORITY for code discovery
88
+ - Semantic search with real-time codebase index
89
+ - Use for: finding implementations, understanding architecture, locating patterns
90
+ - Example: `mcp__ace-tool__search_context(project_root_path="/path", query="authentication logic")`
91
+
92
+ 2. **smart_search** - Fallback for structured search
93
+ - Use `smart_search(query="...")` for keyword/regex search
94
+ - Use `smart_search(action="find_files", pattern="*.ts")` for file discovery
95
+ - Supports modes: `auto`, `hybrid`, `exact`, `ripgrep`
96
+
97
+ 3. **read_file** - Batch file reading
98
+ - Read multiple files in parallel: `read_file(path="file1.ts")`, `read_file(path="file2.ts")`
99
+ - Supports glob patterns: `read_file(path="src/**/*.config.ts")`
100
+
101
+ **Priority Order**:
102
+ ```
103
+ ACE search_context (semantic) → smart_search (structured) → read_file (batch read) → shell commands (fallback)
104
+ ```
105
+
106
+ **NEVER** use shell commands (`cat`, `find`, `grep`) when MCP tools are available.
107
+
108
+ ## Workflow Session Awareness
109
+
110
+ | Workflow | Directory | Summary File |
111
+ |----------|-----------|-------------|
112
+ | `workflow-plan` | `.workflow/active/WFS-*/` | `workflow-session.json` |
113
+ | `workflow-lite-plan` | `.workflow/.lite-plan/{date}-{slug}/` | `plan.json` |
114
+ | `analyze-with-file` | `.workflow/.analysis/ANL-*/` | `conclusions.json` |
115
+ | `multi-cli-plan` | `.workflow/.multi-cli-plan/*/` | `session-state.json` |
116
+ | `lite-fix` | `.workflow/.lite-fix/*/` | `fix-plan.json` |
117
+ | Other | `.workflow/.debug/`, `.workflow/.scratchpad/`, `.workflow/archives/` | — |
118
+
119
+ Before starting work, scan recent sessions (7 days) to avoid conflicts and reuse prior work:
120
+ - Overlapping file scope → warn, suggest referencing prior session
121
+ - Complementary findings → feed into current task context
122
+
123
+
124
+ ## Knowledge Capture
125
+
126
+ - **Spec writes** → always `<spec-entry>` closed-tag format with `category`, `keywords`, `date`, `source`. Never raw Markdown. Route through `spec-add` when possible.
127
+ - **Capture signal** → when execution surfaces non-obvious knowledge (plan deviation, retry pattern, root cause, constraint violation), ask user once whether to persist it. Match category to content: decisions→`arch`, pitfalls→`debug`/`learning`, patterns→`coding`, rules→`quality`.
128
+ - **Promotion** → at milestone close, scan learnings for repeated keywords (≥2 entries) and offer to graduate them into formal conventions.
129
+ - **Traceability** → every entry needs a source anchor: `file:line`, `INS-{id}`, commit, or phase path.
130
+
131
+ ## Execution Checklist
132
+
133
+ **Before**:
134
+ - [ ] Understand PURPOSE and TASK clearly
135
+ - [ ] Use ACE search_context first, fallback to smart_search for discovery
136
+ - [ ] Use read_file to batch read context files, find 3+ patterns
137
+ - [ ] Check RULES templates and constraints
138
+
139
+ **During**:
140
+ - [ ] Follow existing patterns exactly
141
+ - [ ] Write tests alongside code
142
+ - [ ] Run tests after every change
143
+ - [ ] Commit working code incrementally
144
+
145
+ **After**:
146
+ - [ ] All tests pass
147
+ - [ ] Coverage meets target
148
+ - [ ] Build succeeds
149
+ - [ ] All EXPECTED deliverables met
150
+ - [ ] Non-obvious knowledge surfaced? → offer `spec-add`
@@ -22,7 +22,8 @@ maestro delegate "<PROMPT>" [options]
22
22
 
23
23
  | Option | Description | Default |
24
24
  |--------|-------------|---------|
25
- | `--to <tool>` | Tool: gemini, qwen, codex, claude, opencode | First enabled in config |
25
+ | `--to <tool>` | Explicit tool: gemini, qwen, codex, claude, opencode | First enabled in config |
26
+ | `--role <role>` | Capability role: analyze, explore, review, implement, plan, brainstorm, research | — (resolves via config) |
26
27
  | `--mode <mode>` | `analysis` (read-only) or `write` (create/modify/delete) | `analysis` |
27
28
  | `--model <model>` | Model override | Tool's `primaryModel` |
28
29
  | `--cd <dir>` | Working directory | Current directory |
@@ -32,6 +33,19 @@ maestro delegate "<PROMPT>" [options]
32
33
  | `--includeDirs <dirs>` | Additional directories (comma-separated) | — |
33
34
  | `--backend <type>` | Adapter backend: `direct` or `terminal` (tmux/wezterm) | `direct` |
34
35
 
36
+ ### Tool Resolution Priority
37
+
38
+ 1. `--to <tool>` — explicit tool selection (backward compat, highest priority)
39
+ 2. `--role <role>` — capability-based auto-selection via config
40
+ 3. No flag — first enabled tool in config
41
+
42
+ ### Role-Based Tool Selection
43
+
44
+ Roles map to tools via `cli-tools.json` configuration:
45
+ - User-defined roles in `roles` section override built-in defaults
46
+ - Workspace `.maestro/cli-tools.json` overrides global `~/.maestro/cli-tools.json`
47
+ - Built-in roles: `analyze`, `explore`, `review`, `implement`, `plan`, `brainstorm`, `research`
48
+
35
49
  ### Mode Definition (Authoritative)
36
50
 
37
51
  | Mode | Permission | Auto-Invoke Safe | Use For |
@@ -284,7 +298,7 @@ Proactively invoke `maestro delegate` when these conditions are met — no user
284
298
 
285
299
  - Default `--mode analysis` (safe, read-only)
286
300
  - Always `Bash(run_in_background: true)` — stop immediately, wait for callback
287
- - Tool fallback: `gemini` `qwen` `codex`
301
+ - Use `--role` for capability-based tool selection; fallback chain is config-driven
288
302
  - Rule suggestions are guidelines — choose the best fit
289
303
  - Use `inject` for supplementary context mid-execution; `after_complete` for chained multi-step tasks
290
304
  </execution>
@@ -48,16 +48,30 @@ For each PLAN_DIR in PLAN_DIRS (sequential):
48
48
 
49
49
  ## E0.5: Execution Options Confirmation
50
50
 
51
- **Purpose:** Let user choose how tasks execute. Supports both menu selection and natural language intent (e.g., "前端用gemini,后端用codex,其余agent"). Skipped when `-y` flag or executionContext already confirmed.
51
+ **Purpose:** Let user choose how tasks execute. Reads available tools from `delegate-config show --json` to build dynamic options. Supports both menu selection and natural language intent. Skipped when `-y` flag or executionContext already confirmed.
52
52
 
53
53
  ### Skip conditions
54
54
 
55
55
  - `-y` flag → use resolved defaults, skip prompt
56
56
  - `executionContext.executionMethod` already set → skip (confirmed in /maestro-plan)
57
57
 
58
+ ### Pre-step: Load tool config
59
+
60
+ ```
61
+ Run: maestro delegate-config show --json
62
+ Parse: { tools, roles } — extract enabled tool names and domain tags
63
+ Build dynamic options from enabled tools (exclude agent which is always available)
64
+ ```
65
+
58
66
  ### Tool Call
59
67
 
68
+ Build AskUserQuestion dynamically from enabled tools:
69
+
60
70
  ```
71
+ // availableTools = enabled tools from delegate-config (e.g. ["gemini", "claude", "codex"])
72
+ // frontendTool = first tool with "frontend" tag, fallback first enabled
73
+ // backendTool = first tool with "backend" tag, fallback first enabled
74
+
61
75
  AskUserQuestion({
62
76
  questions: [
63
77
  {
@@ -65,10 +79,10 @@ AskUserQuestion({
65
79
  header: "Executor",
66
80
  multiSelect: false,
67
81
  options: [
68
- { label: "Auto (Recommended)", description: "Per-task domain routing: frontend→gemini, backend→codex, general→agent" },
82
+ { label: "Auto (Recommended)", description: `Per-task domain routing: frontend→${frontendTool}, backend→${backendTool}, general→agent` },
69
83
  { label: "Agent", description: "Claude Code agent for all tasks (fastest)" },
70
- { label: "Codex", description: "Codex CLI for all tasks (strong for complex backend)" },
71
- { label: "Gemini", description: "Gemini CLI for all tasks (strong for frontend/UI)" }
84
+ // One option per enabled CLI tool:
85
+ ...availableTools.map(t => ({ label: t, description: `${t} CLI for all tasks` }))
72
86
  ]
73
87
  },
74
88
  {
@@ -77,8 +91,8 @@ AskUserQuestion({
77
91
  multiSelect: false,
78
92
  options: [
79
93
  { label: "Skip (Recommended)", description: "No code review, proceed to verification" },
80
- { label: "Gemini Review", description: "Gemini CLI: git diff quality review" },
81
- { label: "Codex Review", description: "Codex CLI: git-aware code review" }
94
+ // One option per enabled CLI tool with review capability:
95
+ ...availableTools.map(t => ({ label: `${t} Review`, description: `${t} CLI: git diff quality review` }))
82
96
  ]
83
97
  }
84
98
  ]
@@ -91,11 +105,11 @@ AskUserQuestion({
91
105
 
92
106
  | Answer | executionMethod | domainRouting |
93
107
  |--------|----------------|---------------|
94
- | "Auto" | `"auto"` | `{ frontend: "gemini", backend: "codex", default: "agent" }` |
95
- | "Agent" / "Codex" / "Gemini" | that value | not used |
96
- | Other text with domain rules | `"auto"` | Parse from user text (see examples below) |
108
+ | "Auto" | `"auto"` | `{ frontend: frontendTool, backend: backendTool, default: "agent" }` |
109
+ | "Agent" / tool name | that value | not used |
110
+ | Other text with domain rules | `"auto"` | Parse from user text |
97
111
 
98
- Other text parsing examples:
112
+ Other text parsing — match tool names dynamically from enabled tools:
99
113
 
100
114
  | User types | domainRouting |
101
115
  |------------|---------------|
@@ -134,9 +148,9 @@ If executionContext is available in memory:
134
148
  Read ${PLAN_DIR}/plan.json
135
149
 
136
150
  executionMethod = E0.5 selection || --method flag || config.json.execution.method || "auto"
137
- defaultExecutor = --executor flag || config.json.execution.default_executor || "gemini"
151
+ defaultExecutor = --executor flag || config.json.execution.default_executor || first enabled tool from delegate-config
138
152
  executorAssignments = plan.json.executor_assignments || {}
139
- domainRouting = E0.5 domainRouting || { frontend: "gemini", backend: "codex", default: "agent" }
153
+ domainRouting = E0.5 domainRouting || built from delegate-config domain tags (frontend→tag match, backend→tag match, default"agent")
140
154
  codeReviewTool = E0.5 selection || "Skip"
141
155
  ```
142
156
 
@@ -340,9 +354,9 @@ If none critical: log "passed" and continue to E2.6
340
354
  If codeReviewTool == "Skip": continue to E3
341
355
 
342
356
  Dispatch review via maestro delegate (run_in_background: true):
343
- --to gemini|codex (per codeReviewTool selection) --mode analysis
357
+ --to ${codeReviewTool} --mode analysis
344
358
  Prompt: review git diff (execution start → HEAD) for correctness, style, bugs
345
- Rule: analysis-review-code-quality (gemini only)
359
+ Rule: analysis-review-code-quality
346
360
  Expected: severity-ranked issues with file:line references and fix suggestions
347
361
 
348
362
  Wait for completion, log findings summary
package/workflows/init.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Workflow: init
2
2
 
3
- Project initialization with automatic state detection. Creates project infrastructure only — roadmap creation is handled by maestro-spec-generate or maestro-roadmap.
3
+ Project initialization with automatic state detection. Creates project infrastructure only — roadmap creation is handled by maestro-roadmap (light or full mode).
4
4
 
5
5
  ---
6
6
 
@@ -143,7 +143,7 @@ Verify all required directories and files exist:
143
143
  - Config highlights (mode, granularity, execution method, enabled agents)
144
144
  - Research summary (if research was run)
145
145
  3. Route next steps:
146
- - "Run `/maestro-spec-generate` to create full spec package with roadmap (heavy path)"
146
+ - "Run `/maestro-roadmap --mode full` to create full spec package with roadmap (heavy path)"
147
147
  - "Run `/maestro-roadmap` to create interactive roadmap directly (light path)"
148
148
  - "Run `/manage-status` to view project dashboard"
149
149
  - "Run `/maestro-brainstorm` to explore ideas first"
@@ -109,7 +109,7 @@ Per perspective → delegate analysis:
109
109
  CONTEXT: @**/*
110
110
  EXPECTED: JSON array: [{ title, severity, description, location, fix_direction, affected_components[] }]
111
111
  CONSTRAINTS: Evidence-backed findings only
112
- " --to gemini --mode analysis
112
+ " --role analyze --mode analysis
113
113
 
114
114
  Results → .workflow/issues/discoveries/{SESSION_ID}/{PERSPECTIVE}-findings.json
115
115
  Update discovery-state.json: perspectives_completed += ["{PERSPECTIVE}"]
@@ -170,7 +170,7 @@ Delegate to decompose USER_PROMPT into 3-5 exploration dimensions:
170
170
 
171
171
  maestro delegate "Decompose into searchable dimensions: {USER_PROMPT}
172
172
  EXPECTED: JSON array: [{ name, description, search_patterns[], file_patterns[], finding_criteria }]
173
- " --to gemini --mode analysis
173
+ " --role analyze --mode analysis
174
174
 
175
175
  Store → .workflow/issues/discoveries/{SESSION_ID}/exploration-plan.json
176
176
  ```
@@ -0,0 +1,120 @@
1
+ # Super Mode (`--super`)
2
+
3
+ Goal: deliver a production-ready, complete software system from user requirements. No user decisions needed — maestro autonomously expands, refines, and implements until the system meets mainstream quality standards.
4
+
5
+ Super mode implies `-y` (all auto flags propagated) plus these additional behaviors:
6
+
7
+ ## 1. Requirement Expansion
8
+
9
+ On receiving user intent, autonomously expand incomplete requirements into a complete product scope. Delegate via role (`maestro delegate --role analyze --mode analysis`) for requirement completeness analysis and gap-filling. Accept requirements that add real user value; discard noise.
10
+
11
+ ## 2. Progressive Document Loading
12
+
13
+ Read execution documents (workflow maestro.md, chain steps) incrementally per-phase rather than loading all upfront. Each milestone loads only the relevant section to preserve context window.
14
+
15
+ ## 3. Autonomous Decision-Making
16
+
17
+ All design/architecture/scope decisions are made via Gemini delegate (`--mode analysis`). No AskUserQuestion calls. Decision criteria: mainstream industry standards, pragmatism, simplicity.
18
+
19
+ ## 4. Auto-Advance Milestones
20
+
21
+ After each milestone completes and passes verification, automatically advance to the next milestone without user confirmation. Run `maestro-milestone-complete` → next milestone chain automatically.
22
+
23
+ ## 5. Quality Gate Scoring
24
+
25
+ Each milestone must pass a readiness score before advancing. Prevents premature exit.
26
+
27
+ | Dimension | Weight | Minimum |
28
+ |-----------|--------|---------|
29
+ | Code completeness (features implemented vs planned) | 25% | 90% |
30
+ | Test coverage (lines + branches) | 20% | 70% |
31
+ | Build & run success (clean build, app starts) | 20% | 100% |
32
+ | Code quality (lint clean, no ts errors) | 15% | 90% |
33
+ | Integration coherence (cross-module contracts) | 10% | 80% |
34
+ | Documentation (API docs, README, setup guide) | 10% | 60% |
35
+ | **Weighted total** | | **≥ 80%** |
36
+
37
+ Score is computed via `maestro-verify` + Gemini analysis. If score < 80%, generate fix plan and re-execute until threshold is met (max 3 retries per milestone, then report blockers).
38
+
39
+ ## 6. Completion Criteria
40
+
41
+ Super mode only terminates when:
42
+ - All roadmap milestones completed and scored ≥ 80%
43
+ - Final system builds, starts, and passes all tests
44
+ - Gemini confirms the system is production-ready via final audit
45
+
46
+ ## 7. State Tracking
47
+
48
+ Super mode extends the standard session `status.json` (`.workflow/.maestro/{session_id}/status.json`). No extra files — all state in one place.
49
+
50
+ ### 7a. status.json 扩展字段
51
+
52
+ ```json
53
+ {
54
+ "session_id": "...",
55
+ "status": "running",
56
+ "super": true,
57
+ "super_state": "expanding|planning|executing|scoring|advancing|completed|blocked",
58
+ "current_milestone": 1,
59
+ "total_milestones": 3,
60
+ "expanded_requirements": "...",
61
+ "milestones": [
62
+ {
63
+ "index": 1,
64
+ "name": "...",
65
+ "status": "pending|executing|scoring|completed|blocked",
66
+ "chain_session_id": null,
67
+ "retries": 0,
68
+ "max_retries": 3,
69
+ "scores": {
70
+ "code_completeness": null,
71
+ "test_coverage": null,
72
+ "build_success": null,
73
+ "code_quality": null,
74
+ "integration_coherence": null,
75
+ "documentation": null,
76
+ "weighted_total": null
77
+ },
78
+ "score_history": [],
79
+ "decisions": []
80
+ }
81
+ ],
82
+ "decision_log": [],
83
+ "steps": [ ... ]
84
+ }
85
+ ```
86
+
87
+ `super_state` values:
88
+ - `expanding` — requirement expansion via Gemini
89
+ - `planning` — roadmap/spec/plan generation
90
+ - `executing` — milestone chain execution (plan → execute → verify)
91
+ - `scoring` — quality gate evaluation
92
+ - `advancing` — milestone-complete + next milestone setup
93
+ - `completed` — all milestones passed
94
+ - `blocked` — max retries exceeded, needs user intervention
95
+
96
+ ### 7b. State transitions
97
+
98
+ ```
99
+ [start] → expanding → planning → executing(M1) → scoring(M1)
100
+ → score ≥ 80% → advancing → executing(M2) → ...
101
+ → score < 80% → retries < 3 → executing(M1) (retry)
102
+ → score < 80% → retries = 3 → blocked
103
+ → all milestones completed → completed
104
+ ```
105
+
106
+ ### 7c. Resume (`-c` or `continue`)
107
+
108
+ On resume, read `status.json`:
109
+ 1. Check `super: true` → enter super mode resume
110
+ 2. Read `super_state` + `current_milestone` → determine resume point
111
+ 3. Read milestone's `status` → resume from exact phase (e.g., interrupted during `scoring` → re-run scoring)
112
+ 4. Load `decision_log` for Gemini continuity
113
+
114
+ ### 7d. State update discipline
115
+
116
+ Update `status.json` at every state transition:
117
+ - Before milestone chain → set milestone `status: "executing"`, increment retries if retry
118
+ - After scoring → write scores to milestone, append to `score_history`
119
+ - After advancing → set previous milestone `status: "completed"`, bump `current_milestone`
120
+ - On block → set milestone `status: "blocked"`, set `super_state: "blocked"`
@@ -138,7 +138,7 @@ const chainMap = {
138
138
  // ── Multi-step chains ────────────────────────────────────────────────────
139
139
  'spec-driven': [
140
140
  { cmd: 'maestro-init' },
141
- { cmd: 'maestro-spec-generate', args: '"{description}"' },
141
+ { cmd: 'maestro-roadmap', args: '--mode full "{description}"' },
142
142
  { cmd: 'maestro-plan', args: '{phase}' },
143
143
  { cmd: 'maestro-execute', args: '{phase}' },
144
144
  { cmd: 'maestro-verify', args: '{phase}' }
@@ -306,9 +306,9 @@ MAESTRO-COORDINATE: {chain_name} (dry run)
306
306
 
307
307
  Create session directory `.workflow/.maestro/maestro-{timestamp}/`.
308
308
 
309
- **Barrier skills** (solo wave, coordinator analyzes artifacts after): `maestro-analyze`, `maestro-plan`, `maestro-brainstorm`, `maestro-spec-generate`, `maestro-execute`.
309
+ **Barrier skills** (solo wave, coordinator analyzes artifacts after): `maestro-analyze`, `maestro-plan`, `maestro-brainstorm`, `maestro-roadmap`, `maestro-execute`.
310
310
 
311
- **Auto-flag injection** (when AUTO_YES): `maestro-analyze/-brainstorm/-ui-design/-spec-generate` → `-y`, `maestro-plan` → `--auto`, `quality-test` → `--auto-fix`, `quality-retrospective` → `--auto-yes`.
311
+ **Auto-flag injection** (when AUTO_YES): `maestro-analyze/-brainstorm/-roadmap/-ui-design` → `-y`, `maestro-plan` → `--auto`, `quality-test` → `--auto-fix`, `quality-retrospective` → `--auto-yes`.
312
312
 
313
313
  Initialize `state.json` with: session_id, intent, chain_name, auto_yes, context (phase, dirs, issue_id, gaps), waves[], and steps[] (each with index, cmd, args, status=pending).
314
314
 
@@ -352,7 +352,7 @@ Context updates per barrier skill:
352
352
  | `maestro-analyze` | `analysis_dir`, gaps (from context.md markers), phase (if detected) |
353
353
  | `maestro-plan` | `plan_dir`, task/wave count (from plan.json) |
354
354
  | `maestro-brainstorm` | `brainstorm_dir` |
355
- | `maestro-spec-generate` | `spec_session_id` (SPEC-* pattern) |
355
+ | `maestro-roadmap` | `spec_session_id` (SPEC-* pattern) |
356
356
  | `maestro-execute` | `exec_completed`/`exec_failed` counts (from results.csv) |
357
357
 
358
358
  **Key principle**: The coordinator owns all context assembly. Sub-agents receive a fully-resolved `skill_call`.
@@ -1,7 +1,7 @@
1
1
  # Workflow: maestro
2
2
 
3
3
  Intelligent coordinator that routes user intent to optimal command chain based on project state.
4
- Dual execution engines: **Skill()** (in-process, synchronous) and **CLI delegate** (via `maestro delegate`, async with gemini quality analysis).
4
+ Dual execution engines: **Skill()** (in-process, synchronous) and **CLI delegate** (via `maestro delegate`, async with role-based tool selection).
5
5
  Default `auto` mode selects engine based on chain complexity.
6
6
 
7
7
  **Prerequisites:**
@@ -222,7 +222,7 @@ resolvePhase — priority order:
222
222
  3. From project state artifacts: in-progress execute → first incomplete phase → latest artifact phase
223
223
  4. null if chain is 'analyze-plan-execute' (uses {scratch_dir} instead)
224
224
  5. null if all chain commands are phase-independent:
225
- manage-status, manage-issue, manage-issue-discover, maestro-init, maestro-spec-generate,
225
+ manage-status, manage-issue, manage-issue-discover, maestro-init,
226
226
  maestro-fork, maestro-merge, maestro-roadmap, spec-setup, manage-knowhow, manage-knowhow-capture,
227
227
  manage-learn, manage-codebase-rebuild, manage-codebase-refresh, maestro-milestone-audit,
228
228
  maestro-milestone-complete
@@ -245,7 +245,7 @@ Engine is selected **per step**, not per chain.
245
245
  ```
246
246
  If execMode is 'cli' or 'skill' → force that engine for all steps.
247
247
  In 'auto' mode, select per step:
248
- CLI steps (heavy, context-isolated): maestro-plan, maestro-execute, maestro-analyze, maestro-brainstorm, maestro-spec-generate, maestro-roadmap, maestro-ui-design, quality-refactor
248
+ CLI steps (heavy, context-isolated): maestro-plan, maestro-execute, maestro-analyze, maestro-brainstorm, maestro-roadmap, maestro-ui-design, quality-refactor
249
249
  Skill steps (everything else): observable, interactive, lightweight (verify, review, test, debug, milestone-*, manage-*, spec-*, quick, etc.)
250
250
  ```
251
251
 
@@ -282,7 +282,7 @@ Context object tracks: current_phase, user_intent, issue_id, spec_session_id, sc
282
282
 
283
283
  assembleArgs: substitute placeholders {phase}, {description}, {issue_id}, {spec_session_id}, {scratch_dir} in step.args.
284
284
  In auto_mode, append per-command flag if not already present:
285
- maestro-analyze/brainstorm/roadmap/ui-design/spec-generate → -y
285
+ maestro-analyze/brainstorm/roadmap/ui-design → -y
286
286
  maestro-plan → --auto
287
287
  quality-test → --auto-fix
288
288
  quality-retrospective → --auto-yes
@@ -425,7 +425,7 @@ const chainMap = {
425
425
 
426
426
  // ── Multi-step chains ──
427
427
  'full-lifecycle': [{ cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }, { cmd: 'quality-review', args: '{phase}' }, { cmd: 'quality-test', args: '{phase}' }, { cmd: 'maestro-milestone-audit' }],
428
- 'spec-driven': [{ cmd: 'maestro-init' }, { cmd: 'maestro-spec-generate', args: '"{description}"' }, { cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }],
428
+ 'spec-driven': [{ cmd: 'maestro-init' }, { cmd: 'maestro-roadmap', args: '--mode full "{description}"' }, { cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }],
429
429
  'roadmap-driven': [{ cmd: 'maestro-init' }, { cmd: 'maestro-roadmap', args: '"{description}"' }, { cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }],
430
430
  'brainstorm-driven': [{ cmd: 'maestro-brainstorm', args: '"{description}"' }, { cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }],
431
431
  'ui-design-driven': [{ cmd: 'maestro-ui-design', args: '{phase}' }, { cmd: 'maestro-plan', args: '{phase}' }, { cmd: 'maestro-execute', args: '{phase}' }, { cmd: 'maestro-verify', args: '{phase}' }],