maestro-flow 0.4.1 → 0.4.2
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/.claude/commands/maestro-impeccable.md +76 -73
- package/.codex/skills/maestro-impeccable/SKILL.md +75 -72
- package/dist/src/commands/hooks.d.ts +49 -0
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +197 -30
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts +2 -0
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +72 -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 +15 -2
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +13 -0
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +13 -0
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +7 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.d.ts +5 -0
- package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts +2 -0
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +22 -3
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +25 -4
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.d.ts +5 -0
- package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.js +16 -0
- package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.js +1 -1
- package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
- package/package.json +1 -1
|
@@ -76,81 +76,84 @@ responsive-design.md, spatial-design.md, typography.md, ux-writing.md
|
|
|
76
76
|
|
|
77
77
|
| Chain | Steps | Scenario |
|
|
78
78
|
|-------|-------|----------|
|
|
79
|
-
| build | teach? → explore? → shape → craft → critique → [refine] → audit → polish |
|
|
80
|
-
| redesign | document → explore → shape → craft → critique → [refine] → audit → polish |
|
|
81
|
-
| improve | critique → [refine] → polish → audit |
|
|
82
|
-
| enhance | {cmd...} → critique → [refine] → polish |
|
|
83
|
-
| launch | harden → adapt → optimize → audit → polish |
|
|
84
|
-
| harden | harden → audit → polish |
|
|
85
|
-
| foundation | teach? → explore → document → extract |
|
|
86
|
-
| live | live |
|
|
79
|
+
| build | teach? → explore? → shape → craft → critique → [refine] → audit → polish | New from scratch |
|
|
80
|
+
| redesign | document → explore → shape → craft → critique → [refine] → audit → polish | Redesign existing code |
|
|
81
|
+
| improve | critique → [refine] → polish → audit | Iterative improvement |
|
|
82
|
+
| enhance | {cmd...} → critique → [refine] → polish | Targeted enhancement (multi-command) |
|
|
83
|
+
| launch | harden → adapt → optimize → audit → polish | Full production readiness |
|
|
84
|
+
| harden | harden → audit → polish | Edge case hardening |
|
|
85
|
+
| foundation | teach? → explore → document → extract | Design system setup |
|
|
86
|
+
| live | live | Real-time iteration |
|
|
87
87
|
|
|
88
88
|
- `?` = conditional: teach if PRODUCT.md missing; explore if DESIGN.md missing and --skip-design not set
|
|
89
89
|
- `[refine]` = quality gate loop: gate fails → auto-select fix commands from findings → re-gate
|
|
90
|
-
- `{cmd...}` = enhance
|
|
90
|
+
- `{cmd...}` = enhance supports multiple commands, comma-separated: `enhance colorize,typeset landing-page`
|
|
91
91
|
|
|
92
92
|
Chain flags: --threshold <N> (default 26/40), --max-loops <N> (default 3), --skip-design, --styles <N>, -y
|
|
93
93
|
|
|
94
94
|
## Free Text Routing
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
Three-layer priority matching. Stop on first match — do not continue to lower layers.
|
|
97
97
|
|
|
98
|
-
### Layer 1:
|
|
98
|
+
### Layer 1: Single command intent → Direct
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Semantically match user description against the Command Routing table's Description column. Match the closest **single** command.
|
|
101
|
+
|
|
102
|
+
**Skip condition**: If the prompt also contains a Layer 2 chain keyword AND does not focus on a single design dimension, skip this layer.
|
|
103
|
+
Example: `enhance colors and typography` — "enhance" is a chain keyword + multiple design dimensions → skip to Layer 2.
|
|
101
104
|
|
|
102
105
|
| Intent signal | Command |
|
|
103
106
|
|---------------|---------|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
128
|
-
### Layer 2:
|
|
129
|
-
|
|
130
|
-
Layer 1
|
|
131
|
-
- 包含具体文件路径或目标(`d:\path`, `src/pages/`, `index.html`)
|
|
132
|
-
- 包含详细视觉规格(布局、风格、配色方案)
|
|
133
|
-
- 包含参考素材(`参考...`, `based on...`, `like...`)
|
|
134
|
-
|
|
135
|
-
→ 路由到 **craft**(Direct)
|
|
136
|
-
|
|
137
|
-
### Layer 3: 项目意图 → Chain
|
|
138
|
-
|
|
139
|
-
Layer 1+2 未命中,意图是泛泛的项目方向:
|
|
107
|
+
| review, check UX, score, heuristic, evaluate usability | critique |
|
|
108
|
+
| audit, a11y, accessibility, technical check, performance audit, code quality | audit |
|
|
109
|
+
| add animation, motion, transitions, micro-interactions | animate |
|
|
110
|
+
| color, palette, OKLCH, contrast, color scheme | colorize |
|
|
111
|
+
| font, typography, type scale, line height, font pairing | typeset |
|
|
112
|
+
| layout, spacing, grid, alignment, visual hierarchy | layout |
|
|
113
|
+
| too loud, tone down, visual noise, make it simpler, too busy | quieter |
|
|
114
|
+
| too bland, bolder, more personality, stronger, more contrast | bolder |
|
|
115
|
+
| too complex, simplify, strip, remove clutter, cognitive load | distill |
|
|
116
|
+
| polish, fine-tune, pixel perfect, final pass, refine details | polish |
|
|
117
|
+
| copy, labels, error messages, UX writing, microcopy, CTAs | clarify |
|
|
118
|
+
| responsive, mobile, adapt, breakpoints, touch targets | adapt |
|
|
119
|
+
| performance, loading, bundle, jank, speed, rendering | optimize |
|
|
120
|
+
| edge cases, error states, i18n, overflow, empty state hardening | harden |
|
|
121
|
+
| onboarding, first-run, empty state, activation, progressive disclosure | onboard |
|
|
122
|
+
| fun, surprise, personality, memorable, joy, delight | delight |
|
|
123
|
+
| extraordinary, push limits, ambitious effects, cutting-edge | overdrive |
|
|
124
|
+
| plan UX, wireframe, information architecture, visual direction | shape |
|
|
125
|
+
| multi-style, variants, compare styles, style comparison | explore |
|
|
126
|
+
| brand definition, PRODUCT.md, product context | teach |
|
|
127
|
+
| extract design, DESIGN.md, document design system | document |
|
|
128
|
+
| pull tokens, extract components, design system extraction | extract |
|
|
129
|
+
| real-time, browser iteration, live editing | live |
|
|
130
|
+
|
|
131
|
+
### Layer 2: Project intent → Chain
|
|
132
|
+
|
|
133
|
+
Layer 1 did not match. Check for chain-level keywords — even if the prompt also contains a specific target/path, chain matching takes priority.
|
|
140
134
|
|
|
141
135
|
| Pattern | Chain |
|
|
142
136
|
|---------|-------|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
137
|
+
| new, create, build, from scratch, start fresh | build |
|
|
138
|
+
| redo, redesign, rethink, restyle, overhaul, revamp | redesign |
|
|
139
|
+
| improve, iterate, better, refine overall | improve |
|
|
140
|
+
| enhance, visual upgrade, level up | enhance |
|
|
141
|
+
| launch, deploy, ship, production-ready, go live | launch |
|
|
142
|
+
| harden, production-harden, edge cases | harden |
|
|
143
|
+
| design system, tokens, design foundation, design infrastructure | foundation |
|
|
144
|
+
| real-time, live, browser | live |
|
|
151
145
|
|
|
152
146
|
Ambiguous + no `-y` → AskUserQuestion.
|
|
153
147
|
|
|
148
|
+
### Layer 3: Concrete build task → Direct craft
|
|
149
|
+
|
|
150
|
+
Layer 1+2 both did not match, but intent is to build/create a specific thing:
|
|
151
|
+
- Contains a specific file path or target (`d:\path`, `src/pages/`, `index.html`)
|
|
152
|
+
- Contains detailed visual specs (layout, style, color scheme)
|
|
153
|
+
- Contains reference material (`based on...`, `like...`, `similar to...`)
|
|
154
|
+
|
|
155
|
+
→ Route to **craft** (Direct)
|
|
156
|
+
|
|
154
157
|
## Prerequisites
|
|
155
158
|
|
|
156
159
|
Before reading any command workflow:
|
|
@@ -162,23 +165,23 @@ Before reading any command workflow:
|
|
|
162
165
|
## Direct Execution
|
|
163
166
|
|
|
164
167
|
1. Prerequisites ✓
|
|
165
|
-
2.
|
|
168
|
+
2. **Display execution info**:
|
|
166
169
|
```
|
|
167
170
|
── Command: {command} ────────────────────
|
|
168
171
|
Category: {category} | Target: {target}
|
|
169
172
|
─────────────────────────────────────────
|
|
170
173
|
```
|
|
171
174
|
3. Read `~/.maestro/workflows/impeccable/{command}.md`
|
|
172
|
-
4. **TodoWrite
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
+
4. **TodoWrite tracking**: create todo items for each major phase in the workflow file
|
|
176
|
+
- Format: `[{command}] {phase description}`
|
|
177
|
+
- Mark each phase completed immediately upon finishing
|
|
175
178
|
5. Follow workflow file instructions
|
|
176
179
|
6. Post: suggest logical next command (teach→shape, shape→craft, craft→critique, etc.)
|
|
177
180
|
|
|
178
181
|
## Chain Execution
|
|
179
182
|
|
|
180
183
|
1. Prerequisites ✓
|
|
181
|
-
2.
|
|
184
|
+
2. **Display chain preview**: parse chain definition, output full step preview:
|
|
182
185
|
```
|
|
183
186
|
── Chain: build ──────────────────────────
|
|
184
187
|
1. teach (conditional: PRODUCT.md missing)
|
|
@@ -192,31 +195,31 @@ Before reading any command workflow:
|
|
|
192
195
|
─────────────────────────────────────────
|
|
193
196
|
Target: {target}
|
|
194
197
|
```
|
|
195
|
-
- `◆`
|
|
196
|
-
- `↺`
|
|
197
|
-
-
|
|
198
|
-
-
|
|
198
|
+
- `◆` marks quality gate steps with threshold
|
|
199
|
+
- `↺` marks refine loop with max iteration count
|
|
200
|
+
- Conditional steps show trigger condition
|
|
201
|
+
- Skipped conditional steps marked `(skipped)`
|
|
199
202
|
3. Create session: `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`
|
|
200
203
|
```json
|
|
201
204
|
{ "chain_type": "...", "target": "...", "steps": [...], "current_step": 0,
|
|
202
205
|
"gate_history": [], "loop_count": 0, "status": "running" }
|
|
203
206
|
```
|
|
204
|
-
4. **TodoWrite
|
|
205
|
-
-
|
|
206
|
-
- conditional
|
|
207
|
-
-
|
|
207
|
+
4. **TodoWrite init**: create todo items for all chain steps
|
|
208
|
+
- One item per step, format: `[chain] step N: {command} — {description}`
|
|
209
|
+
- If conditional step is skipped, immediately mark completed
|
|
210
|
+
- Quality gate steps include threshold: `[chain] step 5: critique ◆ gate ≥26/40`
|
|
208
211
|
5. For each step:
|
|
209
212
|
- Read `~/.maestro/workflows/impeccable/{command}.md` → execute
|
|
210
|
-
-
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
+
- **Step start**: TodoWrite marks current step in_progress
|
|
214
|
+
- **Step done**: TodoWrite marks completed + update status.json (`current_step`, step `status`)
|
|
215
|
+
- **Step failed**: TodoWrite marks completed (with note) + record reason
|
|
213
216
|
6. **Quality gate** (critique/audit steps):
|
|
214
217
|
- Parse score: critique `**Total** | | **N/40**`, audit `**Total** | | **N/20**`
|
|
215
218
|
- Count `[P0]` / `[P1]` tags
|
|
216
219
|
- Pass: score ≥ threshold AND P0 == 0 → advance
|
|
217
220
|
- Fail: collect suggested commands from findings → execute → re-gate
|
|
218
221
|
- Max loops exceeded → force advance with warning
|
|
219
|
-
- TodoWrite
|
|
222
|
+
- TodoWrite: record gate result in current step notes (score, P0/P1 count, pass/fail)
|
|
220
223
|
7. Final report: scores + trend + commands executed
|
|
221
224
|
|
|
222
225
|
## Resume
|
|
@@ -70,14 +70,14 @@ responsive-design.md, spatial-design.md, typography.md, ux-writing.md
|
|
|
70
70
|
|
|
71
71
|
| Chain | Steps | Scenario |
|
|
72
72
|
|-------|-------|----------|
|
|
73
|
-
| build | teach? → explore? → shape → craft → critique → [refine] → audit → polish |
|
|
74
|
-
| redesign | document → explore → shape → craft → critique → [refine] → audit → polish |
|
|
75
|
-
| improve | critique → [refine] → polish → audit |
|
|
76
|
-
| enhance | {cmd...} → critique → [refine] → polish |
|
|
77
|
-
| launch | harden → adapt → optimize → audit → polish |
|
|
78
|
-
| harden | harden → audit → polish |
|
|
79
|
-
| foundation | teach? → explore → document → extract |
|
|
80
|
-
| live | live |
|
|
73
|
+
| build | teach? → explore? → shape → craft → critique → [refine] → audit → polish | New from scratch |
|
|
74
|
+
| redesign | document → explore → shape → craft → critique → [refine] → audit → polish | Redesign existing code |
|
|
75
|
+
| improve | critique → [refine] → polish → audit | Iterative improvement |
|
|
76
|
+
| enhance | {cmd...} → critique → [refine] → polish | Targeted enhancement (multi-command) |
|
|
77
|
+
| launch | harden → adapt → optimize → audit → polish | Full production readiness |
|
|
78
|
+
| harden | harden → audit → polish | Edge case hardening |
|
|
79
|
+
| foundation | teach? → explore → document → extract | Design system setup |
|
|
80
|
+
| live | live | Real-time iteration |
|
|
81
81
|
|
|
82
82
|
- `?` = conditional: teach if PRODUCT.md missing; explore if DESIGN.md missing and --skip-design not set
|
|
83
83
|
- `[refine]` = quality gate loop: gate fails → auto-select fix commands from findings → re-gate
|
|
@@ -85,64 +85,67 @@ responsive-design.md, spatial-design.md, typography.md, ux-writing.md
|
|
|
85
85
|
|
|
86
86
|
## Free Text Routing
|
|
87
87
|
|
|
88
|
-
Three-layer priority matching. Stop on first match.
|
|
88
|
+
Three-layer priority matching. Stop on first match — do not continue to lower layers.
|
|
89
89
|
|
|
90
|
-
### Layer 1:
|
|
90
|
+
### Layer 1: Single command intent → Direct
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
Semantically match user description against the Command Routing table's Description column. Match the closest **single** command.
|
|
93
|
+
|
|
94
|
+
**Skip condition**: If the prompt also contains a Layer 2 chain keyword AND does not focus on a single design dimension, skip this layer.
|
|
95
|
+
Example: `enhance colors and typography` — "enhance" is a chain keyword + multiple design dimensions → skip to Layer 2.
|
|
93
96
|
|
|
94
97
|
| Intent signal | Command |
|
|
95
98
|
|---------------|---------|
|
|
96
|
-
| review, UX
|
|
97
|
-
|
|
|
98
|
-
| animation, motion, transitions,
|
|
99
|
-
| color, palette,
|
|
100
|
-
|
|
|
101
|
-
| layout, spacing, grid, alignment,
|
|
102
|
-
| tone down,
|
|
103
|
-
| too bland, bolder, more personality,
|
|
104
|
-
| simplify, strip,
|
|
105
|
-
| polish,
|
|
106
|
-
| copy, labels, error messages, UX writing,
|
|
107
|
-
| responsive, mobile, breakpoints,
|
|
108
|
-
| performance, loading, bundle, jank,
|
|
109
|
-
| edge cases, error states, i18n, overflow,
|
|
110
|
-
| onboarding, first-run, empty state,
|
|
111
|
-
|
|
|
112
|
-
| extraordinary, push limits,
|
|
113
|
-
| plan UX, wireframe, information architecture,
|
|
114
|
-
| variants, compare styles,
|
|
115
|
-
| PRODUCT.md,
|
|
116
|
-
| DESIGN.md, design
|
|
117
|
-
| pull tokens, extract components,
|
|
118
|
-
| browser iteration,
|
|
119
|
-
|
|
120
|
-
### Layer 2:
|
|
121
|
-
|
|
122
|
-
Layer 1
|
|
123
|
-
- Has specific file path or target
|
|
124
|
-
- Has detailed visual specs (layout, style, palette)
|
|
125
|
-
- Has reference material
|
|
126
|
-
|
|
127
|
-
→ Route to **craft** (Direct)
|
|
128
|
-
|
|
129
|
-
### Layer 3: Project intent → Chain
|
|
130
|
-
|
|
131
|
-
Layer 1+2 missed, broad project direction:
|
|
99
|
+
| review, check UX, score, heuristic, evaluate usability | critique |
|
|
100
|
+
| audit, a11y, accessibility, technical check, performance audit, code quality | audit |
|
|
101
|
+
| add animation, motion, transitions, micro-interactions | animate |
|
|
102
|
+
| color, palette, OKLCH, contrast, color scheme | colorize |
|
|
103
|
+
| font, typography, type scale, line height, font pairing | typeset |
|
|
104
|
+
| layout, spacing, grid, alignment, visual hierarchy | layout |
|
|
105
|
+
| too loud, tone down, visual noise, make it simpler, too busy | quieter |
|
|
106
|
+
| too bland, bolder, more personality, stronger, more contrast | bolder |
|
|
107
|
+
| too complex, simplify, strip, remove clutter, cognitive load | distill |
|
|
108
|
+
| polish, fine-tune, pixel perfect, final pass, refine details | polish |
|
|
109
|
+
| copy, labels, error messages, UX writing, microcopy, CTAs | clarify |
|
|
110
|
+
| responsive, mobile, adapt, breakpoints, touch targets | adapt |
|
|
111
|
+
| performance, loading, bundle, jank, speed, rendering | optimize |
|
|
112
|
+
| edge cases, error states, i18n, overflow, empty state hardening | harden |
|
|
113
|
+
| onboarding, first-run, empty state, activation, progressive disclosure | onboard |
|
|
114
|
+
| fun, surprise, personality, memorable, joy, delight | delight |
|
|
115
|
+
| extraordinary, push limits, ambitious effects, cutting-edge | overdrive |
|
|
116
|
+
| plan UX, wireframe, information architecture, visual direction | shape |
|
|
117
|
+
| multi-style, variants, compare styles, style comparison | explore |
|
|
118
|
+
| brand definition, PRODUCT.md, product context | teach |
|
|
119
|
+
| extract design, DESIGN.md, document design system | document |
|
|
120
|
+
| pull tokens, extract components, design system extraction | extract |
|
|
121
|
+
| real-time, browser iteration, live editing | live |
|
|
122
|
+
|
|
123
|
+
### Layer 2: Project intent → Chain
|
|
124
|
+
|
|
125
|
+
Layer 1 did not match. Check for chain-level keywords — even if the prompt also contains a specific target/path, chain matching takes priority.
|
|
132
126
|
|
|
133
127
|
| Pattern | Chain |
|
|
134
128
|
|---------|-------|
|
|
135
|
-
| create, build,
|
|
136
|
-
| redesign, rethink, restyle | redesign |
|
|
137
|
-
| improve, iterate, better | improve |
|
|
138
|
-
| enhance, visual upgrade | enhance |
|
|
139
|
-
| launch, deploy, ship, production-ready | launch |
|
|
140
|
-
| harden, production, edge cases | harden |
|
|
141
|
-
| design system, tokens, design
|
|
142
|
-
| live, browser | live |
|
|
129
|
+
| new, create, build, from scratch, start fresh | build |
|
|
130
|
+
| redo, redesign, rethink, restyle, overhaul, revamp | redesign |
|
|
131
|
+
| improve, iterate, better, refine overall | improve |
|
|
132
|
+
| enhance, visual upgrade, level up | enhance |
|
|
133
|
+
| launch, deploy, ship, production-ready, go live | launch |
|
|
134
|
+
| harden, production-harden, edge cases | harden |
|
|
135
|
+
| design system, tokens, design foundation, design infrastructure | foundation |
|
|
136
|
+
| real-time, live, browser | live |
|
|
143
137
|
|
|
144
138
|
Ambiguous + no `-y` → `request_user_input`.
|
|
145
139
|
|
|
140
|
+
### Layer 3: Concrete build task → Direct craft
|
|
141
|
+
|
|
142
|
+
Layer 1+2 both did not match, but intent is to build/create a specific thing:
|
|
143
|
+
- Contains a specific file path or target (`d:\path`, `src/pages/`, `index.html`)
|
|
144
|
+
- Contains detailed visual specs (layout, style, color scheme)
|
|
145
|
+
- Contains reference material (`based on...`, `like...`, `similar to...`)
|
|
146
|
+
|
|
147
|
+
→ Route to **craft** (Direct)
|
|
148
|
+
|
|
146
149
|
<invariants>
|
|
147
150
|
1. Prerequisites before any design work — never skip context loading or register detection
|
|
148
151
|
2. Read workflow file before execution — never execute a command without loading its .md
|
|
@@ -161,23 +164,23 @@ Before reading any command workflow:
|
|
|
161
164
|
## Direct Execution
|
|
162
165
|
|
|
163
166
|
1. Prerequisites ✓
|
|
164
|
-
2.
|
|
167
|
+
2. **Display execution info**:
|
|
165
168
|
```
|
|
166
169
|
── Command: {command} ────────────────────
|
|
167
170
|
Category: {category} | Target: {target}
|
|
168
171
|
─────────────────────────────────────────
|
|
169
172
|
```
|
|
170
173
|
3. Read `~/.maestro/workflows/impeccable/{command}.md`
|
|
171
|
-
4. **
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
+
4. **Progress tracking**: create todo items for each major phase in the workflow file
|
|
175
|
+
- Format: `[{command}] {phase description}`
|
|
176
|
+
- Mark each phase completed immediately upon finishing
|
|
174
177
|
5. Follow workflow file instructions
|
|
175
178
|
6. Post: suggest logical next command (teach→shape, shape→craft, craft→critique, etc.)
|
|
176
179
|
|
|
177
180
|
## Chain Execution
|
|
178
181
|
|
|
179
182
|
1. Prerequisites ✓
|
|
180
|
-
2.
|
|
183
|
+
2. **Display chain preview**: parse chain definition, output full step preview:
|
|
181
184
|
```
|
|
182
185
|
── Chain: build ──────────────────────────
|
|
183
186
|
1. teach (conditional: PRODUCT.md missing)
|
|
@@ -191,31 +194,31 @@ Before reading any command workflow:
|
|
|
191
194
|
─────────────────────────────────────────
|
|
192
195
|
Target: {target}
|
|
193
196
|
```
|
|
194
|
-
- `◆`
|
|
195
|
-
- `↺`
|
|
196
|
-
-
|
|
197
|
-
-
|
|
197
|
+
- `◆` marks quality gate steps with threshold
|
|
198
|
+
- `↺` marks refine loop with max iteration count
|
|
199
|
+
- Conditional steps show trigger condition
|
|
200
|
+
- Skipped conditional steps marked `(skipped)`
|
|
198
201
|
3. Create session: `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`
|
|
199
202
|
```json
|
|
200
203
|
{ "chain_type": "...", "target": "...", "steps": [...], "current_step": 0,
|
|
201
204
|
"gate_history": [], "loop_count": 0, "status": "running" }
|
|
202
205
|
```
|
|
203
|
-
4. **
|
|
204
|
-
-
|
|
205
|
-
- conditional
|
|
206
|
-
-
|
|
206
|
+
4. **Init tracking**: create todo items for all chain steps
|
|
207
|
+
- One item per step, format: `[chain] step N: {command} — {description}`
|
|
208
|
+
- If conditional step is skipped, immediately mark completed
|
|
209
|
+
- Quality gate steps include threshold: `[chain] step 5: critique ◆ gate ≥26/40`
|
|
207
210
|
5. For each step:
|
|
208
211
|
- Read `~/.maestro/workflows/impeccable/{command}.md` → execute
|
|
209
|
-
-
|
|
210
|
-
-
|
|
211
|
-
-
|
|
212
|
+
- **Step start**: mark current step in_progress
|
|
213
|
+
- **Step done**: mark completed + update status.json (`current_step`, step `status`)
|
|
214
|
+
- **Step failed**: mark completed (with note) + record reason
|
|
212
215
|
6. **Quality gate** (critique/audit steps):
|
|
213
216
|
- Parse score: critique `**Total** | | **N/40**`, audit `**Total** | | **N/20**`
|
|
214
217
|
- Count `[P0]` / `[P1]` tags
|
|
215
218
|
- Pass: score ≥ threshold AND P0 == 0 → advance
|
|
216
219
|
- Fail: collect suggested commands from findings → execute → re-gate
|
|
217
220
|
- Max loops exceeded → force advance with warning
|
|
218
|
-
-
|
|
221
|
+
- Record gate result in current step notes (score, P0/P1 count, pass/fail)
|
|
219
222
|
7. Final report: scores + trend + commands executed
|
|
220
223
|
|
|
221
224
|
## Resume
|
|
@@ -39,6 +39,16 @@ export type HookLevel = 'none' | 'minimal' | 'standard' | 'full';
|
|
|
39
39
|
export declare const HOOK_LEVELS: readonly HookLevel[];
|
|
40
40
|
export declare const HOOK_LEVEL_DESCRIPTIONS: Record<HookLevel, string>;
|
|
41
41
|
export declare const HOOK_DEFS: Record<string, HookDef>;
|
|
42
|
+
interface CodexHookDef {
|
|
43
|
+
event: 'SessionStart' | 'PreToolUse' | 'PostToolUse' | 'UserPromptSubmit' | 'Stop';
|
|
44
|
+
matcher?: string;
|
|
45
|
+
level: HookLevel;
|
|
46
|
+
requiresWorkspace?: boolean;
|
|
47
|
+
statusMessage?: string;
|
|
48
|
+
timeout?: number;
|
|
49
|
+
}
|
|
50
|
+
export declare const CODEX_HOOK_DEFS: Record<string, CodexHookDef>;
|
|
51
|
+
export declare const CODEX_HOOK_LEVEL_DESCRIPTIONS: Record<HookLevel, string>;
|
|
42
52
|
export declare function getClaudeSettingsPath(): string;
|
|
43
53
|
export declare function loadClaudeSettings(settingsPath: string): ClaudeSettings;
|
|
44
54
|
export declare function removeMaestroHooks(settings: ClaudeSettings): void;
|
|
@@ -73,6 +83,45 @@ export declare function installHooksByLevel(level: HookLevel, opts?: {
|
|
|
73
83
|
settingsPath?: string;
|
|
74
84
|
skipStatusline?: boolean;
|
|
75
85
|
}): InstallHooksResult;
|
|
86
|
+
interface CodexHookGroup {
|
|
87
|
+
matcher?: string;
|
|
88
|
+
hooks: Array<{
|
|
89
|
+
type: string;
|
|
90
|
+
command: string;
|
|
91
|
+
statusMessage?: string;
|
|
92
|
+
timeout?: number;
|
|
93
|
+
}>;
|
|
94
|
+
}
|
|
95
|
+
interface CodexHooksFile {
|
|
96
|
+
hooks?: {
|
|
97
|
+
SessionStart?: CodexHookGroup[];
|
|
98
|
+
PreToolUse?: CodexHookGroup[];
|
|
99
|
+
PostToolUse?: CodexHookGroup[];
|
|
100
|
+
UserPromptSubmit?: CodexHookGroup[];
|
|
101
|
+
Stop?: CodexHookGroup[];
|
|
102
|
+
[key: string]: unknown;
|
|
103
|
+
};
|
|
104
|
+
[key: string]: unknown;
|
|
105
|
+
}
|
|
106
|
+
export declare function getCodexHooksPath(opts?: {
|
|
107
|
+
project?: boolean;
|
|
108
|
+
}): string;
|
|
109
|
+
export declare function loadCodexHooks(hooksPath: string): CodexHooksFile;
|
|
110
|
+
export declare function removeCodexMaestroHooks(hooksFile: CodexHooksFile): void;
|
|
111
|
+
/**
|
|
112
|
+
* Check whether `codex_hooks = true` is set in config.toml.
|
|
113
|
+
* Returns true if the flag is found; prints a hint otherwise.
|
|
114
|
+
*/
|
|
115
|
+
export declare function checkCodexHooksFeatureFlag(opts?: {
|
|
116
|
+
project?: boolean;
|
|
117
|
+
}): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Install hooks at the given level into Codex hooks.json.
|
|
120
|
+
*/
|
|
121
|
+
export declare function installCodexHooksByLevel(level: HookLevel, opts?: {
|
|
122
|
+
project?: boolean;
|
|
123
|
+
hooksPath?: string;
|
|
124
|
+
}): InstallHooksResult;
|
|
76
125
|
export declare function registerHooksCommand(program: Command): void;
|
|
77
126
|
export {};
|
|
78
127
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BzC,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE;QACN,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;QACzB,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC;QAC1B,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;QAC/B,YAAY,CAAC,EAAE,SAAS,EAAE,CAAC;QAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAMD,UAAU,OAAO;IACf,KAAK,EAAE,YAAY,GAAG,aAAa,GAAG,kBAAkB,GAAG,cAAc,GAAG,MAAM,C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