maestro-flow 0.4.6 → 0.4.8
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/commands/maestro-ralph.md +548 -377
- package/.claude/commands/maestro.md +220 -191
- package/.codex/skills/maestro/SKILL.md +495 -462
- package/.codex/skills/maestro-collab/SKILL.md +218 -117
- package/.codex/skills/maestro-execute/SKILL.md +13 -11
- package/.codex/skills/maestro-milestone-audit/SKILL.md +12 -10
- package/.codex/skills/maestro-ralph/SKILL.md +491 -339
- package/.codex/skills/maestro-ui-codify/SKILL.md +18 -16
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +20 -13
- package/.codex/skills/manage-issue-discover/SKILL.md +19 -17
- package/.codex/skills/quality-debug/SKILL.md +35 -31
- package/.codex/skills/quality-refactor/SKILL.md +20 -12
- package/.codex/skills/quality-review/SKILL.md +21 -17
- package/.codex/skills/team-coordinate/SKILL.md +462 -235
- package/.codex/skills/team-coordinate/specs/role-catalog.md +132 -0
- package/.codex/skills/team-lifecycle-v4/SKILL.md +445 -191
- package/.codex/skills/team-quality-assurance/SKILL.md +205 -161
- package/.codex/skills/team-review/SKILL.md +198 -159
- package/.codex/skills/team-tech-debt/SKILL.md +214 -144
- package/.codex/skills/team-testing/SKILL.md +210 -158
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +25 -33
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js +9 -3
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-app-server-adapter.js +5 -2
- package/dashboard/dist-server/dashboard/src/server/agents/codex-app-server-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +20 -8
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.js +6 -3
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.test.js +7 -1
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/opencode-adapter.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/agents/opencode-adapter.js +40 -15
- package/dashboard/dist-server/dashboard/src/server/agents/opencode-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.js +59 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.test.js +78 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.d.ts +25 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.js +40 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.test.js +89 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +19 -8
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.d.ts +6 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.js +7 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.test.js +46 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.test.js.map +1 -0
- package/dashboard/dist-server/shared/agent-types.d.ts +6 -0
- package/dist/shared/agent-types.d.ts +6 -0
- package/dist/shared/agent-types.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts +3 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +1 -0
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/commands/delegate.d.ts +2 -0
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +18 -0
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts +3 -0
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/package.json +1 -1
- package/shared/agent-types.ts +237 -231
- package/.codex/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +0 -247
- package/.codex/skills/team-coordinate/roles/coordinator/commands/dispatch.md +0 -126
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +0 -265
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +0 -403
- package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +0 -113
- package/.codex/skills/team-coordinate/specs/pipelines.md +0 -97
- package/.codex/skills/team-coordinate/specs/quality-gates.md +0 -112
- package/.codex/skills/team-coordinate/specs/role-spec-template.md +0 -192
- package/.codex/skills/team-executor/SKILL.md +0 -116
- package/.codex/skills/team-executor/roles/executor/commands/monitor.md +0 -213
- package/.codex/skills/team-executor/roles/executor/role.md +0 -173
- package/.codex/skills/team-executor/specs/session-schema.md +0 -230
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +0 -56
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +0 -61
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +0 -113
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +0 -189
- package/.codex/skills/team-lifecycle-v4/schemas/tasks-schema.md +0 -100
- package/.codex/skills/team-lifecycle-v4/specs/knowledge-transfer.md +0 -204
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +0 -72
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +0 -108
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +0 -163
- package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +0 -177
- package/.codex/skills/team-review/roles/coordinator/commands/analyze.md +0 -71
- package/.codex/skills/team-review/roles/coordinator/commands/dispatch.md +0 -90
- package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +0 -135
- package/.codex/skills/team-review/roles/coordinator/role.md +0 -176
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/analyze.md +0 -47
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +0 -163
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +0 -133
- package/.codex/skills/team-tech-debt/roles/coordinator/role.md +0 -173
- package/.codex/skills/team-testing/roles/coordinator/commands/analyze.md +0 -70
- package/.codex/skills/team-testing/roles/coordinator/commands/dispatch.md +0 -106
- package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +0 -156
- package/.codex/skills/team-testing/roles/coordinator/role.md +0 -185
|
@@ -1,191 +1,220 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro
|
|
3
|
-
description: Auto-route intent to optimal command chain
|
|
4
|
-
argument-hint: "<intent> [-y] [-c] [--dry-run] [--exec auto|cli|internal] [--tool <name>] [--super]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- Agent
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
- TodoWrite
|
|
15
|
-
---
|
|
16
|
-
<purpose>
|
|
17
|
-
Orchestrate all maestro commands based on user intent and project state.
|
|
18
|
-
Classify intent → select chain → create session → dispatch to `maestro-ralph-execute`.
|
|
19
|
-
|
|
20
|
-
Entry points:
|
|
21
|
-
- **`/maestro "intent"`** — Intent-based: classify → chain → execute
|
|
22
|
-
- **`/maestro -c`** — Resume previous session
|
|
23
|
-
- **`/maestro --dry-run "intent"`** — Show chain, no execution
|
|
24
|
-
- **`/maestro --super "intent"`** — Production-ready mode (read maestro-super.md)
|
|
25
|
-
|
|
26
|
-
Session: `.workflow/.maestro/{session_id}/status.json`
|
|
27
|
-
</purpose>
|
|
28
|
-
|
|
29
|
-
<deferred_reading>
|
|
30
|
-
- [maestro.md](~/.maestro/workflows/maestro.md) — read at execution start for intent analysis + chain selection
|
|
31
|
-
- [maestro-super.md](~/.maestro/workflows/maestro-super.md) — read when `--super` flag active
|
|
32
|
-
</deferred_reading>
|
|
33
|
-
|
|
34
|
-
<context>
|
|
35
|
-
$ARGUMENTS — user intent text, or special keywords.
|
|
36
|
-
|
|
37
|
-
**Keywords:** `continue`/`next`/`go` → state-based routing; `status` → `Skill("manage-status")`
|
|
38
|
-
|
|
39
|
-
**Flags:**
|
|
40
|
-
- `-y` / `--yes` — Auto mode: skip clarification, skip confirmation, auto-skip on errors
|
|
41
|
-
- `-c` / `--continue` — Resume previous session
|
|
42
|
-
- `--dry-run` — Show chain without executing
|
|
43
|
-
- `--exec <mode>` — `auto` (default), `cli`, `internal`
|
|
44
|
-
- `--tool <name>` — CLI tool for delegates (default: claude)
|
|
45
|
-
- `--super` — Read and follow `maestro-super.md`
|
|
46
|
-
</context>
|
|
47
|
-
|
|
48
|
-
<invariants>
|
|
49
|
-
1. **All chains dispatch via maestro-ralph-execute** — maestro never executes steps directly
|
|
50
|
-
2. **Session before execution** — status.json created before any step runs
|
|
51
|
-
3. **Auto flags only to supporting commands** — unlisted commands execute as-is
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
→
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
→
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
→
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
→
|
|
95
|
-
→
|
|
96
|
-
→
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
→ END DO:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
→
|
|
103
|
-
→
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
name: maestro
|
|
3
|
+
description: Auto-route intent to optimal command chain
|
|
4
|
+
argument-hint: "<intent> [-y] [-c] [--dry-run] [--exec auto|cli|internal] [--tool <name>] [--super]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
- TodoWrite
|
|
15
|
+
---
|
|
16
|
+
<purpose>
|
|
17
|
+
Orchestrate all maestro commands based on user intent and project state.
|
|
18
|
+
Classify intent → select chain → create session → dispatch to `maestro-ralph-execute`.
|
|
19
|
+
|
|
20
|
+
Entry points:
|
|
21
|
+
- **`/maestro "intent"`** — Intent-based: classify → chain → execute
|
|
22
|
+
- **`/maestro -c`** — Resume previous session
|
|
23
|
+
- **`/maestro --dry-run "intent"`** — Show chain, no execution
|
|
24
|
+
- **`/maestro --super "intent"`** — Production-ready mode (read maestro-super.md)
|
|
25
|
+
|
|
26
|
+
Session: `.workflow/.maestro/{session_id}/status.json`
|
|
27
|
+
</purpose>
|
|
28
|
+
|
|
29
|
+
<deferred_reading>
|
|
30
|
+
- [maestro.md](~/.maestro/workflows/maestro.md) — read at execution start for intent analysis + chain selection
|
|
31
|
+
- [maestro-super.md](~/.maestro/workflows/maestro-super.md) — read when `--super` flag active
|
|
32
|
+
</deferred_reading>
|
|
33
|
+
|
|
34
|
+
<context>
|
|
35
|
+
$ARGUMENTS — user intent text, or special keywords.
|
|
36
|
+
|
|
37
|
+
**Keywords:** `continue`/`next`/`go` → state-based routing; `status` → `Skill("manage-status")`
|
|
38
|
+
|
|
39
|
+
**Flags:**
|
|
40
|
+
- `-y` / `--yes` — Auto mode: skip clarification, skip confirmation, auto-skip on errors
|
|
41
|
+
- `-c` / `--continue` — Resume previous session
|
|
42
|
+
- `--dry-run` — Show chain without executing
|
|
43
|
+
- `--exec <mode>` — `auto` (default), `cli`, `internal`
|
|
44
|
+
- `--tool <name>` — CLI tool for delegates (default: claude)
|
|
45
|
+
- `--super` — Read and follow `maestro-super.md`
|
|
46
|
+
</context>
|
|
47
|
+
|
|
48
|
+
<invariants>
|
|
49
|
+
1. **All chains dispatch via maestro-ralph-execute** — maestro never executes steps directly
|
|
50
|
+
2. **Session before execution** — status.json created before any step runs
|
|
51
|
+
3. **Auto flags only to supporting commands** — unlisted commands execute as-is
|
|
52
|
+
4. **Decomposition contract shared with maestro-ralph** — broad/lifecycle intents run S_DECOMPOSE producing the SAME additive block (`boundary_contract`, `execution_criteria`, `task_decomposition`, `goal_checklist_path`) + `goal-checklist.md`, then EMIT the `/goal` bind prompt. Reference maestro-ralph `A_DECOMPOSE_TASKS` for the full spec; do not duplicate logic
|
|
53
|
+
5. **Status JSON: schema-additive + step-dynamic** — decomposition fields OPTIONAL (absent → old flat-chain behavior); `steps[]` is a living array grown at runtime by ralph-execute's `post-goal-audit`. Never remove/rename existing fields
|
|
54
|
+
</invariants>
|
|
55
|
+
|
|
56
|
+
<state_machine>
|
|
57
|
+
|
|
58
|
+
<states>
|
|
59
|
+
S_PARSE — 解析参数、检测 flags PERSIST: —
|
|
60
|
+
S_RESUME — 扫描已有 session、恢复执行 PERSIST: —
|
|
61
|
+
S_CLASSIFY — 意图分类、chain 选择 PERSIST: —
|
|
62
|
+
S_DECOMPOSE — 边界澄清、写执行准则+子目标清单 PERSIST: session.boundary_contract, .execution_criteria, .task_decomposition
|
|
63
|
+
S_CREATE — 创建 session + status.json PERSIST: session (全量)
|
|
64
|
+
S_DRY_RUN — 显示 chain 后结束 PERSIST: —
|
|
65
|
+
S_CONFIRM — 用户确认(auto_mode 跳过) PERSIST: —
|
|
66
|
+
S_DISPATCH — 移交 maestro-ralph-execute PERSIST: —
|
|
67
|
+
S_FALLBACK — 意图无法分类、请求输入 PERSIST: —
|
|
68
|
+
</states>
|
|
69
|
+
|
|
70
|
+
<transitions>
|
|
71
|
+
|
|
72
|
+
S_PARSE:
|
|
73
|
+
→ S_RESUME WHEN: -c / --continue flag
|
|
74
|
+
→ S_CLASSIFY WHEN: intent text present
|
|
75
|
+
→ S_CLASSIFY WHEN: keyword "continue"/"next"/"go" DO: A_STATE_BASED_ROUTE
|
|
76
|
+
→ S_FALLBACK WHEN: no intent AND no flags
|
|
77
|
+
|
|
78
|
+
S_RESUME:
|
|
79
|
+
→ S_DISPATCH WHEN: session found DO: A_LOCATE_SESSION
|
|
80
|
+
→ S_FALLBACK WHEN: no session found
|
|
81
|
+
|
|
82
|
+
S_CLASSIFY:
|
|
83
|
+
→ S_DECOMPOSE WHEN: chain resolved DO: A_CLASSIFY_INTENT
|
|
84
|
+
→ S_FALLBACK WHEN: no match AND auto_mode
|
|
85
|
+
→ S_CLASSIFY WHEN: no match AND not auto_mode DO: A_CLARIFY
|
|
86
|
+
GUARD: max 2 clarification rounds → S_FALLBACK
|
|
87
|
+
|
|
88
|
+
S_DECOMPOSE:
|
|
89
|
+
→ S_CREATE DO: A_DECOMPOSE_TASKS
|
|
90
|
+
GUARD: broad intent (重构/全面/重写/迁移/overhaul/migrate/rewrite) on a multi-step lifecycle chain → MUST clarify even if auto_mode
|
|
91
|
+
GUARD: single-step chain OR narrow intent OR chain ∈ {status,init,quick} → skip decomposition (pass through)
|
|
92
|
+
|
|
93
|
+
S_CREATE:
|
|
94
|
+
→ S_DRY_RUN WHEN: --dry-run flag DO: A_CREATE_SESSION
|
|
95
|
+
→ S_CONFIRM WHEN: not auto_mode DO: A_CREATE_SESSION
|
|
96
|
+
→ S_DISPATCH WHEN: auto_mode DO: A_CREATE_SESSION
|
|
97
|
+
|
|
98
|
+
S_DRY_RUN:
|
|
99
|
+
→ END DO: display chain with step types
|
|
100
|
+
|
|
101
|
+
S_CONFIRM:
|
|
102
|
+
→ S_DISPATCH WHEN: user confirms
|
|
103
|
+
→ S_PARSE WHEN: user wants to modify
|
|
104
|
+
→ END WHEN: user cancels
|
|
105
|
+
|
|
106
|
+
S_DISPATCH:
|
|
107
|
+
→ END DO: Skill({ skill: "maestro-ralph-execute" })
|
|
108
|
+
|
|
109
|
+
S_FALLBACK:
|
|
110
|
+
→ S_CLASSIFY WHEN: user provides new intent DO: AskUserQuestion
|
|
111
|
+
→ END WHEN: user cancels
|
|
112
|
+
|
|
113
|
+
</transitions>
|
|
114
|
+
|
|
115
|
+
<actions>
|
|
116
|
+
|
|
117
|
+
### A_STATE_BASED_ROUTE
|
|
118
|
+
|
|
119
|
+
1. Read `.workflow/state.json` → determine next logical step
|
|
120
|
+
2. Convert to equivalent intent for chain classification
|
|
121
|
+
|
|
122
|
+
### A_LOCATE_SESSION
|
|
123
|
+
|
|
124
|
+
1. Scan `.workflow/.maestro/*/status.json`, filter `status == "running"`, sort DESC
|
|
125
|
+
2. Take most recent; if not found → S_FALLBACK
|
|
126
|
+
|
|
127
|
+
### A_CLASSIFY_INTENT
|
|
128
|
+
|
|
129
|
+
1. Read `~/.maestro/workflows/maestro.md` from deferred_reading
|
|
130
|
+
2. Match intent to best task_type via chain catalog (semantic, AI-driven)
|
|
131
|
+
3. Select chain from chainMap
|
|
132
|
+
4. Determine per-step type: `internal` (Skill) or `external` (delegate)
|
|
133
|
+
|
|
134
|
+
### A_CLARIFY
|
|
135
|
+
|
|
136
|
+
1. `AskUserQuestion` with parsed intent + available chain options
|
|
137
|
+
2. Re-classify with user response
|
|
138
|
+
|
|
139
|
+
### A_DECOMPOSE_TASKS
|
|
140
|
+
|
|
141
|
+
Shares the decomposition contract with maestro-ralph `A_DECOMPOSE_TASKS` — **reference that spec; do not duplicate the table logic here.** Condensed:
|
|
142
|
+
|
|
143
|
+
1. Classify intent breadth (broad: 重构/全面/重写/迁移/overhaul/migrate/rewrite; narrow: single file/function/bug). Skip entirely for narrow / single-step / {status,init,quick} chains
|
|
144
|
+
2. Broad/medium → `AskUserQuestion` ≤3 rounds: Scope (in/out) | Constraints (compat/API/perf/test bar) | Definition of Done
|
|
145
|
+
3. Derive `execution_criteria` (3-6 imperative rules) + `task_decomposition` (outcome sub-goals, each `done_when` objectively verifiable and mapped to a ralph evidence artifact: verification.json / review.json / uat.md / test path)
|
|
146
|
+
4. Write `{session_dir}/goal-checklist.md` (same template as maestro-ralph) with `ALL_GOALS_DONE` sentinel; set `goal_checklist_path`
|
|
147
|
+
5. Append a `{ type: "decision", decision: "post-goal-audit", retry_count: 0, max_retries: 2 }` node as the FINAL node — after the last evidence-producing step (verify/review/test), before a milestone-complete/close-out step if the chain ends with one. (Audit needs evidence artifacts to exist.) ralph-execute then dynamically grows `steps[]` for unmet sub-goals
|
|
148
|
+
6. **Emit the `/goal` bind prompt:**
|
|
149
|
+
```
|
|
150
|
+
📋 任务分解完成。复制下面一行设定目标(推荐):
|
|
151
|
+
/goal 当 {session_dir}/goal-checklist.md 中子目标全 [x] 且含 ALL_GOALS_DONE 时达成;否则按执行准则继续推进且不越边界契约
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### A_CREATE_SESSION
|
|
155
|
+
|
|
156
|
+
1. Read `.workflow/state.json` for project context (phase, milestone)
|
|
157
|
+
2. Create `.workflow/.maestro/maestro-{YYYYMMDD-HHMMSS}/status.json`:
|
|
158
|
+
```json
|
|
159
|
+
{ "session_id", "source": "maestro", "intent", "task_type", "chain_name",
|
|
160
|
+
"phase", "milestone", "auto_mode", "exec_mode", "cli_tool",
|
|
161
|
+
"context": { ... }, "steps": [{ "index", "skill", "args", "type", "status": "pending", "goal_ref": null }],
|
|
162
|
+
"waves": [], "current_step": 0, "status": "running",
|
|
163
|
+
"_comment": "↓ OPTIONAL additive block — present only if S_DECOMPOSE ran; absent → old flat-chain behavior",
|
|
164
|
+
"boundary_contract": {}, "execution_criteria": [], "task_decomposition": [], "goal_checklist_path": "" }
|
|
165
|
+
```
|
|
166
|
+
Decomposition fields written ONLY if A_DECOMPOSE_TASKS produced them (additive; never break flat-chain readers)
|
|
167
|
+
3. Initialize tracking via `TodoWrite`. The decomposition goal is bound by the user via the emitted `/goal` prompt
|
|
168
|
+
4. If `--super`: read `maestro-super.md`, follow it completely
|
|
169
|
+
|
|
170
|
+
</actions>
|
|
171
|
+
|
|
172
|
+
</state_machine>
|
|
173
|
+
|
|
174
|
+
<appendix>
|
|
175
|
+
|
|
176
|
+
### Auto-Yes Flag Map
|
|
177
|
+
|
|
178
|
+
| Command | Auto Flag | Effect |
|
|
179
|
+
|---------|-----------|--------|
|
|
180
|
+
| maestro-init | `-y` | Skip interactive questioning |
|
|
181
|
+
| maestro-analyze | `-y` | Skip scoping, auto-deepen |
|
|
182
|
+
| maestro-brainstorm | `-y` | Skip questions, use defaults |
|
|
183
|
+
| maestro-roadmap | `-y` | Skip questions (create/revise/review) |
|
|
184
|
+
| maestro-impeccable | `-y` | Auto-select design variant + skip confirmations |
|
|
185
|
+
| maestro-plan | `-y` | Skip confirmations and clarification |
|
|
186
|
+
| maestro-execute | `-y` | Skip confirmations, blocked auto-continue |
|
|
187
|
+
| quality-auto-test | `-y` | Skip plan confirmation |
|
|
188
|
+
| quality-test | `-y --auto-fix` | Auto-trigger gap-fix loop |
|
|
189
|
+
| quality-retrospective | `-y` | Accept all routing recommendations |
|
|
190
|
+
| maestro-milestone-complete | `-y` | Skip knowledge promotion |
|
|
191
|
+
|
|
192
|
+
Unlisted commands have no auto flags.
|
|
193
|
+
|
|
194
|
+
### Error Codes
|
|
195
|
+
|
|
196
|
+
| Code | Severity | Description | Recovery |
|
|
197
|
+
|------|----------|-------------|----------|
|
|
198
|
+
| E001 | error | No intent and project not initialized | Prompt or suggest maestro-init |
|
|
199
|
+
| E002 | error | Clarity too low after 2 rounds | Show parsed intent, ask rephrase |
|
|
200
|
+
| E003 | error | Chain step failed + user abort | Record partial, suggest -c resume |
|
|
201
|
+
| E004 | error | Resume session not found | Show available sessions |
|
|
202
|
+
| W001 | warning | Ambiguous intent, multiple chains | Present options |
|
|
203
|
+
| W002 | warning | Step completed with warnings | Log and continue |
|
|
204
|
+
| W003 | warning | State suggests different chain | Show discrepancy |
|
|
205
|
+
|
|
206
|
+
### Success Criteria
|
|
207
|
+
|
|
208
|
+
- [ ] Intent classified with task_type, complexity, clarity_score
|
|
209
|
+
- [ ] Broad lifecycle intents decomposed (S_DECOMPOSE, ≤3 boundary questions) sharing maestro-ralph contract; narrow/single-step skip
|
|
210
|
+
- [ ] Decomposition writes additive block + goal-checklist.md + post-goal-audit node; emits /goal bind prompt (no self-call, no phantom create_goal)
|
|
211
|
+
- [ ] Chain selected and confirmed (or auto-confirmed)
|
|
212
|
+
- [ ] Session dir created with status.json before execution; decomposition fields additive-only
|
|
213
|
+
- [ ] Tracking via TodoWrite (Claude); status.json steps[] grown dynamically by ralph-execute post-goal-audit
|
|
214
|
+
- [ ] Auto flags propagated to supporting commands only
|
|
215
|
+
- [ ] All chains dispatched via maestro-ralph-execute
|
|
216
|
+
- [ ] Low-complexity intents routed to maestro-quick
|
|
217
|
+
- [ ] (super) Requirements validated before roadmap
|
|
218
|
+
- [ ] (super) Each milestone scored >= 80%
|
|
219
|
+
|
|
220
|
+
</appendix>
|