maestro-flow 0.5.3 → 0.5.31

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 (259) hide show
  1. package/.agents/skills/learn-follow/SKILL.md +114 -114
  2. package/.agents/skills/learn-investigate/SKILL.md +138 -139
  3. package/.agents/skills/learn-second-opinion/SKILL.md +105 -109
  4. package/.agents/skills/maestro/SKILL.md +2 -10
  5. package/.agents/skills/maestro-amend/SKILL.md +152 -152
  6. package/.agents/skills/maestro-analyze/SKILL.md +201 -252
  7. package/.agents/skills/maestro-blueprint/SKILL.md +175 -190
  8. package/.agents/skills/maestro-brainstorm/SKILL.md +196 -200
  9. package/.agents/skills/maestro-collab/SKILL.md +159 -159
  10. package/.agents/skills/maestro-companion/SKILL.md +517 -517
  11. package/.agents/skills/maestro-composer/SKILL.md +173 -164
  12. package/.agents/skills/maestro-execute/SKILL.md +169 -170
  13. package/.agents/skills/maestro-fork/SKILL.md +97 -96
  14. package/.agents/skills/maestro-grill/SKILL.md +161 -162
  15. package/.agents/skills/maestro-guard/SKILL.md +93 -92
  16. package/.agents/skills/maestro-impeccable/SKILL.md +296 -253
  17. package/.agents/skills/maestro-init/SKILL.md +117 -118
  18. package/.agents/skills/maestro-merge/SKILL.md +73 -66
  19. package/.agents/skills/maestro-milestone-audit/SKILL.md +4 -10
  20. package/.agents/skills/maestro-milestone-complete/SKILL.md +6 -7
  21. package/.agents/skills/maestro-milestone-release/SKILL.md +122 -131
  22. package/.agents/skills/maestro-next/SKILL.md +241 -245
  23. package/.agents/skills/maestro-overlay/SKILL.md +176 -166
  24. package/.agents/skills/maestro-plan/SKILL.md +211 -197
  25. package/.agents/skills/maestro-player/SKILL.md +167 -167
  26. package/.agents/skills/maestro-quick/SKILL.md +69 -63
  27. package/.agents/skills/maestro-ralph/SKILL.md +2 -36
  28. package/.agents/skills/maestro-ralph-beta/SKILL.md +861 -872
  29. package/.agents/skills/maestro-ralph-execute/SKILL.md +234 -234
  30. package/.agents/skills/maestro-roadmap/SKILL.md +159 -172
  31. package/.agents/skills/maestro-swarm-workflow/SKILL.md +229 -250
  32. package/.agents/skills/maestro-tools-execute/SKILL.md +108 -103
  33. package/.agents/skills/maestro-tools-register/SKILL.md +148 -143
  34. package/.agents/skills/maestro-ui-codify/SKILL.md +103 -86
  35. package/.agents/skills/maestro-universal-workflow/SKILL.md +534 -547
  36. package/.agents/skills/maestro-update/SKILL.md +109 -106
  37. package/.agents/skills/manage-codebase-rebuild/SKILL.md +73 -71
  38. package/.agents/skills/manage-harvest/SKILL.md +83 -81
  39. package/.agents/skills/manage-issue/SKILL.md +59 -60
  40. package/.agents/skills/manage-issue-discover/SKILL.md +70 -68
  41. package/.agents/skills/manage-kg-extractors/SKILL.md +130 -0
  42. package/.agents/skills/manage-knowhow/SKILL.md +70 -66
  43. package/.agents/skills/manage-knowhow-capture/SKILL.md +79 -69
  44. package/.agents/skills/manage-knowledge-audit/SKILL.md +91 -74
  45. package/.agents/skills/manage-status/SKILL.md +52 -42
  46. package/.agents/skills/manage-wiki/SKILL.md +69 -58
  47. package/.agents/skills/odyssey-debug/SKILL.md +445 -459
  48. package/.agents/skills/odyssey-improve/SKILL.md +477 -491
  49. package/.agents/skills/odyssey-planex/SKILL.md +576 -587
  50. package/.agents/skills/odyssey-review-test-fix/SKILL.md +400 -413
  51. package/.agents/skills/odyssey-ui/SKILL.md +431 -448
  52. package/.agents/skills/quality-auto-test/SKILL.md +140 -123
  53. package/.agents/skills/quality-debug/SKILL.md +145 -106
  54. package/.agents/skills/quality-refactor/SKILL.md +91 -53
  55. package/.agents/skills/quality-retrospective/SKILL.md +109 -63
  56. package/.agents/skills/quality-review/SKILL.md +141 -114
  57. package/.agents/skills/quality-sync/SKILL.md +74 -38
  58. package/.agents/skills/quality-test/SKILL.md +133 -103
  59. package/.agents/skills/security-audit/SKILL.md +217 -166
  60. package/.agents/skills/spec-add/SKILL.md +66 -59
  61. package/.agents/skills/spec-load/SKILL.md +68 -68
  62. package/.agents/skills/spec-remove/SKILL.md +42 -42
  63. package/.agents/skills/spec-setup/SKILL.md +38 -41
  64. package/.agy/skills/learn-follow/SKILL.md +114 -114
  65. package/.agy/skills/learn-investigate/SKILL.md +138 -139
  66. package/.agy/skills/learn-second-opinion/SKILL.md +105 -109
  67. package/.agy/skills/maestro/SKILL.md +2 -10
  68. package/.agy/skills/maestro-amend/SKILL.md +152 -152
  69. package/.agy/skills/maestro-analyze/SKILL.md +201 -252
  70. package/.agy/skills/maestro-blueprint/SKILL.md +175 -190
  71. package/.agy/skills/maestro-brainstorm/SKILL.md +196 -200
  72. package/.agy/skills/maestro-collab/SKILL.md +159 -159
  73. package/.agy/skills/maestro-companion/SKILL.md +517 -517
  74. package/.agy/skills/maestro-composer/SKILL.md +173 -164
  75. package/.agy/skills/maestro-execute/SKILL.md +169 -170
  76. package/.agy/skills/maestro-fork/SKILL.md +97 -96
  77. package/.agy/skills/maestro-grill/SKILL.md +161 -162
  78. package/.agy/skills/maestro-guard/SKILL.md +93 -92
  79. package/.agy/skills/maestro-impeccable/SKILL.md +296 -253
  80. package/.agy/skills/maestro-init/SKILL.md +117 -118
  81. package/.agy/skills/maestro-merge/SKILL.md +73 -66
  82. package/.agy/skills/maestro-milestone-audit/SKILL.md +4 -10
  83. package/.agy/skills/maestro-milestone-complete/SKILL.md +6 -7
  84. package/.agy/skills/maestro-milestone-release/SKILL.md +122 -131
  85. package/.agy/skills/maestro-next/SKILL.md +241 -245
  86. package/.agy/skills/maestro-overlay/SKILL.md +176 -166
  87. package/.agy/skills/maestro-plan/SKILL.md +211 -197
  88. package/.agy/skills/maestro-player/SKILL.md +167 -167
  89. package/.agy/skills/maestro-quick/SKILL.md +69 -63
  90. package/.agy/skills/maestro-ralph/SKILL.md +2 -36
  91. package/.agy/skills/maestro-ralph-beta/SKILL.md +861 -872
  92. package/.agy/skills/maestro-ralph-execute/SKILL.md +234 -234
  93. package/.agy/skills/maestro-roadmap/SKILL.md +159 -172
  94. package/.agy/skills/maestro-swarm-workflow/SKILL.md +229 -250
  95. package/.agy/skills/maestro-tools-execute/SKILL.md +108 -103
  96. package/.agy/skills/maestro-tools-register/SKILL.md +148 -143
  97. package/.agy/skills/maestro-ui-codify/SKILL.md +103 -86
  98. package/.agy/skills/maestro-universal-workflow/SKILL.md +534 -547
  99. package/.agy/skills/maestro-update/SKILL.md +109 -106
  100. package/.agy/skills/manage-codebase-rebuild/SKILL.md +73 -71
  101. package/.agy/skills/manage-harvest/SKILL.md +83 -81
  102. package/.agy/skills/manage-issue/SKILL.md +59 -60
  103. package/.agy/skills/manage-issue-discover/SKILL.md +70 -68
  104. package/.agy/skills/manage-kg-extractors/SKILL.md +130 -0
  105. package/.agy/skills/manage-knowhow/SKILL.md +70 -66
  106. package/.agy/skills/manage-knowhow-capture/SKILL.md +79 -69
  107. package/.agy/skills/manage-knowledge-audit/SKILL.md +91 -74
  108. package/.agy/skills/manage-status/SKILL.md +52 -42
  109. package/.agy/skills/manage-wiki/SKILL.md +69 -58
  110. package/.agy/skills/odyssey-debug/SKILL.md +445 -459
  111. package/.agy/skills/odyssey-improve/SKILL.md +477 -491
  112. package/.agy/skills/odyssey-planex/SKILL.md +576 -587
  113. package/.agy/skills/odyssey-review-test-fix/SKILL.md +400 -413
  114. package/.agy/skills/odyssey-ui/SKILL.md +431 -448
  115. package/.agy/skills/quality-auto-test/SKILL.md +140 -123
  116. package/.agy/skills/quality-debug/SKILL.md +145 -106
  117. package/.agy/skills/quality-refactor/SKILL.md +91 -53
  118. package/.agy/skills/quality-retrospective/SKILL.md +109 -63
  119. package/.agy/skills/quality-review/SKILL.md +141 -114
  120. package/.agy/skills/quality-sync/SKILL.md +74 -38
  121. package/.agy/skills/quality-test/SKILL.md +133 -103
  122. package/.agy/skills/security-audit/SKILL.md +217 -166
  123. package/.agy/skills/spec-add/SKILL.md +66 -59
  124. package/.agy/skills/spec-load/SKILL.md +68 -68
  125. package/.agy/skills/spec-remove/SKILL.md +42 -42
  126. package/.agy/skills/spec-setup/SKILL.md +38 -41
  127. package/.claude/commands/learn-follow.md +127 -127
  128. package/.claude/commands/learn-investigate.md +151 -152
  129. package/.claude/commands/learn-second-opinion.md +118 -122
  130. package/.claude/commands/maestro-amend.md +164 -164
  131. package/.claude/commands/maestro-analyze.md +215 -266
  132. package/.claude/commands/maestro-blueprint.md +189 -204
  133. package/.claude/commands/maestro-brainstorm.md +209 -213
  134. package/.claude/commands/maestro-collab.md +172 -172
  135. package/.claude/commands/maestro-companion.md +531 -531
  136. package/.claude/commands/maestro-composer.md +188 -179
  137. package/.claude/commands/maestro-execute.md +183 -184
  138. package/.claude/commands/maestro-fork.md +111 -110
  139. package/.claude/commands/maestro-grill.md +175 -176
  140. package/.claude/commands/maestro-guard.md +103 -102
  141. package/.claude/commands/maestro-impeccable.md +311 -268
  142. package/.claude/commands/maestro-init.md +130 -131
  143. package/.claude/commands/maestro-merge.md +87 -80
  144. package/.claude/commands/maestro-milestone-audit.md +4 -10
  145. package/.claude/commands/maestro-milestone-complete.md +6 -7
  146. package/.claude/commands/maestro-milestone-release.md +136 -145
  147. package/.claude/commands/maestro-next.md +253 -257
  148. package/.claude/commands/maestro-overlay.md +188 -178
  149. package/.claude/commands/maestro-plan.md +225 -211
  150. package/.claude/commands/maestro-player.md +182 -182
  151. package/.claude/commands/maestro-quick.md +83 -77
  152. package/.claude/commands/maestro-ralph-beta.md +875 -886
  153. package/.claude/commands/maestro-ralph-execute.md +247 -247
  154. package/.claude/commands/maestro-ralph.md +2 -36
  155. package/.claude/commands/maestro-roadmap.md +173 -186
  156. package/.claude/commands/maestro-swarm-workflow.md +243 -264
  157. package/.claude/commands/maestro-tools-execute.md +122 -117
  158. package/.claude/commands/maestro-tools-register.md +162 -157
  159. package/.claude/commands/maestro-ui-codify.md +117 -100
  160. package/.claude/commands/maestro-universal-workflow.md +548 -561
  161. package/.claude/commands/maestro-update.md +122 -119
  162. package/.claude/commands/maestro.md +2 -10
  163. package/.claude/commands/manage-codebase-rebuild.md +87 -85
  164. package/.claude/commands/manage-harvest.md +97 -95
  165. package/.claude/commands/manage-issue-discover.md +83 -81
  166. package/.claude/commands/manage-issue.md +72 -73
  167. package/.claude/commands/manage-kg-extractors.md +128 -0
  168. package/.claude/commands/manage-knowhow-capture.md +92 -82
  169. package/.claude/commands/manage-knowhow.md +83 -79
  170. package/.claude/commands/manage-knowledge-audit.md +105 -88
  171. package/.claude/commands/manage-status.md +62 -52
  172. package/.claude/commands/manage-wiki.md +82 -71
  173. package/.claude/commands/odyssey-debug.md +459 -473
  174. package/.claude/commands/odyssey-improve.md +491 -505
  175. package/.claude/commands/odyssey-planex.md +590 -601
  176. package/.claude/commands/odyssey-review-test-fix.md +414 -427
  177. package/.claude/commands/odyssey-ui.md +445 -462
  178. package/.claude/commands/quality-auto-test.md +153 -136
  179. package/.claude/commands/quality-debug.md +159 -120
  180. package/.claude/commands/quality-refactor.md +105 -67
  181. package/.claude/commands/quality-retrospective.md +123 -77
  182. package/.claude/commands/quality-review.md +155 -128
  183. package/.claude/commands/quality-sync.md +88 -52
  184. package/.claude/commands/quality-test.md +147 -117
  185. package/.claude/commands/security-audit.md +230 -179
  186. package/.claude/commands/spec-add.md +77 -70
  187. package/.claude/commands/spec-load.md +78 -78
  188. package/.claude/commands/spec-remove.md +55 -55
  189. package/.claude/commands/spec-setup.md +49 -52
  190. package/dist/src/cli.js +1 -1
  191. package/dist/src/cli.js.map +1 -1
  192. package/dist/src/commands/kg.d.ts.map +1 -1
  193. package/dist/src/commands/kg.js +11 -5
  194. package/dist/src/commands/kg.js.map +1 -1
  195. package/dist/src/graph/kg/extraction/code/code-extractor.d.ts +2 -0
  196. package/dist/src/graph/kg/extraction/code/code-extractor.d.ts.map +1 -1
  197. package/dist/src/graph/kg/extraction/code/code-extractor.js +32 -3
  198. package/dist/src/graph/kg/extraction/code/code-extractor.js.map +1 -1
  199. package/dist/src/graph/kg/extraction/code/plugin-engine.d.ts +35 -0
  200. package/dist/src/graph/kg/extraction/code/plugin-engine.d.ts.map +1 -0
  201. package/dist/src/graph/kg/extraction/code/plugin-engine.js +573 -0
  202. package/dist/src/graph/kg/extraction/code/plugin-engine.js.map +1 -0
  203. package/dist/src/graph/kg/extraction/code/plugin-types.d.ts +95 -0
  204. package/dist/src/graph/kg/extraction/code/plugin-types.d.ts.map +1 -0
  205. package/dist/src/graph/kg/extraction/code/plugin-types.js +5 -0
  206. package/dist/src/graph/kg/extraction/code/plugin-types.js.map +1 -0
  207. package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -1
  208. package/dist/src/graph/kg/extraction/orchestrator.js +17 -5
  209. package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
  210. package/dist/src/graph/kg/schema.sql +16 -11
  211. package/dist/src/graph/kg/surface/cli.d.ts.map +1 -1
  212. package/dist/src/graph/kg/surface/cli.js +153 -56
  213. package/dist/src/graph/kg/surface/cli.js.map +1 -1
  214. package/dist/src/hooks/workspace.d.ts +4 -2
  215. package/dist/src/hooks/workspace.d.ts.map +1 -1
  216. package/dist/src/hooks/workspace.js +6 -2
  217. package/dist/src/hooks/workspace.js.map +1 -1
  218. package/package.json +91 -91
  219. package/workflows/analyze.md +25 -49
  220. package/workflows/auto-test.md +699 -699
  221. package/workflows/blueprint.md +403 -431
  222. package/workflows/brainstorm.md +54 -195
  223. package/workflows/business-test.md +570 -570
  224. package/workflows/claude-instructions.md +23 -51
  225. package/workflows/codex-instructions.md +27 -77
  226. package/workflows/coding-philosophy.md +69 -69
  227. package/workflows/command-authoring.md +823 -823
  228. package/workflows/debug.md +43 -98
  229. package/workflows/delegate-usage.md +39 -241
  230. package/workflows/execute.md +4 -53
  231. package/workflows/grill.md +12 -56
  232. package/workflows/harvest.md +22 -68
  233. package/workflows/init.md +148 -148
  234. package/workflows/instruction-authoring-guide.md +97 -0
  235. package/workflows/issue-execute.md +110 -110
  236. package/workflows/issue-gaps-analyze.codex.md +260 -260
  237. package/workflows/issue-gaps-analyze.md +216 -216
  238. package/workflows/issue-plan.md +110 -110
  239. package/workflows/issue.md +338 -346
  240. package/workflows/knowhow.md +0 -32
  241. package/workflows/learn.md +277 -277
  242. package/workflows/maestro-chain-execute.md +20 -20
  243. package/workflows/refactor.md +22 -44
  244. package/workflows/retrospective.md +16 -65
  245. package/workflows/review.md +446 -486
  246. package/workflows/roadmap.md +35 -132
  247. package/workflows/skill-authoring.md +265 -265
  248. package/workflows/spec-generate.md +470 -470
  249. package/workflows/specs-remove.md +104 -104
  250. package/workflows/sync.md +11 -41
  251. package/workflows/test-gen.md +226 -226
  252. package/workflows/test.md +385 -475
  253. package/workflows/ui-design.md +391 -391
  254. package/workflows/ui-style.md +199 -199
  255. package/workflows/wiki-connect.md +151 -151
  256. package/workflows/wiki-digest.md +178 -178
  257. package/workflows/wiki-manage.md +109 -109
  258. package/workflows/cli-tools-usage.md +0 -252
  259. package/workflows/delegate-protocol.codex.md +0 -65
