maestro-flow 0.3.36 → 0.3.37

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.
@@ -257,7 +257,7 @@ For parallel groups show fan-out/fan-in:
257
257
  ```
258
258
  N-003a [skill] quality-review ─┐
259
259
  ├─ N-004 [skill] quality-test
260
- N-003b [cli] gemini analysis ─┘
260
+ N-003b [cli] cli analysis ─┘
261
261
  ```
262
262
 
263
263
  **Step 4.2** — AskUserQuestion:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-execute
3
3
  description: Execute plan with wave-based parallel execution and atomic commits
4
- argument-hint: "[phase] [--auto-commit] [--method agent|codex|gemini|cli|auto] [--executor <tool>] [--dir <path>] [-y]"
4
+ argument-hint: "[phase] [--auto-commit] [--method agent|cli|auto] [--executor <tool>] [--dir <path>] [-y]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maestro-ralph-execute
3
- description: Single-step executor — find next pending step in session, execute by type (decision/skill/cli), hand off to next iteration
3
+ description: Single-step executor — find next pending step in session, execute by type (decision/internal/external), hand off to next iteration
4
4
  argument-hint: "[-y] [session-id]"
5
5
  allowed-tools:
6
6
  - Read
@@ -19,12 +19,12 @@ Each invocation: find next pending step → execute → update status → hand o
19
19
 
20
20
  Three node types:
21
21
  - **decision** (ralph-only): `Skill("maestro-ralph")` — ralph re-evaluates, may expand chain
22
- - **skill**: `Skill({ skill, args })` — synchronous in-session → self-invoke next
23
- - **cli**: `maestro delegate` background → STOP → callback → self-invoke next
22
+ - **internal**: `Skill({ skill, args })` — synchronous in-session → self-invoke next
23
+ - **external**: `maestro delegate --to claude` new Claude Code session executing `/{skill} {args}` → STOP → callback → self-invoke next
24
24
 
25
25
  Session sources:
26
26
  - **source: "ralph"** — Adaptive chain with decision nodes. Primary use case.
27
- - **source: "maestro"** — Static chain, skill/cli only. No decision callbacks.
27
+ - **source: "maestro"** — Static chain, internal/external only. No decision callbacks.
28
28
 
29
29
  Mutual invocation with `/maestro-ralph` forms a self-perpetuating work loop.
30
30
  </purpose>
@@ -149,9 +149,9 @@ Ralph will: detect running decision → evaluate results → optionally expand s
149
149
 
150
150
  **After Skill("maestro-ralph") returns, this execution ends.** Ralph handles the handoff.
151
151
 
152
- ### 5b. skill node
152
+ ### 5b. internal node
153
153
 
154
- HARD RULE: Every skill step MUST be executed via `Skill({ skill, args })`.
154
+ HARD RULE: Every internal step MUST be executed via `Skill({ skill, args })`.
155
155
  Never "simulate" or "inline" a skill's work. If Skill() is not called, the step has NOT been executed.
156
156
 
157
157
  **Auto flag propagation** (when `auto == true`):
@@ -180,20 +180,22 @@ Skill({ skill: next.skill, args: effective_args })
180
180
  **On success** → Step 5d (Mark Complete).
181
181
  **On failure** → Step 5e (Handle Failure).
182
182
 
183
- ### 5c. cli node
183
+ ### 5c. external node
184
184
 
185
- Background delegate execution with stop-and-wait pattern.
185
+ Context-isolated skill execution via new Claude Code session.
186
186
 
