maestro-flow 0.4.10 → 0.4.12

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 (354) hide show
  1. package/.agents/agents/cli-explore-agent.md +187 -0
  2. package/.agents/agents/cross-role-reviewer.md +173 -0
  3. package/.agents/agents/impeccable-agent.md +101 -0
  4. package/.agents/agents/role-design-author.md +218 -0
  5. package/.agents/agents/team-supervisor.md +145 -0
  6. package/.agents/agents/team-worker.md +239 -0
  7. package/.agents/agents/ui-design-agent.md +272 -0
  8. package/.agents/agents/workflow-analyzer.md +117 -0
  9. package/.agents/agents/workflow-codebase-mapper.md +79 -0
  10. package/.agents/agents/workflow-collab-planner.md +145 -0
  11. package/.agents/agents/workflow-debugger.md +105 -0
  12. package/.agents/agents/workflow-executor.md +134 -0
  13. package/.agents/agents/workflow-external-researcher.md +88 -0
  14. package/.agents/agents/workflow-integration-checker.md +85 -0
  15. package/.agents/agents/workflow-nyquist-auditor.md +87 -0
  16. package/.agents/agents/workflow-phase-researcher.md +87 -0
  17. package/.agents/agents/workflow-plan-checker.md +92 -0
  18. package/.agents/agents/workflow-planner.md +197 -0
  19. package/.agents/agents/workflow-project-researcher.md +76 -0
  20. package/.agents/agents/workflow-research-synthesizer.md +72 -0
  21. package/.agents/agents/workflow-reviewer.md +84 -0
  22. package/.agents/agents/workflow-roadmapper.md +83 -0
  23. package/.agents/agents/workflow-verifier.md +122 -0
  24. package/.agents/skills/codify-to-knowhow/SKILL.md +169 -0
  25. package/.agents/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  26. package/.agents/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  27. package/.agents/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  28. package/.agents/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  29. package/.agents/skills/learn-decompose/SKILL.md +118 -0
  30. package/.agents/skills/learn-follow/SKILL.md +129 -0
  31. package/.agents/skills/learn-investigate/SKILL.md +154 -0
  32. package/.agents/skills/learn-retro/SKILL.md +159 -0
  33. package/.agents/skills/learn-second-opinion/SKILL.md +124 -0
  34. package/.agents/skills/maestro/SKILL.md +258 -0
  35. package/.agents/skills/maestro-amend/SKILL.md +165 -0
  36. package/.agents/skills/maestro-analyze/SKILL.md +161 -0
  37. package/.agents/skills/maestro-blueprint/SKILL.md +132 -0
  38. package/.agents/skills/maestro-brainstorm/SKILL.md +134 -0
  39. package/.agents/skills/maestro-collab/SKILL.md +174 -0
  40. package/.agents/skills/maestro-composer/SKILL.md +181 -0
  41. package/.agents/skills/maestro-execute/SKILL.md +133 -0
  42. package/.agents/skills/maestro-fork/SKILL.md +88 -0
  43. package/.agents/skills/maestro-guard/SKILL.md +103 -0
  44. package/.agents/skills/maestro-help/SKILL.md +300 -0
  45. package/.agents/skills/maestro-help/index/catalog.json +202 -0
  46. package/.agents/skills/maestro-help/phases/01-parse-intent.md +122 -0
  47. package/.agents/skills/maestro-help/phases/02-search-present.md +183 -0
  48. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +213 -0
  49. package/.agents/skills/maestro-impeccable/SKILL.md +251 -0
  50. package/.agents/skills/maestro-init/SKILL.md +80 -0
  51. package/.agents/skills/maestro-learn/SKILL.md +142 -0
  52. package/.agents/skills/maestro-merge/SKILL.md +66 -0
  53. package/.agents/skills/maestro-milestone-audit/SKILL.md +72 -0
  54. package/.agents/skills/maestro-milestone-complete/SKILL.md +79 -0
  55. package/.agents/skills/maestro-milestone-release/SKILL.md +98 -0
  56. package/.agents/skills/maestro-overlay/SKILL.md +180 -0
  57. package/.agents/skills/maestro-plan/SKILL.md +182 -0
  58. package/.agents/skills/maestro-player/SKILL.md +177 -0
  59. package/.agents/skills/maestro-quick/SKILL.md +67 -0
  60. package/.agents/skills/maestro-ralph/SKILL.md +756 -0
  61. package/.agents/skills/maestro-ralph-execute/SKILL.md +273 -0
  62. package/.agents/skills/maestro-roadmap/SKILL.md +131 -0
  63. package/.agents/skills/maestro-tools-execute/SKILL.md +119 -0
  64. package/.agents/skills/maestro-tools-register/SKILL.md +159 -0
  65. package/.agents/skills/maestro-ui-codify/SKILL.md +82 -0
  66. package/.agents/skills/maestro-update/SKILL.md +178 -0
  67. package/.agents/skills/maestro-verify/SKILL.md +111 -0
  68. package/.agents/skills/manage-codebase-rebuild/SKILL.md +77 -0
  69. package/.agents/skills/manage-codebase-refresh/SKILL.md +59 -0
  70. package/.agents/skills/manage-harvest/SKILL.md +96 -0
  71. package/.agents/skills/manage-issue/SKILL.md +75 -0
  72. package/.agents/skills/manage-issue-discover/SKILL.md +83 -0
  73. package/.agents/skills/manage-knowhow/SKILL.md +79 -0
  74. package/.agents/skills/manage-knowhow-capture/SKILL.md +81 -0
  75. package/.agents/skills/manage-learn/SKILL.md +67 -0
  76. package/.agents/skills/manage-status/SKILL.md +54 -0
  77. package/.agents/skills/manage-wiki/SKILL.md +64 -0
  78. package/.agents/skills/quality-auto-test/SKILL.md +138 -0
  79. package/.agents/skills/quality-debug/SKILL.md +122 -0
  80. package/.agents/skills/quality-refactor/SKILL.md +69 -0
  81. package/.agents/skills/quality-retrospective/SKILL.md +79 -0
  82. package/.agents/skills/quality-review/SKILL.md +130 -0
  83. package/.agents/skills/quality-sync/SKILL.md +53 -0
  84. package/.agents/skills/quality-test/SKILL.md +119 -0
  85. package/.agents/skills/security-audit/SKILL.md +157 -0
  86. package/.agents/skills/skill-iter-tune/SKILL.md +384 -0
  87. package/.agents/skills/skill-iter-tune/phases/01-setup.md +144 -0
  88. package/.agents/skills/skill-iter-tune/phases/02-execute.md +292 -0
  89. package/.agents/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  90. package/.agents/skills/skill-iter-tune/phases/04-improve.md +186 -0
  91. package/.agents/skills/skill-iter-tune/phases/05-report.md +166 -0
  92. package/.agents/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  93. package/.agents/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  94. package/.agents/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  95. package/.agents/skills/spec-add/SKILL.md +70 -0
  96. package/.agents/skills/spec-load/SKILL.md +73 -0
  97. package/.agents/skills/spec-remove/SKILL.md +53 -0
  98. package/.agents/skills/spec-setup/SKILL.md +50 -0
  99. package/.agents/skills/team-coordinate/SKILL.md +268 -0
  100. package/.agents/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
  101. package/.agents/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
  102. package/.agents/skills/team-coordinate/roles/coordinator/commands/monitor.md +358 -0
  103. package/.agents/skills/team-coordinate/roles/coordinator/role.md +365 -0
  104. package/.agents/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
  105. package/.agents/skills/team-coordinate/specs/pipelines.md +97 -0
  106. package/.agents/skills/team-coordinate/specs/quality-gates.md +112 -0
  107. package/.agents/skills/team-coordinate/specs/role-spec-template.md +198 -0
  108. package/.agents/skills/team-executor/SKILL.md +191 -0
  109. package/.agents/skills/team-executor/roles/executor/commands/monitor.md +239 -0
  110. package/.agents/skills/team-executor/roles/executor/role.md +171 -0
  111. package/.agents/skills/team-executor/specs/session-schema.md +264 -0
  112. package/.agents/skills/team-lifecycle-v4/SKILL.md +211 -0
  113. package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +96 -0
  114. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
  115. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
  116. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
  117. package/.agents/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
  118. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
  119. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
  120. package/.agents/skills/team-lifecycle-v4/roles/executor/role.md +69 -0
  121. package/.agents/skills/team-lifecycle-v4/roles/planner/role.md +87 -0
  122. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
  123. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
  124. package/.agents/skills/team-lifecycle-v4/roles/reviewer/role.md +71 -0
  125. package/.agents/skills/team-lifecycle-v4/roles/supervisor/role.md +194 -0
  126. package/.agents/skills/team-lifecycle-v4/roles/tester/role.md +89 -0
  127. package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +97 -0
  128. package/.agents/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
  129. package/.agents/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
  130. package/.agents/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
  131. package/.agents/skills/team-lifecycle-v4/templates/architecture.md +254 -0
  132. package/.agents/skills/team-lifecycle-v4/templates/epics.md +196 -0
  133. package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
  134. package/.agents/skills/team-lifecycle-v4/templates/requirements.md +224 -0
  135. package/.agents/skills/team-quality-assurance/SKILL.md +149 -0
  136. package/.agents/skills/team-quality-assurance/roles/analyst/role.md +90 -0
  137. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
  138. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
  139. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +250 -0
  140. package/.agents/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
  141. package/.agents/skills/team-quality-assurance/roles/executor/role.md +68 -0
  142. package/.agents/skills/team-quality-assurance/roles/generator/role.md +70 -0
  143. package/.agents/skills/team-quality-assurance/roles/scout/role.md +77 -0
  144. package/.agents/skills/team-quality-assurance/roles/strategist/role.md +73 -0
  145. package/.agents/skills/team-quality-assurance/specs/pipelines.md +115 -0
  146. package/.agents/skills/team-quality-assurance/specs/team-config.json +131 -0
  147. package/.agents/skills/team-review/SKILL.md +149 -0
  148. package/.agents/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
  149. package/.agents/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
  150. package/.agents/skills/team-review/roles/coordinator/commands/monitor.md +224 -0
  151. package/.agents/skills/team-review/roles/coordinator/role.md +132 -0
  152. package/.agents/skills/team-review/roles/fixer/role.md +78 -0
  153. package/.agents/skills/team-review/roles/reviewer/role.md +70 -0
  154. package/.agents/skills/team-review/roles/scanner/role.md +81 -0
  155. package/.agents/skills/team-review/specs/dimensions.md +82 -0
  156. package/.agents/skills/team-review/specs/finding-schema.json +82 -0
  157. package/.agents/skills/team-review/specs/pipelines.md +102 -0
  158. package/.agents/skills/team-review/specs/team-config.json +27 -0
  159. package/.agents/skills/team-tech-debt/SKILL.md +130 -0
  160. package/.agents/skills/team-tech-debt/roles/assessor/role.md +79 -0
  161. package/.agents/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
  162. package/.agents/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
  163. package/.agents/skills/team-tech-debt/roles/coordinator/commands/monitor.md +209 -0
  164. package/.agents/skills/team-tech-debt/roles/coordinator/role.md +123 -0
  165. package/.agents/skills/team-tech-debt/roles/executor/role.md +78 -0
  166. package/.agents/skills/team-tech-debt/roles/planner/role.md +71 -0
  167. package/.agents/skills/team-tech-debt/roles/scanner/role.md +92 -0
  168. package/.agents/skills/team-tech-debt/roles/validator/role.md +80 -0
  169. package/.agents/skills/team-tech-debt/specs/pipelines.md +47 -0
  170. package/.agents/skills/team-tech-debt/specs/team-config.json +129 -0
  171. package/.agents/skills/team-testing/SKILL.md +145 -0
  172. package/.agents/skills/team-testing/roles/analyst/role.md +105 -0
  173. package/.agents/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
  174. package/.agents/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
  175. package/.agents/skills/team-testing/roles/coordinator/commands/monitor.md +257 -0
  176. package/.agents/skills/team-testing/roles/coordinator/role.md +134 -0
  177. package/.agents/skills/team-testing/roles/executor/role.md +101 -0
  178. package/.agents/skills/team-testing/roles/generator/role.md +100 -0
  179. package/.agents/skills/team-testing/roles/strategist/role.md +85 -0
  180. package/.agents/skills/team-testing/specs/pipelines.md +101 -0
  181. package/.agents/skills/team-testing/specs/team-config.json +93 -0
  182. package/.agents/skills/wiki-connect/SKILL.md +64 -0
  183. package/.agents/skills/wiki-digest/SKILL.md +70 -0
  184. package/.agents/skills/workflow-skill-designer/SKILL.md +498 -0
  185. package/.agents/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
  186. package/.agents/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
  187. package/.agents/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
  188. package/.agents/skills/workflow-skill-designer/phases/04-validation.md +471 -0
  189. package/.agy/agents/cli-explore-agent.md +1 -3
  190. package/.agy/agents/cross-role-reviewer.md +170 -0
  191. package/.agy/agents/role-design-author.md +215 -0
  192. package/.agy/agents/ui-design-agent.md +1 -18
  193. package/.agy/agents/workflow-analyzer.md +1 -1
  194. package/.agy/agents/workflow-external-researcher.md +1 -1
  195. package/.agy/skills/maestro/SKILL.md +63 -27
  196. package/.agy/skills/maestro-analyze/SKILL.md +30 -4
  197. package/.agy/skills/maestro-blueprint/SKILL.md +132 -0
  198. package/.agy/skills/maestro-brainstorm/SKILL.md +119 -103
  199. package/.agy/skills/maestro-help/SKILL.md +48 -14
  200. package/.agy/skills/maestro-help/index/catalog.json +29 -11
  201. package/.agy/skills/maestro-help/phases/01-parse-intent.md +1 -1
  202. package/.agy/skills/maestro-help/phases/02-search-present.md +6 -4
  203. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  204. package/.agy/skills/maestro-init/SKILL.md +3 -3
  205. package/.agy/skills/maestro-milestone-audit/SKILL.md +5 -3
  206. package/.agy/skills/maestro-milestone-complete/SKILL.md +7 -5
  207. package/.agy/skills/maestro-plan/SKILL.md +14 -4
  208. package/.agy/skills/maestro-ralph/SKILL.md +368 -162
  209. package/.agy/skills/maestro-ralph-execute/SKILL.md +81 -67
  210. package/.agy/skills/maestro-roadmap/SKILL.md +42 -81
  211. package/.agy/skills/quality-auto-test/SKILL.md +1 -1
  212. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  213. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  214. package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  215. package/.agy/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  216. package/.agy/skills/team-lifecycle-v4/templates/epics.md +2 -2
  217. package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  218. package/.agy/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  219. package/.claude/agents/cli-explore-agent.md +1 -3
  220. package/.claude/agents/cross-role-reviewer.md +171 -0
  221. package/.claude/agents/role-design-author.md +216 -0
  222. package/.claude/agents/ui-design-agent.md +1 -18
  223. package/.claude/agents/workflow-analyzer.md +1 -1
  224. package/.claude/agents/workflow-external-researcher.md +1 -1
  225. package/.claude/commands/maestro-analyze.md +30 -4
  226. package/.claude/commands/maestro-blueprint.md +130 -0
  227. package/.claude/commands/maestro-brainstorm.md +132 -116
  228. package/.claude/commands/maestro-init.md +3 -3
  229. package/.claude/commands/maestro-milestone-audit.md +5 -3
  230. package/.claude/commands/maestro-milestone-complete.md +7 -5
  231. package/.claude/commands/maestro-plan.md +14 -4
  232. package/.claude/commands/maestro-ralph-execute.md +81 -67
  233. package/.claude/commands/maestro-ralph.md +368 -162
  234. package/.claude/commands/maestro-roadmap.md +42 -81
  235. package/.claude/commands/maestro.md +63 -27
  236. package/.claude/commands/quality-auto-test.md +1 -1
  237. package/.claude/skills/maestro-help/SKILL.md +48 -14
  238. package/.claude/skills/maestro-help/index/catalog.json +29 -11
  239. package/.claude/skills/maestro-help/phases/01-parse-intent.md +1 -1
  240. package/.claude/skills/maestro-help/phases/02-search-present.md +6 -4
  241. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  242. package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  243. package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  244. package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  245. package/.claude/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  246. package/.claude/skills/team-lifecycle-v4/templates/epics.md +2 -2
  247. package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  248. package/.claude/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  249. package/.codex/skills/maestro/SKILL.md +84 -41
  250. package/.codex/skills/maestro-amend/SKILL.md +157 -0
  251. package/.codex/skills/maestro-analyze/SKILL.md +71 -23
  252. package/.codex/skills/maestro-blueprint/SKILL.md +122 -0
  253. package/.codex/skills/maestro-brainstorm/SKILL.md +135 -45
  254. package/.codex/skills/maestro-composer/SKILL.md +1 -1
  255. package/.codex/skills/maestro-execute/SKILL.md +13 -4
  256. package/.codex/skills/maestro-help/SKILL.md +28 -18
  257. package/.codex/skills/maestro-help/catalog.json +29 -11
  258. package/.codex/skills/maestro-init/SKILL.md +7 -7
  259. package/.codex/skills/maestro-plan/SKILL.md +27 -9
  260. package/.codex/skills/maestro-ralph/SKILL.md +740 -491
  261. package/.codex/skills/maestro-roadmap/SKILL.md +55 -72
  262. package/.codex/skills/maestro-update/SKILL.md +169 -0
  263. package/.codex/skills/maestro-verify/SKILL.md +11 -2
  264. package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -2
  265. package/.codex/skills/manage-harvest/SKILL.md +10 -2
  266. package/.codex/skills/quality-retrospective/SKILL.md +9 -2
  267. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
  268. package/.codex/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  269. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  270. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  271. package/.codex/skills/team-lifecycle-v4/templates/epics.md +2 -2
  272. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  273. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  274. package/README.md +8 -8
  275. package/README.zh-CN.md +8 -8
  276. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +3 -3
  277. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  278. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  279. package/dist/src/agents/cli-agent-runner.js +13 -7
  280. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  281. package/dist/src/commands/install-backend.d.ts +12 -0
  282. package/dist/src/commands/install-backend.d.ts.map +1 -1
  283. package/dist/src/commands/install-backend.js +144 -0
  284. package/dist/src/commands/install-backend.js.map +1 -1
  285. package/dist/src/commands/spec.d.ts.map +1 -1
  286. package/dist/src/commands/spec.js +8 -1
  287. package/dist/src/commands/spec.js.map +1 -1
  288. package/dist/src/core/component-defs.d.ts +6 -0
  289. package/dist/src/core/component-defs.d.ts.map +1 -1
  290. package/dist/src/core/component-defs.js +97 -0
  291. package/dist/src/core/component-defs.js.map +1 -1
  292. package/dist/src/tools/spec-init.d.ts +16 -2
  293. package/dist/src/tools/spec-init.d.ts.map +1 -1
  294. package/dist/src/tools/spec-init.js +58 -187
  295. package/dist/src/tools/spec-init.js.map +1 -1
  296. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  297. package/dist/src/tools/spec-loader.js +16 -16
  298. package/dist/src/tools/spec-loader.js.map +1 -1
  299. package/dist/src/tools/spec-seeds.d.ts +33 -0
  300. package/dist/src/tools/spec-seeds.d.ts.map +1 -0
  301. package/dist/src/tools/spec-seeds.js +200 -0
  302. package/dist/src/tools/spec-seeds.js.map +1 -0
  303. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  304. package/dist/src/tools/spec-writer.js +7 -9
  305. package/dist/src/tools/spec-writer.js.map +1 -1
  306. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts +11 -0
  307. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts.map +1 -0
  308. package/dist/src/tui/install-ui/ExtraMcpConfig.js +61 -0
  309. package/dist/src/tui/install-ui/ExtraMcpConfig.js.map +1 -0
  310. package/dist/src/tui/install-ui/InstallConfirm.d.ts +3 -0
  311. package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
  312. package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
  313. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  314. package/dist/src/tui/install-ui/InstallExecution.d.ts +2 -0
  315. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  316. package/dist/src/tui/install-ui/InstallExecution.js +14 -2
  317. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  318. package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
  319. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  320. package/dist/src/tui/install-ui/InstallFlow.js +16 -3
  321. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  322. package/dist/src/tui/install-ui/InstallHub.d.ts +2 -0
  323. package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
  324. package/dist/src/tui/install-ui/InstallHub.js +8 -0
  325. package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
  326. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
  327. package/dist/src/tui/install-ui/InstallResult.js +3 -1
  328. package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
  329. package/dist/src/utils/update-notices.js +31 -0
  330. package/dist/src/utils/update-notices.js.map +1 -1
  331. package/package.json +5 -2
  332. package/templates/business-test-report.json +1 -1
  333. package/templates/index.json +1 -1
  334. package/templates/roadmap.md +15 -9
  335. package/templates/state.json +18 -17
  336. package/workflows/analyze.md +79 -11
  337. package/workflows/auto-test.md +6 -6
  338. package/workflows/blueprint.md +431 -0
  339. package/workflows/brainstorm.md +603 -496
  340. package/workflows/business-test.md +7 -7
  341. package/workflows/codebase-rebuild.md +4 -4
  342. package/workflows/harvest.md +184 -10
  343. package/workflows/init.md +9 -8
  344. package/workflows/maestro.md +1 -1
  345. package/workflows/milestone-audit.md +12 -4
  346. package/workflows/milestone-complete.md +11 -6
  347. package/workflows/plan.md +88 -22
  348. package/workflows/roadmap-common.md +1 -1
  349. package/workflows/roadmap.md +13 -3
  350. package/workflows/spec-generate.md +24 -13
  351. package/workflows/ui-design.md +2 -2
  352. package/workflows/ui-style.md +1 -1
  353. package/.agy/agents/conceptual-planning-agent.md +0 -244
  354. package/.claude/agents/conceptual-planning-agent.md +0 -245
