maestro-flow 0.5.40 → 0.5.41
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/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/.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/.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/.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/tools/spec-loader.js +27 -19
- 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/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/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 +27 -19
- 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/package.json +1 -1
- package/workflows/odyssey-base-codex.md +306 -0
|
@@ -4,34 +4,25 @@ description: "Deep review + fix cycle — archaeology, exploration, multi-dimens
|
|
|
4
4
|
argument-hint: "<target> [--dimensions <list>] [--fix-threshold critical|high|medium|low|all] [--skip-fix] [--skip-generalize] [--auto] [-y] [-c] [--heartbeat]"
|
|
5
5
|
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
6
|
---
|
|
7
|
-
<base>@~/.maestro/workflows/odyssey-base.md</base>
|
|
7
|
+
<base>@~/.maestro/workflows/odyssey-base-codex.md</base>
|
|
8
8
|
|
|
9
9
|
<purpose>
|
|
10
|
-
|
|
11
|
-
fix ALL findings → confirm → generalize → discover → persist. Zero-residual philosophy.
|
|
12
|
-
|
|
13
|
-
**三句哲学约束(穷尽迭代):**
|
|
14
|
-
1. **零遗留** — 每个 finding 必须是 action item(修复 / issue / 决策),不允许只报告不处理
|
|
15
|
-
2. **穷尽迭代** — 按 severity 从高到低逐轮修复,直到 0 remaining actionable findings 才退出 fix loop
|
|
16
|
-
3. **改进即标准** — 每次修复后重审同区域,发现新问题继续修,直到该区域无可改善
|
|
17
|
-
|
|
18
|
-
Core behaviors:
|
|
19
|
-
- **Find one, fix one, find all** — every finding triggers fix + codebase-wide scan
|
|
20
|
-
- **Record everything** — ambiguous items → decision journal, never silent skip
|
|
21
|
-
- **CLI-assisted** — delegate for multi-angle analysis
|
|
10
|
+
archaeology → explore → multi-dimensional review → fix ALL findings → confirm → generalize → discover → persist. Zero-residual: every finding must have an action (fix/issue/decision).
|
|
22
11
|
</purpose>
|
|
23
12
|
|
|
24
13
|
<boundary>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
**
|
|
14
|
+
**In scope:** Target code multi-dimensional review → exhaustive fix ALL findings (by severity desc) → generalize patterns project-wide.
|
|
15
|
+
**Out of scope:** Deep root cause → `$odyssey-debug` | Requirements → `$odyssey-planex` | UI visual → `$odyssey-ui`
|
|
16
|
+
|
|
17
|
+
**Review dimensions:** correctness, security, performance, architecture (filterable via `--dimensions`).
|
|
18
|
+
**Zero-residual:** Every finding MUST have a concrete action. "Report and shelve" and "pre-existing skip" are forbidden.
|
|
29
19
|
</boundary>
|
|
30
20
|
|
|
31
21
|
<context>
|
|
32
|
-
$ARGUMENTS
|
|
22
|
+
$ARGUMENTS
|
|
33
23
|
|
|
34
24
|
**Target resolution:**
|
|
25
|
+
|
|
35
26
|
| Input | Resolution |
|
|
36
27
|
|-------|-----------|
|
|
37
28
|
| File/dir path | Review those files |
|
|
@@ -39,44 +30,48 @@ $ARGUMENTS — target and optional flags.
|
|
|
39
30
|
| Phase number | state.json → changed files |
|
|
40
31
|
| PR number | `git diff main...HEAD` |
|
|
41
32
|
|
|
42
|
-
**Flags:**
|
|
43
|
-
| Flag | Effect | Default |
|
|
44
|
-
|------|--------|---------|
|
|
45
|
-
| `--dimensions` | Comma-separated subset | correctness,security,performance,architecture |
|
|
46
|
-
| `--fix-threshold` | 修复到哪个 severity 为止 | `all` |
|
|
47
|
-
| `--skip-fix` | Skip S_FIX + S_CONFIRM | false |
|
|
48
|
-
| `--skip-generalize` | Skip S_GENERALIZE + S_DISCOVER | false |
|
|
49
|
-
| `--auto` `-y` `-c` `--heartbeat` | CLI auto / auto-confirm / resume / heartbeat | false |
|
|
33
|
+
**Flags:** `--dimensions <list>` subset of 4 dims | `--fix-threshold <sev>` default `all` | `--skip-fix` skip S_FIX+S_CONFIRM | `--skip-generalize` skip S_GENERALIZE+S_DISCOVER | `--auto` `-y` `-c` `--heartbeat`
|
|
50
34
|
|
|
51
35
|
**Session**: `.workflow/scratch/{YYYYMMDD}-review-odyssey-{slug}/`
|
|
52
|
-
**Output**: session.json
|
|
53
|
-
|
|
54
|
-
**
|
|
36
|
+
**Output**: `session.json` | `evidence.ndjson` | `explore.json` | `understanding.md` (sections 1-8)
|
|
37
|
+
|
|
38
|
+
**session.json — review-specific fields:**
|
|
39
|
+
```json
|
|
40
|
+
{ "target": "", "dimensions": [], "review_result": { "remaining_actionable": 0 },
|
|
41
|
+
"patterns": [], "confirmation": null, "generalization_stats": null }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**evidence.ndjson phases:** `archaeology|explore|review|fix|discovery|decision|self-iteration`
|
|
55
45
|
|
|
56
46
|
**phase_goals[]:**
|
|
57
|
-
|
|
47
|
+
|
|
48
|
+
| ID | Goal | done_when | phase | skip_when |
|
|
58
49
|
|----|------|-----------|-------|-----------|
|
|
59
50
|
| G1 | Review completed | all dimensions reviewed | S_REVIEW | — |
|
|
60
51
|
| G2 | Explore context | explore.json populated | S_EXPLORE | — |
|
|
61
52
|
| G3 | Zero remaining | `remaining_actionable == 0` | S_CONFIRM | skip_fix |
|
|
62
|
-
| G4 | Pattern generalized | patterns[]
|
|
53
|
+
| G4 | Pattern generalized | patterns[] >= 1 | S_GENERALIZE | skip_generalize |
|
|
63
54
|
| G5 | Discoveries triaged | all hits classified | S_DISCOVER | skip_generalize |
|
|
64
55
|
| G6 | Learnings persisted | spec entries or no actionable | S_RECORD | — |
|
|
65
56
|
|
|
66
|
-
|
|
67
|
-
Specs: `maestro load --type spec --category review`。其余按 base Pre-load。
|
|
57
|
+
Specs: `maestro load --type spec --category review`. Rest per base Pre-load.
|
|
68
58
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
59
|
+
**Knowledge Persistence (S_RECORD → understanding.md section 8):**
|
|
60
|
+
|
|
61
|
+
| Category | Content | Follow-up |
|
|
62
|
+
|----------|---------|-----------|
|
|
63
|
+
| Cross-dimension recurring pattern | Pattern + affected dimensions + coding standard | `$spec-add review` |
|
|
64
|
+
| Security finding | Vulnerability type + trigger + fix approach | `$spec-add debug` |
|
|
65
|
+
| Architecture violation pattern | Violation + correct boundary + verification | `$spec-add arch` |
|
|
66
|
+
| Reusable generalization pattern | Signature + risk + fix template | `$spec-add coding` |
|
|
76
67
|
</context>
|
|
77
68
|
|
|
69
|
+
<invariants>
|
|
70
|
+
Base invariants + auto-commit per phase + zero silent drops (every finding → action).
|
|
71
|
+
</invariants>
|
|
72
|
+
|
|
78
73
|
<self_iteration>
|
|
79
|
-
|
|
74
|
+
Applies to: **S_ARCHAEOLOGY, S_EXPLORE, S_REVIEW, S_FIX, S_GENERALIZE**. Logic in base.
|
|
80
75
|
</self_iteration>
|
|
81
76
|
|
|
82
77
|
<csv_schema>
|
|
@@ -104,6 +99,7 @@ id,title,description,task_type,dimension,deps,wave,status,findings,evidence,erro
|
|
|
104
99
|
```
|
|
105
100
|
|
|
106
101
|
**Waves:**
|
|
102
|
+
|
|
107
103
|
| Wave | Tasks | Parallelism |
|
|
108
104
|
|------|-------|-------------|
|
|
109
105
|
| 1 | Archaeology (git-timeline, git-blame) | 2 agents |
|
|
@@ -112,24 +108,41 @@ id,title,description,task_type,dimension,deps,wave,status,findings,evidence,erro
|
|
|
112
108
|
</csv_schema>
|
|
113
109
|
|
|
114
110
|
<state_machine>
|
|
111
|
+
|
|
115
112
|
<states>
|
|
116
113
|
S_INTAKE → S_ARCHAEOLOGY → S_EXPLORE → S_REVIEW → S_FIX → S_CONFIRM → S_GENERALIZE → S_DISCOVER → S_RECORD → END
|
|
117
114
|
Skip: --skip-fix skips S_FIX+S_CONFIRM | --skip-generalize skips S_GENERALIZE+S_DISCOVER
|
|
118
115
|
</states>
|
|
119
116
|
|
|
120
117
|
<transitions>
|
|
121
|
-
S_INTAKE
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
S_INTAKE → S_INTAKE : -c + session found → resume
|
|
119
|
+
S_INTAKE → S_ARCHAEOLOGY : target resolved
|
|
120
|
+
S_INTAKE → S_INTAKE : no target → request_user_input
|
|
121
|
+
|
|
122
|
+
S_ARCHAEOLOGY → S_EXPLORE : complete
|
|
123
|
+
S_EXPLORE → S_REVIEW : complete
|
|
124
|
+
|
|
125
|
+
S_REVIEW → S_FIX : !skip_fix AND findings
|
|
126
|
+
S_REVIEW → S_GENERALIZE : skip_fix OR no findings, !skip_gen
|
|
127
|
+
S_REVIEW → S_RECORD : both skip
|
|
128
|
+
|
|
129
|
+
S_FIX → S_CONFIRM : fix implemented
|
|
130
|
+
S_CONFIRM → S_GENERALIZE : confirmed, !skip_gen
|
|
131
|
+
S_CONFIRM → S_RECORD : confirmed, skip_gen
|
|
132
|
+
S_CONFIRM → S_FIX : needs_rework
|
|
133
|
+
|
|
134
|
+
S_GENERALIZE → S_DISCOVER : hits
|
|
135
|
+
S_GENERALIZE → S_RECORD : no hits
|
|
136
|
+
|
|
137
|
+
S_DISCOVER → S_FIX : fixable sibling
|
|
138
|
+
S_DISCOVER → S_REVIEW : new target, loops < max
|
|
139
|
+
S_DISCOVER → S_RECORD : done or max_loops
|
|
126
140
|
</transitions>
|
|
127
141
|
|
|
128
142
|
<actions>
|
|
129
143
|
|
|
130
144
|
### A_INTAKE
|
|
131
|
-
Parse target + flags → file list. Create SESSION_DIR, derive phase_goals[]. Search prior knowledge. Write session.json +
|
|
132
|
-
📌 `"odyssey-review({slug}): INTAKE — 目标解析与上下文加载"`
|
|
145
|
+
Parse target + flags → file list. Create SESSION_DIR, derive phase_goals[]. Search prior knowledge. Write session.json + section 1. Display Goal Prompt.
|
|
133
146
|
|
|
134
147
|
### A_ARCHAEOLOGY
|
|
135
148
|
**spawn_agents_on_csv (Wave 1):**
|
|
@@ -143,12 +156,10 @@ spawn_agents_on_csv({ csv_path: "tasks.csv", id_column: "id",
|
|
|
143
156
|
max_concurrency: 2, max_runtime_seconds: 300,
|
|
144
157
|
output_csv_path: "wave-1-results.csv", output_schema: SHARED_OUTPUT_SCHEMA })
|
|
145
158
|
```
|
|
146
|
-
Merge → evidence
|
|
147
|
-
📌 `"odyssey-review({slug}): ARCHAEOLOGY — git 考古分析"`
|
|
159
|
+
Merge → evidence (phase: archaeology). CLI delegate `--role analyze`. Update section 2.
|
|
148
160
|
|
|
149
161
|
### A_EXPLORE
|
|
150
|
-
CLI delegate `--role explore` — call chains, error gaps, similar patterns. Write explore.json. Update
|
|
151
|
-
📌 `"odyssey-review({slug}): EXPLORE — 代码探索完成"`
|
|
162
|
+
CLI delegate `--role explore` — call chains, error gaps, similar patterns. Write explore.json. Update section 3. Mark G2.
|
|
152
163
|
|
|
153
164
|
### A_REVIEW
|
|
154
165
|
**spawn_agents_on_csv (Wave 2):**
|
|
@@ -164,32 +175,32 @@ spawn_agents_on_csv({ csv_path: "tasks.csv", id_column: "id",
|
|
|
164
175
|
max_concurrency: 4, max_runtime_seconds: 600,
|
|
165
176
|
output_csv_path: "wave-2-results.csv", output_schema: SHARED_OUTPUT_SCHEMA })
|
|
166
177
|
```
|
|
167
|
-
Each returns `[{title, severity, file, line, description, suggestion, cwe}]`. Merge → evidence (review). Write review_result +
|
|
168
|
-
📌 `"odyssey-review({slug}): REVIEW — 多维度审查完成"`
|
|
178
|
+
Each returns `[{title, severity, file, line, description, suggestion, cwe}]`. Merge → evidence (review). Write review_result + section 4 (severity matrix). Mark G1.
|
|
169
179
|
|
|
170
180
|
### A_FIX
|
|
171
|
-
|
|
181
|
+
Exhaustive tier loop — descend severity until `remaining_actionable == 0`:
|
|
172
182
|
|
|
173
183
|
```
|
|
174
184
|
for tier in [critical, high, medium, low].filter(>= threshold):
|
|
175
|
-
for each unfixed candidate: read
|
|
176
|
-
re-review modified area
|
|
185
|
+
for each unfixed candidate: read +/-20 → fix → evidence (fix)
|
|
186
|
+
re-review modified area: new findings → append, continue (max 2/tier)
|
|
177
187
|
tier done → auto-commit
|
|
178
188
|
```
|
|
179
189
|
|
|
180
190
|
Normal: request_user_input per tier. `-y`: auto-fix all.
|
|
181
191
|
Remaining > 0 → retry (no max_loops limit). Unchanged 2 rounds → classify each individually.
|
|
182
|
-
|
|
183
|
-
📌 per tier: `"odyssey-review({slug}): FIX-{tier} — {N}项修复"`
|
|
192
|
+
Blanket "pre-existing" forbidden.
|
|
184
193
|
|
|
185
194
|
### A_CONFIRM
|
|
186
195
|
Run tests + CLI delegate zero-residual review (`--role review`).
|
|
187
196
|
- `remaining == 0 AND new == 0` → confirmed, mark G3
|
|
188
197
|
- Otherwise → needs_rework → S_FIX
|
|
189
|
-
|
|
190
|
-
|
|
198
|
+
|
|
199
|
+
Update confirmation + remaining_actionable + section 5.
|
|
191
200
|
|
|
192
201
|
### A_GENERALIZE
|
|
202
|
+
Base shared_actions. Pattern source: findings (severity >= medium).
|
|
203
|
+
|
|
193
204
|
**spawn_agents_on_csv (Wave 3):**
|
|
194
205
|
```csv
|
|
195
206
|
"gen-syntax","Syntax Grep","Grep syntax-layer patterns across project","generalization","syntax","","3","pending","","",""
|
|
@@ -203,56 +214,51 @@ spawn_agents_on_csv({ csv_path: "tasks.csv", id_column: "id",
|
|
|
203
214
|
max_concurrency: 4, max_runtime_seconds: 600,
|
|
204
215
|
output_csv_path: "wave-3-results.csv", output_schema: SHARED_OUTPUT_SCHEMA })
|
|
205
216
|
```
|
|
206
|
-
|
|
207
|
-
|
|
217
|
+
|
|
218
|
+
Cross-layer dedup: multi-layer hits → boost confidence | single-layer → `needs_review` | historically fixed → `regression_risk`.
|
|
219
|
+
Iterative deepening: module with >= 3 hits → targeted deep scan (max 1 round).
|
|
220
|
+
Mark G4.
|
|
208
221
|
|
|
209
222
|
### A_DISCOVER
|
|
210
|
-
|
|
211
|
-
📌 `"odyssey-review({slug}): DISCOVER — 发现分类完成"`
|
|
223
|
+
Base shared_actions. Review overrides: cross-phase loop tracking per base.
|
|
212
224
|
|
|
213
225
|
### A_RECORD
|
|
214
|
-
|
|
226
|
+
Base shared_actions. Learnings per Knowledge Persistence table.
|
|
215
227
|
|
|
228
|
+
**Completion summary:**
|
|
216
229
|
```
|
|
217
230
|
--- REVIEW-TEST-FIX ODYSSEY COMPLETE ---
|
|
218
231
|
Target: {target} Dimensions: {dims}
|
|
219
232
|
Findings: {C}C {H}H {M}M {L}L Fix: {fixed}, confirmed={yes|skip}
|
|
220
233
|
Patterns: {N} ({by_layer}) Scan hits: {total} ({cross} cross-layer)
|
|
221
|
-
Issues: {N} Decisions: {N}r/{M}p/{K}d Learnings: {N} Self-iter: {N}
|
|
234
|
+
Issues: {N} Decisions: {N}r/{M}p/{K}d Learnings: {N} Self-iter: {N}x{M}
|
|
222
235
|
Goals: {done}/{total} ({skipped} skipped)
|
|
223
236
|
---
|
|
224
237
|
```
|
|
225
|
-
📌 `"odyssey-review({slug}): RECORD — 会话总结与知识沉淀"`
|
|
226
238
|
|
|
227
239
|
</actions>
|
|
228
240
|
|
|
229
241
|
<appendix>
|
|
230
242
|
|
|
231
|
-
###
|
|
232
|
-
```
|
|
233
|
-
📋 Review-Test-Fix Odyssey 会话已创建。可随时复制以下 /goal:
|
|
234
|
-
|
|
235
|
-
/goal 完成以下目标:
|
|
236
|
-
{for each G in phase_goals where status != "skipped":}
|
|
237
|
-
- {G.id}: {G.goal} — {G.done_when}
|
|
238
|
-
{end for}
|
|
239
|
-
穷尽迭代:review_result.remaining_actionable == 0 且 confirmation == confirmed 且 phase_goals_all_done。
|
|
240
|
-
修复按 severity 逐轮迭代,每轮 re-review 修改区域,新问题追加继续。
|
|
241
|
-
每个 finding 必须有 action(fix/issue/decision),decision pending 必须 request_user_input。
|
|
242
|
-
```
|
|
243
|
+
### `-y` review-specific points
|
|
243
244
|
|
|
244
|
-
### `-y` (7 decision points)
|
|
245
245
|
| Decision Point | Normal | `-y` |
|
|
246
|
-
|
|
246
|
+
|---------------|--------|------|
|
|
247
247
|
| S_FIX tier candidates | request_user_input | auto-fix, `deferred` |
|
|
248
|
-
| S_FIX re-review new | request_user_input | auto-append |
|
|
248
|
+
| S_FIX re-review new findings | request_user_input | auto-append |
|
|
249
249
|
| S_CONFIRM needs_rework | Display → S_FIX | auto proceed |
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
250
|
+
|
|
251
|
+
### Goal Prompt convergence rules
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
Stop when review_result.remaining_actionable == 0, confirmation == confirmed,
|
|
255
|
+
phase_goals_all_done=true. Fix by severity desc, re-review modified areas,
|
|
256
|
+
new findings appended. Every finding must have action (fix/issue/decision).
|
|
257
|
+
Decision pending must request_user_input.
|
|
258
|
+
```
|
|
254
259
|
|
|
255
260
|
</appendix>
|
|
261
|
+
|
|
256
262
|
</state_machine>
|
|
257
263
|
|
|
258
264
|
<error_codes>
|
|
@@ -268,12 +274,12 @@ Goals: {done}/{total} ({skipped} skipped)
|
|
|
268
274
|
- [ ] All dimensions reviewed, ALL findings fixed (remaining_actionable == 0), zero-residual confirmed
|
|
269
275
|
- [ ] Per-tier re-review gate; every unfixed finding individually classified
|
|
270
276
|
- [ ] Generalized with multi-layer scan (unless --skip-generalize); self-iteration on insufficient
|
|
271
|
-
- [ ] understanding.md
|
|
277
|
+
- [ ] understanding.md sections 1-8, phase_goals G1-G6 audited, Goal Prompt once, `-y` no blocking, -c resumable
|
|
272
278
|
</success_criteria>
|
|
273
279
|
|
|
274
280
|
<next_step_routing>
|
|
275
|
-
| Condition | Next
|
|
276
|
-
|
|
281
|
+
| Condition | Next |
|
|
282
|
+
|-----------|------|
|
|
277
283
|
| Deeper debug needed | `$odyssey-debug "<finding>"` |
|
|
278
284
|
| Issues created | `$manage-issue list --source review-odyssey` |
|
|
279
285
|
| Pattern to document | `$learn-decompose <module>` |
|