187
- ```
188
- cli_tool = session.cli_tool
187
+ HARD RULE: external nodes ALWAYS delegate to `claude` — only Claude Code can execute slash-command skills.
188
+ `session.cli_tool` is for analysis-mode delegates (e.g., decision evaluation in ralph), NOT for external node execution.
189
189
 
190
+ ```
190
191
  Bash({
191
- command: `maestro delegate "PURPOSE: 执行 /${next.skill} ${next.args}
192
- TASK: 运行 /${next.skill} ${next.args}
193
- MODE: write
194
- CONTEXT: @**/*
195
- EXPECTED: 产出写入 .workflow/scratch/,artifact 注册到 state.json
196
- CONSTRAINTS: 严格按照 /${next.skill} 的正常流程执行" --to ${cli_tool} --mode write`,
192
+ command: `maestro delegate "Execute: /${next.skill} ${next.args}
193
+
194
+ You are a delegate session within a ralph/maestro pipeline.
195
+ Your task: invoke the slash command /${next.skill} with args: ${next.args}
196
+ Use Skill({ skill: \"${next.skill}\", args: \"${next.args}\" }) to execute it.
197
+ Do NOT reimplement the skill logic manually invoke the actual command.
198
+ All artifact outputs follow the skill's own conventions." --to claude --mode write`,
197
199
  run_in_background: true,
198
200
  timeout: 600000
199
201
  })
@@ -218,7 +220,7 @@ Scan output for context propagation signals:
218
220
  SPEC-xxx → context.spec_session_id
219
221
 
220
222
  Write status.json
221
- Display: [{next.index}/{total}] ✓ {next.skill} completed {next.type == "cli" ? "[cli]" : ""}
223
+ Display: [{next.index}/{total}] ✓ {next.skill} completed {next.type == "external" ? "[external]" : ""}
222
224
  ```
223
225
 
224
226
  Then hand off:
@@ -277,17 +279,17 @@ Display completion report:
277
279
  Phase: {phase}
278
280
  Steps: {completed}/{total}
279
281
 
280
- [✓] 0. maestro-plan 1 [skill]
281
- [✓] 1. ⚡ maestro-execute 1 [cli]
282
- [✓] 2. maestro-verify 1 [skill]
282
+ [✓] 0. maestro-plan 1 [internal]
283
+ [✓] 1. ⚡ maestro-execute 1 [external]
284
+ [✓] 2. maestro-verify 1 [internal]
283
285
  [✓] 3. ◆ post-verify [decision]
284
- [—] 4. quality-auto-test 1 [skill] (skipped)
286
+ [—] 4. quality-auto-test 1 [internal] (skipped)
285
287
  ...
286
288
  ============================================================
287
289
  ```
288
290
 
289
291
  Status icons: `✓` completed, `—` skipped, `✗` failed, ` ` pending.
290
- Type badges: `◆` decision, `⚡` cli, (none) skill.
292
+ Type badges: `◆` decision, `⚡` external, (none) internal.
291
293
 
292
294
  **End.**
293
295
 
@@ -310,8 +312,8 @@ Type badges: `◆` decision, `⚡` cli, (none) skill.
310
312
  - [ ] Per-skill enrichment provides correct args when empty/minimal
311
313
  - [ ] Artifact dir resolution finds latest artifact for --dir args
312
314
  - [ ] decision nodes hand off to maestro-ralph via Skill() (ralph sessions only)
313
- - [ ] skill nodes execute via Skill() with auto flag propagation
314
- - [ ] cli nodes use maestro delegate with run_in_background + STOP pattern
315
+ - [ ] internal nodes execute via Skill() with auto flag propagation
316
+ - [ ] external nodes use maestro delegate --to claude with run_in_background + STOP pattern
315
317
  - [ ] Context propagation: output signals update status.json.context
316
318
  - [ ] status.json updated after every status change (resume-safe)
317
319
  - [ ] Auto mode: retry once then skip; interactive: AskUserQuestion retry/skip/abort
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maestro-ralph
3
- description: Closed-loop lifecycle decision engine — read project state, infer position, build adaptive command chain with decision/skill/cli nodes
3
+ description: Closed-loop lifecycle decision engine — read project state, infer position, build adaptive command chain with decision/internal/external nodes
4
4
  argument-hint: "[-y] \"intent\" | status | continue"
5
5
  allowed-tools:
6
6
  - Read
@@ -18,8 +18,8 @@ Closed-loop decision engine for the maestro workflow lifecycle.
18
18
  Reads project state → infers lifecycle position → builds adaptive command chain → delegates execution.
19
19
 
20
20
  Three node types:
