maestro-flow 0.3.29 → 0.3.30
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-init.md +3 -3
- package/.claude/commands/maestro-plan.md +2 -2
- package/.claude/commands/maestro-ralph-execute.md +53 -19
- package/.claude/commands/maestro.md +13 -11
- package/.claude/commands/quality-business-test.md +3 -3
- package/.claude/commands/quality-retrospective.md +2 -2
- package/.codex/skills/maestro/SKILL.md +4 -4
- package/.codex/skills/maestro-init/SKILL.md +9 -9
- package/.codex/skills/maestro-link-coordinate/SKILL.md +4 -4
- package/.codex/skills/maestro-milestone-complete/SKILL.md +3 -2
- package/.codex/skills/maestro-plan/SKILL.md +2 -2
- package/.codex/skills/maestro-ralph/SKILL.md +199 -56
- package/.codex/skills/quality-business-test/SKILL.md +6 -6
- package/.codex/skills/quality-retrospective/SKILL.md +5 -5
- package/.codex/skills/quality-test/SKILL.md +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-init
|
|
3
3
|
description: Initialize project with auto state detection (empty/code/existing)
|
|
4
|
-
argument-hint: "[
|
|
4
|
+
argument-hint: "[-y] [--from-brainstorm SESSION-ID]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -24,7 +24,7 @@ Initialize a new project through auto state detection and unified flow. Invoked
|
|
|
24
24
|
|
|
25
25
|
<context>
|
|
26
26
|
**Flags:**
|
|
27
|
-
-
|
|
27
|
+
- `-y` -- Automatic mode. After config questions, runs research without further interaction. Expects idea document via @ reference.
|
|
28
28
|
- `--from-brainstorm SESSION-ID` -- Import from a brainstorm session. Reads guidance-specification.md to pre-fill project vision, goals, constraints, and terminology. Skips interactive questioning.
|
|
29
29
|
|
|
30
30
|
**Load project state if exists:**
|
|
@@ -61,7 +61,7 @@ Other commands:
|
|
|
61
61
|
<error_codes>
|
|
62
62
|
| Code | Severity | Condition | Recovery |
|
|
63
63
|
|------|----------|-----------|----------|
|
|
64
|
-
| E001 | error | No arguments provided when
|
|
64
|
+
| E001 | error | No arguments provided when -y requires @ reference | Check arguments format, re-run with correct input |
|
|
65
65
|
| E002 | error | .workflow/ already exists for greenfield init | Check .workflow/ directory state, resolve conflicts |
|
|
66
66
|
| E003 | error | Brainstorm session not found (--from-brainstorm) | Check arguments format, re-run with correct input |
|
|
67
67
|
| W001 | warning | Research agent failed, continuing with partial results | Retry research or proceed with partial results |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-plan
|
|
3
3
|
description: Explore, clarify, plan, check, and confirm a phase execution plan
|
|
4
|
-
argument-hint: "[phase] [--collab] [--spec SPEC-xxx] [
|
|
4
|
+
argument-hint: "[phase] [--collab] [--spec SPEC-xxx] [-y] [--gaps] [--dir <path>] [--revise [instructions]] [--check <plan-dir>]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -36,7 +36,7 @@ All plan output goes to `.workflow/scratch/{YYYYMMDD}-plan-[P{N}-|M{N}-]{slug}/`
|
|
|
36
36
|
<context>
|
|
37
37
|
$ARGUMENTS — phase number, or no args for milestone-wide planning, with optional flags.
|
|
38
38
|
|
|
39
|
-
Scope routing, base flags (`--collab`, `--spec`,
|
|
39
|
+
Scope routing, base flags (`--collab`, `--spec`, `-y`, `--gaps`, `--dir`), output directory format, and artifact registration are defined in workflow plan.md.
|
|
40
40
|
|
|
41
41
|
**Command-level flags** (extensions beyond workflow base):
|
|
42
42
|
- `--revise [instructions]` -- See workflow plan.md § Revise Mode
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-ralph-execute
|
|
3
3
|
description: Single-step executor — find next pending command in ralph session, execute by type (decision/skill/cli), hand off to next iteration
|
|
4
|
-
argument-hint: "[session-id]"
|
|
4
|
+
argument-hint: "[-y] [session-id]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -27,11 +27,19 @@ Mutual invocation with `/maestro-ralph` forms a persistent self-perpetuating wor
|
|
|
27
27
|
</purpose>
|
|
28
28
|
|
|
29
29
|
<context>
|
|
30
|
-
$ARGUMENTS — optional session ID. If omitted, finds latest running ralph session.
|
|
30
|
+
$ARGUMENTS — optional `-y` flag + optional session ID. If session ID omitted, finds latest running ralph session.
|
|
31
|
+
|
|
32
|
+
**Flag parsing:**
|
|
33
|
+
```
|
|
34
|
+
Parse $ARGUMENTS:
|
|
35
|
+
Contains "-y" or "--yes" → auto = true, remove flag from remaining args
|
|
36
|
+
Remaining → session_id (if matches ralph-* pattern)
|
|
37
|
+
```
|
|
31
38
|
|
|
32
39
|
**Session discovery:**
|
|
33
40
|
Scan `.workflow/.ralph/ralph-*/status.json` for `status == "running"`, sorted by `created_at` descending.
|
|
34
|
-
If
|
|
41
|
+
If remaining args match a session ID pattern, use that specific session.
|
|
42
|
+
Also read `session.auto` from status.json — if `true`, treat as `-y` even if flag not passed(ralph 已写入)。
|
|
35
43
|
</context>
|
|
36
44
|
|
|
37
45
|
<execution>
|
|
@@ -52,12 +60,12 @@ If no session found:
|
|
|
52
60
|
End.
|
|
53
61
|
```
|
|
54
62
|
|
|
55
|
-
Read status.json → extract: `id`, `
|
|
63
|
+
Read status.json → extract: `id`, `steps[]`, `current_step`, `status`, `phase`.
|
|
56
64
|
|
|
57
65
|
## Step 2: Find Next Pending Command
|
|
58
66
|
|
|
59
67
|
```
|
|
60
|
-
next =
|
|
68
|
+
next = steps.find(step => step.status == "pending")
|
|
61
69
|
|
|
62
70
|
If no pending command:
|
|
63
71
|
→ Step 5 (Complete)
|
|
@@ -123,7 +131,7 @@ Write status.json
|
|
|
123
131
|
Display step banner:
|
|
124
132
|
```
|
|
125
133
|
------------------------------------------------------------
|
|
126
|
-
[{next.index}/{
|
|
134
|
+
[{next.index}/{steps.length - 1}] {next.skill} [{next.type}]
|
|
127
135
|
------------------------------------------------------------
|
|
128
136
|
Args: {next.args}
|
|
129
137
|
{next.type == "decision" ? "Retry: " + JSON.parse(next.args).retry_count + "/" + JSON.parse(next.args).max_retries : ""}
|
|
@@ -148,7 +156,7 @@ Skill({ skill: "maestro-ralph" })
|
|
|
148
156
|
Ralph will:
|
|
149
157
|
1. Detect the running decision node in status.json
|
|
150
158
|
2. Evaluate execution results (verify gaps, test failures, etc.)
|
|
151
|
-
3. Optionally expand
|
|
159
|
+
3. Optionally expand steps[] with fix loops
|
|
152
160
|
4. Mark the decision node completed
|
|
153
161
|
5. Call `Skill("maestro-ralph-execute")` to resume
|
|
154
162
|
|
|
@@ -158,8 +166,25 @@ Ralph will:
|
|
|
158
166
|
|
|
159
167
|
Synchronous in-session execution.
|
|
160
168
|
|
|
169
|
+
**`-y` auto flag 传播:** 当 `auto == true` 时,按传播表对目标 skill 附加 auto flag:
|
|
170
|
+
```
|
|
171
|
+
auto_flag_map = {
|
|
172
|
+
"maestro-init": "-y",
|
|
173
|
+
"maestro-analyze": "-y",
|
|
174
|
+
"maestro-brainstorm": "-y",
|
|
175
|
+
"maestro-roadmap": "-y",
|
|
176
|
+
"maestro-plan": "-y",
|
|
177
|
+
"maestro-execute": "-y",
|
|
178
|
+
"quality-business-test": "-y",
|
|
179
|
+
"quality-test": "-y --auto-fix",
|
|
180
|
+
"maestro-milestone-complete": "-y"
|
|
181
|
+
}
|
|
182
|
+
flag = auto_flag_map[next.skill] || ""
|
|
183
|
+
effective_args = flag ? `${next.args} ${flag}` : next.args
|
|
184
|
+
```
|
|
185
|
+
|
|
161
186
|
```
|
|
162
|
-
Skill({ skill: next.skill, args:
|
|
187
|
+
Skill({ skill: next.skill, args: effective_args })
|
|
163
188
|
```
|
|
164
189
|
|
|
165
190
|
On success:
|
|
@@ -179,10 +204,18 @@ next.completed_at = new Date().toISOString()
|
|
|
179
204
|
Write status.json
|
|
180
205
|
|
|
181
206
|
Display: [N/total] ✗ {next.skill} failed: {error}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
207
|
+
|
|
208
|
+
If auto:
|
|
209
|
+
If not next.retried:
|
|
210
|
+
next.retried = true, next.status = "pending", next.error = null → retry once
|
|
211
|
+
Else:
|
|
212
|
+
next.status = "skipped" → continue (auto-skip)
|
|
213
|
+
Display: [N/total] ⏭ {next.skill} auto-skipped after retry
|
|
214
|
+
Else:
|
|
215
|
+
AskUserQuestion: "retry / skip / abort"
|
|
216
|
+
retry → reset next.status = "pending", next.error = null → Skill("maestro-ralph-execute")
|
|
217
|
+
skip → next.status = "skipped" → Skill("maestro-ralph-execute")
|
|
218
|
+
abort → status.status = "paused" → Write status.json → End.
|
|
186
219
|
```
|
|
187
220
|
|
|
188
221
|
Then hand off:
|
|
@@ -232,8 +265,7 @@ next.status = "failed"
|
|
|
232
265
|
next.error = "{error details}"
|
|
233
266
|
Write status.json
|
|
234
267
|
|
|
235
|
-
|
|
236
|
-
(same as 4b failure handling)
|
|
268
|
+
(same as 4b failure handling: auto → retry once then skip; else → AskUserQuestion)
|
|
237
269
|
```
|
|
238
270
|
|
|
239
271
|
Then hand off:
|
|
@@ -243,7 +275,7 @@ Skill({ skill: "maestro-ralph-execute" })
|
|
|
243
275
|
|
|
244
276
|
## Step 5: Complete Session
|
|
245
277
|
|
|
246
|
-
When no pending
|
|
278
|
+
When no pending steps remain:
|
|
247
279
|
|
|
248
280
|
```
|
|
249
281
|
status.status = "completed"
|
|
@@ -260,7 +292,7 @@ Display completion report:
|
|
|
260
292
|
Phase: {phase}
|
|
261
293
|
Steps: {completed}/{total}
|
|
262
294
|
|
|
263
|
-
{
|
|
295
|
+
{steps.map(cmd => {
|
|
264
296
|
icon = cmd.status == "completed" ? "✓" :
|
|
265
297
|
cmd.status == "skipped" ? "—" :
|
|
266
298
|
cmd.status == "failed" ? "✗" : " "
|
|
@@ -287,12 +319,14 @@ Display completion report:
|
|
|
287
319
|
|
|
288
320
|
<success_criteria>
|
|
289
321
|
- [ ] Session discovery finds latest running ralph session
|
|
290
|
-
- [ ]
|
|
322
|
+
- [ ] `-y` flag parsed from args OR inherited from session.auto
|
|
323
|
+
- [ ] Pending step correctly identified from steps[]
|
|
291
324
|
- [ ] decision nodes hand off to maestro-ralph via Skill()
|
|
292
325
|
- [ ] skill nodes execute synchronously via Skill() and self-invoke next
|
|
326
|
+
- [ ] `-y` auto flag 按传播表附加到目标 skill args
|
|
293
327
|
- [ ] cli nodes use maestro delegate with run_in_background + stop pattern
|
|
294
328
|
- [ ] status.json updated after every status change (resume-safe)
|
|
295
|
-
- [ ]
|
|
329
|
+
- [ ] auto 模式:失败重试一次后 auto-skip;非 auto:AskUserQuestion retry/skip/abort
|
|
296
330
|
- [ ] Completion report shows all steps with status icons
|
|
297
|
-
- [ ] Self-invocation chain continues until all
|
|
331
|
+
- [ ] Self-invocation chain continues until all steps complete
|
|
298
332
|
</success_criteria>
|
|
@@ -65,21 +65,23 @@ When `-y` is active, maestro propagates auto flags to downstream commands. Only
|
|
|
65
65
|
|
|
66
66
|
| Command | Auto Flag | Effect |
|
|
67
67
|
|---------|-----------|--------|
|
|
68
|
+
| maestro-init | `-y` | Skip interactive questioning |
|
|
68
69
|
| maestro-analyze | `-y` | Skip interactive scoping, auto-deepen |
|
|
69
70
|
| maestro-brainstorm | `-y` | Skip interactive questions, use defaults |
|
|
70
71
|
| maestro-roadmap | `-y` | Skip interactive questions, use defaults (create/revise/review) |
|
|
71
72
|
| maestro-ui-design | `-y` | Skip interactive selection, pick top variant |
|
|
72
|
-
| maestro-plan |
|
|
73
|
-
| maestro-
|
|
74
|
-
| maestro-
|
|
75
|
-
|
|
|
76
|
-
| quality-review | *(none)* | No
|
|
77
|
-
| quality-test |
|
|
78
|
-
| quality-test-gen | *(none)* | No
|
|
79
|
-
| quality-debug | *(none)* | No
|
|
80
|
-
| quality-retrospective |
|
|
81
|
-
| maestro-milestone-audit | *(none)* | No
|
|
82
|
-
|
|
|
73
|
+
| maestro-plan | `-y` | Skip confirmations and clarification |
|
|
74
|
+
| maestro-execute | `-y` | Skip confirmations, blocked auto-continue |
|
|
75
|
+
| maestro-verify | *(none)* | No interactive prompts |
|
|
76
|
+
| quality-business-test | `-y` | Skip plan confirmation |
|
|
77
|
+
| quality-review | *(none)* | No interactive prompts, auto-detects level |
|
|
78
|
+
| quality-test | `-y --auto-fix` | Auto-trigger gap-fix loop on failures |
|
|
79
|
+
| quality-test-gen | *(none)* | No interactive prompts |
|
|
80
|
+
| quality-debug | *(none)* | No interactive prompts |
|
|
81
|
+
| quality-retrospective | `-y` | Accept all routing recommendations without prompting |
|
|
82
|
+
| maestro-milestone-audit | *(none)* | No interactive prompts |
|
|
83
|
+
| maestro-milestone-complete | `-y` | Skip knowledge promotion inquiry |
|
|
84
|
+
| manage-learn | *(none)* | No interactive prompts |
|
|
83
85
|
|
|
84
86
|
Commands not listed (manage-*, spec-*, milestone-*) have no auto flags and execute as-is.
|
|
85
87
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quality-business-test
|
|
3
3
|
description: PRD-forward business testing with requirement traceability, fixture generation, and multi-layer execution
|
|
4
|
-
argument-hint: "<phase> [--spec SPEC-xxx] [--layer L1|L2|L3] [--gen-code] [--dry-run] [--re-run] [
|
|
4
|
+
argument-hint: "<phase> [--spec SPEC-xxx] [--layer L1|L2|L3] [--gen-code] [--dry-run] [--re-run] [-y]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -37,7 +37,7 @@ Phase: $ARGUMENTS (required -- phase number)
|
|
|
37
37
|
- `--gen-code` -- Generate framework-specific test classes (JUnit/RestAssured, supertest/vitest, pytest/httpx)
|
|
38
38
|
- `--dry-run` -- Extract scenarios and fixtures only, don't execute
|
|
39
39
|
- `--re-run` -- Re-run only previously failed/blocked scenarios
|
|
40
|
-
-
|
|
40
|
+
- `-y` -- Skip interactive confirmations
|
|
41
41
|
|
|
42
42
|
**Layer definitions:**
|
|
43
43
|
|
|
@@ -96,7 +96,7 @@ Follow '~/.maestro/workflows/business-test.md' completely.
|
|
|
96
96
|
- [ ] RFC 2119 keywords mapped to test priorities
|
|
97
97
|
- [ ] Test fixtures generated (valid/invalid/boundary per REQ data model)
|
|
98
98
|
- [ ] business-test-plan.json written with layer distribution
|
|
99
|
-
- [ ] User confirmed plan (or
|
|
99
|
+
- [ ] User confirmed plan (or -y skipped confirmation)
|
|
100
100
|
- [ ] Test code generated if --gen-code (framework-appropriate)
|
|
101
101
|
- [ ] L1 executed with Generator-Critic loop (max 3 iterations)
|
|
102
102
|
- [ ] L2 executed if no L1 critical failures
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quality-retrospective
|
|
3
3
|
description: Multi-lens 复盘 of completed phase(s); routes insights to spec/note/issue stores and the lessons library
|
|
4
|
-
argument-hint: "[phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [
|
|
4
|
+
argument-hint: "[phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [-y]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -30,7 +30,7 @@ Post-execution multi-perspective retrospective (复盘) for completed phases. Co
|
|
|
30
30
|
<context>
|
|
31
31
|
Arguments: $ARGUMENTS
|
|
32
32
|
|
|
33
|
-
Modes (scan/single/range/all), flags (--lens, --no-route, --compare,
|
|
33
|
+
Modes (scan/single/range/all), flags (--lens, --no-route, --compare, -y), and storage paths defined in workflow retrospective.md Argument Shape and Stages 1-7.
|
|
34
34
|
</context>
|
|
35
35
|
|
|
36
36
|
<execution>
|
|
@@ -189,10 +189,10 @@ functions.update_plan({
|
|
|
189
189
|
|
|
190
190
|
| Skill | Flag |
|
|
191
191
|
|-------|------|
|
|
192
|
-
| `maestro-analyze`, `maestro-brainstorm`, `maestro-ui-design`, `maestro-roadmap` | `-y` |
|
|
193
|
-
| `maestro-plan` |
|
|
194
|
-
| `quality-test` |
|
|
195
|
-
| `quality-
|
|
192
|
+
| `maestro-init`, `maestro-analyze`, `maestro-brainstorm`, `maestro-ui-design`, `maestro-roadmap` | `-y` |
|
|
193
|
+
| `maestro-plan`, `maestro-execute`, `maestro-milestone-complete` | `-y` |
|
|
194
|
+
| `quality-business-test`, `quality-retrospective` | `-y` |
|
|
195
|
+
| `quality-test` | `-y --auto-fix` |
|
|
196
196
|
|
|
197
197
|
**`buildSkillCall(step, ctx)`**: Replace placeholders `{phase}`, `{description}`, `{issue_id}`, `{plan_dir}`, `{analysis_dir}`, `{brainstorm_dir}`, `{spec_session_id}` in `step.args` with corresponding `ctx` values. Append auto-yes flag if applicable. Return `$<skill> <args>`.
|
|
198
198
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-init
|
|
3
3
|
description: Initialize project with auto state detection — creates .workflow/ directory, project.md, state.json, config.json, and specs/
|
|
4
|
-
argument-hint: "[
|
|
4
|
+
argument-hint: "[-y] [--from-brainstorm SESSION-ID]"
|
|
5
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<purpose>
|
|
9
9
|
Sequential project setup skill. Detects project state (empty/code/existing), gathers project information through deep questioning or document extraction, then creates the `.workflow/` directory structure. No parallel agents — single sequential flow.
|
|
10
10
|
|
|
11
|
-
When
|
|
11
|
+
When `-y`: After config questions, run research without further interaction. Expects idea document via @ reference.
|
|
12
12
|
</purpose>
|
|
13
13
|
|
|
14
14
|
<context>
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
$maestro-init ""
|
|
18
|
-
$maestro-init "
|
|
18
|
+
$maestro-init "-y"
|
|
19
19
|
$maestro-init "--from-brainstorm 20260318-brainstorm-auth"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
**Flags**:
|
|
23
|
-
-
|
|
23
|
+
- `-y`: Skip interactive questioning; extract from provided document
|
|
24
24
|
- `--from-brainstorm SESSION-ID`: Import vision/goals/constraints from brainstorm guidance-specification.md
|
|
25
25
|
|
|
26
26
|
**Output**: `.workflow/` directory with project.md, state.json, config.json, specs/
|
|
@@ -29,7 +29,7 @@ $maestro-init "--from-brainstorm 20260318-brainstorm-auth"
|
|
|
29
29
|
|
|
30
30
|
<invariants>
|
|
31
31
|
1. **Never create roadmap** — init only creates .workflow/ structure; roadmap is a separate step
|
|
32
|
-
2. **Deep questioning over speed** — follow threads, ask clarifying questions (unless
|
|
32
|
+
2. **Deep questioning over speed** — follow threads, ask clarifying questions (unless -y)
|
|
33
33
|
3. **Detect, don't assume** — scan for existing files, package managers, frameworks before asking
|
|
34
34
|
4. **Templates are source of truth** — always read templates before writing files
|
|
35
35
|
5. **Idempotent check** — if .workflow/ exists, refuse to overwrite (E002)
|
|
@@ -40,7 +40,7 @@ $maestro-init "--from-brainstorm 20260318-brainstorm-auth"
|
|
|
40
40
|
### Step 1: Parse Arguments
|
|
41
41
|
|
|
42
42
|
Extract flags from arguments:
|
|
43
|
-
-
|
|
43
|
+
- `-y` flag presence
|
|
44
44
|
- `--from-brainstorm SESSION-ID` value
|
|
45
45
|
- Remaining text as project description
|
|
46
46
|
|
|
@@ -60,7 +60,7 @@ Classify as:
|
|
|
60
60
|
- Extract: vision, goals, constraints, terminology, tech decisions
|
|
61
61
|
- Skip interactive questioning
|
|
62
62
|
|
|
63
|
-
**If
|
|
63
|
+
**If `-y`**:
|
|
64
64
|
- Extract project info from provided document/@ reference
|
|
65
65
|
- Minimal interactive questions (confirm core value only)
|
|
66
66
|
|
|
@@ -94,7 +94,7 @@ Initialize from template with `current_milestone: null`, `status: "initialized"`
|
|
|
94
94
|
|
|
95
95
|
### Step 8: Write config.json
|
|
96
96
|
|
|
97
|
-
Configuration questions (or defaults for
|
|
97
|
+
Configuration questions (or defaults for -y): granularity (fine/medium/coarse), workflow agents (enable/disable), gate preferences. Write to `.workflow/config.json`.
|
|
98
98
|
|
|
99
99
|
### Step 9: Initialize specs/
|
|
100
100
|
|
|
@@ -110,7 +110,7 @@ Display created files and next steps: `$maestro-roadmap --mode full` (full spec)
|
|
|
110
110
|
|
|
111
111
|
| Code | Severity | Description | Recovery |
|
|
112
112
|
|------|----------|-------------|----------|
|
|
113
|
-
| E001 | error | No arguments when
|
|
113
|
+
| E001 | error | No arguments when -y requires document | Ask user for document reference |
|
|
114
114
|
| E002 | error | .workflow/ already exists | Show status, suggest manage-status |
|
|
115
115
|
| E003 | error | Brainstorm session not found | List available sessions |
|
|
116
116
|
| W001 | warning | Could not detect tech stack | Continue with manual input |
|
|
@@ -150,10 +150,10 @@ Set `state.status` to completed/failed based on `node.status`. Record final hist
|
|
|
150
150
|
|
|
151
151
|
| Skill | Flag |
|
|
152
152
|
|-------|------|
|
|
153
|
-
| `maestro-analyze`, `maestro-brainstorm`, `maestro-ui-design`, `maestro-roadmap` | `-y` |
|
|
154
|
-
| `maestro-plan` |
|
|
155
|
-
| `quality-test` |
|
|
156
|
-
| `quality-
|
|
153
|
+
| `maestro-init`, `maestro-analyze`, `maestro-brainstorm`, `maestro-ui-design`, `maestro-roadmap` | `-y` |
|
|
154
|
+
| `maestro-plan`, `maestro-execute`, `maestro-milestone-complete` | `-y` |
|
|
155
|
+
| `quality-business-test`, `quality-retrospective` | `-y` |
|
|
156
|
+
| `quality-test` | `-y --auto-fix` |
|
|
157
157
|
|
|
158
158
|
**buildSkillCall(node, ctx, autoMode)**: Substitute `{phase}`, `{description}`, `{issue_id}`, `{milestone_num}` from context into `node.args`. If autoMode, append auto flag from `node.auto_flag` or AUTO_FLAG_MAP. Return `$${node.cmd} ${resolvedArgs}`.
|
|
159
159
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-milestone-complete
|
|
3
3
|
description: Archive completed milestone scratch artifacts to milestones/ dir, move artifact entries to milestone_history, extract learnings, advance state.
|
|
4
|
-
argument-hint: "[milestone] [--force]"
|
|
4
|
+
argument-hint: "[milestone] [--force] [-y]"
|
|
5
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -49,7 +49,8 @@ Read `.summaries/` and `reflection-log.md` from execute artifacts. Extract patte
|
|
|
49
49
|
2. **Convention drift**: Compare summaries against `coding-conventions.md` and `architecture-constraints.md` -- ask if conventions need updating
|
|
50
50
|
3. **Wiki island check**: Auto-trigger `wiki-connect --fix` to link new knowledge
|
|
51
51
|
|
|
52
|
-
If
|
|
52
|
+
If `-y`: auto-accept all promotions without asking.
|
|
53
|
+
If not `-y`: ask user for confirmation. If user confirms, append `<spec-entry>` to target category file preserving original date and source.
|
|
53
54
|
|
|
54
55
|
### Step 4: Archive Artifact Entries
|
|
55
56
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-plan
|
|
3
3
|
description: Exploration-driven planning via CSV wave pipeline. Wave 1 runs parallel codebase exploration agents, Wave 2 synthesizes explorations into plan.json + TASK-*.json. Replaces maestro-plan command.
|
|
4
|
-
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--
|
|
4
|
+
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--dir <path>] [--gaps] [--spec SPEC-xxx] [--collab]\""
|
|
5
5
|
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -51,7 +51,7 @@ Wave-based planning using `spawn_agents_on_csv`. Wave 1 explores codebase contex
|
|
|
51
51
|
<context>
|
|
52
52
|
```bash
|
|
53
53
|
$maestro-plan "3"
|
|
54
|
-
$maestro-plan -y "3
|
|
54
|
+
$maestro-plan -y "3"
|
|
55
55
|
$maestro-plan -c 4 "3 --spec SPEC-001"
|
|
56
56
|
$maestro-plan "3 --gaps"
|
|
57
57
|
$maestro-plan "3 --dir .workflow/scratch/quick-nav-fix"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-ralph
|
|
3
3
|
description: Closed-loop lifecycle decision engine — read state, infer position, build adaptive chain, execute via CSV waves, STOP at decision nodes for re-evaluation
|
|
4
|
-
argument-hint: "\"intent\" | status | continue | execute"
|
|
4
|
+
argument-hint: "\"intent\" [-y] | status | continue | execute"
|
|
5
5
|
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -21,7 +21,7 @@ Key difference from maestro coordinator:
|
|
|
21
21
|
Three node types in the chain:
|
|
22
22
|
- **decision**: Barrier that STOPS execution. Ralph re-reads result files, decides whether to expand chain.
|
|
23
23
|
- **skill**: Executed via `spawn_agents_on_csv`. Barrier skills (analyze, plan, execute, brainstorm) run solo. Non-barriers can parallel.
|
|
24
|
-
- **cli**: Executed via `
|
|
24
|
+
- **cli**: Executed via `maestro delegate` (轻量替代,如 quick 模式的 review)。单步执行,不进 CSV wave。
|
|
25
25
|
|
|
26
26
|
Session at `.workflow/.ralph/ralph-{YYYYMMDD-HHmmss}/status.json`.
|
|
27
27
|
</purpose>
|
|
@@ -36,19 +36,52 @@ $ARGUMENTS — intent text, or keywords.
|
|
|
36
36
|
otherwise → handleNew(). Start from Phase 1.
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
**Flags:**
|
|
40
|
+
- `-y` / `--yes` — Auto mode: skip confirmation, decision nodes auto-evaluate并继续(不 STOP),错误自动重试一次后跳过。`-y` 存入 `session.auto`,传播到 ralph-execute 及下游 skill。
|
|
41
|
+
|
|
42
|
+
**`-y` 传播链:**
|
|
43
|
+
```
|
|
44
|
+
ralph -y → session.auto = true
|
|
45
|
+
→ wave CSV skill_call 附加 -y: $maestro-ralph-execute -y "$skill_call"
|
|
46
|
+
→ ralph-execute 解析 -y,附加到目标 skill: $maestro-plan -y 1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**`-y` 下游传播表:**
|
|
50
|
+
|
|
51
|
+
| Skill | 附加 Flag | 效果 |
|
|
52
|
+
|-------|-----------|------|
|
|
53
|
+
| maestro-init | `-y` | 跳过交互提问 |
|
|
54
|
+
| maestro-analyze | `-y` | 跳过交互 scoping |
|
|
55
|
+
| maestro-brainstorm | `-y` | 跳过交互提问 |
|
|
56
|
+
| maestro-roadmap | `-y` | 跳过交互选择 |
|
|
57
|
+
| maestro-plan | `-y` | 跳过确认和澄清 |
|
|
58
|
+
| maestro-execute | `-y` | 跳过确认,blocked 自动继续 |
|
|
59
|
+
| maestro-verify | *(none)* | 无交互,正常执行 |
|
|
60
|
+
| quality-business-test | `-y` | 跳过计划确认 |
|
|
61
|
+
| quality-review | *(none)* | 无交互确认,自动检测级别 |
|
|
62
|
+
| quality-test | `-y --auto-fix` | 自动触发 gap-fix loop |
|
|
63
|
+
| quality-test-gen | *(none)* | 无交互,正常生成 |
|
|
64
|
+
| quality-debug | *(none)* | 无交互确认,正常诊断 |
|
|
65
|
+
| maestro-milestone-audit | *(none)* | 无交互,正常执行 |
|
|
66
|
+
| maestro-milestone-complete | `-y` | 跳过 knowledge promotion 交互 |
|
|
67
|
+
|
|
68
|
+
未列出的命令无 auto flag,原样执行。
|
|
69
|
+
|
|
39
70
|
**Decision-node detection (for execute mode):**
|
|
40
71
|
If status.json has a pending decision node as next step → Phase 2b (evaluate), not Phase 2a (spawn).
|
|
41
72
|
</context>
|
|
42
73
|
|
|
43
74
|
<invariants>
|
|
44
|
-
1. **
|
|
45
|
-
2. **Decision nodes STOP execution**: After processing a decision node, coordinator writes status.json and STOPS. User must call `$maestro-ralph execute` to resume.
|
|
75
|
+
1. **Skills via spawn_agents_on_csv, CLI via delegate**: Coordinator NEVER executes skills directly. CLI steps use `maestro delegate`.
|
|
76
|
+
2. **Decision nodes STOP execution**: After processing a decision node, coordinator writes status.json and STOPS. User must call `$maestro-ralph execute` to resume. **例外:`-y` 模式下 decision 自动评估后继续,不 STOP(post-debug-escalate 除外)。**
|
|
46
77
|
3. **Barrier = solo wave**: barrier skills (analyze, plan, execute, brainstorm, roadmap) always run alone.
|
|
47
78
|
4. **Non-barriers can parallel**: consecutive non-barrier + non-decision steps grouped into one wave.
|
|
48
|
-
5. **Decision = barrier + stop**: decision node is always solo
|
|
79
|
+
5. **Decision = barrier + conditional stop**: decision node is always solo. 默认 STOP;`-y` 模式自动继续。
|
|
49
80
|
6. **Wave-by-wave**: never start wave N+1 before wave N results are read.
|
|
50
81
|
7. **Coordinator owns context**: sub-agents never read prior results.
|
|
51
|
-
8. **Abort on failure**: failed step → mark remaining skipped → pause session.
|
|
82
|
+
8. **Abort on failure**: failed step → `-y` 模式重试一次后跳过并继续;非 `-y` 模式 mark remaining skipped → pause session.
|
|
83
|
+
9. **Quality mode governs steps**: quality_mode (full/standard/quick) 决定哪些质量步骤被包含。
|
|
84
|
+
10. **passed_gates skip**: 重试循环中已通过的质量门不重复执行(除非代码变更影响了其检查范围)。
|
|
52
85
|
</invariants>
|
|
53
86
|
|
|
54
87
|
<execution>
|
|
@@ -116,7 +149,7 @@ When latest is "verify", read result files to refine position:
|
|
|
116
149
|
resolve_artifact_dir(latest_verify_artifact)
|
|
117
150
|
Read verification.json from that dir:
|
|
118
151
|
gaps[] non-empty or passed == false → "verify-failed" (needs fix loop)
|
|
119
|
-
passed == true, no review.json → "
|
|
152
|
+
passed == true, no review.json → "post-verify" (chain builder 按 quality_mode 决定下一步)
|
|
120
153
|
has review.json with verdict == "BLOCK" → "review-failed"
|
|
121
154
|
has review.json with verdict != "BLOCK" → "test"
|
|
122
155
|
has uat.md with status == "complete", all passed → "milestone-audit"
|
|
@@ -133,29 +166,85 @@ Fallback: glob .workflow/scratch/*-P{phase}-*/ sorted by date DESC, take first
|
|
|
133
166
|
|
|
134
167
|
### 1c: Build command sequence
|
|
135
168
|
|
|
136
|
-
**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
169
|
+
**Quality pipeline modes** (`quality_mode` in session):
|
|
170
|
+
|
|
171
|
+
| Mode | 含义 | 质量步骤 |
|
|
172
|
+
|------|------|----------|
|
|
173
|
+
| `full` | 全量质量管线 | verify → business-test → review → test-gen → test |
|
|
174
|
+
| `standard` | 标准管线(默认) | verify → review → test(跳过 business-test、test-gen 按条件) |
|
|
175
|
+
| `quick` | 轻量验证 | verify → CLI-review(跳过 business-test、test-gen、test) |
|
|
176
|
+
|
|
177
|
+
Mode 选择逻辑(Phase 1a 后自动推断,可被用户覆盖):
|
|
178
|
+
```
|
|
179
|
+
有 requirements/REQ-*.md 且 phase scope == "phase" → full
|
|
180
|
+
其他场景 → standard
|
|
181
|
+
用户显式指定 → 覆盖自动推断
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Lifecycle stages** (带条件的完整管线):
|
|
185
|
+
```
|
|
186
|
+
Stage Skill Barrier Decision After Condition
|
|
187
|
+
───────────────────────────────────────────────────────────────────────────────────────────────
|
|
188
|
+
brainstorm maestro-brainstorm "{intent}" yes — 0→1 only
|
|
189
|
+
init maestro-init no — always
|
|
190
|
+
roadmap maestro-roadmap "{intent}" yes — always
|
|
191
|
+
analyze maestro-analyze {phase} yes — always
|
|
192
|
+
plan maestro-plan {phase} yes — always
|
|
193
|
+
execute maestro-execute {phase} yes — always
|
|
194
|
+
verify maestro-verify {phase} no decision:post-verify always
|
|
195
|
+
business-test quality-business-test {phase} no decision:post-biz-test full only ①
|
|
196
|
+
review quality-review {phase} no decision:post-review full/standard ②
|
|
197
|
+
└─ CLI alt delegate --role review — decision:post-review quick ②
|
|
198
|
+
test-gen quality-test-gen {phase} no — full; standard 按条件 ③
|
|
199
|
+
test quality-test {phase} no decision:post-test full/standard ④
|
|
200
|
+
milestone-audit maestro-milestone-audit no — always
|
|
201
|
+
milestone-complete maestro-milestone-complete no decision:post-milestone always
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**条件说明:**
|
|
205
|
+
- ① `business-test`: 仅 full 模式。与 `quality-test` 有 40% 重叠(PRD 正向 vs 代码反向),full 模式两者互补覆盖,standard/quick 模式省略
|
|
206
|
+
- ② `review`: full/standard 用完整 skill spawn(6 维度并行);quick 模式改用 CLI delegate(轻量代码审查)
|
|
207
|
+
- ③ `test-gen`: full 模式始终执行;standard 模式仅在 `validation.json` 覆盖率 < 80% 或不存在时执行
|
|
208
|
+
- ④ `test`: full/standard 执行;quick 模式跳过(依赖 verify + CLI-review 即可)
|
|
209
|
+
|
|
210
|
+
**CLI review 替代(quick 模式):**
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"type": "cli",
|
|
214
|
+
"skill": "maestro delegate",
|
|
215
|
+
"args": "\"review changed files in phase {phase}\" --role review --mode analysis --rule analysis-review-code-quality",
|
|
216
|
+
"output_file": "{artifact_dir}/review.json"
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
CLI review 输出需符合 review.json schema(verdict + issues[]),供 post-review 决策节点消费。
|
|
220
|
+
|
|
221
|
+
**条件步骤的链构建:**
|
|
222
|
+
```
|
|
223
|
+
buildSteps(position, target, quality_mode):
|
|
224
|
+
steps = lifecycle_stages[position..target]
|
|
225
|
+
|
|
226
|
+
# 按 quality_mode 过滤
|
|
227
|
+
if quality_mode != "full":
|
|
228
|
+
remove business-test + decision:post-biz-test
|
|
229
|
+
if quality_mode == "quick":
|
|
230
|
+
replace review skill → CLI review
|
|
231
|
+
remove test-gen
|
|
232
|
+
remove test + decision:post-test
|
|
233
|
+
if quality_mode == "standard":
|
|
234
|
+
# test-gen 延迟决定:在 post-verify 决策后检查覆盖率
|
|
235
|
+
mark test-gen as conditional: "check_coverage"
|
|
236
|
+
|
|
237
|
+
return steps
|
|
153
238
|
```
|
|
154
239
|
|
|
155
240
|
Generate `steps[]` from current position to target. Decision nodes use:
|
|
156
241
|
```json
|
|
157
242
|
{ "type": "decision", "skill": "maestro-ralph", "args": "{\"decision\":\"post-verify\",\"retry_count\":0,\"max_retries\":2}" }
|
|
158
243
|
```
|
|
244
|
+
Conditional steps use:
|
|
245
|
+
```json
|
|
246
|
+
{ "type": "skill", "skill": "quality-test-gen {phase}", "condition": "check_coverage", "threshold": 80 }
|
|
247
|
+
```
|
|
159
248
|
|
|
160
249
|
### 1d: Create session
|
|
161
250
|
|
|
@@ -170,7 +259,9 @@ Write `.workflow/.ralph/ralph-{YYYYMMDD-HHmmss}/status.json`:
|
|
|
170
259
|
"target": "milestone-complete",
|
|
171
260
|
"phase": null,
|
|
172
261
|
"milestone": null,
|
|
173
|
-
"
|
|
262
|
+
"auto": false,
|
|
263
|
+
"quality_mode": "standard",
|
|
264
|
+
"passed_gates": [],
|
|
174
265
|
"context": { "plan_dir": null, "analysis_dir": null, "brainstorm_dir": null },
|
|
175
266
|
"steps": [...],
|
|
176
267
|
"waves": [],
|
|
@@ -187,18 +278,25 @@ Write `.workflow/.ralph/ralph-{YYYYMMDD-HHmmss}/status.json`:
|
|
|
187
278
|
============================================================
|
|
188
279
|
Position: {position} (Phase {N}, {milestone})
|
|
189
280
|
Target: milestone-complete
|
|
281
|
+
Quality: {quality_mode} (full|standard|quick)
|
|
190
282
|
Steps: {total} ({decision_count} decision points)
|
|
191
283
|
|
|
192
284
|
[ ] 0. maestro-plan {phase} [skill/barrier]
|
|
193
285
|
[ ] 1. maestro-execute {phase} [skill/barrier]
|
|
194
286
|
[ ] 2. maestro-verify {phase} [skill]
|
|
195
287
|
[ ] 3. ◆ post-verify [decision] ← STOP
|
|
196
|
-
[ ] 4. quality-
|
|
288
|
+
[ ] 4. quality-review {phase} [skill] ← standard
|
|
289
|
+
[ ] 4. quality-review {phase} [cli/delegate] ← quick
|
|
290
|
+
[ ] 5. ◆ post-review [decision] ← STOP
|
|
197
291
|
...
|
|
292
|
+
── skipped (standard mode) ──────────────────────────────
|
|
293
|
+
[~] _. quality-business-test {phase} [skip: standard]
|
|
294
|
+
[?] _. quality-test-gen {phase} [conditional: coverage < 80%]
|
|
198
295
|
============================================================
|
|
199
296
|
```
|
|
200
297
|
|
|
201
|
-
If not
|
|
298
|
+
If not auto: AskUserQuestion → Proceed / Cancel / Change quality mode
|
|
299
|
+
If auto (`-y`): skip confirmation, proceed directly
|
|
202
300
|
|
|
203
301
|
### 1f: Fall through to Phase 2
|
|
204
302
|
|
|
@@ -225,7 +323,7 @@ Sort by created_at DESC
|
|
|
225
323
|
|
|
226
324
|
For the decision type, find the relevant artifact:
|
|
227
325
|
post-verify → latest type=="verify" artifact
|
|
228
|
-
post-
|
|
326
|
+
post-biz-test → same dir as verify (business-test writes to same artifact dir)
|
|
229
327
|
post-review → latest artifact dir → review.json
|
|
230
328
|
post-test → latest artifact dir → uat.md + .tests/test-results.json
|
|
231
329
|
|
|
@@ -234,6 +332,9 @@ artifact_dir = resolve_artifact_dir(artifact)
|
|
|
234
332
|
|
|
235
333
|
**Evaluate by decision type:**
|
|
236
334
|
|
|
335
|
+
> **passed_gates 机制**:session.passed_gates[] 记录已通过的质量门。重试循环中跳过已通过的门,避免重复执行。
|
|
336
|
+
> 当代码被修改(debug+plan+execute)后,清除 passed_gates 中被影响的门(verify 始终重新执行)。
|
|
337
|
+
|
|
237
338
|
**post-verify:**
|
|
238
339
|
```
|
|
239
340
|
Read {artifact_dir}/verification.json
|
|
@@ -250,10 +351,17 @@ If gaps found (passed == false or gaps[].length > 0):
|
|
|
250
351
|
→ Display: ◆ post-verify: gaps detected, inserting debug+fix loop (retry {N}/{max})
|
|
251
352
|
|
|
252
353
|
If no gaps (passed == true):
|
|
354
|
+
→ Add "verify" to passed_gates
|
|
355
|
+
→ 条件检查 test-gen(standard 模式):
|
|
356
|
+
Read {artifact_dir}/validation.json
|
|
357
|
+
If coverage < 80% or validation.json not found:
|
|
358
|
+
activate conditional test-gen step (set condition = "met")
|
|
359
|
+
Else:
|
|
360
|
+
skip test-gen step (set status = "skipped")
|
|
253
361
|
→ No insertion, proceed
|
|
254
362
|
```
|
|
255
363
|
|
|
256
|
-
**post-
|
|
364
|
+
**post-biz-test (仅 full 模式):**
|
|
257
365
|
```
|
|
258
366
|
Read {artifact_dir}/business-test-results.json or scan for business test output
|
|
259
367
|
Check: failures[] or passed field
|
|
@@ -262,12 +370,14 @@ If failures found:
|
|
|
262
370
|
If meta.retry_count >= meta.max_retries:
|
|
263
371
|
→ Insert: [quality-debug --from-business-test {phase}, decision:post-debug-escalate]
|
|
264
372
|
Else:
|
|
373
|
+
→ Clear passed_gates (code will change)
|
|
265
374
|
→ Insert: [quality-debug --from-business-test {phase},
|
|
266
375
|
maestro-plan --gaps {phase}, maestro-execute {phase},
|
|
267
376
|
maestro-verify {phase}, decision:post-verify(retry:0),
|
|
268
|
-
quality-business-test {phase}, decision:post-
|
|
377
|
+
quality-business-test {phase}, decision:post-biz-test(retry+1)]
|
|
269
378
|
|
|
270
379
|
If all pass:
|
|
380
|
+
→ Add "business-test" to passed_gates
|
|
271
381
|
→ No insertion, proceed
|
|
272
382
|
```
|
|
273
383
|
|
|
@@ -280,15 +390,18 @@ If verdict == "BLOCK" or any issue.severity == "critical":
|
|
|
280
390
|
If meta.retry_count >= meta.max_retries:
|
|
281
391
|
→ Insert: [quality-debug "{block_summary}", decision:post-debug-escalate]
|
|
282
392
|
Else:
|
|
393
|
+
→ Clear passed_gates (code will change)
|
|
283
394
|
→ Insert: [quality-debug "{block_issues}",
|
|
284
395
|
maestro-plan --gaps {phase}, maestro-execute {phase},
|
|
285
396
|
quality-review {phase}, decision:post-review(retry+1)]
|
|
397
|
+
注:review 失败只重跑 review,不回滚到 verify(verify 已通过且代码仅修复 review 问题)
|
|
286
398
|
|
|
287
399
|
If verdict == "PASS" or "WARN":
|
|
400
|
+
→ Add "review" to passed_gates
|
|
288
401
|
→ No insertion, proceed
|
|
289
402
|
```
|
|
290
403
|
|
|
291
|
-
**post-test:**
|
|
404
|
+
**post-test (仅 full/standard 模式):**
|
|
292
405
|
```
|
|
293
406
|
Read {artifact_dir}/uat.md (parse frontmatter + gap sections)
|
|
294
407
|
Read {artifact_dir}/.tests/test-results.json if exists
|
|
@@ -297,15 +410,19 @@ If failures found (any test result != pass, or gaps with severity >= high):
|
|
|
297
410
|
If meta.retry_count >= meta.max_retries:
|
|
298
411
|
→ Insert: [quality-debug --from-uat {phase}, decision:post-debug-escalate]
|
|
299
412
|
Else:
|
|
413
|
+
→ Clear passed_gates (code will change)
|
|
414
|
+
→ 轻量重试:仅重新执行 verify + 未通过的质量门
|
|
300
415
|
→ Insert: [quality-debug --from-uat {phase},
|
|
301
416
|
maestro-plan --gaps {phase}, maestro-execute {phase},
|
|
302
417
|
maestro-verify {phase}, decision:post-verify(retry:0),
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
decision:post-test(retry+1)]
|
|
418
|
+
// 对 passed_gates 中的每个门:对比修改文件列表与该门的检查范围
|
|
419
|
+
// 有交集 → 重新插入该门 + 对应 decision
|
|
420
|
+
// 无交集 → 跳过(不插入)
|
|
421
|
+
quality-test {phase}, decision:post-test(retry+1)]
|
|
422
|
+
注:不再重新插入整条管线。verify 始终重跑(代码已变),其余门按影响范围判断。
|
|
307
423
|
|
|
308
424
|
If all pass:
|
|
425
|
+
→ Add "test" to passed_gates
|
|
309
426
|
→ No insertion, proceed
|
|
310
427
|
```
|
|
311
428
|
|
|
@@ -319,22 +436,19 @@ If next milestone found:
|
|
|
319
436
|
first_phase = next_m.phases[0]
|
|
320
437
|
Update ralph session: milestone = next_m.name, phase = first_phase
|
|
321
438
|
|
|
322
|
-
→
|
|
439
|
+
→ Reset passed_gates = []
|
|
440
|
+
→ Re-infer quality_mode for next milestone (check REQ-*.md existence)
|
|
441
|
+
→ Insert lifecycle for next milestone (按 quality_mode 过滤):
|
|
323
442
|
[maestro-analyze {first_phase} [barrier],
|
|
324
443
|
maestro-plan {first_phase} [barrier],
|
|
325
444
|
maestro-execute {first_phase} [barrier],
|
|
326
445
|
maestro-verify {first_phase},
|
|
327
446
|
decision:post-verify(retry:0),
|
|
328
|
-
quality
|
|
329
|
-
decision:post-business-test(retry:0),
|
|
330
|
-
quality-review {first_phase},
|
|
331
|
-
decision:post-review(retry:0),
|
|
332
|
-
quality-test-gen {first_phase},
|
|
333
|
-
quality-test {first_phase},
|
|
334
|
-
decision:post-test(retry:0),
|
|
447
|
+
...quality steps per quality_mode (see 1c buildSteps)...,
|
|
335
448
|
maestro-milestone-audit,
|
|
336
449
|
maestro-milestone-complete,
|
|
337
450
|
decision:post-milestone]
|
|
451
|
+
注:使用 buildSteps() 按当前 quality_mode 生成质量步骤,不硬编码完整管线
|
|
338
452
|
|
|
339
453
|
→ Display: ◆ post-milestone: {completed_m.name} done → advancing to {next_m.name} Phase {first_phase}
|
|
340
454
|
|
|
@@ -357,13 +471,17 @@ After evaluation:
|
|
|
357
471
|
2. Reindex steps if inserted
|
|
358
472
|
3. Write status.json
|
|
359
473
|
4. Display: `◆ Decision: {type} → {outcome}`
|
|
360
|
-
5.
|
|
474
|
+
5. **STOP 判定:**
|
|
475
|
+
- `post-debug-escalate` → 始终 STOP(无论 `-y` 与否)
|
|
476
|
+
- `auto == true` (`-y`) → 不 STOP,直接 fall through to Phase 2c
|
|
477
|
+
- `auto == false` → STOP。Display: `⏸ 到达决策节点。使用 $maestro-ralph execute 继续。`
|
|
361
478
|
|
|
362
479
|
### 2c: Build and Execute Next Wave
|
|
363
480
|
|
|
364
481
|
**While pending non-decision steps remain:**
|
|
365
482
|
|
|
366
483
|
1. **buildNextWave**: Take first pending step.
|
|
484
|
+
- If conditional step with condition not met → mark "skipped", advance to next
|
|
367
485
|
- If barrier → solo wave
|
|
368
486
|
- If non-barrier → collect consecutive non-barrier, non-decision steps
|
|
369
487
|
- Stop at first decision node (it will be processed in next `execute` call)
|
|
@@ -377,15 +495,32 @@ After evaluation:
|
|
|
377
495
|
{analysis_dir}→ status.context.analysis_dir
|
|
378
496
|
```
|
|
379
497
|
|
|
380
|
-
3. **
|
|
498
|
+
3. **Route by step type:**
|
|
499
|
+
|
|
500
|
+
**type == "skill"** → Write wave CSV: `{sessionDir}/wave-{N}.csv`
|
|
381
501
|
Each row spawns a `$maestro-ralph-execute` agent with the target skill_call as argument:
|
|
382
502
|
```csv
|
|
383
503
|
id,skill_call,topic
|
|
384
504
|
"3","$maestro-ralph-execute \"$maestro-verify 1\"","Ralph step 3/14: verify phase 1"
|
|
385
505
|
```
|
|
506
|
+
当 `session.auto == true` 时,skill_call 附加 `-y`:
|
|
507
|
+
```csv
|
|
508
|
+
"3","$maestro-ralph-execute -y \"$maestro-verify 1\"","Ralph step 3/14: verify phase 1"
|
|
509
|
+
```
|
|
510
|
+
ralph-execute 解析 `-y` 后,按传播表对目标 skill 附加对应 auto flag。
|
|
386
511
|
The inner `$maestro-verify 1` is the actual skill; `$maestro-ralph-execute` is the worker wrapper.
|
|
387
512
|
|
|
388
|
-
|
|
513
|
+
**type == "cli"** → CLI delegate 执行(quick 模式 review 等):
|
|
514
|
+
```
|
|
515
|
+
Bash({
|
|
516
|
+
command: 'maestro delegate "{step.args}" --mode analysis',
|
|
517
|
+
run_in_background: true
|
|
518
|
+
})
|
|
519
|
+
```
|
|
520
|
+
等待回调 → `maestro delegate output <id>` → 解析输出写入 `{artifact_dir}/{output_file}`
|
|
521
|
+
CLI 步骤始终单步执行,不进 CSV wave。
|
|
522
|
+
|
|
523
|
+
4. **Spawn** (仅 skill 类型):
|
|
389
524
|
```
|
|
390
525
|
spawn_agents_on_csv({
|
|
391
526
|
csv_path: "{sessionDir}/wave-{N}.csv",
|
|
@@ -398,7 +533,7 @@ After evaluation:
|
|
|
398
533
|
})
|
|
399
534
|
```
|
|
400
535
|
|
|
401
|
-
5. **Read results**: Update step status from results CSV
|
|
536
|
+
5. **Read results**: Update step status from results CSV (skill) or delegate output (cli)
|
|
402
537
|
|
|
403
538
|
6. **Barrier check**: If wave was a barrier skill, read artifacts, update context:
|
|
404
539
|
| Barrier | Read | Update |
|
|
@@ -413,8 +548,9 @@ After evaluation:
|
|
|
413
548
|
|
|
414
549
|
8. **Failure check**: Any step failed → mark remaining skipped, pause session, STOP
|
|
415
550
|
|
|
416
|
-
9. **Decision check**: If next pending step is a decision node
|
|
417
|
-
|
|
551
|
+
9. **Decision check**: If next pending step is a decision node:
|
|
552
|
+
- `auto == true` → 不 STOP,直接进入 Phase 2b 评估该决策节点,然后继续循环
|
|
553
|
+
- `auto == false` → STOP。Display: `⏸ 到达决策节点: {decision_type}。使用 $maestro-ralph execute 继续。`
|
|
418
554
|
|
|
419
555
|
10. **Continue**: If next pending is not decision, loop back to step 1
|
|
420
556
|
|
|
@@ -451,15 +587,17 @@ Write status.json
|
|
|
451
587
|
RALPH COMPLETE
|
|
452
588
|
============================================================
|
|
453
589
|
Session: {id}
|
|
590
|
+
Quality: {quality_mode}
|
|
454
591
|
Phase: {phase} → {milestone}
|
|
455
592
|
Waves: {wave_count} executed
|
|
456
|
-
Steps: {completed}/{total}
|
|
593
|
+
Steps: {completed}/{total} ({skipped} skipped)
|
|
457
594
|
|
|
458
595
|
[✓] 0. maestro-plan 1 [W1]
|
|
459
596
|
[✓] 1. maestro-execute 1 [W2]
|
|
460
597
|
[✓] 2. maestro-verify 1 [W3]
|
|
461
598
|
[✓] 3. ◆ post-verify [decision: no gaps]
|
|
462
|
-
[
|
|
599
|
+
[~] 4. quality-business-test 1 [skipped: standard mode]
|
|
600
|
+
[✓] 5. quality-review 1 [W4]
|
|
463
601
|
...
|
|
464
602
|
|
|
465
603
|
Resume: $maestro-ralph execute
|
|
@@ -479,11 +617,12 @@ id,skill_call,topic
|
|
|
479
617
|
"4","$maestro-ralph-execute \"$quality-business-test 1\"","Ralph step 4/14: business test phase 1"
|
|
480
618
|
```
|
|
481
619
|
|
|
482
|
-
- `skill_call` column:
|
|
620
|
+
- `skill_call` column: `$maestro-ralph-execute [-y] "<inner_skill_call>"`(`session.auto` 时附加 `-y`)
|
|
483
621
|
- `topic` column: human-readable step description
|
|
484
622
|
- Non-barrier + non-decision steps can be grouped in one wave CSV with multiple rows
|
|
485
623
|
- Barrier steps always solo (one row per CSV)
|
|
486
624
|
- Decision steps are NEVER in CSV — processed by ralph directly
|
|
625
|
+
- CLI steps (type=="cli") are NEVER in CSV — processed by ralph via maestro delegate
|
|
487
626
|
</csv_schema>
|
|
488
627
|
|
|
489
628
|
<error_codes>
|
|
@@ -504,16 +643,20 @@ id,skill_call,topic
|
|
|
504
643
|
- [ ] state.json artifacts correctly read with actual schema (type, path, scope, milestone, depends_on)
|
|
505
644
|
- [ ] Lifecycle position inferred from artifacts + result files (verification.json, review.json, uat.md)
|
|
506
645
|
- [ ] Artifact dir resolved via resolve_artifact_dir() with fallback globs
|
|
507
|
-
- [ ]
|
|
508
|
-
- [ ]
|
|
646
|
+
- [ ] Quality mode (full/standard/quick) 正确推断并影响步骤生成
|
|
647
|
+
- [ ] Conditional steps: business-test 仅 full 模式,test-gen 按覆盖率条件
|
|
648
|
+
- [ ] CLI 替代: quick 模式 review 走 delegate 而非 skill spawn
|
|
649
|
+
- [ ] Decision nodes at: post-verify, post-biz-test (full only), post-review, post-test (full/standard), post-milestone
|
|
509
650
|
- [ ] Every decision failure path starts with quality-debug before plan --gaps
|
|
651
|
+
- [ ] passed_gates[] 正确追踪,重试时跳过已通过的质量门
|
|
652
|
+
- [ ] 重试循环轻量化:post-test 失败不重跑整条管线,仅重跑未通过的门
|
|
510
653
|
- [ ] retry_count tracked per decision node, max_retries enforced
|
|
511
654
|
- [ ] Max retries → post-debug-escalate → session paused for human intervention
|
|
512
|
-
- [ ]
|
|
655
|
+
- [ ] Skills via spawn_agents_on_csv, CLI via delegate — coordinator never executes directly
|
|
513
656
|
- [ ] Decision nodes STOP execution — user must call `execute` to resume
|
|
514
657
|
- [ ] Barrier skills run solo, non-barriers grouped in parallel waves
|
|
515
658
|
- [ ] Placeholder args resolved before CSV assembly ({phase}, {intent}, {scratch_dir})
|
|
516
|
-
- [ ] post-milestone
|
|
659
|
+
- [ ] post-milestone 用 buildSteps() 生成下一个 milestone 的步骤(按 quality_mode)
|
|
517
660
|
- [ ] status.json persisted after every wave
|
|
518
661
|
- [ ] Command insertion + reindex works correctly after decision expansion
|
|
519
662
|
</success_criteria>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quality-business-test
|
|
3
3
|
description: PRD-forward business testing with requirement traceability, multi-layer execution (L1 Interface -> L2 Business Rule -> L3 Scenario), fixture generation, and feedback loop.
|
|
4
|
-
argument-hint: "<phase> [--spec SPEC-xxx] [--layer L1|L2|L3] [--gen-code] [--dry-run] [--re-run] [
|
|
4
|
+
argument-hint: "<phase> [--spec SPEC-xxx] [--layer L1|L2|L3] [--gen-code] [--dry-run] [--re-run] [-y]"
|
|
5
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -37,7 +37,7 @@ $quality-business-test "3 --gen-code" # generate framework-specifi
|
|
|
37
37
|
$quality-business-test "3 --dry-run" # extract scenarios only, don't execute
|
|
38
38
|
$quality-business-test "3 --re-run" # re-run only previously failed scenarios
|
|
39
39
|
$quality-business-test "3 --spec SPEC-auth-2026-04" # explicit spec reference
|
|
40
|
-
$quality-business-test "3
|
|
40
|
+
$quality-business-test "3 -y" # skip plan confirmation
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
**Flags**:
|
|
@@ -47,9 +47,9 @@ $quality-business-test "3 --auto" # skip plan confirmation
|
|
|
47
47
|
- `--gen-code`: Generate framework-specific test classes (JUnit/RestAssured, supertest/vitest, pytest/httpx)
|
|
48
48
|
- `--dry-run`: Extract scenarios and fixtures only, don't execute
|
|
49
49
|
- `--re-run`: Re-run only previously failed/blocked scenarios
|
|
50
|
-
-
|
|
50
|
+
- `-y`: Skip interactive confirmations
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
`-y` skips interactive confirmation of test plan. `--dry-run` extracts scenarios only without execution.
|
|
53
53
|
|
|
54
54
|
**Output**: `{artifact_dir}/.tests/business/business-test-plan.json` + `business-test-report.json` + `business-test-summary.md`
|
|
55
55
|
</context>
|
|
@@ -125,7 +125,7 @@ Three tiers:
|
|
|
125
125
|
1. Archive previous `business-test-plan.json` to `.history/` if exists
|
|
126
126
|
2. Write `.tests/business/business-test-plan.json` with scenarios, fixtures, mock_contracts, requirement_coverage_plan
|
|
127
127
|
3. Display plan summary (scenario counts per layer, fixture counts, requirement coverage)
|
|
128
|
-
4. If not
|
|
128
|
+
4. If not `-y`: wait for user confirmation (yes/edit/cancel)
|
|
129
129
|
5. If `--dry-run`: stop here, report plan
|
|
130
130
|
|
|
131
131
|
### Step 5: Generate Test Code (if --gen-code)
|
|
@@ -209,7 +209,7 @@ Map each result to `REQ-NNN:AC-N`. Per AC: `passed` (all scenarios pass), `faile
|
|
|
209
209
|
- [ ] Phase resolved and spec package loaded (or degraded mode activated)
|
|
210
210
|
- [ ] Business test scenarios extracted from PRD acceptance criteria
|
|
211
211
|
- [ ] Fixtures generated for all layers
|
|
212
|
-
- [ ] Test plan written and confirmed (or
|
|
212
|
+
- [ ] Test plan written and confirmed (or -y/--dry-run)
|
|
213
213
|
- [ ] Tests executed progressively L1 -> L2 -> L3 with fail-fast
|
|
214
214
|
- [ ] Traceability matrix maps every result to REQ-NNN:AC-N
|
|
215
215
|
- [ ] Reports generated (JSON + summary markdown)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quality-retrospective
|
|
3
3
|
description: Multi-lens 复盘 (retrospective) for completed phases. Context-Agent Fork loads phase artifacts once; four parallel lens agents (technical, process, quality, decision) analyze independently; synthesizer distills insights; outputs are routed to spec stubs, knowhow tips, issues, and lessons.jsonl.
|
|
4
|
-
argument-hint: "[phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [
|
|
4
|
+
argument-hint: "[phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [-y]"
|
|
5
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -50,7 +50,7 @@ $quality-retrospective "3"
|
|
|
50
50
|
$quality-retrospective "2..4"
|
|
51
51
|
$quality-retrospective "--all"
|
|
52
52
|
$quality-retrospective "3 --lens technical --no-route"
|
|
53
|
-
$quality-retrospective "3 --compare 2
|
|
53
|
+
$quality-retrospective "3 --compare 2 -y"
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
**Flags**:
|
|
@@ -61,9 +61,9 @@ $quality-retrospective "3 --compare 2 --auto-yes"
|
|
|
61
61
|
- `--lens <name>` -- restrict to one lens (repeatable): `technical|process|quality|decision`
|
|
62
62
|
- `--no-route` -- produce retrospective.{md,json} only; skip auto-creation of spec/note/issue
|
|
63
63
|
- `--compare <M>` -- emit a delta section vs phase M's prior retrospective
|
|
64
|
-
-
|
|
64
|
+
- `-y` -- accept all routing recommendations without prompting
|
|
65
65
|
|
|
66
|
-
When
|
|
66
|
+
When `-y`: Accept all routing recommendations without prompting. Route all insights automatically.
|
|
67
67
|
|
|
68
68
|
**Storage written**:
|
|
69
69
|
- `{target_dir}/retrospective.md` -- human-readable record (target_dir resolved via state.json artifact registry to `.workflow/scratch/{YYYYMMDD}-{type}-{slug}/`)
|
|
@@ -124,7 +124,7 @@ Each artifact's type determines its outputs at `.workflow/{a.path}/`:
|
|
|
124
124
|
6. **Stable INS-ids**: `INS-{8hex}` from `hash(phase_num + lens + title)` -- re-runs do not create duplicates
|
|
125
125
|
7. **Archive before overwrite**: Move existing retrospective.{md,json} to `.history/` with timestamp before writing new ones
|
|
126
126
|
8. **Spec learnings.md backward-compat**: Append to it only if it already exists -- never create it
|
|
127
|
-
9. **Route confirmation**: Unless
|
|
127
|
+
9. **Route confirmation**: Unless `-y`, present routing table and ask per-group before writing spec/issue/knowhow
|
|
128
128
|
10. **Lessons always written**: Append to `lessons.jsonl` regardless of `--no-route` -- routing only controls spec/issue/knowhow creation
|
|
129
129
|
</invariants>
|
|
130
130
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quality-test
|
|
3
3
|
description: Conversational UAT with session persistence, auto-diagnosis, and gap-plan closure loop. Interactive testing flow with severity inference and parallel debug agents.
|
|
4
|
-
argument-hint: "<phase> [--auto-fix] [--session ID]"
|
|
4
|
+
argument-hint: "<phase> [-y] [--auto-fix] [--session ID]"
|
|
5
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -29,7 +29,7 @@ $quality-test "--session 04-comments" # resume specific session
|
|
|
29
29
|
- `--auto-fix`: Auto-trigger gap-fix loop (plan --gaps -> execute -> re-verify) on failures
|
|
30
30
|
- `--session ID`: Resume a specific UAT session
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
`-y` implies `--auto-fix`。UAT 执行本身保持交互(展示预期 → 确认),`-y` 仅自动化 gap closure loop。
|
|
33
33
|
|
|
34
34
|
**Output**: `{target_dir}/uat.md` + `.tests/test-plan.json` + `.tests/test-results.json` + `.tests/coverage-report.json`
|
|
35
35
|
</context>
|