maestro-flow 0.3.10 → 0.3.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 (311) hide show
  1. package/.claude/agents/conceptual-planning-agent.md +1 -0
  2. package/.claude/agents/workflow-analyzer.md +114 -114
  3. package/.claude/agents/workflow-collab-planner.md +144 -144
  4. package/.claude/agents/workflow-debugger.md +102 -103
  5. package/.claude/agents/workflow-executor.md +127 -128
  6. package/.claude/agents/workflow-integration-checker.md +82 -82
  7. package/.claude/agents/workflow-nyquist-auditor.md +85 -84
  8. package/.claude/agents/workflow-phase-researcher.md +85 -85
  9. package/.claude/agents/workflow-plan-checker.md +90 -90
  10. package/.claude/agents/workflow-planner.md +178 -178
  11. package/.claude/agents/workflow-roadmapper.md +81 -83
  12. package/.claude/agents/workflow-verifier.md +119 -119
  13. package/.claude/commands/learn-decompose.md +176 -176
  14. package/.claude/commands/learn-follow.md +167 -167
  15. package/.claude/commands/learn-retro.md +3 -3
  16. package/.claude/commands/learn-second-opinion.md +2 -2
  17. package/.claude/commands/maestro-brainstorm.md +1 -0
  18. package/.claude/commands/maestro-coordinate.md +1 -3
  19. package/.claude/commands/maestro-fork.md +133 -111
  20. package/.claude/commands/maestro-merge.md +85 -77
  21. package/.claude/commands/maestro-plan.md +88 -2
  22. package/.claude/commands/maestro-roadmap.md +113 -2
  23. package/.claude/commands/maestro.md +1 -0
  24. package/.claude/commands/manage-harvest.md +131 -131
  25. package/.claude/commands/manage-issue.md +2 -2
  26. package/.claude/commands/quality-business-test.md +5 -5
  27. package/.claude/commands/quality-debug.md +3 -2
  28. package/.claude/commands/quality-retrospective.md +6 -4
  29. package/.claude/commands/quality-review.md +1 -1
  30. package/.claude/commands/quality-test-gen.md +5 -4
  31. package/.claude/commands/spec-add.md +67 -56
  32. package/.claude/commands/spec-load.md +66 -64
  33. package/.claude/commands/spec-setup.md +5 -9
  34. package/.codex/skills/learn-decompose/SKILL.md +119 -0
  35. package/.codex/skills/learn-follow/SKILL.md +83 -0
  36. package/.codex/skills/learn-investigate/SKILL.md +83 -0
  37. package/.codex/skills/learn-retro/SKILL.md +83 -0
  38. package/.codex/skills/learn-second-opinion/SKILL.md +86 -0
  39. package/.codex/skills/maestro/SKILL.md +151 -279
  40. package/.codex/skills/maestro-analyze/SKILL.md +59 -71
  41. package/.codex/skills/maestro-brainstorm/SKILL.md +452 -463
  42. package/.codex/skills/maestro-chain/SKILL.md +95 -110
  43. package/.codex/skills/maestro-coordinate/SKILL.md +68 -234
  44. package/.codex/skills/maestro-execute/SKILL.md +435 -446
  45. package/.codex/skills/maestro-fork/SKILL.md +98 -0
  46. package/.codex/skills/maestro-init/SKILL.md +172 -167
  47. package/.codex/skills/maestro-learn/SKILL.md +80 -0
  48. package/.codex/skills/maestro-link-coordinate/SKILL.md +224 -220
  49. package/.codex/skills/maestro-merge/SKILL.md +69 -0
  50. package/.codex/skills/maestro-milestone-audit/SKILL.md +108 -103
  51. package/.codex/skills/maestro-milestone-complete/SKILL.md +155 -149
  52. package/.codex/skills/maestro-milestone-release/SKILL.md +70 -0
  53. package/.codex/skills/maestro-overlay/SKILL.md +188 -185
  54. package/.codex/skills/maestro-plan/SKILL.md +58 -69
  55. package/.codex/skills/maestro-quick/SKILL.md +26 -23
  56. package/.codex/skills/maestro-roadmap/SKILL.md +65 -73
  57. package/.codex/skills/maestro-spec-generate/SKILL.md +66 -74
  58. package/.codex/skills/maestro-ui-design/SKILL.md +35 -32
  59. package/.codex/skills/maestro-verify/SKILL.md +556 -566
  60. package/.codex/skills/manage-codebase-rebuild/SKILL.md +397 -405
  61. package/.codex/skills/manage-codebase-refresh/SKILL.md +93 -82
  62. package/.codex/skills/manage-harvest/SKILL.md +82 -0
  63. package/.codex/skills/manage-issue/SKILL.md +80 -65
  64. package/.codex/skills/manage-issue-discover/SKILL.md +491 -503
  65. package/.codex/skills/manage-learn/SKILL.md +190 -186
  66. package/.codex/skills/manage-memory/SKILL.md +95 -72
  67. package/.codex/skills/manage-memory-capture/SKILL.md +99 -86
  68. package/.codex/skills/manage-status/SKILL.md +102 -89
  69. package/.codex/skills/quality-business-test/SKILL.md +228 -223
  70. package/.codex/skills/quality-debug/SKILL.md +54 -66
  71. package/.codex/skills/quality-integration-test/SKILL.md +532 -544
  72. package/.codex/skills/quality-refactor/SKILL.md +197 -191
  73. package/.codex/skills/quality-retrospective/SKILL.md +512 -505
  74. package/.codex/skills/quality-review/SKILL.md +95 -107
  75. package/.codex/skills/quality-sync/SKILL.md +101 -89
  76. package/.codex/skills/quality-test/SKILL.md +202 -198
  77. package/.codex/skills/quality-test-gen/SKILL.md +94 -105
  78. package/.codex/skills/spec-add/SKILL.md +58 -39
  79. package/.codex/skills/spec-load/SKILL.md +45 -40
  80. package/.codex/skills/spec-map/SKILL.md +180 -182
  81. package/.codex/skills/spec-setup/SKILL.md +94 -76
  82. package/.codex/skills/team-coordinate/SKILL.md +346 -357
  83. package/.codex/skills/team-executor/SKILL.md +70 -112
  84. package/.codex/skills/team-lifecycle-v4/SKILL.md +311 -299
  85. package/.codex/skills/team-quality-assurance/SKILL.md +234 -227
  86. package/.codex/skills/team-review/SKILL.md +232 -225
  87. package/.codex/skills/team-tech-debt/SKILL.md +78 -100
  88. package/.codex/skills/team-testing/SKILL.md +242 -235
  89. package/.codex/skills/wiki-connect/SKILL.md +75 -0
  90. package/.codex/skills/wiki-digest/SKILL.md +87 -0
  91. package/README.md +9 -4
  92. package/README.zh-CN.md +9 -4
  93. package/dashboard/dist/assets/{ArtifactsPage-DZNCi6tn.js → ArtifactsPage-CUrrDGgN.js} +1 -1
  94. package/dashboard/dist/assets/ChatInput-pUOLJIKE.js +49 -0
  95. package/dashboard/dist/assets/ChatPage-B8Xqkt0v.js +27 -0
  96. package/dashboard/dist/assets/{CollabPage-B4NAHXS2.js → CollabPage-DIUXeazv.js} +1 -1
  97. package/dashboard/dist/assets/{ExecutionPanel-CFt4LJyq.js → ExecutionPanel-VmYeADFj.js} +1 -1
  98. package/dashboard/dist/assets/KanbanPage-DLq8v7hg.js +21 -0
  99. package/dashboard/dist/assets/{MarkdownRenderer-X4af_WNb.js → MarkdownRenderer-D7AehrnR.js} +1 -1
  100. package/dashboard/dist/assets/{McpPage-BKfCVIyU.js → McpPage-BY0SjTgw.js} +2 -2
  101. package/dashboard/dist/assets/{OutputPanel-BlBQFJSW.js → OutputPanel-B-Rjwgmv.js} +1 -1
  102. package/dashboard/dist/assets/{ProblemsPanel-De3DLvoI.js → ProblemsPanel-GEpF-oi4.js} +1 -1
  103. package/dashboard/dist/assets/RequirementBoardPage-xs8uDM7I.js +6 -0
  104. package/dashboard/dist/assets/{RequirementPage-Bllxe2XI.js → RequirementPage-BKDSFwjA.js} +5 -10
  105. package/dashboard/dist/assets/SpecsPage-DLFb9ZH0.js +36 -0
  106. package/dashboard/dist/assets/SupervisorPage-SOki_kgz.js +6 -0
  107. package/dashboard/dist/assets/TeamsPage-BO2kP70F.js +11 -0
  108. package/dashboard/dist/assets/{TreeBrowser-Q12qobZs.js → TreeBrowser-B9DHdULE.js} +1 -1
  109. package/dashboard/dist/assets/{WorkflowPage-D_Fzdy3_.js → WorkflowPage-C8hWbYim.js} +1 -1
  110. package/dashboard/dist/assets/{check-u6fGOwQO.js → check-DJDk3A2a.js} +1 -1
  111. package/dashboard/dist/assets/{chevron-right-Csu22t58.js → chevron-right-C7bVDreZ.js} +1 -1
  112. package/dashboard/dist/assets/{circle-CMrkbRNg.js → circle-Qfgy4LB_.js} +1 -1
  113. package/dashboard/dist/assets/{circle-alert-c3tH1P4z.js → circle-alert-Na1vf6qQ.js} +1 -1
  114. package/dashboard/dist/assets/{circle-check-gYxxSYuH.js → circle-check-CEGgy3NV.js} +1 -1
  115. package/dashboard/dist/assets/{circle-check-big-TDSeWstm.js → circle-check-big-3JB8zRYj.js} +1 -1
  116. package/dashboard/dist/assets/{code-CFN2uX9V.js → code-Ble63Idz.js} +1 -1
  117. package/dashboard/dist/assets/{columns-3-38xIDlzy.js → columns-3-BUcKlxve.js} +1 -1
  118. package/dashboard/dist/assets/{download-DC7KkKyP.js → download-CMqkfn8x.js} +1 -1
  119. package/dashboard/dist/assets/{folder-CWq_lAnf.js → folder-B9ewx9LL.js} +1 -1
  120. package/dashboard/dist/assets/index-C2Mcb4TJ.js +231 -0
  121. package/dashboard/dist/assets/index-DyBbPc18.css +1 -0
  122. package/dashboard/dist/assets/{index-Do71weNR.js → index-JTmGteaT.js} +1 -1
  123. package/dashboard/dist/assets/{list-CgIP_2A-.js → list-DI8Wn2aT.js} +1 -1
  124. package/dashboard/dist/assets/loader-B5F6PzFT.js +11 -0
  125. package/dashboard/dist/assets/{minus-DYoN5UGk.js → minus-Lp_BfctG.js} +1 -1
  126. package/dashboard/dist/assets/{pen-line-Bh_WKYHm.js → pen-line-Ch7sphzZ.js} +1 -1
  127. package/dashboard/dist/assets/pencil-_yRMHmGT.js +6 -0
  128. package/dashboard/dist/assets/{proxy-BKxDAKTj.js → proxy-D72Y8a4Y.js} +1 -1
  129. package/dashboard/dist/assets/{search-SieXnOgr.js → search-BS6fI6Bg.js} +1 -1
  130. package/dashboard/dist/assets/{shallow-Bme1JY57.js → shallow-BXasQBvr.js} +1 -1
  131. package/dashboard/dist/assets/table-CeGlFjlP.js +6 -0
  132. package/dashboard/dist/assets/{terminal-BB3Xfuv5.js → terminal-BJic2yW-.js} +1 -1
  133. package/dashboard/dist/assets/{trash-2-C8f4vFFM.js → trash-2-Czz4X8Fb.js} +1 -1
  134. package/dashboard/dist/assets/{zap-4uwlzVm0.js → zap-C3H0jVFA.js} +1 -1
  135. package/dashboard/dist/index.html +2 -2
  136. package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js +16 -1
  137. package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js.map +1 -1
  138. package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js +1 -2
  139. package/dashboard/dist-server/dashboard/src/server/agents/delegate-broker-monitor.js.map +1 -1
  140. package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.d.ts +1 -1
  141. package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js +2 -1
  142. package/dashboard/dist-server/dashboard/src/server/commander/commander-prompts.js.map +1 -1
  143. package/dashboard/dist-server/dashboard/src/server/index.js +3 -0
  144. package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
  145. package/dashboard/dist-server/dashboard/src/server/routes/collab.js +124 -0
  146. package/dashboard/dist-server/dashboard/src/server/routes/collab.js.map +1 -1
  147. package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +1 -1
  148. package/dashboard/dist-server/dashboard/src/server/routes/specs.js +75 -30
  149. package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
  150. package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +5 -0
  151. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +5 -0
  152. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
  153. package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.d.ts +10 -0
  154. package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js +73 -0
  155. package/dashboard/dist-server/dashboard/src/server/ws/handlers/team-handler.js.map +1 -0
  156. package/dashboard/dist-server/dashboard/src/shared/collab-types.d.ts +31 -0
  157. package/dashboard/dist-server/dashboard/src/shared/collab-types.js +28 -0
  158. package/dashboard/dist-server/dashboard/src/shared/collab-types.js.map +1 -1
  159. package/dashboard/dist-server/dashboard/src/shared/constants.js +10 -0
  160. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  161. package/dashboard/dist-server/dashboard/src/shared/coordinate-types.d.ts +22 -0
  162. package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +12 -0
  163. package/dashboard/dist-server/dashboard/src/shared/issue-types.js +12 -0
  164. package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
  165. package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +22 -0
  166. package/dashboard/dist-server/dashboard/src/shared/team-types.js +7 -0
  167. package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
  168. package/dashboard/dist-server/dashboard/src/shared/types.d.ts +3 -2
  169. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +28 -2
  170. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  171. package/dashboard/dist-server/shared/agent-types.d.ts +4 -0
  172. package/dashboard/dist-server/src/hooks/constants.d.ts +3 -1
  173. package/dashboard/dist-server/src/hooks/constants.js +4 -2
  174. package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
  175. package/dist/shared/agent-types.d.ts +4 -0
  176. package/dist/shared/agent-types.d.ts.map +1 -1
  177. package/dist/src/commands/collab.js +4 -4
  178. package/dist/src/commands/collab.js.map +1 -1
  179. package/dist/src/commands/hooks.d.ts.map +1 -1
  180. package/dist/src/commands/hooks.js +66 -1
  181. package/dist/src/commands/hooks.js.map +1 -1
  182. package/dist/src/commands/install-backend.d.ts.map +1 -1
  183. package/dist/src/commands/install-backend.js +29 -18
  184. package/dist/src/commands/install-backend.js.map +1 -1
  185. package/dist/src/commands/spec.d.ts.map +1 -1
  186. package/dist/src/commands/spec.js +7 -2
  187. package/dist/src/commands/spec.js.map +1 -1
  188. package/dist/src/hooks/__tests__/statusline-visual-test.js +23 -1
  189. package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -1
  190. package/dist/src/hooks/constants.d.ts +3 -1
  191. package/dist/src/hooks/constants.d.ts.map +1 -1
  192. package/dist/src/hooks/constants.js +4 -2
  193. package/dist/src/hooks/constants.js.map +1 -1
  194. package/dist/src/hooks/guards/index.d.ts +1 -0
  195. package/dist/src/hooks/guards/index.d.ts.map +1 -1
  196. package/dist/src/hooks/guards/index.js +1 -0
  197. package/dist/src/hooks/guards/index.js.map +1 -1
  198. package/dist/src/hooks/guards/spec-validator.d.ts +25 -0
  199. package/dist/src/hooks/guards/spec-validator.d.ts.map +1 -0
  200. package/dist/src/hooks/guards/spec-validator.js +66 -0
  201. package/dist/src/hooks/guards/spec-validator.js.map +1 -0
  202. package/dist/src/hooks/keyword-spec-injector.d.ts +21 -0
  203. package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -0
  204. package/dist/src/hooks/keyword-spec-injector.js +96 -0
  205. package/dist/src/hooks/keyword-spec-injector.js.map +1 -0
  206. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts +2 -1
  207. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
  208. package/dist/src/hooks/plugins/spec-injection-plugin.js +21 -12
  209. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  210. package/dist/src/hooks/skill-context.d.ts +3 -0
  211. package/dist/src/hooks/skill-context.d.ts.map +1 -1
  212. package/dist/src/hooks/skill-context.js +95 -9
  213. package/dist/src/hooks/skill-context.js.map +1 -1
  214. package/dist/src/hooks/spec-bridge.d.ts +40 -0
  215. package/dist/src/hooks/spec-bridge.d.ts.map +1 -0
  216. package/dist/src/hooks/spec-bridge.js +97 -0
  217. package/dist/src/hooks/spec-bridge.js.map +1 -0
  218. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  219. package/dist/src/hooks/spec-injector.js +18 -12
  220. package/dist/src/hooks/spec-injector.js.map +1 -1
  221. package/dist/src/hooks/statusline.d.ts.map +1 -1
  222. package/dist/src/hooks/statusline.js +6 -3
  223. package/dist/src/hooks/statusline.js.map +1 -1
  224. package/dist/src/team/phase-orchestrator.d.ts +52 -0
  225. package/dist/src/team/phase-orchestrator.d.ts.map +1 -0
  226. package/dist/src/team/phase-orchestrator.js +165 -0
  227. package/dist/src/team/phase-orchestrator.js.map +1 -0
  228. package/dist/src/team/phase-types.d.ts +51 -0
  229. package/dist/src/team/phase-types.d.ts.map +1 -0
  230. package/dist/src/team/phase-types.js +41 -0
  231. package/dist/src/team/phase-types.js.map +1 -0
  232. package/dist/src/tools/index.d.ts.map +1 -1
  233. package/dist/src/tools/index.js +6 -0
  234. package/dist/src/tools/index.js.map +1 -1
  235. package/dist/src/tools/merge-validator.d.ts.map +1 -1
  236. package/dist/src/tools/merge-validator.js +114 -16
  237. package/dist/src/tools/merge-validator.js.map +1 -1
  238. package/dist/src/tools/spec-entry-parser.d.ts +56 -0
  239. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -0
  240. package/dist/src/tools/spec-entry-parser.js +196 -0
  241. package/dist/src/tools/spec-entry-parser.js.map +1 -0
  242. package/dist/src/tools/spec-init.d.ts.map +1 -1
  243. package/dist/src/tools/spec-init.js +66 -92
  244. package/dist/src/tools/spec-init.js.map +1 -1
  245. package/dist/src/tools/spec-keyword-index.d.ts +30 -0
  246. package/dist/src/tools/spec-keyword-index.d.ts.map +1 -0
  247. package/dist/src/tools/spec-keyword-index.js +101 -0
  248. package/dist/src/tools/spec-keyword-index.js.map +1 -0
  249. package/dist/src/tools/spec-loader.d.ts +3 -3
  250. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  251. package/dist/src/tools/spec-loader.js +49 -23
  252. package/dist/src/tools/spec-loader.js.map +1 -1
  253. package/dist/src/tools/team-agents.d.ts +27 -0
  254. package/dist/src/tools/team-agents.d.ts.map +1 -0
  255. package/dist/src/tools/team-agents.js +362 -0
  256. package/dist/src/tools/team-agents.js.map +1 -0
  257. package/dist/src/tools/team-mailbox.d.ts +40 -0
  258. package/dist/src/tools/team-mailbox.d.ts.map +1 -0
  259. package/dist/src/tools/team-mailbox.js +384 -0
  260. package/dist/src/tools/team-mailbox.js.map +1 -0
  261. package/dist/src/tools/team-msg.d.ts +17 -8
  262. package/dist/src/tools/team-msg.d.ts.map +1 -1
  263. package/dist/src/tools/team-msg.js +110 -13
  264. package/dist/src/tools/team-msg.js.map +1 -1
  265. package/dist/src/tools/team-tasks-mcp.d.ts +27 -0
  266. package/dist/src/tools/team-tasks-mcp.d.ts.map +1 -0
  267. package/dist/src/tools/team-tasks-mcp.js +408 -0
  268. package/dist/src/tools/team-tasks-mcp.js.map +1 -0
  269. package/package.json +2 -1
  270. package/shared/agent-types.ts +4 -0
  271. package/templates/worktree-scope.json +9 -10
  272. package/templates/worktrees.json +26 -27
  273. package/workflows/analyze.md +816 -816
  274. package/workflows/brainstorm.md +480 -471
  275. package/workflows/codebase-rebuild.md +332 -332
  276. package/workflows/codebase-refresh.md +240 -240
  277. package/workflows/debug.md +16 -6
  278. package/workflows/execute.md +1 -1
  279. package/workflows/fork.md +100 -36
  280. package/workflows/harvest.md +420 -420
  281. package/workflows/integration-test.md +355 -343
  282. package/workflows/issue-discover.md +414 -414
  283. package/workflows/issue.md +14 -4
  284. package/workflows/learn.md +19 -5
  285. package/workflows/maestro.md +1 -0
  286. package/workflows/map.md +111 -111
  287. package/workflows/merge.md +113 -55
  288. package/workflows/milestone-complete.md +176 -176
  289. package/workflows/plan.md +1 -1
  290. package/workflows/quick.md +497 -497
  291. package/workflows/refactor.md +300 -300
  292. package/workflows/retrospective.md +61 -22
  293. package/workflows/review.md +17 -4
  294. package/workflows/roadmap.md +335 -335
  295. package/workflows/spec-generate.md +640 -640
  296. package/workflows/specs-add.md +46 -81
  297. package/workflows/specs-load.md +15 -17
  298. package/workflows/specs-setup.md +40 -161
  299. package/workflows/test.md +12 -2
  300. package/workflows/ui-style.md +9 -2
  301. package/dashboard/dist/assets/ChatInput-Bvr-FeEq.js +0 -49
  302. package/dashboard/dist/assets/ChatPage-D9zTkJZo.js +0 -22
  303. package/dashboard/dist/assets/KanbanPage-C8USth6H.js +0 -21
  304. package/dashboard/dist/assets/RequirementBoardPage-Bf1trzqs.js +0 -11
  305. package/dashboard/dist/assets/SpecsPage-9lwxKT27.js +0 -36
  306. package/dashboard/dist/assets/SupervisorPage-SusdfHFq.js +0 -6
  307. package/dashboard/dist/assets/TeamsPage-DsuM6OwC.js +0 -6
  308. package/dashboard/dist/assets/arrow-left-Bqtb2hle.js +0 -6
  309. package/dashboard/dist/assets/index-DWG-WrzT.js +0 -231
  310. package/dashboard/dist/assets/index-GUNJodSR.css +0 -1
  311. package/dashboard/dist/assets/table-llyEtj-7.js +0 -6
