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