@@ -14,173 +14,172 @@ allowed-tools:
14
14
  - view_file
15
15
  - write_to_file
16
16
  ---
17
- <purpose>
18
- Execute all tasks in a plan using wave-based parallel execution with dependency-aware ordering. Each plan is executed independently (plans串行, plan内wave并行). Task summaries are written to the plan's scratch directory under `.summaries/`. Registers EXC artifact in state.json.
19
-
20
- Invoked after /maestro-plan produces a confirmed plan. When called without args on a milestone, finds all pending plans and executes them sequentially.
21
-
22
- Pipeline position: upstream from maestro-plan (consumes confirmed plan). Verification is built-in (E2.7).
23
- </purpose>
24
-
25
- <required_reading>
26
- @~/.maestro/workflows/execute.md
27
- </required_reading>
28
-
29
- <deferred_reading>
30
- - [task.json](~/.maestro/templates/task.json) — read when reading task definitions
31
- - [state.json](~/.maestro/templates/state.json) — read when registering artifact
32
- </deferred_reading>
33
-
34
- <context>
35
- $ARGUMENTS — phase number, or no args for milestone-wide execution, with optional flags.
36
-
37
- ### Flags
38
-
39
- | Flag | Effect | Default |
40
- |------|--------|---------|
41
- | `--auto-commit` | Auto-commit after each completed task | false |
42
- | `--method agent\|cli\|auto` | Execution method: Agent tool, CLI delegate, or auto-select | `auto` |
43
- | `--executor <tool>` | Explicit executor tool for CLI delegate mode | First enabled in config |
44
- | `--dir <path>` | Execute a specific plan directory instead of auto-discovery | — |
45
- | `-y` / `--yes` | Auto mode — skip interactive questions | false |
46
-
47
- ### Scope routing
48
-
49
- | Input | Scope | Resolution |
50
- |-------|-------|------------|
51
- | numeric arg | phase | Resolve plan from roadmap phase |
52
- | `--dir <path>` | explicit | Use specified plan directory |
53
- | no args + milestone | milestone | Find all pending plans, execute sequentially |
54
- | no args + no milestone | error E001 | No plan found |
55
-
56
- Full resolution logic, output directory format, artifact registration schema, and incremental knowhow extraction are defined in workflow `execute.md`.
57
-
58
- ### Pre-load context (before task execution)
59
-
60
- 1. **Codebase docs**: If `.workflow/codebase/doc-index.json` exists, read `ARCHITECTURE.md` for module boundaries. Pass as shared context to executor agents.
61
- 2. **Wiki knowledge**: Run `maestro search "<phase keywords>" --json 2>/dev/null`. If results found, extract top 5 entries as prior knowledge context for agents.
62
- 3. **Coding specs + tools**: Run `maestro spec load --category coding` to load coding conventions AND discoverable knowhow tools (tool: true entries). Pass as specs context to all executor agents.
63
- 4. **UI specs (conditional)**: If any task involves frontend/UI work (task scope/description contains keywords like component, page, style, layout, CSS, HTML, frontend; or focus_paths in `src/components/`, `src/pages/`, `src/styles/`, `src/ui/`), also run `maestro spec load --category ui` and include in agent context.
64
- 5. All are optional proceed without if unavailable (log warning).
65
-
66
- ### Role Knowledge
67
- `maestro search --category coding` → select relevant → `maestro wiki load`
68
- </context>
69
-
70
- <execution>
71
- ### Pre-flight: team conflict check
72
-
73
- Before any task execution, run:
74
- ```
75
- run_command("maestro collab preflight --phase <phase-number>")
76
- ```
77
- If exit code is 1, present warnings and ask whether to proceed.
78
-
79
- Follow '~/.maestro/workflows/execute.md' completely.
80
-
81
- ### Phase Gates (MANDATORY, BLOCKING)
82
-
83
- **GATE 1: Plan Load Task Execution**
84
- - REQUIRED: plan.json found and parsed with valid task definitions.
85
- - REQUIRED: `.task/TASK-*.json` files exist for all tasks in plan.
86
- - BLOCKED if no pending tasks: error E004.
87
-
88
- **GATE 2: Per-Task Execution Summary**
89
- - REQUIRED: Each completed task has `.summaries/TASK-{NNN}-summary.md` written with concrete evidence (files changed, tests run, verification results).
90
- - REQUIRED: `.task/TASK-{NNN}.json` status updated to completed|blocked.
91
- - Do NOT silently skip failed tasks — mark as blocked with reason.
92
-
93
- **GATE 3: All Tasks Completion**
94
- - REQUIRED: All waves executed in dependency order.
95
- - REQUIRED: EXC artifact registered in state.json.
96
-
97
- ### Evidence Requirement
98
-
99
- Task summaries MUST include:
100
- - Files actually modified (not just planned targets)
101
- - Convergence criteria verification results (pass/fail with evidence)
102
- - Any deviations from the plan with rationale
103
-
104
- ### Post-task Knowledge Inquiry
105
-
106
- After each task completion, check triggers:
107
-
108
- | Condition | Ask | Route |
109
- |-----------|-----|-------|
110
- | Summary mentions approach change / plan deviation | "Record as arch constraint?" | spec-add arch |
111
- | retry_count >= 2 | "Document fix pattern?" | spec-add debug |
112
- | Summary contains design rationale ("chose X because") | "Record as knowhow?" | spec-add learning |
113
-
114
- On confirm `Skill("spec-add", "<category> <content> --description \"<summary>\"")`.
115
- Include `--description` with a one-line summary for search result display.
116
-
117
- ### Issue Status Sync
118
-
119
- On each task completion, if `task.issue_id` exists, sync status back to the issue in `.workflow/issues/issues.jsonl`:
120
-
121
- ```
122
- For each completed/failed TASK with issue_id:
123
- Read issue from issues.jsonl by issue_id
124
- Collect all task_refs[] statuses for that issue:
125
- all task_refs completed → issue.status = "resolved"
126
- any task_ref failed → issue.status = "in_progress"
127
- Append history entry: { action: "executed", at: <ISO>, by: "maestro-execute", summary: "TASK-{NNN} {status}" }
128
- Write updated issue back to issues.jsonl
129
- ```
130
-
131
- </execution>
132
-
133
- <completion>
134
- ### Standalone report
135
-
136
- ```
137
- === EXECUTION COMPLETE ===
138
- Plans executed: {plans_count}
139
- Completed: {completed_count}/{total_count} tasks
140
- Failed: {failed_count} tasks
141
-
142
- Summaries: {plan_dir}/.summaries/
143
- Tasks: {plan_dir}/.task/
144
- ```
145
-
146
- ### Ralph-invoked completion
147
-
148
- End the step by calling the CLI (no text block output):
149
- ```
150
- maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
151
- ```
152
-
153
- Status verdicts:
154
- - **DONE** — Normal completion
155
- - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
156
- - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
157
- - **BLOCKED** — External hard blocker; pass `--reason`
158
-
159
- ### Next-step routing
160
-
161
- | Condition | Suggestion |
162
- |-----------|-----------|
163
- | All tasks completed successfully | `/quality-review` |
164
- | Failed tasks exist | `/quality-debug` |
165
- | View project dashboard | `/manage-status` |
166
- </completion>
167
-
168
- <error_codes>
169
- | Code | Severity | Condition | Recovery |
170
- |------|----------|-----------|----------|
171
- | E001 | error | No pending plans found | Verify plans exist, run maestro-plan first |
172
- | E002 | error | Plan directory not found | Check --dir path |
173
- | E003 | error | plan.json not found in directory | Verify plan.json exists, run maestro-plan first |
174
- | E004 | error | No pending tasks, all tasks already completed | Check task statuses, reset if needed |
175
- | W001 | warning | Executor completed with partial failures | Check task dependencies, retry failed wave |
176
- </error_codes>
177
-
178
- <success_criteria>
179
- - [ ] All pending plans identified and executed sequentially
180
- - [ ] Within each plan: waves executed in parallel, waves串行
181
- - [ ] `.summaries/TASK-{NNN}-summary.md` written for each completed task
182
- - [ ] `.task/TASK-{NNN}.json` statuses updated (completed|blocked)
183
- - [ ] EXC artifact registered in state.json for each plan executed
184
- - [ ] Incremental knowhow extracted to specs/learnings.md
185
- - [ ] state.json updated with execution progress
186
- </success_criteria>
17
+ <purpose>
18
+ Execute confirmed plan tasks via wave-based parallel dispatch.
19
+ Consumes plan from maestro-plan; registers EXC artifact in state.json.
20
+ </purpose>
21
+
22
+ <required_reading>
23
+ @~/.maestro/workflows/execute.md
24
+ </required_reading>
25
+
26
+ <deferred_reading>
27
+ - [task.json](~/.maestro/templates/task.json) — read when reading task definitions
28
+ - [state.json](~/.maestro/templates/state.json) — read when registering artifact
29
+ </deferred_reading>
30
+
31
+ <context>
32
+ $ARGUMENTS — phase number, or no args for milestone-wide execution, with optional flags.
33
+
34
+ ### Flags
35
+
36
+ | Flag | Effect | Default |
37
+ |------|--------|---------|
38
+ | `--auto-commit` | Auto-commit after each completed task | false |
39
+ | `--method agent\|cli\|auto` | Execution method: Agent tool, CLI delegate, or auto-select | `auto` |
40
+ | `--executor <tool>` | Explicit executor tool for CLI delegate mode | First enabled in config |
41
+ | `--dir <path>` | Execute a specific plan directory instead of auto-discovery | |
42
+ | `-y` / `--yes` | Auto mode skip interactive questions | false |
43
+
44
+ ### Scope routing
45
+
46
+ | Input | Scope | Resolution |
47
+ |-------|-------|------------|
48
+ | numeric arg | phase | Resolve plan from roadmap phase |
49
+ | `--dir <path>` | explicit | Use specified plan directory |
50
+ | no args + milestone | milestone | Find all pending plans, execute sequentially |
51
+ | no args + no milestone | error E001 | No plan found |
52
+
53
+ Full resolution logic, output directory format, artifact registration schema, and incremental knowhow extraction are defined in workflow `execute.md`.
54
+
55
+ ### Pre-load context (before task execution)
56
+
57
+ 1. **Codebase docs**: If `.workflow/codebase/doc-index.json` exists, read `ARCHITECTURE.md` for module boundaries. Pass as shared context to executor agents.
58
+ 2. **Wiki knowledge**: Run `maestro search "<phase keywords>" --json 2>/dev/null`. If results found, extract top 5 entries as prior knowledge context for agents.
59
+ 3. **Coding specs + tools**: Run `maestro spec load --category coding` to load coding conventions AND discoverable knowhow tools (tool: true entries). Pass as specs context to all executor agents.
60
+ 4. **UI specs (conditional)**: If any task involves frontend/UI work (task scope/description contains keywords like component, page, style, layout, CSS, HTML, frontend; or focus_paths in `src/components/`, `src/pages/`, `src/styles/`, `src/ui/`), also run `maestro spec load --category ui` and include in agent context.
61
+ 5. All are optional proceed without if unavailable (log warning).
62
+
63
+ ### Role Knowledge
64
+ `maestro search --category coding` select relevant `maestro wiki load`
65
+ </context>
66
+
67
+ <execution>
68
+ ### Pre-flight: team conflict check
69
+
70
+ Before any task execution, run:
71
+ ```
72
+ run_command("maestro collab preflight --phase <phase-number>")
73
+ ```
74
+ If exit code is 1, present warnings and ask whether to proceed.
75
+
76
+ Follow '~/.maestro/workflows/execute.md' completely.
77
+
78
+ ### Phase Gates (MANDATORY, BLOCKING)
79
+
80
+ **GATE 1: Plan Load → Task Execution**
81
+ - REQUIRED: plan.json found and parsed with valid task definitions.
82
+ - REQUIRED: `.task/TASK-*.json` files exist for all tasks in plan.
83
+ - BLOCKED if no pending tasks: error E004.
84
+
85
+ **GATE 2: Per-Task Execution Summary**
86
+ - REQUIRED: Each completed task has `.summaries/TASK-{NNN}-summary.md` written with concrete evidence (files changed, tests run, verification results).
87
+ - REQUIRED: `.task/TASK-{NNN}.json` status updated to completed|blocked.
88
+ - BLOCKED if missing: summary file absent or task status not updated — halt wave progression until evidence is recorded.
89
+ - Do NOT silently skip failed tasks mark as blocked with reason.
90
+
91
+ **GATE 3: All Tasks Completion**
92
+ - REQUIRED: All waves executed in dependency order.
93
+ - REQUIRED: EXC artifact registered in state.json.
94
+ - BLOCKED if missing: waves incomplete or EXC artifact not registered — do not report execution complete.
95
+
96
+ ### Evidence Requirement
97
+
98
+ Task summaries MUST include:
99
+ - Files actually modified (not just planned targets)
100
+ - Convergence criteria verification results (pass/fail with evidence)
101
+ - Any deviations from the plan with rationale
102
+
103
+ ### Post-task Knowledge Inquiry
104
+
105
+ After each task completion, check triggers:
106
+
107
+ | Condition | Ask | Route |
108
+ |-----------|-----|-------|
109
+ | Summary mentions approach change / plan deviation | "Record as arch constraint?" | spec-add arch |
110
+ | retry_count >= 2 | "Document fix pattern?" | spec-add debug |
111
+ | Summary contains design rationale ("chose X because") | "Record as knowhow?" | spec-add learning |
112
+
113
+ On confirm → `Skill("spec-add", "<category> <content> --description \"<summary>\"")`.
114
+ Include `--description` with a one-line summary for search result display.
115
+
116
+ ### Issue Status Sync
117
+
118
+ On each task completion, if `task.issue_id` exists, sync status back to the issue in `.workflow/issues/issues.jsonl`:
119
+
120
+ ```
121
+ For each completed/failed TASK with issue_id:
122
+ Read issue from issues.jsonl by issue_id
123
+ Collect all task_refs[] statuses for that issue:
124
+ all task_refs completed issue.status = "resolved"
125
+ any task_ref failed → issue.status = "in_progress"
126
+ Append history entry: { action: "executed", at: <ISO>, by: "maestro-execute", summary: "TASK-{NNN} {status}" }
127
+ Write updated issue back to issues.jsonl
128
+ ```
129
+
130
+ </execution>
131
+
132
+ <completion>
133
+ ### Standalone report
134
+
135
+ ```
136
+ === EXECUTION COMPLETE ===
137
+ Plans executed: {plans_count}
138
+ Completed: {completed_count}/{total_count} tasks
139
+ Failed: {failed_count} tasks
140
+
141
+ Summaries: {plan_dir}/.summaries/
142
+ Tasks: {plan_dir}/.task/
143
+ ```
144
+
145
+ ### Ralph-invoked completion
146
+
147
+ End the step by calling the CLI (no text block output):
148
+ ```
149
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
150
+ ```
151
+
152
+ Status verdicts:
153
+ - **DONE** — Normal completion
154
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
155
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
156
+ - **BLOCKED** — External hard blocker; pass `--reason`
157
+
158
+ ### Next-step routing
159
+
160
+ | Condition | Suggestion |
161
+ |-----------|-----------|
162
+ | All tasks completed successfully | `/quality-review` |
163
+ | Failed tasks exist | `/quality-debug` |
164
+ | View project dashboard | `/manage-status` |
165
+ </completion>
166
+
167
+ <error_codes>
168
+ | Code | Severity | Condition | Recovery |
169
+ |------|----------|-----------|----------|
170
+ | E001 | error | No pending plans found | Verify plans exist, run maestro-plan first |
171
+ | E002 | error | Plan directory not found | Check --dir path |
172
+ | E003 | error | plan.json not found in directory | Verify plan.json exists, run maestro-plan first |
173
+ | E004 | error | No pending tasks, all tasks already completed | Check task statuses, reset if needed |
174
+ | W001 | warning | Executor completed with partial failures | Check task dependencies, retry failed wave |
175
+ </error_codes>
176
+
177
+ <success_criteria>
178
+ - [ ] All pending plans identified and executed sequentially
179
+ - [ ] Within each plan: waves executed in parallel, waves串行
180
+ - [ ] `.summaries/TASK-{NNN}-summary.md` written for each completed task
181
+ - [ ] `.task/TASK-{NNN}.json` statuses updated (completed|blocked)
182
+ - [ ] EXC artifact registered in state.json for each plan executed
183
+ - [ ] Incremental knowhow extracted to specs/learnings.md
184
+ - [ ] state.json updated with execution progress
185
+ </success_criteria>
@@ -14,99 +14,100 @@ allowed-tools:
14
14
  - view_file
