maestro-flow 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.codex/skills/learn-decompose/SKILL.md +144 -144
  2. package/.codex/skills/learn-follow/SKILL.md +83 -83
  3. package/.codex/skills/learn-investigate/SKILL.md +84 -84
  4. package/.codex/skills/learn-retro/SKILL.md +113 -113
  5. package/.codex/skills/learn-second-opinion/SKILL.md +116 -116
  6. package/.codex/skills/maestro/SKILL.md +11 -8
  7. package/.codex/skills/maestro-amend/SKILL.md +4 -4
  8. package/.codex/skills/maestro-analyze/SKILL.md +2 -2
  9. package/.codex/skills/maestro-blueprint/SKILL.md +4 -4
  10. package/.codex/skills/maestro-companion/SKILL.md +4 -4
  11. package/.codex/skills/maestro-composer/SKILL.md +217 -217
  12. package/.codex/skills/maestro-grill/SKILL.md +1 -1
  13. package/.codex/skills/maestro-help/SKILL.md +30 -30
  14. package/.codex/skills/maestro-init/SKILL.md +1 -1
  15. package/.codex/skills/maestro-learn/SKILL.md +80 -80
  16. package/.codex/skills/maestro-merge/SKILL.md +76 -76
  17. package/.codex/skills/maestro-milestone-release/SKILL.md +74 -74
  18. package/.codex/skills/maestro-player/SKILL.md +3 -3
  19. package/.codex/skills/maestro-quick/SKILL.md +129 -129
  20. package/.codex/skills/maestro-ralph/SKILL.md +9 -9
  21. package/.codex/skills/maestro-ralph-beta/SKILL.md +34 -34
  22. package/.codex/skills/maestro-ralph-execute/SKILL.md +5 -5
  23. package/.codex/skills/maestro-tools-execute/SKILL.md +3 -3
  24. package/.codex/skills/maestro-tools-register/SKILL.md +3 -3
  25. package/.codex/skills/manage-codebase-rebuild/SKILL.md +412 -412
  26. package/.codex/skills/manage-codebase-refresh/SKILL.md +1 -1
  27. package/.codex/skills/manage-harvest/SKILL.md +99 -99
  28. package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
  29. package/.codex/skills/manage-knowhow/SKILL.md +95 -95
  30. package/.codex/skills/manage-knowhow-capture/SKILL.md +137 -137
  31. package/.codex/skills/manage-status/SKILL.md +7 -7
  32. package/.codex/skills/manage-wiki/SKILL.md +55 -55
  33. package/.codex/skills/quality-auto-test/SKILL.md +1 -1
  34. package/.codex/skills/quality-debug/SKILL.md +8 -8
  35. package/.codex/skills/quality-refactor/SKILL.md +3 -3
  36. package/.codex/skills/quality-review/SKILL.md +1 -1
  37. package/.codex/skills/quality-sync/SKILL.md +111 -111
  38. package/.codex/skills/quality-test/SKILL.md +1 -1
  39. package/.codex/skills/spec-add/SKILL.md +2 -2
  40. package/.codex/skills/spec-load/SKILL.md +1 -1
  41. package/.codex/skills/spec-map/SKILL.md +204 -204
  42. package/.codex/skills/spec-remove/SKILL.md +75 -75
  43. package/.codex/skills/spec-setup/SKILL.md +2 -2
  44. package/.codex/skills/wiki-connect/SKILL.md +73 -73
  45. package/.codex/skills/wiki-digest/SKILL.md +87 -87
  46. package/dist/src/ralph/skill-scanner.d.ts.map +1 -1
  47. package/dist/src/ralph/skill-scanner.js +9 -3
  48. package/dist/src/ralph/skill-scanner.js.map +1 -1
  49. package/package.json +1 -1
