maestro-flow 0.4.1 → 0.4.3

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.
Files changed (115) hide show
  1. package/.claude/commands/maestro-analyze.md +1 -1
  2. package/.claude/commands/maestro-brainstorm.md +1 -1
  3. package/.claude/commands/maestro-collab.md +1 -1
  4. package/.claude/commands/maestro-execute.md +10 -1
  5. package/.claude/commands/maestro-guard.md +101 -0
  6. package/.claude/commands/maestro-impeccable.md +77 -74
  7. package/.claude/commands/maestro-plan.md +15 -2
  8. package/.claude/commands/maestro-ralph-execute.md +9 -2
  9. package/.claude/commands/maestro-ralph.md +8 -1
  10. package/.claude/commands/maestro-verify.md +15 -1
  11. package/.claude/commands/quality-auto-test.md +1 -1
  12. package/.claude/commands/quality-debug.md +1 -1
  13. package/.claude/commands/quality-refactor.md +1 -1
  14. package/.claude/commands/quality-retrospective.md +1 -1
  15. package/.claude/commands/quality-review.md +15 -1
  16. package/.claude/commands/quality-test.md +1 -1
  17. package/.claude/commands/security-audit.md +154 -0
  18. package/.claude/skills/maestro-help/index/catalog.json +2 -0
  19. package/.codex/skills/maestro-analyze/SKILL.md +18 -1
  20. package/.codex/skills/maestro-brainstorm/SKILL.md +17 -4
  21. package/.codex/skills/maestro-collab/SKILL.md +7 -1
  22. package/.codex/skills/maestro-execute/SKILL.md +365 -348
  23. package/.codex/skills/maestro-guard/SKILL.md +97 -0
  24. package/.codex/skills/maestro-impeccable/SKILL.md +76 -73
  25. package/.codex/skills/maestro-plan/SKILL.md +66 -7
  26. package/.codex/skills/maestro-ralph/SKILL.md +1 -1
  27. package/.codex/skills/maestro-verify/SKILL.md +18 -1
  28. package/.codex/skills/quality-auto-test/SKILL.md +13 -3
  29. package/.codex/skills/quality-debug/SKILL.md +362 -346
  30. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  31. package/.codex/skills/quality-retrospective/SKILL.md +292 -292
  32. package/.codex/skills/quality-review/SKILL.md +374 -365
  33. package/.codex/skills/quality-test/SKILL.md +1 -1
  34. package/.codex/skills/security-audit/SKILL.md +154 -0
  35. package/bin/maestro-hook-runner.js +21 -1
  36. package/dashboard/dist-server/src/coordinator/output-parser.js +27 -0
  37. package/dashboard/dist-server/src/coordinator/output-parser.js.map +1 -1
  38. package/dist/src/commands/coordinate.d.ts.map +1 -1
  39. package/dist/src/commands/coordinate.js +2 -0
  40. package/dist/src/commands/coordinate.js.map +1 -1
  41. package/dist/src/commands/hooks.d.ts +49 -0
  42. package/dist/src/commands/hooks.d.ts.map +1 -1
  43. package/dist/src/commands/hooks.js +236 -33
  44. package/dist/src/commands/hooks.js.map +1 -1
  45. package/dist/src/commands/install-backend.d.ts +2 -0
  46. package/dist/src/commands/install-backend.d.ts.map +1 -1
  47. package/dist/src/commands/install-backend.js +72 -0
  48. package/dist/src/commands/install-backend.js.map +1 -1
  49. package/dist/src/commands/install.d.ts.map +1 -1
  50. package/dist/src/commands/install.js +15 -2
  51. package/dist/src/commands/install.js.map +1 -1
  52. package/dist/src/coordinator/output-parser.d.ts.map +1 -1
  53. package/dist/src/coordinator/output-parser.js +27 -0
  54. package/dist/src/coordinator/output-parser.js.map +1 -1
  55. package/dist/src/hooks/delegate-monitor.d.ts +1 -0
  56. package/dist/src/hooks/delegate-monitor.d.ts.map +1 -1
  57. package/dist/src/hooks/delegate-monitor.js +1 -1
  58. package/dist/src/hooks/delegate-monitor.js.map +1 -1
  59. package/dist/src/hooks/guards/workflow-guard.d.ts +15 -0
  60. package/dist/src/hooks/guards/workflow-guard.d.ts.map +1 -1
  61. package/dist/src/hooks/guards/workflow-guard.js +61 -1
  62. package/dist/src/hooks/guards/workflow-guard.js.map +1 -1
  63. package/dist/src/hooks/plugins/decision-log-plugin.d.ts +19 -0
  64. package/dist/src/hooks/plugins/decision-log-plugin.d.ts.map +1 -0
  65. package/dist/src/hooks/plugins/decision-log-plugin.js +28 -0
  66. package/dist/src/hooks/plugins/decision-log-plugin.js.map +1 -0
  67. package/dist/src/hooks/plugins/index.d.ts +2 -0
  68. package/dist/src/hooks/plugins/index.d.ts.map +1 -1
  69. package/dist/src/hooks/plugins/index.js +1 -0
  70. package/dist/src/hooks/plugins/index.js.map +1 -1
  71. package/dist/src/hooks/session-context.d.ts +1 -0
  72. package/dist/src/hooks/session-context.d.ts.map +1 -1
  73. package/dist/src/hooks/session-context.js +1 -1
  74. package/dist/src/hooks/session-context.js.map +1 -1
  75. package/dist/src/hooks/skill-context.d.ts +1 -0
  76. package/dist/src/hooks/skill-context.d.ts.map +1 -1
  77. package/dist/src/hooks/skill-context.js +1 -1
  78. package/dist/src/hooks/skill-context.js.map +1 -1
  79. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  80. package/dist/src/hooks/spec-injector.js +2 -0
  81. package/dist/src/hooks/spec-injector.js.map +1 -1
  82. package/dist/src/i18n/locales/en.d.ts.map +1 -1
  83. package/dist/src/i18n/locales/en.js +13 -0
  84. package/dist/src/i18n/locales/en.js.map +1 -1
  85. package/dist/src/i18n/locales/zh.d.ts.map +1 -1
  86. package/dist/src/i18n/locales/zh.js +13 -0
  87. package/dist/src/i18n/locales/zh.js.map +1 -1
  88. package/dist/src/i18n/types.d.ts +7 -0
  89. package/dist/src/i18n/types.d.ts.map +1 -1
  90. package/dist/src/tui/install-ui/InstallConfirm.d.ts +5 -0
  91. package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
  92. package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
  93. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  94. package/dist/src/tui/install-ui/InstallExecution.d.ts +2 -0
  95. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  96. package/dist/src/tui/install-ui/InstallExecution.js +22 -3
  97. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  98. package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
  99. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  100. package/dist/src/tui/install-ui/InstallFlow.js +25 -4
  101. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  102. package/dist/src/tui/install-ui/InstallHub.d.ts +5 -0
  103. package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
  104. package/dist/src/tui/install-ui/InstallHub.js +16 -0
  105. package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
  106. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
  107. package/dist/src/tui/install-ui/InstallResult.js +1 -1
  108. package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
  109. package/package.json +1 -1
  110. package/workflows/debug.md +73 -0
  111. package/workflows/execute.md +27 -0
  112. package/workflows/plan.md +11 -0
  113. package/workflows/review.md +33 -1
  114. package/workflows/tdd.md +257 -0
  115. package/workflows/verify.md +57 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maestro-analyze
