maestro-flow 0.3.9 → 0.3.11

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 (281) hide show
  1. package/.claude/agents/workflow-collab-planner.md +1 -1
  2. package/.claude/agents/workflow-executor.md +1 -1
  3. package/.claude/agents/workflow-plan-checker.md +1 -1
  4. package/.claude/agents/workflow-planner.md +1 -1
  5. package/.claude/commands/learn-decompose.md +176 -176
  6. package/.claude/commands/learn-follow.md +167 -167
  7. package/.claude/commands/learn-retro.md +1 -1
  8. package/.claude/commands/maestro-analyze.md +46 -3
  9. package/.claude/commands/maestro-coordinate.md +1 -3
  10. package/.claude/commands/maestro-execute.md +14 -0
  11. package/.claude/commands/maestro-plan.md +16 -0
  12. package/.claude/commands/manage-harvest.md +131 -131
  13. package/.claude/commands/manage-issue-discover.md +2 -2
  14. package/.claude/commands/manage-issue.md +5 -5
  15. package/.claude/commands/spec-add.md +67 -56
  16. package/.claude/commands/spec-load.md +66 -64
  17. package/.claude/commands/spec-setup.md +5 -9
  18. package/.codex/skills/learn-decompose/SKILL.md +119 -0
  19. package/.codex/skills/learn-follow/SKILL.md +83 -0
  20. package/.codex/skills/learn-investigate/SKILL.md +83 -0
  21. package/.codex/skills/learn-retro/SKILL.md +83 -0
  22. package/.codex/skills/learn-second-opinion/SKILL.md +86 -0
  23. package/.codex/skills/maestro/SKILL.md +335 -0
  24. package/.codex/skills/maestro-analyze/SKILL.md +84 -75
  25. package/.codex/skills/maestro-brainstorm/SKILL.md +452 -463
  26. package/.codex/skills/maestro-chain/SKILL.md +233 -0
  27. package/.codex/skills/maestro-coordinate/SKILL.md +167 -278
  28. package/.codex/skills/maestro-execute/SKILL.md +435 -438
  29. package/.codex/skills/maestro-fork/SKILL.md +68 -0
  30. package/.codex/skills/maestro-init/SKILL.md +171 -167
  31. package/.codex/skills/maestro-learn/SKILL.md +80 -0
  32. package/.codex/skills/maestro-link-coordinate/SKILL.md +224 -220
  33. package/.codex/skills/maestro-merge/SKILL.md +62 -0
  34. package/.codex/skills/maestro-milestone-audit/SKILL.md +108 -103
  35. package/.codex/skills/maestro-milestone-complete/SKILL.md +155 -149
  36. package/.codex/skills/maestro-milestone-release/SKILL.md +70 -0
  37. package/.codex/skills/maestro-overlay/SKILL.md +188 -185
  38. package/.codex/skills/maestro-plan/SKILL.md +66 -69
  39. package/.codex/skills/maestro-quick/SKILL.md +26 -23
  40. package/.codex/skills/maestro-roadmap/SKILL.md +65 -73
  41. package/.codex/skills/maestro-spec-generate/SKILL.md +66 -74
  42. package/.codex/skills/maestro-ui-design/SKILL.md +34 -31
  43. package/.codex/skills/maestro-verify/SKILL.md +556 -566
  44. package/.codex/skills/manage-codebase-rebuild/SKILL.md +397 -405
  45. package/.codex/skills/manage-codebase-refresh/SKILL.md +93 -82
  46. package/.codex/skills/manage-harvest/SKILL.md +82 -0
  47. package/.codex/skills/manage-issue/SKILL.md +80 -65
  48. package/.codex/skills/manage-issue-discover/SKILL.md +491 -503
  49. package/.codex/skills/manage-learn/SKILL.md +190 -186
  50. package/.codex/skills/manage-memory/SKILL.md +95 -72
  51. package/.codex/skills/manage-memory-capture/SKILL.md +99 -86
  52. package/.codex/skills/manage-status/SKILL.md +102 -89
  53. package/.codex/skills/quality-business-test/SKILL.md +228 -223
  54. package/.codex/skills/quality-debug/SKILL.md +54 -66
  55. package/.codex/skills/quality-integration-test/SKILL.md +532 -544
  56. package/.codex/skills/quality-refactor/SKILL.md +197 -191
  57. package/.codex/skills/quality-retrospective/SKILL.md +512 -505
  58. package/.codex/skills/quality-review/SKILL.md +93 -105
  59. package/.codex/skills/quality-sync/SKILL.md +101 -89
  60. package/.codex/skills/quality-test/SKILL.md +202 -198
  61. package/.codex/skills/quality-test-gen/SKILL.md +93 -104
  62. package/.codex/skills/spec-add/SKILL.md +58 -39
  63. package/.codex/skills/spec-load/SKILL.md +45 -40
  64. package/.codex/skills/spec-map/SKILL.md +180 -182
  65. package/.codex/skills/spec-setup/SKILL.md +94 -76
  66. package/.codex/skills/team-coordinate/SKILL.md +346 -357
  67. package/.codex/skills/team-executor/SKILL.md +70 -112
  68. package/.codex/skills/team-lifecycle-v4/SKILL.md +311 -299
  69. package/.codex/skills/team-quality-assurance/SKILL.md +234 -227
  70. package/.codex/skills/team-review/SKILL.md +232 -225
  71. package/.codex/skills/team-tech-debt/SKILL.md +78 -100
  72. package/.codex/skills/team-testing/SKILL.md +242 -235
  73. package/.codex/skills/wiki-connect/SKILL.md +75 -0
  74. package/.codex/skills/wiki-digest/SKILL.md +87 -0
  75. package/README.md +14 -11
  76. package/README.zh-CN.md +14 -11
  77. package/chains/issue-lifecycle.json +13 -13
  78. package/chains/singles/issue-analyze.json +3 -3
  79. package/chains/singles/issue-execute.json +3 -3
  80. package/chains/singles/issue-plan.json +3 -3
  81. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js +2 -2
  82. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js.map +1 -1
  83. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +3 -3
  84. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
  85. package/dashboard/dist-server/dashboard/src/server/routes/issues.js +34 -0
  86. package/dashboard/dist-server/dashboard/src/server/routes/issues.js.map +1 -1
  87. package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +1 -1
  88. package/dashboard/dist-server/dashboard/src/server/routes/specs.js +75 -30
  89. package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
  90. package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +5 -0
  91. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +5 -0
  92. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
  93. package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js +2 -3
  94. package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js.map +1 -1
  95. package/dashboard/dist-server/dashboard/src/shared/constants.js +5 -0
  96. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  97. package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +5 -0
  98. package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
  99. package/dashboard/dist-server/dashboard/src/shared/normalize-task.d.ts +2 -0
  100. package/dashboard/dist-server/dashboard/src/shared/normalize-task.js +75 -0
  101. package/dashboard/dist-server/dashboard/src/shared/normalize-task.js.map +1 -0
  102. package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +21 -0
  103. package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
  104. package/dashboard/dist-server/dashboard/src/shared/types.d.ts +3 -2
  105. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
  106. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  107. package/dashboard/dist-server/src/hooks/constants.d.ts +92 -12
  108. package/dashboard/dist-server/src/hooks/constants.js +151 -16
  109. package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
  110. package/dashboard/dist-server/src/types/index.d.ts +5 -0
  111. package/dist/src/commands/collab.d.ts +1 -34
  112. package/dist/src/commands/collab.d.ts.map +1 -1
  113. package/dist/src/commands/collab.js +8 -76
  114. package/dist/src/commands/collab.js.map +1 -1
  115. package/dist/src/commands/hooks.d.ts +5 -1
  116. package/dist/src/commands/hooks.d.ts.map +1 -1
  117. package/dist/src/commands/hooks.js +115 -10
  118. package/dist/src/commands/hooks.js.map +1 -1
  119. package/dist/src/commands/install-ui/InstallConfirm.d.ts +3 -1
  120. package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
  121. package/dist/src/commands/install-ui/InstallConfirm.js +3 -1
  122. package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
  123. package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
  124. package/dist/src/commands/install-ui/InstallExecution.js +5 -1
  125. package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
  126. package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
  127. package/dist/src/commands/install-ui/InstallFlow.js +7 -3
  128. package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
  129. package/dist/src/commands/install-ui/StatuslineConfig.d.ts +6 -1
  130. package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -1
  131. package/dist/src/commands/install-ui/StatuslineConfig.js +27 -5
  132. package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -1
  133. package/dist/src/commands/spec.d.ts.map +1 -1
  134. package/dist/src/commands/spec.js +7 -2
  135. package/dist/src/commands/spec.js.map +1 -1
  136. package/dist/src/hooks/__tests__/statusline-visual-test.d.ts +7 -0
  137. package/dist/src/hooks/__tests__/statusline-visual-test.d.ts.map +1 -0
  138. package/dist/src/hooks/__tests__/statusline-visual-test.js +236 -0
  139. package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -0
  140. package/dist/src/hooks/constants.d.ts +92 -12
  141. package/dist/src/hooks/constants.d.ts.map +1 -1
  142. package/dist/src/hooks/constants.js +151 -16
  143. package/dist/src/hooks/constants.js.map +1 -1
  144. package/dist/src/hooks/guards/index.d.ts +2 -0
  145. package/dist/src/hooks/guards/index.d.ts.map +1 -1
  146. package/dist/src/hooks/guards/index.js +2 -0
  147. package/dist/src/hooks/guards/index.js.map +1 -1
  148. package/dist/src/hooks/guards/preflight-guard.d.ts +29 -0
  149. package/dist/src/hooks/guards/preflight-guard.d.ts.map +1 -0
  150. package/dist/src/hooks/guards/preflight-guard.js +95 -0
  151. package/dist/src/hooks/guards/preflight-guard.js.map +1 -0
  152. package/dist/src/hooks/guards/spec-validator.d.ts +25 -0
  153. package/dist/src/hooks/guards/spec-validator.d.ts.map +1 -0
  154. package/dist/src/hooks/guards/spec-validator.js +66 -0
  155. package/dist/src/hooks/guards/spec-validator.js.map +1 -0
  156. package/dist/src/hooks/index.d.ts +1 -0
  157. package/dist/src/hooks/index.d.ts.map +1 -1
  158. package/dist/src/hooks/index.js +1 -0
  159. package/dist/src/hooks/index.js.map +1 -1
  160. package/dist/src/hooks/keyword-spec-injector.d.ts +21 -0
  161. package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -0
  162. package/dist/src/hooks/keyword-spec-injector.js +96 -0
  163. package/dist/src/hooks/keyword-spec-injector.js.map +1 -0
  164. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts +2 -1
  165. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
  166. package/dist/src/hooks/plugins/spec-injection-plugin.js +21 -12
  167. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  168. package/dist/src/hooks/preflight-core.d.ts +37 -0
  169. package/dist/src/hooks/preflight-core.d.ts.map +1 -0
  170. package/dist/src/hooks/preflight-core.js +86 -0
  171. package/dist/src/hooks/preflight-core.js.map +1 -0
  172. package/dist/src/hooks/spec-bridge.d.ts +40 -0
  173. package/dist/src/hooks/spec-bridge.d.ts.map +1 -0
  174. package/dist/src/hooks/spec-bridge.js +97 -0
  175. package/dist/src/hooks/spec-bridge.js.map +1 -0
  176. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  177. package/dist/src/hooks/spec-injector.js +18 -12
  178. package/dist/src/hooks/spec-injector.js.map +1 -1
  179. package/dist/src/hooks/statusline.d.ts +8 -17
  180. package/dist/src/hooks/statusline.d.ts.map +1 -1
  181. package/dist/src/hooks/statusline.js +269 -112
  182. package/dist/src/hooks/statusline.js.map +1 -1
  183. package/dist/src/i18n/locales/en.d.ts.map +1 -1
  184. package/dist/src/i18n/locales/en.js +5 -0
  185. package/dist/src/i18n/locales/en.js.map +1 -1
  186. package/dist/src/i18n/locales/zh.d.ts.map +1 -1
  187. package/dist/src/i18n/locales/zh.js +5 -0
  188. package/dist/src/i18n/locales/zh.js.map +1 -1
  189. package/dist/src/i18n/types.d.ts +5 -0
  190. package/dist/src/i18n/types.d.ts.map +1 -1
  191. package/dist/src/team/phase-orchestrator.d.ts +52 -0
  192. package/dist/src/team/phase-orchestrator.d.ts.map +1 -0
  193. package/dist/src/team/phase-orchestrator.js +165 -0
  194. package/dist/src/team/phase-orchestrator.js.map +1 -0
  195. package/dist/src/team/phase-types.d.ts +51 -0
  196. package/dist/src/team/phase-types.d.ts.map +1 -0
  197. package/dist/src/team/phase-types.js +41 -0
  198. package/dist/src/team/phase-types.js.map +1 -0
  199. package/dist/src/tools/collab-adapter.d.ts +17 -0
  200. package/dist/src/tools/collab-adapter.d.ts.map +1 -1
  201. package/dist/src/tools/collab-adapter.js +138 -0
  202. package/dist/src/tools/collab-adapter.js.map +1 -1
  203. package/dist/src/tools/index.d.ts.map +1 -1
  204. package/dist/src/tools/index.js +6 -0
  205. package/dist/src/tools/index.js.map +1 -1
  206. package/dist/src/tools/merge-validator.d.ts +24 -0
  207. package/dist/src/tools/merge-validator.d.ts.map +1 -0
  208. package/dist/src/tools/merge-validator.js +220 -0
  209. package/dist/src/tools/merge-validator.js.map +1 -0
  210. package/dist/src/tools/spec-entry-parser.d.ts +56 -0
  211. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -0
  212. package/dist/src/tools/spec-entry-parser.js +196 -0
  213. package/dist/src/tools/spec-entry-parser.js.map +1 -0
  214. package/dist/src/tools/spec-init.d.ts.map +1 -1
  215. package/dist/src/tools/spec-init.js +66 -92
  216. package/dist/src/tools/spec-init.js.map +1 -1
  217. package/dist/src/tools/spec-keyword-index.d.ts +30 -0
  218. package/dist/src/tools/spec-keyword-index.d.ts.map +1 -0
  219. package/dist/src/tools/spec-keyword-index.js +101 -0
  220. package/dist/src/tools/spec-keyword-index.js.map +1 -0
  221. package/dist/src/tools/spec-loader.d.ts +3 -3
  222. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  223. package/dist/src/tools/spec-loader.js +49 -23
  224. package/dist/src/tools/spec-loader.js.map +1 -1
  225. package/dist/src/tools/team-agents.d.ts +27 -0
  226. package/dist/src/tools/team-agents.d.ts.map +1 -0
  227. package/dist/src/tools/team-agents.js +362 -0
  228. package/dist/src/tools/team-agents.js.map +1 -0
  229. package/dist/src/tools/team-mailbox.d.ts +40 -0
  230. package/dist/src/tools/team-mailbox.d.ts.map +1 -0
  231. package/dist/src/tools/team-mailbox.js +384 -0
  232. package/dist/src/tools/team-mailbox.js.map +1 -0
  233. package/dist/src/tools/team-msg.d.ts +17 -8
  234. package/dist/src/tools/team-msg.d.ts.map +1 -1
  235. package/dist/src/tools/team-msg.js +110 -13
  236. package/dist/src/tools/team-msg.js.map +1 -1
  237. package/dist/src/tools/team-tasks-mcp.d.ts +27 -0
  238. package/dist/src/tools/team-tasks-mcp.d.ts.map +1 -0
  239. package/dist/src/tools/team-tasks-mcp.js +408 -0
  240. package/dist/src/tools/team-tasks-mcp.js.map +1 -0
  241. package/dist/src/types/index.d.ts +5 -0
  242. package/dist/src/types/index.d.ts.map +1 -1
  243. package/package.json +2 -1
  244. package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +3 -3
  245. package/templates/cli/prompts/workflow-skill-lessons-learned.txt +3 -3
  246. package/templates/search-tools.md +1 -1
  247. package/workflows/analyze.md +816 -816
  248. package/workflows/brainstorm.md +471 -471
  249. package/workflows/cli-tools-usage.md +44 -27
  250. package/workflows/codebase-rebuild.md +332 -332
  251. package/workflows/codebase-refresh.md +240 -240
  252. package/workflows/delegate-usage.md +3 -3
  253. package/workflows/execute.md +1 -1
  254. package/workflows/harvest.md +420 -420
  255. package/workflows/integration-test.md +343 -343
  256. package/workflows/issue-analyze.md +6 -2
  257. package/workflows/issue-discover.md +414 -414
  258. package/workflows/issue-execute.md +6 -3
  259. package/workflows/issue-plan.md +5 -2
  260. package/workflows/maestro-coordinate.codex.md +281 -470
  261. package/workflows/maestro-coordinate.md +14 -14
  262. package/workflows/maestro-link-coordinate.md +2 -2
  263. package/workflows/maestro.codex.md +710 -0
  264. package/workflows/maestro.md +10 -11
  265. package/workflows/map.md +111 -111
  266. package/workflows/milestone-complete.md +176 -176
  267. package/workflows/plan.md +1 -1
  268. package/workflows/quick.md +497 -497
  269. package/workflows/refactor.md +300 -300
  270. package/workflows/retrospective.md +1 -1
  271. package/workflows/roadmap.md +335 -335
  272. package/workflows/spec-generate.md +640 -640
  273. package/workflows/specs-add.md +46 -81
  274. package/workflows/specs-load.md +15 -17
  275. package/workflows/specs-setup.md +40 -161
  276. package/.claude/commands/manage-issue-analyze.md +0 -62
  277. package/.claude/commands/manage-issue-execute.md +0 -73
  278. package/.claude/commands/manage-issue-plan.md +0 -62
  279. package/.codex/skills/manage-issue-analyze/SKILL.md +0 -207
  280. package/.codex/skills/manage-issue-execute/SKILL.md +0 -200
  281. package/.codex/skills/manage-issue-plan/SKILL.md +0 -186
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: maestro-fork
3
+ description: Create git worktree for milestone-level parallel development, or sync existing worktree with main. Copies .workflow/ context into worktree since it is gitignored.
4
+ argument-hint: "-m <milestone-number> [--base <branch>] [--sync]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Create a git worktree for an entire milestone, enabling inter-milestone parallel development.
10
+ All phases within the milestone are owned by the worktree. Since `.workflow/` is gitignored,
11
+ this command explicitly copies project context and milestone phase directories into the worktree.
12
+
13
+ Also supports `--sync` mode to pull latest main into an active worktree.
14
+ </purpose>
15
+
16
+ <required_reading>
17
+ @~/.maestro/workflows/fork.md
18
+ </required_reading>
19
+
20
+ <context>
21
+ $ARGUMENTS — milestone number and optional flags.
22
+
23
+ **Modes:**
24
+ | Mode | Trigger | Behavior |
25
+ |------|---------|----------|
26
+ | Fork | `-m 2` or `2` | Create worktree for milestone 2 |
27
+ | Sync | `-m 2 --sync` | Sync existing worktree with main |
28
+
29
+ **Flags:**
30
+ - `-m <N>` or bare `<N>`: Milestone number
31
+ - `--base <branch>`: Override base branch (default: HEAD)
32
+ - `--sync`: Pull main into existing worktree, re-copy shared artifacts
33
+
34
+ **Worktree layout:** `.worktrees/m{N}-{slug}/` with scoped `.workflow/`
35
+ </context>
36
+
37
+ <execution>
38
+ Follow '~/.maestro/workflows/fork.md' completely.
39
+
40
+ **Next steps:**
41
+ - Fork → `cd {wt.path} && $maestro-analyze {first_phase}`
42
+ - Sync → resume work in worktree
43
+ </execution>
44
+
45
+ <error_codes>
46
+ | Code | Severity | Condition | Recovery |
47
+ |------|----------|-----------|----------|
48
+ | E001 | error | Project not initialized | Run maestro-init |
49
+ | E002 | error | No roadmap found | Run maestro-roadmap |
50
+ | E003 | error | Running inside a worktree | Run from main worktree |
51
+ | E004 | error | No milestone number | Provide `-m <N>` |
52
+ | E006 | error | Milestone out of range | Check available milestones |
53
+ | E008 | error | Milestone already has active worktree | Merge or cleanup first |
54
+ </error_codes>
55
+
56
+ <success_criteria>
57
+ Fork mode:
58
+ - [ ] Milestone phases identified from roadmap
59
+ - [ ] Git worktree created with branch `milestone/{slug}`
60
+ - [ ] `.workflow/` context copied (all milestone + dependency phases)
61
+ - [ ] `worktree-scope.json` written with owned phase numbers
62
+ - [ ] `worktrees.json` registry updated in main worktree
63
+
64
+ Sync mode:
65
+ - [ ] Git merge main into worktree branch
66
+ - [ ] Shared artifacts re-copied
67
+ - [ ] Conflicts reported if any
68
+ </success_criteria>
@@ -1,167 +1,171 @@
1
- ---
2
- name: maestro-init
3
- description: Initialize project with auto state detection — creates .workflow/ directory, project.md, state.json, config.json, and specs/
4
- argument-hint: "[--auto] [--from-brainstorm SESSION-ID]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
- ---
7
-
8
- ## Auto Mode
9
-
10
- When `--auto`: After config questions, run research without further interaction. Expects idea document via @ reference.
11
-
12
- # Maestro Init (Single Agent)
13
-
14
- ## Usage
15
-
16
- ```bash
17
- $maestro-init ""
18
- $maestro-init "--auto"
19
- $maestro-init "--from-brainstorm brainstorm-auth-20260318"
20
- ```
21
-
22
- **Flags**:
23
- - `--auto`: Skip interactive questioning; extract from provided document
24
- - `--from-brainstorm SESSION-ID`: Import vision/goals/constraints from brainstorm guidance-specification.md
25
-
26
- **Output**: `.workflow/` directory with project.md, state.json, config.json, specs/
27
-
28
- ---
29
-
30
- ## Overview
31
-
32
- Sequential project setup skill. Detects project state (empty/code/existing), gathers project information through deep questioning or document extraction, then creates the `.workflow/` directory structure. No parallel agents — single sequential flow.
33
-
34
- ---
35
-
36
- ## Implementation
37
-
38
- ### Step 1: Parse Arguments
39
-
40
- Extract flags from arguments:
41
- - `--auto` flag presence
42
- - `--from-brainstorm SESSION-ID` value
43
- - Remaining text as project description
44
-
45
- ### Step 2: Detect Project State
46
-
47
- ```bash
48
- # Check existing state
49
- ls .workflow/state.json 2>/dev/null
50
- ls package.json pyproject.toml Cargo.toml go.mod 2>/dev/null
51
- ```
52
-
53
- Classify as:
54
- - **existing**: `.workflow/state.json` found — warn and exit (E002)
55
- - **code**: Source files present but no `.workflow/` — onboarding existing codebase
56
- - **empty**: Greenfield project
57
-
58
- ### Step 3: Gather Project Information
59
-
60
- **If `--from-brainstorm`**:
61
- - Read `.workflow/.brainstorm/{SESSION-ID}/guidance-specification.md`
62
- - Extract: vision, goals, constraints, terminology, tech decisions
63
- - Skip interactive questioning
64
-
65
- **If `--auto`**:
66
- - Extract project info from provided document/@ reference
67
- - Minimal interactive questions (confirm core value only)
68
-
69
- **Otherwise (interactive)**:
70
- - Deep questioning flow:
71
- 1. What is the core value proposition?
72
- 2. Who are the target users?
73
- 3. What are the key requirements? (follow threads, don't rush)
74
- 4. What are known constraints/limitations?
75
- 5. What tech stack preferences exist?
76
- - Follow each thread with clarifying questions until satisfied
77
-
78
- ### Step 4: Read Templates
79
-
80
- Read the following templates:
81
- - `~/.maestro/templates/project.md`
82
- - `~/.maestro/templates/state.json`
83
- - `~/.maestro/templates/config.json`
84
-
85
- ### Step 5: Create .workflow/ Structure
86
-
87
- ```bash
88
- mkdir -p .workflow/specs .workflow/phases .workflow/scratch .workflow/codebase
89
- ```
90
-
91
- ### Step 6: Write project.md
92
-
93
- Populate template with gathered information:
94
- - Project name, core value proposition
95
- - Requirements: Validated / Active / Out of Scope
96
- - Key decisions and constraints
97
- - Tech stack (detected or specified)
98
-
99
- Write to `.workflow/project.md`.
100
-
101
- ### Step 7: Write state.json
102
-
103
- Initialize state from template:
104
- - `current_phase`: null
105
- - `current_milestone`: null
106
- - `status`: "initialized"
107
-
108
- Write to `.workflow/state.json`.
109
-
110
- ### Step 8: Write config.json
111
-
112
- Configuration questions (or defaults for --auto):
113
- - Granularity: fine / medium / coarse
114
- - Workflow agents: enable/disable optional agents
115
- - Gate preferences: verification strictness
116
-
117
- Write to `.workflow/config.json`.
118
-
119
- ### Step 9: Initialize specs/
120
-
121
- Create convention files in `.workflow/specs/`:
122
- - `conventions.md` — detected or specified coding conventions
123
- - `learnings.md` empty, populated during phase transitions
124
-
125
- ### Step 10: Completion Report
126
-
127
- ```
128
- === WORKFLOW INITIALIZED ===
129
- Project: {project_name}
130
- State: .workflow/state.json (active)
131
-
132
- Created:
133
- .workflow/project.md
134
- .workflow/state.json
135
- .workflow/config.json
136
- .workflow/specs/
137
-
138
- Next steps (choose one path to create roadmap):
139
- $maestro-spec-generate "<idea>" -- Full spec package + roadmap (heavy)
140
- $maestro-roadmap "<requirement>" -- Direct interactive roadmap (light)
141
-
142
- Other commands:
143
- $manage-status -- View project dashboard
144
- $maestro-brainstorm "<topic>" -- Explore ideas first
145
- $maestro-quick "<task>" -- Quick ad-hoc task
146
- ```
147
-
148
- ---
149
-
150
- ## Error Handling
151
-
152
- | Code | Severity | Description | Recovery |
153
- |------|----------|-------------|----------|
154
- | E001 | error | No arguments when --auto requires document | Ask user for document reference |
155
- | E002 | error | .workflow/ already exists | Show status, suggest manage-status |
156
- | E003 | error | Brainstorm session not found | List available sessions |
157
- | W001 | warning | Could not detect tech stack | Continue with manual input |
158
-
159
- ---
160
-
161
- ## Core Rules
162
-
163
- 1. **Never create roadmap** — init only creates .workflow/ structure; roadmap is a separate step
164
- 2. **Deep questioning over speed** follow threads, ask clarifying questions (unless --auto)
165
- 3. **Detect, don't assume** scan for existing files, package managers, frameworks before asking
166
- 4. **Templates are source of truth** always read templates before writing files
167
- 5. **Idempotent check** — if .workflow/ exists, refuse to overwrite (E002)
1
+ ---
2
+ name: maestro-init
3
+ description: Initialize project with auto state detection — creates .workflow/ directory, project.md, state.json, config.json, and specs/
4
+ argument-hint: "[--auto] [--from-brainstorm SESSION-ID]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Sequential project setup skill. Detects project state (empty/code/existing), gathers project information through deep questioning or document extraction, then creates the `.workflow/` directory structure. No parallel agents — single sequential flow.
10
+
11
+ When `--auto`: After config questions, run research without further interaction. Expects idea document via @ reference.
12
+ </purpose>
13
+
14
+ <context>
15
+
16
+ ```bash
17
+ $maestro-init ""
18
+ $maestro-init "--auto"
19
+ $maestro-init "--from-brainstorm brainstorm-auth-20260318"
20
+ ```
21
+
22
+ **Flags**:
23
+ - `--auto`: Skip interactive questioning; extract from provided document
24
+ - `--from-brainstorm SESSION-ID`: Import vision/goals/constraints from brainstorm guidance-specification.md
25
+
26
+ **Output**: `.workflow/` directory with project.md, state.json, config.json, specs/
27
+
28
+ </context>
29
+
30
+ <invariants>
31
+ 1. **Never create roadmap** — init only creates .workflow/ structure; roadmap is a separate step
32
+ 2. **Deep questioning over speed** follow threads, ask clarifying questions (unless --auto)
33
+ 3. **Detect, don't assume** — scan for existing files, package managers, frameworks before asking
34
+ 4. **Templates are source of truth** — always read templates before writing files
35
+ 5. **Idempotent check** — if .workflow/ exists, refuse to overwrite (E002)
36
+ </invariants>
37
+
38
+ <execution>
39
+
40
+ ### Step 1: Parse Arguments
41
+
42
+ Extract flags from arguments:
43
+ - `--auto` flag presence
44
+ - `--from-brainstorm SESSION-ID` value
45
+ - Remaining text as project description
46
+
47
+ ### Step 2: Detect Project State
48
+
49
+ ```bash
50
+ # Check existing state
51
+ ls .workflow/state.json 2>/dev/null
52
+ ls package.json pyproject.toml Cargo.toml go.mod 2>/dev/null
53
+ ```
54
+
55
+ Classify as:
56
+ - **existing**: `.workflow/state.json` found — warn and exit (E002)
57
+ - **code**: Source files present but no `.workflow/` — onboarding existing codebase
58
+ - **empty**: Greenfield project
59
+
60
+ ### Step 3: Gather Project Information
61
+
62
+ **If `--from-brainstorm`**:
63
+ - Read `.workflow/.brainstorm/{SESSION-ID}/guidance-specification.md`
64
+ - Extract: vision, goals, constraints, terminology, tech decisions
65
+ - Skip interactive questioning
66
+
67
+ **If `--auto`**:
68
+ - Extract project info from provided document/@ reference
69
+ - Minimal interactive questions (confirm core value only)
70
+
71
+ **Otherwise (interactive)**:
72
+ - Deep questioning flow:
73
+ 1. What is the core value proposition?
74
+ 2. Who are the target users?
75
+ 3. What are the key requirements? (follow threads, don't rush)
76
+ 4. What are known constraints/limitations?
77
+ 5. What tech stack preferences exist?
78
+ - Follow each thread with clarifying questions until satisfied
79
+
80
+ ### Step 4: Read Templates
81
+
82
+ Read the following templates:
83
+ - `~/.maestro/templates/project.md`
84
+ - `~/.maestro/templates/state.json`
85
+ - `~/.maestro/templates/config.json`
86
+
87
+ ### Step 5: Create .workflow/ Structure
88
+
89
+ ```bash
90
+ mkdir -p .workflow/specs .workflow/phases .workflow/scratch .workflow/codebase
91
+ ```
92
+
93
+ ### Step 6: Write project.md
94
+
95
+ Populate template with gathered information:
96
+ - Project name, core value proposition
97
+ - Requirements: Validated / Active / Out of Scope
98
+ - Key decisions and constraints
99
+ - Tech stack (detected or specified)
100
+
101
+ Write to `.workflow/project.md`.
102
+
103
+ ### Step 7: Write state.json
104
+
105
+ Initialize state from template:
106
+ - `current_phase`: null
107
+ - `current_milestone`: null
108
+ - `status`: "initialized"
109
+
110
+ Write to `.workflow/state.json`.
111
+
112
+ ### Step 8: Write config.json
113
+
114
+ Configuration questions (or defaults for --auto):
115
+ - Granularity: fine / medium / coarse
116
+ - Workflow agents: enable/disable optional agents
117
+ - Gate preferences: verification strictness
118
+
119
+ Write to `.workflow/config.json`.
120
+
121
+ ### Step 9: Initialize specs/
122
+
123
+ Create convention files in `.workflow/specs/`:
124
+ - `conventions.md` — detected or specified coding conventions
125
+ - `learnings.md` empty, populated during phase transitions
126
+
127
+ ### Step 10: Completion Report
128
+
129
+ ```
130
+ === WORKFLOW INITIALIZED ===
131
+ Project: {project_name}
132
+ State: .workflow/state.json (active)
133
+
134
+ Created:
135
+ .workflow/project.md
136
+ .workflow/state.json
137
+ .workflow/config.json
138
+ .workflow/specs/
139
+
140
+ Next steps (choose one path to create roadmap):
141
+ $maestro-spec-generate "<idea>" -- Full spec package + roadmap (heavy)
142
+ $maestro-roadmap "<requirement>" -- Direct interactive roadmap (light)
143
+
144
+ Other commands:
145
+ $manage-status -- View project dashboard
146
+ $maestro-brainstorm "<topic>" -- Explore ideas first
147
+ $maestro-quick "<task>" -- Quick ad-hoc task
148
+ ```
149
+
150
+ </execution>
151
+
152
+ <error_codes>
153
+
154
+ | Code | Severity | Description | Recovery |
155
+ |------|----------|-------------|----------|
156
+ | E001 | error | No arguments when --auto requires document | Ask user for document reference |
157
+ | E002 | error | .workflow/ already exists | Show status, suggest manage-status |
158
+ | E003 | error | Brainstorm session not found | List available sessions |
159
+ | W001 | warning | Could not detect tech stack | Continue with manual input |
160
+
161
+ </error_codes>
162
+
163
+ <success_criteria>
164
+ - [ ] Project state correctly detected (empty/code/existing)
165
+ - [ ] `.workflow/` directory structure created
166
+ - [ ] `project.md` populated with project information
167
+ - [ ] `state.json` initialized with correct status
168
+ - [ ] `config.json` written with configuration
169
+ - [ ] `specs/` initialized with convention files
170
+ - [ ] Completion report displayed with next steps
171
+ </success_criteria>
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: maestro-learn
3
+ description: Learning coordinator — route intent to learn commands, execute single or multi-step chains sequentially. Supports 7 chains from single-step (follow, investigate) to multi-step (deep-understand, pattern-catalog).
4
+ argument-hint: "\"intent text\" [-y] [--dry-run] [--chain <name>]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Route learning requests to the optimal learn command or multi-step chain.
10
+ Executes commands sequentially with session tracking.
11
+
12
+ ```
13
+ Intent → Route to Chain → Execute Steps → Session Summary
14
+ ```
15
+ </purpose>
16
+
17
+ <context>
18
+ $ARGUMENTS — learning intent text, or flags.
19
+
20
+ **Flags:**
21
+ - `-y, --yes` — Auto mode: skip confirmation
22
+ - `--dry-run` — Show planned chain without executing
23
+ - `--chain <name>` — Force specific chain
24
+
25
+ **Chains:**
26
+ | Chain | Steps | Use when |
27
+ |-------|-------|----------|
28
+ | `follow` | learn-follow | Read/understand code or docs |
29
+ | `investigate` | learn-investigate | Answer "how/why" questions |
30
+ | `decompose` | learn-decompose | Catalog patterns in a module |
31
+ | `second-opinion` | learn-second-opinion | Get review/challenge on code |
32
+ | `retro` | learn-retro --lens all | Full retrospective |
33
+ | `deep-understand` | follow → decompose → second-opinion | Thorough module analysis |
34
+ | `pattern-catalog` | decompose --save-spec --save-wiki → second-opinion --mode review | Full pattern extraction + review |
35
+
36
+ **Session state:** `.workflow/learning/.maestro-learn/{session_id}/status.json`
37
+ </context>
38
+
39
+ <execution>
40
+
41
+ ### Step 1: Parse & Route
42
+
43
+ **Intent routing:**
44
+ | Keywords | Route |
45
+ |----------|-------|
46
+ | File path (contains `/` or `\`) | `follow` |
47
+ | read, follow, walk through, understand | `follow` |
48
+ | why, how, what if, investigate | `investigate` |
49
+ | pattern, decompose, catalog | `decompose` |
50
+ | opinion, review, challenge, consult | `second-opinion` |
51
+ | retro, git, commit, decision | `retro` |
52
+ | thorough, deep | `deep-understand` |
53
+
54
+ No match → present menu via AskUserQuestion. Max 1 clarification.
55
+
56
+ ### Step 2: Resolve Target & Build Args
57
+ Map chain to skill invocations. Extract target and flags from arguments.
58
+
59
+ ### Step 3: Confirm & Execute
60
+ - `--dry-run`: display chain and exit
61
+ - Not `-y`: show plan, ask confirmation
62
+ - Execute each step sequentially. On failure: retry/skip/abort
63
+ - Write session `status.json`, display summary
64
+ </execution>
65
+
66
+ <error_codes>
67
+ | Code | Severity | Condition | Recovery |
68
+ |------|----------|-----------|----------|
69
+ | E001 | error | No intent provided | Provide learning goal or use --chain |
70
+ | E002 | error | Cannot determine intent | Rephrase or use --chain |
71
+ | E005 | error | Invalid --chain name | Show valid chains |
72
+ | W001 | warning | Intent ambiguous | Present options |
73
+ </error_codes>
74
+
75
+ <success_criteria>
76
+ - [ ] Intent routed to correct chain
77
+ - [ ] Session directory created with status.json
78
+ - [ ] All chain steps executed
79
+ - [ ] Session summary displayed with next-step routing
80
+ </success_criteria>