15
15
  - write_to_file
16
16
  ---
17
- <purpose>
18
- Create a git worktree for an entire milestone, enabling inter-milestone parallel development. The worktree scope is milestone-level — all scratch artifacts for that milestone are owned by the worktree.
19
-
20
- Since `.workflow/` is gitignored, this command explicitly copies project context and existing milestone scratch artifacts into the worktree. Per-phase parallelism within a milestone is NOT supported.
21
-
22
- Also supports `--sync` mode to pull latest main branch changes and shared artifacts into an active worktree (prevents source and artifact drift for long-lived worktrees).
23
-
24
- Produces `.workflow/worktrees.json` registry in the main worktree and `.workflow/worktree-scope.json` marker in the worktree, and writes a scoped `state.json` inside the worktree containing only the forked milestone's artifacts.
25
- </purpose>
26
-
27
- <required_reading>
28
- @~/.maestro/workflows/fork.md
29
- </required_reading>
30
-
31
- <deferred_reading>
32
- - [worktrees.json](~/.maestro/templates/worktrees.json) read when updating registry
33
- - [worktree-scope.json](~/.maestro/templates/worktree-scope.json) — read when writing scope marker
34
- </deferred_reading>
35
-
36
- <context>
37
- $ARGUMENTS -- milestone number and optional flags.
38
-
39
- Modes (`Fork` / `Sync`), flags (`-m`, `--base`, `--sync`), milestone resolution, worktree layout, and artifact scoping are defined in workflow `fork.md`.
40
- </context>
41
-
42
- <execution>
43
- Follow '~/.maestro/workflows/fork.md' completely.
44
-
45
- Fork and sync algorithm steps are defined in workflow `fork.md`.
46
-
47
- ### Phase Gates (MANDATORY, BLOCKING)
48
-
49
- **Fork mode:**
50
-
51
- **GATE 1: Validation → Worktree Creation**
52
- - REQUIRED: Milestone resolved from state.json.milestones[].
53
- - REQUIRED: No existing active worktree for this milestone (E008).
54
- - REQUIRED: Not running inside a worktree (E003).
55
-
56
- **GATE 2: Worktree Creation → Artifact Copy**
57
- - REQUIRED: Git worktree created with branch (`milestone/{slug}`).
58
- - REQUIRED: Shared `.workflow/` files copied (project.md, roadmap.md, config.json, specs/).
59
-
60
- **GATE 3: Artifact Copy Completion**
61
- - REQUIRED: `worktree-scope.json` written with milestone scope.
62
- - REQUIRED: Scoped `state.json` written (only this milestone's artifacts).
63
- - REQUIRED: `worktrees.json` registry updated in main worktree.
64
-
65
- **Sync mode:**
66
-
67
- **GATE: Sync Completion**
68
- - REQUIRED: Git merge main into worktree branch completed.
69
- - REQUIRED: Shared artifacts re-copied.
70
-
71
- **Next-step routing on completion:**
72
-
73
- Fork mode:
74
- - Enter worktree → `cd {wt.path} && /maestro-analyze`
75
- - Automated `maestro delegate "run full lifecycle for milestone" --cd {wt.path} --mode write`
76
- - Status → view_file(AbsolutePath="<agy-skills-dir>/manage-status/SKILL.md") + execute inline
77
-
78
- Sync mode:
79
- - Sync complete resume work in worktree
80
- - Conflicts found resolve manually, then retry
81
- </execution>
82
-
83
- <error_codes>
84
- | Code | Severity | Condition | Recovery |
85
- |------|----------|-----------|----------|
86
- | E001 | error | Project not initialized | Run maestro-init first |
87
- | E002 | error | No roadmap found | Run maestro-roadmap first |
88
- | E003 | error | Running inside a worktree | Run from main worktree |
89
- | E004 | error | No milestone number provided | Provide `-m <N>` |
90
- | E005 | error | No milestones defined in state.json | Run maestro-roadmap first |
91
- | E006 | error | Milestone number out of range | Check available milestones |
92
- | E007 | error | No active worktree for milestone (--sync) | Check worktrees.json |
93
- | E008 | error | Milestone already has active worktree | Merge or cleanup first |
94
- </error_codes>
95
-
96
- <success_criteria>
97
- Fork mode:
98
- - [ ] Milestone resolved from state.json.milestones[]
99
- - [ ] Git worktree created with branch (`milestone/{slug}`)
100
- - [ ] Shared `.workflow/` files copied (project.md, roadmap.md, config.json, specs/)
101
- - [ ] Milestone scratch artifacts copied (filtered from artifact registry)
102
- - [ ] `worktree-scope.json` written with milestone scope
103
- - [ ] Scoped `state.json` written (only this milestone's artifacts)
104
- - [ ] `worktrees.json` registry updated in main worktree
105
- - [ ] Milestone marked as `"forked"` in main `state.json.milestones[]`
106
- - [ ] Summary displayed with next-step commands
107
-
108
- Sync mode:
109
- - [ ] Git merge main into worktree branch
110
- - [ ] Shared artifacts re-copied (project.md, roadmap.md, config.json, specs/)
111
- - [ ] Conflicts reported if any
112
- </success_criteria>
17
+ <purpose>
18
+ Create or sync a milestone-level git worktree for parallel development.
19
+ Supports `--sync` mode to pull latest main changes into an active worktree.
20
+ </purpose>
21
+
22
+ <required_reading>
23
+ @~/.maestro/workflows/fork.md
24
+ </required_reading>
25
+
26
+ <deferred_reading>
27
+ - [worktrees.json](~/.maestro/templates/worktrees.json) — read when updating registry
28
+ - [worktree-scope.json](~/.maestro/templates/worktree-scope.json) — read when writing scope marker
29
+ </deferred_reading>
30
+
31
+ <context>
32
+ $ARGUMENTS -- milestone number and optional flags.
33
+
34
+ Modes (`Fork` / `Sync`), flags (`-m`, `--base`, `--sync`), milestone resolution, worktree layout, and artifact scoping are defined in workflow `fork.md`.
35
+ </context>
36
+
37
+ <execution>
38
+ Follow '~/.maestro/workflows/fork.md' completely.
39
+
40
+ Fork and sync algorithm steps are defined in workflow `fork.md`.
41
+
42
+ ### Phase Gates (MANDATORY, BLOCKING)
43
+
44
+ **Fork mode:**
45
+
46
+ **GATE 1: Validation → Worktree Creation**
47
+ - REQUIRED: Milestone resolved from state.json.milestones[].
48
+ - REQUIRED: No existing active worktree for this milestone (E008).
49
+ - REQUIRED: Not running inside a worktree (E003).
50
+ - BLOCKED if: milestone not found (E006), already forked (E008), or running inside worktree (E003).
51
+
52
+ **GATE 2: Worktree Creation Artifact Copy**
53
+ - REQUIRED: Git worktree created with branch (`milestone/{slug}`).
54
+ - REQUIRED: Shared `.workflow/` files copied (project.md, roadmap.md, config.json, specs/).
55
+ - BLOCKED if missing: worktree creation failed or shared files not copied — do not proceed to artifact scoping.
56
+
57
+ **GATE 3: Artifact Copy Completion**
58
+ - REQUIRED: `worktree-scope.json` written with milestone scope.
59
+ - REQUIRED: Scoped `state.json` written (only this milestone's artifacts).
60
+ - REQUIRED: `worktrees.json` registry updated in main worktree.
61
+ - BLOCKED if missing: scope marker, scoped state, or registry update absent — worktree is unusable without these.
62
+
63
+ **Sync mode:**
64
+
65
+ **GATE: Sync → Completion**
66
+ - REQUIRED: Git merge main into worktree branch completed.
67
+ - REQUIRED: Shared artifacts re-copied.
68
+ - BLOCKED if: merge has unresolved conflicts or shared artifacts failed to copy.
69
+
70
+ </execution>
71
+
72
+ <completion>
73
+ ### Next-step routing
74
+
75
+ | Condition | Suggestion |
76
+ |-----------|-----------|
77
+ | Fork complete | `cd {wt.path} && /maestro-analyze` |
78
+ | Fork + automated | `maestro delegate "run full lifecycle for milestone" --cd {wt.path} --mode write` |
79
+ | Fork + status check | view_file(AbsolutePath="<agy-skills-dir>/manage-status/SKILL.md") + execute inline |
80
+ | Sync complete | Resume work in worktree |
81
+ | Sync conflicts found | Resolve manually, then retry |
82
+ </completion>
83
+
84
+ <error_codes>
85
+ | Code | Severity | Condition | Recovery |
86
+ |------|----------|-----------|----------|
87
+ | E001 | error | Project not initialized | Run maestro-init first |
88
+ | E002 | error | No roadmap found | Run maestro-roadmap first |
89
+ | E003 | error | Running inside a worktree | Run from main worktree |
90
+ | E004 | error | No milestone number provided | Provide `-m <N>` |
91
+ | E005 | error | No milestones defined in state.json | Run maestro-roadmap first |
92
+ | E006 | error | Milestone number out of range | Check available milestones |
93
+ | E007 | error | No active worktree for milestone (--sync) | Check worktrees.json |
94
+ | E008 | error | Milestone already has active worktree | Merge or cleanup first |
95
+ </error_codes>
96
+
97
+ <success_criteria>
98
+ Fork mode:
99
+ - [ ] Milestone resolved from state.json.milestones[]
100
+ - [ ] Git worktree created with branch (`milestone/{slug}`)
101
+ - [ ] Shared `.workflow/` files copied (project.md, roadmap.md, config.json, specs/)
102
+ - [ ] Milestone scratch artifacts copied (filtered from artifact registry)
103
+ - [ ] `worktree-scope.json` written with milestone scope
104
+ - [ ] Scoped `state.json` written (only this milestone's artifacts)
105
+ - [ ] `worktrees.json` registry updated in main worktree
106
+ - [ ] Milestone marked as `"forked"` in main `state.json.milestones[]`
107
+ - [ ] Summary displayed with next-step commands
108
+
109
+ Sync mode:
110
+ - [ ] Git merge main into worktree branch
111
+ - [ ] Shared artifacts re-copied (project.md, roadmap.md, config.json, specs/)
112
+ - [ ] Conflicts reported if any
113
+ </success_criteria>