@@ -1,129 +1,129 @@
1
- ---
2
- name: maestro-quick
3
- description: Quick task execution, skip optional agents
4
- argument-hint: "\"task description\" [--discuss] [--full]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
- ---
7
-
8
- <purpose>
9
- Shortened pipeline for well-understood tasks. Creates a scratch directory, runs quick analysis, generates a plan, executes tasks, and optionally verifies results. Single agent, sequential flow — no CSV waves needed.
10
-
11
- **Pipeline**: `[discuss] → analyze-q → plan → execute → [verify]`
12
-
13
- Quick tasks default to minimal interaction. `--discuss` adds a decision extraction step. `--full` adds plan-checking and post-execution verification.
14
- </purpose>
15
-
16
- <context>
17
-
18
- ```bash
19
- $maestro-quick "add rate limiting to /api/auth endpoints"
20
- $maestro-quick "refactor user service to use repository pattern" --discuss
21
- $maestro-quick "fix memory leak in WebSocket handler" --full
22
- $maestro-quick "add dark mode toggle to settings page" --discuss --full
23
- ```
24
-
25
- **Flags**:
26
- - `--discuss`: Decision extraction before planning (Locked/Free/Deferred classification)
27
- - `--full`: Enable plan-checking (max 2 iterations) and post-execution verification
28
-
29
- **Output**: `.workflow/scratch/{slug}/` with plan.json, execution results, optional verification
30
-
31
- </context>
32
-
33
- <invariants>
34
- 1. **Speed over ceremony** — minimal overhead, get to implementation fast
35
- 2. **Follow existing patterns** — grep for 3+ similar implementations before writing new code
36
- 3. **Atomic commits** — one commit per quick task, descriptive message
37
- 4. **Scratch isolation** — all metadata stays in .workflow/scratch/{slug}/
38
- 5. **Works without init** — quick tasks function even without full .workflow/ setup
39
- </invariants>
40
-
41
- <execution>
42
-
43
- ### Step 1: Parse Arguments
44
-
45
- Extract from arguments:
46
- - `--discuss` flag
47
- - `--full` flag
48
- - Remaining text as task description (required — E001 if empty)
49
-
50
- ### Step 2: Load Project Context
51
-
52
- Read `.workflow/state.json` and `.workflow/project.md` if they exist. If `.workflow/` does not exist, create minimal scratch structure anyway (quick works without full init).
53
-
54
- Load coding specs + tools if available: `maestro spec load --category coding`. If the task involves frontend/UI work (description contains component, page, style, layout, CSS, HTML, frontend), also run `maestro spec load --category ui`. Browse wiki: `maestro search --category coding`, load relevant entries via `maestro wiki load <id>`. All optional — proceed without if unavailable.
55
-
56
- ### Step 3: Create Scratch Directory
57
-
58
- Generate slug from task description (lowercase, hyphens, max 40 chars). Create `.workflow/scratch/{slug}/`. Write `config.json` with: `task`, `flags` (discuss, full), `created_at` (ISO), `status` ("active").
59
-
60
- ### Step 4: Discussion Phase (if --discuss)
61
-
62
- **Only when `--discuss` is set.**
63
-
64
- Analyze the task for gray areas and ambiguities:
65
- 1. Identify decision points in the task
66
- 2. Classify each as: **Locked** (clear from context), **Free** (implementation choice), **Deferred** (need user input)
67
- 3. For Deferred items: ask user for decisions
68
- 4. Write `context.md` to scratch directory with all decisions
69
-
70
- ### Step 5: Quick Analysis
71
-
72
- Rapid codebase exploration focused on the task:
73
- 1. Search for related files using Grep/Glob
74
- 2. Identify existing patterns to follow
75
- 3. Map dependencies and integration points
76
- 4. Write analysis findings to `context.md` (append if --discuss created it)
77
-
78
- ### Step 6: Generate Plan
79
-
80
- Create `plan.json` in scratch directory:
81
- - Decompose task into subtasks (typically 1-5 for quick tasks)
82
- - Each task has: id, title, description, scope, convergence_criteria, files
83
- - Assign single wave (sequential execution)
84
-
85
- **If `--full`**: Present plan for review, allow up to 2 revision iterations.
86
-
87
- ### Step 7: Execute Tasks
88
-
89
- For each task in plan.json (sequential):
90
- 1. Read task definition
91
- 2. Implement changes following existing patterns
92
- 3. Run any specified verification commands
93
- 4. Write task summary with files_modified, status
94
-
95
- Update plan.json task statuses as completed.
96
-
97
- ### Step 8: Verification (if --full)
98
-
99
- **Only when `--full` is set.** Run convergence criteria checks for each task via grep/test commands. If gaps found (W001): attempt single fix iteration, then report remaining gaps.
100
-
101
- ### Step 9: Commit and Report
102
-
103
- Commit all changes: `git add -A && git commit -m "quick: {slug} - {short description}"`. Update `.workflow/state.json` scratch task entry (if state.json exists).
104
-
105
- Display report: task description, scratch path, status (completed/completed-with-gaps), tasks completed/total, files modified count. If `--full`: include verification result (PASS/GAPS).
106
-
107
- </execution>
108
-
109
- ### Artifact Verification
110
- Before reporting completion, verify: plan.json exists AND .summaries/TASK-*-summary.md exists for each task. Task summaries MUST include concrete evidence of completion. If missing: DO NOT report completion.
111
-
112
- <error_codes>
113
-
114
- | Code | Severity | Description | Recovery |
115
- |------|----------|-------------|----------|
116
- | E001 | error | Task description required | Ask user for description |
117
- | E002 | error | Scratch directory creation failed | Check permissions |
118
- | W001 | warning | Verification found minor gaps | Report gaps, continue |
119
-
120
- </error_codes>
121
-
122
- <success_criteria>
123
- - [ ] Scratch directory created with config.json
124
- - [ ] Analysis completed and context.md written
125
- - [ ] Plan generated with subtasks
126
- - [ ] All tasks executed and statuses updated
127
- - [ ] Changes committed with descriptive message
128
- - [ ] Completion report displayed
129
- </success_criteria>
1
+ ---
2
+ name: maestro-quick
3
+ description: Quick task execution, skip optional agents
4
+ argument-hint: "\"task description\" [--discuss] [--full]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
+ ---
7
+
8
+ <purpose>
9
+ Shortened pipeline for well-understood tasks. Creates a scratch directory, runs quick analysis, generates a plan, executes tasks, and optionally verifies results. Single agent, sequential flow — no CSV waves needed.
10
+
11
+ **Pipeline**: `[discuss] → analyze-q → plan → execute → [verify]`
12
+
13
+ Quick tasks default to minimal interaction. `--discuss` adds a decision extraction step. `--full` adds plan-checking and post-execution verification.
14
+ </purpose>
15
+
16
+ <context>
17
+
18
+ ```bash
19
+ $maestro-quick "add rate limiting to /api/auth endpoints"
20
+ $maestro-quick "refactor user service to use repository pattern" --discuss
21
+ $maestro-quick "fix memory leak in WebSocket handler" --full
22
+ $maestro-quick "add dark mode toggle to settings page" --discuss --full
23
+ ```
24
+
25
+ **Flags**:
26
+ - `--discuss`: Decision extraction before planning (Locked/Free/Deferred classification)
27
+ - `--full`: Enable plan-checking (max 2 iterations) and post-execution verification
28
+
29
+ **Output**: `.workflow/scratch/{slug}/` with plan.json, execution results, optional verification
30
+
31
+ </context>
32
+
33
+ <invariants>
34
+ 1. **Speed over ceremony** — minimal overhead, get to implementation fast
35
+ 2. **Follow existing patterns** — grep for 3+ similar implementations before writing new code
36
+ 3. **Atomic commits** — one commit per quick task, descriptive message
37
+ 4. **Scratch isolation** — all metadata stays in .workflow/scratch/{slug}/
38
+ 5. **Works without init** — quick tasks function even without full .workflow/ setup
39
+ </invariants>
40
+
41
+ <execution>
42
+
43
+ ### Step 1: Parse Arguments
44
+
45
+ Extract from arguments:
46
+ - `--discuss` flag
47
+ - `--full` flag
48
+ - Remaining text as task description (required — E001 if empty)
49
+
50
+ ### Step 2: Load Project Context
51
+
52
+ Read `.workflow/state.json` and `.workflow/project.md` if they exist. If `.workflow/` does not exist, create minimal scratch structure anyway (quick works without full init).
53
+
54
+ Load coding specs + tools if available: `maestro spec load --category coding`. If the task involves frontend/UI work (description contains component, page, style, layout, CSS, HTML, frontend), also run `maestro spec load --category ui`. Browse wiki: `maestro search --category coding`, load relevant entries via `maestro wiki load <id>`. All optional — proceed without if unavailable.
55
+
56
+ ### Step 3: Create Scratch Directory
57
+
58
+ Generate slug from task description (lowercase, hyphens, max 40 chars). Create `.workflow/scratch/{slug}/`. Write `config.json` with: `task`, `flags` (discuss, full), `created_at` (ISO), `status` ("active").
59
+
60
+ ### Step 4: Discussion Phase (if --discuss)
61
+
62
+ **Only when `--discuss` is set.**
63
+
64
+ Analyze the task for gray areas and ambiguities:
65
+ 1. Identify decision points in the task
66
+ 2. Classify each as: **Locked** (clear from context), **Free** (implementation choice), **Deferred** (need user input)
67
+ 3. For Deferred items: ask user for decisions
68
+ 4. Write `context.md` to scratch directory with all decisions
69
+
70
+ ### Step 5: Quick Analysis
71
+
72
+ Rapid codebase exploration focused on the task:
73
+ 1. Search for related files using Grep/Glob
74
+ 2. Identify existing patterns to follow
75
+ 3. Map dependencies and integration points
76
+ 4. Write analysis findings to `context.md` (append if --discuss created it)
77
+
78
+ ### Step 6: Generate Plan
79
+
80
+ Create `plan.json` in scratch directory:
81
+ - Decompose task into subtasks (typically 1-5 for quick tasks)
82
+ - Each task has: id, title, description, scope, convergence_criteria, files
83
+ - Assign single wave (sequential execution)
84
+
85
+ **If `--full`**: Present plan for review, allow up to 2 revision iterations.
86
+
87
+ ### Step 7: Execute Tasks
88
+
89
+ For each task in plan.json (sequential):
90
+ 1. Read task definition
91
+ 2. Implement changes following existing patterns
92
+ 3. Run any specified verification commands
93
+ 4. Write task summary with files_modified, status
94
+
95
+ Update plan.json task statuses as completed.
96
+
97
+ ### Step 8: Verification (if --full)
98
+
99
+ **Only when `--full` is set.** Run convergence criteria checks for each task via grep/test commands. If gaps found (W001): attempt single fix iteration, then report remaining gaps.
100
+
101
+ ### Step 9: Commit and Report
102
+
103
+ Commit all changes: `git add -A && git commit -m "quick: {slug} - {short description}"`. Update `.workflow/state.json` scratch task entry (if state.json exists).
104
+
105
+ Display report: task description, scratch path, status (completed/completed-with-gaps), tasks completed/total, files modified count. If `--full`: include verification result (PASS/GAPS).
106
+
107
+ </execution>
108
+
109
+ ### Artifact Verification
110
+ Before reporting completion, verify: plan.json exists AND .summaries/TASK-*-summary.md exists for each task. Task summaries MUST include concrete evidence of completion. If missing: DO NOT report completion.
111
+
112
+ <error_codes>
113
+
114
+ | Code | Severity | Description | Recovery |
115
+ |------|----------|-------------|----------|
116
+ | E001 | error | Task description required | Ask user for description |
117
+ | E002 | error | Scratch directory creation failed | Check permissions |
118
+ | W001 | warning | Verification found minor gaps | Report gaps, continue |
119
+
120
+ </error_codes>
121
+
122
+ <success_criteria>
123
+ - [ ] Scratch directory created with config.json
124
+ - [ ] Analysis completed and context.md written
125
+ - [ ] Plan generated with subtasks
126
+ - [ ] All tasks executed and statuses updated
127
+ - [ ] Changes committed with descriptive message
128
+ - [ ] Completion report displayed
129
+ </success_criteria>
@@ -10,15 +10,15 @@ Reads project state → infers position → builds adaptive chain → delegates
10
10
 