@@ -28,10 +28,10 @@ Generator-Critic loop: max 3 iterations per layer to distinguish test defects fr
28
28
  **Load spec package:**
29
29
 
30
30
  ```
31
- 1. Read ${PHASE_DIR}/index.json -> extract spec_ref (if present)
32
- 2. IF --spec provided: SPEC_DIR = .workflow/.spec/{spec_ref}/
33
- ELSE IF index.json.spec_ref: SPEC_DIR = .workflow/.spec/{spec_ref}/
34
- ELSE: try .workflow/.spec/SPEC-*/ (most recent)
31
+ 1. Read ${PHASE_DIR}/index.json -> extract blueprint_ref (if present)
32
+ 2. IF --spec provided: SPEC_DIR = .workflow/blueprint/{blueprint_ref}/
33
+ ELSE IF index.json.blueprint_ref: SPEC_DIR = .workflow/blueprint/{blueprint_ref}/
34
+ ELSE: try .workflow/blueprint/SPEC-*/ (most recent)
35
35
 
36
36
  3. IF SPEC_DIR found:
37
37
  - Read requirements/_index.md (requirement summary + traceability matrix)
@@ -189,7 +189,7 @@ Write `business-test-plan.json` to `.tests/business/`:
189
189
  ```json
190
190
  {
191
191
  "phase": "{phase}",
192
- "spec_ref": "{SPEC_DIR name or 'degraded'}",
192
+ "blueprint_ref": "{SPEC_DIR name or 'degraded'}",
193
193
  "spec_mode": "full|degraded",
194
194
  "generated_at": "{ISO timestamp}",
195
195
  "layers": {
@@ -363,7 +363,7 @@ Write `.tests/business/business-test-report.json`:
363
363
  ```json
364
364
  {
365
365
  "phase": "{phase}",
366
- "spec_ref": "{spec reference}",
366
+ "blueprint_ref": "{spec reference}",
367
367
  "spec_mode": "full|degraded",
368
368
  "completed_at": "{ISO timestamp}",
369
369
  "execution_mode": "gen-code|agent",
@@ -432,7 +432,7 @@ Write `.tests/business/business-test-summary.md`:
432
432
  ```markdown
433
433
  ---
434
434
  phase: {phase}
435
- spec_ref: {spec reference}
435
+ blueprint_ref: {spec reference}
436
436
  completed_at: {ISO timestamp}
437
437
  verdict: passed|gaps_found
438
438
  ---
@@ -72,7 +72,7 @@ Used in Step 2-4 to produce architecture-aware documentation.
72
72
 
73
73
  ```
74
74
  Group components into features by:
75
- directory proximity, naming patterns, import relationships, .spec/ mapping.
75
+ directory proximity, naming patterns, import relationships, blueprint/ mapping.
76
76
 
77
77
  For each feature group: derive name, collect component IDs, map requirements and phase.
78
78
  Build feature entry:
@@ -91,7 +91,7 @@ Back-fill component.feature_ids with assigned feature IDs.
91
91
  ### Step 4: Map Requirements (if .spec exist)
92
92
 
93
93
  ```
94
- If .workflow/.spec/ exist: parse each SPEC-*/requirements/REQ-*.md,
94
+ If .workflow/blueprint/ exist: parse each SPEC-*/requirements/REQ-*.md,
95
95
  match to features by keyword analysis. Build requirement entry:
96
96
  {
97
97
  "id": "REQ-{NNN}",
@@ -102,13 +102,13 @@ match to features by keyword analysis. Build requirement entry:
102
102
  "acceptance_criteria": ["{criteria}"]
103
103
  }
104
104
 
105
- If no .spec: requirements = [] (populated later by spec-generate).
105
+ If no blueprint: requirements = [] (populated later by maestro-blueprint).
106
106
  ```
107
107
 
108
108
  ### Step 5: Record Architecture Decisions (if ADRs exist)
109
109
 
110
110
  ```
111
- If .workflow/.spec/*/architecture/ADR-*.md exist: parse each ADR,
111
+ If .workflow/blueprint/*/architecture/ADR-*.md exist: parse each ADR,
112
112
  map to components by keyword analysis. Build ADR entry:
113
113
  {
114
114
  "id": "ADR-{NNN}",
@@ -9,7 +9,7 @@ Unlike `retrospective.md` which is phase-scoped and post-execution, harvest oper
9
9
  ## Prerequisites
10
10
 
11
11
  - `.workflow/` initialized (`.workflow/state.json` exists)
12
- - At least one artifact source present (analysis, brainstorm, debug, lite-plan, lite-fix, scratchpad, or active session)
12
+ - At least one artifact source present (analysis, brainstorm, import, debug, lite-plan, lite-fix, scratchpad, or active session)
13
13
  - For wiki routing: `maestro wiki` CLI available
14
14
 
15
15
  ---
@@ -27,16 +27,21 @@ Unlike `retrospective.md` which is phase-scoped and post-execution, harvest oper
27
27
  /manage-harvest <target> --to issue → force all findings to issue
28
28
  /manage-harvest <target> --to auto → auto-classify routing (default)
29
29
  /manage-harvest <target> --dry-run → preview without writing
30
+ /manage-harvest --prune → classify artifacts, graduate to knowhow, archive from state.json
31
+ /manage-harvest --prune --age 14 → only graduate artifacts older than 14 days
32
+ /manage-harvest --prune --dry-run → preview prune plan without modifying state.json
30
33
  ```
31
34
 
32
35
  | Flag | Effect |
33
36
  |------|--------|
34
37
  | `--to <target>` | Force routing target: `wiki`, `spec`, `issue`, `auto` (default: auto) |
35
- | `--source <type>` | Filter by source type: `analysis`, `brainstorm`, `debug`, `lite-plan`, `lite-fix`, `scratchpad`, `session`, `all` |
38
+ | `--source <type>` | Filter by source type: `analysis`, `brainstorm`, `import`, `debug`, `lite-plan`, `lite-fix`, `scratchpad`, `session`, `all` |
36
39
  | `--recent N` | Only scan artifacts updated within last N days (default: 30) |
37
40
  | `--dry-run` | Preview extracted items without writing to any store |
38
41
  | `-y` / `--yes` | Skip confirmation prompts, accept all routing |
39
42
  | `--min-confidence N` | Minimum extraction confidence 0.0-1.0 (default: 0.5) |
43
+ | `--prune` | State hygiene mode: classify artifacts, graduate harvested ones to knowhow, archive from state.json, prune accumulated_context |
44
+ | `--age N` | Graduation age threshold in days (default: 14). Only artifacts older than N days are prune candidates. Used with `--prune` |
40
45
 
41
46
  ---
42
47
 
@@ -44,10 +49,11 @@ Unlike `retrospective.md` which is phase-scoped and post-execution, harvest oper
44
49
 
45
50
  ```
46
51
  Verify .workflow/ exists (else E001). Parse flags and first non-flag token:
47
- mode: "scan" (no target) | "session" (ID match) | "path" (explicit path)
52
+ mode: "scan" (no target) | "session" (ID match) | "path" (explicit path) | "prune" (--prune flag)
48
53
  Defaults: target_filter=auto, source_filter=all, recent_days=30,
49
- dry_run=false, auto_yes=false, min_confidence=0.5
54
+ dry_run=false, auto_yes=false, min_confidence=0.5, age_threshold=14
50
55
  Invalid --to → E002. Invalid --source → E003.
56
+ If --prune: mode = "prune", jump to Stage 9 (skip Stages 2-8).
51
57
  ```
52
58
 
53
59
  ---
@@ -61,12 +67,13 @@ Scan `.workflow/` for harvestable artifacts. Each source type has a known struct
61
67
  | Source Type | Scan Path | Key Files | ID Pattern |
62
68
  |-------------|-----------|-----------|------------|
63
69
  | `analysis` | `.workflow/.analysis/ANL-*/` | `conclusions.json`, `*.md` | `ANL-*` |
64
- | `brainstorm` | `.workflow/scratch/brainstorm-*/` | `guidance-specification.md`, `brainstorm-*.md` | directory name |
70
+ | `brainstorm` | `.workflow/scratch/brainstorm-*/` | `guidance-specification.md`, `*/analysis.md`, `design-research.md` | directory name |
65
71
  | `lite-plan` | `.workflow/.lite-plan/*/` | `plan.json`, `plan-overview.md` | directory name |
66
72
  | `lite-fix` | `.workflow/.lite-fix/*/` | `fix-plan.json` | directory name |
67
73
  | `debug` | `.workflow/.debug/*/` | `debug-log.md`, `hypothesis-*.md` | directory name |
68
74
  | `scratchpad` | `.workflow/.scratchpad/` | `*.md`, `*.json` | filename |
69
75
  | `session` | `.workflow/active/WFS-*/` | `workflow-session.json` | `WFS-*` |
76
+ | `import` | `.workflow/scratch/*-import-*/` | `context-package.json`, `source.*` | directory name |
70
77
  | `knowhow` | `.workflow/knowhow/` | `*.md`, `digest-*.md` | filename |
71
78
 
72
79
  Scan each source type (filtered by `--source`). For each matching directory/file within `--recent` window, extract: `source_type`, `id`, `path`, `title` (from JSON or H1), `updated_at`, `summary`, `file_count`.
@@ -125,11 +132,17 @@ Parse content to identify discrete knowledge items. Each source type has specifi
125
132
  - `risks[]` → each risk is a fragment
126
133
  - Markdown sections with `## ` headings → section-level fragments
127
134
 
128
- **Brainstorm (`guidance-specification.md` + notes):**
129
- - `## Options` or `## Approaches` → each option is a fragment
130
- - `## Decision` or `## Recommendation`decision fragment
131
- - `## Trade-offs`trade-off fragments
132
- - Action items (lines starting with `- [ ]` or `TODO`) task fragments
135
+ **Brainstorm (`guidance-specification.md` + `{role}/analysis.md` + `design-research.md`):**
136
+ - guidance §4-§N Role Decisions tables → each row is a decision fragment
137
+ - guidance §10 Feature Decomposition rowseach feature is a fragment
138
+ - guidance §12 Cross-Role Resolutions table each resolution is a decision fragment
139
+ - `{role}/analysis.md` §2 Decision Digest tables decision / interface / position fragments by role
140
+ - `{role}/analysis.md` §3 Cross-Cutting Foundations subsections → architectural / data-model / pitfall fragments by role
141
+ - `{role}/analysis.md` §4 File Index → navigate to sub-files:
142
+ - `{role}/analysis-F-{id}-{slug}.md` → per-feature decision fragments (one file = one fragment)
143
+ - `{role}/findings-{slug}.md` → finding / discovery fragments
144
+ - `{role}/analysis.md` §5 Outstanding TODOs → task fragments
145
+ - `design-research.md` "Extractable Patterns" sections → pattern reference fragments
133
146
 
134
147
  **Lite-plan (`plan.json`):**
135
148
  - `tasks[]` → each with rationale → decision fragments
@@ -141,6 +154,14 @@ Parse content to identify discrete knowledge items. Each source type has specifi
141
154
  - `fix_strategy` → pattern fragment
142
155
  - `verification` → test/validation fragment
143
156
 
157
+ **Import (`context-package.json` + `source.*`):**
158
+ - `requirements[]` → each requirement is a feature fragment
159
+ - `constraints[]` → each constraint is a decision fragment
160
+ - `non_goals[]` → each non-goal is a scope fragment
161
+ - `insights[]` → each insight is a knowledge fragment
162
+ - `domain.terminology[]` → each term is a terminology fragment
163
+ - `open_questions[]` → each question is a task/investigation fragment
164
+
144
165
  **Debug (`debug-log.md`, `hypothesis-*.md`):**
145
166
  - Final diagnosis → bug fragment
146
167
  - Verified hypothesis → pattern/knowhow fragment
@@ -174,6 +195,8 @@ fragment = {
174
195
 
175
196
  Filter by `--min-confidence`.
176
197
 
198
+ **Context Package shortcut**: If any artifact has a `context-package.json` (check `state.json.artifacts[].context_package`), harvest can use it as a pre-extracted summary — skip detailed file parsing and directly convert context-package fields to fragments. The per-item `ref` field provides traceability to original sources.
199
+
177
200
  ---
178
201
 
179
202
  ## Stage 4: classify_routing
@@ -351,3 +374,154 @@ Next:
351
374
  → Connect wiki graph: Skill({ skill: "wiki-connect", args: "--fix" })
352
375
  → View specs: Skill({ skill: "spec-load", args: "--role implement" })
353
376
  ```
377
+
378
+ ---
379
+
380
+ ## Stage 9: state_hygiene (--prune)
381
+
382
+ When `--prune` flag is present, skip Stages 2-8 and run state.json hygiene instead. Manages three concerns: **artifact graduation** (harvested → archived via knowhow), **accumulated_context pruning** (remove resolved/stale entries), and **integrity validation**.
383
+
384
+ ### 9a. Load state
385
+
386
+ ```
387
+ Read .workflow/state.json → { artifacts[], accumulated_context{}, current_milestone, milestones[] }
388
+ Read .workflow/harvest/harvest-log.jsonl → build harvested_map: { [source_id]: { fragment_count, routed_count, last_harvested } }
389
+ Defaults: age_threshold = --age value (default 14 days), dry_run = --dry-run flag
390
+ ```
391
+
392
+ ### 9b. Classify artifacts
393
+
394
+ For each artifact in `artifacts[]`, assign a classification:
395
+
396
+ | Classification | Criteria | Action |
397
+ |---|---|---|
398
+ | `active` | milestone == current_milestone OR age < age_threshold OR referenced by active plan (type=plan, status=completed, linked execute not completed) | **Keep** in artifacts[] |
399
+ | `graduated` | harvested == true AND not active | **Graduate** → knowhow → archive |
400
+ | `stale` | harvested == false AND not active AND age > age_threshold | **Suggest** harvest first |
401
+ | `protected` | type ∈ {plan, execute} AND linked downstream artifact is active | **Keep** regardless of age |
402
+
403
+ Age = days since `completed_at` (or `created_at` if never completed).
404
+
405
+ "Referenced by active plan": artifact X is protected if any plan artifact has `depends_on == X.id` or any execute artifact in same phase is active.
406
+
407
+ ### 9c. Classify accumulated_context
408
+
409
+ Scan `accumulated_context` sub-arrays:
410
+
411
+ | Field | Prune Criteria | Keep Criteria |
412
+ |---|---|---|
413
+ | `key_decisions[]` | Entry exists verbatim in `specs/architecture-constraints.md` (deduplicated to spec) | Not yet in specs |
414
+ | `deferred[]` | status ∈ {"resolved", "cancelled", "superseded"} | status ∈ {"open", "deferred"} |
415
+ | `blockers[]` | status == "resolved" | status ∈ {"open", "investigating"} |
416
+
417
+ ### 9d. Preview
418
+
419
+ ```
420
+ === STATE HYGIENE PLAN ===
421
+
422
+ Artifacts (23 total):
423
+ active: 8 (keep)
424
+ graduated: 11 (→ knowhow → archive)
425
+ stale: 3 (suggest harvest first)
426
+ protected: 1 (keep)
427
+
428
+ Accumulated Context:
429
+ key_decisions: 12 total → 4 prunable (already in specs)
430
+ deferred: 5 total → 2 prunable (resolved)
431
+ blockers: 3 total → 1 prunable (resolved)
432
+
433
+ Stale artifacts (not yet harvested):
434
+ ANL-003 analysis 2026-03-15 "Security audit P2"
435
+ BRN-002 brainstorm 2026-03-10 "Cache strategy"
436
+ WFS-005 session 2026-03-08 "Feature toggle impl"
437
+ → Run: /manage-harvest ANL-003 BRN-002 WFS-005 (harvest before graduating)
438
+
439
+ Estimated state.json reduction: 23 → 9 artifacts, 20 → 13 context entries
440
+ ```
441
+
442
+ `--dry-run` → display and exit. Otherwise (unless `-y`), AskUserQuestion:
443
+ - "Proceed" — apply all
444
+ - "Graduate only" — archive graduated artifacts, skip accumulated_context prune
445
+ - "Harvest stale first" — run harvest on stale artifacts, then re-classify
446
+ - "Abort"
447
+
448
+ ### 9e. Graduate to knowhow
449
+
450
+ For each `graduated` artifact:
451
+
452
+ 1. **Build compact summary** from harvest-log entries:
453
+ - Fragment count, routing breakdown (N wiki, N spec, N issue)
454
+ - Top 3 fragment titles as representative items
455
+ - Original path for disk reference
456
+
457
+ 2. **Create knowhow entry**:
458
+ ```bash
459
+ maestro wiki create --type knowhow \
460
+ --slug "graduated-{type}-{short_id}" \
461
+ --title "Graduated: {type} {id}" \
462
+ --tags "graduated,{type},{milestone}" \
463
+ --body "{compact_summary}"
464
+ ```
465
+
466
+ 3. **Archive in state.json**: Move from `artifacts[]` to `artifact_archive[]`:
467
+ ```json
468
+ {
469
+ "id": "ANL-001",
470
+ "type": "analyze",
471
+ "milestone": "M1",
472
+ "path": "scratch/20260315-analyze-P2-security",
473
+ "graduated_at": "ISO-8601",
474
+ "knowhow_ref": "graduated-analyze-ANL-001",
475
+ "summary": "Security audit P2 — 8 fragments → 3 wiki, 2 spec, 3 issue"
476
+ }
477
+ ```
478
+
479
+ 4. **Files on disk**: NOT deleted. The `.workflow/{path}/` directory remains for reference. Only the state.json entry moves.
480
+
481
+ ### 9f. Prune accumulated_context
482
+
483
+ For each prunable entry identified in 9c:
484
+ - `key_decisions[]`: remove entry, log `[PRUNE] key_decision: "{text}" (deduplicated to spec)`
485
+ - `deferred[]`: remove entry, log `[PRUNE] deferred: "{title}" (status: {status})`
486
+ - `blockers[]`: remove entry, log `[PRUNE] blocker: "{title}" (resolved)`
487
+
488
+ ### 9g. Apply
489
+
490
+ 1. **Backup**: Copy `state.json` → `state.json.backup-prune-{timestamp}`
491
+ 2. **Write**: Updated state.json with:
492
+ - `artifacts[]` = active + protected entries only
493
+ - `artifact_archive[]` = existing archive + newly graduated
494
+ - `accumulated_context` = pruned version
495
+ - `last_pruned`: ISO-8601 timestamp
496
+ 3. **Validate**: Re-read and confirm artifact count matches expected
497
+
498
+ ### 9h. Report
499
+
500
+ Append prune results to harvest report:
501
+
502
+ ```
503
+ === PRUNE COMPLETE ===
504
+
505
+ Graduated: 11 artifacts → knowhow
506
+ Archived: 11 entries moved to artifact_archive[]
507
+ Pruned: 4 key_decisions + 2 deferred + 1 blocker = 7 context entries
508
+
509
+ State reduction: 23 → 9 artifacts, 20 → 13 context entries
510
+ Backup: .workflow/state.json.backup-prune-20260521T143022
511
+
512
+ Stale (not harvested, action needed):
513
+ → /manage-harvest ANL-003 BRN-002 WFS-005
514
+
515
+ Next:
516
+ → Review graduated knowhow: maestro wiki list --type knowhow --tags graduated
517
+ → Re-run prune after harvesting stale: /manage-harvest --prune
518
+ ```
519
+
520
+ ### Safety invariants
521
+
522
+ 1. **Never prune current milestone artifacts** — active classification takes precedence
523
+ 2. **Never delete files on disk** — only state.json entries move; files remain for reference/audit
524
+ 3. **Backup before write** — always create `state.json.backup-prune-{timestamp}`
525
+ 4. **Stale before graduate** — stale artifacts are flagged, not silently archived (knowledge would be lost)
526
+ 5. **Spec dedup is conservative** — key_decision pruned only if verbatim match found in specs
527
+ 6. **Idempotent** — re-running `--prune` with no changes produces empty plan
package/workflows/init.md CHANGED
@@ -42,13 +42,14 @@ state.json exists → Path C (existing) | source files exist → Path B (brownfi
42
42
  - "Keep exploring" → continue questioning
43
43
 
44
44
  If `--auto` flag: skip interactive questioning, extract from @ referenced document.
45
- If `--from-brainstorm SESSION-ID`:
46
- - Locate brainstorm session directory (`.workflow/scratch/brainstorm-*/`)
47
- - Read `guidance-specification.md`:
48
- - Problem statement → project vision + core value
49
- - Features → project goals (Active requirements)
50
- - Non-goalsconstraints + Out of Scope requirements
51
- - Terminologyproject glossary context
45
+ If `--from <source>` (alias: `--from-brainstorm`):
46
+ - Locate source directory (`.workflow/scratch/brainstorm-*/`, `.workflow/scratch/*-import-*/`, etc.)
47
+ - Load `context-package.json` (preferred) or fall back to `guidance-specification.md`:
48
+ - `domain` (name, description, problem_statement) → project vision + core value
49
+ - `requirements[]` → project goals (Active requirements)
50
+ - `constraints[locked]`key decisions
51
+ - `non_goals[]`constraints + Out of Scope requirements
52
+ - `domain.terminology[]` → project glossary context
52
53
  - Skip interactive questioning (context already gathered)
53
54
 
54
55
  2. **Workflow Preferences** -- Configure project workflow settings:
@@ -86,7 +87,7 @@ state.json exists → Path C (existing) | source files exist → Path B (brownfi
86
87
  - "Skip mapping" → proceed
87
88
  4. Run Workflow Preferences (same as Path A step 2) → `.workflow/config.json`
88
89
  5. Ask user for project vision, goals, constraints (same deep questioning as Path A step 1)
89
- - If `--from-brainstorm SESSION-ID`: extract from guidance-specification.md (skip questioning)
90
+ - If `--from <source>` (alias: `--from-brainstorm`): load context-package.json (skip questioning)
90
91
  - For brownfield: infer Validated requirements from existing code (what does codebase already do?)
91
92
  6. Create `.workflow/project.md` (include inferred Validated requirements + new Active requirements)
92
93
 
@@ -424,7 +424,7 @@ detectNextAction(state):
424
424
  | Chain | Steps | Use Case |
425
425
  |-------|-------|----------|
426
426
  | `full-lifecycle` | plan → execute → verify → review → test → audit | Full milestone completion |
427
- | `spec-driven` | init → spec-generate → plan → execute → verify | From idea/requirements (heavy) |
427
+ | `blueprint-driven` | init → blueprint → plan → execute → verify | From idea/requirements (heavy) |
428
428
  | `roadmap-driven` | init → roadmap → plan → execute → verify | From requirements (light) |
429
429
  | `brainstorm-driven` | brainstorm → plan → execute → verify | From exploration |
430
430
  | `impeccable-build` | impeccable --chain build → plan → execute → verify | From design system generation |
@@ -8,19 +8,27 @@ Cross-phase integration audit for milestone completion. Based on artifact regist
8
8
 
9
9
  1. Read `.workflow/state.json`:
10
10
  - Determine target milestone (from $ARGUMENTS or current_milestone)
11
+ - If no milestone: ERROR E001
11
12
  - Get `artifacts[]` array
13
+ - Resolve milestone object from `milestones[]` by id
14
+ - Determine milestone type: `milestone_obj.type` (default `"standard"` if field missing)
12
15
 
13
- 2. Parse `.workflow/roadmap.md` to identify all phases belonging to this milestone
16
+ 2. **Standard milestone** (`type != "adhoc"`):
17
+ - Parse `.workflow/roadmap.md` to identify all phases belonging to this milestone
14
18
 
15
- 3. Group milestone artifacts by type `analyze_artifacts`, `plan_artifacts`, `execute_artifacts`, `verify_artifacts`
19
+ 3. **Adhoc milestone** (`type == "adhoc"`):
20
+ - Skip roadmap.md parsing (roadmap may not exist)
21
+ - Phases are defined by `milestone_obj.phases[]` (typically `[1]` with slug `"standalone"`)
22
+
23
+ 4. Group milestone artifacts by type → `analyze_artifacts`, `plan_artifacts`, `execute_artifacts`, `verify_artifacts`
16
24
 
17
25
  ---
18
26
 
19
27
  ## Step 2: Phase Coverage Check
20
28
 
21
- Parse roadmap.md phases for this milestone. For each phase, verify completed artifacts exist for analyze, plan, and execute types.
29
+ **Standard milestone**: Parse roadmap.md phases for this milestone. For each phase, verify completed artifacts exist for analyze, plan, and execute types. WARN if any phase is missing its execute artifact: "Phase {number} ({title}) missing execute artifact"
22
30
 
23
- WARN if any phase is missing its execute artifact: "Phase {number} ({title}) missing execute artifact"
31
+ **Adhoc milestone**: Skip phase-level coverage check (no roadmap phases to validate). Instead, verify that at least one complete artifact chain exists: plan artifact (PLN) + execute artifact (EXC) with matching milestone ID. WARN if no execute artifact found.
24
32
 
25
33
  ---
26
34
 
@@ -9,6 +9,8 @@ Archive completed milestone, move artifacts to history, and prepare for next.
9
9
  1. Read `.workflow/state.json`:
10
10
  - Determine target milestone (from $ARGUMENTS or current_milestone)
11
11
  - If no milestone: ERROR E001
12
+ - Resolve milestone object from `milestones[]` by id
13
+ - Determine milestone type: `milestone_obj.type` (default `"standard"` if field missing)
12
14
 
13
15
  2. Check milestone audit status:
14
16
  - Read `.workflow/milestones/{milestone}/audit-report.md` if exists
@@ -30,9 +32,8 @@ Archive completed milestone, move artifacts to history, and prepare for next.
30
32
  ```
31
33
 
32
34
  2. Snapshot roadmap:
33
- ```
34
- cp .workflow/roadmap.md .workflow/milestones/{milestone}/roadmap-snapshot.md
35
- ```
35
+ - **Standard milestone**: `cp .workflow/roadmap.md .workflow/milestones/{milestone}/roadmap-snapshot.md`
36
+ - **Adhoc milestone**: Skip roadmap snapshot (roadmap may not exist)
36
37
 
37
38
  3. Archive scratch directories: copy each milestone artifact's `.workflow/{artifact.path}` to `.workflow/milestones/{milestone}/artifacts/{basename}/`
38
39
 
@@ -91,7 +92,9 @@ Check existing entries to avoid duplicates when appending in Step 3.
91
92
 
92
93
  2. Clear artifacts array: remove all entries where `milestone == target_milestone`
93
94
 
94
- 3. Advance to next milestone: activate first pending milestone → set as `current_milestone`. If none pending → set `current_milestone = null`, `status = "completed"`
95
+ 3. Advance to next milestone:
96
+ - **Standard milestone**: activate first pending milestone → set as `current_milestone`. If none pending → set `current_milestone = null`, `status = "completed"`
97
+ - **Adhoc milestone**: Do NOT search for next milestone. Set `current_milestone = null`, `status = "idle"` (adhoc milestones are self-contained, no successor)
95
98
 
96
99
  4. Write state.json (atomic)
97
100
 
@@ -135,10 +138,12 @@ Artifacts: {count} archived
135
138
  Learnings: {learnings_count} extracted
136
139
 
137
140
  Archive: .workflow/milestones/{milestone}/
138
- Next: {next_milestone or "Project complete"}
141
+ Next: {next_milestone or "Project complete" or "Ad-hoc task complete"}
139
142
 
140
143
  Next steps:
141
144
  /maestro-milestone-release -- Cut a release
142
- /maestro-analyze -- Start next milestone
145
+ /maestro-analyze -- Start next milestone (standard only)
143
146
  /manage-status -- View project state
144
147
  ```
148
+
149
+ **Adhoc milestone note:** When completing an adhoc milestone, the "Next steps" section omits "Start next milestone" since adhoc milestones have no successor in a roadmap chain.
package/workflows/plan.md CHANGED
@@ -18,22 +18,68 @@ All output goes to `.workflow/scratch/plan-{slug}-{date}/`.
18
18
  ## Scope Resolution
19
19
 
20
20
  ```
21
- Input: [phase] argument OR --dir <path>
21
+ Input: [phase] argument OR --dir <path> OR --from <source>
22
22
 
23
23
  Worktree guard: reject if phase not in .workflow/worktree-scope.json owned_phases
24
24
  Auto-bootstrap: create minimal state.json if missing
25
25
 
26
- Resolution priority:
27
- --dir <path> → CONTEXT_DIR = path, scope from state.json artifact or "standalone"
28
- no arguments → scope = "milestone", CONTEXT_DIR = latest analyze artifact for current_milestone
29
- (ERROR E001 if no roadmap)
30
- numeric arg → scope = "phase", resolve PHASE_SLUG from roadmap.md,
31
- CONTEXT_DIR = latest analyze artifact for phase
32
- (ERROR if no init + roadmap)
26
+ Resolution priority (highest to lowest):
27
+ 1. --from analyze:ANL-xxx → CONTEXT_DIR = artifact path, scope = "standalone"
28
+ Uses analyze conclusions.implementation_scope to seed task generation
29
+ 2. --from blueprint:BLP-xxx CONTEXT_DIR = blueprint path, scope = "standalone"
30
+ Uses blueprint requirements + architecture to seed task generation
31
+ 3. --from <other> (@file, path/) load context-package.json from path, scope = "standalone"
32
+ 4. --dir <path> → CONTEXT_DIR = path, scope from state.json artifact or "standalone"
33
+ 5. no arguments + roadmap → scope = "milestone", CONTEXT_DIR = latest analyze artifact for current_milestone
34
+ (ERROR E001 if no roadmap)
35
+ 6. numeric arg → scope = "phase", resolve PHASE_SLUG from roadmap.md,
36
+ CONTEXT_DIR = latest analyze artifact for phase
37
+ (ERROR if no init + roadmap)
38
+ 7. no arguments + no roadmap → search state.json for latest analyze artifact
39
+ Found → scope = "standalone", CONTEXT_DIR = artifact path
40
+ Not found → ERROR E001
41
+
42
+ Phase-to-Milestone resolution (when scope="phase"):
43
+ FOR each ms in state.json.milestones[]:
44
+ IF phase_number in ms.phases[]:
45
+ target_milestone = ms.id
46
+ BREAK
47
+ IF no match: target_milestone = current_milestone (fallback)
48
+
49
+ Use target_milestone (not current_milestone) for:
50
+ - artifact registration (P5 Step 4 milestone field)
51
+ - collision detection scope (P4.5)
52
+ - prior artifact lookups
53
+
54
+ OUTPUT_DIR = .workflow/scratch/{YYYYMMDD}-plan-[P{N}-|M{N}-]{slug}/
55
+ ```
56
+
57
+ ### Ad-hoc Milestone Auto-Creation (D-008)
58
+
59
+ When plan resolves to `scope == "standalone"` AND `state.json.current_milestone == null`:
33
60
 
34
- OUTPUT_DIR = .workflow/scratch/plan-{PHASE_SLUG or milestone_slug}-{date}/
61
+ ```
62
+ 1. Generate adhoc milestone ID: "M-adhoc-{YYYYMMDD}-{HHmmss}"
63
+ 2. Create milestone entry:
64
+ {
65
+ "id": "M-adhoc-{YYYYMMDD}-{HHmmss}",
66
+ "type": "adhoc",
67
+ "name": "Ad-hoc: {plan_slug or analyze_title}",
68
+ "status": "active",
69
+ "phases": [1],
70
+ "phase_slugs": { "1": "standalone" },
71
+ "roadmap_ref": null,
72
+ "created_at": "{ISO-8601}"
73
+ }
74
+ 3. Push to state.json.milestones[]
75
+ 4. Set state.json.current_milestone = milestone.id
76
+ 5. Use this milestone ID for artifact registration (P5 Step 4)
35
77
  ```
36
78
 
79
+ This ensures downstream commands (verify, milestone-audit, milestone-complete) have a valid milestone context without requiring roadmap.
80
+
81
+ **Backward compatibility:** If `state.json.milestones[]` already has entries with `current_milestone != null`, skip creation (existing milestone takes precedence). Missing `type` field on legacy milestones defaults to `"standard"`.
82
+
37
83
  ---
38
84
 
39
85
  ## Flag Processing
@@ -48,6 +94,7 @@ OUTPUT_DIR = .workflow/scratch/plan-{PHASE_SLUG or milestone_slug}-{date}/
48
94
  | `--revise [instructions]` | Revise existing plan (skip P1-P3, load → modify → P4). Auto-discovers latest plan or use `--dir` |
49
95
  | `--check <plan-dir>` | Standalone plan verification (P4 only, read-only) |
50
96
  | `--tdd` | Generate TDD task chains (RED-GREEN-REFACTOR triplets). Load `@~/.maestro/workflows/tdd.md` for discipline and task structure |
97
+ | `--from <source>` | Load upstream context directly (analyze:ANL-xxx, blueprint:BLP-xxx, brainstorm:ID, @file, or path). Bypasses roadmap requirement for analyze/blueprint sources |
51
98
 
52
99
  ---
53
100
 
@@ -78,10 +125,18 @@ When `--tdd` is active:
78
125
  ### Steps
79
126
 
80
127
  1. **Load user decisions**
81
- - Read `${CONTEXT_DIR}/context.md` if exists, else warn (no upstream analyze)
82
-
83
- 2. **Load spec reference** (if `--spec` flag or index.json has spec_ref)
84
- - Read from `.workflow/.spec/${spec_ref}/`: spec-summary.md, requirements/_index.md, epics/_index.md
128
+ - If `--from` specified: resolve to `context-package.json` load
129
+ - `constraints[locked]` → immutable constraints (planner must respect)
130
+ - `constraints[open]` implementer discretion
131
+ - `constraints[deferred]` explicitly scoped out
132
+ - `requirements[]` → task scope input
133
+ - `insights[]` → role analysis context (data models, state machines, architecture decisions)
134
+ - `open_questions[]` → flag areas needing clarification in P2
135
+ - Else: read `${CONTEXT_DIR}/context.md` if exists, else warn (no upstream analyze)
136
+ - Merge: if both `--from` and `context.md` exist, context-package takes precedence; context.md supplements
137
+
138
+ 2. **Load spec reference** (if `--spec` flag or index.json has blueprint_ref)
139
+ - Read from `.workflow/blueprint/${blueprint_ref}/`: blueprint-summary.md, requirements/_index.md, epics/_index.md
85
140
 
86
141
  3. **Load project specs**
87
142
  ```
@@ -106,6 +161,11 @@ When `--tdd` is active:
106
161
  - `scope.priority` → task/wave ordering
107
162
  - Skip parallel exploration
108
163
 
164
+ 5b. **Merge context-package insights** (if `--from` was loaded)
165
+ - If context-package `insights[]` contain `area: "data-model"` or `area: "state-machine"`: inject as planner constraints
166
+ - Map `insights[].summary` to implementation guidance for relevant tasks
167
+ - These replace the need for a separate analyze step when brainstorm already provided sufficient role analysis
168
+
109
169
  5. **Parallel exploration** (skip if `--gaps` or upstream analysis loaded)
110
170
  - Exploration angles (1-4 based on complexity): architecture, implementation, integration, risk
111
171
  - Spawn 1-4 `cli-explore-agent` in parallel, each with phase goal + success_criteria + one angle
@@ -171,9 +231,11 @@ When `--tdd` is active:
171
231
 
172
232
  **Purpose:** Generate the execution plan.
173
233
 
234
+ **Rule:** Main flow MUST NOT create/modify TASK files. All planning delegated to planner agent. Upstream analyze results (conclusions.json / implementation_scope) MUST be passed into planner spawn as `explorationContext` in the same step.
235
+
174
236
  ### Standard Mode (default)
175
237
 
176
- Spawn `workflow-planner` agent with: context.md, spec-ref, doc-index.json, explorationContext (incl. implementationScope), clarificationContext, phase goal + success_criteria, templates (plan.json, task.json).
238
+ Spawn `workflow-planner` agent with: context.md, spec-ref, doc-index.json, explorationContext (incl. implementationScope from P1 Step 5), clarificationContext, phase goal + success_criteria, templates (plan.json, task.json).
177
239
 
178
240
  **Task count guard**: Before spawning, assess scope complexity:
179
241
  - Single feature / simple change → expect **1-2 tasks** max
@@ -236,10 +298,11 @@ Every TASK-*.json MUST include these fields — they are NOT optional:
236
298
 
237
299
  ### Gap Mode (`--gaps`)
238
300
 
239
- For each gap from explorationContext (P1 Step 6), create `TASK-{NNN}.json`:
240
- - `type: "fix"`, `description`, `action` (concrete fix_direction), `read_first` (affected files), `convergence.criteria` (grep-verifiable), `issue_id` (if source == "issue")
301
+ Spawn `workflow-planner` agent with: explorationContext (gap list from P1 Step 6), spec-ref, doc-index.json, phase goal + success_criteria, templates, mode = `gap-fix`.
302
+
303
+ Planner: for each gap emit one task — `type: "fix"`, `description`, `action` (concrete fix_direction), `read_first` (affected files), `convergence.criteria` (grep-verifiable), `issue_id` (if source == "issue"); assign IDs and waves; build plan.json.
241
304
 
242
- Bidirectional linking: update matching issues in `.workflow/issues/issues.jsonl` → `status: "planned"`. Build plan.json with gap-fix tasks.
305
+ Bidirectional linking (main flow, post-planner): update matching issues in `.workflow/issues/issues.jsonl` → `status: "planned"`.
243
306
 
244
307
  ### Output
245
308
  - `plan.json` in PHASE_DIR
@@ -332,6 +395,7 @@ Bidirectional linking: update matching issues in `.workflow/issues/issues.jsonl`
332
395
 
333
396
  4. **Register artifact in state.json**
334
397
  - Find upstream analyze artifact by CONTEXT_DIR path
398
+ - Determine milestone: use target_milestone from scope resolution; if adhoc milestone was created in this session, use its ID
335
399
  - Create artifact: `{ id: "PLN-{NNN}", type: "plan", milestone, phase, scope, path, status: "completed", depends_on, harvested: false, created_at, completed_at }`
336
400
  - Append to `state.json.artifacts`, atomic write
337
401
 
@@ -389,11 +453,13 @@ Incrementally modify an existing plan without rebuilding from scratch.
389
453
  - Update convergence criteria
390
454
  - Parse instructions into concrete changes
391
455
 
392
- 3. **Apply targeted changes**
393
- - Modify affected TASK files in-place
394
- - If tasks added/removed: re-sequence task IDs, regenerate wave assignments
395
- - Update plan.json summary (task count, wave structure)
396
- - Preserve unmodified tasks completely
456
+ 3. **Spawn `workflow-planner` agent for revision**
457
+ - Input: existing plan.json + all `.task/TASK-*.json` + parsed revision instructions + explorationContext (include implementation_scope if conclusions.json exists) + templates
458
+ - Planner:
459
+ - Modify affected TASK files in-place
460
+ - If tasks added/removed: re-sequence task IDs, regenerate wave assignments
461
+ - Update plan.json summary (task count, wave structure)
462
+ - Preserve unmodified tasks
397
463
 
398
464
  4. **Re-run plan-checker (P4)**
399
465
  - Validate modified plan with same checker as create mode
@@ -1,6 +1,6 @@
1
1
  # Workflow: Roadmap Common
2
2
 
3
- Shared logic for roadmap generation — used by both light mode (roadmap.md) and full mode (spec-generate.md).
3
+ Shared logic for roadmap generation — used by roadmap.md.
4
4
 
5
5
  ---
6
6