maestro-flow 0.3.47 → 0.3.48
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.
|
@@ -16,10 +16,6 @@ Entry points:
|
|
|
16
16
|
- **`$maestro --super "intent"`** — Production-ready mode (read maestro-super.md)
|
|
17
17
|
</purpose>
|
|
18
18
|
|
|
19
|
-
<required_reading>
|
|
20
|
-
@~/.maestro/workflows/maestro.codex.md — authoritative `detectTaskType`, `detectNextAction`, `chainMap` (35+ intent patterns, 40+ chain types). Read before executing any step.
|
|
21
|
-
</required_reading>
|
|
22
|
-
|
|
23
19
|
<deferred_reading>
|
|
24
20
|
- [maestro-super.md](~/.maestro/workflows/maestro-super.md) — read when `--super` flag is active
|
|
25
21
|
</deferred_reading>
|
|
@@ -51,7 +47,7 @@ $ARGUMENTS — user intent text, or special flags.
|
|
|
51
47
|
<states>
|
|
52
48
|
S_PARSE — 解析参数、检测 flags PERSIST: —
|
|
53
49
|
S_CONTINUE — 加载已有 session,定位 resume 点 PERSIST: session (loaded)
|
|
54
|
-
S_CLASSIFY — 意图分类、解析 chain
|
|
50
|
+
S_CLASSIFY — 意图分类、解析 chain (A_CLASSIFY) PERSIST: —
|
|
55
51
|
S_CREATE — 创建 session + status.json PERSIST: session.status, session.steps[]
|
|
56
52
|
S_DRY_RUN — 显示 chain 后结束 PERSIST: —
|
|
57
53
|
S_CONFIRM — 用户确认(auto_mode 跳过) PERSIST: —
|
|
@@ -73,7 +69,7 @@ S_CONTINUE:
|
|
|
73
69
|
→ S_FALLBACK WHEN: no session found
|
|
74
70
|
|
|
75
71
|
S_CLASSIFY:
|
|
76
|
-
→ S_CREATE WHEN: chain resolved
|
|
72
|
+
→ S_CREATE WHEN: chain resolved DO: A_CLASSIFY
|
|
77
73
|
→ S_FALLBACK WHEN: no match AND auto_mode
|
|
78
74
|
→ S_CLASSIFY WHEN: no match AND not auto_mode DO: A_CLARIFY_INTENT
|
|
79
75
|
GUARD: max 1 clarification attempt → S_FALLBACK
|
|
@@ -113,7 +109,7 @@ S_FALLBACK:
|
|
|
113
109
|
### A_CREATE_SESSION
|
|
114
110
|
|
|
115
111
|
1. Read `.workflow/state.json` for project context (current phase, milestone, workflow_name)
|
|
116
|
-
2. Resolve chain's skill list from
|
|
112
|
+
2. Resolve chain's skill list from Chain Map (see appendix)
|
|
117
113
|
3. Create `.workflow/.maestro/maestro-{YYYYMMDD-HHMMSS}/status.json`:
|
|
118
114
|
```json
|
|
119
115
|
{ "session_id", "source": "maestro", "intent", "task_type", "chain_name",
|
|
@@ -132,6 +128,85 @@ S_FALLBACK:
|
|
|
132
128
|
2. Find first pending step → set as resume point
|
|
133
129
|
3. Rebuild `update_plan` from status.json (completed→"completed", current→"in_progress", rest→"open")
|
|
134
130
|
|
|
131
|
+
### A_CLASSIFY
|
|
132
|
+
|
|
133
|
+
**Layer 1: Exact-match (fast path)**
|
|
134
|
+
- `--chain <name>` flag → validate against chainMap, use directly (E002 if not found)
|
|
135
|
+
- `continue`/`next`/`go`/`继续`/`下一步` → `state_continue`
|
|
136
|
+
- `status`/`状态`/`dashboard` → `status`
|
|
137
|
+
|
|
138
|
+
If matched, skip to chain resolution.
|
|
139
|
+
|
|
140
|
+
**Layer 2: Structured intent extraction**
|
|
141
|
+
|
|
142
|
+
Extract tuple from intent using LLM semantic understanding:
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"action": "<create|fix|analyze|plan|execute|verify|review|test|debug|refactor|explore|manage|transition|continue|sync|learn|retrospect>",
|
|
146
|
+
"object": "<feature|bug|issue|code|test|spec|phase|milestone|doc|performance|security|ui|memory|codebase|config>",
|
|
147
|
+
"scope": "<module/file/area or null>",
|
|
148
|
+
"issue_id": "<ISS-XXXXXXXX-NNN or null>",
|
|
149
|
+
"phase_ref": "<integer or null>",
|
|
150
|
+
"urgency": "<low|normal|high>"
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Disambiguation: "问题"/"issue"/"problem" as broken → `object: "bug"` (→ debug); as tracked item (with ISS-ID or management context) → `object: "issue"` (→ issue management). When ambiguous, prefer `"bug"`.
|
|
155
|
+
|
|
156
|
+
**Layer 3: action × object routing matrix**
|
|
157
|
+
|
|
158
|
+
If `issue_id` present → issue pipeline directly.
|
|
159
|
+
|
|
160
|
+
| action | object-specific overrides | default |
|
|
161
|
+
|--------|--------------------------|---------|
|
|
162
|
+
| fix | bug/code/perf/security→`debug`, issue→`issue` | `debug` |
|
|
163
|
+
| create | feature→`quick`, issue→`issue`, test→`test_gen`, spec→`spec_generate`, ui→`ui_design`, config→`init` | `quick` |
|
|
164
|
+
| analyze | bug/code→`analyze`, issue→`issue_analyze`, codebase→`spec_map` | `analyze` |
|
|
165
|
+
| explore | issue→`issue_discover`, feature/ui→`brainstorm`/`ui_design` | `brainstorm` |
|
|
166
|
+
| plan | issue→`issue_plan`, spec→`spec_generate` | `plan` |
|
|
167
|
+
| execute | issue→`issue_execute` | `execute` |
|
|
168
|
+
| manage | issue→`issue`, milestone→`milestone_audit`, phase→`phase_transition`, memory/doc/codebase→`memory`/`sync`/`codebase_refresh` | `status` |
|
|
169
|
+
| transition | phase→`phase_transition`, milestone→`milestone_complete` | `phase_transition` |
|
|
170
|
+
| verify, review, test, debug, refactor, continue, sync, learn, retrospect, release, amend, compose | — | self-named |
|
|
171
|
+
|
|
172
|
+
**Clarity scoring**: 3=action+object+scope, 2=action+object, 1=action only, 0=empty.
|
|
173
|
+
If `clarity < 2` and not `auto_mode` → transition to A_CLARIFY_INTENT.
|
|
174
|
+
|
|
175
|
+
**Layer 4: State-based routing** (when `taskType === 'state_continue'`)
|
|
176
|
+
|
|
177
|
+
Read `.workflow/state.json` and route by condition:
|
|
178
|
+
|
|
179
|
+
| Condition | Chain |
|
|
180
|
+
|-----------|-------|
|
|
181
|
+
| Not initialized | `init` |
|
|
182
|
+
| No phases, no roadmap, has accumulated_context | `next-milestone` |
|
|
183
|
+
| No phases | `brainstorm-driven` |
|
|
184
|
+
| pending + has context | `plan` |
|
|
185
|
+
| pending, no context | `analyze` |
|
|
186
|
+
| exploring/planning + has plan | `execute-verify` |
|
|
187
|
+
| exploring/planning, no plan | `plan` |
|
|
188
|
+
| executing, all tasks done | `verify` |
|
|
189
|
+
| executing, tasks remain | `execute` |
|
|
190
|
+
| verifying, passed + no review | `review` |
|
|
191
|
+
| verifying, passed + BLOCK | `review-fix` |
|
|
192
|
+
| verifying, passed + UAT pending | `test` |
|
|
193
|
+
| verifying, passed + UAT passed | `milestone-close` |
|
|
194
|
+
| verifying, passed + UAT failed | `debug` |
|
|
195
|
+
| verifying, not passed | `quality-loop-partial` |
|
|
196
|
+
| testing, UAT passed | `milestone-close` |
|
|
197
|
+
| testing, UAT not passed | `debug` |
|
|
198
|
+
| completed | `milestone-close` |
|
|
199
|
+
| blocked | `debug` |
|
|
200
|
+
| fallback | `status` |
|
|
201
|
+
|
|
202
|
+
**Chain resolution order:**
|
|
203
|
+
1. `forceChain` → `chainMap[forceChain]` (E002 if not found)
|
|
204
|
+
2. `state_continue` → Layer 4 state routing → `{ chain, argsOverride? }`
|
|
205
|
+
3. `taskToChain[taskType]` → alias lookup (see Chain Aliases below)
|
|
206
|
+
4. `chainMap[taskType]` → direct lookup
|
|
207
|
+
|
|
208
|
+
**Phase resolution**: structured extraction `phase_ref` → fallback regex (`phase N` or bare number) → `projectState.current_phase`.
|
|
209
|
+
|
|
135
210
|
### A_CLARIFY_INTENT
|
|
136
211
|
|
|
137
212
|
1. `AskUserQuestion` with available chain types
|
|
@@ -177,23 +252,90 @@ S_FALLBACK:
|
|
|
177
252
|
|
|
178
253
|
<appendix>
|
|
179
254
|
|
|
180
|
-
### Chain Map (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
|
185
|
-
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
189
|
-
|
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
196
|
-
|
|
255
|
+
### Chain Map (Full)
|
|
256
|
+
|
|
257
|
+
**Single-step chains:**
|
|
258
|
+
|
|
259
|
+
| Chain | Command + Args |
|
|
260
|
+
|-------|---------------|
|
|
261
|
+
| `status` | `manage-status` |
|
|
262
|
+
| `init` | `maestro-init` |
|
|
263
|
+
| `analyze` | `maestro-analyze {phase}` |
|
|
264
|
+
| `ui_design` | `maestro-ui-design {phase}` |
|
|
265
|
+
| `plan` | `maestro-plan {phase}` |
|
|
266
|
+
| `execute` | `maestro-execute {phase}` |
|
|
267
|
+
| `verify` | `maestro-verify {phase}` |
|
|
268
|
+
| `test_gen` | `quality-auto-test {phase}` |
|
|
269
|
+
| `auto_test` | `quality-auto-test {phase}` |
|
|
270
|
+
| `test` | `quality-test {phase}` |
|
|
271
|
+
| `debug` | `quality-debug "{description}"` |
|
|
272
|
+
| `integration_test` | `quality-auto-test {phase}` |
|
|
273
|
+
| `refactor` | `quality-refactor "{description}"` |
|
|
274
|
+
| `review` | `quality-review {phase}` |
|
|
275
|
+
| `retrospective` | `quality-retrospective {phase}` |
|
|
276
|
+
| `learn` | `maestro-learn "{description}"` |
|
|
277
|
+
| `sync` | `quality-sync` |
|
|
278
|
+
| `milestone_audit` | `maestro-milestone-audit` |
|
|
279
|
+
| `milestone_complete` | `maestro-milestone-complete` |
|
|
280
|
+
| `codebase_rebuild` | `manage-codebase-rebuild` |
|
|
281
|
+
| `codebase_refresh` | `manage-codebase-refresh` |
|
|
282
|
+
| `spec_setup` | `spec-setup` |
|
|
283
|
+
| `spec_add` | `spec-add "{description}"` |
|
|
284
|
+
| `spec_load` | `spec-load` |
|
|
285
|
+
| `spec_map` | `manage-codebase-rebuild` |
|
|
286
|
+
| `spec_remove` | `spec-remove "{description}"` |
|
|
287
|
+
| `knowhow_capture` | `manage-knowhow-capture "{description}"` |
|
|
288
|
+
| `knowhow` | `manage-knowhow "{description}"` |
|
|
289
|
+
| `issue` | `manage-issue "{description}"` |
|
|
290
|
+
| `issue_discover` | `manage-issue-discover "{description}"` |
|
|
291
|
+
| `issue_analyze` | `maestro-analyze --gaps "{description}"` |
|
|
292
|
+
| `issue_plan` | `maestro-plan --gaps` |
|
|
293
|
+
| `issue_execute` | `maestro-execute` |
|
|
294
|
+
| `quick` | `maestro-quick "{description}"` |
|
|
295
|
+
| `harvest` | `manage-harvest "{description}"` |
|
|
296
|
+
| `wiki` | `manage-wiki` |
|
|
297
|
+
| `wiki_connect` | `wiki-connect` |
|
|
298
|
+
| `wiki_digest` | `wiki-digest` |
|
|
299
|
+
| `business_test` | `quality-auto-test {phase}` |
|
|
300
|
+
| `amend` | `maestro-amend "{description}"` |
|
|
301
|
+
| `release` | `maestro-milestone-release` |
|
|
302
|
+
| `compose` | `maestro-composer "{description}"` |
|
|
303
|
+
| `play` | `maestro-player "{description}"` |
|
|
304
|
+
| `update` | `maestro-update` |
|
|
305
|
+
| `overlay` | `maestro-overlay "{description}"` |
|
|
306
|
+
| `link_coordinate` | `maestro-link-coordinate "{description}"` |
|
|
307
|
+
|
|
308
|
+
**Multi-step chains:**
|
|
309
|
+
|
|
310
|
+
| Chain | Steps (→ = sequential, [B] = barrier) |
|
|
311
|
+
|-------|---------------------------------------|
|
|
312
|
+
| `feature` | [B] maestro-plan → [B] maestro-execute → maestro-verify |
|
|
313
|
+
| `quality-fix` | [B] maestro-analyze --gaps → [B] maestro-plan --gaps → [B] maestro-execute → maestro-verify |
|
|
314
|
+
| `deploy` | maestro-verify → maestro-milestone-release |
|
|
315
|
+
| `spec-driven` | maestro-init → [B] maestro-roadmap --mode full → [B] maestro-plan → [B] maestro-execute → maestro-verify |
|
|
316
|
+
| `brainstorm-driven` | [B] maestro-brainstorm → [B] maestro-plan → [B] maestro-execute → maestro-verify |
|
|
317
|
+
| `ui-design-driven` | maestro-ui-design → [B] maestro-plan → [B] maestro-execute → maestro-verify |
|
|
318
|
+
| `roadmap-driven` | maestro-init → [B] maestro-roadmap → [B] maestro-plan → [B] maestro-execute → maestro-verify |
|
|
319
|
+
| `next-milestone` | [B] maestro-roadmap → [B] maestro-plan → [B] maestro-execute → maestro-verify |
|
|
320
|
+
| `full-lifecycle` | [B] maestro-plan → [B] maestro-execute → maestro-verify → quality-review → quality-test → maestro-milestone-audit → maestro-milestone-complete |
|
|
321
|
+
| `execute-verify` | [B] maestro-execute → maestro-verify |
|
|
322
|
+
| `analyze-plan-execute` | [B] maestro-analyze -q → [B] maestro-plan --dir {scratch_dir} → [B] maestro-execute --dir {scratch_dir} |
|
|
323
|
+
| `quality-loop` | maestro-verify → quality-review → quality-test → quality-debug --from-uat → [B] maestro-plan --gaps → [B] maestro-execute |
|
|
324
|
+
| `quality-loop-partial` | [B] maestro-plan --gaps → [B] maestro-execute → maestro-verify |
|
|
325
|
+
| `review-fix` | [B] maestro-plan --gaps → [B] maestro-execute → quality-review |
|
|
326
|
+
| `milestone-close` | maestro-milestone-audit → maestro-milestone-complete |
|
|
327
|
+
| `milestone-release` | maestro-milestone-audit → maestro-milestone-release |
|
|
328
|
+
| `phase_transition` | maestro-milestone-audit → maestro-milestone-complete |
|
|
329
|
+
| `issue-full` | [B] maestro-analyze --gaps → [B] maestro-plan --gaps → [B] maestro-execute → quality-review → manage-issue close |
|
|
330
|
+
| `issue-quick` | [B] maestro-plan --gaps → [B] maestro-execute → manage-issue close |
|
|
331
|
+
|
|
332
|
+
**Chain Aliases** (taskType → chain):
|
|
333
|
+
|
|
334
|
+
| taskType | Chain |
|
|
335
|
+
|----------|-------|
|
|
336
|
+
| `spec_generate` | `spec-driven` |
|
|
337
|
+
| `brainstorm` | `brainstorm-driven` |
|
|
338
|
+
| `issue_execute` | `issue-full` |
|
|
197
339
|
|
|
198
340
|
### Auto-Yes Flag Map
|
|
199
341
|
|
|
@@ -156,17 +156,28 @@ S_FALLBACK -> S_PARSE_ROUTE WHEN: user input | -> END WHEN: cancel
|
|
|
156
156
|
| Has .workflow/ but no state.json | init |
|
|
157
157
|
| Has state.json | artifact-based inference |
|
|
158
158
|
|
|
159
|
-
**Artifact-based
|
|
159
|
+
**Artifact-based inference:** Filter by current_milestone + target phase:
|
|
160
160
|
|
|
161
161
|
| Condition | Position |
|
|
162
162
|
|-----------|----------|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
163
|
+
| no milestones defined or no roadmap.md | `roadmap` |
|
|
164
|
+
| no artifacts for target phase | `analyze` |
|
|
165
|
+
| latest artifact = analyze | `plan` |
|
|
166
|
+
| latest artifact = plan | `execute` |
|
|
167
|
+
| latest artifact = execute | `verify` |
|
|
168
|
+
| latest artifact = verify | → refine from result files |
|
|
169
|
+
|
|
170
|
+
**Refine from verify results:**
|
|
171
|
+
|
|
172
|
+
| Condition | Position |
|
|
173
|
+
|-----------|----------|
|
|
174
|
+
| verification.json: passed==false or gaps[] non-empty | `verify-failed` |
|
|
175
|
+
| passed==true, no review.json, has auto-test report | `review` |
|
|
176
|
+
| passed==true, no review.json, no auto-test report | `business-test` (full) / `review` (standard/quick) |
|
|
177
|
+
| review.json: verdict=="BLOCK" | `review-failed` |
|
|
178
|
+
| review.json: verdict!="BLOCK" | `test` |
|
|
179
|
+
| uat.md: all passed | `milestone-audit` |
|
|
180
|
+
| uat.md: has failures | `test-failed` |
|
|
170
181
|
|
|
171
182
|
### A_RESOLVE_PHASE
|
|
172
183
|
|
|
@@ -182,23 +193,32 @@ Priority: regex from intent `phase\s*(\d+)` -> latest in-progress artifact's pha
|
|
|
182
193
|
|
|
183
194
|
### A_BUILD_STEPS
|
|
184
195
|
|
|
185
|
-
Lifecycle stages
|
|
186
|
-
|
|
187
|
-
| Stage | Skill | Barrier | Decision after |
|
|
188
|
-
|
|
189
|
-
| brainstorm | maestro-brainstorm | yes |
|
|
190
|
-
| init | maestro-init | no |
|
|
191
|
-
| roadmap | maestro-roadmap | yes |
|
|
192
|
-
| analyze | maestro-analyze | yes |
|
|
193
|
-
| plan | maestro-plan | yes |
|
|
194
|
-
| execute | maestro-execute | yes |
|
|
195
|
-
| verify | maestro-verify | no | post-verify |
|
|
196
|
-
| business-test | quality-auto-test | no | post-business-test
|
|
197
|
-
| review | quality-review | no | post-review |
|
|
198
|
-
| test-gen | quality-auto-test | no |
|
|
199
|
-
| test | quality-test | no | post-test |
|
|
200
|
-
| milestone-audit | maestro-milestone-audit | no |
|
|
201
|
-
| milestone-complete | maestro-milestone-complete | no | post-milestone |
|
|
196
|
+
**Lifecycle stages:**
|
|
197
|
+
|
|
198
|
+
| Stage | Skill | Barrier | Quality Mode | Decision after |
|
|
199
|
+
|-------|-------|---------|-------------|----------------|
|
|
200
|
+
| brainstorm | maestro-brainstorm "{intent}" | yes | all | — |
|
|
201
|
+
| init | maestro-init | no | all | — |
|
|
202
|
+
| roadmap | maestro-roadmap "{intent}" | yes | all | — |
|
|
203
|
+
| analyze | maestro-analyze {phase} | yes | all | — |
|
|
204
|
+
| plan | maestro-plan {phase} | yes | all | — |
|
|
205
|
+
| execute | maestro-execute {phase} | yes | all | — |
|
|
206
|
+
| verify | maestro-verify {phase} | no | all | post-verify |
|
|
207
|
+
| business-test | quality-auto-test {phase} | no | full only | post-business-test |
|
|
208
|
+
| review | quality-review {phase} | no | all (quick: --tier quick) | post-review |
|
|
209
|
+
| test-gen | quality-auto-test {phase} | no | full; standard if coverage<80% | — |
|
|
210
|
+
| test | quality-test {phase} | no | full, standard | post-test |
|
|
211
|
+
| milestone-audit | maestro-milestone-audit | no | all | — |
|
|
212
|
+
| milestone-complete | maestro-milestone-complete | no | all | post-milestone |
|
|
213
|
+
|
|
214
|
+
**Build rules:**
|
|
215
|
+
1. Start from `lifecycle_position`, end at `milestone-complete`
|
|
216
|
+
2. Skip stages with existing completed artifacts (check state.json)
|
|
217
|
+
3. Filter stages by `quality_mode` — skip non-applicable stages (see Quality Mode column)
|
|
218
|
+
4. Quick mode: `review` appends `--tier quick`; skips `business-test`, `test-gen`, `test`
|
|
219
|
+
5. Insert decision node after each stage with non-empty Decision column: `{ type: "decision", decision: "<gate>", retry_count: 0, max_retries: 2 }`
|
|
220
|
+
6. Args use placeholders `{phase}`, `{intent}`, `{dirs}` — resolved at wave execution time
|
|
221
|
+
7. Append `-y` to all skill args when `auto_mode` is true (see -y propagation table in context)
|
|
202
222
|
|
|
203
223
|
### A_BUILD_AND_SPAWN_WAVE
|
|
204
224
|
|