maestro-flow 0.5.45 → 0.5.47
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 +51 -6
- package/.agents/skills/domain-add/SKILL.md +9 -0
- package/.agents/skills/learn-decompose/SKILL.md +12 -0
- package/.agents/skills/learn-follow/SKILL.md +41 -0
- package/.agents/skills/learn-investigate/SKILL.md +14 -0
- package/.agents/skills/learn-second-opinion/SKILL.md +14 -0
- package/.agents/skills/maestro-amend/SKILL.md +11 -0
- package/.agents/skills/maestro-companion/SKILL.md +11 -0
- package/.agents/skills/maestro-composer/SKILL.md +11 -0
- package/.agents/skills/maestro-guard/SKILL.md +25 -0
- package/.agents/skills/maestro-init/SKILL.md +28 -0
- package/.agents/skills/maestro-overlay/SKILL.md +11 -0
- package/.agents/skills/maestro-player/SKILL.md +11 -0
- package/.agents/skills/maestro-quick/SKILL.md +29 -0
- package/.agents/skills/maestro-ralph-v2/SKILL.md +124 -61
- package/.agents/skills/maestro-swarm-workflow/SKILL.md +25 -0
- package/.agents/skills/maestro-tools-execute/SKILL.md +29 -0
- package/.agents/skills/maestro-tools-register/SKILL.md +29 -0
- package/.agents/skills/maestro-ui-codify/SKILL.md +11 -0
- package/.agents/skills/maestro-universal-workflow/SKILL.md +59 -0
- package/.agents/skills/maestro-update/SKILL.md +38 -0
- package/.agents/skills/manage-codebase-rebuild/SKILL.md +29 -0
- package/.agents/skills/manage-drift-realign/SKILL.md +12 -0
- package/.agents/skills/manage-harvest/SKILL.md +30 -6
- package/.agents/skills/manage-issue/SKILL.md +23 -0
- package/.agents/skills/manage-issue-discover/SKILL.md +28 -0
- package/.agents/skills/manage-kg-extractors/SKILL.md +27 -1
- package/.agents/skills/manage-knowhow/SKILL.md +26 -0
- package/.agents/skills/manage-knowhow-capture/SKILL.md +24 -0
- package/.agents/skills/manage-knowledge-audit/SKILL.md +13 -0
- package/.agents/skills/manage-status/SKILL.md +22 -0
- package/.agents/skills/manage-wiki/SKILL.md +28 -0
- package/.agents/skills/odyssey-debug/SKILL.md +338 -253
- package/.agents/skills/odyssey-improve/SKILL.md +417 -281
- package/.agents/skills/odyssey-planex/SKILL.md +536 -420
- package/.agents/skills/odyssey-review-test-fix/SKILL.md +386 -251
- package/.agents/skills/odyssey-ui/SKILL.md +382 -247
- package/.agents/skills/quality-auto-test/SKILL.md +12 -0
- package/.agents/skills/quality-debug/SKILL.md +11 -0
- package/.agents/skills/quality-refactor/SKILL.md +11 -0
- package/.agents/skills/quality-retrospective/SKILL.md +11 -0
- package/.agents/skills/quality-review/SKILL.md +11 -0
- package/.agents/skills/quality-sync/SKILL.md +10 -0
- package/.agents/skills/quality-test/SKILL.md +12 -0
- package/.agents/skills/security-audit/SKILL.md +11 -0
- package/.agents/skills/spec-add/SKILL.md +27 -0
- package/.agents/skills/spec-load/SKILL.md +25 -0
- package/.agents/skills/spec-remove/SKILL.md +26 -0
- package/.agents/skills/spec-setup/SKILL.md +30 -0
- package/.agy/agents/ralph-executor.md +53 -6
- package/.agy/skills/domain-add/SKILL.md +9 -0
- package/.agy/skills/learn-decompose/SKILL.md +12 -0
- package/.agy/skills/learn-follow/SKILL.md +41 -0
- package/.agy/skills/learn-investigate/SKILL.md +14 -0
- package/.agy/skills/learn-second-opinion/SKILL.md +14 -0
- package/.agy/skills/maestro-amend/SKILL.md +11 -0
- package/.agy/skills/maestro-companion/SKILL.md +11 -0
- package/.agy/skills/maestro-composer/SKILL.md +11 -0
- package/.agy/skills/maestro-guard/SKILL.md +25 -0
- package/.agy/skills/maestro-init/SKILL.md +28 -0
- package/.agy/skills/maestro-overlay/SKILL.md +11 -0
- package/.agy/skills/maestro-player/SKILL.md +11 -0
- package/.agy/skills/maestro-quick/SKILL.md +29 -0
- package/.agy/skills/maestro-ralph-v2/SKILL.md +123 -61
- package/.agy/skills/maestro-swarm-workflow/SKILL.md +25 -0
- package/.agy/skills/maestro-tools-execute/SKILL.md +29 -0
- package/.agy/skills/maestro-tools-register/SKILL.md +29 -0
- package/.agy/skills/maestro-ui-codify/SKILL.md +11 -0
- package/.agy/skills/maestro-universal-workflow/SKILL.md +59 -0
- package/.agy/skills/maestro-update/SKILL.md +38 -0
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +29 -0
- package/.agy/skills/manage-drift-realign/SKILL.md +12 -0
- package/.agy/skills/manage-harvest/SKILL.md +30 -6
- package/.agy/skills/manage-issue/SKILL.md +23 -0
- package/.agy/skills/manage-issue-discover/SKILL.md +28 -0
- package/.agy/skills/manage-kg-extractors/SKILL.md +27 -1
- package/.agy/skills/manage-knowhow/SKILL.md +26 -0
- package/.agy/skills/manage-knowhow-capture/SKILL.md +24 -0
- package/.agy/skills/manage-knowledge-audit/SKILL.md +13 -0
- package/.agy/skills/manage-status/SKILL.md +22 -0
- package/.agy/skills/manage-wiki/SKILL.md +28 -0
- package/.agy/skills/odyssey-debug/SKILL.md +338 -253
- package/.agy/skills/odyssey-improve/SKILL.md +417 -281
- package/.agy/skills/odyssey-planex/SKILL.md +536 -420
- package/.agy/skills/odyssey-review-test-fix/SKILL.md +386 -251
- package/.agy/skills/odyssey-ui/SKILL.md +382 -247
- package/.agy/skills/quality-auto-test/SKILL.md +12 -0
- package/.agy/skills/quality-debug/SKILL.md +11 -0
- package/.agy/skills/quality-refactor/SKILL.md +11 -0
- package/.agy/skills/quality-retrospective/SKILL.md +11 -0
- package/.agy/skills/quality-review/SKILL.md +11 -0
- package/.agy/skills/quality-sync/SKILL.md +10 -0
- package/.agy/skills/quality-test/SKILL.md +12 -0
- package/.agy/skills/security-audit/SKILL.md +11 -0
- package/.agy/skills/spec-add/SKILL.md +27 -0
- package/.agy/skills/spec-load/SKILL.md +25 -0
- package/.agy/skills/spec-remove/SKILL.md +26 -0
- package/.agy/skills/spec-setup/SKILL.md +30 -0
- package/.claude/agents/ralph-executor.md +51 -6
- package/.claude/commands/domain-add.md +9 -0
- package/.claude/commands/learn-decompose.md +12 -0
- package/.claude/commands/learn-follow.md +41 -0
- package/.claude/commands/learn-investigate.md +14 -0
- package/.claude/commands/learn-second-opinion.md +14 -0
- package/.claude/commands/maestro-amend.md +11 -0
- package/.claude/commands/maestro-companion.md +11 -0
- package/.claude/commands/maestro-composer.md +11 -0
- package/.claude/commands/maestro-guard.md +25 -0
- package/.claude/commands/maestro-init.md +28 -0
- package/.claude/commands/maestro-overlay.md +11 -0
- package/.claude/commands/maestro-player.md +11 -0
- package/.claude/commands/maestro-quick.md +29 -0
- package/.claude/commands/maestro-ralph-v2.md +124 -61
- package/.claude/commands/maestro-swarm-workflow.md +25 -0
- package/.claude/commands/maestro-tools-execute.md +29 -0
- package/.claude/commands/maestro-tools-register.md +29 -0
- package/.claude/commands/maestro-ui-codify.md +11 -0
- package/.claude/commands/maestro-universal-workflow.md +59 -0
- package/.claude/commands/maestro-update.md +38 -0
- package/.claude/commands/manage-codebase-rebuild.md +29 -0
- package/.claude/commands/manage-drift-realign.md +12 -0
- package/.claude/commands/manage-harvest.md +30 -6
- package/.claude/commands/manage-issue-discover.md +28 -0
- package/.claude/commands/manage-issue.md +23 -0
- package/.claude/commands/manage-kg-extractors.md +27 -1
- package/.claude/commands/manage-knowhow-capture.md +24 -0
- package/.claude/commands/manage-knowhow.md +26 -0
- package/.claude/commands/manage-knowledge-audit.md +13 -0
- package/.claude/commands/manage-status.md +22 -0
- package/.claude/commands/manage-wiki.md +28 -0
- package/.claude/commands/odyssey-debug.md +352 -267
- package/.claude/commands/odyssey-improve.md +431 -295
- package/.claude/commands/odyssey-planex.md +550 -434
- package/.claude/commands/odyssey-review-test-fix.md +400 -265
- package/.claude/commands/odyssey-ui.md +396 -261
- package/.claude/commands/quality-auto-test.md +12 -0
- package/.claude/commands/quality-debug.md +11 -0
- package/.claude/commands/quality-refactor.md +11 -0
- package/.claude/commands/quality-retrospective.md +11 -0
- package/.claude/commands/quality-review.md +11 -0
- package/.claude/commands/quality-sync.md +10 -0
- package/.claude/commands/quality-test.md +12 -0
- package/.claude/commands/security-audit.md +11 -0
- package/.claude/commands/spec-add.md +27 -0
- package/.claude/commands/spec-load.md +25 -0
- package/.claude/commands/spec-remove.md +26 -0
- package/.claude/commands/spec-setup.md +30 -0
- package/.codex/skills/codify-to-knowhow/SKILL.md +2 -0
- package/.codex/skills/domain-add/SKILL.md +26 -0
- package/.codex/skills/domain-discover/SKILL.md +46 -0
- package/.codex/skills/domain-list/SKILL.md +29 -0
- package/.codex/skills/learn-decompose/SKILL.md +2 -0
- package/.codex/skills/learn-follow/SKILL.md +34 -0
- package/.codex/skills/learn-investigate/SKILL.md +33 -0
- package/.codex/skills/learn-retro/SKILL.md +33 -0
- package/.codex/skills/learn-second-opinion/SKILL.md +30 -0
- package/.codex/skills/maestro-amend/SKILL.md +11 -0
- package/.codex/skills/maestro-companion/SKILL.md +11 -0
- package/.codex/skills/maestro-composer/SKILL.md +11 -0
- package/.codex/skills/maestro-guard/SKILL.md +25 -0
- package/.codex/skills/maestro-help/SKILL.md +2 -0
- package/.codex/skills/maestro-init/SKILL.md +16 -0
- package/.codex/skills/maestro-learn/SKILL.md +2 -0
- package/.codex/skills/maestro-overlay/SKILL.md +1 -0
- package/.codex/skills/maestro-player/SKILL.md +2 -0
- package/.codex/skills/maestro-quick/SKILL.md +17 -0
- package/.codex/skills/maestro-tools-execute/SKILL.md +31 -0
- package/.codex/skills/maestro-tools-register/SKILL.md +29 -0
- package/.codex/skills/maestro-ui-codify/SKILL.md +2 -0
- package/.codex/skills/maestro-update/SKILL.md +38 -0
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -0
- package/.codex/skills/manage-codebase-refresh/SKILL.md +11 -0
- package/.codex/skills/manage-drift-realign/SKILL.md +2 -0
- package/.codex/skills/manage-harvest/SKILL.md +30 -8
- package/.codex/skills/manage-issue/SKILL.md +24 -0
- package/.codex/skills/manage-issue-discover/SKILL.md +2 -0
- package/.codex/skills/manage-knowhow/SKILL.md +26 -0
- package/.codex/skills/manage-knowhow-capture/SKILL.md +23 -0
- package/.codex/skills/manage-learn/SKILL.md +2 -0
- package/.codex/skills/manage-status/SKILL.md +22 -0
- package/.codex/skills/manage-wiki/SKILL.md +28 -0
- package/.codex/skills/odyssey-debug/SKILL.md +44 -0
- package/.codex/skills/odyssey-improve/SKILL.md +49 -0
- package/.codex/skills/odyssey-planex/SKILL.md +44 -0
- package/.codex/skills/odyssey-review-test-fix/SKILL.md +48 -0
- package/.codex/skills/odyssey-ui/SKILL.md +49 -0
- package/.codex/skills/quality-auto-test/SKILL.md +2 -0
- package/.codex/skills/quality-debug/SKILL.md +2 -0
- package/.codex/skills/quality-refactor/SKILL.md +2 -0
- package/.codex/skills/quality-retrospective/SKILL.md +2 -0
- package/.codex/skills/quality-review/SKILL.md +2 -0
- package/.codex/skills/quality-sync/SKILL.md +24 -0
- package/.codex/skills/quality-test/SKILL.md +2 -0
- package/.codex/skills/security-audit/SKILL.md +30 -0
- package/.codex/skills/spec-add/SKILL.md +28 -0
- package/.codex/skills/spec-load/SKILL.md +26 -0
- package/.codex/skills/spec-map/SKILL.md +1 -0
- package/.codex/skills/spec-remove/SKILL.md +28 -0
- package/.codex/skills/spec-setup/SKILL.md +28 -0
- package/.codex/skills/wiki-connect/SKILL.md +11 -0
- package/.codex/skills/wiki-digest/SKILL.md +11 -0
- package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js +3 -1
- package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +28 -4
- 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 +10 -0
- package/dashboard/dist-server/src/graph/kg/db/queries.js +176 -38
- 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 +20 -12
- 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 +67 -1
- package/dist/src/agents/api-explore/config.d.ts.map +1 -1
- package/dist/src/agents/api-explore/config.js +50 -15
- package/dist/src/agents/api-explore/config.js.map +1 -1
- package/dist/src/agents/api-explore/index.js +4 -4
- package/dist/src/agents/api-explore/index.js.map +1 -1
- package/dist/src/agents/api-explore/llm.d.ts +7 -1
- package/dist/src/agents/api-explore/llm.d.ts.map +1 -1
- package/dist/src/agents/api-explore/llm.js +26 -12
- 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 +39 -18
- 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 +34 -2
- package/dist/src/commands/explore.js.map +1 -1
- package/dist/src/commands/install.js +7 -28
- package/dist/src/commands/install.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 +217 -0
- package/dist/src/commands/moa.js.map +1 -0
- package/dist/src/commands/search.d.ts.map +1 -1
- package/dist/src/commands/search.js +2 -0
- package/dist/src/commands/search.js.map +1 -1
- package/dist/src/graph/kg/db/queries.d.ts +10 -0
- package/dist/src/graph/kg/db/queries.d.ts.map +1 -1
- package/dist/src/graph/kg/db/queries.js +176 -38
- 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.d.ts.map +1 -1
- package/dist/src/graph/kg/extraction/orchestrator.js +20 -12
- 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/plugins/explore-plugin.d.ts.map +1 -1
- package/dist/src/hooks/plugins/explore-plugin.js +3 -2
- package/dist/src/hooks/plugins/explore-plugin.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ralph-executor
|
|
3
|
-
description: Single-step executor — ralph next + inline skill execution,
|
|
3
|
+
description: Single-step executor — ralph next + inline skill execution, multi-agent orchestration via SendMessage
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- read_file
|
|
6
6
|
- write_file
|
|
@@ -9,6 +9,8 @@ allowed-tools:
|
|
|
9
9
|
- find_files
|
|
10
10
|
- search
|
|
11
11
|
- invoke_skill
|
|
12
|
+
- delegate_subagent
|
|
13
|
+
- send_message
|
|
12
14
|
---
|
|
13
15
|
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
14
16
|
|
|
@@ -17,18 +19,43 @@ allowed-tools:
|
|
|
17
19
|
|
|
18
20
|
## Role
|
|
19
21
|
|
|
20
|
-
Single-step skill executor. Call `maestro ralph next` to load the skill prompt, execute it inline, return execution output. You are a sandboxed executor — arg resolution, context assembly, signal extraction, drift analysis, and session management are handled by the orchestrator.
|
|
22
|
+
Single-step skill executor with multi-agent orchestration capability. Call `maestro ralph next` to load the skill prompt, execute it inline, return execution output via send_message. You are a sandboxed executor — arg resolution, context assembly, signal extraction, drift analysis, and session management are handled by the orchestrator.
|
|
21
23
|
|
|
22
24
|
## Process
|
|
23
25
|
|
|
26
|
+
**立即自启动**:你是 named mailbox teammate。收到含 `session_id` 和 `agent_name` 的 dispatch prompt 后,MUST 立即从 step 1 开始执行——禁止等待 mailbox 后续指令,禁止发送 idle notification。
|
|
27
|
+
|
|
24
28
|
1. Call `shell("maestro ralph next --session {session_id}")` — **全量捕获 stdout,严禁截断管道**
|
|
25
29
|
- Exit 0 → skill_prompt = stdout,继续执行
|
|
26
|
-
- Exit 1 →
|
|
27
|
-
- Exit 2 →
|
|
28
|
-
- Exit 3 →
|
|
30
|
+
- Exit 1 → send_message 错误信息给 main,结束
|
|
31
|
+
- Exit 2 → send_message "所有 step 已完成" 给 main,结束
|
|
32
|
+
- Exit 3 → send_message "并发冲突" 给 main,结束
|
|
29
33
|
2. Execute the skill prompt inline — follow all instructions faithfully
|
|
30
34
|
3. Handle `<deferred_reading>` paths: Read files on demand during execution, do not batch-load upfront
|
|
31
|
-
4.
|
|
35
|
+
4. send_message({to: "main"}) 返回执行产物路径 + 摘要
|
|
36
|
+
|
|
37
|
+
## Multi-Agent Orchestration
|
|
38
|
+
|
|
39
|
+
当 skill prompt 需要多 agent 编排时(如 `maestro-execute` 的 wave 并行派发):
|
|
40
|
+
|
|
41
|
+
1. **派发 named worker**:调用 `delegate_subagent({name})` 派发 worker 为 named teammate,确保长时间任务存活:
|
|
42
|
+
```
|
|
43
|
+
worker name 格式: {agent_name}-w{index}(如 exe-v2-001-w1, exe-v2-001-w2)
|
|
44
|
+
```
|
|
45
|
+
> **必须传 name**:匿名 agent 执行完当前任务会 came to rest(死亡),后台任务完成通知无法唤醒。Named teammate 只会 idle,可被后台任务通知或 send_message 唤醒。
|
|
46
|
+
2. **等待结果**:worker 通过 send_message 回传结果到 executor 的 mailbox
|
|
47
|
+
3. **收集汇总**:接收所有 worker 的 send_message,汇总执行结果
|
|
48
|
+
4. **回报主流程**:通过 `send_message({to: "main"})` 返回最终执行输出
|
|
49
|
+
|
|
50
|
+
### Worker Dispatch Template
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
delegate_subagent({
|
|
54
|
+
name: "{agent_name}-w{index}",
|
|
55
|
+
description: "执行子任务: {task_description}",
|
|
56
|
+
prompt: "你是 worker agent。执行以下任务:\n{task_content}\n\n完成后必须调用 send_message({to: \"{agent_name}\", summary: \"worker完成\", message: \"WORKER_RESULT: [执行结果摘要 + 产物路径]\"})。"
|
|
57
|
+
})
|
|
58
|
+
```
|
|
32
59
|
|
|
33
60
|
## Input
|
|
34
61
|
|
|
@@ -37,12 +64,30 @@ Single-step skill executor. Call `maestro ralph next` to load the skill prompt,
|
|
|
37
64
|
| Field | Required | Description |
|
|
38
65
|
|-------|----------|-------------|
|
|
39
66
|
| `session_id` | Yes | ralph session ID |
|
|
67
|
+
| `agent_name` | Yes | 本 agent 的 name,用于 sub-agent send_message 回传 |
|
|
40
68
|
| execution context | No | 编排器注入的上下文(intent、boundary、goals、prior steps 等) |
|
|
41
69
|
|
|
70
|
+
## Output
|
|
71
|
+
|
|
72
|
+
通过 `send_message({to: "main"})` 返回,格式:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
EXECUTOR_OUTPUT:
|
|
76
|
+
- status: DONE|DONE_WITH_CONCERNS|ERROR
|
|
77
|
+
- summary: <执行摘要>
|
|
78
|
+
- artifacts: <产物路径列表>
|
|
79
|
+
- concerns: <关注点,仅 DONE_WITH_CONCERNS 时>
|
|
80
|
+
- error: <错误信息,仅 ERROR 时>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
失败时也必须 send_message,禁止静默崩溃。
|
|
84
|
+
|
|
42
85
|
## Constraints
|
|
43
86
|
|
|
87
|
+
- 禁止无故空转——收到 session_id 即开始执行,不等待编排器的后续 mailbox 指令。等待 worker send_message 回传期间的 idle 是正常行为(平台自动触发 idle_notification,不可抑制)
|
|
44
88
|
- Execute exactly one step per invocation
|
|
45
89
|
- Do not call `maestro ralph complete` — completion is handled by the orchestrator
|
|
46
90
|
- Do not read or modify `status.json` — session management is the orchestrator's responsibility
|
|
47
91
|
- Do not skip execution steps or short-circuit — execute the full skill content
|
|
48
92
|
- Do not insert/delete/reorder steps or evaluate decision nodes
|
|
93
|
+
- 所有执行结果必须通过 send_message({to: "main"}) 回报,直接文本输出主流程看不到
|
|
@@ -39,6 +39,15 @@ Domain term lifecycle: discover/manual → register → active → (optional) de
|
|
|
39
39
|
- `maestro domain deprecate <canonical> --successor <new>` — deprecate a term
|
|
40
40
|
</context>
|
|
41
41
|
|
|
42
|
+
<invariants>
|
|
43
|
+
1. **Single-term atomic operation** — each invocation registers exactly ONE term; NEVER batch-write multiple terms in a single execution
|
|
44
|
+
2. **Glossary append-only** — existing terms in `glossary.yaml` SHALL NOT be modified or removed; only new entries are appended
|
|
45
|
+
3. **Duplicate guard** — MUST check for exact canonical name match AND near-matches before writing; NEVER create duplicate entries
|
|
46
|
+
4. **Confirmation mandatory** — MUST present term details (canonical, definition, aliases, tier, path) via ask_user before any glossary write; NEVER write without user confirmation
|
|
47
|
+
5. **Schema compliance** — every term entry MUST include canonical name, definition, tier, and at least one alias/keyword; incomplete entries SHALL NOT be persisted
|
|
48
|
+
6. **Domain directory prerequisite** — `.workflow/domain/` MUST exist before writing; NEVER auto-create the directory (E002 if missing)
|
|
49
|
+
</invariants>
|
|
50
|
+
|
|
42
51
|
<execution>
|
|
43
52
|
Follow '~/.maestro/workflows/domain-add.md' completely.
|
|
44
53
|
|
|
@@ -30,8 +30,19 @@ $ARGUMENTS — target path/module and optional flags.
|
|
|
30
30
|
|
|
31
31
|
**Storage read**: target files + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
|
|
32
32
|
**Storage write**: `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
|
|
33
|
+
|
|
34
|
+
**Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
|
|
33
35
|
</context>
|
|
34
36
|
|
|
37
|
+
<invariants>
|
|
38
|
+
1. **Read-only analysis** — NEVER modify source code files under analysis; all writes go to `.workflow/` only
|
|
39
|
+
2. **Evidence-anchored findings** — every pattern MUST include at least one `file:line` anchor from source; unanchored patterns SHALL NOT be persisted
|
|
40
|
+
3. **Dedup before persist** — MUST cross-reference against existing `learnings.md` and `coding-conventions.md` before writing; duplicate entries SHALL NOT be appended
|
|
41
|
+
4. **Parallel agent isolation** — each dimension agent operates independently; NEVER share state between agents during analysis
|
|
42
|
+
5. **Confirmation gate** — unless `-y` is set, MUST present all findings and target files via ask_user before any writes
|
|
43
|
+
6. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
|
|
44
|
+
</invariants>
|
|
45
|
+
|
|
35
46
|
<state_machine>
|
|
36
47
|
|
|
37
48
|
<states>
|
|
@@ -102,6 +113,7 @@ Flag contradictions (finding conflicts with documented convention). Merge duplic
|
|
|
102
113
|
<error_codes>
|
|
103
114
|
| Code | Condition | Recovery |
|
|
104
115
|
|------|-----------|----------|
|
|
116
|
+
| E001 | No target path/module provided | Prompt user for target |
|
|
105
117
|
| E002 | No source files in target | Check target has .ts/.js files |
|
|
106
118
|
| W001 | One+ dimension agent failed | Proceed with available dimensions |
|
|
107
119
|
| W002 | .workflow/specs/learnings.md missing or malformed | Treat all patterns as new; create file on persist |
|
|
@@ -35,8 +35,46 @@ $ARGUMENTS — target and optional flags.
|
|
|
35
35
|
|
|
36
36
|
**Storage read**: target file + wiki forward/backlinks + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
|
|
37
37
|
**Storage write**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
|
|
38
|
+
|
|
39
|
+
**Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-follow-{slug}-{date}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
|
|
38
40
|
</context>
|
|
39
41
|
|
|
42
|
+
<invariants>
|
|
43
|
+
1. **Read-only traversal** — NEVER modify source code or wiki entries under analysis; all writes go to `.workflow/` only
|
|
44
|
+
2. **Forcing questions mandatory** — each section MUST have all 4 forcing questions applied; NEVER skip questions even for trivial sections
|
|
45
|
+
3. **Anchor requirement** — every extracted pattern MUST include a `file:line` anchor; unanchored patterns SHALL NOT be persisted to learnings.md
|
|
46
|
+
4. **Convention cross-ref** — MUST check every finding against `coding-conventions.md` and mark status (documented/candidate); NEVER persist without status tag
|
|
47
|
+
5. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
|
|
48
|
+
6. **Confirmation gate** — unless `-y` is set, MUST present findings and target files via ask_user before any writes
|
|
49
|
+
7. **Depth contract** — `--depth shallow` MUST NOT descend into function bodies; `--depth deep` MUST cover every branch and sub-expression
|
|
50
|
+
</invariants>
|
|
51
|
+
|
|
52
|
+
<execution>
|
|
53
|
+
|
|
54
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
55
|
+
|
|
56
|
+
**GATE 1: Resolve → Context Building** (S_RESOLVE → S_CONTEXT)
|
|
57
|
+
- REQUIRED: Target resolved to a readable source (file path, wiki entry, or search result).
|
|
58
|
+
- BLOCKED if: target unresolvable after user prompt (E001/E002).
|
|
59
|
+
|
|
60
|
+
**GATE 2: Reading → Extraction** (S_READ → S_EXTRACT)
|
|
61
|
+
- REQUIRED: All sections traversed with 4 forcing questions applied per section.
|
|
62
|
+
- REQUIRED: Depth contract honored — shallow stays at top-level, deep covers every branch.
|
|
63
|
+
- BLOCKED if: any section skipped without forcing questions.
|
|
64
|
+
|
|
65
|
+
**GATE 3: Extraction → Persistence** (S_EXTRACT → S_PERSIST)
|
|
66
|
+
- REQUIRED: All extracted patterns have file:line anchors.
|
|
67
|
+
- REQUIRED: Convention cross-ref completed against coding-conventions.md (or marked "unknown status" if W002).
|
|
68
|
+
- BLOCKED if: unanchored patterns remain in extraction results.
|
|
69
|
+
|
|
70
|
+
**GATE 4: Persistence → Completion** (S_PERSIST → END)
|
|
71
|
+
- REQUIRED: Unless `-y`, ask_user showing files to write and spec-entries to append — user must confirm.
|
|
72
|
+
- REQUIRED: KNW-follow-{slug}-{date}.md written with understanding map.
|
|
73
|
+
- REQUIRED: learnings.md appended (not overwritten) with new spec-entry blocks.
|
|
74
|
+
- BLOCKED if: user declines confirmation — offer to adjust findings before retry.
|
|
75
|
+
|
|
76
|
+
</execution>
|
|
77
|
+
|
|
40
78
|
<state_machine>
|
|
41
79
|
|
|
42
80
|
<states>
|
|
@@ -114,6 +152,9 @@ Write understanding map: Key Concepts, Patterns (table: name/location/convention
|
|
|
114
152
|
<error_codes>
|
|
115
153
|
| Code | Condition | Recovery |
|
|
116
154
|
|------|-----------|----------|
|
|
155
|
+
| E001 | No target path/wiki-id/topic provided | Prompt user for target |
|
|
156
|
+
| E002 | Target path not found and wiki/grep search returned no results | Check path or broaden search terms |
|
|
157
|
+
| W001 | Wiki forward/backlinks unavailable | Proceed without context web; note reduced coverage |
|
|
117
158
|
| W002 | coding-conventions.md not found | All patterns marked "unknown status" |
|
|
118
159
|
| W003 | Target > 1000 lines | Auto-switch to shallow; use --depth deep to override |
|
|
119
160
|
</error_codes>
|
|
@@ -33,8 +33,20 @@ $ARGUMENTS — question text and optional flags.
|
|
|
33
33
|
- `.workflow/specs/learnings.md` — appended `<spec-entry>` blocks
|
|
34
34
|
|
|
35
35
|
**Storage read**: source files in scope + `maestro search` + `.workflow/specs/learnings.md` + `debug-notes.md` + `codebase/architecture.md`
|
|
36
|
+
|
|
37
|
+
**Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-investigate-{slug}/` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
|
|
36
38
|
</context>
|
|
37
39
|
|
|
40
|
+
<invariants>
|
|
41
|
+
1. **Read-only investigation** — NEVER modify source code files; all writes go to `.workflow/` only
|
|
42
|
+
2. **Evidence append-only** — `evidence.ndjson` MUST be appended line-by-line; NEVER overwrite or truncate existing evidence entries
|
|
43
|
+
3. **Scope lock** — once `--scope` is resolved in S_FRAME, NEVER expand search scope without explicit user confirmation via S_ESCALATE
|
|
44
|
+
4. **Hypothesis cap** — MUST NOT generate more than `--max-hypotheses` (default 3) before triggering escalation; NEVER silently exceed the cap
|
|
45
|
+
5. **Structured evidence format** — every evidence entry MUST include `{ts, type, source, relevance, content, note}`; incomplete entries SHALL NOT be appended
|
|
46
|
+
6. **3-strike escalation** — after all hypotheses fail, MUST escalate to user via ask_user; NEVER silently conclude as INCONCLUSIVE without user interaction
|
|
47
|
+
7. **Confirmation gate** — unless `-y` is set, MUST present report.md path and spec-entries via ask_user before final writes
|
|
48
|
+
</invariants>
|
|
49
|
+
|
|
38
50
|
<state_machine>
|
|
39
51
|
|
|
40
52
|
<states>
|
|
@@ -136,7 +148,9 @@ Append to .workflow/specs/learnings.md: confirmed → roles="implement", disprov
|
|
|
136
148
|
<error_codes>
|
|
137
149
|
| Code | Condition | Recovery |
|
|
138
150
|
|------|-----------|----------|
|
|
151
|
+
| E001 | No question text provided | Prompt user for investigation question |
|
|
139
152
|
| E002 | --scope path not found | Check path |
|
|
153
|
+
| W001 | Prior knowledge search returned no results | Proceed without prior context; note cold-start |
|
|
140
154
|
| W002 | Very few evidence matches (<3) | Broaden search terms or expand scope |
|
|
141
155
|
| W003 | All hypotheses inconclusive | Investigation marked INCONCLUSIVE |
|
|
142
156
|
</error_codes>
|
|
@@ -36,8 +36,19 @@ $ARGUMENTS — target and optional mode flag.
|
|
|
36
36
|
**Pre-load** (optional): `invoke_skill("spec-load")` for conventions + `maestro search "<target topic>"` for related entries.
|
|
37
37
|
|
|
38
38
|
**Output**: `.workflow/knowhow/KNW-opinion-{slug}-{YYYY-MM-DD}.md`
|
|
39
|
+
|
|
40
|
+
**Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-opinion-{slug}-{YYYY-MM-DD}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
|
|
39
41
|
</context>
|
|
40
42
|
|
|
43
|
+
<invariants>
|
|
44
|
+
1. **Read-only analysis** — NEVER modify source code, wiki entries, or plan files under review; all writes go to `.workflow/` only
|
|
45
|
+
2. **Agent independence** — in review mode, each of the 3 agents (Pragmatist/Purist/Strategist) MUST operate independently without shared state; NEVER pass one agent's findings to another
|
|
46
|
+
3. **Evidence-backed verdicts** — every finding MUST include a `location` reference (file:line or section); ungrounded opinions SHALL NOT appear in the report
|
|
47
|
+
4. **Mode contract** — MUST execute exactly the mode specified (review/challenge/consult); NEVER mix mode behaviors within a single execution
|
|
48
|
+
5. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
|
|
49
|
+
6. **Confirmation gate** — unless `-y` is set, MUST present findings and target files via ask_user before any writes
|
|
50
|
+
</invariants>
|
|
51
|
+
|
|
41
52
|
<state_machine>
|
|
42
53
|
|
|
43
54
|
<states>
|
|
@@ -106,8 +117,11 @@ Interactive loop:
|
|
|
106
117
|
<error_codes>
|
|
107
118
|
| Code | Condition | Recovery |
|
|
108
119
|
|------|-----------|----------|
|
|
120
|
+
| E001 | No target provided | Prompt user for target (path, wiki ID, HEAD, staged, or phase) |
|
|
109
121
|
| E002 | Unknown --mode value | Use: review, challenge, or consult |
|
|
122
|
+
| E003 | Target resolution failed — path not found, wiki ID invalid, or no staged changes | Check target exists |
|
|
110
123
|
| W001 | One review agent failed | Proceed with available perspectives |
|
|
124
|
+
| W002 | Specs/wiki pre-load unavailable | Proceed without convention context; note reduced coverage |
|
|
111
125
|
</error_codes>
|
|
112
126
|
|
|
113
127
|
<success_criteria>
|
|
@@ -42,8 +42,19 @@ Multiple combinable. No flags + no description → interactive (scan + ask_user)
|
|
|
42
42
|
**CLI targeting**: `"cli": "claude"` (default, patches .claude/commands/), `"codex"` (patches .codex/skills/), `"both"` (both paths)
|
|
43
43
|
|
|
44
44
|
**Output**: `~/.maestro/overlays/amend-{slug}.json` + optional `~/.maestro/overlays/docs/amend-{slug}.md`
|
|
45
|
+
|
|
46
|
+
**Output boundary**: ALL file writes MUST target `~/.maestro/overlays/` (overlay JSON + docs) only. NEVER modify `.claude/commands/*.md` directly — overlay installation is handled by `maestro overlay add`.
|
|
45
47
|
</context>
|
|
46
48
|
|
|
49
|
+
<invariants>
|
|
50
|
+
1. **Non-invasive only** — amendments MUST use the overlay system (`~/.maestro/overlays/*.json`); direct edits to `.claude/commands/*.md` are NEVER permitted
|
|
51
|
+
2. **Idempotent patches** — re-running the same amendment MUST produce identical overlay JSON; overlay markers prevent duplicate injection
|
|
52
|
+
3. **Pristine source reads** — signal diagnosis MUST read from `$PKG_ROOT/.claude/commands/` (untouched originals), not installed copies
|
|
53
|
+
4. **Code bugs excluded** — signals classified as code bugs MUST be routed to `/maestro-quick` or `/maestro-plan --gaps`, NEVER patched via overlay
|
|
54
|
+
5. **User confirmation before install** — overlay JSON MUST be previewed and confirmed by the user before `maestro overlay add` runs (unless `-y`)
|
|
55
|
+
6. **Section existence verified** — target section MUST be confirmed to exist in the pristine source before drafting a patch; missing sections trigger `new-section` mode
|
|
56
|
+
</invariants>
|
|
57
|
+
|
|
47
58
|
<state_machine>
|
|
48
59
|
|
|
49
60
|
<states>
|
|
@@ -50,12 +50,23 @@ $ARGUMENTS — mode + optional flags.
|
|
|
50
50
|
|
|
51
51
|
Auto-detection: if `--type` not provided, infer from `--task` description keywords.
|
|
52
52
|
|
|
53
|
+
**Output boundary**: ALL file writes MUST target `.workflow/.scratchpad/` (companion docs + `.companion-active` pointer) only. Promotion writes (spec/knowhow) are delegated to `spec-add` / `manage-knowhow-capture` skills. NEVER modify source code, `.workflow/state.json`, or files outside `.workflow/.scratchpad/`.
|
|
54
|
+
|
|
53
55
|
**Companion document:**
|
|
54
56
|
- Path: `.workflow/.scratchpad/companion-{YYYYMMDD-HHmmss}.md`
|
|
55
57
|
- Active doc tracking: `.workflow/.scratchpad/.companion-active` (stores path of current companion doc)
|
|
56
58
|
- Format: YAML frontmatter (rich metadata) + typed sections + timestamped entries
|
|
57
59
|
</context>
|
|
58
60
|
|
|
61
|
+
<invariants>
|
|
62
|
+
1. **No session creation** — companion NEVER creates workflow sessions, NEVER writes to state.json
|
|
63
|
+
2. **Side-car only** — companion MUST NOT modify source code or execute implementation tasks; it is strictly a knowledge loading + recording utility
|
|
64
|
+
3. **One active doc** — only one `.companion-active` pointer SHALL exist at a time; creating a new companion doc MUST clear any stale pointer
|
|
65
|
+
4. **Append-only entries** — note mode MUST append entries; NEVER overwrite or reorder existing entries
|
|
66
|
+
5. **Promotion via delegation** — spec/knowhow promotion MUST route through `spec-add` / `manage-knowhow-capture` skills; companion NEVER writes directly to `.workflow/specs/` or `.workflow/knowhow/`
|
|
67
|
+
6. **Type-template integrity** — context template sections MUST match the resolved `task_type`; NEVER mix templates from different types
|
|
68
|
+
</invariants>
|
|
69
|
+
|
|
59
70
|
<state_machine>
|
|
60
71
|
|
|
61
72
|
<states>
|
|
@@ -41,8 +41,19 @@ $ARGUMENTS — natural language description, or flags.
|
|
|
41
41
|
1. **Architecture specs**: Run `maestro load --type spec --category arch` to load architecture constraints. Use as context for node resolution — ensures workflow design respects documented patterns.
|
|
42
42
|
2. **Coding specs**: Run `maestro load --type spec --category coding` to load coding conventions. Informs executor argument defaults and context injection.
|
|
43
43
|
3. Optional — proceed without if unavailable.
|
|
44
|
+
|
|
45
|
+
**Output boundary**: ALL file writes MUST target `~/.maestro/templates/workflows/` (template JSON + index.json) and `.workflow/templates/design-drafts/` (intermediate drafts) only. NEVER modify source code or `.claude/commands/` files.
|
|
44
46
|
</context>
|
|
45
47
|
|
|
48
|
+
<invariants>
|
|
49
|
+
1. **Max 20 nodes** — workflow templates MUST NOT exceed 20 nodes; larger workflows MUST be split into sub-workflows
|
|
50
|
+
2. **Acyclic DAG** — generated template MUST be a directed acyclic graph; cycles MUST be detected and rejected before persistence
|
|
51
|
+
3. **No orphan nodes** — every node MUST be reachable from at least one edge; unreachable nodes MUST be flagged
|
|
52
|
+
4. **Confirmation before write** — template JSON MUST be shown to user via ask_user before writing to `~/.maestro/templates/workflows/`; cancellation saves draft only
|
|
53
|
+
5. **Draft preservation** — abandoning at any confirmation gate MUST save current progress to design-drafts directory; NEVER discard user's partial work
|
|
54
|
+
6. **Deferred reading only** — node-catalog and template-schema MUST be read at their designated phases (P2, P5), NEVER loaded eagerly at startup
|
|
55
|
+
</invariants>
|
|
56
|
+
|
|
46
57
|
<state_machine>
|
|
47
58
|
|
|
48
59
|
<states>
|
|
@@ -32,10 +32,35 @@ $ARGUMENTS — Parse subcommand and optional path argument.
|
|
|
32
32
|
|
|
33
33
|
**Enforcement:** The `workflow-guard` hook (PreToolUse on Write/Edit) reads this config
|
|
34
34
|
and blocks operations targeting files outside boundaries. Requires hooks level >= `full`.
|
|
35
|
+
|
|
36
|
+
**Output boundary**: ALL file writes MUST target `.workflow/config.json` (guard section) only. NEVER modify hook files, `.claude/settings.json`, or source code.
|
|
35
37
|
</context>
|
|
36
38
|
|
|
39
|
+
<invariants>
|
|
40
|
+
1. **Config-only mutation** — guard MUST only modify the `guard` section of `.workflow/config.json`; NEVER touch other config sections or files
|
|
41
|
+
2. **Non-destructive** — `off` MUST preserve existing paths and mode; NEVER clear the path list when disabling
|
|
42
|
+
3. **Mode switch confirmation** — switching between allow/deny mode MUST require ask_user confirmation when existing paths will be cleared
|
|
43
|
+
4. **Hook dependency** — guard MUST warn when enabled but `workflow-guard` hook is not active (hooks level < full)
|
|
44
|
+
5. **Path normalization** — all paths MUST use forward slashes with trailing slash for directories; NEVER store raw backslash paths
|
|
45
|
+
</invariants>
|
|
46
|
+
|
|
37
47
|
<execution>
|
|
38
48
|
|
|
49
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
50
|
+
|
|
51
|
+
**GATE 1: Parse → Config Read**
|
|
52
|
+
- REQUIRED: Subcommand parsed (on/off/status/allow/deny) or defaulted to `status`.
|
|
53
|
+
- BLOCKED if: invalid subcommand provided.
|
|
54
|
+
|
|
55
|
+
**GATE 2: Config Read → Execute**
|
|
56
|
+
- REQUIRED: `.workflow/config.json` read successfully or initialized with empty guard section.
|
|
57
|
+
- BLOCKED if: file unreadable and cannot be created (E001).
|
|
58
|
+
|
|
59
|
+
**GATE 3: Execute → Confirm**
|
|
60
|
+
- REQUIRED: Config mutation applied (for on/off/allow/deny) or status displayed (for status).
|
|
61
|
+
- REQUIRED: Mode-switch ask_user answered (for allow↔deny transitions with existing paths).
|
|
62
|
+
- BLOCKED if: user declines mode switch.
|
|
63
|
+
|
|
39
64
|
**Step 1: Parse subcommand**
|
|
40
65
|
|
|
41
66
|
Extract from $ARGUMENTS:
|
|
@@ -40,8 +40,18 @@ $ARGUMENTS — none for interactive mode, or `-y` with `@file` reference for aut
|
|
|
40
40
|
|
|
41
41
|
**Load project state if exists:**
|
|
42
42
|
Check for `.workflow/state.json` -- loads context if project already initialized.
|
|
43
|
+
|
|
44
|
+
**Output boundary**: ALL file writes MUST target `.workflow/` (project.md, state.json, config.json, specs/) only. NEVER modify source code or files outside `.workflow/`.
|
|
43
45
|
</context>
|
|
44
46
|
|
|
47
|
+
<invariants>
|
|
48
|
+
1. **Idempotent init** — re-running init on an already-initialized project MUST detect existing `.workflow/` and warn (E002); NEVER silently overwrite existing state
|
|
49
|
+
2. **Scope guard** — init MUST only make initialization decisions; NEVER prejudge roadmap structure, plan scope, or implementation details
|
|
50
|
+
3. **All artifacts required** — init MUST NOT report completion until project.md, state.json, and config.json all exist; missing artifacts MUST be created before exit
|
|
51
|
+
4. **Template-driven** — deferred templates (project.md, state.json, config.json) MUST be read from `~/.maestro/templates/` and customized; NEVER generate from scratch without template
|
|
52
|
+
5. **Interview writes back** — all interactive decisions MUST be written to project.md/config.json before proceeding to research or completion; NEVER leave decisions unrecorded
|
|
53
|
+
</invariants>
|
|
54
|
+
|
|
45
55
|
<interview_protocol>
|
|
46
56
|
Follows @~/.maestro/workflows/interview-mechanics.md standard.
|
|
47
57
|
|
|
@@ -54,6 +64,24 @@ Follows @~/.maestro/workflows/interview-mechanics.md standard.
|
|
|
54
64
|
</interview_protocol>
|
|
55
65
|
|
|
56
66
|
<execution>
|
|
67
|
+
|
|
68
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
69
|
+
|
|
70
|
+
**GATE 1: Pre-flight → Interview**
|
|
71
|
+
- REQUIRED: `.workflow/` existence check completed.
|
|
72
|
+
- REQUIRED: `--from` source validated (if provided).
|
|
73
|
+
- BLOCKED if: E002 (greenfield conflict with existing `.workflow/`) unresolved.
|
|
74
|
+
|
|
75
|
+
**GATE 2: Interview → Research**
|
|
76
|
+
- REQUIRED: All interview decisions recorded in project.md and config.json.
|
|
77
|
+
- REQUIRED: `.workflow/` directory created with initial structure.
|
|
78
|
+
- BLOCKED if: interview decisions not yet written to files.
|
|
79
|
+
|
|
80
|
+
**GATE 3: Research → Completion**
|
|
81
|
+
- REQUIRED: All 3 required artifacts exist (project.md, state.json, config.json).
|
|
82
|
+
- REQUIRED: `.workflow/specs/` initialized.
|
|
83
|
+
- BLOCKED if: any artifact missing — write it before reporting completion.
|
|
84
|
+
|
|
57
85
|
### Pre-flight
|
|
58
86
|
|
|
59
87
|
1. Check if `.workflow/` already exists — if so, load state and warn (E002 for greenfield conflicts)
|
|
@@ -36,8 +36,19 @@ Turn natural-language instructions into command overlays — JSON patch files th
|
|
|
36
36
|
**Management** — listing and removing overlays is handled by `maestro overlay list` (ink TUI with interactive delete). This skill focuses solely on creation.
|
|
37
37
|
|
|
38
38
|
**Available sections** (for `section:` in patches): `purpose`, `required_reading`, `deferred_reading`, `context`, `execution`, `error_codes`, `success_criteria`.
|
|
39
|
+
|
|
40
|
+
**Output boundary**: ALL file writes MUST target `~/.maestro/overlays/` (overlay JSON + docs) only. Command file patching is handled by `maestro overlay add` — this skill NEVER modifies `.claude/commands/*.md` directly.
|
|
39
41
|
</context>
|
|
40
42
|
|
|
43
|
+
<invariants>
|
|
44
|
+
1. **Non-invasive** — overlays MUST use hashed HTML-comment markers for injection; NEVER edit command file content directly outside the overlay system
|
|
45
|
+
2. **Idempotent** — re-running `maestro overlay apply` with the same overlay JSON MUST produce no file changes
|
|
46
|
+
3. **Creation only** — this skill MUST only create overlays; listing and removal are handled by `maestro overlay list` (ink TUI)
|
|
47
|
+
4. **Pristine source preferred** — injection point analysis MUST read from `$PKG_ROOT/.claude/commands/` (untouched originals) first, fall back to `~/.claude/commands/` only if pristine unavailable
|
|
48
|
+
5. **User approval before write** — overlay JSON MUST be shown and approved via ask_user before writing to disk; NEVER auto-install without confirmation
|
|
49
|
+
6. **Chain skip option mandatory** — if a skill chain is configured, the injected content MUST include a "Skip" option in ask_user; NEVER force the user into a chain
|
|
50
|
+
</invariants>
|
|
51
|
+
|
|
41
52
|
<execution>
|
|
42
53
|
### 1. Parse user intent
|
|
43
54
|
|
|
@@ -69,8 +69,19 @@ $ARGUMENTS — template slug/path, or flags.
|
|
|
69
69
|
"last_checkpoint": null
|
|
70
70
|
}
|
|
71
71
|
```
|
|
72
|
+
|
|
73
|
+
**Output boundary**: ALL file writes MUST target `.workflow/.maestro/player-*/` (session status.json + step outputs) only. Template files (`~/.maestro/templates/workflows/`) are read-only. NEVER modify source code or `.claude/commands/` files.
|
|
72
74
|
</context>
|
|
73
75
|
|
|
76
|
+
<invariants>
|
|
77
|
+
1. **Resume-safe** — status.json MUST be updated after every step change; an interrupted session MUST be resumable from the last checkpoint via `-c`
|
|
78
|
+
2. **One step at a time** — execution loop MUST process steps sequentially in topological order; parallel steps share a batch index but NEVER run concurrently within the player
|
|
79
|
+
3. **CLI nodes async** — cli-type nodes MUST use `shell(run_in_background: true)` + STOP pattern; NEVER block the main thread on delegate execution
|
|
80
|
+
4. **Templates read-only** — player MUST NOT modify template JSON files; runtime state belongs in status.json only
|
|
81
|
+
5. **Failure requires user decision** — on step failure without explicit `on_fail`, player MUST prompt via ask_user (Retry/Skip/Abort); NEVER silently skip or auto-abort
|
|
82
|
+
6. **Reference resolution at runtime** — `{N-xxx.field}` and `{prev_*}` references MUST be resolved at execution time from status.json step results, NEVER pre-resolved during init
|
|
83
|
+
</invariants>
|
|
84
|
+
|
|
74
85
|
<state_machine>
|
|
75
86
|
|
|
76
87
|
<states>
|
|
@@ -41,9 +41,38 @@ Parse for:
|
|
|
41
41
|
- Browse: `maestro search --category coding`
|
|
42
42
|
- Load task-relevant entries: `maestro load --type knowhow --id <id1> [id2...]`
|
|
43
43
|
3. All are optional — proceed without if unavailable.
|
|
44
|
+
|
|
45
|
+
**Output boundary**: ALL file writes MUST target `.workflow/scratch/` (task directory, plan.json, summaries) and modified source files as defined in plan.json tasks. State.json scratch entry is implicit workflow tracking.
|
|
44
46
|
</context>
|
|
45
47
|
|
|
48
|
+
<invariants>
|
|
49
|
+
1. **Atomic commits** — each task execution MUST produce a commit with only the files modified by that task; NEVER stage unrelated files
|
|
50
|
+
2. **Evidence-based summaries** — task summaries MUST include concrete evidence (files changed, tests run, commands executed); NEVER accept "task completed successfully" as a summary
|
|
51
|
+
3. **Plan before execute** — plan.json MUST be written before any task execution begins; NEVER skip planning even for single-task workflows
|
|
52
|
+
4. **Scratch isolation** — all workflow artifacts MUST live under `.workflow/scratch/{task-dir}/`; NEVER write workflow metadata outside this directory
|
|
53
|
+
5. **Commit confirmation** — staged files and commit message MUST be shown via ask_user before committing (unless `-y`); NEVER auto-commit without user awareness
|
|
54
|
+
</invariants>
|
|
55
|
+
|
|
46
56
|
<execution>
|
|
57
|
+
|
|
58
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
59
|
+
|
|
60
|
+
**GATE 1: Setup → Planning**
|
|
61
|
+
- REQUIRED: Task description parsed and scratch directory created.
|
|
62
|
+
- REQUIRED: Coding specs loaded (optional but attempted).
|
|
63
|
+
- BLOCKED if: no task description (E001) or scratch directory creation failed (E002).
|
|
64
|
+
|
|
65
|
+
**GATE 2: Planning → Execution**
|
|
66
|
+
- REQUIRED: plan.json written with task definitions.
|
|
67
|
+
- REQUIRED: --discuss decisions extracted and recorded (if flag set).
|
|
68
|
+
- BLOCKED if: plan.json missing or empty.
|
|
69
|
+
|
|
70
|
+
**GATE 3: Execution → Completion**
|
|
71
|
+
- REQUIRED: All tasks executed with `.summaries/TASK-*-summary.md` written per task.
|
|
72
|
+
- REQUIRED: Each summary contains concrete evidence of completion.
|
|
73
|
+
- REQUIRED: --full verification passed (if flag set).
|
|
74
|
+
- BLOCKED if: any task summary missing or lacking evidence.
|
|
75
|
+
|
|
47
76
|
Follow '~/.maestro/workflows/quick.md' completely.
|
|
48
77
|
|
|
49
78
|
### Artifact Verification (before completion)
|