maestro-flow 0.5.40 → 0.5.42
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/maestro-analyze/SKILL.md +0 -42
- package/.agents/skills/maestro-blueprint/SKILL.md +0 -22
- package/.agents/skills/maestro-brainstorm/SKILL.md +4 -24
- package/.agents/skills/maestro-execute/SKILL.md +1 -1
- package/.agents/skills/maestro-grill/SKILL.md +0 -16
- package/.agents/skills/maestro-milestone-audit/SKILL.md +0 -15
- package/.agents/skills/maestro-plan/SKILL.md +5 -62
- package/.agents/skills/maestro-roadmap/SKILL.md +0 -8
- package/.agents/skills/odyssey-debug/SKILL.md +109 -143
- package/.agents/skills/odyssey-improve/SKILL.md +127 -141
- package/.agents/skills/odyssey-planex/SKILL.md +140 -231
- package/.agents/skills/odyssey-review-test-fix/SKILL.md +136 -90
- package/.agents/skills/odyssey-ui/SKILL.md +123 -143
- package/.agents/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
- package/.agents/skills/team-coordinate/specs/role-spec-template.md +197 -198
- package/.agents/skills/team-roadmap-dev/SKILL.md +164 -164
- package/.agents/skills/team-roadmap-dev/specs/team-config.json +1 -1
- package/.agents/skills/team-swarm/roles/analyst/role.md +172 -176
- package/.agy/skills/maestro-analyze/SKILL.md +0 -42
- package/.agy/skills/maestro-blueprint/SKILL.md +0 -22
- package/.agy/skills/maestro-brainstorm/SKILL.md +4 -24
- package/.agy/skills/maestro-execute/SKILL.md +1 -1
- package/.agy/skills/maestro-grill/SKILL.md +0 -16
- package/.agy/skills/maestro-milestone-audit/SKILL.md +0 -15
- package/.agy/skills/maestro-plan/SKILL.md +5 -62
- package/.agy/skills/maestro-roadmap/SKILL.md +0 -8
- package/.agy/skills/odyssey-debug/SKILL.md +109 -143
- package/.agy/skills/odyssey-improve/SKILL.md +127 -141
- package/.agy/skills/odyssey-planex/SKILL.md +140 -231
- package/.agy/skills/odyssey-review-test-fix/SKILL.md +136 -90
- package/.agy/skills/odyssey-ui/SKILL.md +123 -143
- package/.agy/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
- package/.agy/skills/team-coordinate/specs/role-spec-template.md +197 -198
- package/.agy/skills/team-roadmap-dev/SKILL.md +141 -153
- package/.agy/skills/team-roadmap-dev/specs/team-config.json +1 -1
- package/.agy/skills/team-swarm/roles/analyst/role.md +172 -176
- package/.claude/commands/maestro-analyze.md +0 -42
- package/.claude/commands/maestro-blueprint.md +0 -22
- package/.claude/commands/maestro-brainstorm.md +4 -24
- package/.claude/commands/maestro-execute.md +1 -1
- package/.claude/commands/maestro-grill.md +0 -16
- package/.claude/commands/maestro-milestone-audit.md +0 -15
- package/.claude/commands/maestro-plan.md +5 -62
- package/.claude/commands/maestro-roadmap.md +0 -8
- package/.claude/commands/odyssey-debug.md +109 -143
- package/.claude/commands/odyssey-improve.md +127 -141
- package/.claude/commands/odyssey-planex.md +140 -231
- package/.claude/commands/odyssey-review-test-fix.md +136 -90
- package/.claude/commands/odyssey-ui.md +123 -143
- package/.claude/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
- package/.claude/skills/team-coordinate/specs/role-spec-template.md +197 -198
- package/.claude/skills/team-roadmap-dev/SKILL.md +169 -169
- package/.claude/skills/team-roadmap-dev/specs/team-config.json +1 -1
- package/.claude/skills/team-swarm/roles/analyst/role.md +181 -185
- package/.codex/skills/odyssey-debug/SKILL.md +114 -169
- package/.codex/skills/odyssey-improve/SKILL.md +144 -188
- package/.codex/skills/odyssey-planex/SKILL.md +162 -242
- package/.codex/skills/odyssey-review-test-fix/SKILL.md +96 -90
- package/.codex/skills/odyssey-ui/SKILL.md +128 -173
- package/dashboard/dist-server/src/commands/install-backend.js +31 -16
- package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
- package/dashboard/dist-server/src/core/component-defs.js +25 -0
- package/dashboard/dist-server/src/core/component-defs.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-loader.js +32 -20
- package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-seeds.d.ts +8 -0
- package/dashboard/dist-server/src/tools/spec-seeds.js +114 -0
- package/dashboard/dist-server/src/tools/spec-seeds.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +31 -16
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +13 -3
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/core/component-defs.d.ts.map +1 -1
- package/dist/src/core/component-defs.js +25 -0
- package/dist/src/core/component-defs.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts +4 -3
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +9 -5
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +32 -20
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/spec-seeds.d.ts +8 -0
- package/dist/src/tools/spec-seeds.d.ts.map +1 -1
- package/dist/src/tools/spec-seeds.js +114 -0
- package/dist/src/tools/spec-seeds.js.map +1 -1
- package/dist/src/utils/update-notices.js +11 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +1 -1
- package/workflows/agy-instructions.md +147 -161
- package/workflows/claude-instructions.md +100 -48
- package/workflows/codex-instructions.md +147 -161
- package/workflows/execute.md +4 -3
- package/workflows/explore-usage.md +41 -81
- package/workflows/grill.md +11 -0
- package/workflows/milestone-audit.md +8 -0
- package/workflows/odyssey-base-codex.md +305 -0
- package/workflows/odyssey-base.md +89 -91
- package/workflows/plan.md +6 -0
|
@@ -5,143 +5,94 @@ argument-hint: "<requirement> [--max-iterations N] [--skip-generalize] [--auto]
|
|
|
5
5
|
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
<base>@~/.maestro/workflows/odyssey-base.md</base>
|
|
8
|
+
<base>@~/.maestro/workflows/odyssey-base-codex.md</base>
|
|
9
9
|
|
|
10
10
|
<purpose>
|
|
11
|
-
Requirement-to-delivery closed loop: parse requirement
|
|
12
|
-
plan
|
|
13
|
-
|
|
14
|
-
Core philosophy:
|
|
15
|
-
- **Acceptance criteria are sacred** — no "close enough", no manual override
|
|
16
|
-
- **Iterate, don't restart** — each fix cycle targets only the failing criteria
|
|
17
|
-
- **CLI-assisted verification** — delegate to external tools for objective checks
|
|
18
|
-
- **Evidence-based progress** — every iteration logged with pass/fail per criterion
|
|
19
|
-
|
|
20
|
-
**三句哲学约束(穷尽迭代):**
|
|
21
|
-
1. **零遗留** — 验收标准必须 ALL pass,不允许"接近通过"
|
|
22
|
-
2. **穷尽迭代** — verify 失败自动修复重试,直到全部通过或明确升级
|
|
23
|
-
3. **改进即标准** — 修复后重新验证同区域,新发现的标准违反继续修
|
|
11
|
+
Requirement-to-delivery closed loop: parse requirement -> define acceptance criteria ->
|
|
12
|
+
plan -> execute -> verify -> fix gaps -> iterate until ALL criteria pass.
|
|
24
13
|
</purpose>
|
|
25
14
|
|
|
26
15
|
<boundary>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
| Template |
|
|
33
|
-
|
|
34
|
-
| `feature` |
|
|
35
|
-
| `bugfix` |
|
|
36
|
-
| `refactor` |
|
|
37
|
-
| `migration` |
|
|
38
|
-
| `api-endpoint` |
|
|
16
|
+
**In scope:** Single requirement full loop — from parsing to all acceptance criteria passing + generalization.
|
|
17
|
+
**Out of scope:** Multi-requirement orchestration -> `/maestro-roadmap` | Deep debugging -> `$odyssey-debug` | Code review -> `$odyssey-review-test-fix` | UI optimization -> `$odyssey-ui`
|
|
18
|
+
|
|
19
|
+
**`--template <name>`:**
|
|
20
|
+
|
|
21
|
+
| Template | Preset criteria pattern | Use case |
|
|
22
|
+
|----------|------------------------|----------|
|
|
23
|
+
| `feature` | User story acceptance + boundary tests + UI verification | New feature development |
|
|
24
|
+
| `bugfix` | Regression tests + root cause confirmation + boundary coverage | Bug fixing |
|
|
25
|
+
| `refactor` | Behavior-unchanged verification + perf baseline + API compat | Refactoring |
|
|
26
|
+
| `migration` | Data consistency + rollback verification + perf comparison | Data/API migration |
|
|
27
|
+
| `api-endpoint` | Request/response contract + error handling + auth checks | API development |
|
|
39
28
|
</boundary>
|
|
40
29
|
|
|
41
30
|
<context>
|
|
42
|
-
$ARGUMENTS
|
|
31
|
+
$ARGUMENTS
|
|
43
32
|
|
|
44
33
|
**Flags:**
|
|
45
34
|
| Flag | Description | Default |
|
|
46
35
|
|------|-------------|---------|
|
|
47
|
-
| `--template <name>` |
|
|
48
|
-
| `--max-iterations N` | Max verify
|
|
36
|
+
| `--template <name>` | Predefined requirement template | -- |
|
|
37
|
+
| `--max-iterations N` | Max verify->fix cycles before escalation | 3 |
|
|
49
38
|
| `--skip-generalize` | Skip S_GENERALIZE + S_DISCOVER | false |
|
|
50
39
|
| `--auto` | CLI delegate calls without confirmation | false |
|
|
51
40
|
| `--method agent\|cli\|auto` | Execution method: Agent tool, CLI delegate, or auto-select | `auto` |
|
|
52
41
|
| `--executor <tool>` | Explicit executor tool for CLI delegate mode | First enabled in config |
|
|
53
42
|
| `--skip-verify` | Skip execution post-validation gate | false |
|
|
54
43
|
| `--heartbeat` | Enable periodic progress heartbeat | false |
|
|
55
|
-
| `-y` | Auto-confirm
|
|
56
|
-
| `-c` | Resume most recent session |
|
|
44
|
+
| `-y` | Auto-confirm -- decisions recorded as `deferred` | false |
|
|
45
|
+
| `-c` | Resume most recent session | -- |
|
|
57
46
|
|
|
58
|
-
**Session**:
|
|
47
|
+
**Session**: `.workflow/scratch/{YYYYMMDD}-planex-odyssey-{slug}/`
|
|
48
|
+
**Output**: `session.json` | `evidence.ndjson` | `understanding.md`
|
|
59
49
|
|
|
60
|
-
**
|
|
61
|
-
```
|
|
62
|
-
SESSION_DIR/
|
|
63
|
-
├── session.json # state + criteria + iterations + plan
|
|
64
|
-
├── evidence.ndjson # append-only log (phase distinguishes origin)
|
|
65
|
-
└── understanding.md # evolving narrative (8 sections, one per phase)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**session.json schema:**
|
|
50
|
+
**session.json -- planex-specific fields:**
|
|
69
51
|
```json
|
|
70
|
-
{
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"acceptance_criteria": [
|
|
76
|
-
{"id":"AC1","criterion":"","verify_method":"test|grep|cli-review|manual","status":"pending","evidence":"","passed_at":null}
|
|
77
|
-
],
|
|
78
|
-
"plan": { "tasks": [{"id":"T1","title":"","description":"","criteria_refs":["AC1"],"status":"pending","files_modified":[],"domain":"general","executor":"agent"}], "created_at":"" },
|
|
79
|
-
"execution_config": {
|
|
80
|
-
"method": "auto",
|
|
81
|
-
"default_executor": "",
|
|
82
|
-
"domain_routing": { "frontend": "", "backend": "", "default": "agent" },
|
|
83
|
-
"code_review_tool": "Skip",
|
|
84
|
-
"verification_tool": "Auto",
|
|
85
|
-
"confirmed": false
|
|
86
|
-
},
|
|
87
|
-
"iterations": [
|
|
88
|
-
{"iteration":1,"started_at":"","completed_at":"","criteria_before":{"passed":0,"total":0},"criteria_after":{"passed":0,"total":0},"gaps_fixed":[],"files_modified":[]}
|
|
89
|
-
],
|
|
52
|
+
{ "requirement": "",
|
|
53
|
+
"acceptance_criteria": [{"id":"AC1","criterion":"","verify_method":"test|grep|cli-review|manual","status":"pending","evidence":"","passed_at":null}],
|
|
54
|
+
"plan": {"tasks":[{"id":"T1","title":"","description":"","criteria_refs":["AC1"],"status":"pending","files_modified":[],"domain":"general","executor":"agent"}],"created_at":""},
|
|
55
|
+
"execution_config": {"method":"auto","default_executor":"","domain_routing":{"frontend":"","backend":"","default":"agent"},"code_review_tool":"Skip","verification_tool":"Auto","confirmed":false},
|
|
56
|
+
"iterations": [{"iteration":1,"started_at":"","completed_at":"","criteria_before":{"passed":0,"total":0},"criteria_after":{"passed":0,"total":0},"gaps_fixed":[],"files_modified":[]}],
|
|
90
57
|
"current_iteration": 0,
|
|
91
|
-
"patterns": [
|
|
92
|
-
{"id":"P1","source":"AC1 fix","layer":"syntax|semantic|structural","signature":"","description":"","risk":"","fix_template":""}
|
|
93
|
-
],
|
|
94
|
-
"generalization_stats": {"patterns_extracted":0,"total_hits":0,"cross_layer_confirmed":0,"by_layer":{"syntax":0,"semantic":0,"structural":0},"deepening_triggered":false},
|
|
95
|
-
"phase_goals": [],
|
|
96
|
-
"phase_goals_all_done": false,
|
|
97
|
-
"self_iteration_log": [],
|
|
98
|
-
"progress_metrics": "→ base",
|
|
99
|
-
"directions_tried": "→ base",
|
|
100
|
-
"cross_phase_loops": 0, "max_loops": 5,
|
|
101
|
-
"created_at": "", "updated_at": ""
|
|
102
|
-
}
|
|
58
|
+
"patterns": [], "generalization_stats": null }
|
|
103
59
|
```
|
|
104
60
|
|
|
105
|
-
**evidence.ndjson
|
|
61
|
+
**evidence.ndjson phases:** `planning|execution|verification|fix|decision|generalization|discovery|self-iteration`
|
|
106
62
|
|
|
107
|
-
**understanding.md
|
|
63
|
+
**understanding.md -- 8 sections:**
|
|
64
|
+
1. Requirement & Criteria <- S_INTAKE | 2. Plan <- S_PLAN | 3. Execution <- S_EXECUTE
|
|
65
|
+
4. Verification (per iter) <- S_VERIFY | 5. Fix Log (per iter) <- S_FIX | 6. Generalization <- S_GENERALIZE
|
|
66
|
+
7. Discoveries <- S_DISCOVER | 8. Learnings <- S_RECORD
|
|
108
67
|
|
|
109
68
|
**phase_goals[]:**
|
|
110
69
|
| ID | Goal | Done When | Phase | Skip When |
|
|
111
70
|
|----|------|-----------|-------|-----------|
|
|
112
|
-
| G1 | Acceptance criteria defined |
|
|
113
|
-
| G2 | Plan created | session.json.plan populated | S_PLAN |
|
|
114
|
-
| G3 | Implementation complete | all plan tasks executed | S_EXECUTE |
|
|
115
|
-
| G4 | All criteria pass | all acceptance_criteria[].status == passed | S_VERIFY |
|
|
116
|
-
| G5 | Pattern generalized | patterns[]
|
|
71
|
+
| G1 | Acceptance criteria defined | >=1 criterion in acceptance_criteria[] | S_INTAKE | -- |
|
|
72
|
+
| G2 | Plan created | session.json.plan populated | S_PLAN | -- |
|
|
73
|
+
| G3 | Implementation complete | all plan tasks executed | S_EXECUTE | -- |
|
|
74
|
+
| G4 | All criteria pass | all acceptance_criteria[].status == passed | S_VERIFY | -- |
|
|
75
|
+
| G5 | Pattern generalized | patterns[] >=1 entry | S_GENERALIZE | skip_generalize |
|
|
117
76
|
| G6 | Discoveries triaged | all scan hits classified | S_DISCOVER | skip_generalize |
|
|
118
|
-
| G7 | Learnings persisted | spec entries created OR no actionable | S_RECORD |
|
|
119
|
-
|
|
120
|
-
### Pre-load(可选,缺失不阻塞)
|
|
121
|
-
|
|
122
|
-
| 层级 | 命令 | 作用 |
|
|
123
|
-
|------|------|------|
|
|
124
|
-
| Codebase docs | Read `.workflow/codebase/ARCHITECTURE.md` | 模块边界,架构约束 |
|
|
125
|
-
| Wiki search | `maestro search "<requirement keywords>" --json` | 先前实现、相关决策(取 top 5) |
|
|
126
|
-
| Coding specs | `maestro load --type spec --category coding` | 编码规范 + 可发现的 knowhow 工具 |
|
|
127
|
-
| UI specs(条件) | 若涉及前端 → `maestro load --type spec --category ui` | UI 规范 |
|
|
128
|
-
| Role knowledge | `maestro search --category coding` → 选相关 → `maestro load --type knowhow --id <id>` | 累积实现领域知识 |
|
|
129
|
-
| Prior sessions | `Glob(".workflow/scratch/*-planex-odyssey-*")` | 相关 odyssey 会话 |
|
|
130
|
-
|
|
131
|
-
### Knowledge Persistence(S_RECORD 中写入产出文件)
|
|
77
|
+
| G7 | Learnings persisted | spec entries created OR no actionable | S_RECORD | -- |
|
|
132
78
|
|
|
133
|
-
S_RECORD
|
|
79
|
+
**Knowledge Persistence (S_RECORD writes to understanding.md S8):**
|
|
134
80
|
|
|
135
|
-
|
|
|
136
|
-
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
81
|
+
| Category | Content | Follow-up |
|
|
82
|
+
|----------|---------|-----------|
|
|
83
|
+
| Multi-round fix cycle pattern | Problem scenario + fix iterations + final approach | `/spec-add debug` |
|
|
84
|
+
| Reusable implementation pattern | Pattern description + applicable scope + code template | `/spec-add coding` |
|
|
85
|
+
| Acceptance criteria template | Criteria template + verify_method recommendations | `/spec-add review` |
|
|
86
|
+
| Generalization pattern | Pattern signature + risk + fix template | `/spec-add coding` |
|
|
141
87
|
</context>
|
|
142
88
|
|
|
89
|
+
<invariants>
|
|
90
|
+
Base invariants apply. Additionally:
|
|
91
|
+
6. **Acceptance criteria are sacred** -- no "close enough", no manual override without explicit escalation
|
|
92
|
+
</invariants>
|
|
93
|
+
|
|
143
94
|
<self_iteration>
|
|
144
|
-
|
|
95
|
+
Applies to: **S_PLAN, S_VERIFY, S_GENERALIZE**. Logic in base.
|
|
145
96
|
</self_iteration>
|
|
146
97
|
|
|
147
98
|
<csv_schema>
|
|
@@ -171,64 +122,62 @@ id,title,description,task_type,criterion_refs,deps,wave,status,findings,evidence
|
|
|
171
122
|
```
|
|
172
123
|
|
|
173
124
|
**Waves:**
|
|
174
|
-
- Wave 1: Verification agents (one per `cli-review` criterion)
|
|
175
|
-
- Wave 2: Generalization agents (syntax-grep, semantic-scan, structural-match, historical-grep)
|
|
125
|
+
- Wave 1: Verification agents (one per `cli-review` criterion) -- parallel
|
|
126
|
+
- Wave 2: Generalization agents (syntax-grep, semantic-scan, structural-match, historical-grep) -- parallel
|
|
176
127
|
</csv_schema>
|
|
177
128
|
|
|
178
129
|
<state_machine>
|
|
179
130
|
|
|
180
131
|
<states>
|
|
181
|
-
S_INTAKE
|
|
182
|
-
S_PLAN
|
|
183
|
-
S_EXECUTE
|
|
184
|
-
S_VERIFY
|
|
185
|
-
S_FIX
|
|
186
|
-
S_GENERALIZE
|
|
187
|
-
S_DISCOVER
|
|
188
|
-
S_RECORD
|
|
132
|
+
S_INTAKE -- parse requirement, define acceptance criteria
|
|
133
|
+
S_PLAN -- decompose tasks, generate execution plan
|
|
134
|
+
S_EXECUTE -- implement tasks
|
|
135
|
+
S_VERIFY -- iron gate: check every acceptance criterion
|
|
136
|
+
S_FIX -- targeted fix for failing criteria (loops to VERIFY)
|
|
137
|
+
S_GENERALIZE -- extract patterns, 4-agent scan
|
|
138
|
+
S_DISCOVER -- triage scan hits, route decisions
|
|
139
|
+
S_RECORD -- persist learnings, final summary
|
|
189
140
|
</states>
|
|
190
141
|
|
|
191
142
|
<transitions>
|
|
192
|
-
S_INTAKE
|
|
193
|
-
S_INTAKE
|
|
194
|
-
S_INTAKE
|
|
143
|
+
S_INTAKE -> S_INTAKE : -c + session found (resume)
|
|
144
|
+
S_INTAKE -> S_PLAN : requirement + criteria defined
|
|
145
|
+
S_INTAKE -> S_INTAKE : no requirement -> request_user_input
|
|
195
146
|
|
|
196
|
-
S_PLAN
|
|
197
|
-
S_EXECUTE
|
|
147
|
+
S_PLAN -> S_EXECUTE
|
|
148
|
+
S_EXECUTE -> S_VERIFY
|
|
198
149
|
|
|
199
|
-
S_VERIFY
|
|
200
|
-
S_VERIFY
|
|
201
|
-
S_VERIFY
|
|
202
|
-
S_VERIFY
|
|
203
|
-
S_VERIFY
|
|
150
|
+
S_VERIFY -> S_GENERALIZE : all passed AND NOT skip_generalize
|
|
151
|
+
S_VERIFY -> S_RECORD : all passed AND skip_generalize
|
|
152
|
+
S_VERIFY -> S_FIX : some failed AND iteration < max
|
|
153
|
+
S_VERIFY -> S_PLAN : fundamental plan flaw discovered, loops < max_loops -> cross_phase_loops++ (replan)
|
|
154
|
+
S_VERIFY -> S_RECORD : some failed AND iteration >= max (escalate)
|
|
204
155
|
|
|
205
|
-
S_FIX
|
|
156
|
+
S_FIX -> S_VERIFY (loop)
|
|
206
157
|
|
|
207
|
-
S_GENERALIZE
|
|
208
|
-
S_GENERALIZE
|
|
158
|
+
S_GENERALIZE -> S_DISCOVER : hits found
|
|
159
|
+
S_GENERALIZE -> S_RECORD : no hits
|
|
209
160
|
|
|
210
|
-
S_DISCOVER
|
|
211
|
-
S_DISCOVER
|
|
212
|
-
S_DISCOVER
|
|
161
|
+
S_DISCOVER -> S_EXECUTE : discovery finds area needing same implementation -> cross_phase_loops++
|
|
162
|
+
S_DISCOVER -> S_RECORD : triage complete AND remaining_actionable == 0
|
|
163
|
+
S_DISCOVER -> S_RECORD : loops >= max_loops -> MUST log per-item reasons
|
|
213
164
|
|
|
214
|
-
S_RECORD
|
|
165
|
+
S_RECORD -> END
|
|
215
166
|
</transitions>
|
|
216
167
|
|
|
217
168
|
<actions>
|
|
218
169
|
|
|
219
170
|
### A_INTAKE
|
|
220
|
-
|
|
221
171
|
1. Parse requirement and flags, generate slug, create SESSION_DIR
|
|
222
|
-
2. **Define acceptance criteria**
|
|
172
|
+
2. **Define acceptance criteria** -- analyze requirement -> derive testable criteria. Each gets `verify_method`: test | grep | cli-review | manual
|
|
223
173
|
- **Normal**: request_user_input to confirm/edit
|
|
224
174
|
- **`-y`**: auto-derive, record `{"phase":"decision","type":"criteria-confirmation","status":"deferred"}`
|
|
225
175
|
3. Search prior knowledge: `maestro search`, related sessions
|
|
226
|
-
4. Write session.json + understanding.md
|
|
176
|
+
4. Write session.json + understanding.md S1. Mark G1 done. Display Goal Prompt
|
|
227
177
|
|
|
228
|
-
|
|
178
|
+
Commit: `"odyssey-planex({slug}): INTAKE -- requirement parsed"`
|
|
229
179
|
|
|
230
180
|
### A_PLAN
|
|
231
|
-
|
|
232
181
|
1. Decompose requirement into ordered tasks mapped to acceptance criteria
|
|
233
182
|
2. CLI-assisted planning (optional):
|
|
234
183
|
```bash
|
|
@@ -239,10 +188,10 @@ S_RECORD → END
|
|
|
239
188
|
EXPECTED: JSON [{task_id, title, description, criteria_refs, deps}]
|
|
240
189
|
" --role analyze --mode analysis
|
|
241
190
|
```
|
|
242
|
-
Execute with `run_in_background: true`,
|
|
243
|
-
3. Write session.json.plan, append evidence (planning), update understanding.md
|
|
191
|
+
Execute with `run_in_background: true`, wait for callback.
|
|
192
|
+
3. Write session.json.plan, append evidence (planning), update understanding.md S2. Mark G2 done.
|
|
244
193
|
|
|
245
|
-
|
|
194
|
+
Commit: `"odyssey-planex({slug}): PLAN -- tasks decomposed"`
|
|
246
195
|
|
|
247
196
|
### A_EXECUTE
|
|
248
197
|
|
|
@@ -250,43 +199,42 @@ S_RECORD → END
|
|
|
250
199
|
|
|
251
200
|
**Skip if** `-y` flag OR `--method` explicitly set OR `execution_config.confirmed == true` (resume).
|
|
252
201
|
|
|
253
|
-
Load available tools: `maestro delegate-config show --json`
|
|
202
|
+
Load available tools: `maestro delegate-config show --json` -> extract enabled tools and domain tags.
|
|
254
203
|
|
|
255
204
|
```
|
|
256
205
|
request_user_input({
|
|
257
206
|
questions: [
|
|
258
207
|
{
|
|
259
|
-
question: "
|
|
208
|
+
question: "How should tasks be executed? Choose a method, or Other to specify domain routing (e.g. 'frontend agy backend codex rest agent')",
|
|
260
209
|
header: "Executor",
|
|
261
210
|
options: [
|
|
262
|
-
{ label: "Auto (Recommended)", description: "
|
|
263
|
-
{ label: "Agent", description: "Claude Code Agent
|
|
264
|
-
...availableTools.map(t => ({ label: t, description: `${t} CLI
|
|
211
|
+
{ label: "Auto (Recommended)", description: "Domain routing: frontend->{frontendTool}, backend->{backendTool}, general->agent" },
|
|
212
|
+
{ label: "Agent", description: "Claude Code Agent executes all tasks (fastest)" },
|
|
213
|
+
...availableTools.map(t => ({ label: t, description: `${t} CLI executes all tasks` }))
|
|
265
214
|
]
|
|
266
215
|
},
|
|
267
216
|
{
|
|
268
|
-
question: "
|
|
217
|
+
question: "Run code review after execution?",
|
|
269
218
|
header: "Review",
|
|
270
219
|
options: [
|
|
271
|
-
{ label: "Skip", description: "
|
|
272
|
-
...availableTools.map(t => ({ label: `${t} Review`, description: `${t} CLI: git diff
|
|
220
|
+
{ label: "Skip", description: "No review" },
|
|
221
|
+
...availableTools.map(t => ({ label: `${t} Review`, description: `${t} CLI: git diff quality review` }))
|
|
273
222
|
]
|
|
274
223
|
},
|
|
275
224
|
{
|
|
276
|
-
question: "
|
|
225
|
+
question: "Verification gate? (external model checks convergence + structure + anti-patterns)",
|
|
277
226
|
header: "Verify",
|
|
278
227
|
options: [
|
|
279
|
-
{ label: "Auto (Recommended)", description: `Delegate
|
|
280
|
-
...availableTools.map(t => ({ label: t, description: `${t}:
|
|
281
|
-
{ label: "Skip", description: "
|
|
228
|
+
{ label: "Auto (Recommended)", description: `Delegate to ${availableTools[0]} for convergence+structure+anti-pattern check` },
|
|
229
|
+
...availableTools.map(t => ({ label: t, description: `${t}: verification gate` })),
|
|
230
|
+
{ label: "Skip", description: "No verification" }
|
|
282
231
|
]
|
|
283
232
|
}
|
|
284
233
|
]
|
|
285
234
|
})
|
|
286
235
|
```
|
|
287
236
|
|
|
288
|
-
Parse response
|
|
289
|
-
|
|
237
|
+
Parse response -> write `execution_config` to session.json, set `confirmed: true`.
|
|
290
238
|
`--skip-verify` flag overrides verification to `"Skip"`.
|
|
291
239
|
|
|
292
240
|
#### Step 2: Executor Resolution
|
|
@@ -299,7 +247,7 @@ Per-task domain routing (when method == "auto"):
|
|
|
299
247
|
| backend | API, server, database, service, algorithm, worker | .go/.rs/.java/.py/.sql/.proto |
|
|
300
248
|
| general | mixed, config, tests, unclear | .ts/.js/other |
|
|
301
249
|
|
|
302
|
-
Resolution: `execution_config.domain_routing[domain]`
|
|
250
|
+
Resolution: `execution_config.domain_routing[domain]` -> fallback `domain_routing.default` ("agent").
|
|
303
251
|
|
|
304
252
|
#### Step 3: Task Execution
|
|
305
253
|
|
|
@@ -309,7 +257,7 @@ Execute tasks per plan order. Independent tasks (no cross-dependency) may run in
|
|
|
309
257
|
```
|
|
310
258
|
Spawn Agent with:
|
|
311
259
|
task definition, acceptance criteria refs, prior task summaries, specs_content
|
|
312
|
-
Agent implements
|
|
260
|
+
Agent implements -> verifies convergence criteria -> auto-fix (max 3) -> returns result
|
|
313
261
|
```
|
|
314
262
|
|
|
315
263
|
**CLI path (via maestro delegate):**
|
|
@@ -335,13 +283,13 @@ ${prior_summaries}
|
|
|
335
283
|
" --to ${resolved_executor} --mode write --id planex-${slug}-${task_id}
|
|
336
284
|
```
|
|
337
285
|
|
|
338
|
-
|
|
286
|
+
Execute with `run_in_background: true`, wait for callback.
|
|
339
287
|
|
|
340
|
-
**Deviation Rule**
|
|
288
|
+
**Deviation Rule** -- max 3 auto-fix attempts per task:
|
|
341
289
|
1. First attempt: normal dispatch
|
|
342
290
|
2. Retry: `--resume planex-${slug}-${task_id}` with simplified prompt
|
|
343
291
|
3. Final: fallback to Agent path
|
|
344
|
-
4. All 3 fail
|
|
292
|
+
4. All 3 fail -> mark task `blocked`, record checkpoint, continue remaining tasks
|
|
345
293
|
|
|
346
294
|
#### Step 4: Per-Task Evidence
|
|
347
295
|
|
|
@@ -353,15 +301,15 @@ Per completed task:
|
|
|
353
301
|
|
|
354
302
|
**Skip if** `execution_config.verification_tool == "Skip"` OR `--skip-verify` OR no completed tasks.
|
|
355
303
|
|
|
356
|
-
**Check 1: Summary Consistency**
|
|
304
|
+
**Check 1: Summary Consistency** -- cross-check task status vs actual file changes (git diff).
|
|
357
305
|
|
|
358
|
-
**Check 2: CLI Verification Gate
|
|
306
|
+
**Check 2: CLI Verification Gate:**
|
|
359
307
|
```bash
|
|
360
308
|
maestro delegate "PURPOSE: Verify execution output meets acceptance criteria; success = all criteria verified with file:line evidence
|
|
361
309
|
TASK:
|
|
362
310
|
1. CONVERGENCE: For each criterion, read actual code, verify behavior exists, report status with evidence
|
|
363
311
|
2. EXISTENCE: Verify all expected files exist on disk
|
|
364
|
-
3. SUBSTANCE: Verify real implementation
|
|
312
|
+
3. SUBSTANCE: Verify real implementation -- flag stubs, placeholders, TODO-only
|
|
365
313
|
4. ANTI-PATTERNS: Scan for TODO/FIXME/HACK, console.log debug, disabled tests
|
|
366
314
|
MODE: analysis
|
|
367
315
|
CONTEXT: @${modified_files}
|
|
@@ -376,11 +324,11 @@ ${modified_files.join('\n')}
|
|
|
376
324
|
" --to ${execution_config.verification_tool} --mode analysis
|
|
377
325
|
```
|
|
378
326
|
|
|
379
|
-
Execute with `run_in_background: true`,
|
|
327
|
+
Execute with `run_in_background: true`, wait for callback.
|
|
380
328
|
|
|
381
329
|
On result:
|
|
382
|
-
- `overall == "passed"`
|
|
383
|
-
- `overall == "gaps_found"`
|
|
330
|
+
- `overall == "passed"` -> proceed to S_VERIFY with boosted confidence
|
|
331
|
+
- `overall == "gaps_found"` -> log findings, proceed to S_VERIFY (criteria will catch failures)
|
|
384
332
|
|
|
385
333
|
**Check 3: Code Review** (if `execution_config.code_review_tool != "Skip"`):
|
|
386
334
|
```bash
|
|
@@ -389,13 +337,13 @@ maestro delegate "Review git diff for correctness, style, bugs" --to ${code_revi
|
|
|
389
337
|
|
|
390
338
|
#### Step 6: Completion
|
|
391
339
|
|
|
392
|
-
Update understanding.md
|
|
340
|
+
Update understanding.md S3. Mark G3 done.
|
|
393
341
|
|
|
394
|
-
|
|
342
|
+
Commit: `"odyssey-planex({slug}): EXECUTE -- implementation complete"`
|
|
395
343
|
|
|
396
344
|
### A_VERIFY
|
|
397
345
|
|
|
398
|
-
Iron gate
|
|
346
|
+
Iron gate -- every acceptance criterion checked objectively.
|
|
399
347
|
|
|
400
348
|
**Verify each criterion by method:**
|
|
401
349
|
| Method | Action |
|
|
@@ -405,7 +353,7 @@ Iron gate — every acceptance criterion checked objectively.
|
|
|
405
353
|
| `cli-review` | `spawn_agents_on_csv` Wave 1 (see csv_schema) |
|
|
406
354
|
| `manual` | **Normal**: request_user_input / **`-y`**: record `deferred` |
|
|
407
355
|
|
|
408
|
-
**Wave 1
|
|
356
|
+
**Wave 1 -- cli-review verification via spawn_agents_on_csv:**
|
|
409
357
|
```csv
|
|
410
358
|
"verify-AC1","Verify AC1","Review against criterion: {AC1.criterion}","verification","AC1","","1","pending","","",""
|
|
411
359
|
```
|
|
@@ -418,16 +366,15 @@ spawn_agents_on_csv({ csv_path: "tasks.csv", id_column: "id",
|
|
|
418
366
|
|
|
419
367
|
Record per criterion: `{"phase":"verification","type":"criterion-check","criterion_id":"AC1","method":"","result":"passed|failed","evidence":"","iteration":N}`. Update acceptance_criteria[].status. Append to iterations[].
|
|
420
368
|
|
|
421
|
-
Update understanding.md
|
|
369
|
+
Update understanding.md S4 with pass/fail table.
|
|
422
370
|
|
|
423
|
-
**Route:** all passed
|
|
371
|
+
**Route:** all passed -> mark G4 done -> next state. Some failed + iteration < max -> S_FIX. Some failed + iteration >= max -> **Normal**: request_user_input (continue/lower bar/accept) / **`-y`**: `deferred`, proceed S_RECORD.
|
|
424
372
|
|
|
425
|
-
|
|
373
|
+
Commit: `"odyssey-planex({slug}): VERIFY -- acceptance check"`
|
|
426
374
|
|
|
427
375
|
### A_FIX
|
|
428
|
-
|
|
429
376
|
1. Increment current_iteration
|
|
430
|
-
2. For each failed criterion: diagnose gap
|
|
377
|
+
2. For each failed criterion: diagnose gap -> targeted code fix
|
|
431
378
|
3. CLI fix review (optional):
|
|
432
379
|
```bash
|
|
433
380
|
maestro delegate "PURPOSE: Review fixes for failing criteria
|
|
@@ -437,15 +384,14 @@ Update understanding.md §4 with pass/fail table.
|
|
|
437
384
|
EXPECTED: JSON {verdict, regression_risk, concerns}
|
|
438
385
|
" --role review --mode analysis
|
|
439
386
|
```
|
|
440
|
-
4. Append evidence (fix), update understanding.md
|
|
387
|
+
4. Append evidence (fix), update understanding.md S5 -> S_VERIFY
|
|
441
388
|
|
|
442
|
-
|
|
389
|
+
Commit: `"odyssey-planex({slug}): FIX -- targeted repair"`
|
|
443
390
|
|
|
444
391
|
### A_GENERALIZE
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
**Wave 2 — 4-agent scan via spawn_agents_on_csv:**
|
|
392
|
+
Base shared_actions. Planex overrides:
|
|
393
|
+
- Pattern source: implementation patterns
|
|
394
|
+
- **Wave 2 -- 4-agent scan via spawn_agents_on_csv:**
|
|
449
395
|
```csv
|
|
450
396
|
"gen-syntax","Syntax Grep","Grep patterns across project","generalization","syntax","","2","pending","","",""
|
|
451
397
|
"gen-semantic","Semantic Scan","Check related modules for anti-pattern","generalization","semantic","","2","pending","","",""
|
|
@@ -453,70 +399,37 @@ Update understanding.md §4 with pass/fail table.
|
|
|
453
399
|
"gen-historical","Historical Grep","git log -S for similar patterns","generalization","historical","","2","pending","","",""
|
|
454
400
|
```
|
|
455
401
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-planex({slug}): GENERALIZE — 泛化扫描"`
|
|
402
|
+
Mark G5 done. Commit: `"odyssey-planex({slug}): GENERALIZE -- pattern scan"`
|
|
459
403
|
|
|
460
404
|
### A_DISCOVER
|
|
461
|
-
|
|
462
|
-
按 base A_DISCOVER 执行。Mark G6 done.
|
|
463
|
-
|
|
464
|
-
📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-planex({slug}): DISCOVER — 发现分类"`
|
|
405
|
+
Base shared_actions. Mark G6 done. Commit: `"odyssey-planex({slug}): DISCOVER -- triage complete"`
|
|
465
406
|
|
|
466
407
|
### A_RECORD
|
|
408
|
+
Base shared_actions. Learnings per Knowledge Persistence table.
|
|
467
409
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
Goals: {done}/{total} confirmed ({skipped} skipped)
|
|
484
|
-
Status: {ALL_PASSED|PARTIAL|ESCALATED}
|
|
485
|
-
---
|
|
486
|
-
```
|
|
487
|
-
6. 其余按 base A_RECORD 执行。
|
|
410
|
+
**Completion summary:**
|
|
411
|
+
```
|
|
412
|
+
--- PLANEX ODYSSEY COMPLETE ---
|
|
413
|
+
Requirement: {requirement}
|
|
414
|
+
Criteria: {passed}/{total} passed
|
|
415
|
+
Iterations: {N} cycles
|
|
416
|
+
Patterns: {patterns_extracted} ({by_layer} distribution)
|
|
417
|
+
Scan hits: {total_hits} ({cross_layer_confirmed} cross-layer confirmed)
|
|
418
|
+
Issues: {N} created | Decisions: {N} resolved, {M} pending, {K} deferred
|
|
419
|
+
Learnings: {N} spec entries
|
|
420
|
+
Self-iter: {N} rounds across {M} stages
|
|
421
|
+
Goals: {done}/{total} confirmed ({skipped} skipped)
|
|
422
|
+
Status: {ALL_PASSED|PARTIAL|ESCALATED}
|
|
423
|
+
---
|
|
424
|
+
```
|
|
488
425
|
|
|
489
|
-
|
|
426
|
+
Commit: `"odyssey-planex({slug}): RECORD -- session summary"`
|
|
490
427
|
|
|
491
428
|
</actions>
|
|
492
429
|
|
|
493
430
|
<appendix>
|
|
494
431
|
|
|
495
|
-
###
|
|
496
|
-
|
|
497
|
-
**⚠️ 时机守卫:仅在 A_INTAKE 完成后显示一次(session 创建后、开始 Plan 前)。A_RECORD 完成时禁止重新显示。**
|
|
498
|
-
|
|
499
|
-
```
|
|
500
|
-
📋 Planex Odyssey 会话已创建。可随时复制以下 /goal 设定终止条件(执行过程中输入即可):
|
|
501
|
-
|
|
502
|
-
/goal 完成以下目标:
|
|
503
|
-
{for each G in phase_goals where status != "skipped":}
|
|
504
|
-
- {G.id}: {G.goal} — 完成条件: {G.done_when}
|
|
505
|
-
{end for}
|
|
506
|
-
验收标准:
|
|
507
|
-
{for each AC in acceptance_criteria:}
|
|
508
|
-
- {AC.id}: {AC.criterion} (验证方式: {AC.verify_method})
|
|
509
|
-
{end for}
|
|
510
|
-
穷尽迭代:直到 acceptance_criteria[*] 全部 status==passed
|
|
511
|
-
且 phase_goals_all_done=true 才停。verify 失败自动 fix→re-verify 循环。
|
|
512
|
-
每轮修复后重新验证,新发现的标准违反继续修,不超过 max_iterations。
|
|
513
|
-
遇到 phase=decision 的 pending 必须 request_user_input,不得自行 resolve。
|
|
514
|
-
不允许"接近通过",验收标准必须 ALL pass。
|
|
515
|
-
```
|
|
516
|
-
|
|
517
|
-
完成时仅输出 completion summary,不重复此提示。
|
|
518
|
-
|
|
519
|
-
### `-y` Auto-Confirm Behavior
|
|
432
|
+
### `-y` planex-specific points
|
|
520
433
|
|
|
521
434
|
| Decision Point | Normal | `-y` |
|
|
522
435
|
|----------------|--------|------|
|
|
@@ -525,19 +438,26 @@ Pattern 来源: implementation patterns。Mark G5 done.
|
|
|
525
438
|
| S_EXECUTE task blocked (3 retries) | request_user_input: continue or stop | auto continue, log blocked |
|
|
526
439
|
| S_VERIFY manual criterion | request_user_input | `deferred` |
|
|
527
440
|
| S_VERIFY max iteration reached | request_user_input | auto accept, `deferred` |
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
441
|
+
|
|
442
|
+
### Goal Prompt convergence rules
|
|
443
|
+
|
|
444
|
+
```
|
|
445
|
+
Stop when acceptance_criteria[*] all status==passed
|
|
446
|
+
AND phase_goals_all_done=true.
|
|
447
|
+
verify failure -> auto fix->re-verify loop.
|
|
448
|
+
Each fix round re-verifies; new criterion violations continue fixing, up to max_iterations.
|
|
449
|
+
phase=decision pending -> must request_user_input, never self-resolve.
|
|
450
|
+
No "close enough" -- all criteria must pass.
|
|
451
|
+
```
|
|
532
452
|
|
|
533
453
|
### Iteration Model
|
|
534
454
|
|
|
535
455
|
```
|
|
536
|
-
S_EXECUTE
|
|
537
|
-
|
|
538
|
-
some fail + iter < max
|
|
539
|
-
|
|
540
|
-
S_FIX
|
|
456
|
+
S_EXECUTE -> S_VERIFY --all pass--> S_GENERALIZE -> S_DISCOVER -> S_RECORD
|
|
457
|
+
| |
|
|
458
|
+
some fail + iter < max no hits -> S_RECORD
|
|
459
|
+
v
|
|
460
|
+
S_FIX --> S_VERIFY (loop)
|
|
541
461
|
```
|
|
542
462
|
|
|
543
463
|
Max iterations (default 3) prevents infinite loops. Each iteration records criteria_before, gaps_fixed, criteria_after.
|
|
@@ -556,13 +476,13 @@ Max iterations (default 3) prevents infinite loops. Each iteration records crite
|
|
|
556
476
|
</error_codes>
|
|
557
477
|
|
|
558
478
|
<success_criteria>
|
|
559
|
-
- [ ] Requirement parsed with
|
|
479
|
+
- [ ] Requirement parsed with >=1 acceptance criterion (verify_method assigned)
|
|
560
480
|
- [ ] Plan tasks mapped to criteria; execution options confirmed
|
|
561
481
|
- [ ] Tasks dispatched via resolved executor with deviation rule (max 3 retries)
|
|
562
482
|
- [ ] Post-execution validation gate run (unless --skip-verify)
|
|
563
|
-
- [ ] Every criterion verified per method; failing
|
|
483
|
+
- [ ] Every criterion verified per method; failing -> targeted fix (not re-implementation)
|
|
564
484
|
- [ ] Iteration count tracked and max respected; unfixed criteria individually classified
|
|
565
|
-
- [ ] understanding.md
|
|
485
|
+
- [ ] understanding.md S1-S8 updated per phase; phase_goals G1-G7 audited
|
|
566
486
|
- [ ] Generalization + discovery completed (unless --skip-generalize)
|
|
567
487
|
- [ ] Quality Gate self-iteration triggered when insufficient
|
|
568
488
|
- [ ] Goal Prompt displayed once after intake; `-y` mode: no blocking prompts
|