maestro-flow 0.5.39 → 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/agents/cli-explore-agent.toml +181 -0
- package/.codex/agents/cross-role-reviewer.toml +165 -0
- package/.codex/agents/impeccable-agent.toml +89 -0
- package/.codex/agents/role-design-author.toml +213 -0
- package/.codex/agents/team-worker.toml +4 -7
- package/.codex/agents/ui-design-agent.toml +260 -0
- package/.codex/agents/workflow-analyzer.toml +106 -0
- package/.codex/agents/workflow-codebase-mapper.toml +69 -0
- package/.codex/agents/workflow-collab-planner.toml +140 -0
- package/.codex/agents/workflow-debugger.toml +95 -0
- package/.codex/agents/workflow-executor.toml +124 -0
- package/.codex/agents/workflow-external-researcher.toml +80 -0
- package/.codex/agents/workflow-integration-checker.toml +76 -0
- package/.codex/agents/workflow-nyquist-auditor.toml +77 -0
- package/.codex/agents/workflow-phase-researcher.toml +76 -0
- package/.codex/agents/workflow-plan-checker.toml +93 -0
- package/.codex/agents/workflow-planner.toml +192 -0
- package/.codex/agents/workflow-project-researcher.toml +65 -0
- package/.codex/agents/workflow-research-synthesizer.toml +65 -0
- package/.codex/agents/workflow-reviewer.toml +75 -0
- package/.codex/agents/workflow-roadmapper.toml +75 -0
- package/.codex/agents/workflow-verifier.toml +113 -0
- package/.codex/skills/maestro/SKILL.md +1 -0
- package/.codex/skills/maestro-analyze/SKILL.md +33 -15
- package/.codex/skills/maestro-brainstorm/SKILL.md +13 -10
- package/.codex/skills/maestro-collab/SKILL.md +30 -75
- package/.codex/skills/maestro-execute/SKILL.md +19 -12
- package/.codex/skills/maestro-grill/SKILL.md +12 -11
- package/.codex/skills/maestro-next/SKILL.md +3 -3
- package/.codex/skills/maestro-overlay/SKILL.md +1 -1
- package/.codex/skills/maestro-plan/SKILL.md +17 -8
- package/.codex/skills/maestro-ralph/SKILL.md +3 -0
- package/.codex/skills/maestro-ralph-execute/SKILL.md +1 -0
- package/.codex/skills/maestro-roadmap/SKILL.md +14 -8
- package/.codex/skills/manage-learn/SKILL.md +1 -1
- package/.codex/skills/odyssey-debug/SKILL.md +176 -150
- package/.codex/skills/odyssey-improve/SKILL.md +210 -177
- 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 +211 -179
- package/.codex/skills/quality-review/SKILL.md +17 -10
- package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +6 -12
- package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +6 -14
- package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +2 -6
- package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +6 -14
- package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +3 -7
- package/.codex/skills/team-quality-assurance/roles/scout/role.md +2 -5
- package/.codex/skills/team-review/roles/reviewer/role.md +2 -5
- package/.codex/skills/team-review/roles/scanner/role.md +2 -5
- package/.codex/skills/team-tech-debt/roles/executor/role.md +3 -7
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +2 -5
- package/.codex/skills/team-tech-debt/roles/validator/role.md +3 -7
- package/.codex/skills/team-testing/roles/executor/role.md +3 -7
- package/.codex/skills/team-testing/roles/generator/role.md +3 -7
- package/dashboard/dist-server/src/commands/install-backend.js +19 -0
- package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
- package/dashboard/dist-server/src/core/manifest.d.ts +5 -0
- package/dashboard/dist-server/src/core/manifest.js.map +1 -1
- package/dashboard/dist-server/src/core/plugin-bridge.d.ts +59 -0
- package/dashboard/dist-server/src/core/plugin-bridge.js +355 -0
- package/dashboard/dist-server/src/core/plugin-bridge.js.map +1 -0
- 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/cli.js +19 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +19 -0
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +17 -1
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/plugin.d.ts +3 -0
- package/dist/src/commands/plugin.d.ts.map +1 -0
- package/dist/src/commands/plugin.js +137 -0
- package/dist/src/commands/plugin.js.map +1 -0
- 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/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +23 -0
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/core/install-executor.d.ts +1 -1
- package/dist/src/core/install-executor.d.ts.map +1 -1
- package/dist/src/core/install-executor.js +27 -0
- package/dist/src/core/install-executor.js.map +1 -1
- package/dist/src/core/install-profile.d.ts +5 -0
- package/dist/src/core/install-profile.d.ts.map +1 -1
- package/dist/src/core/install-profile.js +8 -0
- package/dist/src/core/install-profile.js.map +1 -1
- package/dist/src/core/manifest.d.ts +5 -0
- package/dist/src/core/manifest.d.ts.map +1 -1
- package/dist/src/core/manifest.js.map +1 -1
- package/dist/src/core/plugin-bridge.d.ts +60 -0
- package/dist/src/core/plugin-bridge.d.ts.map +1 -0
- package/dist/src/core/plugin-bridge.js +355 -0
- package/dist/src/core/plugin-bridge.js.map +1 -0
- 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/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +43 -14
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/types.d.ts +2 -0
- package/dist/src/tui/install-ui/types.d.ts.map +1 -1
- package/dist/src/tui/install-ui/types.js.map +1 -1
- package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -1
- package/dist/src/tui/install-ui/useInstallFlowState.js +13 -1
- package/dist/src/tui/install-ui/useInstallFlowState.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/odyssey-base-codex.md +306 -0
- package/workflows/shell-exec-protocol.md +30 -0
|
@@ -15,46 +15,42 @@ allowed-tools:
|
|
|
15
15
|
<base>@~/.maestro/workflows/odyssey-base.md</base>
|
|
16
16
|
|
|
17
17
|
<purpose>
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
survey → 6-dimension audit → divergent exploration → fix → verify → generalize → discover → persist.
|
|
19
|
+
Exhaustive iteration until all findings addressed or deferred.
|
|
20
20
|
</purpose>
|
|
21
21
|
|
|
22
22
|
<boundary>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
**
|
|
27
|
-
⚠️ **Decision gate** — ONLY these qualify as decisions (not fixes):
|
|
23
|
+
**In scope:** Target component/page visual experience optimization — audit 6 dimensions, divergent exploration, fix, generalize to sibling components.
|
|
24
|
+
**Out of scope:** Backend/data/API → `/odyssey-planex` | Deep bug investigation → `/odyssey-debug` | Code quality review → `/odyssey-review-test-fix`
|
|
25
|
+
|
|
26
|
+
**Decision gate** — ONLY these qualify as decisions:
|
|
28
27
|
- Brand/style direction requiring human creative judgment
|
|
29
28
|
- Layout restructuring that changes user flow significantly
|
|
30
29
|
- Requires new design tokens or breaking component API
|
|
31
|
-
❌ "Unsure how to fix", "Large scope", "Pre-existing issue" are NOT valid decision reasons — either fix it, or explain specifically why it's unfixable
|
|
32
30
|
</boundary>
|
|
33
31
|
|
|
34
32
|
<context>
|
|
35
|
-
$ARGUMENTS
|
|
33
|
+
$ARGUMENTS
|
|
36
34
|
|
|
37
35
|
**Target resolution:** Component path → audit component | Page/route → audit page | `staged`/`HEAD` → diff UI changes | Feature area → resolve to components/pages
|
|
38
36
|
|
|
39
|
-
**Flags:**
|
|
40
|
-
| Flag | Effect | Default |
|
|
41
|
-
|------|--------|---------|
|
|
42
|
-
| `--dimensions <list>` | Comma-separated subset of 6 dimensions | all 6 |
|
|
43
|
-
| `--fix-threshold <severity>` | 修复到哪个 severity 为止 | all |
|
|
44
|
-
| `--skip-fix` | Audit + diverge only, no code changes | false |
|
|
45
|
-
| `--skip-generalize` | Skip S_GENERALIZE and S_DISCOVER | false |
|
|
46
|
-
| `--auto` | CLI delegates without confirmation | false |
|
|
47
|
-
| `-y` | Auto-confirm all decisions (see appendix) | false |
|
|
48
|
-
| `-c` | Resume most recent session | — |
|
|
49
|
-
| `--heartbeat` | Enable heartbeat progress reporting | false |
|
|
37
|
+
**Flags:** `--dimensions <list>` dimension subset | `--fix-threshold <severity>` | `--skip-fix` audit+diverge only | `--skip-generalize` skip generalize+discover | `--auto` no delegate confirmation | `-y` auto-confirm | `-c` resume | `--heartbeat` /loop heartbeat
|
|
50
38
|
|
|
51
|
-
**Session**:
|
|
39
|
+
**Session**: `.workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`
|
|
40
|
+
**Output**: `session.json` | `evidence.ndjson` | `understanding.md`
|
|
52
41
|
|
|
53
|
-
**
|
|
42
|
+
**session.json — ui-specific fields:**
|
|
43
|
+
```json
|
|
44
|
+
{ "target": "", "dimensions": [],
|
|
45
|
+
"audit_result": { "dimensions_audited": 0, "finding_count": 0, "severity_distribution": {} },
|
|
46
|
+
"diverge_result": { "improvements_proposed": 0, "creative_ideas": 0 },
|
|
47
|
+
"patterns": [], "confirmation": null, "generalization_stats": null }
|
|
48
|
+
```
|
|
54
49
|
|
|
55
|
-
**
|
|
50
|
+
**evidence.ndjson phases:** `survey|audit|diverge|fix|discovery|decision|self-iteration`
|
|
56
51
|
|
|
57
52
|
**phase_goals[]:**
|
|
53
|
+
|
|
58
54
|
| ID | Goal | Phase | skip_when |
|
|
59
55
|
|----|------|-------|-----------|
|
|
60
56
|
| G1 | Survey completed | S_SURVEY | — |
|
|
@@ -65,89 +61,85 @@ $ARGUMENTS — target and optional flags.
|
|
|
65
61
|
| G6 | Discoveries triaged | S_DISCOVER | skip_generalize |
|
|
66
62
|
| G7 | Learnings persisted | S_RECORD | — |
|
|
67
63
|
|
|
68
|
-
**understanding.md
|
|
64
|
+
**understanding.md — 8 sections:**
|
|
65
|
+
1. Target & Design Context ← S_INTAKE | 2. Survey ← S_SURVEY | 3. Audit ← S_AUDIT
|
|
66
|
+
4. Diverge ← S_DIVERGE | 5. Verify ← S_VERIFY | 6. Generalize ← S_GENERALIZE
|
|
67
|
+
7. Discover ← S_DISCOVER | 8. Learnings ← S_RECORD
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
ARCHITECTURE.md | `maestro search "<target>" --json` (top 5) | `maestro load --type spec --category ui` | `maestro load --type spec --category coding` | `maestro search --category ui` → load knowhow | Glob prior sessions
|
|
69
|
+
**Knowledge Persistence categories (section 8):**
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
| 可复用泛化 pattern | pattern 签名 + 应用范围 | `/spec-add coding "..."` |
|
|
71
|
+
| Category | Content | Follow-up |
|
|
72
|
+
|----------|---------|-----------|
|
|
73
|
+
| Design pattern | Component pattern + applicable scenarios + token references | `/spec-add ui` |
|
|
74
|
+
| Interaction spec | State definitions + transition rules + feedback patterns | `/spec-add ui` |
|
|
75
|
+
| Accessibility rule | WCAG requirement + implementation approach | `/spec-add ui` |
|
|
76
|
+
| Reusable generalization pattern | Pattern signature + application scope | `/spec-add coding` |
|
|
80
77
|
</context>
|
|
81
78
|
|
|
79
|
+
<invariants>
|
|
80
|
+
1-5 in base. UI-specific:
|
|
81
|
+
6. **Browser is truth** — verify in real rendering, not just code review
|
|
82
|
+
7. **Diverge before converge** — explore creatively first, then implement methodically
|
|
83
|
+
</invariants>
|
|
84
|
+
|
|
82
85
|
<self_iteration>
|
|
83
|
-
|
|
86
|
+
Applies to: **S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE**. Logic in base.
|
|
84
87
|
</self_iteration>
|
|
85
88
|
|
|
86
89
|
<state_machine>
|
|
87
90
|
|
|
88
91
|
<states>
|
|
89
|
-
S_INTAKE
|
|
90
|
-
S_SURVEY — Visual landscape: design tokens, pattern inventory PERSIST: evidence.ndjson (survey) + understanding.md §2
|
|
91
|
-
S_AUDIT — 6-dimension parallel review PERSIST: evidence.ndjson (audit) + understanding.md §3
|
|
92
|
-
S_DIVERGE — Divergent creative exploration: polish + delight PERSIST: evidence.ndjson (diverge) + understanding.md §4
|
|
93
|
-
S_FIX — Implement improvements (skip if --skip-fix) PERSIST: code changes + evidence.ndjson (fix)
|
|
94
|
-
S_VERIFY — Visual verification + test (skip if --skip-fix) PERSIST: session.json.confirmation + understanding.md §5
|
|
95
|
-
S_GENERALIZE — Pattern extraction + 4-agent scan (skip if --skip-gen) PERSIST: session.json.patterns + understanding.md §6
|
|
96
|
-
S_DISCOVER — Classify hits, create issues (skip if --skip-gen) PERSIST: evidence.ndjson (discovery|decision) + understanding.md §7
|
|
97
|
-
S_RECORD — Design knowledge persistence + final report PERSIST: understanding.md §8 + spec entries
|
|
92
|
+
S_INTAKE → S_SURVEY → S_AUDIT → S_DIVERGE → S_FIX → S_VERIFY → S_GENERALIZE → S_DISCOVER → S_RECORD → END
|
|
98
93
|
</states>
|
|
99
94
|
|
|
100
95
|
<transitions>
|
|
101
|
-
S_INTAKE:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
S_DIVERGE:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
S_VERIFY:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
S_DISCOVER → S_FIX : fixable sibling, !skip_fix → cross_phase_loops++
|
|
126
|
-
S_DISCOVER → S_RECORD : remaining_actionable == 0 OR loops >= max_loops (MUST log each unfixed item)
|
|
127
|
-
|
|
128
|
-
S_RECORD → END DO A_RECORD
|
|
96
|
+
S_INTAKE → S_INTAKE : -c + session found → A_RESUME
|
|
97
|
+
S_INTAKE → S_SURVEY : target resolved → A_INTAKE
|
|
98
|
+
S_INTAKE → S_INTAKE : no target → AskUserQuestion
|
|
99
|
+
|
|
100
|
+
S_SURVEY → S_AUDIT : complete
|
|
101
|
+
S_AUDIT → S_DIVERGE : complete
|
|
102
|
+
|
|
103
|
+
S_DIVERGE → S_FIX : !skip_fix AND actionable findings/ideas
|
|
104
|
+
S_DIVERGE → S_GENERALIZE : (skip_fix OR no actionable) AND !skip_generalize
|
|
105
|
+
S_DIVERGE → S_RECORD : (skip_fix OR no actionable) AND skip_generalize
|
|
106
|
+
|
|
107
|
+
S_FIX → S_VERIFY : fix implemented
|
|
108
|
+
S_VERIFY → S_GENERALIZE : verified, !skip_generalize
|
|
109
|
+
S_VERIFY → S_RECORD : verified, skip_generalize
|
|
110
|
+
S_VERIFY → S_FIX : needs_rework
|
|
111
|
+
|
|
112
|
+
S_GENERALIZE → S_DISCOVER : similar code found
|
|
113
|
+
S_GENERALIZE → S_RECORD : no similar code
|
|
114
|
+
|
|
115
|
+
S_DISCOVER → S_AUDIT : new component to audit → cross_phase_loops++
|
|
116
|
+
S_DISCOVER → S_FIX : fixable sibling, !skip_fix → cross_phase_loops++
|
|
117
|
+
S_DISCOVER → S_RECORD : remaining_actionable == 0 OR loops >= max_loops → log per-item reasons
|
|
118
|
+
|
|
119
|
+
S_RECORD → END : complete
|
|
129
120
|
</transitions>
|
|
130
121
|
|
|
131
122
|
<actions>
|
|
132
123
|
|
|
133
124
|
### A_INTAKE
|
|
134
125
|
1. Parse arguments: target, flags, `--dimensions` subset
|
|
135
|
-
2. Generate slug, create
|
|
136
|
-
3.
|
|
137
|
-
4. Derive `phase_goals[]` from flags
|
|
138
|
-
5. Write `session.json` + `understanding.md`
|
|
139
|
-
|
|
140
|
-
|
|
126
|
+
2. Generate slug, create SESSION_DIR
|
|
127
|
+
3. `maestro search` + Glob prior sessions + ARCHITECTURE.md + spec load ui/coding
|
|
128
|
+
4. Derive `phase_goals[]` from flags
|
|
129
|
+
5. Write `session.json` + `understanding.md` section 1, emit Goal Prompt
|
|
130
|
+
|
|
131
|
+
Commit: `"odyssey-ui({slug}): INTAKE — parse target and load context"`
|
|
141
132
|
|
|
142
133
|
### A_RESUME
|
|
143
|
-
|
|
134
|
+
Glob latest session → read `session.json` → jump to `current_state`.
|
|
144
135
|
|
|
145
136
|
### A_SURVEY
|
|
146
137
|
1. **Design system inventory**: Scan for design tokens, CSS variables, theme imports
|
|
147
138
|
2. **Current state analysis**: Styling patterns, layout strategy, component hierarchy
|
|
148
|
-
3. **CLI-assisted
|
|
149
|
-
4. Append evidence
|
|
150
|
-
|
|
139
|
+
3. **CLI-assisted**: `maestro delegate --role analyze` — survey tokens, spacing, typography, hierarchy, consistency
|
|
140
|
+
4. Append evidence phase=survey. Update section 2. Mark G1.
|
|
141
|
+
|
|
142
|
+
Commit: `"odyssey-ui({slug}): SURVEY — design token inventory"`
|
|
151
143
|
|
|
152
144
|
### A_AUDIT
|
|
153
145
|
Spawn 6 parallel Agents (one per dimension, or `--dimensions` subset):
|
|
@@ -162,8 +154,9 @@ Spawn 6 parallel Agents (one per dimension, or `--dimensions` subset):
|
|
|
162
154
|
| edge_cases | Long text truncation, empty data, error states, extreme values, i18n, RTL |
|
|
163
155
|
|
|
164
156
|
Each returns `[{title, severity, file, line, description, suggestion, dimension}]`.
|
|
165
|
-
Merge → evidence
|
|
166
|
-
|
|
157
|
+
Merge → evidence phase=audit. Write `audit_result`. Update section 3 with severity matrix. Mark G2.
|
|
158
|
+
|
|
159
|
+
Commit: `"odyssey-ui({slug}): AUDIT — 6-dimension review"`
|
|
167
160
|
|
|
168
161
|
### A_DIVERGE
|
|
169
162
|
Goes beyond defect fixing — "what would make this delightful?"
|
|
@@ -174,80 +167,67 @@ Goes beyond defect fixing — "what would make this delightful?"
|
|
|
174
167
|
|
|
175
168
|
Each returns `[{idea, category (polish|delight), impact, effort, description, inspiration}]`
|
|
176
169
|
|
|
177
|
-
**Step 2 — CLI-assisted
|
|
170
|
+
**Step 2 — CLI-assisted**: `maestro delegate --role analyze` — polish opportunities, micro-interactions, visual rhythm, delight moments
|
|
178
171
|
|
|
179
172
|
**Step 3 — Consolidate**: Merge audit findings + divergent ideas → prioritized list (severity x impact x effort).
|
|
180
|
-
Append evidence
|
|
181
|
-
|
|
173
|
+
Append evidence phase=diverge. Update section 4. Mark G3.
|
|
174
|
+
|
|
175
|
+
Commit: `"odyssey-ui({slug}): DIVERGE — creative exploration"`
|
|
182
176
|
|
|
183
177
|
### A_FIX
|
|
184
178
|
Skip if `--skip-fix`.
|
|
185
|
-
1.
|
|
186
|
-
2. Each fix → evidence
|
|
187
|
-
3.
|
|
188
|
-
|
|
179
|
+
1. **Exhaustive fix**: ALL findings/ideas by priority tier (critical → high → medium → low + high-impact ideas). After each tier, re-review — new findings append.
|
|
180
|
+
2. Each fix → evidence phase=fix
|
|
181
|
+
3. Normal: AskUserQuestion per-fix | `-y`: auto-proceed, record `deferred`
|
|
182
|
+
|
|
183
|
+
Commit: `"odyssey-ui({slug}): FIX — implement improvements"`
|
|
189
184
|
|
|
190
185
|
### A_VERIFY
|
|
191
186
|
1. Run tests (lint, unit, visual regression)
|
|
192
|
-
2.
|
|
193
|
-
3. `needs_rework` → S_FIX. `verified` → mark G4
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
### A_RECORD
|
|
205
|
-
1. Finalize §8: 按 Knowledge Persistence 表分类记录,completion summary 列出建议的 `/spec-add` 命令
|
|
206
|
-
2. Pending decisions: **Normal** → AskUserQuestion. **`-y`** → skip, show deferred count
|
|
207
|
-
3. Goal audit: all confirmed → `phase_goals_all_done = true`. **Normal** → AskUserQuestion | **`-y`** → auto accept
|
|
208
|
-
4. Mark G7 done. Emit completion summary:
|
|
187
|
+
2. `maestro delegate --role review` — visual correctness, interaction states, accessibility, responsive
|
|
188
|
+
3. `needs_rework` → S_FIX. `verified` → mark G4. Update section 5, write `confirmation`.
|
|
189
|
+
|
|
190
|
+
Commit: `"odyssey-ui({slug}): VERIFY — visual verification"`
|
|
191
|
+
|
|
192
|
+
### A_GENERALIZE, A_DISCOVER, A_RECORD
|
|
193
|
+
Base shared_actions. UI overrides:
|
|
194
|
+
- **A_GENERALIZE** pattern source: audit findings + diverge ideas (severity >= medium OR impact = high)
|
|
195
|
+
- **A_RECORD** learnings per Knowledge Persistence table
|
|
196
|
+
|
|
197
|
+
**Completion summary:**
|
|
209
198
|
```
|
|
210
199
|
--- UI ODYSSEY COMPLETE ---
|
|
211
|
-
Target:
|
|
212
|
-
Findings:
|
|
213
|
-
Fix:
|
|
214
|
-
Patterns:
|
|
215
|
-
|
|
216
|
-
|
|
200
|
+
Target: {target} | Dimensions: {dimensions_audited}
|
|
201
|
+
Findings: {C}C {H}H {M}M {L}L | Diverge: {improvements} polish + {creative} delight
|
|
202
|
+
Fix: {fixed_count} applied, verified={yes|skipped}
|
|
203
|
+
Patterns: {extracted} ({by_layer})
|
|
204
|
+
Scan hits: {total} ({cross_layer} cross-layer)
|
|
205
|
+
Issues: {N} created
|
|
206
|
+
Decisions: {N} resolved, {M} pending, {K} deferred
|
|
207
|
+
Learnings: {N} persisted
|
|
208
|
+
Self-iter: {N} rounds
|
|
209
|
+
Goals: {done}/{total} ({skipped} skipped)
|
|
217
210
|
---
|
|
218
211
|
```
|
|
219
|
-
📌 `git commit -m "odyssey-ui({slug}): RECORD — 会话总结"`
|
|
220
212
|
|
|
221
213
|
</actions>
|
|
222
214
|
|
|
223
215
|
<appendix>
|
|
224
216
|
|
|
225
|
-
###
|
|
226
|
-
**⚠️ 仅在 A_INTAKE 完成后显示一次。A_RECORD 完成时禁止重新显示。**
|
|
217
|
+
### `-y` ui-specific points
|
|
227
218
|
|
|
228
|
-
```
|
|
229
|
-
📋 UI Odyssey 会话已创建。可随时复制以下 /goal 设定终止条件:
|
|
230
|
-
|
|
231
|
-
/goal 完成以下目标:
|
|
232
|
-
{for each G in phase_goals where status != "skipped":}
|
|
233
|
-
- {G.id}: {G.goal} — 完成条件: {G.done_when}
|
|
234
|
-
{end for}
|
|
235
|
-
穷尽迭代:直到 audit + diverge findings 均已处理(fix/issue/decision)
|
|
236
|
-
且 phase_goals_all_done=true 才停。修复按 impact×severity 逐轮迭代。
|
|
237
|
-
每轮修复后重审修改区域,新发现追加继续修。
|
|
238
|
-
遇到 phase=decision 的 pending 必须 AskUserQuestion。不允许"只报告不处理"。
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
### `-y` Auto-Confirm (5 decision points)
|
|
242
219
|
| Decision Point | Normal | `-y` |
|
|
243
|
-
|
|
244
|
-
| A_FIX improvement confirmation | AskUserQuestion | auto-proceed,
|
|
245
|
-
| A_DISCOVER hit routing | AskUserQuestion | auto create issue, `deferred` |
|
|
246
|
-
| A_DISCOVER ambiguous items | AskUserQuestion | all `deferred` |
|
|
247
|
-
| A_RECORD pending decisions | AskUserQuestion | skip, show deferred count |
|
|
248
|
-
| A_RECORD goal audit | AskUserQuestion | auto accept |
|
|
220
|
+
|---------------|--------|------|
|
|
221
|
+
| A_FIX improvement confirmation | AskUserQuestion | auto-proceed, deferred |
|
|
249
222
|
|
|
250
|
-
|
|
223
|
+
### Goal Prompt convergence rules
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
Stop when audit + diverge findings all addressed (fix/issue/decision),
|
|
227
|
+
phase_goals_all_done=true. Fix by impact x severity per tier.
|
|
228
|
+
Re-review after each tier — new findings append and continue.
|
|
229
|
+
Pending decisions must AskUserQuestion — no self-resolve.
|
|
230
|
+
```
|
|
251
231
|
|
|
252
232
|
</appendix>
|
|
253
233
|
|
|
@@ -267,15 +247,15 @@ Learnings: {N} entries | Self-iter: {N} rounds | Goals: {done}/{total} ({skipped
|
|
|
267
247
|
- [ ] Improvements implemented and verified (unless --skip-fix)
|
|
268
248
|
- [ ] Multi-layer generalization + discoveries classified (unless --skip-generalize)
|
|
269
249
|
- [ ] Every unfixed finding has individual classification and reason
|
|
270
|
-
- [ ] understanding.md
|
|
250
|
+
- [ ] understanding.md section 8 finalized; phase_goals G1-G7 tracked; `-y` no blocking prompts
|
|
271
251
|
</success_criteria>
|
|
272
252
|
|
|
273
253
|
<next_step_routing>
|
|
274
|
-
| Condition | Next
|
|
275
|
-
|
|
254
|
+
| Condition | Next |
|
|
255
|
+
|-----------|------|
|
|
276
256
|
| Finding needs deeper debug | `/odyssey-debug "<finding>"` |
|
|
277
|
-
| Issues
|
|
278
|
-
| Design pattern
|
|
279
|
-
|
|
|
257
|
+
| Issues from discoveries | `/manage-issue list --source ui-odyssey` |
|
|
258
|
+
| Design pattern to document | `/spec-add ui "..."` |
|
|
259
|
+
| Full review of changes | `/odyssey-review-test-fix <changed-files>` |
|
|
280
260
|
| Sibling components to polish | `/odyssey-ui "<sibling>"` |
|
|
281
261
|
</next_step_routing>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
name = "cli-explore-agent"
|
|
2
|
+
description = "Read-only code exploration via Bash + CLI semantic dual-source analysis, with schema-validated structured output."
|
|
3
|
+
developer_instructions = '''
|
|
4
|
+
# CLI Explore Agent
|
|
5
|
+
|
|
6
|
+
## Role
|
|
7
|
+
Specialized CLI exploration agent. Autonomously analyzes codebases and generates structured outputs. Read-only.
|
|
8
|
+
|
|
9
|
+
**CRITICAL: Mandatory Initial Read**
|
|
10
|
+
When spawned with `<files_to_read>`, read ALL listed files before any analysis.
|
|
11
|
+
|
|
12
|
+
**Core responsibilities:**
|
|
13
|
+
1. **Structural Analysis** — Module discovery, file patterns, symbol inventory
|
|
14
|
+
2. **Semantic Understanding** — Design intent, architectural patterns via CLI analysis
|
|
15
|
+
3. **Dependency Mapping** — Import/export graphs, circular detection, coupling analysis
|
|
16
|
+
4. **Structured Output** — Schema-compliant JSON generation with validation
|
|
17
|
+
|
|
18
|
+
**Analysis Modes**:
|
|
19
|
+
- `quick-scan` → `maestro explore` single prompt (fast)
|
|
20
|
+
- `deep-scan` → `maestro explore` multi-prompt parallel (thorough)
|
|
21
|
+
- `dependency-map` → Multi-prompt + Bash graph construction (comprehensive)
|
|
22
|
+
|
|
23
|
+
## 4-Phase Execution Workflow
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Phase 1: Task Understanding → parse scope, output requirements, schema
|
|
27
|
+
Phase 2: Analysis Execution → maestro explore + Bash structural scan
|
|
28
|
+
Phase 3: Schema Validation → read schema, validate structure
|
|
29
|
+
Phase 4: Output Generation → agent report + file output
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Phase 1: Task Understanding
|
|
33
|
+
|
|
34
|
+
1. **Project Structure Discovery**:
|
|
35
|
+
- Glob `src/**` and top-level directories to map module structure
|
|
36
|
+
- Read `package.json` / `Cargo.toml` / `go.mod` / `pyproject.toml` for tech stack
|
|
37
|
+
|
|
38
|
+
2. **Output Schema Loading** (if output file path specified in prompt):
|
|
39
|
+
- Read schema file and memorize requirements BEFORE any analysis
|
|
40
|
+
|
|
41
|
+
3. **Project Context Loading** (from spec system):
|
|
42
|
+
- Load exploration specs: `maestro load --type spec --category arch`
|
|
43
|
+
|
|
44
|
+
4. **Determine analysis depth from prompt keywords**:
|
|
45
|
+
- Quick lookup, structure overview → quick-scan
|
|
46
|
+
- Deep analysis, design intent, architecture → deep-scan
|
|
47
|
+
- Dependencies, impact analysis, coupling → dependency-map
|
|
48
|
+
|
|
49
|
+
## Phase 2: Analysis Execution
|
|
50
|
+
|
|
51
|
+
### Primary: `maestro explore` (preferred)
|
|
52
|
+
|
|
53
|
+
**Quick-scan** — single targeted prompt:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
maestro explore "FIND: <target from prompt>
|
|
57
|
+
SCOPE: src/
|
|
58
|
+
EXCLUDE: test files, node_modules, generated code
|
|
59
|
+
EXPECTED: file:line evidence list" --max-turns 3
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Deep-scan** — multi-prompt parallel for multi-angle coverage:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
maestro explore \
|
|
66
|
+
"FIND: <structural patterns>
|
|
67
|
+
SCOPE: src/
|
|
68
|
+
EXPECTED: file:line list" \
|
|
69
|
+
"FIND: <design intent / architecture>
|
|
70
|
+
SCOPE: src/
|
|
71
|
+
EXPECTED: pattern descriptions with file evidence" \
|
|
72
|
+
--max-turns 3 --json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Dependency-map** — combine explore + Bash:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
maestro explore "FIND: import/export relationships
|
|
79
|
+
SCOPE: src/
|
|
80
|
+
ATTENTION: circular dependencies, tight coupling
|
|
81
|
+
EXPECTED: dependency pairs with file:line" --max-turns 4 --json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Secondary: Bash structural scan (supplement only)
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
rg "^export (class|interface|function) " --type ts -n | head -30
|
|
88
|
+
rg "^import .* from " -n | head -30
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Use Bash only when `maestro explore` results need structural verification.
|
|
92
|
+
|
|
93
|
+
### Fallback: `maestro delegate` (only when explore unavailable)
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
maestro delegate "PURPOSE: {from prompt} TASK: {from prompt} MODE: analysis" --role explore --mode analysis
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Dual-Source Synthesis
|
|
100
|
+
|
|
101
|
+
1. Explore results: Semantic findings → `discovery_source: "explore"`
|
|
102
|
+
2. Bash results: Precise file:line locations → `discovery_source: "bash-scan"`
|
|
103
|
+
3. Merge with source attribution and generate for each file:
|
|
104
|
+
- `rationale`: WHY the file was selected (specific, >10 chars)
|
|
105
|
+
- `topic_relation`: HOW the file connects to the exploration angle/topic
|
|
106
|
+
- `key_code`: Detailed descriptions of key symbols with locations (for relevance >= 0.7)
|
|
107
|
+
|
|
108
|
+
## Phase 3: Schema Validation
|
|
109
|
+
|
|
110
|
+
### MANDATORY when schema file is specified in prompt
|
|
111
|
+
|
|
112
|
+
**Step 1: Read Schema FIRST** before generating any output
|
|
113
|
+
|
|
114
|
+
**Step 2: Extract Schema Requirements**
|
|
115
|
+
1. Root structure — array `[...]` or object `{...}`?
|
|
116
|
+
2. Required fields — list all `"required": [...]` arrays
|
|
117
|
+
3. Field names EXACTLY — copy character-by-character (case-sensitive)
|
|
118
|
+
4. Enum values — copy exact strings (case-sensitive)
|
|
119
|
+
5. Nested structures — note flat vs nested requirements
|
|
120
|
+
|
|
121
|
+
**Step 3: File Rationale Validation** (MANDATORY for relevant_files / affected_files)
|
|
122
|
+
|
|
123
|
+
Every file entry MUST have:
|
|
124
|
+
- `rationale` (required, minLength 10): Specific reason tied to the exploration topic
|
|
125
|
+
- `role` (required, enum): modify_target / dependency / pattern_reference / test_target / type_definition / integration_point / config / context_only
|
|
126
|
+
- `discovery_source` (recommended): explore / bash-scan / dependency-trace / manual
|
|
127
|
+
- `key_code` (required for relevance >= 0.7): Array of {symbol, location?, description}
|
|
128
|
+
- `topic_relation` (required for relevance >= 0.7): Connection from exploration angle perspective
|
|
129
|
+
|
|
130
|
+
**Step 4: Pre-Output Validation Checklist**
|
|
131
|
+
- [ ] Root structure matches schema
|
|
132
|
+
- [ ] ALL required fields present at each level
|
|
133
|
+
- [ ] Field names EXACTLY match schema
|
|
134
|
+
- [ ] Enum values EXACTLY match schema
|
|
135
|
+
- [ ] Every file has: path + relevance + rationale + role
|
|
136
|
+
- [ ] Files with relevance >= 0.7 have key_code and topic_relation
|
|
137
|
+
|
|
138
|
+
## Phase 4: Output Generation
|
|
139
|
+
|
|
140
|
+
### Agent Output (return to caller)
|
|
141
|
+
Brief summary: task completion status, key findings, generated file paths
|
|
142
|
+
|
|
143
|
+
### File Output (as specified in prompt)
|
|
144
|
+
1. Read schema file BEFORE generating output
|
|
145
|
+
2. Extract ALL field names from schema
|
|
146
|
+
3. Build JSON using ONLY schema field names
|
|
147
|
+
4. Validate against checklist before writing
|
|
148
|
+
5. Write file with validated content
|
|
149
|
+
|
|
150
|
+
## Return Protocol
|
|
151
|
+
|
|
152
|
+
- **TASK COMPLETE**: All analysis phases completed. Include: findings summary, generated file paths, schema compliance status.
|
|
153
|
+
- **TASK BLOCKED**: Cannot proceed (missing schema, inaccessible files, all fallbacks exhausted). Include: blocker description, what was attempted.
|
|
154
|
+
- **CHECKPOINT REACHED**: Partial results available. Include: completed phases, pending phases, partial findings.
|
|
155
|
+
|
|
156
|
+
## Pre-Return Verification
|
|
157
|
+
|
|
158
|
+
- [ ] All 4 phases were executed (or skipped with justification)
|
|
159
|
+
- [ ] Schema was read BEFORE output generation (if schema specified)
|
|
160
|
+
- [ ] All field names match schema exactly (case-sensitive)
|
|
161
|
+
- [ ] Every file entry has rationale (specific, >10 chars) and role
|
|
162
|
+
- [ ] High-relevance files (>= 0.7) have key_code and topic_relation
|
|
163
|
+
- [ ] Discovery sources are tracked for all findings
|
|
164
|
+
- [ ] No files were modified (read-only agent)
|
|
165
|
+
|
|
166
|
+
## Rules
|
|
167
|
+
|
|
168
|
+
### ALWAYS
|
|
169
|
+
- Prefer `maestro explore` over raw Grep/rg for code search
|
|
170
|
+
- Use structured prompt format (FIND/SCOPE/EXCLUDE/ATTENTION/EXPECTED)
|
|
171
|
+
- Read schema file FIRST before generating output (if schema specified)
|
|
172
|
+
- Copy field names EXACTLY from schema (case-sensitive)
|
|
173
|
+
- Include file:line references in findings
|
|
174
|
+
- Track discovery source for all findings
|
|
175
|
+
- Use `run_in_background: false` for all Bash/CLI calls
|
|
176
|
+
|
|
177
|
+
### NEVER
|
|
178
|
+
- Modify any files (read-only agent)
|
|
179
|
+
- Skip schema reading step when schema is specified
|
|
180
|
+
- Guess field names — ALWAYS copy from schema
|
|
181
|
+
- Omit required fields'''
|