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,505 +1,512 @@
1
- ---
2
- name: quality-retrospective
3
- description: Multi-lens 复盘 (retrospective) for completed phases. Context-Agent Fork loads phase artifacts once; four parallel lens agents (technical, process, quality, decision) analyze independently; synthesizer distills insights; outputs are routed to spec stubs, memory tips, issues, and lessons.jsonl.
4
- argument-hint: "[phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [--auto-yes]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep
6
- ---
7
-
8
- ## Auto Mode
9
-
10
- When `--auto-yes`: Accept all routing recommendations without prompting. Route all insights automatically.
11
-
12
- # Quality Retrospective
13
-
14
- ## Usage
15
-
16
- ```bash
17
- $quality-retrospective
18
- $quality-retrospective "3"
19
- $quality-retrospective "2..4"
20
- $quality-retrospective "--all"
21
- $quality-retrospective "3 --lens technical --no-route"
22
- $quality-retrospective "3 --compare 2 --auto-yes"
23
- ```
24
-
25
- **Flags**:
26
- - No phase argument → `scan` mode: report unreviewed completed phases, prompt selection
27
- - `<N>` → `single` mode: retrospect phase N
28
- - `<N>..<M>` `range` mode: retrospect phases N through M (inclusive)
29
- - `--all` batch mode: re-run for every completed phase
30
- - `--lens <name>` restrict to one lens (repeatable): `technical|process|quality|decision`
31
- - `--no-route` produce retrospective.{md,json} only; skip auto-creation of spec/note/issue
32
- - `--compare <M>` — emit a delta section vs phase M's prior retrospective
33
- - `--auto-yes` accept all routing recommendations without prompting
34
-
35
- **Storage written**:
36
- - `.workflow/phases/{NN}-{slug}/retrospective.md` — human-readable record
37
- - `.workflow/phases/{NN}-{slug}/retrospective.json` — structured record
38
- - `.workflow/specs/SPEC-retro-*.md` — spec stubs (one per spec-routed insight)
39
- - `.workflow/issues/issues.jsonl` appended issue rows (`source: "retrospective"`)
40
- - `.workflow/memory/TIP-*.md` — memory tips (via `manage-memory-capture` skill)
41
- - `.workflow/learning/lessons.jsonl` — append-only insight log
42
- - `.workflow/learning/learning-index.json` updated searchable index
43
-
44
- **Storage read (never modified)**:
45
- - `.workflow/phases/{NN}-{slug}/index.json`, `plan.json`, `verification.json`, `review.json`, `uat.md`
46
- - `.workflow/phases/{NN}-{slug}/.task/TASK-*.json`, `.summaries/TASK-*-summary.md`
47
- - `.workflow/issues/issues.jsonl`, `.workflow/state.json`
48
-
49
- ---
50
-
51
- ## Architecture
52
-
53
- ```
54
- +------------------------------------------------------------------+
55
- | quality-retrospective — Context-Agent Fork + Parallel Fan-out |
56
- +------------------------------------------------------------------+
57
-
58
- Stage 1-3: Read-only resolution (no writes)
59
- ┌─────────────────────────────────────────┐
60
- Parse mode Validate artifacts │
61
- [scan] Find unreviewed phases │
62
- └──────────────────┬──────────────────────┘
63
-
64
- Stage 4: Context-Agent Fork (Pattern 2.10)
65
- ┌────────────────────────────────────────────────────────────────┐
66
- │ spawn ctx (fork_turns: "none") │
67
- │ wait ctx │
68
- │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
69
- │ │lens-tech │lens-proc │lens-qual │lens-dec │ │
70
- │ │fork=true │fork=true │fork=true │ │fork=true │ │
71
- │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
72
- │ wait_agent([lens-tech, lens-proc, lens-qual, lens-dec])
73
- │ close lenses close ctx LAST │
74
- └──────────────────┬─────────────────────────────────────────────┘
75
- lens results
76
- Stage 5: Synthesizer
77
- ┌──────────────────────────────────────────┐
78
- │ spawn synthesizer (fork_turns: "none")
79
- │ → wait → close │
80
- └──────────────────┬───────────────────────┘
81
- │ distilled_insights
82
- Stage 6-8: Route → Write → Report
83
- ```
84
-
85
- ## Agent Registry
86
-
87
- | Agent | task_name | fork_turns | Responsibility |
88
- |-------|-----------|------------|----------------|
89
- | Context Agent | `ctx` | "none" | Load all phase artifacts: index.json, plan.json, verification.json, review.json, uat.md, issues.jsonl, task summaries |
90
- | Technical Lens | `lens-tech` | "all" | Technical debt, architecture decisions, code quality gaps, performance issues |
91
- | Process Lens | `lens-proc` | "all" | Workflow efficiency, collaboration patterns, planning accuracy, bottlenecks |
92
- | Quality Lens | `lens-qual` | "all" | Test coverage gaps, verification failures, UAT issues, quality gate outcomes |
93
- | Decision Lens | `lens-dec` | "all" | Key decisions made, tradeoffs accepted, ADR candidates, reversibility |
94
- | Synthesizer | `synthesizer` | "none" | Merge lens results, deduplicate insights, classify routing targets |
95
-
96
- ## Fork Turns Strategy
97
-
98
- | Agent | task_name | fork_turns | fork_from | Rationale |
99
- |-------|-----------|------------|-----------|-----------|
100
- | Context Agent | `ctx` | "none" | | Independent artifact loader; clean start |
101
- | Technical Lens | `lens-tech` | "all" | `ctx` | Inherits loaded artifacts no redundant file reads |
102
- | Process Lens | `lens-proc` | "all" | `ctx` | Inherits loaded artifacts no redundant file reads |
103
- | Quality Lens | `lens-qual` | "all" | `ctx` | Inherits loaded artifacts — no redundant file reads |
104
- | Decision Lens | `lens-dec` | "all" | `ctx` | Inherits loaded artifacts no redundant file reads |
105
- | Synthesizer | `synthesizer` | "none" | — | Clean context; receives lens results via message |
106
-
107
- **Context-Agent Lifecycle**: Spawn `ctx` first → `wait_agent` → spawn all lens agents (`fork_turns: "all"`) → `wait_agent` batch for lenses → `close_agent` lenses → `close_agent ctx` LAST.
108
-
109
- > **fork_turns semantics**: `fork_turns: "all"` means the spawned agent inherits the *orchestrator's* current conversation context — not the ctx agent's own context. When `wait_agent` for ctx returns, the ctx agent's completed artifact summaries are visible in the orchestrator's context. Lens agents forked after that point therefore inherit those summaries. Lens agents do **not** fork directly from `ctx`; the `fork_from: ctx` column above is conceptual shorthand for this sequencing.
110
-
111
- ---
112
-
113
- ## Implementation
114
-
115
- ### Session Initialization
116
-
117
- ```javascript
118
- functions.update_plan({
119
- explanation: "Starting retrospective",
120
- plan: [
121
- { step: "Stage 1-3: Parse mode and validate artifacts", status: "in_progress" },
122
- { step: "Stage 4: Context-Agent Fork + parallel lens analysis", status: "pending" },
123
- { step: "Stage 5: Synthesize insights", status: "pending" },
124
- { step: "Stage 6: Route outputs", status: "pending" },
125
- { step: "Stage 7: Write artifacts", status: "pending" },
126
- { step: "Stage 8: Report", status: "pending" }
127
- ]
128
- })
129
- ```
130
-
131
- ### Stages 1–3: Parse Mode and Validate Artifacts
132
-
133
- **Stage 1: Parse mode** from `$ARGUMENTS`:
134
-
135
- | First non-flag token | Mode |
136
- |---------------------|------|
137
- | (empty) | scan |
138
- | `<N>` (single digit/number) | single |
139
- | `<N>..<M>` | range |
140
- | `--all` flag present | all |
141
-
142
- Validate `--lens` values. If `--compare <M>` present, require single mode.
143
-
144
- **Stage 2: Validate phase artifacts**. For each target phase:
145
- - Phase directory `.workflow/phases/{NN}-{slug}/` must exist
146
- - `index.json` must show `status: "completed"`
147
- - `.task/` directory must exist with at least one `TASK-*.json`
148
- - If existing `retrospective.json` found and not `--all`: emit W002, prompt overwrite
149
-
150
- **Stage 3: Scan mode** — list all completed phases without retrospective.json. Prompt user to select.
151
-
152
- ```javascript
153
- functions.update_plan({
154
- explanation: "Artifacts validated, spawning analysis agents",
155
- plan: [
156
- { step: "Stage 1-3: Parse mode and validate artifacts", status: "completed" },
157
- { step: "Stage 4: Context-Agent Fork + parallel lens analysis", status: "in_progress" },
158
- { step: "Stage 5: Synthesize insights", status: "pending" },
159
- { step: "Stage 6: Route outputs", status: "pending" },
160
- { step: "Stage 7: Write artifacts", status: "pending" },
161
- { step: "Stage 8: Report", status: "pending" }
162
- ]
163
- })
164
- ```
165
-
166
- ### Stage 4: Context-Agent Fork + Parallel Lens Analysis
167
-
168
- **Archive if overwriting**:
169
- If existing `retrospective.{md,json}` present, move to `{phase_dir}/.history/` with timestamp suffix before spawning.
170
-
171
- **Step 4a: Spawn context agent**
172
- ```javascript
173
- spawn_agent({
174
- task_name: "ctx",
175
- fork_turns: "none",
176
- message: `## TASK ASSIGNMENT
177
-
178
- ### MANDATORY FIRST STEPS
179
- 1. Read: ~/.codex/agents/cli-explore-agent.md
180
-
181
- ---
182
-
183
- Goal: Load and summarize all phase artifacts for retrospective analysis.
184
- Phase: ${phaseDir}
185
-
186
- TASK:
187
- 1. Read ${phaseDir}/index.json, plan.json, verification.json, review.json, uat.md
188
- 2. Read all .task/TASK-*.json and .summaries/TASK-*-summary.md
189
- 3. Read .workflow/issues/issues.jsonl — filter rows with phase link to this phase
190
- 4. Read .workflow/state.json for project context
191
-
192
- EXPECTED: Comprehensive artifact summary covering:
193
- - Phase goals and outcomes (from plan.json vs verification.json)
194
- - Task completion rates and failed tasks
195
- - Verification results: passed/failed criteria
196
- - Review findings: issues found, severity distribution
197
- - UAT results: scenarios passed/failed
198
- - Related issues: open/resolved counts
199
- - Key metrics: lines changed, test coverage, time taken
200
- `
201
- })
202
- wait_agent({ timeout_ms: 1800000 }) // initial spawn: 30 min
203
- ```
204
-
205
- **Step 4b: Fork 4 lens agents** (only active lenses based on `--lens` flag; default: all 4)
206
- ```javascript
207
- spawn_agent({
208
- task_name: "lens-tech",
209
- fork_turns: "all",
210
- message: `## TECHNICAL LENS ANALYSIS
211
-
212
- Analyze the loaded phase artifacts from a TECHNICAL perspective.
213
-
214
- Focus areas:
215
- - Technical debt introduced or resolved
216
- - Architecture decisions and their rationale
217
- - Code quality issues (from review.json findings)
218
- - Performance gaps or regressions
219
- - Security concerns
220
- - Dependencies added or changed
221
-
222
- EXPECTED: JSON array of insights, each: {
223
- "title": "<80 chars>",
224
- "summary": "<full finding>",
225
- "category": "pattern|antipattern|decision|tool|gotcha|technique",
226
- "routing": "spec|issue|memory|none",
227
- "severity": "critical|high|medium|low",
228
- "evidence": "<file:line or artifact reference>"
229
- }
230
- `
231
- })
232
-
233
- spawn_agent({
234
- task_name: "lens-proc",
235
- fork_turns: "all",
236
- message: `## PROCESS LENS ANALYSIS
237
-
238
- Analyze the loaded phase artifacts from a PROCESS perspective.
239
-
240
- Focus areas:
241
- - Planning accuracy (estimated vs actual from plan.json)
242
- - Collaboration patterns and bottlenecks
243
- - Workflow efficiency (task sequencing, dependencies)
244
- - Communication gaps or coordination issues
245
- - Process improvements that worked or failed
246
-
247
- EXPECTED: Same JSON array schema as technical lens.
248
- `
249
- })
250
-
251
- spawn_agent({
252
- task_name: "lens-qual",
253
- fork_turns: "all",
254
- message: `## QUALITY LENS ANALYSIS
255
-
256
- Analyze the loaded phase artifacts from a QUALITY perspective.
257
-
258
- Focus areas:
259
- - Test coverage gaps (from verification.json, uat.md)
260
- - Quality gate outcomes (passed/failed criteria)
261
- - UAT failure patterns and root causes
262
- - Review blocking issues and their resolution
263
- - Missing test scenarios identified post-execution
264
-
265
- EXPECTED: Same JSON array schema as technical lens.
266
- `
267
- })
268
-
269
- spawn_agent({
270
- task_name: "lens-dec",
271
- fork_turns: "all",
272
- message: `## DECISION LENS ANALYSIS
273
-
274
- Analyze the loaded phase artifacts from a DECISION perspective.
275
-
276
- Focus areas:
277
- - Key architectural or design decisions made (from plan.json, task summaries)
278
- - Tradeoffs accepted and their downstream effects
279
- - ADR candidates (decisions significant enough to document)
280
- - Reversibility of decisions made
281
- - Decisions that should have been made differently
282
-
283
- EXPECTED: Same JSON array schema as technical lens.
284
- `
285
- })
286
-
287
- const lensResults = wait_agent({
288
- timeout_ms: 1800000 // initial spawn: 30 min
289
- })
290
-
291
- // Close lenses first
292
- ;["lens-tech", "lens-proc", "lens-qual", "lens-dec"].forEach(n => close_agent({ target: n }))
293
- // Close context agent LAST
294
- close_agent({ target: "ctx" })
295
- ```
296
-
297
- If `lensResults.timed_out` for any agent: emit W001, continue with partial coverage.
298
-
299
- ### Stage 5: Synthesize Insights
300
-
301
- ```javascript
302
- spawn_agent({
303
- task_name: "synthesizer",
304
- fork_turns: "none",
305
- message: `## SYNTHESIS TASK
306
-
307
- Merge and distill insights from 4 lens analyses.
308
-
309
- Lens results:
310
- ${JSON.stringify(lensResults.status, null, 2)}
311
-
312
- TASK:
313
- 1. Merge all insights across lenses into a single list
314
- 2. Deduplicate: if two lenses identified the same issue, merge into one (keep higher severity, combine evidence)
315
- 3. Generate stable INS-{8hex} id for each: hash(phase_num + lens + title)
316
- 4. Classify routing for each: spec (reusable pattern) | issue (recurring gap → create issue) | memory (process note) | none
317
- 5. Produce phase-level metrics summary
318
-
319
- EXPECTED: JSON with:
320
- - insights: array of {id, title, summary, category, lens, routing, severity, evidence}
321
- - metrics: {tasks_completed, tasks_failed, test_pass_rate, review_issues_count, uat_scenarios_passed}
322
- - routing_summary: {spec: N, issue: N, memory: N, none: N}
323
- `
324
- })
325
-
326
- const synthResult = wait_agent({ timeout_ms: 1800000 }) // initial spawn: 30 min
327
- close_agent({ target: "synthesizer" })
328
- ```
329
-
330
- ```javascript
331
- functions.update_plan({
332
- explanation: "Synthesis complete, routing outputs",
333
- plan: [
334
- { step: "Stage 1-3: Parse mode and validate artifacts", status: "completed" },
335
- { step: "Stage 4: Context-Agent Fork + parallel lens analysis", status: "completed" },
336
- { step: "Stage 5: Synthesize insights", status: "completed" },
337
- { step: "Stage 6: Route outputs", status: "in_progress" },
338
- { step: "Stage 7: Write artifacts", status: "pending" },
339
- { step: "Stage 8: Report", status: "pending" }
340
- ]
341
- })
342
- ```
343
-
344
- ### Stage 6: Route Outputs
345
-
346
- If `--no-route`: skip this stage.
347
-
348
- For each insight in `synthResult.insights`, route based on `routing` field:
349
-
350
- **Spec routing** (`routing: "spec"`):
351
- ```javascript
352
- functions.apply_patch:
353
- *** Begin Patch
354
- *** Add File: .workflow/specs/SPEC-retro-<INS-id>.md
355
- +---
356
- +id: <INS-id>
357
- +source: retrospective
358
- +phase: <N>
359
- +category: <category>
360
- +---
361
- +
362
- +# <title>
363
- +
364
- +<summary>
365
- +
366
- +**Evidence**: <evidence>
367
- *** End Patch
368
- ```
369
-
370
- **Issue routing** (`routing: "issue"`, severity critical/high):
371
- Append to `.workflow/issues/issues.jsonl`:
372
- ```json
373
- {
374
- "id": "ISS-<date>-<seq>",
375
- "title": "<insight title>",
376
- "status": "open",
377
- "priority": 2,
378
- "severity": "<severity>",
379
- "source": "retrospective",
380
- "description": "<insight summary>",
381
- "context": {"phase": <N>, "ins_id": "<INS-id>"},
382
- "issue_history": [{"action": "created", "at": "<ISO>", "by": "quality-retrospective"}]
383
- }
384
- ```
385
-
386
- **Memory routing** (`routing: "memory"`):
387
- ```javascript
388
- Skill({ skill: "manage-memory-capture", args: `tip "${insight.title} — ${insight.summary}" --tag retrospective,phase-${N}` })
389
- ```
390
-
391
- If `!AUTO_YES`: present routing table and ask confirmation before routing each group.
392
-
393
- ### Stage 7: Write Artifacts
394
-
395
- ```javascript
396
- functions.apply_patch:
397
- *** Begin Patch
398
- *** Add File: .workflow/phases/<NN>-<slug>/retrospective.json
399
- +{
400
- + "phase": <N>,
401
- + "phase_slug": "<slug>",
402
- + "retrospective_at": "<ISO>",
403
- + "lenses_run": ["technical", "process", "quality", "decision"],
404
- + "metrics": <metrics_from_synthesizer>,
405
- + "findings_by_lens": { "technical": [...], "process": [...], "quality": [...], "decision": [...] },
406
- + "distilled_insights": <insights_array>,
407
- + "routing_summary": <routing_summary>
408
- +}
409
- *** Add File: .workflow/phases/<NN>-<slug>/retrospective.md
410
- +# Retrospective: Phase <N> — <slug>
411
- +
412
- +> Generated: <ISO> | Lenses: technical, process, quality, decision
413
- +
414
- +## Metrics
415
- +| Metric | Value |
416
- +|--------|-------|
417
- +| Tasks completed | <N>/<total> |
418
- +| Test pass rate | <N>% |
419
- +| Review issues | <N> |
420
- +| UAT scenarios | <N>/<total> |
421
- +
422
- +## Findings by Lens
423
- +...
424
- +
425
- +## Distilled Insights
426
- +...
427
- +
428
- +## Routing Summary
429
- +...
430
- *** End Patch
431
- ```
432
-
433
- Append each insight to `.workflow/learning/lessons.jsonl` and update `learning-index.json`.
434
-
435
- If `.workflow/specs/learnings.md` already exists, append a one-line summary per insight (never create it).
436
-
437
- ```javascript
438
- functions.update_plan({
439
- explanation: "Retrospective complete",
440
- plan: [
441
- { step: "Stage 1-3: Parse mode and validate artifacts", status: "completed" },
442
- { step: "Stage 4: Context-Agent Fork + parallel lens analysis", status: "completed" },
443
- { step: "Stage 5: Synthesize insights", status: "completed" },
444
- { step: "Stage 6: Route outputs", status: "completed" },
445
- { step: "Stage 7: Write artifacts", status: "completed" },
446
- { step: "Stage 8: Report", status: "in_progress" }
447
- ]
448
- })
449
- ```
450
-
451
- ### Stage 8: Report
452
-
453
- ```
454
- === RETROSPECTIVE COMPLETE ===
455
- Phase: <N> (<slug>)
456
- Lenses: technical, process, quality, decision
457
- Insights: <total> (<N> new, <N> duplicates merged)
458
-
459
- ROUTING:
460
- Spec stubs: <N> → .workflow/specs/SPEC-retro-*.md
461
- Issues: <N> → .workflow/issues/issues.jsonl
462
- Memory tips: <N> → .workflow/memory/TIP-*.md
463
- Lessons: <N> → .workflow/learning/lessons.jsonl
464
-
465
- METRICS:
466
- Tasks: <N>/<total> completed
467
- Test pass: <N>%
468
- Review: <N> issues
469
-
470
- Next:
471
- $manage-status
472
- $manage-issue "list --source retrospective"
473
- $manage-learn "list --phase <N>"
474
- ```
475
-
476
- ---
477
-
478
- ## Error Handling
479
-
480
- | Code | Severity | Description | Stage |
481
- |------|----------|-------------|-------|
482
- | E001 | error | `.workflow/` not initialized | parse_input |
483
- | E002 | error | Unknown `--lens` name | parse_input |
484
- | E003 | error | `--compare` requires single phase mode | parse_input |
485
- | E004 | error | Phase has no execution artifacts (no .task/) | load_artifacts |
486
- | E005 | error | Phase directory not found or phase not completed | scan_unreviewed |
487
- | W001 | warning | One or more lens agents timed out — partial coverage | multi_lens_analysis |
488
- | W002 | warning | Existing retrospective.json found — prompted to overwrite | scan_unreviewed |
489
- | W003 | warning | `manage-memory-capture` did not return parseable TIP id; fell back to direct write | route_outputs |
490
- | W004 | warning | `--compare` target phase has no retrospective.json; delta omitted | load_artifacts |
491
-
492
- ---
493
-
494
- ## Core Rules
495
-
496
- 1. **Read-only until Stage 6**: Stages 1–5 must not write any files only read and analyze
497
- 2. **Context-agent spawns first**: `ctx` must complete before any lens agent is spawned
498
- 3. **Parallel lens dispatch**: All active lens agents spawned in a single batch, then `wait_agent` for all together — never sequentially
499
- 4. **Context-agent closes last**: Close all lens agents before closing `ctx`
500
- 5. **Synthesizer is isolated**: `fork_turns: "none"` — receives lens results only via message, not full conversation history
501
- 6. **Stable INS-ids**: `INS-{8hex}` from `hash(phase_num + lens + title)` — re-runs do not create duplicates
502
- 7. **Archive before overwrite**: Move existing retrospective.{md,json} to `.history/` with timestamp before writing new ones
503
- 8. **Spec learnings.md backward-compat**: Append to it only if it already exists — never create it
504
- 9. **Route confirmation**: Unless `--auto-yes`, present routing table and ask per-group before writing spec/issue/memory
505
- 10. **Lessons always written**: Append to `lessons.jsonl` regardless of `--no-route` routing only controls spec/issue/memory creation
1
+ ---
2
+ name: quality-retrospective
3
+ description: Multi-lens 复盘 (retrospective) for completed phases. Context-Agent Fork loads phase artifacts once; four parallel lens agents (technical, process, quality, decision) analyze independently; synthesizer distills insights; outputs are routed to spec stubs, memory tips, issues, and lessons.jsonl.
4
+ argument-hint: "[phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [--auto-yes]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
6
+ ---
7
+
8
+ <purpose>
9
+ Multi-lens retrospective for completed phases. Context-Agent Fork loads phase artifacts once;
10
+ four parallel lens agents (technical, process, quality, decision) analyze independently;
11
+ synthesizer distills insights; outputs are routed to spec stubs, memory tips, issues, and lessons.jsonl.
12
+
13
+ ```
14
+ +------------------------------------------------------------------+
15
+ | quality-retrospective -- Context-Agent Fork + Parallel Fan-out |
16
+ +------------------------------------------------------------------+
17
+
18
+ Stage 1-3: Read-only resolution (no writes)
19
+ +---------------------------------------------+
20
+ | Parse mode -> Validate artifacts |
21
+ | -> [scan] Find unreviewed phases |
22
+ +----------------------+-----------------------+
23
+ |
24
+ Stage 4: Context-Agent Fork (Pattern 2.10)
25
+ +----------------------------------------------------------------+
26
+ | spawn ctx (fork_turns: "none") |
27
+ | wait ctx |
28
+ | +----------+ +----------+ +----------+ +----------+ |
29
+ | |lens-tech | |lens-proc | |lens-qual | |lens-dec | |
30
+ | |fork=true | |fork=true | |fork=true | |fork=true | |
31
+ | +----------+ +----------+ +----------+ +----------+ |
32
+ | wait_agent([lens-tech, lens-proc, lens-qual, lens-dec]) |
33
+ | close lenses -> close ctx LAST |
34
+ +----------------------+-----------------------------------------+
35
+ | lens results
36
+ Stage 5: Synthesizer
37
+ +------------------------------------------+
38
+ | spawn synthesizer (fork_turns: "none") |
39
+ | -> wait -> close |
40
+ +----------------------+-------------------+
41
+ | distilled_insights
42
+ Stage 6-8: Route -> Write -> Report
43
+ ```
44
+ </purpose>
45
+
46
+ <context>
47
+ ```bash
48
+ $quality-retrospective
49
+ $quality-retrospective "3"
50
+ $quality-retrospective "2..4"
51
+ $quality-retrospective "--all"
52
+ $quality-retrospective "3 --lens technical --no-route"
53
+ $quality-retrospective "3 --compare 2 --auto-yes"
54
+ ```
55
+
56
+ **Flags**:
57
+ - No phase argument -> `scan` mode: report unreviewed completed phases, prompt selection
58
+ - `<N>` -> `single` mode: retrospect phase N
59
+ - `<N>..<M>` -> `range` mode: retrospect phases N through M (inclusive)
60
+ - `--all` -> batch mode: re-run for every completed phase
61
+ - `--lens <name>` -- restrict to one lens (repeatable): `technical|process|quality|decision`
62
+ - `--no-route` -- produce retrospective.{md,json} only; skip auto-creation of spec/note/issue
63
+ - `--compare <M>` -- emit a delta section vs phase M's prior retrospective
64
+ - `--auto-yes` -- accept all routing recommendations without prompting
65
+
66
+ When `--auto-yes`: Accept all routing recommendations without prompting. Route all insights automatically.
67
+
68
+ **Storage written**:
69
+ - `{target_dir}/retrospective.md` -- human-readable record (target_dir resolved via state.json artifact registry to `.workflow/scratch/{type}-{slug}-{date}/`; legacy fallback to `.workflow/phases/{NN}-{slug}/`)
70
+ - `{target_dir}/retrospective.json` -- structured record
71
+ - `.workflow/specs/SPEC-retro-*.md` -- spec stubs (one per spec-routed insight)
72
+ - `.workflow/issues/issues.jsonl` -- appended issue rows (`source: "retrospective"`)
73
+ - `.workflow/memory/TIP-*.md` -- memory tips (via `manage-memory-capture` skill)
74
+ - `.workflow/learning/lessons.jsonl` -- append-only insight log
75
+ - `.workflow/learning/learning-index.json` -- updated searchable index
76
+
77
+ **Storage read (never modified)**:
78
+ - `{target_dir}/index.json`, `plan.json`, `verification.json`, `review.json`, `uat.md`
79
+ - `{target_dir}/.task/TASK-*.json`, `.summaries/TASK-*-summary.md`
80
+ - `.workflow/issues/issues.jsonl`, `.workflow/state.json`
81
+
82
+ ### Agent Registry
83
+
84
+ | Agent | task_name | fork_turns | Responsibility |
85
+ |-------|-----------|------------|----------------|
86
+ | Context Agent | `ctx` | "none" | Load all phase artifacts: index.json, plan.json, verification.json, review.json, uat.md, issues.jsonl, task summaries |
87
+ | Technical Lens | `lens-tech` | "all" | Technical debt, architecture decisions, code quality gaps, performance issues |
88
+ | Process Lens | `lens-proc` | "all" | Workflow efficiency, collaboration patterns, planning accuracy, bottlenecks |
89
+ | Quality Lens | `lens-qual` | "all" | Test coverage gaps, verification failures, UAT issues, quality gate outcomes |
90
+ | Decision Lens | `lens-dec` | "all" | Key decisions made, tradeoffs accepted, ADR candidates, reversibility |
91
+ | Synthesizer | `synthesizer` | "none" | Merge lens results, deduplicate insights, classify routing targets |
92
+
93
+ ### Fork Turns Strategy
94
+
95
+ | Agent | task_name | fork_turns | fork_from | Rationale |
96
+ |-------|-----------|------------|-----------|-----------|
97
+ | Context Agent | `ctx` | "none" | -- | Independent artifact loader; clean start |
98
+ | Technical Lens | `lens-tech` | "all" | `ctx` | Inherits loaded artifacts -- no redundant file reads |
99
+ | Process Lens | `lens-proc` | "all" | `ctx` | Inherits loaded artifacts -- no redundant file reads |
100
+ | Quality Lens | `lens-qual` | "all" | `ctx` | Inherits loaded artifacts -- no redundant file reads |
101
+ | Decision Lens | `lens-dec` | "all" | `ctx` | Inherits loaded artifacts -- no redundant file reads |
102
+ | Synthesizer | `synthesizer` | "none" | -- | Clean context; receives lens results via message |
103
+
104
+ **Context-Agent Lifecycle**: Spawn `ctx` first -> `wait_agent` -> spawn all lens agents (`fork_turns: "all"`) -> `wait_agent` batch for lenses -> `close_agent` lenses -> `close_agent ctx` LAST.
105
+
106
+ > **fork_turns semantics**: `fork_turns: "all"` means the spawned agent inherits the *orchestrator's* current conversation context -- not the ctx agent's own context. When `wait_agent` for ctx returns, the ctx agent's completed artifact summaries are visible in the orchestrator's context. Lens agents forked after that point therefore inherit those summaries. Lens agents do **not** fork directly from `ctx`; the `fork_from: ctx` column above is conceptual shorthand for this sequencing.
107
+ </context>
108
+
109
+ <invariants>
110
+ 1. **Read-only until Stage 6**: Stages 1-5 must not write any files -- only read and analyze
111
+ 2. **Context-agent spawns first**: `ctx` must complete before any lens agent is spawned
112
+ 3. **Parallel lens dispatch**: All active lens agents spawned in a single batch, then `wait_agent` for all together -- never sequentially
113
+ 4. **Context-agent closes last**: Close all lens agents before closing `ctx`
114
+ 5. **Synthesizer is isolated**: `fork_turns: "none"` -- receives lens results only via message, not full conversation history
115
+ 6. **Stable INS-ids**: `INS-{8hex}` from `hash(phase_num + lens + title)` -- re-runs do not create duplicates
116
+ 7. **Archive before overwrite**: Move existing retrospective.{md,json} to `.history/` with timestamp before writing new ones
117
+ 8. **Spec learnings.md backward-compat**: Append to it only if it already exists -- never create it
118
+ 9. **Route confirmation**: Unless `--auto-yes`, present routing table and ask per-group before writing spec/issue/memory
119
+ 10. **Lessons always written**: Append to `lessons.jsonl` regardless of `--no-route` -- routing only controls spec/issue/memory creation
120
+ </invariants>
121
+
122
+ <execution>
123
+
124
+ ### Session Initialization
125
+
126
+ ```javascript
127
+ functions.update_plan({
128
+ explanation: "Starting retrospective",
129
+ plan: [
130
+ { step: "Stage 1-3: Parse mode and validate artifacts", status: "in_progress" },
131
+ { step: "Stage 4: Context-Agent Fork + parallel lens analysis", status: "pending" },
132
+ { step: "Stage 5: Synthesize insights", status: "pending" },
133
+ { step: "Stage 6: Route outputs", status: "pending" },
134
+ { step: "Stage 7: Write artifacts", status: "pending" },
135
+ { step: "Stage 8: Report", status: "pending" }
136
+ ]
137
+ })
138
+ ```
139
+
140
+ ### Stages 1-3: Parse Mode and Validate Artifacts
141
+
142
+ **Stage 1: Parse mode** from `$ARGUMENTS`:
143
+
144
+ | First non-flag token | Mode |
145
+ |---------------------|------|
146
+ | (empty) | scan |
147
+ | `<N>` (single digit/number) | single |
148
+ | `<N>..<M>` | range |
149
+ | `--all` flag present | all |
150
+
151
+ Validate `--lens` values. If `--compare <M>` present, require single mode.
152
+
153
+ **Stage 2: Validate phase artifacts**. For each target phase:
154
+ - Phase directory must exist (resolved via state.json artifact registry to `.workflow/scratch/{type}-{slug}-{date}/`; legacy fallback to `.workflow/phases/{NN}-{slug}/`)
155
+ - `index.json` must show `status: "completed"`
156
+ - `.task/` directory must exist with at least one `TASK-*.json`
157
+ - If existing `retrospective.json` found and not `--all`: emit W002, prompt overwrite
158
+
159
+ **Stage 3: Scan mode** -- list all completed phases without retrospective.json. Prompt user to select.
160
+
161
+ ```javascript
162
+ functions.update_plan({
163
+ explanation: "Artifacts validated, spawning analysis agents",
164
+ plan: [
165
+ { step: "Stage 1-3: Parse mode and validate artifacts", status: "completed" },
166
+ { step: "Stage 4: Context-Agent Fork + parallel lens analysis", status: "in_progress" },
167
+ { step: "Stage 5: Synthesize insights", status: "pending" },
168
+ { step: "Stage 6: Route outputs", status: "pending" },
169
+ { step: "Stage 7: Write artifacts", status: "pending" },
170
+ { step: "Stage 8: Report", status: "pending" }
171
+ ]
172
+ })
173
+ ```
174
+
175
+ ### Stage 4: Context-Agent Fork + Parallel Lens Analysis
176
+
177
+ **Archive if overwriting**:
178
+ If existing `retrospective.{md,json}` present, move to `{phase_dir}/.history/` with timestamp suffix before spawning.
179
+
180
+ **Step 4a: Spawn context agent**
181
+ ```javascript
182
+ spawn_agent({
183
+ task_name: "ctx",
184
+ fork_turns: "none",
185
+ message: `## TASK ASSIGNMENT
186
+
187
+ ### MANDATORY FIRST STEPS
188
+ 1. Read: ~/.codex/agents/cli-explore-agent.md
189
+
190
+ ---
191
+
192
+ Goal: Load and summarize all phase artifacts for retrospective analysis.
193
+ Phase: ${phaseDir}
194
+
195
+ TASK:
196
+ 1. Read ${phaseDir}/index.json, plan.json, verification.json, review.json, uat.md
197
+ 2. Read all .task/TASK-*.json and .summaries/TASK-*-summary.md
198
+ 3. Read .workflow/issues/issues.jsonl -- filter rows with phase link to this phase
199
+ 4. Read .workflow/state.json for project context
200
+
201
+ EXPECTED: Comprehensive artifact summary covering:
202
+ - Phase goals and outcomes (from plan.json vs verification.json)
203
+ - Task completion rates and failed tasks
204
+ - Verification results: passed/failed criteria
205
+ - Review findings: issues found, severity distribution
206
+ - UAT results: scenarios passed/failed
207
+ - Related issues: open/resolved counts
208
+ - Key metrics: lines changed, test coverage, time taken
209
+ `
210
+ })
211
+ wait_agent({ timeout_ms: 1800000 }) // initial spawn: 30 min
212
+ ```
213
+
214
+ **Step 4b: Fork 4 lens agents** (only active lenses based on `--lens` flag; default: all 4)
215
+ ```javascript
216
+ spawn_agent({
217
+ task_name: "lens-tech",
218
+ fork_turns: "all",
219
+ message: `## TECHNICAL LENS ANALYSIS
220
+
221
+ Analyze the loaded phase artifacts from a TECHNICAL perspective.
222
+
223
+ Focus areas:
224
+ - Technical debt introduced or resolved
225
+ - Architecture decisions and their rationale
226
+ - Code quality issues (from review.json findings)
227
+ - Performance gaps or regressions
228
+ - Security concerns
229
+ - Dependencies added or changed
230
+
231
+ EXPECTED: JSON array of insights, each: {
232
+ "title": "<80 chars>",
233
+ "summary": "<full finding>",
234
+ "category": "pattern|antipattern|decision|tool|gotcha|technique",
235
+ "routing": "spec|issue|memory|none",
236
+ "severity": "critical|high|medium|low",
237
+ "evidence": "<file:line or artifact reference>"
238
+ }
239
+ `
240
+ })
241
+
242
+ spawn_agent({
243
+ task_name: "lens-proc",
244
+ fork_turns: "all",
245
+ message: `## PROCESS LENS ANALYSIS
246
+
247
+ Analyze the loaded phase artifacts from a PROCESS perspective.
248
+
249
+ Focus areas:
250
+ - Planning accuracy (estimated vs actual from plan.json)
251
+ - Collaboration patterns and bottlenecks
252
+ - Workflow efficiency (task sequencing, dependencies)
253
+ - Communication gaps or coordination issues
254
+ - Process improvements that worked or failed
255
+
256
+ EXPECTED: Same JSON array schema as technical lens.
257
+ `
258
+ })
259
+
260
+ spawn_agent({
261
+ task_name: "lens-qual",
262
+ fork_turns: "all",
263
+ message: `## QUALITY LENS ANALYSIS
264
+
265
+ Analyze the loaded phase artifacts from a QUALITY perspective.
266
+
267
+ Focus areas:
268
+ - Test coverage gaps (from verification.json, uat.md)
269
+ - Quality gate outcomes (passed/failed criteria)
270
+ - UAT failure patterns and root causes
271
+ - Review blocking issues and their resolution
272
+ - Missing test scenarios identified post-execution
273
+
274
+ EXPECTED: Same JSON array schema as technical lens.
275
+ `
276
+ })
277
+
278
+ spawn_agent({
279
+ task_name: "lens-dec",
280
+ fork_turns: "all",
281
+ message: `## DECISION LENS ANALYSIS
282
+
283
+ Analyze the loaded phase artifacts from a DECISION perspective.
284
+
285
+ Focus areas:
286
+ - Key architectural or design decisions made (from plan.json, task summaries)
287
+ - Tradeoffs accepted and their downstream effects
288
+ - ADR candidates (decisions significant enough to document)
289
+ - Reversibility of decisions made
290
+ - Decisions that should have been made differently
291
+
292
+ EXPECTED: Same JSON array schema as technical lens.
293
+ `
294
+ })
295
+
296
+ const lensResults = wait_agent({
297
+ timeout_ms: 1800000 // initial spawn: 30 min
298
+ })
299
+
300
+ // Close lenses first
301
+ ;["lens-tech", "lens-proc", "lens-qual", "lens-dec"].forEach(n => close_agent({ target: n }))
302
+ // Close context agent LAST
303
+ close_agent({ target: "ctx" })
304
+ ```
305
+
306
+ If `lensResults.timed_out` for any agent: emit W001, continue with partial coverage.
307
+
308
+ ### Stage 5: Synthesize Insights
309
+
310
+ ```javascript
311
+ spawn_agent({
312
+ task_name: "synthesizer",
313
+ fork_turns: "none",
314
+ message: `## SYNTHESIS TASK
315
+
316
+ Merge and distill insights from 4 lens analyses.
317
+
318
+ Lens results:
319
+ ${JSON.stringify(lensResults.status, null, 2)}
320
+
321
+ TASK:
322
+ 1. Merge all insights across lenses into a single list
323
+ 2. Deduplicate: if two lenses identified the same issue, merge into one (keep higher severity, combine evidence)
324
+ 3. Generate stable INS-{8hex} id for each: hash(phase_num + lens + title)
325
+ 4. Classify routing for each: spec (reusable pattern) | issue (recurring gap -> create issue) | memory (process note) | none
326
+ 5. Produce phase-level metrics summary
327
+
328
+ EXPECTED: JSON with:
329
+ - insights: array of {id, title, summary, category, lens, routing, severity, evidence}
330
+ - metrics: {tasks_completed, tasks_failed, test_pass_rate, review_issues_count, uat_scenarios_passed}
331
+ - routing_summary: {spec: N, issue: N, memory: N, none: N}
332
+ `
333
+ })
334
+
335
+ const synthResult = wait_agent({ timeout_ms: 1800000 }) // initial spawn: 30 min
336
+ close_agent({ target: "synthesizer" })
337
+ ```
338
+
339
+ ```javascript
340
+ functions.update_plan({
341
+ explanation: "Synthesis complete, routing outputs",
342
+ plan: [
343
+ { step: "Stage 1-3: Parse mode and validate artifacts", status: "completed" },
344
+ { step: "Stage 4: Context-Agent Fork + parallel lens analysis", status: "completed" },
345
+ { step: "Stage 5: Synthesize insights", status: "completed" },
346
+ { step: "Stage 6: Route outputs", status: "in_progress" },
347
+ { step: "Stage 7: Write artifacts", status: "pending" },
348
+ { step: "Stage 8: Report", status: "pending" }
349
+ ]
350
+ })
351
+ ```
352
+
353
+ ### Stage 6: Route Outputs
354
+
355
+ If `--no-route`: skip this stage.
356
+
357
+ For each insight in `synthResult.insights`, route based on `routing` field:
358
+
359
+ **Spec routing** (`routing: "spec"`):
360
+ ```javascript
361
+ functions.apply_patch:
362
+ *** Begin Patch
363
+ *** Add File: .workflow/specs/SPEC-retro-<INS-id>.md
364
+ +---
365
+ +id: <INS-id>
366
+ +source: retrospective
367
+ +phase: <N>
368
+ +category: <category>
369
+ +---
370
+ +
371
+ +# <title>
372
+ +
373
+ +<summary>
374
+ +
375
+ +**Evidence**: <evidence>
376
+ *** End Patch
377
+ ```
378
+
379
+ **Issue routing** (`routing: "issue"`, severity critical/high):
380
+ Append to `.workflow/issues/issues.jsonl`:
381
+ ```json
382
+ {
383
+ "id": "ISS-<date>-<seq>",
384
+ "title": "<insight title>",
385
+ "status": "open",
386
+ "priority": 2,
387
+ "severity": "<severity>",
388
+ "source": "retrospective",
389
+ "description": "<insight summary>",
390
+ "context": {"phase": "<N>", "ins_id": "<INS-id>"},
391
+ "issue_history": [{"action": "created", "at": "<ISO>", "by": "quality-retrospective"}]
392
+ }
393
+ ```
394
+
395
+ **Memory routing** (`routing: "memory"`):
396
+ ```javascript
397
+ Skill({ skill: "manage-memory-capture", args: `tip "${insight.title} -- ${insight.summary}" --tag retrospective,phase-${N}` })
398
+ ```
399
+
400
+ If `!AUTO_YES`: present routing table and ask confirmation before routing each group.
401
+
402
+ ### Stage 7: Write Artifacts
403
+
404
+ ```javascript
405
+ functions.apply_patch:
406
+ *** Begin Patch
407
+ *** Add File: <target_dir>/retrospective.json
408
+ +{
409
+ + "phase": <N>,
410
+ + "phase_slug": "<slug>",
411
+ + "retrospective_at": "<ISO>",
412
+ + "lenses_run": ["technical", "process", "quality", "decision"],
413
+ + "metrics": <metrics_from_synthesizer>,
414
+ + "findings_by_lens": { "technical": [...], "process": [...], "quality": [...], "decision": [...] },
415
+ + "distilled_insights": <insights_array>,
416
+ + "routing_summary": <routing_summary>
417
+ +}
418
+ *** Add File: <target_dir>/retrospective.md
419
+ +# Retrospective: Phase <N> -- <slug>
420
+ +
421
+ +> Generated: <ISO> | Lenses: technical, process, quality, decision
422
+ +
423
+ +## Metrics
424
+ +| Metric | Value |
425
+ +|--------|-------|
426
+ +| Tasks completed | <N>/<total> |
427
+ +| Test pass rate | <N>% |
428
+ +| Review issues | <N> |
429
+ +| UAT scenarios | <N>/<total> |
430
+ +
431
+ +## Findings by Lens
432
+ +...
433
+ +
434
+ +## Distilled Insights
435
+ +...
436
+ +
437
+ +## Routing Summary
438
+ +...
439
+ *** End Patch
440
+ ```
441
+
442
+ Append each insight to `.workflow/learning/lessons.jsonl` and update `learning-index.json`.
443
+
444
+ If `.workflow/specs/learnings.md` already exists, append a one-line summary per insight (never create it).
445
+
446
+ ```javascript
447
+ functions.update_plan({
448
+ explanation: "Retrospective complete",
449
+ plan: [
450
+ { step: "Stage 1-3: Parse mode and validate artifacts", status: "completed" },
451
+ { step: "Stage 4: Context-Agent Fork + parallel lens analysis", status: "completed" },
452
+ { step: "Stage 5: Synthesize insights", status: "completed" },
453
+ { step: "Stage 6: Route outputs", status: "completed" },
454
+ { step: "Stage 7: Write artifacts", status: "completed" },
455
+ { step: "Stage 8: Report", status: "in_progress" }
456
+ ]
457
+ })
458
+ ```
459
+
460
+ ### Stage 8: Report
461
+
462
+ ```
463
+ === RETROSPECTIVE COMPLETE ===
464
+ Phase: <N> (<slug>)
465
+ Lenses: technical, process, quality, decision
466
+ Insights: <total> (<N> new, <N> duplicates merged)
467
+
468
+ ROUTING:
469
+ Spec stubs: <N> -> .workflow/specs/SPEC-retro-*.md
470
+ Issues: <N> -> .workflow/issues/issues.jsonl
471
+ Memory tips: <N> -> .workflow/memory/TIP-*.md
472
+ Lessons: <N> -> .workflow/learning/lessons.jsonl
473
+
474
+ METRICS:
475
+ Tasks: <N>/<total> completed
476
+ Test pass: <N>%
477
+ Review: <N> issues
478
+
479
+ Next:
480
+ $manage-status
481
+ $manage-issue "list --source retrospective"
482
+ $manage-learn "list --phase <N>"
483
+ ```
484
+ </execution>
485
+
486
+ <error_codes>
487
+
488
+ | Code | Severity | Description | Stage |
489
+ |------|----------|-------------|-------|
490
+ | E001 | error | `.workflow/` not initialized | parse_input |
491
+ | E002 | error | Unknown `--lens` name | parse_input |
492
+ | E003 | error | `--compare` requires single phase mode | parse_input |
493
+ | E004 | error | Phase has no execution artifacts (no .task/) | load_artifacts |
494
+ | E005 | error | Phase directory not found or phase not completed | scan_unreviewed |
495
+ | W001 | warning | One or more lens agents timed out -- partial coverage | multi_lens_analysis |
496
+ | W002 | warning | Existing retrospective.json found -- prompted to overwrite | scan_unreviewed |
497
+ | W003 | warning | `manage-memory-capture` did not return parseable TIP id; fell back to direct write | route_outputs |
498
+ | W004 | warning | `--compare` target phase has no retrospective.json; delta omitted | load_artifacts |
499
+ </error_codes>
500
+
501
+ <success_criteria>
502
+ - [ ] Mode correctly parsed from arguments (scan/single/range/all)
503
+ - [ ] Phase artifacts validated before analysis begins
504
+ - [ ] Context agent loads all artifacts before lens agents spawn
505
+ - [ ] All active lens agents spawned in parallel, waited as batch
506
+ - [ ] Context agent closed last (after all lens agents)
507
+ - [ ] Synthesizer produces deduplicated insights with stable INS-ids
508
+ - [ ] Routing applied per insight (spec/issue/memory/none) with confirmation
509
+ - [ ] retrospective.{md,json} written to phase directory
510
+ - [ ] Lessons appended to lessons.jsonl regardless of --no-route flag
511
+ - [ ] Existing retrospective archived before overwrite
512
+ </success_criteria>