11
11
  ### Session
12
12
 
13
- `.workflow/.maestro/{session_id}/status.json` — 工作流唯一真源(schema 见 `<appendix>`)。session_id 格式:`ralph-{YYYYMMDD-HHmmss}`(本 skill 创建,自适应链)或 `maestro-{YYYYMMDD-HHmmss}`(`/maestro` coordinator 创建,静态链)。两类都由 `/maestro-ralph-execute` 推进。session-id 省略时取最新 `status=="running"`。
13
+ `.workflow/.maestro/{session_id}/status.json` — 工作流唯一真源(schema 见 `<appendix>`)。session_id 格式:`ralph-{YYYYMMDD-HHmmss}`(本 skill 创建,自适应链)或 `maestro-{YYYYMMDD-HHmmss}`(`$maestro` coordinator 创建,静态链)。两类都由 `$maestro-ralph-execute` 推进。session-id 省略时取最新 `status=="running"`。
14
14
 
15
15
  ### Entry points
16
16
 
17
- - **`/maestro-ralph "intent"`** — 新建 session:infer → decompose → build → emit /goal prompt(如有 decomposition)→ dispatch ralph-execute
18
- - **`/maestro-ralph continue [session-id]`** — 恢复执行;省略=最新 running(首选直接 `/maestro-ralph-execute [session-id]`)
19
- - **`/maestro-ralph status [session-id]`** — 显示进度;省略=最新 ralph session
17
+ - **`$maestro-ralph "intent"`** — 新建 session:infer → decompose → build → emit /goal prompt(如有 decomposition)→ dispatch ralph-execute
18
+ - **`$maestro-ralph continue [session-id]`** — 恢复执行;省略=最新 running(首选直接 `$maestro-ralph-execute [session-id]`)
19
+ - **`$maestro-ralph status [session-id]`** — 显示进度;省略=最新 ralph session
20
20
 
