maestro-flow-one 0.2.34 → 0.2.35
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/maestro-flow/commands/learn/investigate.md +151 -152
- package/maestro-flow/commands/learn/second-opinion.md +118 -122
- package/maestro-flow/commands/lifecycle/analyze.md +215 -266
- package/maestro-flow/commands/lifecycle/blueprint.md +189 -204
- package/maestro-flow/commands/lifecycle/brainstorm.md +209 -213
- package/maestro-flow/commands/lifecycle/companion.md +531 -531
- package/maestro-flow/commands/lifecycle/composer.md +188 -179
- package/maestro-flow/commands/lifecycle/execute.md +183 -184
- package/maestro-flow/commands/lifecycle/fork.md +111 -110
- package/maestro-flow/commands/lifecycle/grill.md +175 -176
- package/maestro-flow/commands/lifecycle/guard.md +103 -102
- package/maestro-flow/commands/lifecycle/impeccable.md +311 -268
- package/maestro-flow/commands/lifecycle/init.md +130 -131
- package/maestro-flow/commands/lifecycle/merge.md +87 -80
- package/maestro-flow/commands/lifecycle/next.md +253 -257
- package/maestro-flow/commands/lifecycle/overlay.md +188 -178
- package/maestro-flow/commands/lifecycle/plan.md +225 -211
- package/maestro-flow/commands/lifecycle/quick.md +83 -77
- package/maestro-flow/commands/lifecycle/roadmap.md +173 -186
- package/maestro-flow/commands/lifecycle/swarm-workflow.md +243 -264
- package/maestro-flow/commands/lifecycle/tools-execute.md +122 -117
- package/maestro-flow/commands/lifecycle/tools-register.md +162 -157
- package/maestro-flow/commands/lifecycle/ui-codify.md +117 -100
- package/maestro-flow/commands/lifecycle/universal-workflow.md +548 -561
- package/maestro-flow/commands/lifecycle/update.md +122 -119
- package/maestro-flow/commands/manage/codebase-rebuild.md +87 -85
- package/maestro-flow/commands/manage/harvest.md +97 -95
- package/maestro-flow/commands/manage/issue-discover.md +83 -81
- package/maestro-flow/commands/manage/issue.md +72 -73
- package/maestro-flow/commands/manage/kg-extractors.md +128 -0
- package/maestro-flow/commands/manage/knowhow-capture.md +92 -82
- package/maestro-flow/commands/manage/knowhow.md +83 -79
- package/maestro-flow/commands/manage/knowledge-audit.md +105 -88
- package/maestro-flow/commands/manage/status.md +62 -52
- package/maestro-flow/commands/manage/wiki.md +82 -71
- package/maestro-flow/commands/milestone/audit.md +4 -10
- package/maestro-flow/commands/milestone/complete.md +6 -7
- package/maestro-flow/commands/milestone/release.md +136 -145
- package/maestro-flow/commands/quality/auto-test.md +153 -136
- package/maestro-flow/commands/quality/debug.md +159 -120
- package/maestro-flow/commands/quality/refactor.md +105 -67
- package/maestro-flow/commands/quality/retrospective.md +123 -77
- package/maestro-flow/commands/quality/review.md +155 -128
- package/maestro-flow/commands/quality/sync.md +88 -52
- package/maestro-flow/commands/quality/test.md +147 -117
- package/maestro-flow/commands/spec/add.md +77 -70
- package/maestro-flow/commands/spec/setup.md +49 -52
- package/package.json +1 -1
- package/maestro-flow/commands/lifecycle/odyssey-debug.md +0 -473
- package/maestro-flow/commands/lifecycle/odyssey-improve.md +0 -505
- package/maestro-flow/commands/lifecycle/odyssey-planex.md +0 -601
- package/maestro-flow/commands/lifecycle/odyssey-review-test-fix.md +0 -427
- package/maestro-flow/commands/lifecycle/odyssey-ui.md +0 -462
- package/maestro-flow/commands/lifecycle/security-audit.md +0 -179
|
@@ -1,264 +1,243 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-swarm-workflow
|
|
3
|
-
description: Parallel workflow accelerator — route intent to fixed Workflow scripts for multi-agent concurrent execution
|
|
4
|
-
argument-hint: "<intent> [--script <name>] [--dims <d1,d2>] [--roles <r1,r2>] [--count N] [--tier quick|standard] [--resume <runId>]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- Workflow
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
---
|
|
15
|
-
<purpose>
|
|
16
|
-
Parallel accelerator
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
S_INGEST
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
│ Score: 7.2/10 Scope: medium Verdict: go │
|
|
245
|
-
│ Findings: 23 total (2 critical, 5 high) │
|
|
246
|
-
│ Cross-cutting: 3 themes │
|
|
247
|
-
│ Decisions: 4 locked, 2 free, 1 deferred │
|
|
248
|
-
├────────────────────────────────────────────────────┤
|
|
249
|
-
│ Output: .workflow/scratch/20260530-swarm-analyze/ │
|
|
250
|
-
│ Resume: /maestro-swarm-workflow --resume wf_abc123 │
|
|
251
|
-
└────────────────────────────────────────────────────┘
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
### Error Codes
|
|
255
|
-
|
|
256
|
-
| Code | Description | Recovery |
|
|
257
|
-
|------|-------------|----------|
|
|
258
|
-
| E001 | No intent and no --script | Prompt for intent |
|
|
259
|
-
| E002 | Ambiguous routing | AskUserQuestion |
|
|
260
|
-
| E003 | Script file not found | Check .claude/workflows/ |
|
|
261
|
-
| E004 | Workflow execution failed | Show error, suggest --resume |
|
|
262
|
-
| E005 | Result ingestion failed | Write raw JSON to scratch |
|
|
263
|
-
|
|
264
|
-
</appendix>
|
|
1
|
+
---
|
|
2
|
+
name: maestro-swarm-workflow
|
|
3
|
+
description: Parallel workflow accelerator — route intent to fixed Workflow scripts for multi-agent concurrent execution
|
|
4
|
+
argument-hint: "<intent> [--script <name>] [--dims <d1,d2>] [--roles <r1,r2>] [--count N] [--tier quick|standard] [--resume <runId>]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Workflow
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Parallel accelerator: route intent to pre-built Workflow scripts (`wf-*.js`) for multi-agent
|
|
17
|
+
concurrent execution with adversarial decision patterns. Complements ralph's sequential chain.
|
|
18
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<context>
|
|
21
|
+
$ARGUMENTS — intent text with optional flags.
|
|
22
|
+
|
|
23
|
+
**Parse:**
|
|
24
|
+
```
|
|
25
|
+
--script <name> → 强制指定脚本(wf-analyze, wf-brainstorm, wf-review, wf-verify)
|
|
26
|
+
--dims <d1,d2> → 限定分析维度(analyze: architecture,complexity,patterns,risk,testability,performance)
|
|
27
|
+
--roles <r1,r2> → 限定角色(brainstorm: system-architect,product-manager,test-strategist,ux-expert,security-analyst,data-architect)
|
|
28
|
+
--count N → 角色数量(brainstorm 默认 3)
|
|
29
|
+
--tier <level> → review 层级(quick=2 维度, standard=4 维度)
|
|
30
|
+
--resume <runId> → 从之前的 workflow 运行恢复(增量重跑)
|
|
31
|
+
Remaining → intent
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Script inventory** (`~/.maestro/workflows/swarm/`):
|
|
35
|
+
|
|
36
|
+
| Script | args 接口 |
|
|
37
|
+
|--------|-----------|
|
|
38
|
+
| `wf-analyze` | `{ target, scope, context, phase?, dimensions? }` |
|
|
39
|
+
| `wf-brainstorm` | `{ topic, context, count?, roles? }` |
|
|
40
|
+
| `wf-review` | `{ target, scope, specs?, tier?, dimensions? }` |
|
|
41
|
+
| `wf-verify` | `{ goals, plan_dir?, scope?, task_files?, must_haves?, skip_antipattern? }` |
|
|
42
|
+
| `wf-grill` | `{ topic, context?, depth?: "shallow"\|"standard"\|"deep" }` |
|
|
43
|
+
| `wf-plan` | `{ context_dir?, from?, phase?, scope?, specs?, gaps?, quick? }` |
|
|
44
|
+
| `wf-execute` | `{ plan_dir, specs?, codebase_context?, wiki_context?, auto_commit? }` |
|
|
45
|
+
| `wf-milestone-audit` | `{ milestone?, is_adhoc? }` |
|
|
46
|
+
</context>
|
|
47
|
+
|
|
48
|
+
<state_machine>
|
|
49
|
+
|
|
50
|
+
<states>
|
|
51
|
+
S_PARSE — 解析参数和意图 PERSIST: —
|
|
52
|
+
S_ROUTE — 路由到目标脚本 PERSIST: —
|
|
53
|
+
S_CONTEXT — 组装 context payload PERSIST: —
|
|
54
|
+
S_DISPATCH — 调用 Workflow 工具 PERSIST: —
|
|
55
|
+
S_INGEST — 处理返回结果 PERSIST: —
|
|
56
|
+
S_FALLBACK — 无法路由 PERSIST: —
|
|
57
|
+
</states>
|
|
58
|
+
|
|
59
|
+
<transitions>
|
|
60
|
+
|
|
61
|
+
S_PARSE:
|
|
62
|
+
→ S_ROUTE WHEN: intent parsed DO: A_PARSE_ARGS
|
|
63
|
+
→ S_FALLBACK WHEN: no intent
|
|
64
|
+
|
|
65
|
+
S_ROUTE:
|
|
66
|
+
→ S_CONTEXT WHEN: script resolved DO: A_ROUTE_SCRIPT
|
|
67
|
+
→ S_FALLBACK WHEN: ambiguous intent DO: AskUserQuestion
|
|
68
|
+
|
|
69
|
+
S_CONTEXT:
|
|
70
|
+
→ S_DISPATCH DO: A_ASSEMBLE_CONTEXT
|
|
71
|
+
|
|
72
|
+
S_DISPATCH:
|
|
73
|
+
→ S_INGEST WHEN: workflow completed DO: A_DISPATCH_WORKFLOW
|
|
74
|
+
→ S_FALLBACK WHEN: workflow failed
|
|
75
|
+
|
|
76
|
+
S_INGEST:
|
|
77
|
+
→ END DO: A_INGEST_RESULTS
|
|
78
|
+
|
|
79
|
+
S_FALLBACK:
|
|
80
|
+
→ S_PARSE WHEN: user provides input
|
|
81
|
+
→ END WHEN: user cancels
|
|
82
|
+
|
|
83
|
+
</transitions>
|
|
84
|
+
|
|
85
|
+
<actions>
|
|
86
|
+
|
|
87
|
+
### A_PARSE_ARGS
|
|
88
|
+
|
|
89
|
+
1. 提取 flags(--script, --dims, --roles, --count, --tier, --resume)
|
|
90
|
+
2. 剩余文本作为 intent
|
|
91
|
+
3. 若有 --resume,记录 resumeRunId
|
|
92
|
+
|
|
93
|
+
### A_ROUTE_SCRIPT
|
|
94
|
+
|
|
95
|
+
Intent-to-script routing(按关键词匹配,--script 优先级最高):
|
|
96
|
+
|
|
97
|
+
| Keywords | Script |
|
|
98
|
+
|----------|--------|
|
|
99
|
+
| 分析 / analyze / 探索 / explore / 架构 / architecture / 复杂度 / 风险 | `wf-analyze` |
|
|
100
|
+
| 头脑风暴 / brainstorm / 方案 / 设计 / 评估 / evaluate / 多角度 | `wf-brainstorm` |
|
|
101
|
+
| 审查 / review / 代码审查 / code review / 质量 / quality | `wf-review` |
|
|
102
|
+
| 验证 / verify / 检查 / check / 反模式 / antipattern | `wf-verify` |
|
|
103
|
+
| 拷问 / grill / 压力测试 / stress-test / 挑战 / challenge | `wf-grill` |
|
|
104
|
+
| 规划 / plan / 任务分解 / decompose / 分波 / wave | `wf-plan` |
|
|
105
|
+
| 执行 / execute / 实现 / implement / 开发 / develop | `wf-execute` |
|
|
106
|
+
| 里程碑审计 / milestone-audit / 集成检查 / integration | `wf-milestone-audit` |
|
|
107
|
+
|
|
108
|
+
多命中 → AskUserQuestion 让用户选择。
|
|
109
|
+
|
|
110
|
+
### A_ASSEMBLE_CONTEXT
|
|
111
|
+
|
|
112
|
+
根据目标脚本组装 args payload:
|
|
113
|
+
|
|
114
|
+
**wf-analyze:**
|
|
115
|
+
1. Read `.workflow/state.json` 获取当前 phase/milestone 信息
|
|
116
|
+
2. `target` = intent 中的目标描述
|
|
117
|
+
3. `scope` = 从 intent 推断文件范围,或读 roadmap 获取 phase scope
|
|
118
|
+
4. `context` = 拼接相关上下文(上游 artifact 摘要、specs)
|
|
119
|
+
5. `dimensions` = --dims 解析结果(可选)
|
|
120
|
+
|
|
121
|
+
**wf-brainstorm:**
|
|
122
|
+
1. `topic` = intent 文本
|
|
123
|
+
2. `context` = 读取相关代码文件摘要 + 已有 specs
|
|
124
|
+
3. `count` = --count 或默认 3
|
|
125
|
+
4. `roles` = --roles 解析结果(可选)
|
|
126
|
+
|
|
127
|
+
**wf-review:**
|
|
128
|
+
1. `target` = 读 git diff 描述变更范围
|
|
129
|
+
2. `scope` = 变更文件列表
|
|
130
|
+
3. `tier` = --tier 或 "standard"
|
|
131
|
+
4. `dimensions` = --dims 解析结果(可选)
|
|
132
|
+
|
|
133
|
+
**wf-verify:**
|
|
134
|
+
1. `goals` = 读最近的 plan artifact 提取目标列表
|
|
135
|
+
2. `plan_dir` = 定位最近的 plan scratch 目录
|
|
136
|
+
3. `scope` = plan 涉及的文件范围
|
|
137
|
+
4. `skip_tests` / `skip_antipattern` = 从 flags 提取
|
|
138
|
+
|
|
139
|
+
### A_DISPATCH_WORKFLOW
|
|
140
|
+
|
|
141
|
+
1. 确定 scriptPath = `~/.maestro/workflows/swarm/{script}.js`(展开为绝对路径)
|
|
142
|
+
2. 构建 Workflow 调用:
|
|
143
|
+
```
|
|
144
|
+
Workflow({
|
|
145
|
+
scriptPath: absoluteScriptPath,
|
|
146
|
+
args: assembledArgs,
|
|
147
|
+
resumeFromRunId: resumeRunId // 若有
|
|
148
|
+
})
|
|
149
|
+
```
|
|
150
|
+
3. 等待 Workflow 返回结果
|
|
151
|
+
4. 记录 runId 用于潜在的后续 resume
|
|
152
|
+
|
|
153
|
+
### A_INGEST_RESULTS
|
|
154
|
+
|
|
155
|
+
Workflow 返回 JSON 后:
|
|
156
|
+
|
|
157
|
+
1. **摘要输出**:按脚本类型格式化关键指标(含对抗决策结果)
|
|
158
|
+
- analyze: overall_score, scope_verdict, adversarial_outcome (go/no-go/conditional advocacy + referee), scores_challenged count
|
|
159
|
+
- brainstorm: role count, conflict/synergy count, 3-proposal competition result, arbitration notes
|
|
160
|
+
- review: verdict (APPROVE/REQUEST_CHANGES/BLOCK), 3-vote tally, confirmed vs false-positive count, adversarial_verdict
|
|
161
|
+
- verify: overall_status, prosecutor vs defender confidence, adversarial_outcome, gap count
|
|
162
|
+
- grill: overall_verdict, meta-skeptic quality rating, 3-vote verdict tally, overblown findings count
|
|
163
|
+
- plan: selected_strategy (breadth/depth/risk), judge panel scores, 3-critic adversarial check verdict
|
|
164
|
+
- execute: 3-vote status (DONE/DONE_WITH_CONCERNS/NEEDS_RETRY), convergence trust %, discrepancy count
|
|
165
|
+
- milestone-audit: 3-vote verdict, dimensions_overturned count, next_step
|
|
166
|
+
|
|
167
|
+
2. **Artifact 写入**(可选):
|
|
168
|
+
- 若当前在 ralph session 中(检测 `.workflow/.maestro/ralph-*/status.json` 状态为 running):
|
|
169
|
+
将结果写入对应 step 的 scratch 目录,格式兼容命令产出
|
|
170
|
+
- 否则写入 `.workflow/scratch/{YYYYMMDD}-swarm-{script}-{slug}/results.json`
|
|
171
|
+
|
|
172
|
+
3. **Ralph 兼容产出**:
|
|
173
|
+
- analyze → `analysis.md` + `context.md`(decisions)+ `conclusions.json` + `adversarial-debate.json`
|
|
174
|
+
- brainstorm → `guidance-specification.md` + `proposals-competition.json`
|
|
175
|
+
- review → `review.json`(含 adversarial_verdict + 3-vote tally)
|
|
176
|
+
- verify → `verification.json`(含 adversarial_outcome: prosecutor/defender debate)
|
|
177
|
+
- grill → `grill-results.json`(含 meta-challenge + 3-vote verdict)
|
|
178
|
+
- plan → `plan.json`(含 competition scores + critic feedback)
|
|
179
|
+
- execute → `execution-report.json`(含 convergence_checks + 3-vote status)
|
|
180
|
+
- milestone-audit → `audit-report.json`(含 dimension challenges + 3-vote verdict)
|
|
181
|
+
|
|
182
|
+
4. **RunId 提示**:显示 `Resume: /maestro-swarm-workflow --resume {runId}` 用于增量重跑
|
|
183
|
+
|
|
184
|
+
</actions>
|
|
185
|
+
|
|
186
|
+
</state_machine>
|
|
187
|
+
|
|
188
|
+
<invariants>
|
|
189
|
+
1. **只做并行加速,不做状态决策** — 不修改 ralph status.json,不推进 step
|
|
190
|
+
2. **args 预编译** — 所有 FS 读取在 A_ASSEMBLE_CONTEXT 完成,脚本内 agent 通过工具自行读取补充
|
|
191
|
+
3. **产出格式兼容** — 写入的 artifact 格式必须与对应命令(analyze/brainstorm/review/verify)的产出一致
|
|
192
|
+
4. **resume 透传** — resumeFromRunId 直接透传给 Workflow 工具,利用内置缓存机制
|
|
193
|
+
5. **脚本只读** — 路由命令不修改 `~/.maestro/workflows/swarm/wf-*.js` 脚本文件
|
|
194
|
+
6. **结果必须展示** — Workflow 返回后必须向用户展示格式化摘要,不得静默完成
|
|
195
|
+
</invariants>
|
|
196
|
+
|
|
197
|
+
<appendix>
|
|
198
|
+
|
|
199
|
+
### 与 Ralph 集成
|
|
200
|
+
|
|
201
|
+
Ralph 可以在 A_BUILD_STEPS 中将某些 step 的执行方式标记为 `swarm-workflow`:
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{
|
|
205
|
+
"index": 2,
|
|
206
|
+
"skill": "maestro-swarm-workflow",
|
|
207
|
+
"args": "--script wf-analyze {phase}",
|
|
208
|
+
"stage": "analyze",
|
|
209
|
+
"command_scope": "project",
|
|
210
|
+
"command_path": "<resolved by maestro ralph skills --platform claude>"
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
ralph-execute 正常通过 `maestro ralph next` 加载并执行,swarm-workflow 内部再调 Workflow 工具。
|
|
215
|
+
|
|
216
|
+
### 输出示例
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
┌─ wf-analyze ──────────────────────────────────────┐
|
|
220
|
+
│ Explore [████████████████████] 6/6 dimensions │
|
|
221
|
+
│ Synthesize [████████████████] done │
|
|
222
|
+
├────────────────────────────────────────────────────┤
|
|
223
|
+
│ Score: 7.2/10 Scope: medium Verdict: go │
|
|
224
|
+
│ Findings: 23 total (2 critical, 5 high) │
|
|
225
|
+
│ Cross-cutting: 3 themes │
|
|
226
|
+
│ Decisions: 4 locked, 2 free, 1 deferred │
|
|
227
|
+
├────────────────────────────────────────────────────┤
|
|
228
|
+
│ Output: .workflow/scratch/20260530-swarm-analyze/ │
|
|
229
|
+
│ Resume: /maestro-swarm-workflow --resume wf_abc123 │
|
|
230
|
+
└────────────────────────────────────────────────────┘
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Error Codes
|
|
234
|
+
|
|
235
|
+
| Code | Description | Recovery |
|
|
236
|
+
|------|-------------|----------|
|
|
237
|
+
| E001 | No intent and no --script | Prompt for intent |
|
|
238
|
+
| E002 | Ambiguous routing | AskUserQuestion |
|
|
239
|
+
| E003 | Script file not found | Check .claude/workflows/ |
|
|
240
|
+
| E004 | Workflow execution failed | Show error, suggest --resume |
|
|
241
|
+
| E005 | Result ingestion failed | Write raw JSON to scratch |
|
|
242
|
+
|
|
243
|
+
</appendix>
|