21
- - **skill**: In-session `Skill()` call (synchronous, lightweight)
22
- - **cli**: `maestro delegate` (context-isolated, heavy computation)
21
+ - **internal**: In-session `Skill()` call (synchronous, lightweight)
22
+ - **external**: New Claude Code session via `maestro delegate --to claude` executing `/{skill} {args}` (context-isolated, heavy computation)
23
23
  - **decision**: Hand back to ralph for re-evaluation (adaptive branching)
24
24
 
25
25
  Key difference from maestro coordinator:
@@ -73,9 +73,9 @@ Display:
73
73
  Current: [{current_step}] {steps[current_step].skill} [{type}]
74
74
 
75
75
  Commands:
76
- [✓] 0. maestro-analyze 1 [skill]
77
- [▸] 1. maestro-plan 1 [skill]
78
- [ ] 2. maestro-execute 1 [cli]
76
+ [✓] 0. maestro-analyze 1 [external]
77
+ [▸] 1. maestro-plan 1 [internal]
78
+ [ ] 2. maestro-execute 1 [external]
79
79
  ...
80
80
  End.
81
81
  ```
@@ -164,23 +164,25 @@ Generate steps from `lifecycle_position` to target (default: `milestone-complete
164
164
 
165
165
  | Stage | Skill command | Type | Decision after |
166
166
  |-------|--------------|------|----------------|
167
- | brainstorm | `maestro-brainstorm "{intent}"` | cli | — (0→1 only) |
168
- | init | `maestro-init` | skill | — |
169
- | roadmap | `maestro-roadmap "{intent}"` | skill | — |
170
- | analyze | `maestro-analyze {phase}` | cli | — |
171
- | plan | `maestro-plan {phase}` | skill | — |
172
- | execute | `maestro-execute {phase}` | cli | — |
173
- | verify | `maestro-verify {phase}` | skill | `post-verify` |
174
- | business-test | `quality-auto-test {phase}` | skill | `post-business-test` |
175
- | review | `quality-review {phase}` | skill | `post-review` |
176
- | test-gen | `quality-auto-test {phase}` | skill | — |
177
- | test | `quality-test {phase}` | skill | `post-test` |
178
- | milestone-audit | `maestro-milestone-audit` | skill | — |
179
- | milestone-complete | `maestro-milestone-complete` | skill | `post-milestone` |
167
+ | brainstorm | `maestro-brainstorm "{intent}"` | external | — (0→1 only) |
168
+ | init | `maestro-init` | internal | — |
169
+ | roadmap | `maestro-roadmap "{intent}"` | internal | — |
170
+ | analyze | `maestro-analyze {phase}` | external | — |
171
+ | plan | `maestro-plan {phase}` | internal | — |
172
+ | execute | `maestro-execute {phase}` | external | — |
173
+ | verify | `maestro-verify {phase}` | internal | `post-verify` |
174
+ | business-test | `quality-auto-test {phase}` | internal | `post-business-test` |
175
+ | review | `quality-review {phase}` | internal | `post-review` |
176
+ | test-gen | `quality-auto-test {phase}` | internal | — |
177
+ | test | `quality-test {phase}` | internal | `post-test` |
178
+ | milestone-audit | `maestro-milestone-audit` | internal | — |
179
+ | milestone-complete | `maestro-milestone-complete` | internal | `post-milestone` |
180
180
 
181
181
  **Type rationale:**
182
- - `cli` = heavy computation needing isolated context (analyze, execute, brainstorm)
183
- - `skill` = needs user interaction or is lightweight (plan, verify, quality-*, milestone-*)
182
+ - `internal` = in-session `Skill()` call, needs user interaction or is lightweight (plan, verify, quality-*, milestone-*)
183
+ - `external` = new Claude Code session via `maestro delegate --to claude` executing `/{skill} {args}`, context-isolated heavy computation (analyze, execute, brainstorm)
184
+
185
+ IMPORTANT: `external` ≠ single CLI tool call. It spawns a full Claude Code session that executes the skill command — the delegate session has complete skill access.
184
186
 
185
187
  **Build rules:**
186
188
  1. Start from inferred position, skip completed stages