@@ -1,56 +1,67 @@
1
- ---
2
- name: spec-add
3
- description: Add a spec entry (bug, pattern, decision, or rule) to the appropriate specs file
4
- argument-hint: "<type> <content>"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Bash
9
- - Glob
10
- - Grep
11
- ---
12
- <purpose>
13
- Add a knowledge entry to the project specs system, routing it to the correct file by category.
14
- Each entry is timestamped and appended to learnings.md, then the relevant spec file is updated if the entry warrants a convention or rule change.
15
- Supports four categories: bug fixes, patterns, architectural decisions, and quality rules.
16
- </purpose>
17
-
18
- <required_reading>
19
- @~/.maestro/workflows/specs-add.md
20
- </required_reading>
21
-
22
- <context>
23
- $ARGUMENTS -- expects `<type> <content>` where type is one of: bug, pattern, decision, rule, debug, test, review, validation
24
-
25
- **Type-to-file mapping:**
26
- | Type | Primary file | Secondary update |
27
- |------|-------------|-----------------|
28
- | `bug` | `learnings.md` | -- |
29
- | `pattern` | `learnings.md` | `coding-conventions.md` |
30
- | `decision` | `learnings.md` | `architecture-constraints.md` |
31
- | `rule` | `learnings.md` | `quality-rules.md` |
32
- | `debug` | `learnings.md` | `debug-notes.md` |
33
- | `test` | `learnings.md` | `test-conventions.md` |
34
- | `review` | `learnings.md` | `review-standards.md` |
35
- | `validation` | `learnings.md` | `validation-rules.md` |
36
- </context>
37
-
38
- <execution>
39
- Follow '~/.maestro/workflows/specs-add.md' completely.
40
- </execution>
41
-
42
- <error_codes>
43
- | Code | Severity | Description | Stage |
44
- |------|----------|-------------|-------|
45
- | E001 | fatal | Category and content are both required -- usage: `<type> <content>` | parse_input |
46
- | E002 | fatal | `.workflow/specs/` not initialized -- run `/spec-setup` first | validate_entry |
47
- | E003 | fatal | Invalid category -- must be one of: bug, pattern, decision, rule, debug, test, review, validation | parse_input |
48
- </error_codes>
49
-
50
- <success_criteria>
51
- - [ ] Category parsed and validated as bug/pattern/decision/rule
52
- - [ ] Entry appended to `.workflow/specs/learnings.md` with timestamp
53
- - [ ] Relevant spec file updated (if type is pattern/decision/rule)
54
- - [ ] Confirmation report displayed
55
- - [ ] Next step: `/spec-load --category {type}` to verify, or continue current task
56
- </success_criteria>
1
+ ---
2
+ name: spec-add
3
+ description: Add a spec entry to the appropriate specs file by category
4
+ argument-hint: "<category> <content>"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ ---
12
+ <purpose>
13
+ Add a knowledge entry to the project specs system using `<spec-entry>` closed-tag format.
14
+ Each category maps 1:1 to a single target file no dual-write.
15
+ </purpose>
16
+
17
+ <required_reading>
18
+ @~/.maestro/workflows/specs-add.md
19
+ </required_reading>
20
+
21
+ <context>
22
+ $ARGUMENTS -- expects `<category> <content>`
23
+
24
+ **Category-to-file mapping (1:1, same as spec-load):**
25
+ | Category | Target file |
26
+ |----------|------------|
27
+ | `coding` | `coding-conventions.md` |
28
+ | `arch` | `architecture-constraints.md` |
29
+ | `quality` | `quality-rules.md` |
30
+ | `debug` | `debug-notes.md` |
31
+ | `test` | `test-conventions.md` |
32
+ | `review` | `review-standards.md` |
33
+ | `learning` | `learnings.md` |
34
+
35
+ **Entry format (closed-tag):**
36
+ ```markdown
37
+ <spec-entry category="{category}" keywords="{auto-extracted}" date="{YYYY-MM-DD}">
38
+
39
+ ### {title}
40
+
41
+ {content}
42
+
43
+ </spec-entry>
44
+ ```
45
+ </context>
46
+
47
+ <execution>
48
+ Follow '~/.maestro/workflows/specs-add.md' completely.
49
+ </execution>
50
+
51
+ <error_codes>
52
+ | Code | Severity | Description | Stage |
53
+ |------|----------|-------------|-------|
54
+ | E001 | fatal | Category and content are both required -- usage: `<category> <content>` | parse_input |
55
+ | E002 | fatal | `.workflow/specs/` not initialized -- run `/spec-setup` first | validate_entry |
56
+ | E003 | fatal | Invalid category -- must be one of: coding, arch, quality, debug, test, review, learning | parse_input |
57
+ </error_codes>
58
+
59
+ <success_criteria>
60
+ - [ ] Category parsed and validated
61
+ - [ ] Keywords auto-extracted from content (3-5 relevant terms)
62
+ - [ ] Entry written in `<spec-entry>` closed-tag format
63
+ - [ ] Entry appended to target file
64
+ - [ ] Confirmation report displayed
65
+ - [ ] Next step: `/spec-load --keyword {keyword}` to verify
66
+ </success_criteria>
67
+ </output>
@@ -1,64 +1,66 @@
1
- ---
2
- name: spec-load
3
- description: Load relevant specs and lessons for current context (used by agents before execution)
4
- argument-hint: "[--category <type>] [--with-lessons] [keyword]"
5
- allowed-tools:
6
- - Read
7
- - Bash
8
- - Glob
9
- - Grep
10
- ---
11
- <purpose>
12
- Load and display relevant spec files for the current working context, optionally filtered by category.
13
- Designed for agents to call before execution to internalize project conventions, constraints, and learnings.
14
- Returns matched sections with file references ranked by relevance.
15
- </purpose>
16
-
17
- <required_reading>
18
- @~/.maestro/workflows/specs-load.md
19
- </required_reading>
20
-
21
- <context>
22
- $ARGUMENTS -- optional `--category <type>` flag and/or keyword to filter specs
23
-
24
- **Category filter** (matches frontmatter `category` field):
25
- | Category | Files loaded |
26
- |----------|-------------|
27
- | `general` | `learnings.md` |
28
- | `exploration` | _(reserved)_ |
29
- | `planning` | `architecture-constraints.md` |
30
- | `execution` | `coding-conventions.md`, `quality-rules.md` |
31
- | `debug` | `debug-notes.md` |
32
- | `test` | `test-conventions.md` |
33
- | `review` | `review-standards.md` |
34
- | `validation` | `validation-rules.md` |
35
- | `all` (default) | All spec files |
36
-
37
- **Keyword:** If provided, search within loaded files for matching sections.
38
- If no arguments, loads all specs for the active phase/task context.
39
-
40
- **Flags:**
41
- - `--with-lessons` — Also search `.workflow/learning/lessons.jsonl` for entries with `category: "gotcha"`, `"antipattern"`, or `"pattern"` relevant to the keyword or current context. Appends matched lessons after spec output. This bridges the gap between specs (prescriptive rules) and lessons (discovered knowledge).
42
- </context>
43
-
44
- <execution>
45
- Follow '~/.maestro/workflows/specs-load.md' completely.
46
- </execution>
47
-
48
- <error_codes>
49
- | Code | Severity | Description | Stage |
50
- |------|----------|-------------|-------|
51
- | E001 | fatal | `.workflow/specs/` not initialized -- run `/spec-setup` first | detect_context |
52
- | W001 | warning | No matching specs found for keyword -- showing all specs in category instead | load_specs |
53
- </error_codes>
54
-
55
- <success_criteria>
56
- - [ ] Category filter parsed correctly (or defaults to all)
57
- - [ ] Spec files resolved and read
58
- - [ ] Keyword filtering applied if provided
59
- - [ ] If `--with-lessons`: lessons.jsonl searched for gotcha/antipattern/pattern entries matching context
60
- - [ ] If `--with-lessons`: matched lessons displayed after specs (max 10, newest first)
61
- - [ ] Results displayed with file:line references
62
- - [ ] Relevant specs loaded into agent context
63
- - [ ] Next step: proceed with current task using loaded specs as context
64
- </success_criteria>
1
+ ---
2
+ name: spec-load
3
+ description: Load relevant specs and lessons for current context (used by agents before execution)
4
+ argument-hint: "[--category <type>] [--keyword <word>] [--with-lessons]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ ---
11
+ <purpose>
12
+ Load and display relevant spec files for the current working context.
13
+ Supports filtering by category (file-level) and keyword (entry-level via `<spec-entry>` tags).
14
+ </purpose>
15
+
16
+ <required_reading>
17
+ @~/.maestro/workflows/specs-load.md
18
+ </required_reading>
19
+
20
+ <context>
21
+ $ARGUMENTS -- optional flags and keyword
22
+
23
+ **Category-to-file mapping (1:1, same as spec-add):**
24
+ | Category | File loaded |
25
+ |----------|------------|
26
+ | `coding` | `coding-conventions.md` |
27
+ | `arch` | `architecture-constraints.md` |
28
+ | `quality` | `quality-rules.md` |
29
+ | `debug` | `debug-notes.md` |
30
+ | `test` | `test-conventions.md` |
31
+ | `review` | `review-standards.md` |
32
+ | `learning` | `learnings.md` |
33
+ | `all` (default) | All spec files |
34
+
35
+ **Flags:**
36
+ - `--category <type>` — Filter by file category (loads one file)
37
+ - `--keyword <word>` Filter entries by keyword attribute in `<spec-entry>` tags. Searches across all files (or within category if combined)
38
+ - `--with-lessons` Also search `.workflow/learning/lessons.jsonl`
39
+
40
+ **Examples:**
41
+ ```
42
+ /spec-load --keyword auth
43
+ /spec-load --category coding --keyword naming
44
+ /spec-load --category arch
45
+ ```
46
+ </context>
47
+
48
+ <execution>
49
+ Follow '~/.maestro/workflows/specs-load.md' completely.
50
+ </execution>
51
+
52
+ <error_codes>
53
+ | Code | Severity | Description | Stage |
54
+ |------|----------|-------------|-------|
55
+ | E001 | fatal | `.workflow/specs/` not initialized -- run `/spec-setup` first | detect_context |
56
+ | W001 | warning | No matching specs found for keyword -- showing all specs in category instead | load_specs |
57
+ </error_codes>
58
+
59
+ <success_criteria>
60
+ - [ ] Category and/or keyword parsed from arguments
61
+ - [ ] Spec files loaded per category mapping
62
+ - [ ] Keyword filtering applied at entry level (via `<spec-entry>` keywords attribute)
63
+ - [ ] Legacy entries filtered by text grep fallback
64
+ - [ ] Results displayed with file:category references
65
+ </success_criteria>
66
+ </output>
@@ -11,7 +11,7 @@ allowed-tools:
11
11
  ---