21
- > 推进规则:**step 推进由 `/maestro-ralph-execute` 负责**;ralph 仅在 build / decision 评估时介入。decision 节点由 ralph-execute 自动 `$maestro-ralph` 直调 handoff,无需用户手动切换。
21
+ > 推进规则:**step 推进由 `$maestro-ralph-execute` 负责**;ralph 仅在 build / decision 评估时介入。decision 节点由 ralph-execute 自动 `$maestro-ralph` 直调 handoff,无需用户手动切换。
22
22
 
23
23
  Initial decomposition (S_DECOMPOSE): boundary-clarified via ≤3 questions for broad intents (重构/全面/迁移/重写). 写入 status.json 的 `boundary_contract` / `execution_criteria` / `task_decomposition`,附 `/goal` prompt。
24
24
 
@@ -31,12 +31,12 @@ Key difference from maestro coordinator:
31
31
  - ralph: living chain → decision nodes re-evaluate → chain grows/shrinks dynamically
32
32
 
33
33
  Session: `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json`
34
- Mutual invocation with `/maestro-ralph-execute` forms a self-perpetuating work loop.
34
+ Mutual invocation with `$maestro-ralph-execute` forms a self-perpetuating work loop.
35
35
 
36
36
  ### Execution Flow
37
37
 
38
38
  ```
39
- /maestro-ralph "intent" ─▶ ralph infer → decompose → build chain
39
+ $maestro-ralph "intent" ─▶ ralph infer → decompose → build chain
40
40
  │ resolves command_path per step
41
41
  │ writes status.json
42
42
  │ emits /goal prompt
@@ -582,7 +582,7 @@ Runs only when `task_decomposition` present.
582
582
 
583
583
  1. Set session status = "paused", write status.json
584
584
  2. Display: ◆ 已达最大重试次数,debug 已执行。请人工介入。
585
- 3. Display: /maestro-ralph continue 恢复
585
+ 3. Display: $maestro-ralph continue 恢复
586
586
 
587
587
  </actions>
588
588
 
@@ -714,7 +714,7 @@ decision:post-goal-audit {retry+1}
714
714
  ```
715
715
  📋 任务分解完成。可随时复制以下 /goal 设定终止条件(执行过程中输入即可):
716
716
 