3
- description: Multi-angle analysis with CLI-assisted exploration
3
+ description: Use when a topic needs structured multi-dimensional investigation before planning or decision-making
4
4
  argument-hint: "[phase|topic] [-y] [-c] [-q] [--gaps [ISS-ID]]"
5
5
  allowed-tools:
6
6
  - Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maestro-brainstorm
3
- description: Brainstorm with auto pipeline or single-role analysis
3
+ description: Use when exploring ideas, evaluating approaches, or needing multi-perspective analysis before implementation
4
4
  argument-hint: "[topic|role-name] [--yes] [--count N] [--session ID] [--update] [--skip-questions] [--include-questions] [--style-skill PKG]"
5
5
  allowed-tools:
6
6
  - Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maestro-collab
3
- description: Multi-CLI collaborative analysis -- fan-out to multiple CLI tools, cross-verify, synthesize
3
+ description: Use when a question needs cross-verification from multiple CLI tools or diverse analytical perspectives
4
4
  argument-hint: "\"<requirement>\" [--tools gemini,qwen,claude] [--mode analysis|write] [--rule <template>] [-y]"
5
5
  allowed-tools:
6
6
  - Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maestro-execute
3
- description: Execute plan with parallel waves and atomic commits
3
+ description: Use when a confirmed plan is ready for implementation
4
4
  argument-hint: "[phase] [--auto-commit] [--method agent|cli|auto] [--executor <tool>] [--dir <path>] [-y]"