12
12
  <purpose>
13
13
  Initialize the project-level specs directory by scanning the codebase for conventions, patterns, and tech stack.
14
- Produces four spec files plus a tech profile JSON that downstream agents and commands consume for consistent coding.
14
+ Core files (coding, arch, learning) are always created. Optional files (quality, debug, test, review) are created only when relevant signals are detected.
15
15
  All output lands in `.workflow/specs/` and `.workflow/project-tech.json`.
16
16
  </purpose>
17
17
 
@@ -45,13 +45,9 @@ Follow '~/.maestro/workflows/specs-setup.md' completely.
45
45
 
46
46
  <success_criteria>
47
47
  - [ ] `.workflow/specs/` directory created
48
- - [ ] `coding-conventions.md` written with detected patterns
49
- - [ ] `architecture-constraints.md` written with structural rules
50
- - [ ] `quality-rules.md` written with auto-detected and manual sections
51
- - [ ] `learnings.md` initialized with format instructions
48
+ - [ ] Core files always created: `coding-conventions.md`, `architecture-constraints.md`, `learnings.md`
49
+ - [ ] Optional files created when detected: `quality-rules.md` (linter/CI), `test-conventions.md` (test framework), `debug-notes.md` (on demand), `review-standards.md` (on demand)
52
50
  - [ ] `project-tech.json` written with detected tech stack