717
- /goal 直到 {session_dir}/status.json 的 task_decomposition[*] 与 steps[*] 全部 completion_confirmed=true 才停。每轮以 status.json 为唯一行动手册,通过 /maestro-ralph-execute 推进 step;decision 节点由其自动 handoff 回 ralph 评估。禁止手动执行 skill 或修改 boundary_contract.out_of_scope。
717
+ /goal 直到 {session_dir}/status.json 的 task_decomposition[*] 与 steps[*] 全部 completion_confirmed=true 才停。每轮以 status.json 为唯一行动手册,通过 $maestro-ralph-execute 推进 step;decision 节点由其自动 handoff 回 ralph 评估。禁止手动执行 skill 或修改 boundary_contract.out_of_scope。
718
718
  ```
719
719
 
720
720
  `/goal` 由用户输入;ralph 输出提示词后继续 handoff,不阻塞。
@@ -10,16 +10,16 @@ allowed-tools:
10
10
  - Glob
11
11
  - Grep
12
12
  - Skill
13
- - AskUserQuestion
13
+ - request_user_input
14
14
  ---
15
15
  <purpose>
16
16
  Closed-loop runner for the maestro workflow lifecycle.
17
- Single skill — every invocation routes by session state, executes one tick, and self-invokes `Skill("maestro-ralph-beta")` until all `completion_confirmed` or paused.
17
+ Single skill — every invocation routes by session state, executes one tick, and self-invokes `$maestro-ralph-beta` until all `completion_confirmed` or paused.
18
18
 
19
19
  Entry points:
20
- - **`/maestro-ralph-beta "intent"`** — New session: infer → decompose → build → tick
21
- - **`/maestro-ralph-beta continue`** — Resume: locate session → tick
22
- - **`/maestro-ralph-beta status`** — Display session progress
20
+ - **`$maestro-ralph-beta "intent"`** — New session: infer → decompose → build → tick
21
+ - **`$maestro-ralph-beta continue`** — Resume: locate session → tick
22
+ - **`$maestro-ralph-beta status`** — Display session progress
23
23
 
24
24
  Tick kinds:
25
25
  - **执行 step** (`step.decision == null`): `maestro ralph next` → inline → `maestro ralph complete` → self-invoke
@@ -47,7 +47,7 @@ Remaining → intent (new session)
47
47
  </context>
48
48
 
49
49
  <invariants>
50
- 1. **Self-invocation = `Skill("maestro-ralph-beta")`** — 每次 tick 末尾强制自调用;除非 router 命中终止条件
50
+ 1. **Self-invocation = `$maestro-ralph-beta`** — 每次 tick 末尾强制自调用;除非 router 命中终止条件
51
51
  2. **status.json 是唯一真源;写入权限分层**:
52
52
  - **Step 级字段**(`step.completion_*`, `step.status` 执行 step running↔completed, `step.load.*`, `step.retried`,以及执行 step 的 `active_step_index` 占用/释放)→ 由 `maestro ralph next/complete/retry` CLI 写入
53
53
  - **会话级结构**(`session.status`, `passed_gates`, `steps[]` 增删/reindex, `task_decomposition[*]`, `boundary_contract`, `context.*`, `scope_verdict`, `consec_exit2_count`, decision step 的 `status`/`retry_count`/`active_step_index` 占用与释放)→ 由 maestro-ralph-beta 写入
@@ -74,13 +74,13 @@ Remaining → intent (new session)
74
74
  2. intent == "continue" AND active session exists → A_RESUME_SESSION → S_TICK_LOCATE
75
75
  3. intent non-empty AND intent ∉ {"continue","status"} AND active session exists
76
76
  → S_FALLBACK → END
77
- display "已有 active session {id};先 /maestro-ralph-beta continue 续跑或显式 abandon"
77
+ display "已有 active session {id};先 $maestro-ralph-beta continue 续跑或显式 abandon"
78
78
  4. live session AND active_step.status == "running" AND active_step.decision != null
79
79
  → S_TICK_LOCATE → S_TICK_DECISION
80
80
  5. live session AND has pending step → S_TICK_LOCATE
81
81
  6. live session AND all completion_confirmed → S_COMPLETE → END
82
82
  7. active session AND session.status == "paused" AND no intent → S_FALLBACK → END
83
- display "Session {id} paused;输入 /maestro-ralph-beta continue 显式恢复"
83
+ display "Session {id} paused;输入 $maestro-ralph-beta continue 显式恢复"
84
84
  8. no active session AND intent non-empty → S_BUILD_PHASE
85
85
  9. no active session AND no intent → S_FALLBACK → END
86
86
  ```
@@ -152,10 +152,10 @@ S_BUILD_CHAIN:
152
152
 
153
153
  S_CREATE_SESSION:
154
154
  → S_CONFIRM WHEN: not auto_confirm DO: A_CREATE_SESSION
155
- → S_TICK_LOCATE WHEN: auto_confirm DO: A_CREATE_SESSION + Skill("maestro-ralph-beta")
155
+ → S_TICK_LOCATE WHEN: auto_confirm DO: A_CREATE_SESSION + $maestro-ralph-beta
156
156
 
157
157
  S_CONFIRM:
158
- → S_TICK_LOCATE WHEN: user selects "Proceed" DO: Skill("maestro-ralph-beta")
158
+ → S_TICK_LOCATE WHEN: user selects "Proceed" DO: $maestro-ralph-beta
159
159
  → S_BUILD_CHAIN WHEN: user selects "Edit"
160
160
  → END WHEN: user selects "Cancel"
161
161
 
@@ -171,8 +171,8 @@ S_TICK:
171
171
  → S_TICK_EXEC WHEN: next_pending_step.decision == null DO: A_RESOLVE_ARGS
172
172
 
173
173
  S_TICK_EXEC: Entry: A_EXEC_STEP
174
- → S_TICK_LOCATE WHEN: ralph complete with DONE|DONE_WITH_CONCERNS DO: Skill("maestro-ralph-beta")
175
- → S_TICK_LOCATE WHEN: ralph next exit == 2 DO: Skill("maestro-ralph-beta")
174
+ → S_TICK_LOCATE WHEN: ralph complete with DONE|DONE_WITH_CONCERNS DO: $maestro-ralph-beta
175
+ → S_TICK_LOCATE WHEN: ralph next exit == 2 DO: $maestro-ralph-beta
176
176
  → S_HANDLE_FAIL WHEN: ralph next exit == 1 OR exit >= 3
177
177
  → S_HANDLE_FAIL WHEN: ralph complete with NEEDS_RETRY|BLOCKED
178
178
 