@@ -195,19 +197,19 @@ Generate steps from `lifecycle_position` to target (default: `milestone-complete
195
197
  **Example — from "plan" position:**
196
198
  ```json
197
199
  [
198
- { "index": 0, "type": "skill", "skill": "maestro-plan", "args": "{phase}" },
199
- { "index": 1, "type": "cli", "skill": "maestro-execute", "args": "{phase}" },
200
- { "index": 2, "type": "skill", "skill": "maestro-verify", "args": "{phase}" },
200
+ { "index": 0, "type": "internal", "skill": "maestro-plan", "args": "{phase}" },
201
+ { "index": 1, "type": "external", "skill": "maestro-execute", "args": "{phase}" },
202
+ { "index": 2, "type": "internal", "skill": "maestro-verify", "args": "{phase}" },
201
203
  { "index": 3, "type": "decision", "skill": "maestro-ralph", "args": "{\"decision\":\"post-verify\",\"retry_count\":0,\"max_retries\":2}" },
202
- { "index": 4, "type": "skill", "skill": "quality-auto-test", "args": "{phase}" },
204
+ { "index": 4, "type": "internal", "skill": "quality-auto-test", "args": "{phase}" },
203
205
  { "index": 5, "type": "decision", "skill": "maestro-ralph", "args": "{\"decision\":\"post-business-test\",\"retry_count\":0,\"max_retries\":2}" },
204
- { "index": 6, "type": "skill", "skill": "quality-review", "args": "{phase}" },
206
+ { "index": 6, "type": "internal", "skill": "quality-review", "args": "{phase}" },
205
207
  { "index": 7, "type": "decision", "skill": "maestro-ralph", "args": "{\"decision\":\"post-review\",\"retry_count\":0,\"max_retries\":2}" },
206
- { "index": 8, "type": "skill", "skill": "quality-auto-test", "args": "{phase}" },
207
- { "index": 9, "type": "skill", "skill": "quality-test", "args": "{phase}" },
208
+ { "index": 8, "type": "internal", "skill": "quality-auto-test", "args": "{phase}" },
209
+ { "index": 9, "type": "internal", "skill": "quality-test", "args": "{phase}" },
208
210
  { "index": 10, "type": "decision", "skill": "maestro-ralph", "args": "{\"decision\":\"post-test\",\"retry_count\":0,\"max_retries\":2}" },
209
- { "index": 11, "type": "skill", "skill": "maestro-milestone-audit", "args": "" },
210
- { "index": 12, "type": "skill", "skill": "maestro-milestone-complete", "args": "" },
211
+ { "index": 11, "type": "internal", "skill": "maestro-milestone-audit", "args": "" },
212
+ { "index": 12, "type": "internal", "skill": "maestro-milestone-complete", "args": "" },
211
213
  { "index": 13, "type": "decision", "skill": "maestro-ralph", "args": "{\"decision\":\"post-milestone\"}" }
212
214
  ]
213
215
  ```
@@ -253,9 +255,9 @@ Write to `.workflow/.maestro/{session_id}/status.json`.
253
255
  Target: {target}
254
256
  Commands: {total} steps ({decision_count} decision points)
255
257
 
256
- [ ] 0. maestro-plan 1 [skill]
257
- [ ] 1. maestro-execute 1 [cli]
258
- [ ] 2. maestro-verify 1 [skill]
258
+ [ ] 0. maestro-plan 1 [internal]
259
+ [ ] 1. maestro-execute 1 [external]
260
+ [ ] 2. maestro-verify 1 [internal]
259
261
  [ ] 3. ◆ post-verify [decision]
260
262
  ...
261
263
  ============================================================
@@ -383,7 +385,7 @@ The delegate's `gap_summary` is passed as context to `quality-debug`.
383
385
  ```
384
386
  quality-debug "{gap_summary}"
385
387
  maestro-plan --gaps {phase}
386
- maestro-execute {phase} [cli]
388
+ maestro-execute {phase} [external]
387
389
  maestro-verify {phase}
388
390
  decision:post-verify {retry_count + 1}
389
391
  ```
@@ -392,7 +394,7 @@ decision:post-verify {retry_count + 1}
392
394
  ```
393
395
  quality-debug --from-business-test "{gap_summary}"
394
396
  maestro-plan --gaps {phase}
395
- maestro-execute {phase} [cli]
397
+ maestro-execute {phase} [external]
396
398
  maestro-verify {phase}
397
399
  decision:post-verify {retry: 0}
398
400
  quality-auto-test {phase}
@@ -403,7 +405,7 @@ decision:post-business-test {retry_count + 1}
403
405
  ```
404
406
  quality-debug "{gap_summary}"
405
407
  maestro-plan --gaps {phase}
406
- maestro-execute {phase} [cli]
408
+ maestro-execute {phase} [external]
407
409
  quality-review {phase}
408
410
  decision:post-review {retry_count + 1}
409
411
  ```
@@ -412,7 +414,7 @@ decision:post-review {retry_count + 1}
412
414
  ```
413
415
  quality-debug --from-uat "{gap_summary}"
414
416
  maestro-plan --gaps {phase}
415
- maestro-execute {phase} [cli]
417
+ maestro-execute {phase} [external]
416
418
  maestro-verify {phase}
417
419
  decision:post-verify {retry: 0}
418
420
  quality-auto-test {phase}
@@ -114,7 +114,7 @@ In auto mode, maestro also:
114
114
  - [ ] Low-complexity intents routed to maestro-quick
115
115
  - [ ] All chains dispatched via unified executor (maestro-ralph-execute) with status.json tracking
116
116
  - [ ] Phase numbers auto-detected and passed to downstream commands
117
- - [ ] (super mode) Requirements expanded and validated via Gemini before roadmap creation
117
+ - [ ] (super mode) Requirements expanded and validated via CLI delegate before roadmap creation
118
118
  - [ ] (super mode) Each milestone scored ≥ 80% before advancing
119
119
  - [ ] (super mode) All milestones completed with no user intervention
120
120
  - [ ] (super mode) Final system builds, starts, and passes all tests
@@ -16,7 +16,7 @@ Automated issue discovery via multi-perspective codebase analysis (8 perspective
16
16
 
17
17
  - **Default (no args)**: Interactive mode selection — choose multi-perspective or prompt-driven.
18
18
  - **`multi-perspective`**: 8-perspective parallel agent scan — security, performance, reliability, maintainability, scalability, UX, accessibility, compliance.
19
- - **`by-prompt "..."`**: Prompt-driven — Gemini plans exploration strategy, agents explore iteratively with cross-dimension analysis.
19
+ - **`by-prompt "..."`**: Prompt-driven — CLI delegate plans exploration strategy, agents explore iteratively with cross-dimension analysis.
20
20
 
21
21
  For CRUD operations (create, list, update, close, link), use `/manage-issue`.
22
22
 
@@ -38,7 +38,7 @@ $ARGUMENTS -- optional. Parse first token to determine mode.
38
38
  **Modes:**
39
39
  - _(empty)_ -- interactive mode selection (AskUserQuestion)
40
40
  - `multi-perspective` -- 8-perspective parallel agent scan
41
- - `by-prompt "..."` -- prompt-driven iterative agent exploration (Gemini-planned)
41
+ - `by-prompt "..."` -- prompt-driven iterative agent exploration (CLI-planned)
42
42
 
43
43
  **Flags:**
44
44
  - `-y` / `--yes` -- auto mode, skip confirmations
@@ -16,7 +16,7 @@ Entry points:
16
16
  - **`$maestro-ralph status`** — Display session progress
17
17
 
18
18
  Two node types:
19
- - **skill**: Executed via `spawn_agents_on_csv`. Barrier skills solo; non-barriers parallel.
19
+ - **external**: Executed via `spawn_agents_on_csv`. Barrier steps solo; non-barriers parallel.
20
20
  - **decision**: Delegate evaluation via `maestro delegate --role analyze`, then expand/proceed/escalate.
21
21
 
22
22
  Key difference from maestro coordinator:
@@ -60,12 +60,12 @@ otherwise → Phase 1 (New Session).
60
60
  </context>
61
61
 
62
62
  <invariants>
63
- 1. **ALL skills via spawn_agents_on_csv** — coordinator NEVER executes skill logic directly
63
+ 1. **ALL external steps via spawn_agents_on_csv** — coordinator NEVER executes skill logic directly
64
64
  2. **Coordinator = prompt assembler** — classify → enrich args → build CSV → spawn → read results → assemble next
65
65
  3. **Decision nodes delegate-evaluate** — use `maestro delegate --role analyze` for quality-gate assessment; structural decisions (post-milestone, post-debug-escalate) evaluated directly
66
66
  4. **Decision STOP behavior** — default: STOP after evaluation; `-y` mode: auto-continue (except post-debug-escalate always STOPs)
67
67
  5. **Barrier = solo wave** — analyze, plan, execute, brainstorm, roadmap always run alone
68
- 6. **Non-barriers can parallel** — consecutive non-barrier, non-decision steps grouped into one wave
68
+ 6. **Non-barriers can parallel** — consecutive non-barrier, non-decision external steps grouped into one wave
69
69
  7. **Wave-by-wave** — never start wave N+1 before wave N results are read
70
70
  8. **Coordinator owns context** — sub-agents never read prior results; coordinator assembles full skill_call
71
71
  9. **Abort on failure** — `-y`: retry once then skip; non-`-y`: mark remaining skipped → pause
@@ -223,7 +223,7 @@ Display:
223
223
 
224
224
  [ ] 0. maestro-plan {phase} [barrier]
225
225
  [ ] 1. maestro-execute {phase} [barrier]
226
- [ ] 2. maestro-verify {phase} [skill]
226
+ [ ] 2. maestro-verify {phase} [external]
227
227
  [ ] 3. ◆ post-verify [decision]
228
228
  ...
229
229
  ============================================================
@@ -244,7 +244,7 @@ Read status.json. Rebuild `update_plan` from step statuses.
244
244
  Find first pending step.
245
245
 
246
246
  - If decision node → Step 2.2 (Delegate Evaluation)
247
- - If skill node → Step 2.3 (Wave Execution)
247
+ - If external node → Step 2.3 (Wave Execution)
248
248
  - If no pending → Phase 3 (Completion)
249
249
 
250
250
  ### 2.2: Delegate Evaluation (decision nodes)
@@ -459,7 +459,7 @@ spawn_agents_on_csv({
459
459
  **10. Next step check:**
460
460
  - Decision node + auto_mode → loop to 2.2
461
461
  - Decision node + non-auto → STOP
462
- - Skill node → loop to step 1
462
+ - External node → loop to step 1
463
463
 
464
464
  ---
465
465
 
@@ -513,8 +513,8 @@ id,skill_call,topic
513
513
  Rules:
514
514
  - `skill_call`: complete `$<skill> <args> [auto-flag]` from `buildSkillCall()`
515
515
  - `topic`: human-readable step description
516
- - Non-barrier + non-decision → multi-row (parallel)
517
- - Barrier → single-row (solo)
516
+ - Non-barrier external + non-decision → multi-row (parallel)
517
+ - Barrier external → single-row (solo)
518
518
  - Decision nodes NEVER appear in CSV — processed by coordinator directly
519
519
 
520
520
  ### Sub-Agent Instruction
@@ -570,8 +570,8 @@ Rules:
570
570
  - [ ] passed_gates cleared when code changes (fix-loop inserts execute step)
571
571
  - [ ] Fix-loop templates correctly use gap_summary from delegate
572
572
  - [ ] retry_count tracked per decision, max_retries enforced → escalation
573
- - [ ] ALL skills via spawn_agents_on_csv — coordinator never executes directly
574
- - [ ] Barrier skills solo wave, non-barriers parallel
573
+ - [ ] ALL external steps via spawn_agents_on_csv — coordinator never executes directly
574
+ - [ ] Barrier steps solo wave, non-barriers parallel
575
575
  - [ ] functions.update_plan() initialized in 1.6, synced per wave, finalized in Phase 3
576
576
  - [ ] status.json persisted after every wave and decision
577
577
  - [ ] Command insertion + reindex preserves step integrity
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maestro-flow",
3
- "version": "0.3.36",
3
+ "version": "0.3.37",
4
4
  "description": "Workflow orchestration CLI with MCP endpoint support and extensible architecture",
5
5
  "type": "module",
6
6
  "imports": {