maestro-flow 0.5.44 → 0.5.46
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 +93 -0
- package/.agents/skills/maestro-ralph-cli/SKILL.md +21 -16
- package/.agents/skills/maestro-ralph-v2/SKILL.md +923 -0
- package/.agents/skills/odyssey-debug/SKILL.md +338 -253
- package/.agents/skills/odyssey-improve/SKILL.md +367 -281
- package/.agents/skills/odyssey-planex/SKILL.md +490 -420
- package/.agents/skills/odyssey-review-test-fix/SKILL.md +336 -251
- package/.agents/skills/odyssey-ui/SKILL.md +332 -247
- package/.agy/agents/ralph-executor.md +91 -0
- package/.agy/skills/maestro-ralph-cli/SKILL.md +21 -16
- package/.agy/skills/maestro-ralph-v2/SKILL.md +935 -0
- package/.agy/skills/odyssey-debug/SKILL.md +338 -253
- package/.agy/skills/odyssey-improve/SKILL.md +367 -281
- package/.agy/skills/odyssey-planex/SKILL.md +490 -420
- package/.agy/skills/odyssey-review-test-fix/SKILL.md +336 -251
- package/.agy/skills/odyssey-ui/SKILL.md +332 -247
- package/.claude/agents/ralph-executor.md +91 -0
- package/.claude/commands/maestro-ralph-cli.md +21 -16
- package/.claude/commands/maestro-ralph-v2.md +921 -0
- package/.claude/commands/odyssey-debug.md +352 -267
- package/.claude/commands/odyssey-improve.md +381 -295
- package/.claude/commands/odyssey-planex.md +504 -434
- package/.claude/commands/odyssey-review-test-fix.md +350 -265
- package/.claude/commands/odyssey-ui.md +346 -261
- package/.codex/skills/maestro-next/SKILL.md +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +3 -3
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +4 -4
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/db/queries.d.ts +6 -0
- package/dashboard/dist-server/src/graph/kg/db/queries.js +141 -19
- package/dashboard/dist-server/src/graph/kg/db/queries.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/extraction/code/svelte-extractor.js +1 -1
- package/dashboard/dist-server/src/graph/kg/extraction/code/svelte-extractor.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/extraction/code/tree-sitter.js +2 -2
- package/dashboard/dist-server/src/graph/kg/extraction/code/tree-sitter.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/extraction/code/vue-extractor.js +1 -1
- package/dashboard/dist-server/src/graph/kg/extraction/code/vue-extractor.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/extraction/code/wasm-stability.js +1 -1
- package/dashboard/dist-server/src/graph/kg/extraction/code/wasm-stability.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js +2 -2
- package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/surface/hook-injector.js +1 -1
- package/dashboard/dist-server/src/graph/kg/surface/hook-injector.js.map +1 -1
- package/dashboard/dist-server/src/hooks/keyword-spec-injector.js +35 -0
- package/dashboard/dist-server/src/hooks/keyword-spec-injector.js.map +1 -1
- package/dashboard/dist-server/src/hooks/spec-analytics.d.ts +1 -0
- package/dashboard/dist-server/src/hooks/spec-analytics.js.map +1 -1
- package/dashboard/dist-server/src/hooks/wiki-search-bridge.d.ts +32 -0
- package/dashboard/dist-server/src/hooks/wiki-search-bridge.js +71 -0
- package/dashboard/dist-server/src/hooks/wiki-search-bridge.js.map +1 -0
- package/dist/src/agents/api-explore/agent-loop.d.ts +15 -2
- package/dist/src/agents/api-explore/agent-loop.d.ts.map +1 -1
- package/dist/src/agents/api-explore/agent-loop.js +6 -5
- package/dist/src/agents/api-explore/agent-loop.js.map +1 -1
- package/dist/src/agents/api-explore/config.d.ts +56 -0
- package/dist/src/agents/api-explore/config.d.ts.map +1 -1
- package/dist/src/agents/api-explore/config.js +34 -0
- package/dist/src/agents/api-explore/config.js.map +1 -1
- package/dist/src/agents/api-explore/llm.d.ts +5 -1
- package/dist/src/agents/api-explore/llm.d.ts.map +1 -1
- package/dist/src/agents/api-explore/llm.js +10 -8
- package/dist/src/agents/api-explore/llm.js.map +1 -1
- package/dist/src/agents/api-explore/moa-cache.d.ts +12 -0
- package/dist/src/agents/api-explore/moa-cache.d.ts.map +1 -0
- package/dist/src/agents/api-explore/moa-cache.js +50 -0
- package/dist/src/agents/api-explore/moa-cache.js.map +1 -0
- package/dist/src/agents/api-explore/moa-loop.d.ts +49 -0
- package/dist/src/agents/api-explore/moa-loop.d.ts.map +1 -0
- package/dist/src/agents/api-explore/moa-loop.js +43 -0
- package/dist/src/agents/api-explore/moa-loop.js.map +1 -0
- package/dist/src/agents/api-explore/moa-pipeline.d.ts +43 -0
- package/dist/src/agents/api-explore/moa-pipeline.d.ts.map +1 -0
- package/dist/src/agents/api-explore/moa-pipeline.js +276 -0
- package/dist/src/agents/api-explore/moa-pipeline.js.map +1 -0
- package/dist/src/agents/api-explore/runner.d.ts +3 -0
- package/dist/src/agents/api-explore/runner.d.ts.map +1 -1
- package/dist/src/agents/api-explore/runner.js +24 -7
- package/dist/src/agents/api-explore/runner.js.map +1 -1
- package/dist/src/agents/api-explore/session.d.ts +15 -0
- package/dist/src/agents/api-explore/session.d.ts.map +1 -1
- package/dist/src/agents/api-explore/session.js.map +1 -1
- package/dist/src/cli.js +1 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/explore.d.ts.map +1 -1
- package/dist/src/commands/explore.js +16 -1
- package/dist/src/commands/explore.js.map +1 -1
- package/dist/src/commands/moa.d.ts +3 -0
- package/dist/src/commands/moa.d.ts.map +1 -0
- package/dist/src/commands/moa.js +202 -0
- package/dist/src/commands/moa.js.map +1 -0
- package/dist/src/graph/kg/db/queries.d.ts +6 -0
- package/dist/src/graph/kg/db/queries.d.ts.map +1 -1
- package/dist/src/graph/kg/db/queries.js +141 -19
- package/dist/src/graph/kg/db/queries.js.map +1 -1
- package/dist/src/graph/kg/extraction/code/svelte-extractor.js +1 -1
- package/dist/src/graph/kg/extraction/code/svelte-extractor.js.map +1 -1
- package/dist/src/graph/kg/extraction/code/tree-sitter.js +2 -2
- package/dist/src/graph/kg/extraction/code/tree-sitter.js.map +1 -1
- package/dist/src/graph/kg/extraction/code/vue-extractor.js +1 -1
- package/dist/src/graph/kg/extraction/code/vue-extractor.js.map +1 -1
- package/dist/src/graph/kg/extraction/code/wasm-stability.js +1 -1
- package/dist/src/graph/kg/extraction/code/wasm-stability.js.map +1 -1
- package/dist/src/graph/kg/extraction/orchestrator.js +2 -2
- package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
- package/dist/src/graph/kg/surface/hook-injector.js +1 -1
- package/dist/src/graph/kg/surface/hook-injector.js.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.js +35 -0
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
- package/dist/src/hooks/spec-analytics.d.ts +1 -0
- package/dist/src/hooks/spec-analytics.d.ts.map +1 -1
- package/dist/src/hooks/spec-analytics.js.map +1 -1
- package/dist/src/hooks/wiki-search-bridge.d.ts +33 -0
- package/dist/src/hooks/wiki-search-bridge.d.ts.map +1 -0
- package/dist/src/hooks/wiki-search-bridge.js +71 -0
- package/dist/src/hooks/wiki-search-bridge.js.map +1 -0
- package/dist/src/utils/update-notices.js +12 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +1 -1
- package/.agents/skills/maestro-ralph-agent/SKILL.md +0 -697
- package/.agents/skills/maestro-ralph-agent-execute/SKILL.md +0 -461
- package/.agy/skills/maestro-ralph-agent/SKILL.md +0 -696
- package/.agy/skills/maestro-ralph-agent-execute/SKILL.md +0 -457
- package/.claude/commands/maestro-ralph-agent-execute.md +0 -459
- package/.claude/commands/maestro-ralph-agent.md +0 -695
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ralph-executor
|
|
3
|
+
description: Single-step executor — ralph next + inline skill execution, multi-agent orchestration via SendMessage
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- Edit
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Skill
|
|
12
|
+
- Agent
|
|
13
|
+
- SendMessage
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Ralph Executor
|
|
17
|
+
|
|
18
|
+
## Role
|
|
19
|
+
|
|
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 via SendMessage. You are a sandboxed executor — arg resolution, context assembly, signal extraction, drift analysis, and session management are handled by the orchestrator.
|
|
21
|
+
|
|
22
|
+
## Process
|
|
23
|
+
|
|
24
|
+
**立即自启动**:你是 named mailbox teammate。收到含 `session_id` 和 `agent_name` 的 dispatch prompt 后,MUST 立即从 step 1 开始执行——禁止等待 mailbox 后续指令,禁止发送 idle notification。
|
|
25
|
+
|
|
26
|
+
1. Call `Bash("maestro ralph next --session {session_id}")` — **全量捕获 stdout,严禁截断管道**
|
|
27
|
+
- Exit 0 → skill_prompt = stdout,继续执行
|
|
28
|
+
- Exit 1 → SendMessage 错误信息给 main,结束
|
|
29
|
+
- Exit 2 → SendMessage "所有 step 已完成" 给 main,结束
|
|
30
|
+
- Exit 3 → SendMessage "并发冲突" 给 main,结束
|
|
31
|
+
2. Execute the skill prompt inline — follow all instructions faithfully
|
|
32
|
+
3. Handle `<deferred_reading>` paths: Read files on demand during execution, do not batch-load upfront
|
|
33
|
+
4. SendMessage({to: "main"}) 返回执行产物路径 + 摘要
|
|
34
|
+
|
|
35
|
+
## Multi-Agent Orchestration
|
|
36
|
+
|
|
37
|
+
当 skill prompt 需要多 agent 编排时(如 `maestro-execute` 的 wave 并行派发):
|
|
38
|
+
|
|
39
|
+
1. **派发 named worker**:调用 `Agent({name})` 派发 worker 为 named teammate,确保长时间任务存活:
|
|
40
|
+
```
|
|
41
|
+
worker name 格式: {agent_name}-w{index}(如 exe-v2-001-w1, exe-v2-001-w2)
|
|
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"})` 返回最终执行输出
|
|
47
|
+
|
|
48
|
+
### Worker Dispatch Template
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Agent({
|
|
52
|
+
name: "{agent_name}-w{index}",
|
|
53
|
+
description: "执行子任务: {task_description}",
|
|
54
|
+
prompt: "你是 worker agent。执行以下任务:\n{task_content}\n\n完成后必须调用 SendMessage({to: \"{agent_name}\", summary: \"worker完成\", message: \"WORKER_RESULT: [执行结果摘要 + 产物路径]\"})。"
|
|
55
|
+
})
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Input
|
|
59
|
+
|
|
60
|
+
从 dispatch prompt 中提取:
|
|
61
|
+
|
|
62
|
+
| Field | Required | Description |
|
|
63
|
+
|-------|----------|-------------|
|
|
64
|
+
| `session_id` | Yes | ralph session ID |
|
|
65
|
+
| `agent_name` | Yes | 本 agent 的 name,用于 sub-agent SendMessage 回传 |
|
|
66
|
+
| execution context | No | 编排器注入的上下文(intent、boundary、goals、prior steps 等) |
|
|
67
|
+
|
|
68
|
+
## Output
|
|
69
|
+
|
|
70
|
+
通过 `SendMessage({to: "main"})` 返回,格式:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
EXECUTOR_OUTPUT:
|
|
74
|
+
- status: DONE|DONE_WITH_CONCERNS|ERROR
|
|
75
|
+
- summary: <执行摘要>
|
|
76
|
+
- artifacts: <产物路径列表>
|
|
77
|
+
- concerns: <关注点,仅 DONE_WITH_CONCERNS 时>
|
|
78
|
+
- error: <错误信息,仅 ERROR 时>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
失败时也必须 SendMessage,禁止静默崩溃。
|
|
82
|
+
|
|
83
|
+
## Constraints
|
|
84
|
+
|
|
85
|
+
- 禁止无故空转——收到 session_id 即开始执行,不等待编排器的后续 mailbox 指令。等待 worker SendMessage 回传期间的 idle 是正常行为(平台自动触发 idle_notification,不可抑制)
|
|
86
|
+
- Execute exactly one step per invocation
|
|
87
|
+
- Do not call `maestro ralph complete` — completion is handled by the orchestrator
|
|
88
|
+
- Do not read or modify `status.json` — session management is the orchestrator's responsibility
|
|
89
|
+
- Do not skip execution steps or short-circuit — execute the full skill content
|
|
90
|
+
- Do not insert/delete/reorder steps or evaluate decision nodes
|
|
91
|
+
- 所有执行结果必须通过 SendMessage({to: "main"}) 回报,直接文本输出主流程看不到
|
|
@@ -13,11 +13,9 @@ allowed-tools:
|
|
|
13
13
|
- AskUserQuestion
|
|
14
14
|
---
|
|
15
15
|
<purpose>
|
|
16
|
-
CLI-delegated
|
|
16
|
+
CLI-delegated lifecycle orchestrator: compose prompt → delegate to CLI (via ralph-cli-execute wrapper) → STOP → callback → analyze structured result → mark complete → decide next → loop.
|
|
17
17
|
|
|
18
18
|
Session: `.workflow/.maestro/ralph-cli-{YYYYMMDD-HHmmss}/status.json`
|
|
19
|
-
|
|
20
|
-
Chain building(A_RESOLVE_PHASE → A_INFER_POSITION → A_BUILD_STEPS)、session schema、decomposition(A_DECOMPOSE_TASKS)与 ralph 共用。
|
|
21
19
|
</purpose>
|
|
22
20
|
|
|
23
21
|
<context>
|
|
@@ -46,17 +44,26 @@ Remaining → intent (amend_mode 时为 change_request)
|
|
|
46
44
|
</context>
|
|
47
45
|
|
|
48
46
|
<invariants>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
1. **Ralph-cli never executes steps** — only creates sessions, composes delegation prompts, and evaluates decisions;执行由 delegate 端 cli-execute 完成
|
|
48
|
+
2. **ralph-cli owns the loop** — compose → delegate → analyze → decide 全部在本命令内完成;ralph-cli-execute 只是被委托端的执行包装器
|
|
49
|
+
3. **Delegate via cli-execute** — delegate prompt 首行为 cli-execute 调用,格式由目标工具决定(见 Invocation Notation)
|
|
50
|
+
4. **Parse ---RESULT--- block** — delegate 返回后从输出中解析结构化结果块
|
|
51
|
+
5. **Decision evaluation inline** — decision 节点不 handoff,直接在本循环内评估(用 `maestro delegate --to {session.cli_tool} --mode analysis` 做只读分析)
|
|
52
|
+
6. **Decision delegates read-only** — `maestro delegate --to <tool> --mode analysis`
|
|
53
|
+
7. **No inline skill execution** — 本命令不执行 skill 逻辑;执行由委托端 cli-execute 完成
|
|
54
|
+
8. **执行 step 通过 `maestro ralph next` CLI 加载并内联执行**(由 cli-execute 端完成)
|
|
55
|
+
9. **status.json 是唯一真源** — 不生成 markdown 清单或侧文件
|
|
56
|
+
10. **每个 step 必须 `completion_confirmed: true`** — 由 `maestro ralph complete N --status DONE`(或 DONE_WITH_CONCERNS)写入;CLI 是唯一合法写入路径
|
|
57
|
+
11. **command_path 在 A_BUILD_STEPS 解析** — 通过 `maestro ralph skills --platform claude --json --quiet` 预校验
|
|
58
|
+
12. **执行 step 加载契约** — 由 `maestro ralph next` CLI 在执行期完成
|
|
59
|
+
13. **Decomposition is outcome-oriented** — sub-goals 为可观测交付,禁止 lifecycle 复刻
|
|
60
|
+
14. **planning_mode governs arg granularity** — `unified` → skill args 无 `{phase}`;`independent` → 含 `{phase}`
|
|
61
|
+
15. **task_decomposition 驱动 steps[] 动态生长** — `post-goal-audit` 按 unmet 子目标插入 scoped mini-loop
|
|
62
|
+
16. **Invariant violation = BLOCK** — 违反上述任一 invariant 即阻断当前操作
|
|
63
|
+
17. **Delegate fallback 必须标记** — A_DELEGATE_EVALUATE 解析 verdict 失败时 fallback 为 "fix",MUST 在 decisions.ndjson 记录 `"parse_failed": true, "confidence_score": 0`
|
|
64
|
+
18. **auto_confirm 单一来源** — `auto_confirm` 仅由用户 `-y` 标志设定
|
|
65
|
+
19. **分解契约单一所有者** — `boundary_contract` / `task_decomposition` 由 session 创建者拥有
|
|
66
|
+
20. **控制权优先级(范式治理)** — FSM 独占 session 生命周期 + step 排序 + retry/fix/escalate + cross-step decision 节点
|
|
60
67
|
</invariants>
|
|
61
68
|
|
|
62
69
|
<state_machine>
|
|
@@ -621,8 +628,6 @@ E001–E006, W001–W004 适用。CLI 新增:
|
|
|
621
628
|
|
|
622
629
|
### Success Criteria
|
|
623
630
|
|
|
624
|
-
Ralph success criteria 适用。CLI 新增:
|
|
625
|
-
|
|
626
631
|
- [ ] ralph-cli owns full loop: compose → delegate → STOP → callback → parse → complete → next
|
|
627
632
|
- [ ] Delegation prompt 首行为 cli-execute 调用(`--session {session_id}`,格式由 cli_tool 决定),后接 `<execution_context>`
|
|
628
633
|
- [ ] A_PARSE_RESULT extracts STATUS/SUMMARY/ARTIFACTS/DECISIONS/CAVEATS/DEFERRED/SIGNALS from ---RESULT--- block
|