@@ -187,13 +187,13 @@ S_TICK_DECISION: (gate 名取自 `step.decision`)
187
187
  DO: A_STRUCTURAL_EVALUATE
188
188
 
189
189
  S_TICK_APPLY:
190
- → S_TICK_LOCATE WHEN: verdict == "proceed" DO: A_APPLY_PROCEED + Skill("maestro-ralph-beta")
191
- → S_TICK_LOCATE WHEN: post-goal-audit + unmet sub-goals DO: A_APPLY_GOAL_FIX + Skill("maestro-ralph-beta")
192
- → S_TICK_LOCATE WHEN: post-goal-audit + all sub-goals met DO: A_APPLY_GOAL_DONE + Skill("maestro-ralph-beta")
193
- → S_TICK_LOCATE WHEN: post-analyze-scope DO: A_APPLY_SCOPE_VERDICT + Skill("maestro-ralph-beta")
194
- → S_TICK_LOCATE WHEN: verdict == "fix" DO: A_APPLY_FIX + Skill("maestro-ralph-beta")
195
- → S_TICK_LOCATE WHEN: verdict == "escalate" DO: A_APPLY_ESCALATE + Skill("maestro-ralph-beta")
196
- → S_TICK_LOCATE WHEN: post-milestone + standard + next milestone DO: A_ADVANCE_MILESTONE + Skill("maestro-ralph-beta")
190
+ → S_TICK_LOCATE WHEN: verdict == "proceed" DO: A_APPLY_PROCEED + $maestro-ralph-beta
191
+ → S_TICK_LOCATE WHEN: post-goal-audit + unmet sub-goals DO: A_APPLY_GOAL_FIX + $maestro-ralph-beta
192
+ → S_TICK_LOCATE WHEN: post-goal-audit + all sub-goals met DO: A_APPLY_GOAL_DONE + $maestro-ralph-beta
193
+ → S_TICK_LOCATE WHEN: post-analyze-scope DO: A_APPLY_SCOPE_VERDICT + $maestro-ralph-beta
194
+ → S_TICK_LOCATE WHEN: verdict == "fix" DO: A_APPLY_FIX + $maestro-ralph-beta
195
+ → S_TICK_LOCATE WHEN: verdict == "escalate" DO: A_APPLY_ESCALATE + $maestro-ralph-beta
196
+ → S_TICK_LOCATE WHEN: post-milestone + standard + next milestone DO: A_ADVANCE_MILESTONE + $maestro-ralph-beta
197
197
  → END WHEN: post-milestone + standard + no next milestone DO: mark completed
198
198
  → END WHEN: post-milestone + adhoc DO: mark completed (adhoc self-contained)
199
199
  → END WHEN: post-debug-escalate (always STOP) DO: A_PAUSE_ESCALATE
@@ -201,13 +201,13 @@ S_TICK_APPLY:
201
201
  GUARD: confidence_score < 60 AND proceed → override to fix
202
202
  GUARD: confidence_score > 95 AND fix AND retry > 0 → suggest proceed
203
203
  GUARD: auto_confirm → skip user prompt, apply adjusted verdict
204
- GUARD: not auto_confirm → AskUserQuestion with override options
204
+ GUARD: not auto_confirm → request_user_input with override options
205
205
 
206
206
  S_HANDLE_FAIL:
207
- → S_TICK_LOCATE WHEN: auto + not retried DO: A_RETRY + Skill("maestro-ralph-beta")
207
+ → S_TICK_LOCATE WHEN: auto + not retried DO: A_RETRY + $maestro-ralph-beta
208
208
  → END WHEN: auto + retried DO: A_PAUSE_SESSION
209
- → S_TICK_LOCATE WHEN: interactive + user selects retry DO: A_RETRY + Skill("maestro-ralph-beta")
210
- → S_TICK_LOCATE WHEN: interactive + user selects skip DO: A_SKIP_STEP + Skill("maestro-ralph-beta")
209
+ → S_TICK_LOCATE WHEN: interactive + user selects retry DO: A_RETRY + $maestro-ralph-beta
210
+ → S_TICK_LOCATE WHEN: interactive + user selects skip DO: A_SKIP_STEP + $maestro-ralph-beta
211
211
  → END WHEN: interactive + user selects abort DO: A_PAUSE_SESSION
212
212
 
213
213
  # === Terminal ===
@@ -219,8 +219,8 @@ S_COMPLETE:
219
219
  → END DO: A_COMPLETE_SESSION
220
220
 
221
221
  S_FALLBACK:
222
- → S_BUILD_PHASE WHEN: user provides intent (no active session) DO: AskUserQuestion
223
- → S_TICK_LOCATE WHEN: user selects "continue active session" DO: A_RESUME_SESSION + Skill("maestro-ralph-beta")
222
+ → S_BUILD_PHASE WHEN: user provides intent (no active session) DO: request_user_input
223
+ → S_TICK_LOCATE WHEN: user selects "continue active session" DO: A_RESUME_SESSION + $maestro-ralph-beta
224
224
  → END WHEN: user cancels OR no active session for resume
225
225
 
226
226
  </transitions>
@@ -252,7 +252,7 @@ S_FALLBACK:
252
252
  | 3 | 未派生 → 取最新 in-progress artifact 的 phase | false |
253
253
  | 4 | 仍无 → state.json 首个 incomplete phase | false |
254
254
  | 5 | position 将是 brainstorm/blueprint/init/roadmap/analyze-macro → phase = null | n/a |
