maestro-flow 0.3.28 → 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.
@@ -0,0 +1,193 @@
1
+ ---
2
+ name: maestro-ralph-execute
3
+ description: Single-step skill executor — spawned by maestro-ralph via CSV, reads ralph session context, executes one skill command, reports result
4
+ argument-hint: "<skill_call>"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
6
+ ---
7
+
8
+ <purpose>
9
+ Worker agent spawned by maestro-ralph via `spawn_agents_on_csv`.
10
+ Each invocation executes exactly ONE skill command and reports the result.
11
+
12
+ Receives `skill_call` (e.g. `$maestro-plan 1`) from the wave CSV.
13
+ Before execution, reads the ralph session status.json to obtain execution context
14
+ (phase, milestone, intent, artifact paths) — uses this to enrich skill args when needed.
15
+
16
+ Writes back **nothing** to status.json — ralph coordinator reads the result CSV and updates status.json itself.
17
+ Decision nodes never arrive here — ralph processes them directly.
18
+ </purpose>
19
+
20
+ <context>
21
+ **From CSV row:**
22
+ - `skill_call` — full skill invocation string (e.g. `$maestro-plan 1`, `$quality-review 1`)
23
+ - `topic` — brief description of what this step does
24
+
25
+ **The skill_call format:** `$<skill-name> <args>`
26
+
27
+ **Ralph session status.json** — located at `.workflow/.ralph/ralph-*/status.json` (latest running session).
28
+ Read-only for this agent. Provides:
29
+
30
+ ```json
31
+ {
32
+ "id": "ralph-{YYYYMMDD-HHmmss}",
33
+ "intent": "用户原始输入",
34
+ "status": "running",
35
+ "phase": 1,
36
+ "milestone": "MVP",
37
+ "lifecycle_position": "plan",
38
+ "context": {
39
+ "plan_dir": ".workflow/scratch/...",
40
+ "analysis_dir": ".workflow/scratch/...",
41
+ "brainstorm_dir": null
42
+ },
43
+ "steps": [...],
44
+ "current_step": 3
45
+ }
46
+ ```
47
+
48
+ **Project state** — `.workflow/state.json` provides artifact registry:
49
+ ```json
50
+ {
51
+ "current_milestone": "MVP",
52
+ "artifacts": [
53
+ { "id": "ANL-001", "type": "analyze", "phase": 1,
54
+ "path": "phases/01-auth-multi-tenant", "status": "completed" }
55
+ ]
56
+ }
57
+ ```
58
+ </context>
59
+
60
+ <execution>
61
+
62
+ ## Step 1: Parse skill_call
63
+
64
+ ```
65
+ Extract from skill_call:
66
+ skill_name = text between $ and first space (e.g. "maestro-plan")
67
+ skill_args = remainder after first space (e.g. "1")
68
+
69
+ If skill_call is empty or malformed:
70
+ → report_agent_job_result({ status: "failed", error: "Invalid skill_call" })
71
+ → End.
72
+ ```
73
+
74
+ ## Step 2: Load ralph session context
75
+
76
+ ```
77
+ Glob .workflow/.ralph/ralph-*/status.json
78
+ Filter: status == "running"
79
+ Sort by created_at DESC, take first
80
+ → ralph_session
81
+
82
+ If not found: proceed with skill_args as-is (standalone execution)
83
+ ```
84
+
85
+ Extract from ralph_session:
86
+ - `phase` — current phase number
87
+ - `milestone` — current milestone name
88
+ - `intent` — user's original input text
89
+ - `context.plan_dir` — latest plan artifact directory
90
+ - `context.analysis_dir` — latest analysis artifact directory
91
+ - `context.brainstorm_dir` — brainstorm output directory
92
+
93
+ Also read `.workflow/state.json` for artifact registry when needed.
94
+
95
+ ## Step 3: Enrich skill args
96
+
97
+ If skill_args contain unresolved context or are insufficient, enrich based on skill type:
98
+
99
+ ```
100
+ Per-skill enrichment (when args need context from session):
101
+
102
+ maestro-brainstorm:
103
+ If args empty → args = '"{intent}"'
104
+
105
+ maestro-roadmap:
106
+ If args empty → args = '"{intent}"'
107
+
108
+ maestro-analyze:
109
+ If args is just a number → keep as phase number
110
+ If args empty → args = '{phase}' or '"{intent}"'
111
+
112
+ maestro-plan:
113
+ If args is number → keep as phase
114
+ If needs artifact dir → resolve latest analyze artifact:
115
+ state.json.artifacts[] → filter(type=="analyze", phase==session.phase) → latest → --dir .workflow/scratch/{path}
116
+
117
+ maestro-execute:
118
+ If args is number → keep as phase
119
+ If needs artifact dir → resolve latest plan artifact:
120
+ state.json.artifacts[] → filter(type=="plan", phase==session.phase) → latest → --dir .workflow/scratch/{path}
121
+
122
+ quality-debug:
123
+ Read previous step's result artifacts for gap/failure context
124
+ If from verify: append gap summary from verification.json
125
+ If from test: append --from-uat {phase}
126
+ If from business-test: append --from-business-test {phase}
127
+
128
+ quality-* (review, test, test-gen, business-test):
129
+ If args empty → args = '{phase}'
130
+
131
+ maestro-verify, maestro-milestone-audit, maestro-milestone-complete:
132
+ If args empty → args = '{phase}' (or empty for milestone-*)
133
+ ```
134
+
135
+ ## Step 4: Execute skill
136
+
137
+ ```
138
+ Read .codex/skills/{skill_name}/SKILL.md to understand the skill
139
+ Execute the skill with enriched skill_args as $ARGUMENTS
140
+
141
+ Track:
142
+ - Artifact paths produced (scratch dirs, plan.json, verification.json, etc.)
143
+ - Session IDs created (WFS-*, ANL-*, PLN-*, etc.)
144
+ - Success/failure status
145
+ ```
146
+
147
+ ## Step 5: Report result
148
+
149
+ ```
150
+ report_agent_job_result({
151
+ status: "completed" | "failed",
152
+ skill_call: "{original_skill_call}",
153
+ summary: "one-line result description",
154
+ artifacts: "comma-separated artifact paths or empty string",
155
+ error: "failure reason or empty string"
156
+ })
157
+ ```
158
+
159
+ **Artifact paths to report** (for ralph's barrier analysis):
160
+ | Skill | Report |
161
+ |-------|--------|
162
+ | maestro-analyze | scratch dir path containing context.md |
163
+ | maestro-plan | scratch dir path containing plan.json |
164
+ | maestro-execute | scratch dir path containing .summaries/ |
165
+ | maestro-brainstorm | .brainstorming/ output dir |
166
+ | maestro-roadmap | roadmap.md path |
167
+ | maestro-verify | verification.json path |
168
+ | quality-review | review.json path |
169
+ | quality-test | uat.md path |
170
+ | quality-business-test | business test output path |
171
+ | Others | empty or relevant output path |
172
+
173
+ </execution>
174
+
175
+ <error_codes>
176
+ | Code | Severity | Description | Recovery |
177
+ |------|----------|-------------|----------|
178
+ | E001 | error | skill_call parsing failed | Report failed |
179
+ | E002 | error | Skill SKILL.md not found | Report failed |
180
+ | E003 | error | Skill execution error | Report failed with error details |
181
+ | E004 | error | Ralph session not found (standalone mode) | Execute with args as-is |
182
+ | W001 | warning | Artifact dir not found for enrichment | Use args as-is, warn in summary |
183
+ </error_codes>
184
+
185
+ <success_criteria>
186
+ - [ ] skill_call correctly parsed into skill_name + skill_args
187
+ - [ ] Ralph session status.json read for context (phase, intent, artifact paths)
188
+ - [ ] Args enriched per-skill when context needed (brainstorm→intent, plan→dir, debug→gaps)
189
+ - [ ] Skill executed via its own SKILL.md
190
+ - [ ] Artifact paths accurately reported for ralph's barrier analysis
191
+ - [ ] status.json NEVER written by this agent
192
+ - [ ] Result reported via report_agent_job_result
193
+ </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] [--auto]"
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 --auto" # skip plan confirmation
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
- - `--auto`: Skip interactive confirmations
50
+ - `-y`: Skip interactive confirmations
51
51
 
52
- `--auto` skips interactive confirmation of test plan. `--dry-run` extracts scenarios only without execution.
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 `--auto`: wait for user confirmation (yes/edit/cancel)
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 --auto/--dry-run)
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] [--auto-yes]"
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 --auto-yes"
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
- - `--auto-yes` -- accept all routing recommendations without prompting
64
+ - `-y` -- accept all routing recommendations without prompting
65
65
 
66
- When `--auto-yes`: Accept all routing recommendations without prompting. Route all insights automatically.
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 `--auto-yes`, present routing table and ask per-group before writing spec/issue/knowhow
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
- No auto mode -- UAT is inherently interactive. `--auto-fix` only automates gap closure, not test execution.
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maestro-flow",
3
- "version": "0.3.28",
3
+ "version": "0.3.30",
4
4
  "description": "Workflow orchestration CLI with MCP endpoint support and extensible architecture",
5
5
  "type": "module",
6
6
  "imports": {