maestro-flow 0.5.47 → 0.5.49
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/.agents/agents/ralph-executor.md +14 -24
- package/.agents/skills/maestro-analyze/SKILL.md +13 -13
- package/.agents/skills/maestro-composer/SKILL.md +1 -1
- package/.agents/skills/maestro-help/SKILL.md +2 -0
- package/.agents/skills/maestro-help/index/catalog.json +7 -7
- package/.agents/skills/maestro-init/SKILL.md +1 -1
- package/.agents/skills/maestro-milestone-audit/SKILL.md +2 -2
- package/.agents/skills/maestro-milestone-release/SKILL.md +1 -1
- package/.agents/skills/maestro-next/SKILL.md +2 -2
- package/.agents/skills/maestro-plan/SKILL.md +31 -9
- package/.agents/skills/maestro-ralph-v2/SKILL.md +26 -50
- package/.agents/skills/maestro-roadmap/SKILL.md +2 -2
- package/.agents/skills/manage-harvest/SKILL.md +4 -2
- package/.agents/skills/manage-knowledge-audit/SKILL.md +7 -2
- package/.agents/skills/quality-auto-test/SKILL.md +1 -1
- package/.agents/skills/quality-review/SKILL.md +2 -2
- package/.agents/skills/spec-add/SKILL.md +4 -0
- package/.agy/agents/ralph-executor.md +14 -23
- package/.agy/skills/maestro-analyze/SKILL.md +13 -13
- package/.agy/skills/maestro-composer/SKILL.md +1 -1
- package/.agy/skills/maestro-help/SKILL.md +2 -0
- package/.agy/skills/maestro-help/index/catalog.json +7 -7
- package/.agy/skills/maestro-init/SKILL.md +1 -1
- package/.agy/skills/maestro-milestone-audit/SKILL.md +2 -2
- package/.agy/skills/maestro-milestone-release/SKILL.md +1 -1
- package/.agy/skills/maestro-next/SKILL.md +2 -2
- package/.agy/skills/maestro-plan/SKILL.md +31 -9
- package/.agy/skills/maestro-ralph-v2/SKILL.md +26 -50
- package/.agy/skills/maestro-roadmap/SKILL.md +2 -2
- package/.agy/skills/manage-harvest/SKILL.md +4 -2
- package/.agy/skills/manage-knowledge-audit/SKILL.md +7 -2
- package/.agy/skills/quality-auto-test/SKILL.md +1 -1
- package/.agy/skills/quality-review/SKILL.md +2 -2
- package/.agy/skills/spec-add/SKILL.md +4 -0
- package/.claude/agents/ralph-executor.md +14 -24
- package/.claude/commands/maestro-analyze.md +13 -13
- package/.claude/commands/maestro-composer.md +1 -1
- package/.claude/commands/maestro-init.md +1 -1
- package/.claude/commands/maestro-milestone-audit.md +2 -2
- package/.claude/commands/maestro-milestone-release.md +1 -1
- package/.claude/commands/maestro-next.md +2 -2
- package/.claude/commands/maestro-plan.md +31 -9
- package/.claude/commands/maestro-ralph-v2.md +26 -50
- package/.claude/commands/maestro-roadmap.md +2 -2
- package/.claude/commands/manage-harvest.md +4 -2
- package/.claude/commands/manage-knowledge-audit.md +7 -2
- package/.claude/commands/quality-auto-test.md +1 -1
- package/.claude/commands/quality-review.md +2 -2
- package/.claude/commands/spec-add.md +4 -0
- package/.claude/skills/maestro-help/SKILL.md +2 -0
- package/.claude/skills/maestro-help/index/catalog.json +7 -7
- package/.codex/skills/maestro/SKILL.md +6 -5
- package/.codex/skills/maestro-analyze/SKILL.md +13 -18
- package/.codex/skills/maestro-help/catalog.json +7 -7
- package/.codex/skills/maestro-next/SKILL.md +2 -2
- package/.codex/skills/maestro-plan/SKILL.md +13 -16
- package/.codex/skills/maestro-ralph/SKILL.md +11 -11
- package/.codex/skills/maestro-ralph-execute/SKILL.md +8 -8
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +2 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +45 -37
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.d.ts +0 -34
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js +0 -126
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +6 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +17 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/time-decay.d.ts +28 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/time-decay.js +70 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/time-decay.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/time-decay.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/time-decay.test.js +78 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/time-decay.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +6 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +104 -29
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +8 -5
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js +2 -0
- package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/engine.js +5 -1
- package/dashboard/dist-server/src/graph/kg/engine.js.map +1 -1
- package/dashboard/dist-server/src/hooks/kg-sync-hook.js +5 -3
- package/dashboard/dist-server/src/hooks/kg-sync-hook.js.map +1 -1
- package/dashboard/dist-server/src/hooks/session-context.js +3 -1
- package/dashboard/dist-server/src/hooks/session-context.js.map +1 -1
- package/dashboard/dist-server/src/search/daemon-client.js +5 -3
- package/dashboard/dist-server/src/search/daemon-client.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +42 -1
- package/dashboard/dist-server/src/tools/spec-entry-parser.js +22 -2
- package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-loader.js +10 -3
- package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
- package/dist/src/agents/api-explore/agent-loop.d.ts +2 -0
- package/dist/src/agents/api-explore/agent-loop.d.ts.map +1 -1
- package/dist/src/agents/api-explore/agent-loop.js +1 -1
- package/dist/src/agents/api-explore/agent-loop.js.map +1 -1
- package/dist/src/agents/api-explore/circuit-breaker.d.ts +52 -0
- package/dist/src/agents/api-explore/circuit-breaker.d.ts.map +1 -0
- package/dist/src/agents/api-explore/circuit-breaker.js +151 -0
- package/dist/src/agents/api-explore/circuit-breaker.js.map +1 -0
- package/dist/src/agents/api-explore/config.d.ts +10 -39
- package/dist/src/agents/api-explore/config.d.ts.map +1 -1
- package/dist/src/agents/api-explore/config.js +7 -33
- package/dist/src/agents/api-explore/config.js.map +1 -1
- package/dist/src/agents/api-explore/index.js +2 -2
- package/dist/src/agents/api-explore/index.js.map +1 -1
- package/dist/src/agents/api-explore/llm.d.ts +5 -0
- package/dist/src/agents/api-explore/llm.d.ts.map +1 -1
- package/dist/src/agents/api-explore/llm.js +31 -0
- package/dist/src/agents/api-explore/llm.js.map +1 -1
- package/dist/src/agents/api-explore/runner.d.ts +5 -0
- package/dist/src/agents/api-explore/runner.d.ts.map +1 -1
- package/dist/src/agents/api-explore/runner.js +103 -8
- package/dist/src/agents/api-explore/runner.js.map +1 -1
- package/dist/src/commands/explore.d.ts.map +1 -1
- package/dist/src/commands/explore.js +4 -2
- package/dist/src/commands/explore.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +59 -4
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/moa.js +1 -1
- package/dist/src/commands/moa.js.map +1 -1
- package/dist/src/commands/search.d.ts +4 -0
- package/dist/src/commands/search.d.ts.map +1 -1
- package/dist/src/commands/search.js +18 -3
- package/dist/src/commands/search.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +113 -0
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/commands/wiki.js +2 -2
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/config/api-config.d.ts +61 -0
- package/dist/src/config/api-config.d.ts.map +1 -0
- package/dist/src/config/api-config.js +59 -0
- package/dist/src/config/api-config.js.map +1 -0
- package/dist/src/config/cli-tools-config.d.ts +1 -0
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +22 -1
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/graph/kg/embedding/code-embedding.d.ts.map +1 -1
- package/dist/src/graph/kg/embedding/code-embedding.js +2 -0
- package/dist/src/graph/kg/embedding/code-embedding.js.map +1 -1
- package/dist/src/graph/kg/engine.d.ts.map +1 -1
- package/dist/src/graph/kg/engine.js +5 -1
- package/dist/src/graph/kg/engine.js.map +1 -1
- package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -1
- package/dist/src/hooks/kg-sync-hook.js +5 -3
- package/dist/src/hooks/kg-sync-hook.js.map +1 -1
- package/dist/src/hooks/session-context.js +3 -1
- package/dist/src/hooks/session-context.js.map +1 -1
- package/dist/src/search/daemon-client.d.ts.map +1 -1
- package/dist/src/search/daemon-client.js +5 -3
- package/dist/src/search/daemon-client.js.map +1 -1
- package/dist/src/search/daemon.d.ts.map +1 -1
- package/dist/src/search/daemon.js +17 -0
- package/dist/src/search/daemon.js.map +1 -1
- package/dist/src/tools/spec-conflict-marker.d.ts +62 -0
- package/dist/src/tools/spec-conflict-marker.d.ts.map +1 -1
- package/dist/src/tools/spec-conflict-marker.js +280 -1
- package/dist/src/tools/spec-conflict-marker.js.map +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts +42 -1
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +22 -2
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +10 -3
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/spec-writer.d.ts +2 -0
- package/dist/src/tools/spec-writer.d.ts.map +1 -1
- package/dist/src/tools/spec-writer.js +8 -6
- package/dist/src/tools/spec-writer.js.map +1 -1
- package/dist/src/tui/install-ui/EmbeddingConfig.d.ts +25 -0
- package/dist/src/tui/install-ui/EmbeddingConfig.d.ts.map +1 -0
- package/dist/src/tui/install-ui/EmbeddingConfig.js +58 -0
- package/dist/src/tui/install-ui/EmbeddingConfig.js.map +1 -0
- package/dist/src/tui/install-ui/EmbeddingPanel.d.ts +6 -0
- package/dist/src/tui/install-ui/EmbeddingPanel.d.ts.map +1 -0
- package/dist/src/tui/install-ui/EmbeddingPanel.js +101 -0
- package/dist/src/tui/install-ui/EmbeddingPanel.js.map +1 -0
- package/dist/src/tui/install-ui/GroupedHub.d.ts +2 -0
- package/dist/src/tui/install-ui/GroupedHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/GroupedHub.js +8 -1
- package/dist/src/tui/install-ui/GroupedHub.js.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +4 -2
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/embedding-status.d.ts +12 -0
- package/dist/src/tui/install-ui/embedding-status.d.ts.map +1 -0
- package/dist/src/tui/install-ui/embedding-status.js +82 -0
- package/dist/src/tui/install-ui/embedding-status.js.map +1 -0
- package/dist/src/tui/install-ui/useInstallFlowState.d.ts +1 -1
- package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -1
- package/dist/src/tui/install-ui/useInstallFlowState.js +52 -2
- package/dist/src/tui/install-ui/useInstallFlowState.js.map +1 -1
- package/dist/src/tui/shared/tokens.d.ts +1 -1
- package/dist/src/tui/shared/tokens.js +1 -1
- package/dist/src/utils/update-notices.js +23 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +1 -1
- package/workflows/agy-instructions.md +14 -5
- package/workflows/analyze.md +13 -15
- package/workflows/claude-instructions.md +25 -3
- package/workflows/codex-instructions.md +14 -5
- package/workflows/finish-work.md +65 -86
- package/workflows/knowledge-audit.md +2 -1
- package/workflows/plan.md +33 -21
- package/workflows/specs-add.md +7 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ralph-executor
|
|
3
|
-
description: Single-step executor — ralph next + inline skill execution, multi-agent orchestration
|
|
3
|
+
description: Single-step executor — ralph next + inline skill execution, unnamed nesting for multi-agent orchestration
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- read_file
|
|
6
6
|
- write_file
|
|
@@ -10,7 +10,6 @@ allowed-tools:
|
|
|
10
10
|
- search
|
|
11
11
|
- invoke_skill
|
|
12
12
|
- delegate_subagent
|
|
13
|
-
- send_message
|
|
14
13
|
---
|
|
15
14
|
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
16
15
|
|
|
@@ -19,41 +18,36 @@ allowed-tools:
|
|
|
19
18
|
|
|
20
19
|
## Role
|
|
21
20
|
|
|
22
|
-
Single-step skill executor with multi-agent orchestration capability. Call `maestro ralph next` to load the skill prompt, execute it inline, return execution output
|
|
21
|
+
Single-step skill executor with multi-agent orchestration capability. Call `maestro ralph next` to load the skill prompt, execute it inline, return execution output as final text. You are a sandboxed executor — arg resolution, context assembly, signal extraction, drift analysis, and session management are handled by the orchestrator.
|
|
23
22
|
|
|
24
23
|
## Process
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
**立即自启动**:收到含 `session_id` 的 dispatch prompt 后,MUST 立即从 step 1 开始执行。
|
|
27
26
|
|
|
28
27
|
1. Call `shell("maestro ralph next --session {session_id}")` — **全量捕获 stdout,严禁截断管道**
|
|
29
28
|
- Exit 0 → skill_prompt = stdout,继续执行
|
|
30
|
-
- Exit 1 →
|
|
31
|
-
- Exit 2 →
|
|
32
|
-
- Exit 3 →
|
|
29
|
+
- Exit 1 → 返回错误信息,结束
|
|
30
|
+
- Exit 2 → 返回 "所有 step 已完成",结束
|
|
31
|
+
- Exit 3 → 返回 "并发冲突",结束
|
|
33
32
|
2. Execute the skill prompt inline — follow all instructions faithfully
|
|
34
33
|
3. Handle `<deferred_reading>` paths: Read files on demand during execution, do not batch-load upfront
|
|
35
|
-
4.
|
|
34
|
+
4. 返回执行产物路径 + 摘要作为最终输出文本(主流程通过 task-notification `<result>` 接收)
|
|
36
35
|
|
|
37
36
|
## Multi-Agent Orchestration
|
|
38
37
|
|
|
39
38
|
当 skill prompt 需要多 agent 编排时(如 `maestro-execute` 的 wave 并行派发):
|
|
40
39
|
|
|
41
|
-
1. **派发
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
> **必须传 name**:匿名 agent 执行完当前任务会 came to rest(死亡),后台任务完成通知无法唤醒。Named teammate 只会 idle,可被后台任务通知或 send_message 唤醒。
|
|
46
|
-
2. **等待结果**:worker 通过 send_message 回传结果到 executor 的 mailbox
|
|
47
|
-
3. **收集汇总**:接收所有 worker 的 send_message,汇总执行结果
|
|
48
|
-
4. **回报主流程**:通过 `send_message({to: "main"})` 返回最终执行输出
|
|
40
|
+
1. **派发 unnamed worker**:调用 `delegate_subagent()` 不传 name,子结果自动回流给本 executor(嵌套套娃模型)
|
|
41
|
+
2. **等待结果**:子 Agent 的 task-notification 会自动回流到本 executor,可直接使用返回的 `<result>`
|
|
42
|
+
3. **收集汇总**:汇总所有子 Agent 的执行结果
|
|
43
|
+
4. **返回**:将最终执行输出作为文本返回(主流程通过 task-notification 接收)
|
|
49
44
|
|
|
50
45
|
### Worker Dispatch Template
|
|
51
46
|
|
|
52
47
|
```
|
|
53
48
|
delegate_subagent({
|
|
54
|
-
name: "{agent_name}-w{index}",
|
|
55
49
|
description: "执行子任务: {task_description}",
|
|
56
|
-
prompt: "
|
|
50
|
+
prompt: "执行以下任务:\n{task_content}\n\n返回执行结果摘要 + 产物路径。"
|
|
57
51
|
})
|
|
58
52
|
```
|
|
59
53
|
|
|
@@ -64,12 +58,11 @@ delegate_subagent({
|
|
|
64
58
|
| Field | Required | Description |
|
|
65
59
|
|-------|----------|-------------|
|
|
66
60
|
| `session_id` | Yes | ralph session ID |
|
|
67
|
-
| `agent_name` | Yes | 本 agent 的 name,用于 sub-agent send_message 回传 |
|
|
68
61
|
| execution context | No | 编排器注入的上下文(intent、boundary、goals、prior steps 等) |
|
|
69
62
|
|
|
70
63
|
## Output
|
|
71
64
|
|
|
72
|
-
|
|
65
|
+
返回最终文本(主流程通过 task-notification `<result>` 接收),格式:
|
|
73
66
|
|
|
74
67
|
```
|
|
75
68
|
EXECUTOR_OUTPUT:
|
|
@@ -80,14 +73,11 @@ EXECUTOR_OUTPUT:
|
|
|
80
73
|
- error: <错误信息,仅 ERROR 时>
|
|
81
74
|
```
|
|
82
75
|
|
|
83
|
-
失败时也必须 send_message,禁止静默崩溃。
|
|
84
|
-
|
|
85
76
|
## Constraints
|
|
86
77
|
|
|
87
|
-
-
|
|
78
|
+
- 收到 session_id 即开始执行
|
|
88
79
|
- Execute exactly one step per invocation
|
|
89
80
|
- Do not call `maestro ralph complete` — completion is handled by the orchestrator
|
|
90
81
|
- Do not read or modify `status.json` — session management is the orchestrator's responsibility
|
|
91
82
|
- Do not skip execution steps or short-circuit — execute the full skill content
|
|
92
83
|
- Do not insert/delete/reorder steps or evaluate decision nodes
|
|
93
|
-
- 所有执行结果必须通过 send_message({to: "main"}) 回报,直接文本输出主流程看不到
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-analyze
|
|
3
3
|
description: Use when a topic needs structured multi-dimensional investigation before planning or decision-making
|
|
4
|
-
argument-hint: "[
|
|
4
|
+
argument-hint: "[milestone|topic] [-y] [-c] [-q] [--gaps [ISS-ID]]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- read_file
|
|
7
7
|
- write_file
|
|
@@ -29,17 +29,17 @@ Multi-dimensional analysis of a proposal, decision, or architecture choice via C
|
|
|
29
29
|
</deferred_reading>
|
|
30
30
|
|
|
31
31
|
<context>
|
|
32
|
-
$ARGUMENTS --
|
|
32
|
+
$ARGUMENTS -- milestone number for micro mode, topic text for macro/adhoc mode, no args for current milestone.
|
|
33
33
|
|
|
34
34
|
**Dual-layer mode:**
|
|
35
35
|
- **Macro mode** (text argument): Explore impact surface of a topic/requirement. Produces coarse-grained context with `scope_verdict` to route next step. Use before roadmap or for standalone analysis.
|
|
36
|
-
- **Micro mode** (numeric argument):
|
|
36
|
+
- **Micro mode** (numeric argument): Milestone-level deep analysis within an existing roadmap. Covers all phases under the milestone. Same analysis depth, broader scope. `analyze 1` = Milestone 1.
|
|
37
37
|
|
|
38
38
|
**Disambiguation rule (mode selection):**
|
|
39
|
-
- First positional arg matches `^\d+$` (pure digits, e.g. `1`, `42`) → **micro mode** (treat as
|
|
39
|
+
- First positional arg matches `^\d+$` (pure digits, e.g. `1`, `42`) → **micro mode** (treat as milestone number)
|
|
40
40
|
- First positional arg is non-numeric text (e.g. `auth-refactor`, `improve search`) → **macro mode** (treat as topic)
|
|
41
|
-
- No positional arg → milestone
|
|
42
|
-
- Mixed input like `"1
|
|
41
|
+
- No positional arg → current milestone micro mode (when roadmap present) else macro fallback
|
|
42
|
+
- Mixed input like `"1 milestone"` is treated as text → macro mode (only bare numerics trigger micro)
|
|
43
43
|
|
|
44
44
|
**Flags:**
|
|
45
45
|
|
|
@@ -54,9 +54,9 @@ $ARGUMENTS -- phase number for micro mode, topic text for macro/adhoc mode, no a
|
|
|
54
54
|
**Scope routing:**
|
|
55
55
|
| Input | Mode | Scope |
|
|
56
56
|
|-------|------|-------|
|
|
57
|
-
| Pure digits (e.g. `1`, `42`) | micro |
|
|
57
|
+
| Pure digits (e.g. `1`, `42`) | micro | Milestone-level deep analysis |
|
|
58
58
|
| Non-numeric text (e.g. `auth-refactor`) | macro | Topic impact surface |
|
|
59
|
-
| No positional arg + roadmap | micro |
|
|
59
|
+
| No positional arg + roadmap | micro | Current milestone |
|
|
60
60
|
| No positional arg + no roadmap | macro | Fallback |
|
|
61
61
|
| `--gaps [ISS-ID]` | gaps | Issue root cause analysis |
|
|
62
62
|
|
|
@@ -81,7 +81,7 @@ Follows @~/.maestro/workflows/interview-mechanics.md standard.
|
|
|
81
81
|
**Scope guard**: only analyze decisions; do not prejudge plan/execute concerns
|
|
82
82
|
**Writeback target**: discussion.md (top table) + context.md "Interview Decisions"
|
|
83
83
|
**Additional search sources**: issues.jsonl (--gaps mode), roadmap.md
|
|
84
|
-
**Additional skip conditions**: input is already specific (explicit
|
|
84
|
+
**Additional skip conditions**: input is already specific (explicit milestone number or unambiguous topic)
|
|
85
85
|
**Exit condition**: all decision points settled → finalize session metadata
|
|
86
86
|
</interview_protocol>
|
|
87
87
|
|
|
@@ -124,9 +124,9 @@ Status verdicts:
|
|
|
124
124
|
|
|
125
125
|
| Condition | Suggestion |
|
|
126
126
|
|-----------|-----------|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
127
|
+
| Milestone scope, Go, UI work needed | `/maestro-impeccable build {target}` |
|
|
128
|
+
| Milestone scope, Go, ready to plan | `/maestro-plan` or `/maestro-plan {milestone}` |
|
|
129
|
+
| Milestone scope, No-Go | Revisit requirements or `/maestro-brainstorm {topic}` |
|
|
130
130
|
| Macro/Adhoc, scope_verdict = large | `/maestro-roadmap --from analyze:ANL-xxx` |
|
|
131
131
|
| Macro/Adhoc, scope_verdict = medium/small | `/maestro-plan --from analyze:ANL-xxx` |
|
|
132
132
|
| Need more exploration | `/maestro-analyze {topic} -c` |
|
|
@@ -177,7 +177,7 @@ Both modes (full + quick):
|
|
|
177
177
|
- [ ] Decision Recording Protocol applied to all decisions
|
|
178
178
|
- [ ] Scope creep redirected to Deferred section
|
|
179
179
|
- [ ] Deferred items auto-created as issues (if any)
|
|
180
|
-
- [ ] Artifact registered in state.json with correct scope/milestone
|
|
180
|
+
- [ ] Artifact registered in state.json with correct scope/milestone
|
|
181
181
|
- [ ] Next step routed (impeccable/plan for Go, brainstorm for No-Go)
|
|
182
182
|
- [ ] Session sealed via finish-work (archive.json written, optional spec/knowhow extraction)
|
|
183
183
|
</success_criteria>
|
|
@@ -154,7 +154,7 @@ Write `nodes.json`. Display resolved node list.
|
|
|
154
154
|
|------|-----------|
|
|
155
155
|
| Artifact boundary | Source outputs plan/spec/analysis/review |
|
|
156
156
|
| Execution gate | Target contains `execute` |
|
|
157
|
-
| Long-running | Target is maestro-plan, maestro-
|
|
157
|
+
| Long-running | Target is maestro-plan, maestro-blueprint |
|
|
158
158
|
| Post-testing | Source contains `test` or `auto-test` |
|
|
159
159
|
| User-defined | type_hint == checkpoint |
|
|
160
160
|
|
|
@@ -294,6 +294,8 @@ Odyssey 长周期循环(独立路径)
|
|
|
294
294
|
| 长周期改进 | Odyssey 深度循环 | `/odyssey-improve "改进目标"` |
|
|
295
295
|
| 需求迭代 | Odyssey 深度循环 | `/odyssey-planex "需求描述"` |
|
|
296
296
|
|
|
297
|
+
> 注:Path A/B 中 `analyze 1` / `plan 1` 的数字 `1` 指 **milestone 编号**(第 1 个里程碑),下游以 milestone 为入口。
|
|
298
|
+
|
|
297
299
|
## Core Rules
|
|
298
300
|
|
|
299
301
|
1. **Catalog First**: 先查 catalog.json,再按需读 source 文件
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
{"name": "maestro-init", "command": "/maestro-init", "category": "core", "description": "项目初始化 — 创建 .workflow/ 目录结构和状态文件", "source": "../../commands/maestro-init.md"},
|
|
10
10
|
{"name": "maestro-brainstorm", "command": "/maestro-brainstorm", "category": "core", "description": "头脑风暴 — 发散探索,多角色创意,上游起源命令", "source": "../../commands/maestro-brainstorm.md"},
|
|
11
11
|
{"name": "maestro-blueprint", "command": "/maestro-blueprint", "category": "core", "description": "正式规格文档化 — 7-phase 收敛规格链,上游起源命令,产出 .workflow/blueprint/", "source": "../../commands/maestro-blueprint.md"},
|
|
12
|
-
{"name": "maestro-roadmap", "command": "/maestro-roadmap", "category": "core", "description": "路线图编排 —
|
|
13
|
-
{"name": "maestro-quick", "command": "/maestro-quick", "category": "core", "description": "快速任务 —
|
|
12
|
+
{"name": "maestro-roadmap", "command": "/maestro-roadmap", "category": "core", "description": "路线图编排 — Milestone > Phase 分解,下游以 milestone 为入口", "source": "../../commands/maestro-roadmap.md"},
|
|
13
|
+
{"name": "maestro-quick", "command": "/maestro-quick", "category": "core", "description": "快速任务 — 跳过管线直接完成,支持 --full/--discuss 模式", "source": "../../commands/maestro-quick.md"},
|
|
14
14
|
{"name": "maestro-overlay", "command": "/maestro-overlay", "category": "core", "description": "Overlay 管理 — 创建、查看、删除命令补丁", "source": "../../commands/maestro-overlay.md"},
|
|
15
15
|
{"name": "maestro-amend", "command": "/maestro-amend", "category": "core", "description": "修正补丁 — 从工作流信号自动生成 overlay", "source": "../../commands/maestro-amend.md"},
|
|
16
16
|
{"name": "maestro-composer", "command": "/maestro-composer", "category": "core", "description": "编排器 — compose + play 工作流组合执行", "source": "../../commands/maestro-composer.md"},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
{"name": "maestro-plan", "command": "/maestro-plan", "category": "pipeline", "description": "任务规划 — 支持 --from analyze:ANL-xxx 直达、碰撞检测、gap 修复计划", "source": "../../commands/maestro-plan.md"},
|
|
28
28
|
{"name": "maestro-execute", "command": "/maestro-execute", "category": "pipeline", "description": "任务执行 — wave 并行执行、delegate 编排、自动提交", "source": "../../commands/maestro-execute.md"},
|
|
29
29
|
|
|
30
|
-
{"name": "maestro-milestone-audit", "command": "/maestro-milestone-audit", "category": "milestone", "description": "里程碑审计 —
|
|
30
|
+
{"name": "maestro-milestone-audit", "command": "/maestro-milestone-audit", "category": "milestone", "description": "里程碑审计 — 检查里程碑完成度和质量", "source": "../../commands/maestro-milestone-audit.md"},
|
|
31
31
|
{"name": "maestro-milestone-complete", "command": "/maestro-milestone-complete", "category": "milestone", "description": "里程碑完成 — 归档里程碑并推进下一个", "source": "../../commands/maestro-milestone-complete.md"},
|
|
32
32
|
{"name": "maestro-milestone-release", "command": "/maestro-milestone-release", "category": "milestone", "description": "里程碑发布 — 生成发布说明和变更日志", "source": "../../commands/maestro-milestone-release.md"},
|
|
33
33
|
|
|
@@ -218,17 +218,17 @@
|
|
|
218
218
|
],
|
|
219
219
|
"workflows": {
|
|
220
220
|
"topology": {
|
|
221
|
-
"hierarchy": "Roadmap > Milestone > Phase > Task",
|
|
221
|
+
"hierarchy": "Roadmap > Milestone > Phase | Plan > Task > Wave",
|
|
222
222
|
"layers": {
|
|
223
223
|
"upstream_origin": ["brainstorm (发散/轻量)", "blueprint (收敛/重型)"],
|
|
224
|
-
"understanding": "analyze 双层: 宏观(文本参数) + 微观(数字参数)",
|
|
224
|
+
"understanding": "analyze 双层: 宏观(文本参数) + 微观(milestone 数字参数)",
|
|
225
225
|
"orchestration": "roadmap (可选,消费上游 context)",
|
|
226
226
|
"execution": ["plan", "execute"]
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
229
|
"paths": {
|
|
230
|
-
"A_full_project": "brainstorm → blueprint(可选) → analyze 宏观 → roadmap → analyze
|
|
231
|
-
"B_large_feature": "analyze 宏观 → roadmap → analyze
|
|
230
|
+
"A_full_project": "brainstorm → blueprint(可选) → analyze 宏观 → roadmap → analyze {milestone} → plan {milestone} → execute",
|
|
231
|
+
"B_large_feature": "analyze 宏观 → roadmap → analyze {milestone} → plan {milestone} → execute",
|
|
232
232
|
"C_medium_feature": "analyze 宏观 → plan --from analyze:ANL-xxx → execute",
|
|
233
233
|
"D_small_fix": "plan → execute",
|
|
234
234
|
"E_spec_only": "blueprint → (供人阅读)",
|
|
@@ -134,7 +134,7 @@ Status verdicts:
|
|
|
134
134
|
| Condition | Suggestion |
|
|
135
135
|
|-----------|-----------|
|
|
136
136
|
| Roadmap needed (default light) | `/maestro-roadmap <requirement>` |
|
|
137
|
-
| Full spec package
|
|
137
|
+
| Full spec package | `/maestro-blueprint <idea>` |
|
|
138
138
|
| Explore ideas first | `/maestro-brainstorm <topic>` |
|
|
139
139
|
| View project dashboard | `/manage-status` |
|
|
140
140
|
| Quick ad-hoc task | `/maestro-quick <task>` |
|
|
@@ -58,7 +58,7 @@ Audit checklist steps (phase coverage, ad-hoc completeness, execution completene
|
|
|
58
58
|
|
|
59
59
|
**GATE 1: Load → Phase Coverage Check**
|
|
60
60
|
- REQUIRED: state.json loaded with artifacts[] filtered by target milestone.
|
|
61
|
-
- REQUIRED: Milestone phases identified from
|
|
61
|
+
- REQUIRED: Milestone phases identified from the PLN artifact's plan.json (standard) or milestone_obj.phases (adhoc). Phase coverage is verified from the PLN artifact's plan.json, not from roadmap.
|
|
62
62
|
- BLOCKED if no execute artifacts found: error E003.
|
|
63
63
|
|
|
64
64
|
**GATE 2: Phase Coverage → Integration Check**
|
|
@@ -118,7 +118,7 @@ Status verdicts:
|
|
|
118
118
|
</error_codes>
|
|
119
119
|
|
|
120
120
|
<success_criteria>
|
|
121
|
-
- [ ] All phases in milestone identified from
|
|
121
|
+
- [ ] All phases in milestone identified from the PLN artifact's plan.json (standard) or milestone_obj.phases (adhoc)
|
|
122
122
|
- [ ] Artifact chains verified: ANL→PLN→EXC per phase (standard) or PLN→EXC exists (adhoc)
|
|
123
123
|
- [ ] Ad-hoc artifacts checked for completion
|
|
124
124
|
- [ ] Integration check completed (shared interfaces, data contracts)
|
|
@@ -113,7 +113,7 @@ Status verdicts:
|
|
|
113
113
|
|
|
114
114
|
| Condition | Suggestion |
|
|
115
115
|
|-----------|-----------|
|
|
116
|
-
| Release successful, starting next milestone | `/maestro-plan {
|
|
116
|
+
| Release successful, starting next milestone | `/maestro-plan {next_milestone}` |
|
|
117
117
|
| Want to view project dashboard | `/manage-status` |
|
|
118
118
|
</completion>
|
|
119
119
|
|
|
@@ -107,8 +107,8 @@ ls -la .workflow/.maestro/ 2>/dev/null | head -5 # 进行中的 session
|
|
|
107
107
|
| 无 `.workflow/` + 有源码 | init | `maestro-init` |
|
|
108
108
|
| 有 state.json,无 roadmap,无 milestones | analyze-macro | `maestro-analyze` (宏观调研) |
|
|
109
109
|
| 有 macro analyze artifact,无 roadmap | roadmap | `maestro-roadmap` |
|
|
110
|
-
| 有 roadmap,未启动 phase | analyze | `maestro-analyze {
|
|
111
|
-
| 最新 artifact = analyze | plan | `maestro-plan {
|
|
110
|
+
| 有 roadmap,未启动 phase | analyze | `maestro-analyze {milestone}` |
|
|
111
|
+
| 最新 artifact = analyze | plan | `maestro-plan {milestone}` |
|
|
112
112
|
| 最新 artifact = plan | execute | `maestro-execute {phase}` |
|
|
113
113
|
| 最新 artifact = execute | review | `quality-review {phase}` |
|
|
114
114
|
| review verdict=PASS | test-gen | `quality-auto-test {phase}` |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-plan
|
|
3
|
-
description: Use when creating, revising, or verifying an execution plan for a
|
|
4
|
-
argument-hint: "[
|
|
3
|
+
description: Use when creating, revising, or verifying an execution plan for a milestone or task
|
|
4
|
+
argument-hint: "[milestone] [--spec SPEC-xxx] [-y] [--gaps] [--tdd] [--dir <path>] [--from <source>] [--revise [instructions]] [--check <plan-dir>]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- read_file
|
|
7
7
|
- write_file
|
|
@@ -31,9 +31,9 @@ Produces plan.json + TASK files; registers PLN artifact in state.json.
|
|
|
31
31
|
</deferred_reading>
|
|
32
32
|
|
|
33
33
|
<context>
|
|
34
|
-
$ARGUMENTS —
|
|
34
|
+
$ARGUMENTS — milestone number, or no args for current milestone, with optional flags.
|
|
35
35
|
|
|
36
|
-
Scope routing, base flags (`--
|
|
36
|
+
Scope routing, base flags (`--spec`, `-y`, `--gaps`, `--dir`), output directory format, and artifact registration are defined in workflow plan.md.
|
|
37
37
|
|
|
38
38
|
**Command-level flags** (extensions beyond workflow base):
|
|
39
39
|
- `--from <source>`: Load upstream context directly (bypasses roadmap requirement):
|
|
@@ -48,8 +48,8 @@ Scope routing, base flags (`--collab`, `--spec`, `-y`, `--gaps`, `--dir`), outpu
|
|
|
48
48
|
1. `--from analyze:ANL-xxx` → uses analyze conclusions.implementation_scope directly
|
|
49
49
|
2. `--from blueprint:BLP-xxx` → uses blueprint requirements + architecture
|
|
50
50
|
3. `--dir <path>` → explicit context directory (unchanged)
|
|
51
|
-
4. Numeric arg → scope = "
|
|
52
|
-
5. No args + roadmap → scope = "
|
|
51
|
+
4. Numeric arg → scope = "milestone", resolve from roadmap
|
|
52
|
+
5. No args + roadmap → scope = "current_milestone"
|
|
53
53
|
6. No args + no roadmap → search state.json for latest analyze artifact, fallback standalone
|
|
54
54
|
|
|
55
55
|
**Ad-hoc milestone (D-008):** When scope resolves to "standalone" via the standard standalone resolution (no `--from` source), and `current_milestone == null`, plan auto-creates an adhoc milestone (`type: "adhoc"`) in state.json before proceeding. This ensures downstream milestone-audit/complete have a valid milestone context. See workflow plan.md § "Ad-hoc Milestone Auto-Creation".
|
|
@@ -71,6 +71,28 @@ If exit code is 1, present warnings and ask whether to proceed.
|
|
|
71
71
|
|
|
72
72
|
Follow '~/.maestro/workflows/plan.md' completely.
|
|
73
73
|
|
|
74
|
+
### Plan Agent Model
|
|
75
|
+
|
|
76
|
+
Plan automatically selects agent mode based on milestone scope:
|
|
77
|
+
|
|
78
|
+
**Single agent mode** (default):
|
|
79
|
+
- Milestone involves ≤3 modules
|
|
80
|
+
- 1 workflow-planner agent, max 8 TASK JSON output
|
|
81
|
+
- Directly produces plan.json
|
|
82
|
+
|
|
83
|
+
**2+1 agent mode** (auto-triggered):
|
|
84
|
+
- Milestone involves >3 modules
|
|
85
|
+
- 2 parallel workflow-planner agents, each scoped to 2-3 modules
|
|
86
|
+
- Each agent produces max 8 TASK JSON (total max 16)
|
|
87
|
+
- +1 synthesis agent:
|
|
88
|
+
- Merges TASK JSON from both agents
|
|
89
|
+
- DAG analysis: dependency correctness, cycle detection, cross-module conflicts
|
|
90
|
+
- Terminology consistency check
|
|
91
|
+
- Wave ordering optimization
|
|
92
|
+
- Produces unified plan.json
|
|
93
|
+
|
|
94
|
+
Module count is derived from milestone phase definitions and analyze upstream context.
|
|
95
|
+
|
|
74
96
|
### Phase Gates (MANDATORY, BLOCKING — Create mode only)
|
|
75
97
|
|
|
76
98
|
**GATE P1 → P2: Context Collection → Clarification**
|
|
@@ -115,7 +137,7 @@ Follow workflow plan.md § "Revise Mode" and § "Check Mode" respectively. These
|
|
|
115
137
|
|
|
116
138
|
```
|
|
117
139
|
=== PLAN READY ===
|
|
118
|
-
|
|
140
|
+
Milestone: {milestone_name}
|
|
119
141
|
Tasks: {task_count} tasks in {wave_count} waves
|
|
120
142
|
Check: {checker_status} (iteration {check_count}/{max_checks})
|
|
121
143
|
Collision: {collision_status}
|
|
@@ -145,13 +167,13 @@ Status verdicts:
|
|
|
145
167
|
|-----------|-----------|
|
|
146
168
|
| Plan confirmed for execution | `/maestro-execute` |
|
|
147
169
|
| Plan confirmed, specific directory | `/maestro-execute --dir {dir}` |
|
|
148
|
-
| Re-plan with modifications | `/maestro-plan {
|
|
170
|
+
| Re-plan with modifications | `/maestro-plan {milestone}` |
|
|
149
171
|
</completion>
|
|
150
172
|
|
|
151
173
|
<error_codes>
|
|
152
174
|
| Code | Severity | Condition | Recovery |
|
|
153
175
|
|------|----------|-----------|----------|
|
|
154
|
-
| E001 | error | No args and no roadmap (cannot determine scope) | Provide
|
|
176
|
+
| E001 | error | No args and no roadmap (cannot determine scope) | Provide milestone number or topic, or create roadmap |
|
|
155
177
|
| E003 | error | --gaps requires prior verification/issues to exist | Run maestro-execute first (verification is built-in) |
|
|
156
178
|
| E004 | error | No plan found to revise (--revise without target) | Use --dir to specify plan, or create plan first |
|
|
157
179
|
| E005 | error | Plan directory not found (--check) | Check path, use --dir |
|
|
@@ -45,13 +45,13 @@ Remaining → intent (amend_mode 时为 change_request)
|
|
|
45
45
|
</context>
|
|
46
46
|
|
|
47
47
|
<invariants>
|
|
48
|
-
1. **Ralph-v2 owns the full loop** — locate step → resolve args → load context → dispatch agent → wait for
|
|
49
|
-
2. **One agent per step** — 每个执行 step 派发一个
|
|
50
|
-
3. **Agent is a thin wrapper** — executor agent 调 `ralph next` 获取 skill prompt
|
|
51
|
-
4. **
|
|
52
|
-
- **执行 Agent**(A_STEP_DISPATCH):`delegate_subagent(
|
|
53
|
-
- **评估 Agent**(A_AGENT_EVALUATE / A_AGENT_GOAL_AUDIT / A_AGENT_REGROUND
|
|
54
|
-
- `agent_exec_name`
|
|
48
|
+
1. **Ralph-v2 owns the full loop** — locate step → resolve args → load context → dispatch agent → wait for task-notification → extract signals → drift → complete,全部在本命令内完成
|
|
49
|
+
2. **One agent per step** — 每个执行 step 派发一个 unnamed executor agent,结果通过 task-notification `<result>` 回传,主流程解析结果后决定下一步
|
|
50
|
+
3. **Agent is a thin wrapper** — executor agent 调 `ralph next` 获取 skill prompt 并执行,返回输出文本;arg resolution、context loading、signal extraction、drift analysis、ralph complete 均由主流程完成
|
|
51
|
+
4. **Unified unnamed dispatch** — 执行 Agent 和评估 Agent 均使用 unnamed delegate_subagent(),结果通过 task-notification `<result>` 回传:
|
|
52
|
+
- **执行 Agent**(A_STEP_DISPATCH):`delegate_subagent()` 不传 name — executor 内部编排也用 unnamed Agent(子结果自动回流 executor,嵌套套娃模型)
|
|
53
|
+
- **评估 Agent**(A_AGENT_EVALUATE / A_AGENT_GOAL_AUDIT / A_AGENT_REGROUND):同样 `delegate_subagent()` 不传 name
|
|
54
|
+
- `agent_exec_name` 仅用于 display/日志标识,不作为 Agent name 参数
|
|
55
55
|
5. **主流程调 `ralph complete`** — 每个 step 完成后由主流程调 `maestro ralph complete`,非 agent 上报
|
|
56
56
|
6. **Decision evaluation inline** — decision 节点不 handoff,通过 Agent 或 CLI delegate 在本循环内评估
|
|
57
57
|
7. **CLI delegation for evaluation only** — CLI delegate(`maestro delegate --mode analysis`)仅限评估环节;执行仍通过 executor Agent 完成
|
|
@@ -91,8 +91,7 @@ S_CONFIRM — 用户确认
|
|
|
91
91
|
|
|
92
92
|
S_STEP_LOCATE — 找下一个 pending step PERSIST: —
|
|
93
93
|
S_STEP_RESOLVE — 解析占位符 + 丰富参数 PERSIST: step.args (enriched)
|
|
94
|
-
S_STEP_DISPATCH — 组装上下文 + 派发
|
|
95
|
-
S_STEP_WAIT_MSG — 等待 executor 的 send_message 回传 PERSIST: —
|
|
94
|
+
S_STEP_DISPATCH — 组装上下文 + 派发 unnamed executor agent PERSIST: step.agent_exec_name, step.status = "running"
|
|
96
95
|
S_STEP_ANALYZE — 提取信号 + 组装 completion 参数 PERSIST: —
|
|
97
96
|
S_STEP_DRIFT — 产物 vs 目标偏离分析 PERSIST: step.drift_score
|
|
98
97
|
S_STEP_COMPLETE — 调 `ralph complete` 上报 PERSIST: step.completion_*
|
|
@@ -147,12 +146,8 @@ S_STEP_RESOLVE:
|
|
|
147
146
|
→ S_STEP_DISPATCH DO: A_STEP_RESOLVE_ARGS
|
|
148
147
|
|
|
149
148
|
S_STEP_DISPATCH:
|
|
150
|
-
→
|
|
151
|
-
|
|
152
|
-
S_STEP_WAIT_MSG:
|
|
153
|
-
→ S_STEP_ANALYZE WHEN: received agent-message with EXECUTOR_OUTPUT DO: A_STEP_RECEIVE
|
|
154
|
-
→ S_HANDLE_FAIL WHEN: received agent-message with status=ERROR DO: A_STEP_RECEIVE
|
|
155
|
-
→ S_HANDLE_FAIL WHEN: executor idle without send_message(崩溃检测) DO: mark BLOCKED
|
|
149
|
+
→ S_STEP_ANALYZE WHEN: task-notification status=completed DO: A_STEP_DISPATCH
|
|
150
|
+
→ S_HANDLE_FAIL WHEN: task-notification status=failed DO: mark BLOCKED
|
|
156
151
|
|
|
157
152
|
S_STEP_ANALYZE:
|
|
158
153
|
→ S_STEP_DRIFT WHEN: STATUS == DONE|DONE_WITH_CONCERNS DO: A_STEP_EXTRACT
|
|
@@ -332,17 +327,15 @@ Execution criteria: {session.execution_criteria joined by '; '}
|
|
|
332
327
|
| debug | `dbg` |
|
|
333
328
|
| Other | `run` |
|
|
334
329
|
|
|
335
|
-
**4. Dispatch(
|
|
330
|
+
**4. Dispatch(unnamed executor):**
|
|
336
331
|
|
|
337
|
-
> 执行 Agent
|
|
332
|
+
> 执行 Agent 不传 name,结果通过 task-notification `<result>` 自动回传主流程。executor 内部编排也用 unnamed Agent(子结果自动回流 executor,嵌套套娃模型)。
|
|
338
333
|
|
|
339
334
|
```
|
|
340
335
|
delegate_subagent({
|
|
341
|
-
name: "{resolved_agent_name}",
|
|
342
336
|
subagent_type: "ralph-executor",
|
|
343
|
-
description: "执行 step {index}: {step.skill}",
|
|
337
|
+
description: "执行 step {index}: {step.skill} [{resolved_agent_name}]",
|
|
344
338
|
prompt: `Session: {session_id}
|
|
345
|
-
Agent name: {resolved_agent_name}
|
|
346
339
|
|
|
347
340
|
{goal_context 块,仅 protocol < 2 时}
|
|
348
341
|
|
|
@@ -351,24 +344,11 @@ Agent name: {resolved_agent_name}
|
|
|
351
344
|
})
|
|
352
345
|
```
|
|
353
346
|
|
|
354
|
-
5. Write `step.agent_exec_name` to status.json
|
|
347
|
+
5. Write `step.agent_exec_name` to status.json(仅日志标识)
|
|
355
348
|
6. Display: `[{index}/{total}] ⟶ {step.skill} → {resolved_agent_name}`
|
|
356
|
-
7. delegate_subagent()
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
从 executor 的 `agent-message` 中提取执行输出。
|
|
361
|
-
|
|
362
|
-
1. 接收到 `<agent-message from="{resolved_agent_name}">` 后,提取 message 内容
|
|
363
|
-
2. 解析 `EXECUTOR_OUTPUT` 格式:
|
|
364
|
-
- `status: DONE` → agent_output = message 内容,继续 S_STEP_ANALYZE
|
|
365
|
-
- `status: DONE_WITH_CONCERNS` → agent_output = message 内容,继续 S_STEP_ANALYZE
|
|
366
|
-
- `status: ERROR` → STATUS=BLOCKED,转 S_HANDLE_FAIL
|
|
367
|
-
3. idle_notification 处理(区分正常等待与崩溃):
|
|
368
|
-
- 首次收到 `idle_notification`:executor 可能在等待 worker 回传,正常现象,继续等待
|
|
369
|
-
- 连续收到 2 次 `idle_notification` 且中间无 `agent-message`:向 executor 发送 `send_message({to: "{resolved_agent_name}", message: "请回报执行状态"})` 询问
|
|
370
|
-
- 询问后仍只收到 `idle_notification` 无 `agent-message`:STATUS=BLOCKED,转 S_HANDLE_FAIL
|
|
371
|
-
4. `agent_output` = 提取的 message 内容
|
|
349
|
+
7. delegate_subagent() 返回 agentId → 等待 task-notification(status=completed 时 `<result>` 含 executor 输出)
|
|
350
|
+
8. task-notification 到达后,`agent_output` = `<result>` 内容 → 进入 S_STEP_ANALYZE
|
|
351
|
+
9. task-notification status=failed → STATUS=BLOCKED,转 S_HANDLE_FAIL
|
|
372
352
|
|
|
373
353
|
### A_STEP_EXTRACT
|
|
374
354
|
|
|
@@ -751,10 +731,7 @@ GUARD: 已完成(`status: "done"`)的目标不可 supersede(skip + warn)
|
|
|
751
731
|
|
|
752
732
|
- **A_RETRY**: `shell("maestro ralph retry {index}")` — CLI 设 `step.retried = true`, `step.status = "pending"`, 清 `active_step_index`
|
|
753
733
|
- **A_PAUSE_SESSION**: `ralph complete N --status BLOCKED --reason "..."` — CLI 写 `session.status = "paused"`
|
|
754
|
-
- **A_COMPLETE_SESSION**: 校验所有 step `completion_confirmed == true` + `task_decomposition_all_done == true`(若存在),通过后写 `session.status = "completed"
|
|
755
|
-
```
|
|
756
|
-
遍历 steps[].agent_exec_name → send_message({to: name, message: {type: "shutdown_request"}})
|
|
757
|
-
```
|
|
734
|
+
- **A_COMPLETE_SESSION**: 校验所有 step `completion_confirmed == true` + `task_decomposition_all_done == true`(若存在),通过后写 `session.status = "completed"`。unnamed executor 执行完自动终止,无需 shutdown 清理
|
|
758
735
|
|
|
759
736
|
</actions>
|
|
760
737
|
|
|
@@ -886,24 +863,23 @@ E001–E006, W001–W004 适用。Agent 新增:
|
|
|
886
863
|
|
|
887
864
|
### Success Criteria
|
|
888
865
|
|
|
889
|
-
- [ ] ralph-v2 owns full step loop: locate → resolve → dispatch → wait
|
|
890
|
-
- [ ] One agent per step — `delegate_subagent({
|
|
891
|
-
- [ ] Executor 内调 `maestro ralph next` 获取 skill prompt
|
|
892
|
-
- [ ] Executor
|
|
866
|
+
- [ ] ralph-v2 owns full step loop: locate → resolve → dispatch → wait task-notification → extract → drift → complete → next
|
|
867
|
+
- [ ] One agent per step — `delegate_subagent({ subagent_type: "ralph-executor" })` 每步派发一个 unnamed executor
|
|
868
|
+
- [ ] Executor 内调 `maestro ralph next` 获取 skill prompt 并执行,内部编排用 unnamed Agent(子结果回流 executor)
|
|
869
|
+
- [ ] Executor 结果通过 task-notification `<result>` 自动回传主流程
|
|
893
870
|
- [ ] 主流程调 `maestro ralph complete` 上报(非 agent 上报)
|
|
894
871
|
- [ ] 主流程负责 arg resolution、context loading、signal extraction、drift analysis
|
|
895
|
-
- [ ]
|
|
896
|
-
- [ ]
|
|
897
|
-
- [ ] Dual dispatch: 执行 Agent 传 `name`(async + send_message),评估 Agent 不传 `name`(sync)或 CLI delegate
|
|
872
|
+
- [ ] task-notification status=failed → STATUS=BLOCKED,转 S_HANDLE_FAIL
|
|
873
|
+
- [ ] Unified unnamed dispatch: 执行 Agent 和评估 Agent 均不传 name,结果通过 task-notification 回传。CLI delegate 仅限评估环节
|
|
898
874
|
- [ ] Decision evaluation 支持三种模式:agent(同步)、cli(CLI delegate)、dual(并行交叉验证)
|
|
899
875
|
- [ ] `evaluate_via` 字段控制评估模式,默认 `"agent"`
|
|
900
876
|
- [ ] dual 模式合并策略:一致取共识、分歧保守降级、CLI 未返回用 Agent 结果
|
|
901
877
|
- [ ] Verdict 解析保持 `---VERDICT---` 格式,parse 失败 → fallback fix + parse_failed: true
|
|
902
878
|
- [ ] decisions.ndjson 追加:source 字段为 `"ralph-v2"`
|
|
903
|
-
- [ ] Session schema: `execution_mode: "agent"`,`agent_exec_name
|
|
879
|
+
- [ ] Session schema: `execution_mode: "agent"`,`agent_exec_name`(display 标识),含 `artifacts_produced`
|
|
904
880
|
- [ ] Chain building(S_RESOLVE_PHASE through S_BUILD_CHAIN)自包含执行
|
|
905
881
|
- [ ] A_STEP_DISPATCH 含前序产出加载(滑动窗口 5 step + accumulated signals + stage-specific artifacts)
|
|
906
|
-
- [ ] `agent_exec_name` 含 stage prefix(grl/brn/anm/ana/pln/exe/rev/tst/dbg
|
|
882
|
+
- [ ] `agent_exec_name` 含 stage prefix(grl/brn/anm/ana/pln/exe/rev/tst/dbg)——仅用于 display/日志标识
|
|
907
883
|
- [ ] `--summary` 在 DONE/DONE_WITH_CONCERNS 时为 MUST(动词开头,≤100 字)
|
|
908
884
|
- [ ] CAVEATS 在 DONE_WITH_CONCERNS 时同时映射 --concerns
|
|
909
885
|
- [ ] A_STEP_EXTRACT 从 executor 输出提取 artifact IDs、path signals、phase signals
|
|
@@ -17,7 +17,7 @@ allowed-tools:
|
|
|
17
17
|
<purpose>
|
|
18
18
|
Generate milestone/phase roadmap from requirements or upstream context. Three modes: create (default), revise (`--revise`), review (`--review`). For formal spec documents, use `/maestro-blueprint`.
|
|
19
19
|
|
|
20
|
-
Pipeline: brainstorm/blueprint/analyze → **roadmap** → analyze {
|
|
20
|
+
Pipeline: brainstorm/blueprint/analyze → **roadmap** → analyze {milestone} → plan {milestone} → execute.
|
|
21
21
|
</purpose>
|
|
22
22
|
|
|
23
23
|
<required_reading>
|
|
@@ -62,7 +62,7 @@ Follows @~/.maestro/workflows/interview-mechanics.md standard.
|
|
|
62
62
|
|
|
63
63
|
**Interaction mode**: convergent menu-driven
|
|
64
64
|
**Decision tree** (strict order): mode (create / revise / review) → requirement scope (MVP / complete / phased) → decomposition strategy (progressive / direct / auto) → milestone boundaries → phase dependencies and order
|
|
65
|
-
**Scope guard**: only roadmap shape; do not pre-resolve
|
|
65
|
+
**Scope guard**: only roadmap shape; do not pre-resolve task breakdown or phase decomposition (belongs to plan)
|
|
66
66
|
**Writeback target**: .workflow/roadmap.md "Roadmap Decisions" section (create if absent)
|
|
67
67
|
**Additional skip conditions**: --revise, --review (skip to respective mode)
|
|
68
68
|
**Exit condition**: on consensus or explicit user signal → finalize Roadmap Decisions section
|
|
@@ -48,7 +48,7 @@ Additional flags, source registry (scan paths), and storage locations defined in
|
|
|
48
48
|
2. **Never modify source artifacts** — harvest is purely extractive; source files remain untouched
|
|
49
49
|
3. **Dedup before write** — MUST check harvest-log.jsonl and existing stores before each write to prevent duplicates
|
|
50
50
|
4. **Source tagging** — MUST set `source: "harvest"` on every issues.jsonl row so concurrent writers can be distinguished
|
|
51
|
-
5. **
|
|
51
|
+
5. **Relationship pre-check on spec routing** — when routing to spec, MUST compare against existing specs with same keywords/category. Classify the relationship: **supersede** (new replaces old) → attach `supersedes = <old-sid>`, after add run `maestro spec supersede`; **conflict** (genuine dispute) → set `confidence="low"` and log conflict note; **independent** → no metadata
|
|
52
52
|
6. **Provenance tracking** — every routed item MUST be logged in harvest-log.jsonl with fragment ID, target store, and timestamp
|
|
53
53
|
7. **Dry-run safety** — `--dry-run` MUST NOT write any files; preview only
|
|
54
54
|
</invariants>
|
|
@@ -88,8 +88,10 @@ Extraction patterns, classification rules, routing infrastructure, and fragment
|
|
|
88
88
|
| Wiki graph needs linking | `/manage-wiki connect --fix` |
|
|
89
89
|
| Issues created | `/manage-issue list --source harvest` |
|
|
90
90
|
| Specs extracted | `/spec-load --role implement` |
|
|
91
|
-
| Specs extracted (
|
|
91
|
+
| Specs extracted (审查) | `/manage-knowledge-audit --scope spec` — 新写入的 spec 可能与现有条目矛盾或替代 |
|
|
92
|
+
| 查看演化链 | `maestro spec history <sid>` — 确认 supersede 链完整 |
|
|
92
93
|
| Spec 冲突标记已存在 | `maestro spec conflict list` — 查看当前冲突状态 |
|
|
94
|
+
| 知识健康检查 | `maestro spec health` — 悬空/循环 supersedes 校验 |
|
|
93
95
|
| Full phase retrospective | `/quality-retrospective` |
|
|
94
96
|
</completion>
|
|
95
97
|
|
|
@@ -83,15 +83,17 @@ Follow `~/.maestro/workflows/knowledge-audit.md` Stages 1-8 in order.
|
|
|
83
83
|
|
|
84
84
|
### Conflict Resolution Integration
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
五态决策(扩展自三态 keep/deprecate/delete):
|
|
87
87
|
|
|
88
88
|
| 动作 | 适用场景 | 执行 |
|
|
89
89
|
|------|---------|------|
|
|
90
90
|
| `keep` | 内容正确,无需变更 | 写 audit-log ignore 记录 |
|
|
91
91
|
| `contest` | 矛盾真实存在,需进一步审查 | `maestro spec conflict mark <file> <line> --note "<evidence>"` |
|
|
92
|
-
| `
|
|
92
|
+
| `supersede` | 内容过时,已有更新版本替代 | `maestro spec supersede <old-sid> --by <new-sid>`(保留演化链) |
|
|
93
|
+
| `deprecate` | 内容过时,无替代版本 | 注入 `status="deprecated"` + `maestro spec conflict clear <file> <line>` |
|
|
93
94
|
| `delete` | 内容明确错误 | 移除 entry + `maestro spec conflict clear <file> <line>` |
|
|
94
95
|
|
|
96
|
+
**supersede vs deprecate**: supersede 用于有明确替代条目的场景(建立演化链),deprecate 用于无替代条目的场景。
|
|
95
97
|
**关键**: deprecate/delete 执行时,如果目标条目有 conflict-marker,必须同步调用 `maestro spec conflict clear` 清除标记,避免悬空冲突。
|
|
96
98
|
|
|
97
99
|
### Code-as-Truth 校验(审查核心原则)
|
|
@@ -117,6 +119,9 @@ Follow `~/.maestro/workflows/knowledge-audit.md` Stages 1-8 in order.
|
|
|
117
119
|
| 验证 spec 现状 | `/spec-load --role implement` |
|
|
118
120
|
| 查看冲突标记 | `maestro spec conflict list` |
|
|
119
121
|
| 清除已解决冲突 | `maestro spec conflict clear-all <file>` |
|
|
122
|
+
| 查看演化链 | `maestro spec history <sid>` |
|
|
123
|
+
| 知识健康检查 | `maestro spec health` |
|
|
124
|
+
| 回填存量 sid | `maestro spec backfill-sid` |
|
|
120
125
|
| 周期巡检 | `--scope all --report` |
|
|
121
126
|
</completion>
|
|
122
127
|
|
|
@@ -150,7 +150,7 @@ Append to state.json.artifacts[]:
|
|
|
150
150
|
| E003 | error | No test framework detected | Install test framework or configure test runner |
|
|
151
151
|
| W001 | warning | One or more test scenarios failed | Auto-iterate or suggest fix options |
|
|
152
152
|
| W002 | warning | Max iterations reached without convergence | Review reflection-log.md, suggest debug |
|
|
153
|
-
| W003 | warning | Degraded spec mode (no full spec package) | Consider running maestro-
|
|
153
|
+
| W003 | warning | Degraded spec mode (no full spec package) | Consider running /maestro-blueprint |
|
|
154
154
|
</error_codes>
|
|
155
155
|
|
|
156
156
|
<success_criteria>
|