255
- | 6 | 仍模糊 → `AskUserQuestion` | 由用户回答确定 |
255
+ | 6 | 仍模糊 → `request_user_input` | 由用户回答确定 |
256
256
 
257
257
  **D-007 Phase→Milestone 反查**(数字 phase 已解析时):
258
258
  ```
@@ -348,9 +348,9 @@ resolve_milestone(phase_number):
348
348
  | intent 显式指定 phase 编号(如 "phase 2"、"P3") | `independent` |
349
349
  | milestone 仅含 1 个 phase | `independent` |
350
350
  | milestone 含多个 phase + `auto_confirm` | `unified` |
351
- | milestone 含多个 phase + 非 `auto_confirm` | → AskUserQuestion |
351
+ | milestone 含多个 phase + 非 `auto_confirm` | → request_user_input |
352
352
 
353
- **AskUserQuestion** (仅当 milestone 含 ≥2 phase 且非 auto_confirm):
353
+ **request_user_input** (仅当 milestone 含 ≥2 phase 且非 auto_confirm):
354
354
 
355
355
  ```
356
356
  question: "当前里程碑含 {N} 个 phase,选择规划模式?"
@@ -373,7 +373,7 @@ options:
373
373
  | named single file/function/bug, "fix X", "add Y to Z" | narrow | skip — auto-derive |
374
374
  | otherwise | medium | clarify unless auto_confirm |
375
375
 
376
- **2. Clarify boundary** (broad/medium) — `AskUserQuestion`, ≤3 rounds, options pre-filled from intent + a quick Glob/Grep scan of the target module:
376
+ **2. Clarify boundary** (broad/medium) — `request_user_input`, ≤3 rounds, options pre-filled from intent + a quick Glob/Grep scan of the target module:
377
377
 
378
378
  | Round | Question | Drives |
379
379
  |-------|----------|--------|
@@ -655,7 +655,7 @@ Write enriched args back to status.json.
655
655
  - 删除 `goal-audit` 之前未完成的 `roadmap` + `analyze` (phase) step
656
656
  - 下一个未完成的 `plan` step → `maestro-plan --from analyze:{analyze_macro_id}`,去掉 `{phase}`,`source_artifact_ref = analyze:{analyze_macro_id}`
657
657
  - 后续 `execute` / `verify` 同 standalone scope
658
- 4. `unknown`:非 auto_confirm → AskUserQuestion 二选一(large / medium-small);auto_confirm → 默认 large
658
+ 4. `unknown`:非 auto_confirm → request_user_input 二选一(large / medium-small);auto_confirm → 默认 large
659
659
  5. release 协议 — 完成分支;reindex
660
660
  6. Display: ◆ Scope verdict: {verdict} → {kept|collapsed to standalone via analyze:{ANL_ID}}
661
661
 
@@ -690,13 +690,13 @@ Write enriched args back to status.json.
690
690
  ### A_PAUSE_SESSION
691
691
 
692
692
  `session.status = "paused"` (CLI 通过 `ralph complete N --status BLOCKED` 自动写;手动场景直接编辑)
693
- Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。/maestro-ralph-beta continue 恢复。`
693
+ Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。$maestro-ralph-beta continue 恢复。`
694
694
 
695
695
  ### A_PAUSE_ESCALATE
696
696
 
697
697
  1. `session.status = "paused"`
698
698
  2. Display: ◆ 已达最大重试次数,debug 已执行。请人工介入。
699
- 3. Display: /maestro-ralph-beta continue 恢复
699
+ 3. Display: $maestro-ralph-beta continue 恢复
700
700
 
701
701
  ### A_COMPLETE_SESSION
702
702
 
@@ -847,7 +847,7 @@ decomposition 产出后,链路概览之后逐字显示:
847
847
  ```
848
848
  📋 任务分解完成。可随时复制以下 /goal 设定终止条件:
849
849
 
850
- /goal 直到 {session_dir}/status.json 的 task_decomposition[*] 与 steps[*] 全部 completion_confirmed=true 才停。每轮以 status.json 为唯一行动手册,通过 /maestro-ralph-beta 推进 tick;decision 节点由 ralph 内联评估。禁止手动执行 skill 或修改 boundary_contract.out_of_scope。
850
+ /goal 直到 {session_dir}/status.json 的 task_decomposition[*] 与 steps[*] 全部 completion_confirmed=true 才停。每轮以 status.json 为唯一行动手册,通过 $maestro-ralph-beta 推进 tick;decision 节点由 ralph 内联评估。禁止手动执行 skill 或修改 boundary_contract.out_of_scope。
851
851
  ```
852
852
 
853
853
  ### Error Codes
@@ -873,7 +873,7 @@ decomposition 产出后,链路概览之后逐字显示:
873
873
 
874
874
  ### Success Criteria
875
875
 
876
- - [ ] Tick 末尾自调用 `Skill("maestro-ralph-beta")`,直到全部 `completion_confirmed` 或 paused
876
+ - [ ] Tick 末尾自调用 `$maestro-ralph-beta`,直到全部 `completion_confirmed` 或 paused
877
877
  - [ ] 同一 session 同时仅一个 step 持 `active_step_index`;切换前必经 release
878
878
  - [ ] Decision step 全程不调 `maestro ralph next` / `complete`,由 maestro-ralph-beta 内联评估并 release
879
879
  - [ ] `task_decomposition` 存在时,chain 含 `decision:post-goal-audit`,且最终 `task_decomposition_all_done == true` 才允许 S_COMPLETE
