maestro-flow 0.5.42 → 0.5.43
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/skills/domain-add/SKILL.md +3 -0
- package/.agents/skills/learn-decompose/SKILL.md +7 -4
- package/.agents/skills/learn-follow/SKILL.md +4 -2
- package/.agents/skills/learn-investigate/SKILL.md +8 -6
- package/.agents/skills/learn-second-opinion/SKILL.md +6 -3
- package/.agents/skills/maestro/SKILL.md +1 -1
- package/.agents/skills/maestro-amend/SKILL.md +1 -1
- package/.agents/skills/maestro-analyze/SKILL.md +1 -1
- package/.agents/skills/maestro-blueprint/SKILL.md +1 -1
- package/.agents/skills/maestro-brainstorm/SKILL.md +4 -1
- package/.agents/skills/maestro-collab/SKILL.md +6 -2
- package/.agents/skills/maestro-companion/SKILL.md +4 -1
- package/.agents/skills/maestro-composer/SKILL.md +4 -2
- package/.agents/skills/maestro-execute/SKILL.md +26 -8
- package/.agents/skills/maestro-fork/SKILL.md +4 -3
- package/.agents/skills/maestro-grill/SKILL.md +1 -1
- package/.agents/skills/maestro-guard/SKILL.md +2 -2
- package/.agents/skills/maestro-impeccable/SKILL.md +2 -1
- package/.agents/skills/maestro-init/SKILL.md +1 -1
- package/.agents/skills/maestro-merge/SKILL.md +12 -1
- package/.agents/skills/maestro-milestone-audit/SKILL.md +1 -0
- package/.agents/skills/maestro-milestone-complete/SKILL.md +8 -3
- package/.agents/skills/maestro-milestone-release/SKILL.md +8 -4
- package/.agents/skills/maestro-overlay/SKILL.md +9 -0
- package/.agents/skills/maestro-plan/SKILL.md +1 -0
- package/.agents/skills/maestro-player/SKILL.md +2 -2
- package/.agents/skills/maestro-quick/SKILL.md +5 -3
- package/.agents/skills/maestro-ralph/SKILL.md +8 -8
- package/.agents/skills/maestro-ralph-cli/SKILL.md +665 -0
- package/.agents/skills/maestro-ralph-cli-execute/SKILL.md +239 -0
- package/.agents/skills/maestro-ralph-execute/SKILL.md +127 -11
- package/.agents/skills/maestro-roadmap/SKILL.md +1 -1
- package/.agents/skills/maestro-swarm-workflow/SKILL.md +16 -14
- package/.agents/skills/maestro-tools-register/SKILL.md +16 -1
- package/.agents/skills/maestro-ui-codify/SKILL.md +11 -1
- package/.agents/skills/maestro-universal-workflow/SKILL.md +28 -5
- package/.agents/skills/maestro-update/SKILL.md +10 -7
- package/.agents/skills/manage-codebase-rebuild/SKILL.md +5 -1
- package/.agents/skills/manage-drift-realign/SKILL.md +6 -2
- package/.agents/skills/manage-harvest/SKILL.md +4 -1
- package/.agents/skills/manage-issue-discover/SKILL.md +1 -0
- package/.agents/skills/manage-kg-extractors/SKILL.md +5 -1
- package/.agents/skills/manage-knowhow-capture/SKILL.md +1 -0
- package/.agents/skills/manage-knowledge-audit/SKILL.md +3 -0
- package/.agents/skills/manage-wiki/SKILL.md +1 -0
- package/.agents/skills/odyssey-debug/SKILL.md +2 -1
- package/.agents/skills/odyssey-improve/SKILL.md +2 -2
- package/.agents/skills/odyssey-planex/SKILL.md +8 -7
- package/.agents/skills/odyssey-review-test-fix/SKILL.md +4 -1
- package/.agents/skills/odyssey-ui/SKILL.md +4 -4
- package/.agents/skills/quality-auto-test/SKILL.md +11 -1
- package/.agents/skills/quality-debug/SKILL.md +16 -2
- package/.agents/skills/quality-retrospective/SKILL.md +9 -1
- package/.agents/skills/quality-review/SKILL.md +8 -0
- package/.agents/skills/quality-sync/SKILL.md +2 -2
- package/.agents/skills/quality-test/SKILL.md +9 -1
- package/.agents/skills/security-audit/SKILL.md +14 -4
- package/.agents/skills/spec-add/SKILL.md +5 -2
- package/.agents/skills/spec-load/SKILL.md +1 -1
- package/.agents/skills/spec-remove/SKILL.md +1 -1
- package/.agents/skills/spec-setup/SKILL.md +3 -0
- package/.agy/skills/domain-add/SKILL.md +3 -0
- package/.agy/skills/learn-decompose/SKILL.md +7 -4
- package/.agy/skills/learn-follow/SKILL.md +4 -2
- package/.agy/skills/learn-investigate/SKILL.md +8 -6
- package/.agy/skills/learn-second-opinion/SKILL.md +6 -3
- package/.agy/skills/maestro/SKILL.md +1 -1
- package/.agy/skills/maestro-amend/SKILL.md +1 -1
- package/.agy/skills/maestro-analyze/SKILL.md +1 -1
- package/.agy/skills/maestro-blueprint/SKILL.md +1 -1
- package/.agy/skills/maestro-brainstorm/SKILL.md +4 -1
- package/.agy/skills/maestro-collab/SKILL.md +6 -2
- package/.agy/skills/maestro-companion/SKILL.md +4 -1
- package/.agy/skills/maestro-composer/SKILL.md +4 -2
- package/.agy/skills/maestro-execute/SKILL.md +26 -8
- package/.agy/skills/maestro-fork/SKILL.md +4 -3
- package/.agy/skills/maestro-grill/SKILL.md +1 -1
- package/.agy/skills/maestro-guard/SKILL.md +2 -2
- package/.agy/skills/maestro-impeccable/SKILL.md +2 -1
- package/.agy/skills/maestro-init/SKILL.md +1 -1
- package/.agy/skills/maestro-merge/SKILL.md +12 -1
- package/.agy/skills/maestro-milestone-audit/SKILL.md +1 -0
- package/.agy/skills/maestro-milestone-complete/SKILL.md +8 -3
- package/.agy/skills/maestro-milestone-release/SKILL.md +8 -4
- package/.agy/skills/maestro-overlay/SKILL.md +9 -0
- package/.agy/skills/maestro-plan/SKILL.md +1 -0
- package/.agy/skills/maestro-player/SKILL.md +2 -2
- package/.agy/skills/maestro-quick/SKILL.md +5 -3
- package/.agy/skills/maestro-ralph/SKILL.md +8 -8
- package/.agy/skills/maestro-ralph-cli/SKILL.md +661 -0
- package/.agy/skills/maestro-ralph-cli-execute/SKILL.md +235 -0
- package/.agy/skills/maestro-ralph-execute/SKILL.md +127 -11
- package/.agy/skills/maestro-roadmap/SKILL.md +1 -1
- package/.agy/skills/maestro-swarm-workflow/SKILL.md +16 -14
- package/.agy/skills/maestro-tools-register/SKILL.md +16 -1
- package/.agy/skills/maestro-ui-codify/SKILL.md +11 -1
- package/.agy/skills/maestro-universal-workflow/SKILL.md +28 -5
- package/.agy/skills/maestro-update/SKILL.md +10 -7
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +5 -1
- package/.agy/skills/manage-drift-realign/SKILL.md +6 -2
- package/.agy/skills/manage-harvest/SKILL.md +4 -1
- package/.agy/skills/manage-issue-discover/SKILL.md +1 -0
- package/.agy/skills/manage-kg-extractors/SKILL.md +5 -1
- package/.agy/skills/manage-knowhow-capture/SKILL.md +1 -0
- package/.agy/skills/manage-knowledge-audit/SKILL.md +3 -0
- package/.agy/skills/manage-wiki/SKILL.md +1 -0
- package/.agy/skills/odyssey-debug/SKILL.md +2 -1
- package/.agy/skills/odyssey-improve/SKILL.md +2 -2
- package/.agy/skills/odyssey-planex/SKILL.md +8 -7
- package/.agy/skills/odyssey-review-test-fix/SKILL.md +4 -1
- package/.agy/skills/odyssey-ui/SKILL.md +4 -4
- package/.agy/skills/quality-auto-test/SKILL.md +11 -1
- package/.agy/skills/quality-debug/SKILL.md +16 -2
- package/.agy/skills/quality-retrospective/SKILL.md +9 -1
- package/.agy/skills/quality-review/SKILL.md +8 -0
- package/.agy/skills/quality-sync/SKILL.md +2 -2
- package/.agy/skills/quality-test/SKILL.md +9 -1
- package/.agy/skills/security-audit/SKILL.md +14 -4
- package/.agy/skills/spec-add/SKILL.md +5 -2
- package/.agy/skills/spec-load/SKILL.md +1 -1
- package/.agy/skills/spec-remove/SKILL.md +1 -1
- package/.agy/skills/spec-setup/SKILL.md +3 -0
- package/.claude/commands/domain-add.md +3 -0
- package/.claude/commands/learn-decompose.md +7 -4
- package/.claude/commands/learn-follow.md +4 -2
- package/.claude/commands/learn-investigate.md +8 -6
- package/.claude/commands/learn-second-opinion.md +6 -3
- package/.claude/commands/maestro-amend.md +1 -1
- package/.claude/commands/maestro-analyze.md +1 -1
- package/.claude/commands/maestro-blueprint.md +1 -1
- package/.claude/commands/maestro-brainstorm.md +4 -1
- package/.claude/commands/maestro-collab.md +6 -2
- package/.claude/commands/maestro-companion.md +4 -1
- package/.claude/commands/maestro-composer.md +4 -2
- package/.claude/commands/maestro-execute.md +26 -8
- package/.claude/commands/maestro-fork.md +4 -3
- package/.claude/commands/maestro-grill.md +1 -1
- package/.claude/commands/maestro-guard.md +2 -2
- package/.claude/commands/maestro-impeccable.md +2 -1
- package/.claude/commands/maestro-init.md +1 -1
- package/.claude/commands/maestro-merge.md +12 -1
- package/.claude/commands/maestro-milestone-audit.md +1 -0
- package/.claude/commands/maestro-milestone-complete.md +8 -3
- package/.claude/commands/maestro-milestone-release.md +8 -4
- package/.claude/commands/maestro-overlay.md +9 -0
- package/.claude/commands/maestro-plan.md +1 -0
- package/.claude/commands/maestro-player.md +2 -2
- package/.claude/commands/maestro-quick.md +5 -3
- package/.claude/commands/maestro-ralph-cli-execute.md +237 -0
- package/.claude/commands/maestro-ralph-cli.md +663 -0
- package/.claude/commands/maestro-ralph-execute.md +127 -11
- package/.claude/commands/maestro-ralph.md +8 -8
- package/.claude/commands/maestro-roadmap.md +1 -1
- package/.claude/commands/maestro-swarm-workflow.md +16 -14
- package/.claude/commands/maestro-tools-register.md +16 -1
- package/.claude/commands/maestro-ui-codify.md +11 -1
- package/.claude/commands/maestro-universal-workflow.md +28 -5
- package/.claude/commands/maestro-update.md +10 -7
- package/.claude/commands/maestro.md +1 -1
- package/.claude/commands/manage-codebase-rebuild.md +5 -1
- package/.claude/commands/manage-drift-realign.md +6 -2
- package/.claude/commands/manage-harvest.md +4 -1
- package/.claude/commands/manage-issue-discover.md +1 -0
- package/.claude/commands/manage-kg-extractors.md +5 -1
- package/.claude/commands/manage-knowhow-capture.md +1 -0
- package/.claude/commands/manage-knowledge-audit.md +3 -0
- package/.claude/commands/manage-wiki.md +1 -0
- package/.claude/commands/odyssey-debug.md +2 -1
- package/.claude/commands/odyssey-improve.md +2 -2
- package/.claude/commands/odyssey-planex.md +8 -7
- package/.claude/commands/odyssey-review-test-fix.md +4 -1
- package/.claude/commands/odyssey-ui.md +4 -4
- package/.claude/commands/quality-auto-test.md +11 -1
- package/.claude/commands/quality-debug.md +16 -2
- package/.claude/commands/quality-retrospective.md +9 -1
- package/.claude/commands/quality-review.md +8 -0
- package/.claude/commands/quality-sync.md +2 -2
- package/.claude/commands/quality-test.md +9 -1
- package/.claude/commands/security-audit.md +14 -4
- package/.claude/commands/spec-add.md +5 -2
- package/.claude/commands/spec-load.md +1 -1
- package/.claude/commands/spec-remove.md +1 -1
- package/.claude/commands/spec-setup.md +3 -0
- package/.codex/skills/codify-to-knowhow/SKILL.md +27 -15
- package/.codex/skills/domain-add/SKILL.md +5 -3
- package/.codex/skills/learn-decompose/SKILL.md +22 -4
- package/.codex/skills/learn-follow/SKILL.md +12 -6
- package/.codex/skills/learn-investigate/SKILL.md +11 -6
- package/.codex/skills/learn-retro/SKILL.md +12 -6
- package/.codex/skills/learn-second-opinion/SKILL.md +11 -3
- package/.codex/skills/maestro/SKILL.md +19 -13
- package/.codex/skills/maestro-amend/SKILL.md +10 -2
- package/.codex/skills/maestro-analyze/SKILL.md +7 -1
- package/.codex/skills/maestro-blueprint/SKILL.md +1 -1
- package/.codex/skills/maestro-brainstorm/SKILL.md +11 -8
- package/.codex/skills/maestro-collab/SKILL.md +5 -5
- package/.codex/skills/maestro-companion/SKILL.md +4 -1
- package/.codex/skills/maestro-composer/SKILL.md +6 -3
- package/.codex/skills/maestro-execute/SKILL.md +11 -8
- package/.codex/skills/maestro-fork/SKILL.md +4 -3
- package/.codex/skills/maestro-grill/SKILL.md +1 -1
- package/.codex/skills/maestro-guard/SKILL.md +1 -1
- package/.codex/skills/maestro-impeccable/SKILL.md +5 -5
- package/.codex/skills/maestro-init/SKILL.md +3 -2
- package/.codex/skills/maestro-milestone-audit/SKILL.md +21 -9
- package/.codex/skills/maestro-milestone-complete/SKILL.md +3 -3
- package/.codex/skills/maestro-milestone-release/SKILL.md +18 -1
- package/.codex/skills/maestro-next/SKILL.md +11 -10
- package/.codex/skills/maestro-overlay/SKILL.md +16 -6
- package/.codex/skills/maestro-player/SKILL.md +11 -5
- package/.codex/skills/maestro-quick/SKILL.md +2 -2
- package/.codex/skills/maestro-ralph/SKILL.md +44 -31
- package/.codex/skills/maestro-ralph-cli/SKILL.md +394 -0
- package/.codex/skills/maestro-ralph-cli-execute/SKILL.md +146 -0
- package/.codex/skills/maestro-ralph-execute/SKILL.md +105 -24
- package/.codex/skills/maestro-roadmap/SKILL.md +8 -2
- package/.codex/skills/maestro-tools-execute/SKILL.md +8 -4
- package/.codex/skills/maestro-tools-register/SKILL.md +10 -6
- package/.codex/skills/maestro-ui-codify/SKILL.md +14 -9
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +36 -14
- package/.codex/skills/manage-codebase-refresh/SKILL.md +1 -1
- package/.codex/skills/manage-drift-realign/SKILL.md +15 -12
- package/.codex/skills/manage-harvest/SKILL.md +1 -1
- package/.codex/skills/manage-issue/SKILL.md +8 -4
- package/.codex/skills/manage-issue-discover/SKILL.md +15 -14
- package/.codex/skills/manage-knowhow/SKILL.md +3 -2
- package/.codex/skills/manage-knowhow-capture/SKILL.md +4 -3
- package/.codex/skills/manage-learn/SKILL.md +2 -2
- package/.codex/skills/odyssey-debug/SKILL.md +12 -7
- package/.codex/skills/odyssey-improve/SKILL.md +11 -6
- package/.codex/skills/odyssey-planex/SKILL.md +14 -8
- package/.codex/skills/odyssey-review-test-fix/SKILL.md +12 -7
- package/.codex/skills/odyssey-ui/SKILL.md +10 -5
- package/.codex/skills/quality-auto-test/SKILL.md +13 -5
- package/.codex/skills/quality-debug/SKILL.md +18 -11
- package/.codex/skills/quality-refactor/SKILL.md +4 -4
- package/.codex/skills/quality-retrospective/SKILL.md +5 -6
- package/.codex/skills/quality-review/SKILL.md +18 -11
- package/.codex/skills/quality-sync/SKILL.md +2 -2
- package/.codex/skills/quality-test/SKILL.md +7 -5
- package/.codex/skills/security-audit/SKILL.md +7 -5
- package/.codex/skills/spec-add/SKILL.md +9 -7
- package/.codex/skills/spec-load/SKILL.md +3 -2
- package/.codex/skills/spec-map/SKILL.md +10 -1
- package/.codex/skills/spec-remove/SKILL.md +3 -2
- package/.codex/skills/team-coordinate/SKILL.md +10 -4
- package/.codex/skills/team-lifecycle-v4/SKILL.md +33 -26
- package/.codex/skills/team-quality-assurance/SKILL.md +43 -0
- package/.codex/skills/team-review/SKILL.md +50 -6
- package/.codex/skills/team-tech-debt/SKILL.md +53 -7
- package/.codex/skills/team-testing/SKILL.md +50 -2
- package/.codex/skills/wiki-connect/SKILL.md +3 -1
- package/.codex/skills/wiki-digest/SKILL.md +6 -4
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +16 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +419 -44
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +43 -5
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/db/types.d.ts +3 -0
- package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.d.ts +46 -0
- package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js +329 -0
- package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js.map +1 -0
- package/dashboard/dist-server/src/graph/kg/embedding/index.d.ts +2 -0
- package/dashboard/dist-server/src/graph/kg/embedding/index.js +3 -0
- package/dashboard/dist-server/src/graph/kg/embedding/index.js.map +1 -0
- package/dashboard/dist-server/src/graph/kg/engine.d.ts +19 -1
- package/dashboard/dist-server/src/graph/kg/engine.js +71 -1
- package/dashboard/dist-server/src/graph/kg/engine.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/query/scoring.d.ts +5 -0
- package/dashboard/dist-server/src/graph/kg/query/scoring.js +85 -1
- package/dashboard/dist-server/src/graph/kg/query/scoring.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/query/search.d.ts +7 -0
- package/dashboard/dist-server/src/graph/kg/query/search.js +117 -1
- package/dashboard/dist-server/src/graph/kg/query/search.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/surface/mcp-tools.js +49 -0
- package/dashboard/dist-server/src/graph/kg/surface/mcp-tools.js.map +1 -1
- package/dashboard/dist-server/src/hooks/kg-sync-hook.js +3 -0
- package/dashboard/dist-server/src/hooks/kg-sync-hook.js.map +1 -1
- package/dist/src/core/plugin-bridge.d.ts.map +1 -1
- package/dist/src/core/plugin-bridge.js +17 -0
- package/dist/src/core/plugin-bridge.js.map +1 -1
- package/dist/src/graph/kg/db/types.d.ts +3 -0
- package/dist/src/graph/kg/db/types.d.ts.map +1 -1
- package/dist/src/graph/kg/embedding/code-embedding.d.ts +47 -0
- package/dist/src/graph/kg/embedding/code-embedding.d.ts.map +1 -0
- package/dist/src/graph/kg/embedding/code-embedding.js +329 -0
- package/dist/src/graph/kg/embedding/code-embedding.js.map +1 -0
- package/dist/src/graph/kg/embedding/index.d.ts +3 -0
- package/dist/src/graph/kg/embedding/index.d.ts.map +1 -0
- package/dist/src/graph/kg/embedding/index.js +3 -0
- package/dist/src/graph/kg/embedding/index.js.map +1 -0
- package/dist/src/graph/kg/engine.d.ts +19 -1
- package/dist/src/graph/kg/engine.d.ts.map +1 -1
- package/dist/src/graph/kg/engine.js +71 -1
- package/dist/src/graph/kg/engine.js.map +1 -1
- package/dist/src/graph/kg/query/scoring.d.ts +5 -0
- package/dist/src/graph/kg/query/scoring.d.ts.map +1 -1
- package/dist/src/graph/kg/query/scoring.js +85 -1
- package/dist/src/graph/kg/query/scoring.js.map +1 -1
- package/dist/src/graph/kg/query/search.d.ts +7 -0
- package/dist/src/graph/kg/query/search.d.ts.map +1 -1
- package/dist/src/graph/kg/query/search.js +117 -1
- package/dist/src/graph/kg/query/search.js.map +1 -1
- package/dist/src/graph/kg/surface/mcp-tools.d.ts.map +1 -1
- package/dist/src/graph/kg/surface/mcp-tools.js +49 -0
- package/dist/src/graph/kg/surface/mcp-tools.js.map +1 -1
- package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -1
- package/dist/src/hooks/kg-sync-hook.js +3 -0
- package/dist/src/hooks/kg-sync-hook.js.map +1 -1
- package/dist/src/tools/code-semantic-search.d.ts +10 -0
- package/dist/src/tools/code-semantic-search.d.ts.map +1 -0
- package/dist/src/tools/code-semantic-search.js +81 -0
- package/dist/src/tools/code-semantic-search.js.map +1 -0
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +4 -0
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/wiki-search.d.ts +13 -0
- package/dist/src/tools/wiki-search.d.ts.map +1 -0
- package/dist/src/tools/wiki-search.js +114 -0
- package/dist/src/tools/wiki-search.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 +4 -1
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-ralph-cli
|
|
3
|
+
description: CLI-delegated lifecycle orchestrator — compose, delegate, analyze, decide in one loop
|
|
4
|
+
argument-hint: "<intent> [-y] [--to <tool>] | status | continue"
|
|
5
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
|
+
---
|
|
7
|
+
<purpose>
|
|
8
|
+
CLI-delegated variant of maestro-ralph. Same chain-building logic — but this command owns the full orchestration loop: compose prompt → delegate to CLI (via ralph-cli-execute wrapper) → STOP → callback → analyze structured result → mark complete → decide next → loop.
|
|
9
|
+
|
|
10
|
+
### Notation
|
|
11
|
+
|
|
12
|
+
`Skill(name)` / `Skill(name, args)` = 加载 `~/.codex/skills/{name}/SKILL.md` 或 `.codex/skills/{name}/SKILL.md`(project 覆盖 global)。严禁翻译为 `Bash("maestro {name} {args}")`——CLI 不接受裸 intent。
|
|
13
|
+
|
|
14
|
+
Session: `.workflow/.maestro/ralph-cli-{YYYYMMDD-HHmmss}/status.json`
|
|
15
|
+
|
|
16
|
+
**Shared with ralph**: chain building (A_RESOLVE_PHASE → A_INFER_POSITION → A_BUILD_STEPS), session schema, decomposition (A_DECOMPOSE_TASKS). See `Skill(maestro-ralph)` for full specification.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<context>
|
|
20
|
+
$ARGUMENTS — same as ralph plus CLI-specific flags.
|
|
21
|
+
|
|
22
|
+
**Parse:**
|
|
23
|
+
```
|
|
24
|
+
-y flag → auto_confirm = true
|
|
25
|
+
--to <tool> → cli_tool (claude|codex|opencode|agy); 默认 claude
|
|
26
|
+
--roadmap → wants_roadmap = true
|
|
27
|
+
--amend / -a → amend_mode = true
|
|
28
|
+
.md/.txt path → input_doc
|
|
29
|
+
status|continue → route keyword
|
|
30
|
+
Remaining → intent (amend_mode 时为 change_request)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**CLI tool selection:**
|
|
34
|
+
1. `--to <tool>` 显式指定 → 直接使用
|
|
35
|
+
2. 未指定 → 默认 `claude`
|
|
36
|
+
3. 校验 `cli-tools.json` 中目标工具 `enabled: true`
|
|
37
|
+
4. `enabled: false` → E012
|
|
38
|
+
|
|
39
|
+
**State files**:
|
|
40
|
+
- `.workflow/state.json` — artifact registry
|
|
41
|
+
- `.workflow/.maestro/ralph-cli-*/status.json` — session state
|
|
42
|
+
</context>
|
|
43
|
+
|
|
44
|
+
<invariants>
|
|
45
|
+
All ralph invariants (1-15) apply. Additionally:
|
|
46
|
+
|
|
47
|
+
16. **ralph-cli owns the loop** — compose → delegate → analyze → decide 全部在本命令内完成;maestro-ralph-cli-execute 只是被委托端的执行包装器
|
|
48
|
+
17. **Delegate via cli-execute** — delegate prompt 首行为 cli-execute 调用,格式由目标工具决定(见 Invocation Notation)
|
|
49
|
+
18. **Parse ---RESULT--- block** — delegate 返回后从输出中解析结构化结果块
|
|
50
|
+
19. **Decision evaluation inline** — decision 节点不 handoff,直接在本循环内评估
|
|
51
|
+
20. **No inline skill execution** — 本命令不执行 skill 逻辑;执行由委托端 cli-execute 完成
|
|
52
|
+
21. **Platform** — `session.platform = "codex"`;skill discovery 通过 `maestro ralph skills --platform codex`
|
|
53
|
+
</invariants>
|
|
54
|
+
|
|
55
|
+
<state_machine>
|
|
56
|
+
|
|
57
|
+
Ralph's chain-building states apply (S_PARSE_ROUTE through S_CREATE_SESSION). Execution loop states replace S_DISPATCH:
|
|
58
|
+
|
|
59
|
+
<states>
|
|
60
|
+
S_PARSE_ROUTE — 解析参数、路由入口
|
|
61
|
+
S_STATUS — 显示 session 进度
|
|
62
|
+
S_CONTINUE — 恢复执行
|
|
63
|
+
S_RESOLVE_PHASE — (ralph shared)
|
|
64
|
+
S_INFER — (ralph shared)
|
|
65
|
+
S_RESOLVE_SCOPE — (ralph shared)
|
|
66
|
+
S_QUALITY_MODE — (ralph shared)
|
|
67
|
+
S_PLANNING_MODE — (ralph shared)
|
|
68
|
+
S_DECOMPOSE — (ralph shared)
|
|
69
|
+
S_BUILD_CHAIN — (ralph shared)
|
|
70
|
+
S_CREATE_SESSION — 写 status.json
|
|
71
|
+
S_CONFIRM — 用户确认
|
|
72
|
+
|
|
73
|
+
S_STEP_LOCATE — 找下一个 pending step PERSIST: —
|
|
74
|
+
S_STEP_RESOLVE — 解析占位符 + 丰富参数 PERSIST: step.args
|
|
75
|
+
S_STEP_LOAD — 加载前序产出 + 发现 PERSIST: —
|
|
76
|
+
S_STEP_COMPOSE — 根据目标 skill 生成适配 prompt PERSIST: —
|
|
77
|
+
S_STEP_DELEGATE — 调 maestro delegate → STOP PERSIST: step.delegate_exec_id, step.status
|
|
78
|
+
S_STEP_ANALYZE — 解析 ---RESULT--- 块 + 分析产物 PERSIST: step.cli_output_summary, session.context
|
|
79
|
+
S_POST_ANALYZE — 产物 vs 目标偏离分析 PERSIST: step.drift_score, step.drift_correction
|
|
80
|
+
S_STEP_COMPLETE — 标记完成 PERSIST: step.completion_*
|
|
81
|
+
S_DECISION_EVAL — 评估 decision 节点 PERSIST: —
|
|
82
|
+
S_APPLY_VERDICT — 应用裁决 PERSIST: session.steps[]
|
|
83
|
+
S_SESSION_DONE — 所有 step 完成 PERSIST: session.status
|
|
84
|
+
S_HANDLE_FAIL — 处理失败 PERSIST: step.status
|
|
85
|
+
S_AMEND_GOAL — 修改 running session 目标 PERSIST: session.task_decomposition, .boundary_contract, .goal_changelog, .steps[]
|
|
86
|
+
S_FALLBACK — 请求用户输入 PERSIST: —
|
|
87
|
+
</states>
|
|
88
|
+
|
|
89
|
+
<transitions>
|
|
90
|
+
|
|
91
|
+
S_PARSE_ROUTE:
|
|
92
|
+
→ S_STATUS WHEN: intent == "status"
|
|
93
|
+
→ S_CONTINUE WHEN: intent == "continue"
|
|
94
|
+
→ S_AMEND_GOAL WHEN: amend_mode == true AND running session exists
|
|
95
|
+
→ S_FALLBACK WHEN: amend_mode == true AND no running session
|
|
96
|
+
→ S_STEP_LOCATE WHEN: running session with decision step in "running" status
|
|
97
|
+
→ S_RESOLVE_PHASE WHEN: intent is non-empty
|
|
98
|
+
→ S_FALLBACK WHEN: no intent AND no running session
|
|
99
|
+
|
|
100
|
+
S_STATUS:
|
|
101
|
+
→ END DO: A_SHOW_STATUS
|
|
102
|
+
|
|
103
|
+
S_CONTINUE:
|
|
104
|
+
→ S_STEP_LOCATE WHEN: running session found
|
|
105
|
+
→ S_FALLBACK WHEN: no running session
|
|
106
|
+
|
|
107
|
+
S_AMEND_GOAL:
|
|
108
|
+
→ S_STEP_LOCATE WHEN: change applied + user confirmed DO: A_AMEND_GOAL
|
|
109
|
+
→ END WHEN: user cancels
|
|
110
|
+
GUARD: RISK_LEVEL=high → auto_confirm 无效
|
|
111
|
+
|
|
112
|
+
S_CREATE_SESSION:
|
|
113
|
+
→ S_CONFIRM WHEN: not auto_confirm
|
|
114
|
+
→ S_STEP_LOCATE WHEN: auto_confirm
|
|
115
|
+
|
|
116
|
+
S_CONFIRM:
|
|
117
|
+
→ S_STEP_LOCATE WHEN: user confirms
|
|
118
|
+
→ S_BUILD_CHAIN WHEN: user edits
|
|
119
|
+
→ END WHEN: user cancels
|
|
120
|
+
|
|
121
|
+
S_STEP_LOCATE:
|
|
122
|
+
→ S_STEP_RESOLVE WHEN: pending execution step found
|
|
123
|
+
→ S_DECISION_EVAL WHEN: pending decision step found
|
|
124
|
+
→ S_SESSION_DONE WHEN: no pending steps
|
|
125
|
+
→ S_FALLBACK WHEN: no running session
|
|
126
|
+
|
|
127
|
+
S_STEP_RESOLVE → S_STEP_LOAD DO: A_RESOLVE_ARGS
|
|
128
|
+
S_STEP_LOAD → S_STEP_COMPOSE DO: A_LOAD_STEP_CONTEXT
|
|
129
|
+
S_STEP_COMPOSE → S_STEP_DELEGATE DO: A_COMPOSE_DELEGATION_PROMPT
|
|
130
|
+
S_STEP_DELEGATE → END DO: A_DISPATCH_DELEGATE (STOP)
|
|
131
|
+
|
|
132
|
+
S_STEP_LOCATE (on re-entry, finds running step with delegate_exec_id):
|
|
133
|
+
→ S_STEP_ANALYZE WHEN: delegate completed
|
|
134
|
+
→ END WHEN: delegate still running (STOP)
|
|
135
|
+
|
|
136
|
+
S_STEP_ANALYZE:
|
|
137
|
+
→ S_POST_ANALYZE WHEN: STATUS == DONE|DONE_WITH_CONCERNS DO: A_PARSE_RESULT
|
|
138
|
+
→ S_HANDLE_FAIL WHEN: STATUS == NEEDS_RETRY|BLOCKED DO: A_PARSE_RESULT
|
|
139
|
+
|
|
140
|
+
S_POST_ANALYZE:
|
|
141
|
+
→ S_STEP_COMPLETE WHEN: drift_score == ALIGNED|MINOR_DRIFT DO: A_POST_ANALYZE_DRIFT
|
|
142
|
+
→ S_STEP_LOAD WHEN: drift_score == MAJOR_DRIFT + not retried DO: A_POST_ANALYZE_DRIFT (re-delegate with correction)
|
|
143
|
+
→ S_STEP_COMPLETE WHEN: drift_score == MAJOR_DRIFT + retried DO: A_POST_ANALYZE_DRIFT (proceed with caveats)
|
|
144
|
+
|
|
145
|
+
S_STEP_COMPLETE → S_STEP_LOCATE DO: A_MARK_COMPLETE
|
|
146
|
+
|
|
147
|
+
S_DECISION_EVAL:
|
|
148
|
+
→ S_APPLY_VERDICT WHEN: quality-gate DO: A_DELEGATE_EVALUATE
|
|
149
|
+
→ S_APPLY_VERDICT WHEN: goal-gate DO: A_GOAL_AUDIT_EVALUATE
|
|
150
|
+
→ S_APPLY_VERDICT WHEN: scope-gate DO: A_SCOPE_EVALUATE
|
|
151
|
+
→ S_APPLY_VERDICT WHEN: reground-gate DO: A_REGROUND_EVALUATE
|
|
152
|
+
→ S_APPLY_VERDICT WHEN: structural DO: A_STRUCTURAL_EVALUATE
|
|
153
|
+
|
|
154
|
+
S_APPLY_VERDICT:
|
|
155
|
+
→ S_STEP_LOCATE WHEN: proceed / fix / goal-fix / scope-verdict / milestone-advance
|
|
156
|
+
→ END WHEN: escalate / reground-halt / session complete / debug-escalate
|
|
157
|
+
GUARD: retry_count >= max_retries → force escalate
|
|
158
|
+
GUARD: confidence_score < 60 AND proceed → override to fix
|
|
159
|
+
GUARD: post-reground + drifted + confidence >= 60 → A_REGROUND_HALT(auto_confirm 不跳过)
|
|
160
|
+
|
|
161
|
+
S_HANDLE_FAIL:
|
|
162
|
+
→ S_STEP_LOCATE WHEN: auto + not retried DO: A_RETRY
|
|
163
|
+
→ END WHEN: auto + retried DO: A_PAUSE_SESSION
|
|
164
|
+
|
|
165
|
+
S_SESSION_DONE → END DO: A_COMPLETE_SESSION
|
|
166
|
+
|
|
167
|
+
</transitions>
|
|
168
|
+
|
|
169
|
+
<actions>
|
|
170
|
+
|
|
171
|
+
### A_CREATE_SESSION (override)
|
|
172
|
+
|
|
173
|
+
Same as ralph A_CREATE_SESSION with:
|
|
174
|
+
1. `session_id` format: `ralph-cli-{YYYYMMDD-HHmmss}`
|
|
175
|
+
2. `execution_mode: "cli-delegate"`, `cli_tool`, `platform: "codex"`
|
|
176
|
+
3. Each step: `delegate_exec_id: null`, `cli_output_summary: null`, `artifacts_produced: []`
|
|
177
|
+
4. Step mode/role/rule assigned per stage (see Stage Mapping)
|
|
178
|
+
|
|
179
|
+
### A_RESOLVE_ARGS
|
|
180
|
+
|
|
181
|
+
Same as Skill(maestro-ralph-execute) A_RESOLVE_ARGS:
|
|
182
|
+
- Placeholder substitution, per-skill enrichment, `--from` auto-injection, goal context injection, `--from blueprint:{BLP_ID}` support
|
|
183
|
+
|
|
184
|
+
### A_LOAD_STEP_CONTEXT
|
|
185
|
+
|
|
186
|
+
主流程加载前序产出和发现,为 prompt 生成准备素材。
|
|
187
|
+
|
|
188
|
+
1. **Session base** — Read status.json → intent, phase, milestone, boundary_contract
|
|
189
|
+
2. **Previous step output** — 前一 step 的 `cli_output_summary` + `completion_caveats` + `artifacts_produced` → 关键发现 + 产物路径
|
|
190
|
+
3. **Artifacts** — 按产物路径逐个 Read,提取与当前 step 相关的内容:
|
|
191
|
+
- `conclusions.json` → scope, key_findings, recommendations
|
|
192
|
+
- `TASK-*.json` → task descriptions, dependencies, wave assignments
|
|
193
|
+
- `verification.json` → pass/fail results, gap details
|
|
194
|
+
- `review.json` → findings, severity, fix suggestions
|
|
195
|
+
- `completion_evidence` → error traces, test failures
|
|
196
|
+
- `grill-report.md` → challenged assumptions, risks
|
|
197
|
+
4. **Explore if needed** — 产物指向代码位置但缺少上下文 → `maestro explore` 补充(仅 execute/debug/test 且有文件路径引用时)
|
|
198
|
+
5. **Accumulated signals** — 遍历 ALL completed steps → 聚合 caveats + deferred
|
|
199
|
+
|
|
200
|
+
输出:`step_context` 结构,供 A_COMPOSE_DELEGATION_PROMPT 消费。
|
|
201
|
+
|
|
202
|
+
### A_COMPOSE_DELEGATION_PROMPT
|
|
203
|
+
|
|
204
|
+
根据 `step_context` + 目标 skill 生成适配的 delegate prompt。
|
|
205
|
+
|
|
206
|
+
**Invocation Notation** — 由 `session.cli_tool` 决定:
|
|
207
|
+
|
|
208
|
+
| cli_tool | 首行格式 |
|
|
209
|
+
|----------|---------|
|
|
210
|
+
| claude | `/maestro-ralph-cli-execute {step.skill} {resolved_args} --session {session_id}` |
|
|
211
|
+
| codex | `$maestro-ralph-cli-execute {step.skill} {resolved_args} --session {session_id}` |
|
|
212
|
+
| opencode, agy | `/maestro-ralph-cli-execute {step.skill} {resolved_args} --session {session_id}` |
|
|
213
|
+
|
|
214
|
+
**Skill-adapted prompt** — 根据目标 skill 类型选择性注入 step_context 中的内容:
|
|
215
|
+
|
|
216
|
+
| 目标 skill 类型 | 注入重点 |
|
|
217
|
+
|----------------|---------|
|
|
218
|
+
| analyze | intent + scope + boundary |
|
|
219
|
+
| plan | analysis findings + scope_verdict + recommendations |
|
|
220
|
+
| execute | task list + dependencies + wave + caveats from plan |
|
|
221
|
+
| review | changed files + verification results + execution decisions |
|
|
222
|
+
| test | review findings + execution artifacts + coverage data |
|
|
223
|
+
| debug | error details + failing tests + execution trace |
|
|
224
|
+
| brainstorm/grill | challenged assumptions + risks + prior findings |
|
|
225
|
+
|
|
226
|
+
每段仅在有实际内容时加入,无内容则跳过。
|
|
227
|
+
|
|
228
|
+
### A_DISPATCH_DELEGATE
|
|
229
|
+
|
|
230
|
+
1. `maestro delegate "{prompt}" --to {cli_tool} --mode {delegate_mode} --id {prefix}-{HHmmss}-{rand4}`
|
|
231
|
+
2. Write `step.delegate_exec_id`, `step.status = "running"`
|
|
232
|
+
3. `Bash({ run_in_background: true })`
|
|
233
|
+
4. **STOP**
|
|
234
|
+
|
|
235
|
+
### A_PARSE_RESULT
|
|
236
|
+
|
|
237
|
+
1. `maestro delegate status {exec_id}` — still running → STOP
|
|
238
|
+
2. `maestro delegate output {exec_id}` — parse `---RESULT---` / `---END---` block
|
|
239
|
+
3. Extract: STATUS, SUMMARY, ARTIFACTS, DECISIONS, CAVEATS, DEFERRED, SIGNALS
|
|
240
|
+
4. Apply SIGNALS key=value pairs to session.context
|
|
241
|
+
5. No block found → fallback: STATUS=DONE_WITH_CONCERNS
|
|
242
|
+
|
|
243
|
+
### A_MARK_COMPLETE
|
|
244
|
+
|
|
245
|
+
`Bash("maestro ralph complete {index} --status {STATUS} --summary \"{SUMMARY}\" ...")`
|
|
246
|
+
|
|
247
|
+
### A_SHOW_STATUS
|
|
248
|
+
|
|
249
|
+
Same as ralph: find latest ralph-cli session, display steps + sub-goals progress.
|
|
250
|
+
|
|
251
|
+
### A_POST_ANALYZE_DRIFT
|
|
252
|
+
|
|
253
|
+
产物 vs 目标偏离分析。A_PARSE_RESULT 后、A_MARK_COMPLETE 前执行。
|
|
254
|
+
|
|
255
|
+
**1. 收集对照基准:**
|
|
256
|
+
|
|
257
|
+
| 基准来源 | 取值 |
|
|
258
|
+
|---------|------|
|
|
259
|
+
| `step.goal_ref` → goal.done_when | 子目标的完成条件 |
|
|
260
|
+
| `session.boundary_contract.definition_of_done` | 全局验收标准 |
|
|
261
|
+
| `session.execution_criteria` | 执行准则 |
|
|
262
|
+
| `session.intent` | 原始意图 |
|
|
263
|
+
|
|
264
|
+
**2. 读产物摘要:**
|
|
265
|
+
|
|
266
|
+
从 A_PARSE_RESULT 已提取的 SUMMARY + DECISIONS + ARTIFACTS + CAVEATS 构建产物画像。
|
|
267
|
+
|
|
268
|
+
**3. 对比评分:**
|
|
269
|
+
|
|
270
|
+
| 维度 | 检查 |
|
|
271
|
+
|------|------|
|
|
272
|
+
| 覆盖度 | 产物是否覆盖了 goal.done_when 的每个条件 |
|
|
273
|
+
| 方向性 | DECISIONS 是否与 intent 和 boundary 一致 |
|
|
274
|
+
| 完整性 | 预期产物类型是否齐全 |
|
|
275
|
+
|
|
276
|
+
**drift_score:** ALIGNED / MINOR_DRIFT / MAJOR_DRIFT
|
|
277
|
+
|
|
278
|
+
**4. 修正动作:**
|
|
279
|
+
|
|
280
|
+
| drift_score | 动作 |
|
|
281
|
+
|-------------|------|
|
|
282
|
+
| ALIGNED | 正常进入 S_STEP_COMPLETE |
|
|
283
|
+
| MINOR_DRIFT | 将偏离项追加到 completion_caveats,正常 complete |
|
|
284
|
+
| MAJOR_DRIFT + 未重试 | 写 `step.drift_correction`,回到 S_STEP_LOAD 重新 compose + delegate |
|
|
285
|
+
| MAJOR_DRIFT + 已重试 | 以 DONE_WITH_CONCERNS complete,由后续 decision node 裁决 |
|
|
286
|
+
|
|
287
|
+
**5. 写入:** `step.drift_score`, `step.drift_correction`
|
|
288
|
+
|
|
289
|
+
### A_DELEGATE_EVALUATE
|
|
290
|
+
|
|
291
|
+
Same as ralph: delegate `--role analyze --mode analysis` with quality gate verdict parsing. Inline (run_in_background, STOP, callback).
|
|
292
|
+
|
|
293
|
+
### A_GOAL_AUDIT_EVALUATE / A_SCOPE_EVALUATE / A_REGROUND_EVALUATE
|
|
294
|
+
|
|
295
|
+
Same as ralph. All run inline via delegate.
|
|
296
|
+
|
|
297
|
+
### A_STRUCTURAL_EVALUATE
|
|
298
|
+
|
|
299
|
+
**post-milestone**: next milestone? insert lifecycle steps / complete. Adhoc: always END.
|
|
300
|
+
**post-debug-escalate**: always STOP → A_PAUSE_ESCALATE.
|
|
301
|
+
|
|
302
|
+
### A_APPLY_PROCEED / A_APPLY_FIX / A_APPLY_ESCALATE / A_APPLY_SCOPE_VERDICT / A_APPLY_GOAL_FIX / A_APPLY_GOAL_DONE / A_ADVANCE_MILESTONE
|
|
303
|
+
|
|
304
|
+
Same as ralph. All chain mutations apply unchanged.
|
|
305
|
+
|
|
306
|
+
### A_REGROUND_HALT
|
|
307
|
+
|
|
308
|
+
Same as ralph: `session.status = "paused"`, display drift warning. auto_confirm 不跳过.
|
|
309
|
+
|
|
310
|
+
### A_PAUSE_ESCALATE
|
|
311
|
+
|
|
312
|
+
Set session paused, display "请人工介入", suggest `Skill(maestro-ralph-cli, continue)`.
|
|
313
|
+
|
|
314
|
+
### A_AMEND_GOAL
|
|
315
|
+
|
|
316
|
+
Same as ralph (deferred_reading: `ralph-amend-goal.md`): 5 步流程. RISK_LEVEL=high 时 auto_confirm 无效。
|
|
317
|
+
|
|
318
|
+
### A_RETRY / A_PAUSE_SESSION / A_COMPLETE_SESSION
|
|
319
|
+
|
|
320
|
+
Same as ralph equivalents.
|
|
321
|
+
|
|
322
|
+
</actions>
|
|
323
|
+
|
|
324
|
+
</state_machine>
|
|
325
|
+
|
|
326
|
+
<appendix>
|
|
327
|
+
|
|
328
|
+
### Stage Mapping
|
|
329
|
+
|
|
330
|
+
| Stage | delegate_mode | delegate_role | delegate_rule |
|
|
331
|
+
|-------|---------------|---------------|---------------|
|
|
332
|
+
| analyze, analyze-macro | analysis | analyze | `analysis-analyze-code-patterns` |
|
|
333
|
+
| plan | write | plan | `planning-breakdown-task-steps` |
|
|
334
|
+
| execute | write | implement | `development-implement-feature` |
|
|
335
|
+
| review, business-test | analysis | review | `analysis-review-code-quality` |
|
|
336
|
+
| test, test-gen | write | implement | — |
|
|
337
|
+
| grill, brainstorm | write | brainstorm | — |
|
|
338
|
+
| debug | write | analyze | `analysis-diagnose-bug-root-cause` |
|
|
339
|
+
|
|
340
|
+
### Session Schema (extends ralph)
|
|
341
|
+
|
|
342
|
+
Ralph session schema 全量字段均适用。CLI 新增字段:
|
|
343
|
+
|
|
344
|
+
```json
|
|
345
|
+
{
|
|
346
|
+
"execution_mode": "cli-delegate",
|
|
347
|
+
"cli_tool": "claude",
|
|
348
|
+
"platform": "codex",
|
|
349
|
+
"steps": [{
|
|
350
|
+
"delegate_exec_id": null,
|
|
351
|
+
"delegate_mode": "write|analysis",
|
|
352
|
+
"delegate_role": "analyze|plan|implement|review|brainstorm",
|
|
353
|
+
"delegate_rule": null,
|
|
354
|
+
"cli_output_summary": null,
|
|
355
|
+
"artifacts_produced": []
|
|
356
|
+
}]
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Fix-Loop Templates
|
|
361
|
+
|
|
362
|
+
Same as ralph. All 6 fix-loop templates apply unchanged. Each inserted step is delegated through the same compose → delegate → analyze cycle.
|
|
363
|
+
|
|
364
|
+
### Error Codes
|
|
365
|
+
|
|
366
|
+
Ralph E001–E006, W001–W004 all apply. CLI additions:
|
|
367
|
+
|
|
368
|
+
| Code | Severity | Description | Recovery |
|
|
369
|
+
|------|----------|-------------|----------|
|
|
370
|
+
| E011 | error | Delegate execution failed | Retry once, then BLOCKED |
|
|
371
|
+
| E012 | error | CLI tool not enabled | Switch tool or enable |
|
|
372
|
+
| E013 | error | ---RESULT--- block not found | Fallback parse, LOW CONFIDENCE |
|
|
373
|
+
|
|
374
|
+
### Success Criteria
|
|
375
|
+
|
|
376
|
+
All ralph success criteria apply. Additionally:
|
|
377
|
+
|
|
378
|
+
- [ ] ralph-cli owns full loop: compose → delegate → STOP → callback → parse → complete → next
|
|
379
|
+
- [ ] Delegation prompt 首行为 cli-execute 调用(格式由 cli_tool 决定),后接 `<execution_context>`
|
|
380
|
+
- [ ] A_PARSE_RESULT extracts ---RESULT--- block fields
|
|
381
|
+
- [ ] Decision evaluation inline (no handoff)
|
|
382
|
+
- [ ] S_AMEND_GOAL + A_AMEND_GOAL (5 步, RISK_LEVEL=high 不跳过)
|
|
383
|
+
- [ ] `goal_changelog` 写入路径存在
|
|
384
|
+
- [ ] `blueprint_id` 支持 `--from blueprint:{BLP_ID}`
|
|
385
|
+
- [ ] A_STRUCTURAL_EVALUATE 处理 post-milestone + post-debug-escalate
|
|
386
|
+
- [ ] A_ADVANCE_MILESTONE 插入下一里程碑 lifecycle steps
|
|
387
|
+
- [ ] A_REGROUND_HALT 漂移熔断(auto_confirm 不跳过)
|
|
388
|
+
- [ ] Fix-loop templates(6 套)通过 compose-delegate cycle 执行
|
|
389
|
+
- [ ] re-grounding 3-step 插入规则(build rule 5.5)
|
|
390
|
+
- [ ] spec-setup 预检(build rule 0.5)
|
|
391
|
+
- [ ] `platform: "codex"`, skill discovery via `--platform codex`
|
|
392
|
+
|
|
393
|
+
</appendix>
|
|
394
|
+
</output>
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-ralph-cli-execute
|
|
3
|
+
description: Skill execution wrapper for delegate — execute skill, return structured result
|
|
4
|
+
argument-hint: "<skill-name> [args...]"
|
|
5
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
|
+
---
|
|
7
|
+
<purpose>
|
|
8
|
+
Thin execution wrapper for CLI delegation.
|
|
9
|
+
|
|
10
|
+
### Notation
|
|
11
|
+
|
|
12
|
+
`Skill(name)` / `Skill(name, args)` = 加载 `~/.codex/skills/{name}/SKILL.md` 或 `.codex/skills/{name}/SKILL.md`(project 覆盖 global)。严禁翻译为 `Bash("maestro {name} {args}")`。
|
|
13
|
+
|
|
14
|
+
Job: receive skill name + args → execute the skill → scan artifacts → output structured `---RESULT---` block.
|
|
15
|
+
|
|
16
|
+
This command does NOT manage sessions, compose prompts, or make decisions. Those are `Skill(maestro-ralph-cli)`'s responsibility.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<context>
|
|
20
|
+
$ARGUMENTS — `<skill-name> [args...]`
|
|
21
|
+
|
|
22
|
+
**Parse:**
|
|
23
|
+
```
|
|
24
|
+
First token → skill_name (e.g., maestro-plan, maestro-execute, quality-review)
|
|
25
|
+
Remaining → skill_args
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Execution context** is injected by the delegation prompt from ralph-cli as `<execution_context>` block. The wrapper passes this through to the skill.
|
|
29
|
+
|
|
30
|
+
**Session context**: delegation prompt may include `--session <id>` — if present, read `status.json` to get `active_step_index` for `ralph complete`.
|
|
31
|
+
|
|
32
|
+
**Platform**: `session.platform == "codex"`
|
|
33
|
+
</context>
|
|
34
|
+
|
|
35
|
+
<invariants>
|
|
36
|
+
1. **Execute exactly one skill** — parse skill_name, execute it, return
|
|
37
|
+
2. **Structured output** — always end with `---RESULT---` / `---END---` block
|
|
38
|
+
3. **No session management** — never create/modify sessions or make decisions
|
|
39
|
+
4. **No self-invocation** — execute once and return
|
|
40
|
+
5. **Artifact scanning** — after skill execution, scan for produced artifacts
|
|
41
|
+
6. **CLI ≠ Skill** — `maestro ralph complete` 是 CLI 子命令;`Skill(name)` 是 skill 直调
|
|
42
|
+
</invariants>
|
|
43
|
+
|
|
44
|
+
<state_machine>
|
|
45
|
+
|
|
46
|
+
<states>
|
|
47
|
+
S_PARSE — 解析 skill name + args PERSIST: —
|
|
48
|
+
S_EXECUTE — 执行 skill PERSIST: —
|
|
49
|
+
S_SCAN — 扫描产物 + 提取信号 PERSIST: —
|
|
50
|
+
S_OUTPUT — 输出结构化结果 PERSIST: —
|
|
51
|
+
</states>
|
|
52
|
+
|
|
53
|
+
<transitions>
|
|
54
|
+
S_PARSE → S_EXECUTE DO: A_PARSE_ARGS
|
|
55
|
+
S_EXECUTE → S_SCAN DO: A_EXECUTE_SKILL
|
|
56
|
+
S_SCAN → S_OUTPUT DO: A_SCAN_ARTIFACTS
|
|
57
|
+
S_OUTPUT → END DO: A_OUTPUT_RESULT
|
|
58
|
+
</transitions>
|
|
59
|
+
|
|
60
|
+
<actions>
|
|
61
|
+
|
|
62
|
+
### A_PARSE_ARGS
|
|
63
|
+
|
|
64
|
+
1. Extract `skill_name` (first token) and `skill_args` (remaining)
|
|
65
|
+
2. Parse `<execution_context>` block from delegation prompt if present
|
|
66
|
+
3. Parse `--session <id>` if present → `session_id`
|
|
67
|
+
|
|
68
|
+
### A_EXECUTE_SKILL
|
|
69
|
+
|
|
70
|
+
1. If `session_id` present → `Bash("maestro ralph next --session {session_id}")` — CLI loads SKILL.md + required_reading
|
|
71
|
+
- Exit 0 → inline execute per stdout
|
|
72
|
+
- Exit 1 → set `status = "BLOCKED"`, skip to S_OUTPUT
|
|
73
|
+
2. If no session → `Skill(skill_name, skill_args)` — direct skill call
|
|
74
|
+
3. Track execution: note start time, watch for errors
|
|
75
|
+
|
|
76
|
+
### A_SCAN_ARTIFACTS
|
|
77
|
+
|
|
78
|
+
After skill execution, scan for produced artifacts:
|
|
79
|
+
|
|
80
|
+
| Pattern | Stage signal |
|
|
81
|
+
|---------|-------------|
|
|
82
|
+
| `conclusions.json` | `analysis_dir` |
|
|
83
|
+
| `TASK-*.json` | `plan_dir` |
|
|
84
|
+
| `verification.json` | `scratch_dir` |
|
|
85
|
+
| `review.json` | review stage |
|
|
86
|
+
| `test-results.json`, `uat.md` | test stage |
|
|
87
|
+
| `grill-report.md` | `grill_id` |
|
|
88
|
+
| `.brainstorming/*` | `brainstorm_dir` |
|
|
89
|
+
|
|
90
|
+
Extract signals from output: artifact IDs (`ANL-xxx`, `PLN-xxx`, `BLP-xxx`), path signals, phase signals.
|
|
91
|
+
|
|
92
|
+
### A_OUTPUT_RESULT
|
|
93
|
+
|
|
94
|
+
Output structured result block:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
---RESULT---
|
|
98
|
+
STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY|BLOCKED
|
|
99
|
+
SUMMARY: <动词开头,≤100 字>
|
|
100
|
+
ARTIFACTS: <逗号分隔的产物路径>
|
|
101
|
+
DECISIONS: <关键决策,分号分隔>
|
|
102
|
+
CAVEATS: <后续注意事项>
|
|
103
|
+
DEFERRED: <推迟工作项,分号分隔>
|
|
104
|
+
SIGNALS: <key=value 对,分号分隔>
|
|
105
|
+
---END---
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**STATUS determination:**
|
|
109
|
+
- 正常完成 + 有产物 → `DONE`
|
|
110
|
+
- 完成但有 warnings → `DONE_WITH_CONCERNS`
|
|
111
|
+
- 出错可重试 → `NEEDS_RETRY`
|
|
112
|
+
- 出错不可重试 → `BLOCKED`
|
|
113
|
+
|
|
114
|
+
</actions>
|
|
115
|
+
|
|
116
|
+
</state_machine>
|
|
117
|
+
|
|
118
|
+
<appendix>
|
|
119
|
+
|
|
120
|
+
### Output Example
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
---RESULT---
|
|
124
|
+
STATUS: DONE
|
|
125
|
+
SUMMARY: 生成 8 个 task 覆盖认证模块 3 个子系统,wave 1 含 5 个独立 task
|
|
126
|
+
ARTIFACTS: .workflow/scratch/PLN-20260628/TASK-001.json,.workflow/scratch/PLN-20260628/plan.json
|
|
127
|
+
DECISIONS: 选择 wave 模式分 2 波执行;JWT 和 session 分离为独立 task
|
|
128
|
+
CAVEATS: 模块 X 的外部 API 尚未确认,TASK-003 可能需调整
|
|
129
|
+
DEFERRED: 性能基准测试留到 review 后
|
|
130
|
+
SIGNALS: plan_dir=.workflow/scratch/PLN-20260628;PLN-xxx=PLN-20260628
|
|
131
|
+
---END---
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Success Criteria
|
|
135
|
+
|
|
136
|
+
- [ ] Parse skill_name + skill_args from $ARGUMENTS
|
|
137
|
+
- [ ] Execute via `maestro ralph next` (session mode) or `Skill()` (direct mode)
|
|
138
|
+
- [ ] Scan artifacts after execution using Glob
|
|
139
|
+
- [ ] Always output `---RESULT---` / `---END---` block
|
|
140
|
+
- [ ] STATUS correctly reflects execution outcome
|
|
141
|
+
- [ ] SUMMARY 动词开头,≤100 字
|
|
142
|
+
- [ ] No session management, no self-invocation, no decisions
|
|
143
|
+
- [ ] Platform: only processes codex sessions (or absent → codex)
|
|
144
|
+
|
|
145
|
+
</appendix>
|
|
146
|
+
</output>
|