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
|
@@ -17,21 +17,22 @@ allowed-tools:
|
|
|
17
17
|
<base>@~/.maestro/workflows/odyssey-base.md</base>
|
|
18
18
|
|
|
19
19
|
<purpose>
|
|
20
|
-
|
|
21
|
-
fix ALL findings → confirm → generalize → discover → persist. Zero-residual philosophy.
|
|
20
|
+
archaeology → explore → multi-dimensional review → fix ALL findings → confirm → generalize → discover → persist. Zero-residual: every finding gets an action.
|
|
22
21
|
</purpose>
|
|
23
22
|
|
|
24
23
|
<boundary>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
**
|
|
24
|
+
**In scope:** Multi-dimensional deep review of target code → exhaustive fix ALL findings by severity → generalize patterns project-wide.
|
|
25
|
+
**Out of scope:** Root cause debug → `/odyssey-debug` | Feature implementation → `/odyssey-planex` | UI visual optimization → `/odyssey-ui`
|
|
26
|
+
|
|
27
|
+
**Exploration freedom:** Free within boundary — cross-dimension correlation, git history tracing, project-wide generalization scan. Fix ALL findings within fix_threshold (default: all).
|
|
28
|
+
**Zero-residual:** Every finding MUST have a concrete action (fix / issue / decision). "Report and shelve" and "pre-existing skip" are forbidden.
|
|
29
29
|
</boundary>
|
|
30
30
|
|
|
31
31
|
<context>
|
|
32
|
-
$ARGUMENTS
|
|
32
|
+
$ARGUMENTS
|
|
33
33
|
|
|
34
34
|
**Target resolution:**
|
|
35
|
+
|
|
35
36
|
| Input | Resolution |
|
|
36
37
|
|-------|-----------|
|
|
37
38
|
| File/dir path | Review those files |
|
|
@@ -39,157 +40,194 @@ $ARGUMENTS — target and optional flags.
|
|
|
39
40
|
| Phase number | state.json → changed files |
|
|
40
41
|
| PR number | `git diff main...HEAD` |
|
|
41
42
|
|
|
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 |
|
|
43
|
+
**Flags:** `--dimensions <list>` subset of review dimensions | `--fix-threshold <level>` severity cutoff (default: all) | `--skip-fix` skip S_FIX+S_CONFIRM | `--skip-generalize` skip S_GENERALIZE+S_DISCOVER | `--auto` no delegate confirmation | `-y` auto-confirm | `-c` resume | `--heartbeat` /loop heartbeat
|
|
50
44
|
|
|
51
45
|
**Session**: `.workflow/scratch/{YYYYMMDD}-review-odyssey-{slug}/`
|
|
52
|
-
**Output**: session.json
|
|
53
|
-
|
|
54
|
-
**
|
|
46
|
+
**Output**: `session.json` | `evidence.ndjson` | `explore.json` | `understanding.md`
|
|
47
|
+
|
|
48
|
+
**session.json — review-specific fields:**
|
|
49
|
+
```json
|
|
50
|
+
{ "target": "", "dimensions": [], "review_result": {"remaining_actionable": 0},
|
|
51
|
+
"patterns": [], "confirmation": null, "generalization_stats": null }
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**evidence.ndjson phases:** `archaeology|explore|review|fix|discovery|decision|self-iteration`
|
|
55
55
|
|
|
56
56
|
**phase_goals[]:**
|
|
57
|
-
|
|
57
|
+
|
|
58
|
+
| ID | Goal | done_when | phase | skip_when |
|
|
58
59
|
|----|------|-----------|-------|-----------|
|
|
59
60
|
| G1 | Review completed | all dimensions reviewed | S_REVIEW | — |
|
|
60
61
|
| G2 | Explore context | explore.json populated | S_EXPLORE | — |
|
|
61
62
|
| G3 | Zero remaining | `remaining_actionable == 0` | S_CONFIRM | skip_fix |
|
|
62
|
-
| G4 | Pattern generalized | patterns[]
|
|
63
|
+
| G4 | Pattern generalized | patterns[] >=1 | S_GENERALIZE | skip_generalize |
|
|
63
64
|
| G5 | Discoveries triaged | all hits classified | S_DISCOVER | skip_generalize |
|
|
64
65
|
| G6 | Learnings persisted | spec entries or no actionable | S_RECORD | — |
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
**understanding.md — 8 sections:**
|
|
68
|
+
1. Target & Scope ← S_INTAKE | 2. Archaeology ← S_ARCHAEOLOGY | 3. Exploration ← S_EXPLORE
|
|
69
|
+
4. Review Results ← S_REVIEW | 5. Fix & Confirmation ← S_FIX+S_CONFIRM
|
|
70
|
+
6. Generalization ← S_GENERALIZE | 7. Discoveries ← S_DISCOVER | 8. Learnings ← S_RECORD
|
|
71
|
+
|
|
72
|
+
Specs: `maestro load --type spec --category review`
|
|
73
|
+
|
|
74
|
+
**Knowledge Persistence categories (section 8):**
|
|
68
75
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
| 可复用泛化 pattern | `/spec-add coding "..."` |
|
|
76
|
+
| Category | Content | Follow-up |
|
|
77
|
+
|----------|---------|-----------|
|
|
78
|
+
| Cross-dimension recurring pattern | Pattern + affected dimensions + coding standard | `/spec-add review` |
|
|
79
|
+
| Security finding | Vulnerability type + triggers + fix approach | `/spec-add debug` |
|
|
80
|
+
| Architecture violation pattern | Violation + correct boundary + verification | `/spec-add arch` |
|
|
81
|
+
| Reusable generalization pattern | Signature + risk + fix template + scope | `/spec-add coding` |
|
|
76
82
|
</context>
|
|
77
83
|
|
|
84
|
+
<invariants>
|
|
85
|
+
All invariants defined in base.
|
|
86
|
+
</invariants>
|
|
87
|
+
|
|
78
88
|
<self_iteration>
|
|
79
|
-
|
|
89
|
+
Applies to: **S_ARCHAEOLOGY, S_EXPLORE, S_REVIEW, S_FIX, S_GENERALIZE**. Logic in base.
|
|
80
90
|
</self_iteration>
|
|
81
91
|
|
|
82
92
|
<state_machine>
|
|
93
|
+
|
|
83
94
|
<states>
|
|
84
95
|
S_INTAKE → S_ARCHAEOLOGY → S_EXPLORE → S_REVIEW → S_FIX → S_CONFIRM → S_GENERALIZE → S_DISCOVER → S_RECORD → END
|
|
85
|
-
Skip: --skip-fix skips S_FIX+S_CONFIRM | --skip-generalize skips S_GENERALIZE+S_DISCOVER
|
|
86
96
|
</states>
|
|
87
97
|
|
|
88
98
|
<transitions>
|
|
89
|
-
S_INTAKE
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
S_INTAKE → S_INTAKE : -c + session found → A_RESUME_SESSION
|
|
100
|
+
S_INTAKE → S_ARCHAEOLOGY : target resolved → A_INTAKE
|
|
101
|
+
S_INTAKE → S_INTAKE : no target → ask_user
|
|
102
|
+
|
|
103
|
+
S_ARCHAEOLOGY → S_EXPLORE : complete
|
|
104
|
+
S_EXPLORE → S_REVIEW : complete
|
|
105
|
+
|
|
106
|
+
S_REVIEW → S_FIX : !skip_fix AND findings
|
|
107
|
+
S_REVIEW → S_GENERALIZE : skip_fix OR no findings, !skip_generalize
|
|
108
|
+
S_REVIEW → S_RECORD : both skip
|
|
109
|
+
|
|
110
|
+
S_FIX → S_CONFIRM : tier complete
|
|
111
|
+
S_CONFIRM → S_GENERALIZE : confirmed, !skip_generalize
|
|
112
|
+
S_CONFIRM → S_RECORD : confirmed, skip_generalize
|
|
113
|
+
S_CONFIRM → S_FIX : needs_rework
|
|
114
|
+
|
|
115
|
+
S_GENERALIZE → S_DISCOVER : similar code found
|
|
116
|
+
S_GENERALIZE → S_RECORD : no similar code
|
|
117
|
+
|
|
118
|
+
S_DISCOVER → S_FIX : fixable sibling → cross_phase_loops++
|
|
119
|
+
S_DISCOVER → S_REVIEW : new target, loops < max_loops → cross_phase_loops++
|
|
120
|
+
S_DISCOVER → S_RECORD : remaining_actionable == 0 OR loops >= max_loops
|
|
94
121
|
</transitions>
|
|
95
122
|
|
|
96
123
|
<actions>
|
|
97
124
|
|
|
98
125
|
### A_INTAKE
|
|
99
|
-
Parse target + flags → file list. Create SESSION_DIR, derive phase_goals[]
|
|
100
|
-
|
|
126
|
+
1. Parse target + flags → file list. Create SESSION_DIR, derive phase_goals[]
|
|
127
|
+
2. `maestro search "<keywords>"` + Glob prior sessions + ARCHITECTURE.md + Grep keywords
|
|
128
|
+
3. Write `session.json` + `understanding.md` section 1, emit Goal Prompt
|
|
129
|
+
|
|
130
|
+
Commit: `"odyssey-review({slug}): INTAKE — parse target and load context"`
|
|
131
|
+
|
|
132
|
+
### A_RESUME_SESSION
|
|
133
|
+
Glob latest session → read `session.json` → jump to `current_state`.
|
|
101
134
|
|
|
102
135
|
### A_ARCHAEOLOGY
|
|
103
|
-
`git log --oneline -20
|
|
104
|
-
|
|
136
|
+
2 parallel Agents: Timeline (`git log --oneline -20 -- {files}`) + Blame (top 3 files `git blame -L {region}`). Evidence phase=archaeology.
|
|
137
|
+
|
|
138
|
+
`maestro delegate --role analyze --mode analysis` (`run_in_background: true`):
|
|
139
|
+
- PURPOSE: Review recent modifications related to {target}
|
|
140
|
+
- EXPECTED: JSON [{commit_sha, risk_level, analysis, could_cause_issue, explanation}]
|
|
141
|
+
|
|
142
|
+
Update section 2. Commit: `"odyssey-review({slug}): ARCHAEOLOGY — git history analysis"`
|
|
105
143
|
|
|
106
144
|
### A_EXPLORE
|
|
107
|
-
|
|
108
|
-
|
|
145
|
+
Skip if no CLI tools (W006).
|
|
146
|
+
|
|
147
|
+
`maestro delegate --role explore --mode analysis` (`run_in_background: true`):
|
|
148
|
+
- PURPOSE: Call chains, recent changes, error gaps, similar patterns
|
|
149
|
+
- EXPECTED: JSON {call_chains, recent_changes, error_gaps, similar_patterns}
|
|
150
|
+
|
|
151
|
+
Write `explore.json` + evidence phase=explore. Update section 3. Mark G2. Commit: `"odyssey-review({slug}): EXPLORE — codebase exploration"`
|
|
109
152
|
|
|
110
153
|
### A_REVIEW
|
|
111
|
-
Spawn N parallel Agents
|
|
154
|
+
Spawn N parallel Agents, one per dimension:
|
|
112
155
|
- **Correctness**: logic errors, boundary conditions, null/undefined, race conditions
|
|
113
156
|
- **Security**: injection, XSS, CSRF, data exposure, auth bypass
|
|
114
157
|
- **Performance**: hot paths, N+1, memory leaks, unnecessary recomputation
|
|
115
158
|
- **Architecture**: layer violations, circular deps, interface contracts, SoC
|
|
116
159
|
|
|
117
|
-
Each returns `[{title, severity, file, line, description, suggestion, cwe}]`. Merge → evidence
|
|
118
|
-
|
|
160
|
+
Each returns `[{title, severity, file, line, description, suggestion, cwe}]`. Merge → evidence phase=review. Write `review_result` + section 4 severity matrix. Mark G1.
|
|
161
|
+
|
|
162
|
+
Commit: `"odyssey-review({slug}): REVIEW — multi-dimension review complete"`
|
|
119
163
|
|
|
120
164
|
### A_FIX
|
|
121
|
-
|
|
165
|
+
Exhaustive iterative fix — descend by severity until `remaining_actionable == 0`.
|
|
122
166
|
|
|
123
167
|
```
|
|
124
168
|
for tier in [critical, high, medium, low].filter(>= threshold):
|
|
125
|
-
for each unfixed candidate: read
|
|
126
|
-
re-review modified area (
|
|
169
|
+
for each unfixed candidate: read +/-20 lines → fix → evidence phase=fix
|
|
170
|
+
re-review modified area (new findings → append, continue; max 2 per tier)
|
|
127
171
|
tier done → auto-commit
|
|
128
172
|
```
|
|
129
173
|
|
|
130
174
|
Normal: ask_user per tier. `-y`: auto-fix all.
|
|
131
175
|
Remaining > 0 → retry (no max_loops limit). Unchanged 2 rounds → classify each individually.
|
|
132
|
-
|
|
133
|
-
|
|
176
|
+
Blanket "pre-existing" forbidden.
|
|
177
|
+
|
|
178
|
+
Commit per tier: `"odyssey-review({slug}): FIX-{tier} — {N} items fixed"`
|
|
134
179
|
|
|
135
180
|
### A_CONFIRM
|
|
136
|
-
Run tests +
|
|
181
|
+
Run tests + `maestro delegate --role review --mode analysis` (`run_in_background: true`) for zero-residual review.
|
|
137
182
|
- `remaining == 0 AND new == 0` → confirmed, mark G3
|
|
138
183
|
- Otherwise → needs_rework → S_FIX
|
|
139
|
-
Update confirmation + remaining_actionable + §5.
|
|
140
|
-
📌 `"odyssey-review({slug}): CONFIRM — 零遗留验证"`
|
|
141
184
|
|
|
142
|
-
|
|
143
|
-
按 base A_GENERALIZE 执行。Pattern 来源: findings (severity >= medium)。Mark G4.
|
|
144
|
-
📌 `"odyssey-review({slug}): GENERALIZE — 泛化扫描完成"`
|
|
185
|
+
Update `confirmation` + `remaining_actionable` + section 5.
|
|
145
186
|
|
|
146
|
-
|
|
147
|
-
按 base A_DISCOVER 执行。Mark G5.
|
|
148
|
-
📌 `"odyssey-review({slug}): DISCOVER — 发现分类完成"`
|
|
187
|
+
Commit: `"odyssey-review({slug}): CONFIRM — zero-residual verified"`
|
|
149
188
|
|
|
150
|
-
### A_RECORD
|
|
151
|
-
|
|
189
|
+
### A_GENERALIZE, A_DISCOVER, A_RECORD
|
|
190
|
+
Base shared_actions. Review overrides:
|
|
191
|
+
- **A_GENERALIZE** pattern source: findings with severity >= medium
|
|
192
|
+
- **A_RECORD** learnings per Knowledge Persistence table
|
|
152
193
|
|
|
194
|
+
**Completion summary:**
|
|
153
195
|
```
|
|
154
196
|
--- REVIEW-TEST-FIX ODYSSEY COMPLETE ---
|
|
155
197
|
Target: {target} Dimensions: {dims}
|
|
156
198
|
Findings: {C}C {H}H {M}M {L}L Fix: {fixed}, confirmed={yes|skip}
|
|
157
199
|
Patterns: {N} ({by_layer}) Scan hits: {total} ({cross} cross-layer)
|
|
158
|
-
Issues:
|
|
159
|
-
|
|
200
|
+
Issues: {N} created
|
|
201
|
+
Decisions: {N} resolved, {M} pending, {K} deferred
|
|
202
|
+
Learnings: {N} persisted
|
|
203
|
+
Self-iter: {N} rounds across {M} stages
|
|
204
|
+
Goals: {done}/{total} ({skipped} skipped)
|
|
160
205
|
---
|
|
161
206
|
```
|
|
162
|
-
📌 `"odyssey-review({slug}): RECORD — 会话总结与知识沉淀"`
|
|
163
207
|
|
|
164
208
|
</actions>
|
|
165
209
|
|
|
166
210
|
<appendix>
|
|
167
211
|
|
|
168
|
-
###
|
|
169
|
-
```
|
|
170
|
-
📋 Review-Test-Fix Odyssey 会话已创建。可随时复制以下 /goal:
|
|
171
|
-
|
|
172
|
-
/goal 完成以下目标:
|
|
173
|
-
{for each G in phase_goals where status != "skipped":}
|
|
174
|
-
- {G.id}: {G.goal} — {G.done_when}
|
|
175
|
-
{end for}
|
|
176
|
-
穷尽迭代:review_result.remaining_actionable == 0 且 confirmation == confirmed 且 phase_goals_all_done。
|
|
177
|
-
修复按 severity 逐轮迭代,每轮 re-review 修改区域,新问题追加继续。
|
|
178
|
-
每个 finding 必须有 action(fix/issue/decision),decision pending 必须 ask_user。
|
|
179
|
-
```
|
|
212
|
+
### `-y` review-specific points
|
|
180
213
|
|
|
181
|
-
### `-y` (7 decision points)
|
|
182
214
|
| Decision Point | Normal | `-y` |
|
|
183
|
-
|
|
184
|
-
| S_FIX tier candidates | ask_user | auto-fix,
|
|
185
|
-
| S_FIX re-review new | ask_user | auto-append |
|
|
215
|
+
|---------------|--------|------|
|
|
216
|
+
| S_FIX tier candidates | ask_user | auto-fix, deferred |
|
|
217
|
+
| S_FIX re-review new findings | ask_user | auto-append |
|
|
186
218
|
| S_CONFIRM needs_rework | Display → S_FIX | auto proceed |
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
219
|
+
|
|
220
|
+
### Goal Prompt convergence rules
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
Stop when remaining_actionable == 0, confirmation == confirmed,
|
|
224
|
+
generalization exhausted, phase_goals_all_done=true.
|
|
225
|
+
Fix iterates by severity tier; each tier re-reviews modified area, new findings appended.
|
|
226
|
+
Every finding must have action (fix/issue/decision). Decision pending must ask_user.
|
|
227
|
+
```
|
|
191
228
|
|
|
192
229
|
</appendix>
|
|
230
|
+
|
|
193
231
|
</state_machine>
|
|
194
232
|
|
|
195
233
|
<error_codes>
|
|
@@ -202,17 +240,25 @@ Goals: {done}/{total} ({skipped} skipped)
|
|
|
202
240
|
</error_codes>
|
|
203
241
|
|
|
204
242
|
<success_criteria>
|
|
205
|
-
- [ ]
|
|
243
|
+
- [ ] Session + 4 output files + prior knowledge searched
|
|
244
|
+
- [ ] Archaeology + CLI review → evidence phase=archaeology
|
|
245
|
+
- [ ] CLI exploration → explore.json + evidence phase=explore
|
|
246
|
+
- [ ] All dimensions reviewed, ALL findings fixed (remaining_actionable == 0)
|
|
206
247
|
- [ ] Per-tier re-review gate; every unfixed finding individually classified
|
|
207
|
-
- [ ]
|
|
208
|
-
- [ ]
|
|
248
|
+
- [ ] understanding.md sections 1-8 progressive
|
|
249
|
+
- [ ] Fix + confirmed (unless --skip-fix)
|
|
250
|
+
- [ ] Generalization + scan (unless --skip-generalize)
|
|
251
|
+
- [ ] Discoveries classified; unfixed findings individually justified
|
|
252
|
+
- [ ] phase_goals G1-G6 audited, Goal Prompt once, `-y` no blocking, -c resumable
|
|
253
|
+
- [ ] Completion summary
|
|
209
254
|
</success_criteria>
|
|
210
255
|
|
|
211
256
|
<next_step_routing>
|
|
212
|
-
| Condition | Next
|
|
213
|
-
|
|
257
|
+
| Condition | Next |
|
|
258
|
+
|-----------|------|
|
|
214
259
|
| Deeper debug needed | `/odyssey-debug "<finding>"` |
|
|
215
260
|
| Issues created | `/manage-issue list --source review-odyssey` |
|
|
216
|
-
|
|
|
261
|
+
| Document pattern | `/learn-decompose <module>` |
|
|
217
262
|
| Plan fixes | `/maestro-plan --gaps` |
|
|
218
263
|
</next_step_routing>
|
|
264
|
+
</output>
|