@@ -8,9 +8,9 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
8
8
  Single-step executor for ralph (adaptive) and maestro (static) sessions.
9
9
  Each invocation: locate session → find next step → resolve args → execute → update → self-invoke next.
10
10
 
11
- Mutual invocation with `/maestro-ralph` forms a self-perpetuating work loop.
11
+ Mutual invocation with `$maestro-ralph` forms a self-perpetuating work loop.
12
12
 
13
- **Session**: `.workflow/.maestro/{session_id}/status.json` — 工作流唯一真源。session_id 格式 `ralph-{YYYYMMDD-HHmmss}`(/maestro-ralph 创建,自适应链)或 `maestro-{YYYYMMDD-HHmmss}`(/maestro 创建,静态链)。两类都由本 skill 推进;省略 `[session-id]` 时取最新 `status=="running"`。Schema 详见 `/maestro-ralph` 的 Session Schema。
13
+ **Session**: `.workflow/.maestro/{session_id}/status.json` — 工作流唯一真源。session_id 格式 `ralph-{YYYYMMDD-HHmmss}`($maestro-ralph 创建,自适应链)或 `maestro-{YYYYMMDD-HHmmss}`($maestro 创建,静态链)。两类都由本 skill 推进;省略 `[session-id]` 时取最新 `status=="running"`。Schema 详见 `$maestro-ralph` 的 Session Schema。
14
14
  </purpose>
15
15
 
16
16
  <context>
@@ -92,7 +92,7 @@ S_COMPLETE:
92
92
  → END DO: A_COMPLETE_SESSION
93
93
 
94
94
  S_FALLBACK:
95
- → END DO: display "无运行中的会话。使用 /maestro 或 /maestro-ralph 创建。"
95
+ → END DO: display "无运行中的会话。使用 $maestro 或 $maestro-ralph 创建。"
96
96
 
97
97
  </transitions>
98
98
 
@@ -179,7 +179,7 @@ Write enriched args back to status.json.
179
179
  ### A_PAUSE_SESSION
180
180
 
181
181
  通常由 `ralph complete N --status BLOCKED --reason "..."` 触发,CLI 已写 `session.status = "paused"`。手动 pause 场景下直接编辑 status.json。
182
- Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。/maestro-ralph continue 恢复。`
182
+ Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。$maestro-ralph continue 恢复。`
183
183
 
184
184
  ### A_COMPLETE_SESSION
185
185
 
@@ -213,7 +213,7 @@ Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。/maestro
213
213
 
214
214
  | Code | Severity | Description | Recovery |
215
215
  |------|----------|-------------|----------|
216
- | E001 | error | No running session found | Suggest /maestro or /maestro-ralph |
216
+ | E001 | error | No running session found | Suggest $maestro or $maestro-ralph |
217
217
  | E006 | error | command_path missing/unreachable for 执行 step | `ralph next` 拒绝;编辑 status.json 或重 build |
218
218
  | E007 | error | required_reading 引用文件缺失 | `ralph next` 拒绝;CLI stderr 列出缺失路径 |
219
219
  | E008 | error | `ralph complete` idx ≠ active_step_index | 编辑 status.json 修正一致性 |
@@ -2,7 +2,7 @@
2
2
  name: maestro-tools-execute
3
3
  description: Load and execute tool specs by role or name
4
4
  argument-hint: "[tool-name | --category <category>]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
6
  ---
7
7
 
8
8
  <purpose>
@@ -44,7 +44,7 @@ maestro spec load --category <category>
44
44
  Extract tool entries from output, list available tools.
45
45
 
46
46
  **Empty args**:
47
- Load all tool entries, present to user with AskUserQuestion for selection.
47
+ Load all tool entries, present to user with request_user_input for selection.
48
48
 
49
49
  ### Step 2: Display Tool
50
50
 
@@ -75,7 +75,7 @@ Follow the tool definition steps in order:
75
75
 
76
76
  **Blocker handling**:
77
77
  - Step fails → report error, ask user: retry / skip / abort
78
- - Needs user input → AskUserQuestion for parameters
78
+ - Needs user input → request_user_input for parameters
79
79
  - Prerequisites unmet → show missing items, ask how to proceed
80
80
 
81
81
  ### Step 5: Report Results
@@ -2,7 +2,7 @@
2
2
  name: maestro-tools-register
3
3
  description: Register tool specs - extract, generate, or optimize reusable process definitions
4
4
  argument-hint: "[description or intent]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
6
  ---
7
7
 
8
8
  <purpose>
@@ -55,7 +55,7 @@ Parse $ARGUMENTS to determine mode:
55
55
  - Contains "optimize/improve" → optimize mode
56
56
  - Contains "promote" or references existing knowhow doc (path/ID) → promote mode
57
57
  - Other → generate mode
58
- - Empty → ask user with AskUserQuestion
58
+ - Empty → ask user with request_user_input
59
59
 
60
60
  ### Step 2: Gather Information
61
61
 
@@ -65,7 +65,7 @@ Parse $ARGUMENTS to determine mode:
65
65
 
66
66
  **Generate mode**:
67
67
  - Confirm tool name, applicable roles, target scenario
68
- - If unclear, ask user with AskUserQuestion
68
+ - If unclear, ask user with request_user_input
69
69
 
70
70
  **Optimize mode**:
71
71
  - Load existing tool: `maestro spec load --category coding --keyword <name>`