5
5
  allowed-tools:
6
6
  - Read
@@ -98,6 +98,15 @@ Next steps:
98
98
  /manage-status -- View project dashboard
99
99
  ```
100
100
 
101
+ **Completion status:**
102
+ ```
103
+ --- COMPLETION STATUS ---
104
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
105
+ CONCERNS: {failed_count} tasks failed (if any)
106
+ NEXT: /maestro-verify
107
+ --- END STATUS ---
108
+ ```
109
+
101
110
  If failed tasks exist, suggest /quality-debug for investigation.
102
111
  </execution>
103
112
 
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: maestro-guard
3
+ description: Manage editing boundary restrictions
4
+ argument-hint: "<on|off|status|allow <path>|deny <path>>"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ ---
11
+ <purpose>
12
+ Configure directory-level write boundaries enforced by the workflow-guard PreToolUse hook.
13
+ When enabled, Write and Edit tool calls targeting files outside allowed paths are blocked.
14
+
15
+ Subcommands:
16
+ - **on** — Enable path guard (defaults to `src/` if no paths configured)
17
+ - **off** — Disable path guard (preserves path list)
18
+ - **status** — Show current guard configuration
19
+ - **allow `<path>`** — Add a directory to the allowed paths list
20
+ - **deny `<path>`** — Switch to deny mode and add path to deny list
21
+ </purpose>
22
+
23
+ <context>
24
+ $ARGUMENTS — Parse subcommand and optional path argument.
25
+
26
+ **Config location:** `.workflow/config.json` → `guard` section
27
+
28
+ ```json
29
+ {
30
+ "guard": {
31
+ "enabled": false,
32
+ "mode": "allow",
33
+ "paths": []
34
+ }
35
+ }
36
+ ```
37
+
38
+ **Enforcement:** The `workflow-guard` hook (PreToolUse on Write/Edit) reads this config
39
+ and blocks operations targeting files outside boundaries. Requires hooks level >= `full`.
40
+ </context>
41
+
42
+ <execution>
43
+
44
+ **Step 1: Parse subcommand**
45
+
46
+ Extract from $ARGUMENTS:
47
+ - `on` / `off` / `status` / `allow <path>` / `deny <path>`
48
+ - If no subcommand, default to `status`
49
+
50
+ **Step 2: Read config**
51
+
52
+ Read `.workflow/config.json`. If file missing, initialize with empty guard section.
53
+
54
+ **Step 3: Execute subcommand**
55
+
56
+ **`status`:**
57
+ - Display: enabled/disabled, mode (allow/deny), paths list
58
+ - Check if workflow-guard hook is active (read `.claude/settings.json` for hook presence)
59
+ - If guard enabled but hook not active, warn: "⚠ PathGuard enabled but workflow-guard hook not installed. Run `maestro hooks level full` to activate."
60
+
61
+ **`on`:**
62
+ - Set `guard.enabled = true`
63
+ - If `guard.paths` is empty, set default: `["src/", "tests/", ".workflow/"]`
64
+ - Check hook level, warn if < full
65
+ - Write config
66
+
67
+ **`off`:**
68
+ - Set `guard.enabled = false`
69
+ - Preserve existing paths and mode
70
+ - Write config
71
+
72
+ **`allow <path>`:**
73
+ - Normalize path to forward slashes, ensure trailing slash for directories
74
+ - If `guard.mode` is `deny`, switch to `allow` and clear paths with warning
75
+ - Add path to `guard.paths` (deduplicate)
76
+ - Set `guard.enabled = true` if not already
77
+ - Write config
78
+
79
+ **`deny <path>`:**
80
+ - Normalize path to forward slashes
81
+ - Set `guard.mode = "deny"`
82
+ - Add path to `guard.paths` (deduplicate)
83
+ - Set `guard.enabled = true` if not already
84
+ - Write config
85
+
86
+ **Step 4: Confirm**
87
+
88
+ Display updated guard configuration.
89
+
90
+ </execution>
91
+
92
+ <error_codes>
93
+ - E001: `.workflow/config.json` not found and cannot be created (not a maestro project)
94
+ - W001: PathGuard enabled but workflow-guard hook not installed
95
+ </error_codes>
96
+
97
+ <success_criteria>
98
+ - [ ] Config read/written correctly
99
+ - [ ] Hook level warning displayed when applicable
100
+ - [ ] Updated configuration shown after changes
101
+ </success_criteria>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maestro-impeccable
3
- description: Production-grade UI design 24 commands + chain orchestration with quality gates + design search
3
+ description: Use when designing, auditing, polishing, or improving frontend UI websites, dashboards, landing pages, components
4
4
  argument-hint: "<command|chain|intent> [target] [flags]"
5
5
  allowed-tools:
6
6
  - Read
@@ -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 支持多命令,逗号分隔:`enhance colorize,typeset landing-page`
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
- Free text 按优先级三层匹配。命中即停,不继续向下。
96
+ Three-layer priority matching. Stop on first match — do not continue to lower layers.
97
97
 
98
- ### Layer 1: 意图匹配单个命令 → Direct
98
+ ### Layer 1: Single command intent → Direct
99
99
 
100
- 将用户描述与 Command Routing 表的 Description 列语义匹配。匹配最接近的**一个**命令。
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
- | 评审, review, 检查UX, 评分, heuristic | critique |
105
- | 审计, a11y, 可访问性, 技术检查, performance audit, 代码质量 | audit |
106
- | 加动画, 动效, transitions, micro-interactions, 过渡 | animate |
107
- | 配色, 颜色, palette, 色彩, OKLCH, contrast | colorize |
108
- | 字体, 排版, typography, font, 字号, 行高 | typeset |
109
- | 布局, 间距, spacing, grid, 对齐, alignment, 视觉层次 | layout |
110
- | 太花, 太吵, tone down, 视觉噪音, 简洁点 | quieter |
111
- | 太平淡, 加强, 更大胆, more personality, 更有个性 | bolder |
112
- | 太复杂, 简化, strip, 去掉多余, cognitive load | distill |
113
- | 打磨, 微调, pixel perfect, final pass, 最终润色 | polish |
114
- | 文案, copy, 标签, 错误提示, UX writing, microcopy | clarify |
115
- | 响应式, mobile, 适配, breakpoints, touch targets | adapt |
116
- | 性能, loading, bundle, 卡顿, jank, 速度 | optimize |
117
- | 边界, error states, i18n, 溢出, 空状态加固 | harden |
118
- | 引导, 新手, 首次使用, onboarding, empty state, 激活 | onboard |
119
- | 趣味, 惊喜, personality, memorable, joy | delight |
120
- | 炫酷, 极限, extraordinary, 超常规, 技术极限 | overdrive |
121
- | 规划, plan UX, wireframe, 信息架构, 视觉方向 | shape |
122
- | 多风格, 变体, variants, compare styles, 风格对比 | explore |
123
- | 品牌定义, PRODUCT.md, 产品上下文 | teach |
124
- | 提取设计, DESIGN.md, 设计文档化 | document |
125
- | 提取组件, pull tokens, 设计系统提取 | extract |
126
- | 实时, browser iteration, 浏览器迭代 | live |
127
-
128
- ### Layer 2: 具体构建任务Direct craft
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
- | 新建, create, build, new, 从零开始 | build |
144
- | 重做, redesign, 重新设计, rethink, 换风格, 改版 | redesign |
145
- | 改进, improve, iterate, better, 迭代 | improve |
146
- | 增强, enhance, 视觉升级, visual upgrade | enhance |
147
- | 上线, launch, deploy, ship, 发布准备, production-ready | launch |
148
- | 加固, harden, 生产化, 边界情况 | harden |
149
- | 设计系统, design system, tokens, 设计规范, 设计基建 | foundation |
150
- | 实时, live, browser | live |
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 跟踪**:按 workflow 文件中的主要阶段创建 todo
173
- - 格式:`[{command}] {phase description}`
174
- - 每个阶段完成后立即标记 completed
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. **显示执行链**:解析 chain 定义,输出完整步骤预览:
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
- - `◆` 标记 quality gate 步骤,显示阈值
196
- - `↺` 标记 refine loop,显示最大循环次数
197
- - conditional 步骤注明触发条件
198
- - 跳过的 conditional 步骤标记 `(skipped)`
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 初始化**:为 chain 所有步骤创建 todo
205
- - 每步一项,格式:`[chain] step N: {command} — {description}`
206
- - conditional 步骤若跳过,立即标记 completed
207
- - quality gate 步骤标注阈值:`[chain] step 5: critique ◆ gate ≥26/40`
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
- - **步骤开始**:TodoWrite 标记当前步骤 in_progress
211
- - **步骤完成**:TodoWrite 标记 completed + update status.json (`current_step`, step `status`)
212
- - **步骤失败**:TodoWrite 标记 completed(with note) + 记录原因
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
- - TodoWritegate 结果记入当前步骤备注(score, P0/P1 count, pass/fail
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
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-plan
3
- description: Plan phase execution with exploration and verification
4
- argument-hint: "[phase] [--collab] [--spec SPEC-xxx] [-y] [--gaps] [--dir <path>] [--revise [instructions]] [--check <plan-dir>]"
3
+ description: Use when creating, revising, or verifying an execution plan for a phase or task
4
+ argument-hint: "[phase] [--collab] [--spec SPEC-xxx] [-y] [--gaps] [--tdd] [--dir <path>] [--revise [instructions]] [--check <plan-dir>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -122,6 +122,19 @@ Next steps:
122
122
  /maestro-plan {phase} -- Re-plan with modifications
123
123
  ```