53
- - [ ] Report displayed with summary and next steps:
54
- - Build codebase docs → `/manage-codebase-rebuild`
55
- - Load specs for task → `/spec-load`
56
- - Add new knowledge → `/spec-add <type> <content>`
51
+ - [ ] Report displayed with summary and next steps
57
52
  </success_criteria>
53
+ </output>
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: learn-decompose
3
+ description: 4-dimension parallel pattern extraction via CSV wave pipeline. Structural, behavioral, data, and error dimension agents scan in parallel (Wave 1), cross-reference agent deduplicates and catalogs (Wave 2). Outputs pattern catalog to lessons.jsonl.
4
+ argument-hint: "[-y|--yes] [-c|--concurrency 4] [--continue] \"<path|module> [--patterns <list>] [--save-spec] [--save-wiki]\""
5
+ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Systematic pattern extraction from code via CSV wave pipeline. 4 parallel dimension agents
10
+ scan a module, then a cross-reference agent deduplicates against existing patterns and
11
+ produces a catalog. Discovered patterns persist to `lessons.jsonl` and optionally to
12
+ specs (via `spec-add`) and wiki.
13
+
14
+ ```
15
+ Resolve Target → Load Existing Patterns → Wave 1 (4 parallel dimension scans) → Wave 2 (cross-ref + catalog) → Persist
16
+ ```
17
+ </purpose>
18
+
19
+ <context>
20
+ $ARGUMENTS — target path/module and optional flags.
21
+
22
+ **Target resolution:**
23
+ - File path → analyze that file
24
+ - Directory path → all source files in it
25
+ - Module name → Glob `src/**/{module}*`
26
+
27
+ **Flags:**
28
+ - `-y, --yes`: Skip confirmations
29
+ - `-c, --concurrency N`: Max concurrent agents (default: 4)
30
+ - `--continue`: Resume existing session
31
+ - `--patterns <list>`: Comma-separated pattern names to focus on
32
+ - `--save-spec`: Invoke `spec-add` for each new pattern
33
+ - `--save-wiki`: Create wiki note entries per dimension group
34
+
35
+ **Output**: `.workflow/.csv-wave/{session-id}/` + `.workflow/learning/decompose-{slug}-{date}.md`
36
+ </context>
37
+
38
+ <invariants>
39
+ 1. **4 dimensions always**: structural, behavioral, data, error — each a wave 1 task
40
+ 2. **Evidence required**: Every finding must have file:line anchors
41
+ 3. **Dedup before persist**: Cross-reference against existing specs + lessons
42
+ 4. **Stable IDs**: INS-id from `hash("decompose" + target + pattern_name)`
43
+ 5. **No files modified outside** `.workflow/learning/` (and optionally specs/wiki)
44
+ </invariants>
45
+
46
+ <execution>
47
+
48
+ ### Phase 1: Session Init + Target Resolution
49
+
50
+ ```javascript
51
+ const AUTO_YES = $ARGUMENTS.includes('-y') || $ARGUMENTS.includes('--yes')
52
+ const patternsMatch = $ARGUMENTS.match(/--patterns\s+(\S+)/)
53
+ const patternFilter = patternsMatch ? patternsMatch[1].split(',') : null
54
+ const SAVE_SPEC = $ARGUMENTS.includes('--save-spec')
55
+ const SAVE_WIKI = $ARGUMENTS.includes('--save-wiki')
56
+ const target = $ARGUMENTS.replace(/--yes|-y|--continue|--concurrency\s+\d+|-c\s+\d+|--patterns\s+\S+|--save-spec|--save-wiki/g, '').trim()
57
+ ```
58
+
59
+ Resolve target to file list. Load existing patterns from `coding-conventions.md` + `lessons.jsonl` for dedup set.
60
+
61
+ ### Phase 2: Wave 1 — Parallel Dimension Scans
62
+
63
+ Generate `tasks.csv` with 4 dimension rows (wave 1) + 1 cross-ref row (wave 2):
64
+
65
+ | id | dimension | focus |
66
+ |----|-----------|-------|
67
+ | 1 | structural | Class hierarchy, composition, DI, factories, exports |
68
+ | 2 | behavioral | Events, middleware, observer, command, state machines |
69
+ | 3 | data | Repository, DTO, caching, serialization, validation |
70
+ | 4 | error | Boundaries, retry/backoff, fallbacks, guards, logging |
71
+ | 5 | cross-ref | Dedup + catalog from wave 1 findings |
72
+
73
+ Each dimension agent returns:
74
+ ```json
75
+ [{
76
+ "name": "pattern name",
77
+ "dimension": "structural|behavioral|data|error",
78
+ "confidence": "high|medium|low",
79
+ "anchors": ["file:line"],
80
+ "description": "what it does",
81
+ "rationale": "why this approach",
82
+ "tradeoffs": "what was given up"
83
+ }]
84
+ ```
85
+
86
+ ### Phase 3: Wave 2 — Cross-Reference + Catalog
87
+
88
+ Single agent receives all wave 1 findings via `prev_context`. Tasks:
89
+ - Match against dedup set → mark as `documented`, `known`, or `new`
90
+ - Merge duplicates across dimensions (same pattern found by multiple agents)
91
+ - Flag contradictions with documented conventions
92
+ - Build pattern catalog grouped by dimension
93
+
94
+ ### Phase 4: Persist
95
+
96
+ 1. Write `decompose-{slug}-{date}.md` with full catalog
97
+ 2. Append each **new** pattern to `lessons.jsonl` (source: "decompose", category: "pattern")
98
+ 3. If `--save-spec`: invoke `spec-add` per new pattern
99
+ 4. If `--save-wiki`: create wiki note per dimension group
100
+ </execution>
101
+
102
+ <error_codes>
103
+ | Code | Severity | Condition | Recovery |
104
+ |------|----------|-----------|----------|
105
+ | E001 | error | Target path not found | Check path or use module name |
106
+ | E002 | error | No source files in target | Check target has .ts/.js files |
107
+ | W001 | warning | Dimension agent failed — partial results | Proceed with available dimensions |
108
+ | W002 | warning | coding-conventions.md not found | All patterns marked "new" |
109
+ </error_codes>
110
+
111
+ <success_criteria>
112
+ - [ ] Target resolved to concrete file list
113
+ - [ ] 4 dimension agents spawned in parallel via spawn_agents_on_csv
114
+ - [ ] Each finding has: name, dimension, confidence, anchors, description
115
+ - [ ] Cross-reference performed (documented / known / new)
116
+ - [ ] Pattern catalog written to `decompose-{slug}-{date}.md`
117
+ - [ ] New patterns appended to `lessons.jsonl` with stable INS-ids
118
+ - [ ] If --save-spec / --save-wiki: entries created
119
+ </success_criteria>
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: learn-follow
3
+ description: Guided follow-along reading of code or wiki entries. Section-by-section walk-through with 4 forcing questions, pattern extraction, and understanding map generation. Persists insights to lessons.jsonl.
4
+ argument-hint: "<path|wiki-id|topic> [--depth shallow|deep] [--save-wiki]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Guided reading experience for code files, wiki entries, or topics. Walks through content
10
+ section by section using 4 forcing questions to extract patterns, identify assumptions,
11
+ and build a structured understanding map. Insights persist to `lessons.jsonl`.
12
+
13
+ Unlike `learn-decompose` which is parallel pattern extraction, this is sequential
14
+ deep reading that builds understanding incrementally.
15
+ </purpose>
16
+
17
+ <context>
18
+ $ARGUMENTS — target and optional flags.
19
+
20
+ **Target resolution (auto-detected):**
21
+ - File path → Read source file
22
+ - Wiki ID (`type-slug`) → Fetch via `maestro wiki get`
23
+ - Topic string → Search via `maestro wiki search`, use top result
24
+
25
+ **Flags:**
26
+ - `--depth shallow` — Key patterns and structure only (default)
27
+ - `--depth deep` — Every function, branch, assumption
28
+ - `--save-wiki` — Create wiki note with reading notes
29
+
30
+ **Output**: `.workflow/learning/follow-{slug}-{date}.md`
31
+ </context>
32
+
33
+ <execution>
34
+
35
+ ### Stage 1: Resolve Target + Load Context Web
36
+ - File: verify exists, parse imports for dependency files
37
+ - Wiki ID: fetch + load forward/backlinks
38
+ - Topic: search wiki, take top result
39
+ - Build 1-hop context neighborhood (imports/exports or wiki links)
40
+
41
+ ### Stage 2: Build Reading Order
42
+ - Single file: split into logical sections (function/class boundaries)
43
+ - Directory: entry point → core modules → utilities → tests
44
+ - `--depth shallow`: top-level structure only
45
+ - `--depth deep`: every function body, every branch
46
+
47
+ ### Stage 3: Guided Reading (4 Forcing Questions per Section)
48
+ 1. **"What pattern is being used here?"** — design patterns, idioms, conventions
49
+ 2. **"Why this approach instead of alternatives?"** — trade-offs made
50
+ 3. **"What assumption does this depend on?"** — external state, input shape, ordering
51
+ 4. **"What would break if this changed?"** — fragility, downstream effects
52
+
53
+ ### Stage 4: Extract Patterns + Produce Understanding Map
54
+ From forcing question answers, extract: design patterns (with file:line anchors), naming conventions, error handling approach, data flow, assumptions.
55
+
56
+ Cross-reference against `coding-conventions.md`: documented vs undocumented patterns.
57
+
58
+ ### Stage 5: Persist
59
+ 1. Write `follow-{slug}-{date}.md` with understanding map
60
+ 2. Append new patterns to `lessons.jsonl` (source: "follow", stable INS-ids)
61
+ 3. If `--save-wiki`: create wiki note entry
62
+
63
+ **Next steps:** `/learn-decompose <path>`, `/spec-add coding ...`, `/learn-second-opinion <file>`
64
+ </execution>
65
+
66
+ <error_codes>
67
+ | Code | Severity | Condition | Recovery |
68
+ |------|----------|-----------|----------|
69
+ | E001 | error | Target not resolvable | Check path/ID or rephrase topic |
70
+ | W001 | warning | Wiki graph unavailable | Proceed with code-only context |
71
+ | W002 | warning | coding-conventions.md not found | Patterns flagged "unknown status" |
72
+ | W003 | warning | Large target (>1000 lines) | Auto-switch to shallow depth |
73
+ </error_codes>
74
+
75
+ <success_criteria>
76
+ - [ ] Target resolved to concrete content
77
+ - [ ] Context web loaded (imports/exports or wiki links)
78
+ - [ ] All 4 forcing questions applied per section
79
+ - [ ] Patterns extracted with file:line anchors
80
+ - [ ] Understanding map produced with concepts, patterns, assumptions, questions
81
+ - [ ] `follow-{slug}-{date}.md` written
82
+ - [ ] `lessons.jsonl` appended with stable INS-ids
83
+ </success_criteria>
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: learn-investigate
3
+ description: Systematic question investigation with hypothesis testing, evidence logging, and 3-strike escalation. 4-phase pipeline — evidence collection, pattern matching, hypothesis testing, synthesis. Persists findings to lessons.jsonl.
4
+ argument-hint: "<question> [--scope <path>] [--max-hypotheses N]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Systematic investigation for understanding questions (not bug-fixing). 4-phase approach
10
+ with scope lock and 3-strike escalation. Produces structured evidence trails and
11
+ understanding documents that persist to the learning system.
12
+
13
+ Unlike `quality-debug` (fixing bugs during execution), this answers "how does X work?",
14
+ "why does Y happen?", "what would happen if Z?" questions.
15
+ </purpose>
16
+
17
+ <context>
18
+ $ARGUMENTS — question text and optional flags.
19
+
20
+ **Flags:**
21
+ - `--scope <path>` — Restrict to files under this directory (default: entire project)
22
+ - `--max-hypotheses N` — Max hypotheses before escalating (default: 3)
23
+
24
+ **Output**: `.workflow/learning/investigate-{slug}/` (evidence.ndjson, understanding.md, report.md)
25
+ </context>
26
+
27
+ <execution>
28
+
29
+ ### Stage 1: Frame the Question
30
+ - Parse question, generate slug, create investigation directory
31
+ - Search prior knowledge: wiki search, grep lessons.jsonl, read debug-notes.md
32
+ - Write initial `understanding.md`
33
+
34
+ ### Stage 2: Evidence Collection
35
+ 1. **Code search**: Grep keywords across scoped files
36
+ 2. **File inspection**: Read most relevant files
37
+ 3. **Import tracing**: Follow dependency chain
38
+ 4. **Git history**: `git log --oneline -10 -- <relevant-files>`
39
+
40
+ Each evidence item → `evidence.ndjson`:
41
+ ```json
42
+ {"ts":"ISO","type":"code|git|search|doc","source":"file:line","relevance":"high|medium|low","content":"...","note":"..."}
43
+ ```
44
+
45
+ ### Stage 3: Hypothesis Formation + Testing
46
+ Generate ranked hypotheses from evidence. For each (in rank order):
47
+ 1. Design test: what evidence would confirm/disprove?
48
+ 2. Execute test: code trace, targeted search, experiment
49
+ 3. Record result in `evidence.ndjson` (type: "test")
50
+ 4. Update `understanding.md`: confirmed / disproved / inconclusive
51
+
52
+ ### Stage 4: 3-Strike Escalation
53
+ If all hypotheses fail: broaden scope, search wiki with alt keywords, or mark INCONCLUSIVE.
54
+
55
+ ### Stage 5: Synthesize + Persist
56
+ 1. Write `report.md` with answer, evidence trail, hypothesis results
57
+ 2. Append to `lessons.jsonl`:
58
+ - Confirmed → category: "technique" / "pattern"
59
+ - Disproved → category: "gotcha"
60
+ 3. Display summary with next-step routing
61
+
62
+ **Next steps:** `/spec-add debug <finding>`, `/learn-follow <path>`, `/learn-decompose <module>`
63
+ </execution>
64
+
65
+ <error_codes>
66
+ | Code | Severity | Condition | Recovery |
67
+ |------|----------|-----------|----------|
68
+ | E001 | error | No question provided | Provide question as first argument |
69
+ | E002 | error | Scope path does not exist | Check --scope path |
70
+ | W001 | warning | No prior knowledge found | Proceed with fresh investigation |
71
+ | W002 | warning | Very few evidence matches (<3) | Broaden search terms |
72
+ | W003 | warning | All hypotheses inconclusive | Marked INCONCLUSIVE |
73
+ </error_codes>
74
+
75
+ <success_criteria>
76
+ - [ ] Question parsed and investigation directory created
77
+ - [ ] Evidence collected and logged to evidence.ndjson
78
+ - [ ] At least 1 hypothesis formed and tested
79
+ - [ ] understanding.md tracks evolving understanding
80
+ - [ ] report.md written with answer and evidence trail
81
+ - [ ] Findings appended to lessons.jsonl with stable INS-ids
82
+ - [ ] 3-strike escalation triggered if all hypotheses fail
83
+ </success_criteria>
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: learn-retro
3
+ description: Unified retrospective via CSV wave pipeline. Git lens (commit metrics, session detection, hotspots) and decision lens (multi-perspective evaluation via 3 parallel agents) with lens-based selection. Persists insights to lessons.jsonl.
4
+ argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"[--lens git|decision|all] [--days N] [--author <name>] [--area <path>] [--phase N] [--compare]\""
5
+ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Unified retrospective combining git activity analysis and decision quality evaluation.
10
+ Two lenses, usable independently or together:
11
+ - **git**: Commit metrics, session detection, per-author breakdown, file hotspots, trends
12
+ - **decision**: Decision tracing across wiki/specs/git, multi-perspective evaluation via 3 parallel agents
13
+
14
+ Works on raw git history and wiki/spec data — does not require completed phase artifacts.
15
+ </purpose>
16
+
17
+ <context>
18
+ $ARGUMENTS — lens selection and scope flags.
19
+
20
+ **Lens:** `--lens git` | `--lens decision` | `--lens all` (default)
21
+
22
+ **Git flags:** `--days N` (default: 7), `--author <name>`, `--area <path>`, `--compare`
23
+ **Decision flags:** `--phase N`, `--tag <tag>`, `--id <id>`
24
+
25
+ **Output**: `.workflow/learning/retro-{date}.md` + `retro-{date}.json`
26
+ </context>
27
+
28
+ <execution>
29
+
30
+ ### Phase 1: Parse + Select Lenses
31
+
32
+ ### Phase 2: Git Lens (skip if --lens decision)
33
+ **Sequential data gathering** (parallel git commands):
34
+ - Commit stats with shortstat
35
+ - Per-commit numstat for test/production LOC split
36
+ - Timestamps for session detection (>2hr gap clustering)
37
+ - File hotspots (most frequently changed)
38
+ - Per-author commit counts
39
+
40
+ **Compute**: commits, LOC, test ratio, churn rate, active days, sessions, per-author breakdown.
41
+ **Trend comparison** if prior `retro-*.json` exists.
42
+
43
+ ### Phase 3: Decision Lens (skip if --lens git)
44
+ **3a: Collect decisions** from wiki, specs, git log, phase context, lessons.jsonl.
45
+ **3b: Build decision registry** per decision (id, title, source, rationale, alternatives, evidence).
46
+
47
+ **3c: Multi-perspective evaluation** via spawn_agents_on_csv (3 parallel agents):
48
+
49
+ | id | perspective | focus |
50
+ |----|------------|-------|
51
+ | 1 | technical | Implementation vs intent, context drift. Grade: sound/degraded/violated |
52
+ | 2 | cost | Complexity added, coupling, tech debt. Grade: low-cost/acceptable/expensive |
53
+ | 3 | hindsight | Right call with current knowledge? Grade: confirmed/questionable/should-revisit |
54
+
55
+ **3d: Classify lifecycle**: Validated / Aging / Questionable / Stale / Reversed.
56
+
57
+ ### Phase 4: Unified Report
58
+ Write `retro-{date}.md` + `retro-{date}.json` with metrics, sessions, hotspots, decision health, combined insights, recommended actions.
59
+
60
+ ### Phase 5: Persist
61
+ Append insights to `lessons.jsonl` (source: "retro-git" or "retro-decision"). Display summary.
62
+
63
+ **Next steps:** `/learn-follow <path>`, `/quality-test-gen <area>`, `/learn-investigate <question>`
64
+ </execution>
65
+
66
+ <error_codes>
67
+ | Code | Severity | Condition | Recovery |
68
+ |------|----------|-----------|----------|
69
+ | E001 | error | Not inside git repo (git lens) | Navigate to git repo |
70
+ | E002 | error | No commits in time window | Increase --days |
71
+ | E003 | error | No decisions found (decision lens) | Check wiki/specs content |
72
+ | W001 | warning | .workflow/learning/ not found | Auto-bootstrap |
73
+ | W002 | warning | No prior retro for comparison | First retro establishes baseline |
74
+ | W003 | warning | Decision perspective agent failed | Proceed with partial evaluation |
75
+ </error_codes>
76
+
77
+ <success_criteria>
78
+ - [ ] Lens selection parsed correctly
79
+ - [ ] Git lens: metrics computed, sessions detected, hotspots identified
80
+ - [ ] Decision lens: decisions collected, 3 agents spawned in parallel, lifecycle classified
81
+ - [ ] Unified report written to retro-{date}.md + retro-{date}.json
82
+ - [ ] lessons.jsonl appended with insights (stable INS-ids)
83
+ </success_criteria>