124
124
 
125
+ **Completion status:**
126
+ ```
127
+ --- COMPLETION STATUS ---
128
+ STATUS: DONE|NEEDS_CONTEXT
129
+ CONCERNS: {description if applicable}
130
+ NEXT: /maestro-execute
131
+ --- END STATUS ---
132
+ ```
133
+
134
+ Status mapping:
135
+ - **DONE** — Plan created/revised and confirmed → NEXT: /maestro-execute
136
+ - **NEEDS_CONTEXT** — Ambiguous requirements, insufficient context to produce plan
137
+
125
138
  ### Mode: Revise / Check
126
139
 
127
140
  Follow workflow plan.md § "Revise Mode" and § "Check Mode" respectively. These modes bypass the standard P1-P5 create pipeline.
@@ -180,8 +180,15 @@ Write enriched args back to status.json (resume-safe).
180
180
  - `PHASE: N` → session.phase
181
181
  - `scratch_dir: path` → context.scratch_dir
182
182
  - `SPEC-xxx` → context.spec_session_id
183
- 3. Write status.json
184
- 4. Display: `[{index}/{total}] {skill} completed`
183
+ 3. Scan output for `--- COMPLETION STATUS ---` block. If found, parse and map:
184
+ - `STATUS: DONE` `step.status = "completed"`
185
+ - `STATUS: DONE_WITH_CONCERNS` → `step.status = "completed"`, `step.concerns = CONCERNS value`
186
+ - `STATUS: NEEDS_RETRY` → trigger retry: set `step.status = "pending"`, `step.retried = true` → S_HANDLE_FAIL
187
+ - `STATUS: BLOCKED` → `session.status = "paused"`, display blocker reason from CONCERNS
188
+ - `STATUS: NEEDS_CONTEXT` → `session.status = "paused"`, display context gap from CONCERNS
189
+ - If no `--- COMPLETION STATUS ---` block found → fall back to existing heuristic (backward compatible)
190
+ 4. Write status.json
191
+ 5. Display: `[{index}/{total}] ✓ {skill} completed`
185
192
 
186
193
  ### A_RETRY
187
194
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maestro-ralph
3
- description: Adaptive lifecycle engine infer state, build command chain
3
+ description: Use when the optimal command sequence is unclear and needs automated state-based determination
4
4
  argument-hint: "[-y] \"intent\" | status | continue"
5
5
  allowed-tools:
6
6
  - Read
@@ -238,6 +238,13 @@ Build rules: start from position, skip completed, insert decision nodes with `{
238
238
  ```
239
239
  6. On callback: parse verdict; if parse fails → fallback STATUS="fix"
240
240
  7. Confidence adjustment: <60 + proceed → fix; >95 + fix + retry>0 → suggest proceed
241
+ 8. **Decision log**: Append to `{session_dir}/decisions.ndjson`:
242
+ ```json
243
+ { "id": "DEC-{timestamp}", "timestamp": "{ISO}", "source": "ralph",
244
+ "node_id": "{step.decision}", "type": "quality-gate",
245
+ "verdict": "{adjusted_verdict}", "confidence_score": {N},
246
+ "close_call": {N>=50 && N<=70}, "summary": "{REASON}" }
247
+ ```
241
248
 
242
249
  ### A_STRUCTURAL_EVALUATE
243
250
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maestro-verify
3
- description: Verify goals with must-have checks and test coverage validation
3
+ description: Use after execution to verify goals are actually achieved with evidence-based structural checks
4
4
  argument-hint: "[phase] [--skip-tests] [--skip-antipattern] [--dir <path>]"
5
5
  allowed-tools:
6
6
  - Read
@@ -70,6 +70,20 @@ On confirm → `Skill("spec-add", "<category> <content>")`.
70
70
 
71
71
  **Gap-fix closure loop:**
72
72
  Gaps found → maestro-plan --gaps → maestro-execute → maestro-verify (re-run)
73
+
74
+ **Completion status:**
75
+ ```
76
+ --- COMPLETION STATUS ---
77
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
78
+ CONCERNS: {description if applicable}
79
+ NEXT: /quality-review
80
+ --- END STATUS ---
81
+ ```
82
+
83
+ Status mapping:
84
+ - **DONE** — All checks pass, no gaps → NEXT: /quality-review
85
+ - **DONE_WITH_CONCERNS** — Gaps found (must-have failures or anti-pattern blockers) → NEXT: /maestro-execute (after /maestro-plan --gaps)
86
+ - **NEEDS_RETRY** — Verification could not complete (missing artifacts, corrupt data)
73
87
  </execution>
74
88
 
75
89
  <error_codes>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: quality-auto-test
3
- description: Auto-generate and run tests from specs or coverage gaps
3
+ description: Use when test coverage needs automated expansion or existing tests need iterative convergence
4
4
  argument-hint: "<phase> [-y] [-c N] [--max-iter <N>] [--layer <L0-L3>] [--strategy <name>] [--dry-run] [--re-run]"
5
5
  allowed-tools:
6
6
  - spawn_agents_on_csv
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: quality-debug
3
- description: Debug with parallel hypotheses and root cause analysis
3
+ description: Use when bugs, test failures, or unexpected behavior need systematic root cause investigation
4
4
  argument-hint: "[issue description] [--from-uat <phase>] [--parallel]"
5
5
  allowed-tools:
6
6
  - Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: quality-refactor
3
- description: Reduce tech debt with reflection-driven iteration
3
+ description: Use when accumulated tech debt needs systematic identification and safe reduction
4
4
  argument-hint: "[<scope>]"
5
5
  allowed-tools:
6
6
  - Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: quality-retrospective
3
- description: Phase retrospective with insight routing to specs and knowhow
3
+ description: Use after completing a phase to extract lessons, patterns, and improvement opportunities
4
4
  argument-hint: "[phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [-y]"
5
5
  allowed-tools:
6
6
  - Read
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: quality-review
3
- description: Tiered code review with severity classification
3
+ description: Use after execution to evaluate code quality across correctness, security, performance, and architecture
4
4
  argument-hint: "<phase> [--level quick|standard|deep] [--dimensions security,architecture,...] [--skip-specs]"
5
5
  allowed-tools:
6
6
  - Read
@@ -87,6 +87,20 @@ Report format and next-step routing by verdict defined in workflow review.md Rep
87
87
  - PASS → `/quality-test {phase}`
88
88
  - WARN → `/quality-test {phase}` (proceed with caveats)
89
89
  - BLOCK → `/maestro-plan {phase} --gaps` (fix critical findings first)
90
+
91
+ **Completion status:**
92
+ ```
93
+ --- COMPLETION STATUS ---
94
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
95
+ CONCERNS: {description if applicable}
96
+ NEXT: /quality-refactor
97
+ --- END STATUS ---
98
+ ```
99
+
100
+ Status mapping:
101
+ - **DONE** — PASS verdict, no critical findings → NEXT: /quality-refactor
102
+ - **DONE_WITH_CONCERNS** — WARN verdict, issues found but non-blocking → NEXT: /maestro-verify
103
+ - **NEEDS_RETRY** — BLOCK verdict, critical findings require fix first
90
104
  </execution>
91
105
 
92
106
  <error_codes>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: quality-test
3
- description: Conversational UAT with auto-diagnosis and gap closure
3
+ description: Use when implementation needs user acceptance testing with interactive verification and gap closure
4
4
  argument-hint: "[phase] [--smoke] [--auto-fix]"
5
5
  allowed-tools:
6
6
  - Read