maestro-flow 0.4.2 → 0.4.4

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 (302) hide show
  1. package/.claude/commands/maestro-analyze.md +1 -1
  2. package/.claude/commands/maestro-brainstorm.md +1 -1
  3. package/.claude/commands/maestro-collab.md +1 -1
  4. package/.claude/commands/maestro-execute.md +10 -1
  5. package/.claude/commands/maestro-guard.md +101 -0
  6. package/.claude/commands/maestro-impeccable.md +1 -1
  7. package/.claude/commands/maestro-plan.md +15 -2
  8. package/.claude/commands/maestro-ralph-execute.md +9 -2
  9. package/.claude/commands/maestro-ralph.md +8 -1
  10. package/.claude/commands/maestro-verify.md +15 -1
  11. package/.claude/commands/quality-auto-test.md +1 -1
  12. package/.claude/commands/quality-debug.md +1 -1
  13. package/.claude/commands/quality-refactor.md +1 -1
  14. package/.claude/commands/quality-retrospective.md +1 -1
  15. package/.claude/commands/quality-review.md +15 -1
  16. package/.claude/commands/quality-test.md +1 -1
  17. package/.claude/commands/security-audit.md +154 -0
  18. package/.claude/skills/maestro-help/index/catalog.json +2 -0
  19. package/.codex/skills/maestro-analyze/SKILL.md +18 -1
  20. package/.codex/skills/maestro-brainstorm/SKILL.md +17 -4
  21. package/.codex/skills/maestro-collab/SKILL.md +7 -1
  22. package/.codex/skills/maestro-execute/SKILL.md +365 -348
  23. package/.codex/skills/maestro-guard/SKILL.md +97 -0
  24. package/.codex/skills/maestro-impeccable/SKILL.md +1 -1
  25. package/.codex/skills/maestro-plan/SKILL.md +66 -7
  26. package/.codex/skills/maestro-ralph/SKILL.md +1 -1
  27. package/.codex/skills/maestro-verify/SKILL.md +18 -1
  28. package/.codex/skills/quality-auto-test/SKILL.md +13 -3
  29. package/.codex/skills/quality-debug/SKILL.md +362 -346
  30. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  31. package/.codex/skills/quality-retrospective/SKILL.md +292 -292
  32. package/.codex/skills/quality-review/SKILL.md +374 -365
  33. package/.codex/skills/quality-test/SKILL.md +1 -1
  34. package/.codex/skills/security-audit/SKILL.md +154 -0
  35. package/bin/maestro-hook-runner.js +21 -1
  36. package/dashboard/dist/assets/{ArtifactsPage-iJZtYsmR.js → ArtifactsPage-CVh0Z2I2.js} +3 -3
  37. package/dashboard/dist/assets/{ChatInput-DNnDLdQF.js → ChatInput-CBI3qHQQ.js} +2 -2
  38. package/dashboard/dist/assets/ChatPage-BjJ9CYox.js +22 -0
  39. package/dashboard/dist/assets/CollabPage-CprGGO9y.js +1 -0
  40. package/dashboard/dist/assets/{ExecutionPanel-BKV3GZ7Q.js → ExecutionPanel-CClxD7cH.js} +1 -1
  41. package/dashboard/dist/assets/KanbanPage-copqjdPg.js +16 -0
  42. package/dashboard/dist/assets/MaestroCoordinatePage-CioZjQ9N.js +4 -0
  43. package/dashboard/dist/assets/{MarkdownRenderer-cYFfe1uX.js → MarkdownRenderer-CtUhoxCT.js} +1 -1
  44. package/dashboard/dist/assets/McpPage-BcPPcJpr.js +21 -0
  45. package/dashboard/dist/assets/{MeetingRoomPage-wnvT7wlB.js → MeetingRoomPage-BgmAKxU-.js} +1 -1
  46. package/dashboard/dist/assets/{OutputPanel-DDL90Idy.js → OutputPanel-DgT3gMyp.js} +1 -1
  47. package/dashboard/dist/assets/{ProblemsPanel-zFN9IIs0.js → ProblemsPanel-BmG7rxoG.js} +1 -1
  48. package/dashboard/dist/assets/{RequirementBoardPage-DOPJoT0I.js → RequirementBoardPage-k8YoeQ0r.js} +1 -1
  49. package/dashboard/dist/assets/{RequirementPage-CEVquRgM.js → RequirementPage-Da2354px.js} +1 -1
  50. package/dashboard/dist/assets/{RoomsPage-D5USEWDh.js → RoomsPage-BtqDiYaU.js} +1 -1
  51. package/dashboard/dist/assets/SpecsPage-ByPVH_M3.js +36 -0
  52. package/dashboard/dist/assets/{TeamsPage-DlcEmr_Q.js → TeamsPage-sFDLN30L.js} +1 -1
  53. package/dashboard/dist/assets/{TreeBrowser-Y48Wz-QY.js → TreeBrowser-oEx8YJXV.js} +1 -1
  54. package/dashboard/dist/assets/WorkflowPage-JrX7CVHh.js +6 -0
  55. package/dashboard/dist/assets/{arrow-left-NCUOENvg.js → arrow-left-DYvgSdIH.js} +1 -1
  56. package/dashboard/dist/assets/{check-o7nfGNHf.js → check-jcgYBWVR.js} +1 -1
  57. package/dashboard/dist/assets/{chevron-right-BXySK2fn.js → chevron-right-DvZ5sMOg.js} +1 -1
  58. package/dashboard/dist/assets/{circle-cooAwnAR.js → circle-DYT-zoRZ.js} +1 -1
  59. package/dashboard/dist/assets/{circle-alert-DcSBokh4.js → circle-alert-Bfbv3gt4.js} +1 -1
  60. package/dashboard/dist/assets/{circle-check-Cd-jce4j.js → circle-check-D82WnpbI.js} +1 -1
  61. package/dashboard/dist/assets/{circle-check-big-BN7Mdp4i.js → circle-check-big-CPVD1GKF.js} +1 -1
  62. package/dashboard/dist/assets/{code-BQa9oL1n.js → code-B3bKFGI4.js} +1 -1
  63. package/dashboard/dist/assets/{columns-3-BzgxelGx.js → columns-3-BeMAQCix.js} +1 -1
  64. package/dashboard/dist/assets/{download-swRJnate.js → download-BCtpoWYB.js} +1 -1
  65. package/dashboard/dist/assets/en-2h6fD0j8.js +1 -0
  66. package/dashboard/dist/assets/{folder-DbGbLNFN.js → folder-CTj6SNNu.js} +1 -1
  67. package/dashboard/dist/assets/index-6-yE5Yl9.css +1 -0
  68. package/dashboard/dist/assets/{index-DIoMBMbv.js → index-BxR_3IbJ.js} +1 -1
  69. package/dashboard/dist/assets/{index-DLBN_7fb.js → index-CWBJLu42.js} +1 -1
  70. package/dashboard/dist/assets/index-DpcPd-UG.js +236 -0
  71. package/dashboard/dist/assets/{list-BTRAIvDq.js → list-BMv8pIQn.js} +1 -1
  72. package/dashboard/dist/assets/{loader-NHtB6Mdn.js → loader-DdM4VOgF.js} +1 -1
  73. package/dashboard/dist/assets/{minus-BjMxRTET.js → minus-D15s2E__.js} +1 -1
  74. package/dashboard/dist/assets/{pen-line-C4_O16H0.js → pen-line-DO6o4xWz.js} +1 -1
  75. package/dashboard/dist/assets/{pencil-DTmKhyDY.js → pencil-qGxg9jOe.js} +1 -1
  76. package/dashboard/dist/assets/{proxy-Dtx5p6IO.js → proxy-DOffTzwA.js} +1 -1
  77. package/dashboard/dist/assets/refresh-cw-C9UNdLCy.js +6 -0
  78. package/dashboard/dist/assets/{rows-2-GR1dZtRu.js → rows-2-CifAA5SL.js} +1 -1
  79. package/dashboard/dist/assets/{search-DVtgy2W7.js → search-pe7pU1YN.js} +1 -1
  80. package/dashboard/dist/assets/{shallow-BOmvDNsv.js → shallow-r7YynQYA.js} +1 -1
  81. package/dashboard/dist/assets/table-Bh772iIw.js +6 -0
  82. package/dashboard/dist/assets/{team-types-BPeOvVdA.js → team-types-C_HqX2p2.js} +1 -1
  83. package/dashboard/dist/assets/{terminal-CzogW4cl.js → terminal-EpmtGBlw.js} +1 -1
  84. package/dashboard/dist/assets/{trash-2-52LATVfW.js → trash-2-Xen46iNQ.js} +1 -1
  85. package/dashboard/dist/assets/{users-DLFE2voE.js → users-BLueDPxF.js} +1 -1
  86. package/dashboard/dist/assets/{zap-DhiYlgyZ.js → zap-DsQCPF61.js} +1 -1
  87. package/dashboard/dist/assets/zh-CN-r3AvxxOL.js +1 -0
  88. package/dashboard/dist/index.html +2 -2
  89. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +70 -1
  90. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  91. package/dashboard/dist-server/src/coordinator/output-parser.js +27 -0
  92. package/dashboard/dist-server/src/coordinator/output-parser.js.map +1 -1
  93. package/dashboard/dist-server/src/types/index.d.ts +48 -6
  94. package/dist/src/commands/coordinate.d.ts.map +1 -1
  95. package/dist/src/commands/coordinate.js +4 -0
  96. package/dist/src/commands/coordinate.js.map +1 -1
  97. package/dist/src/commands/hooks.d.ts.map +1 -1
  98. package/dist/src/commands/hooks.js +239 -8
  99. package/dist/src/commands/hooks.js.map +1 -1
  100. package/dist/src/commands/spec.d.ts.map +1 -1
  101. package/dist/src/commands/spec.js +466 -0
  102. package/dist/src/commands/spec.js.map +1 -1
  103. package/dist/src/config/index.d.ts +5 -1
  104. package/dist/src/config/index.d.ts.map +1 -1
  105. package/dist/src/config/index.js +42 -0
  106. package/dist/src/config/index.js.map +1 -1
  107. package/dist/src/coordinator/output-parser.d.ts.map +1 -1
  108. package/dist/src/coordinator/output-parser.js +27 -0
  109. package/dist/src/coordinator/output-parser.js.map +1 -1
  110. package/dist/src/hooks/delegate-monitor.d.ts +1 -0
  111. package/dist/src/hooks/delegate-monitor.d.ts.map +1 -1
  112. package/dist/src/hooks/delegate-monitor.js +1 -1
  113. package/dist/src/hooks/delegate-monitor.js.map +1 -1
  114. package/dist/src/hooks/guards/workflow-guard.d.ts +15 -0
  115. package/dist/src/hooks/guards/workflow-guard.d.ts.map +1 -1
  116. package/dist/src/hooks/guards/workflow-guard.js +61 -1
  117. package/dist/src/hooks/guards/workflow-guard.js.map +1 -1
  118. package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -1
  119. package/dist/src/hooks/keyword-spec-injector.js +63 -4
  120. package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
  121. package/dist/src/hooks/plugins/decision-log-plugin.d.ts +19 -0
  122. package/dist/src/hooks/plugins/decision-log-plugin.d.ts.map +1 -0
  123. package/dist/src/hooks/plugins/decision-log-plugin.js +28 -0
  124. package/dist/src/hooks/plugins/decision-log-plugin.js.map +1 -0
  125. package/dist/src/hooks/plugins/index.d.ts +2 -0
  126. package/dist/src/hooks/plugins/index.d.ts.map +1 -1
  127. package/dist/src/hooks/plugins/index.js +1 -0
  128. package/dist/src/hooks/plugins/index.js.map +1 -1
  129. package/dist/src/hooks/plugins/spec-analytics-plugin.d.ts +13 -0
  130. package/dist/src/hooks/plugins/spec-analytics-plugin.d.ts.map +1 -0
  131. package/dist/src/hooks/plugins/spec-analytics-plugin.js +92 -0
  132. package/dist/src/hooks/plugins/spec-analytics-plugin.js.map +1 -0
  133. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
  134. package/dist/src/hooks/plugins/spec-injection-plugin.js +57 -4
  135. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  136. package/dist/src/hooks/session-context.d.ts +1 -0
  137. package/dist/src/hooks/session-context.d.ts.map +1 -1
  138. package/dist/src/hooks/session-context.js +1 -1
  139. package/dist/src/hooks/session-context.js.map +1 -1
  140. package/dist/src/hooks/skill-context.d.ts +1 -0
  141. package/dist/src/hooks/skill-context.d.ts.map +1 -1
  142. package/dist/src/hooks/skill-context.js +1 -1
  143. package/dist/src/hooks/skill-context.js.map +1 -1
  144. package/dist/src/hooks/spec-analytics.d.ts +128 -0
  145. package/dist/src/hooks/spec-analytics.d.ts.map +1 -0
  146. package/dist/src/hooks/spec-analytics.js +311 -0
  147. package/dist/src/hooks/spec-analytics.js.map +1 -0
  148. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  149. package/dist/src/hooks/spec-injector.js +129 -5
  150. package/dist/src/hooks/spec-injector.js.map +1 -1
  151. package/dist/src/tools/spec-loader.d.ts +20 -0
  152. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  153. package/dist/src/tools/spec-loader.js +58 -7
  154. package/dist/src/tools/spec-loader.js.map +1 -1
  155. package/dist/src/tui/config-ui/ConfigHub.d.ts +1 -1
  156. package/dist/src/tui/config-ui/ConfigHub.d.ts.map +1 -1
  157. package/dist/src/tui/config-ui/ConfigHub.js +16 -10
  158. package/dist/src/tui/config-ui/ConfigHub.js.map +1 -1
  159. package/dist/src/tui/config-ui/ConfigSourcesView.d.ts.map +1 -1
  160. package/dist/src/tui/config-ui/ConfigSourcesView.js +3 -2
  161. package/dist/src/tui/config-ui/ConfigSourcesView.js.map +1 -1
  162. package/dist/src/tui/config-ui/HooksPanel.d.ts.map +1 -1
  163. package/dist/src/tui/config-ui/HooksPanel.js +15 -19
  164. package/dist/src/tui/config-ui/HooksPanel.js.map +1 -1
  165. package/dist/src/tui/config-ui/SkillConfigDashboard.d.ts.map +1 -1
  166. package/dist/src/tui/config-ui/SkillConfigDashboard.js +5 -9
  167. package/dist/src/tui/config-ui/SkillConfigDashboard.js.map +1 -1
  168. package/dist/src/tui/config-ui/SkillParamEditor.d.ts.map +1 -1
  169. package/dist/src/tui/config-ui/SkillParamEditor.js +1 -3
  170. package/dist/src/tui/config-ui/SkillParamEditor.js.map +1 -1
  171. package/dist/src/tui/config-ui/SkillsList.d.ts.map +1 -1
  172. package/dist/src/tui/config-ui/SkillsList.js +7 -9
  173. package/dist/src/tui/config-ui/SkillsList.js.map +1 -1
  174. package/dist/src/tui/config-ui/SpecAnalyticsPanel.d.ts +6 -0
  175. package/dist/src/tui/config-ui/SpecAnalyticsPanel.d.ts.map +1 -0
  176. package/dist/src/tui/config-ui/SpecAnalyticsPanel.js +164 -0
  177. package/dist/src/tui/config-ui/SpecAnalyticsPanel.js.map +1 -0
  178. package/dist/src/tui/config-ui/SpecPanel.d.ts.map +1 -1
  179. package/dist/src/tui/config-ui/SpecPanel.js +918 -20
  180. package/dist/src/tui/config-ui/SpecPanel.js.map +1 -1
  181. package/dist/src/tui/config-ui/index.d.ts +3 -1
  182. package/dist/src/tui/config-ui/index.d.ts.map +1 -1
  183. package/dist/src/tui/config-ui/index.js +4 -0
  184. package/dist/src/tui/config-ui/index.js.map +1 -1
  185. package/dist/src/tui/install-ui/BackupConfig.d.ts.map +1 -1
  186. package/dist/src/tui/install-ui/BackupConfig.js +3 -2
  187. package/dist/src/tui/install-ui/BackupConfig.js.map +1 -1
  188. package/dist/src/tui/install-ui/BlueprintPreview.d.ts.map +1 -1
  189. package/dist/src/tui/install-ui/BlueprintPreview.js +7 -6
  190. package/dist/src/tui/install-ui/BlueprintPreview.js.map +1 -1
  191. package/dist/src/tui/install-ui/ComponentGrid.d.ts.map +1 -1
  192. package/dist/src/tui/install-ui/ComponentGrid.js +3 -2
  193. package/dist/src/tui/install-ui/ComponentGrid.js.map +1 -1
  194. package/dist/src/tui/install-ui/ConfigPanel.d.ts.map +1 -1
  195. package/dist/src/tui/install-ui/ConfigPanel.js +4 -3
  196. package/dist/src/tui/install-ui/ConfigPanel.js.map +1 -1
  197. package/dist/src/tui/install-ui/CyberItem.d.ts.map +1 -1
  198. package/dist/src/tui/install-ui/CyberItem.js +7 -6
  199. package/dist/src/tui/install-ui/CyberItem.js.map +1 -1
  200. package/dist/src/tui/install-ui/CyberdeckBlueprint.d.ts.map +1 -1
  201. package/dist/src/tui/install-ui/CyberdeckBlueprint.js +2 -1
  202. package/dist/src/tui/install-ui/CyberdeckBlueprint.js.map +1 -1
  203. package/dist/src/tui/install-ui/ExecutionView.d.ts.map +1 -1
  204. package/dist/src/tui/install-ui/ExecutionView.js +3 -2
  205. package/dist/src/tui/install-ui/ExecutionView.js.map +1 -1
  206. package/dist/src/tui/install-ui/GradientHeader.d.ts.map +1 -1
  207. package/dist/src/tui/install-ui/GradientHeader.js +2 -1
  208. package/dist/src/tui/install-ui/GradientHeader.js.map +1 -1
  209. package/dist/src/tui/install-ui/HooksConfig.d.ts.map +1 -1
  210. package/dist/src/tui/install-ui/HooksConfig.js +8 -8
  211. package/dist/src/tui/install-ui/HooksConfig.js.map +1 -1
  212. package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
  213. package/dist/src/tui/install-ui/InstallConfirm.js +4 -3
  214. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  215. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  216. package/dist/src/tui/install-ui/InstallExecution.js +3 -2
  217. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  218. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  219. package/dist/src/tui/install-ui/InstallFlow.js +3 -2
  220. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  221. package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
  222. package/dist/src/tui/install-ui/InstallHub.js +9 -8
  223. package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
  224. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
  225. package/dist/src/tui/install-ui/InstallResult.js +3 -2
  226. package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
  227. package/dist/src/tui/install-ui/McpConfig.d.ts.map +1 -1
  228. package/dist/src/tui/install-ui/McpConfig.js +4 -3
  229. package/dist/src/tui/install-ui/McpConfig.js.map +1 -1
  230. package/dist/src/tui/install-ui/ResultDashboard.d.ts.map +1 -1
  231. package/dist/src/tui/install-ui/ResultDashboard.js +3 -2
  232. package/dist/src/tui/install-ui/ResultDashboard.js.map +1 -1
  233. package/dist/src/tui/install-ui/ReviewPanel.d.ts.map +1 -1
  234. package/dist/src/tui/install-ui/ReviewPanel.js +2 -1
  235. package/dist/src/tui/install-ui/ReviewPanel.js.map +1 -1
  236. package/dist/src/tui/install-ui/StatuslineConfig.d.ts.map +1 -1
  237. package/dist/src/tui/install-ui/StatuslineConfig.js +3 -2
  238. package/dist/src/tui/install-ui/StatuslineConfig.js.map +1 -1
  239. package/dist/src/tui/install-ui/StepSelector.d.ts.map +1 -1
  240. package/dist/src/tui/install-ui/StepSelector.js +11 -10
  241. package/dist/src/tui/install-ui/StepSelector.js.map +1 -1
  242. package/dist/src/tui/overlay-ui/OverlayList.d.ts.map +1 -1
  243. package/dist/src/tui/overlay-ui/OverlayList.js +8 -12
  244. package/dist/src/tui/overlay-ui/OverlayList.js.map +1 -1
  245. package/dist/src/tui/shared/components.d.ts +56 -0
  246. package/dist/src/tui/shared/components.d.ts.map +1 -0
  247. package/dist/src/tui/shared/components.js +55 -0
  248. package/dist/src/tui/shared/components.js.map +1 -0
  249. package/dist/src/tui/shared/helpers.d.ts +24 -0
  250. package/dist/src/tui/shared/helpers.d.ts.map +1 -0
  251. package/dist/src/tui/shared/helpers.js +49 -0
  252. package/dist/src/tui/shared/helpers.js.map +1 -0
  253. package/dist/src/tui/shared/index.d.ts +4 -0
  254. package/dist/src/tui/shared/index.d.ts.map +1 -0
  255. package/dist/src/tui/shared/index.js +7 -0
  256. package/dist/src/tui/shared/index.js.map +1 -0
  257. package/dist/src/tui/shared/tokens.d.ts +79 -0
  258. package/dist/src/tui/shared/tokens.d.ts.map +1 -0
  259. package/dist/src/tui/shared/tokens.js +81 -0
  260. package/dist/src/tui/shared/tokens.js.map +1 -0
  261. package/dist/src/tui/tools-ui/CommandReference.d.ts.map +1 -1
  262. package/dist/src/tui/tools-ui/CommandReference.js +2 -4
  263. package/dist/src/tui/tools-ui/CommandReference.js.map +1 -1
  264. package/dist/src/tui/tools-ui/ConfigSources.d.ts.map +1 -1
  265. package/dist/src/tui/tools-ui/ConfigSources.js +3 -2
  266. package/dist/src/tui/tools-ui/ConfigSources.js.map +1 -1
  267. package/dist/src/tui/tools-ui/RegisterSettings.d.ts.map +1 -1
  268. package/dist/src/tui/tools-ui/RegisterSettings.js +2 -1
  269. package/dist/src/tui/tools-ui/RegisterSettings.js.map +1 -1
  270. package/dist/src/tui/tools-ui/RoleMappings.d.ts.map +1 -1
  271. package/dist/src/tui/tools-ui/RoleMappings.js +3 -5
  272. package/dist/src/tui/tools-ui/RoleMappings.js.map +1 -1
  273. package/dist/src/tui/tools-ui/ToolsDashboard.d.ts.map +1 -1
  274. package/dist/src/tui/tools-ui/ToolsDashboard.js +3 -5
  275. package/dist/src/tui/tools-ui/ToolsDashboard.js.map +1 -1
  276. package/dist/src/tui/tools-ui/ToolsOverview.d.ts.map +1 -1
  277. package/dist/src/tui/tools-ui/ToolsOverview.js +3 -5
  278. package/dist/src/tui/tools-ui/ToolsOverview.js.map +1 -1
  279. package/dist/src/tui/uninstall-ui/UninstallFlow.d.ts.map +1 -1
  280. package/dist/src/tui/uninstall-ui/UninstallFlow.js +8 -7
  281. package/dist/src/tui/uninstall-ui/UninstallFlow.js.map +1 -1
  282. package/dist/src/types/index.d.ts +48 -6
  283. package/dist/src/types/index.d.ts.map +1 -1
  284. package/package.json +1 -1
  285. package/workflows/debug.md +73 -0
  286. package/workflows/execute.md +27 -0
  287. package/workflows/plan.md +11 -0
  288. package/workflows/review.md +33 -1
  289. package/workflows/tdd.md +257 -0
  290. package/workflows/verify.md +57 -0
  291. package/dashboard/dist/assets/ChatPage-BjBibfE4.js +0 -22
  292. package/dashboard/dist/assets/CollabPage-8lUMUol_.js +0 -1
  293. package/dashboard/dist/assets/KanbanPage-diY3QmGd.js +0 -21
  294. package/dashboard/dist/assets/McpPage-COjuIf7U.js +0 -21
  295. package/dashboard/dist/assets/SpecsPage-BOwBin_o.js +0 -36
  296. package/dashboard/dist/assets/SupervisorPage-5iRyMU5T.js +0 -6
  297. package/dashboard/dist/assets/WorkflowPage-CmQaRVgL.js +0 -6
  298. package/dashboard/dist/assets/en-C_BD3UCD.js +0 -1
  299. package/dashboard/dist/assets/index-BEUaOz_b.css +0 -1
  300. package/dashboard/dist/assets/index-uIqUCT8y.js +0 -236
  301. package/dashboard/dist/assets/table-DCzuJAFh.js +0 -6
  302. package/dashboard/dist/assets/zh-CN-DvQKfow3.js +0 -1
@@ -1,346 +1,362 @@
1
- ---
2
- name: quality-debug
3
- description: Debug with parallel hypotheses and root cause analysis
4
- argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"[bug description] [--from-uat <phase>] [--parallel]\""
5
- allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
- ---
7
-
8
- <purpose>
9
- Wave-based hypothesis-driven debugging using `spawn_agents_on_csv`. Wave 1 explores hypotheses in parallel, Wave 2 attempts fixes on confirmed hypotheses in parallel.
10
-
11
- **Core workflow**: Gather Symptoms -> Generate Hypotheses -> Parallel Investigation -> Parallel Fix Attempts -> Unify Results
12
-
13
- ```
14
- +---------------------------------------------------------------------------+
15
- | DEBUG CSV WAVE WORKFLOW |
16
- +---------------------------------------------------------------------------+
17
- | |
18
- | Phase 1: Input Resolution -> CSV |
19
- | +-- Parse mode: standalone / --from-uat / --parallel |
20
- | +-- Gather symptoms (interactive) or load UAT gaps (pre-filled) |
21
- | +-- Cluster gaps by component (if from-uat) |
22
- | +-- Generate 3-5 hypotheses per cluster/issue |
23
- | +-- Generate tasks.csv with one row per hypothesis |
24
- | +-- User validates hypothesis breakdown (skip if -y) |
25
- | |
26
- | Phase 2: Wave Execution Engine |
27
- | +-- Wave 1: Hypothesis Investigation (parallel) |
28
- | | +-- Each agent investigates one hypothesis |
29
- | | +-- Agent searches code, logs evidence, confirms/refutes |
30
- | | +-- Discoveries shared via board (code patterns, root causes) |
31
- | | +-- Results: evidence_for + evidence_against per hypothesis |
32
- | +-- Wave 2: Fix Attempts (parallel, confirmed hypotheses only) |
33
- | | +-- Filter: only hypotheses with status=confirmed from wave 1 |
34
- | | +-- Each agent attempts fix for its confirmed root cause |
35
- | | +-- Agent applies fix, runs verification, logs result |
36
- | | +-- Results: fix_applied + verified per fix task |
37
- | +-- discoveries.ndjson shared across all waves (append-only) |
38
- | |
39
- | Phase 3: Results Aggregation |
40
- | +-- Export results.csv with all investigation + fix outcomes |
41
- | +-- Generate context.md with diagnosis summary |
42
- | +-- Update UAT gaps with diagnosis (if --from-uat) |
43
- | +-- Update issues.jsonl with diagnosis results |
44
- | +-- Display summary with next steps |
45
- | |
46
- +---------------------------------------------------------------------------+
47
- ```
48
- </purpose>
49
-
50
- <context>
51
- ```bash
52
- $quality-debug "Login button throws 500 error on click"
53
- $quality-debug -y "JWT token not refreshed --from-uat 3"
54
- $quality-debug -c 4 "Navigation crash --from-uat 3 --parallel"
55
- $quality-debug -y "--from-auto-test 3"
56
- $quality-debug --continue "20260318-debug-P3-jwt-expiry"
57
- ```
58
-
59
- **Flags**:
60
- - `-y, --yes`: Skip all confirmations (auto mode)
61
- - `-c, --concurrency N`: Max concurrent agents within each wave (default: 5)
62
- - `--continue`: Resume existing session
63
- - `--from-uat <phase>`: Load gaps from UAT uat.md as pre-filled symptoms
64
- - `--from-auto-test <phase>`: Load code_defect failures from auto-test report.json as pre-filled symptoms
65
- - `--parallel`: One agent per gap cluster (implies from-uat or from-auto-test)
66
-
67
- When `--yes` or `-y`: Auto-confirm hypothesis selection, skip interactive symptom gathering (require bug description in args), use defaults for mode detection.
68
-
69
- **Output Directory**: `.workflow/.csv-wave/{session-id}/`
70
- **Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (human-readable report)
71
- </context>
72
-
73
- <csv_schema>
74
-
75
- ### tasks.csv (Master State)
76
-
77
- ```csv
78
- id,title,description,hypothesis,evidence_for,evidence_against,deps,context_from,wave,status,findings,fix_applied,verified,error
79
- "H1","Null pointer in login handler","Investigate whether login handler crashes due to null user object after failed DB lookup","User object is null when DB returns empty result; login.ts:42 dereferences without null check","","","","","1","","","","",""
80
- "H2","Missing error boundary","Investigate whether unhandled promise rejection in auth middleware propagates to 500","Auth middleware catches DB errors but not validation errors; middleware.ts:78 has no catch block","","","","","1","","","","",""
81
- "H3","Stale session token","Investigate whether expired session tokens bypass refresh logic","Session refresh only triggers on 403 but server returns 401 for expired tokens; session.ts:15","","","","","1","","","","",""
82
- "FIX-H1","Fix null pointer in login","Apply null check before user object dereference in login handler","","","","H1","H1","2","","","","",""
83
- "FIX-H3","Fix session token refresh","Update refresh trigger to also handle 401 status codes","","","","H3","H3","2","","","","",""
84
- ```
85
-
86
- **Columns**:
87
-
88
- | Column | Phase | Description |
89
- |--------|-------|-------------|
90
- | `id` | Input | Unique task identifier: `H{N}` for hypotheses (wave 1), `FIX-H{N}` for fixes (wave 2) |
91
- | `title` | Input | Short hypothesis or fix title |
92
- | `description` | Input | Detailed investigation/fix instructions |
93
- | `hypothesis` | Input | The hypothesis being tested (wave 1) or empty (wave 2) |
94
- | `evidence_for` | Output | Evidence supporting the hypothesis |
95
- | `evidence_against` | Output | Evidence refuting the hypothesis |
96
- | `deps` | Input | Semicolon-separated dependency task IDs (wave 2 depends on wave 1) |
97
- | `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
98
- | `wave` | Computed | Wave number (1 = investigation, 2 = fix attempt) |
99
- | `status` | Output | `pending` -> `confirmed` / `refuted` / `inconclusive` / `fixed` / `fix_failed` / `skipped` |
100
- | `findings` | Output | Key findings summary (max 500 chars) |
101
- | `fix_applied` | Output | Description of fix applied (wave 2 only) |
102
- | `verified` | Output | `true` / `false` -- whether fix was verified to work (wave 2 only) |
103
- | `error` | Output | Error message if failed |
104
-
105
- ### Per-Wave CSV (Temporary)
106
-
107
- Each wave generates `wave-{N}.csv` with extra `prev_context` column.
108
-
109
- ### Output Artifacts
110
-
111
- | File | Purpose | Lifecycle |
112
- |------|---------|-----------|
113
- | `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
114
- | `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
115
- | `results.csv` | Final export of all task results | Created in Phase 3 |
116
- | `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
117
- | `context.md` | Human-readable diagnosis report | Created in Phase 3 |
118
-
119
- ### Session Structure
120
-
121
- ```
122
- .workflow/.csv-wave/{YYYYMMDD}-debug-P{N}-{slug}/
123
- +-- tasks.csv
124
- +-- results.csv
125
- +-- discoveries.ndjson
126
- +-- context.md
127
- +-- wave-{N}.csv (temporary)
128
- ```
129
- </csv_schema>
130
-
131
- <invariants>
132
- 1. **Start Immediately**: First action is session initialization, then Phase 1
133
- 2. **Wave Order is Sacred**: Never execute wave 2 before wave 1 completes and results are merged
134
- 3. **CSV is Source of Truth**: Master tasks.csv holds all state
135
- 4. **Context Propagation**: prev_context built from master CSV, not from memory
136
- 5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
137
- 6. **Skip on Refuted**: Wave 2 fix tasks skip if their hypothesis was refuted or inconclusive
138
- 7. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
139
- 8. **DO NOT STOP**: Continuous execution until all waves complete
140
- </invariants>
141
-
142
- <execution>
143
-
144
- ### Session Initialization
145
-
146
- ```
147
- Parse from $ARGUMENTS:
148
- AUTO_YES ← --yes | -y
149
- continueMode ← --continue
150
- maxConcurrency --concurrency | -c N (default: 5)
151
- fromUat ← --from-uat <phase> (default: null)
152
- fromAutoTest ← --from-auto-test <phase> (default: null)
153
- parallelMode ← --parallel
154
- bugDescription remaining text after flag removal
155
-
156
- Derive:
157
- phaseRef ← fromUat || fromAutoTest || null
158
- sourceType ← fromAutoTest ? "auto-test" : fromUat ? "uat" : "standalone"
159
- slug ← bugDescription kebab-cased, max 40 chars
160
- dateStr ← UTC+8 YYYYMMDD
161
- sessionId ← phaseRef ? "{dateStr}-debug-P{phaseRef}-{slug}" : "{dateStr}-debug-{slug}"
162
- sessionFolder ← ".workflow/.csv-wave/{sessionId}"
163
-
164
- mkdir -p {sessionFolder}
165
- ```
166
-
167
- ### Phase 1: Input Resolution -> CSV
168
-
169
- **Objective**: Parse mode, gather symptoms or load UAT gaps, generate hypotheses, build tasks.csv.
170
-
171
- **Decomposition Rules**:
172
-
173
- 1. **Mode detection**:
174
-
175
- | Condition | Mode |
176
- |-----------|------|
177
- | `--from-uat` flag present | from-uat (load gaps from uat.md) |
178
- | `--from-auto-test` flag present | from-auto-test (load code_defects from report.json) |
179
- | `--parallel` flag present | parallel (implies from-uat or from-auto-test, one agent per gap cluster) |
180
- | Neither flag | standalone (gather symptoms interactively) |
181
-
182
- 2. **Related session discovery**: Query `state.json.artifacts[]` for matching phase+milestone. Extract relevant outputs by type: execute -> .summaries/.task/, review -> review.json (guide hypotheses), debug -> understanding.md (avoid re-investigation), test -> uat.md + .tests/auto-test/report.json.
183
-
184
- 2b. **Load codebase + wiki context** (optional, informs hypothesis generation):
185
- - If `.workflow/codebase/ARCHITECTURE.md` exists: read module boundaries to scope impact analysis
186
- - Run `maestro wiki search "<symptom keywords>" --json 2>/dev/null`; if results: check for prior investigations on similar issues
187
- - Run `maestro spec load --category debug --keyword "<symptom keywords>"`; if tools found: extract known issues, workarounds, and root-cause notes to inform hypotheses
188
- - All are optional — proceed without if unavailable
189
-
190
- 3. **Symptom collection**:
191
-
192
- | Mode | Source | Action |
193
- |------|--------|--------|
194
- | standalone | User input | Ask 5 questions: expected, actual, errors, timeline, reproduction |
195
- | from-uat | test artifact's uat.md (via registry) | Parse Gaps section, cluster by component |
196
- | from-auto-test | test artifact's `.tests/auto-test/report.json` (via registry) | Parse `failures[]` where `classification == "code_defect"`, cluster by target module |
197
- | parallel | test artifact's uat.md or report.json (via registry) | Same as from-uat/from-auto-test, one investigation per cluster |
198
-
199
- **from-auto-test specifics**: Each `code_defect` failure provides: `scenario_id`, `req_ref`, `description`, `expected`, `actual`, `fix_suggestion.file`, `fix_suggestion.line`, `fix_suggestion.direction`. Map these to symptoms: expected=failure.expected, actual=failure.actual, location=fix_suggestion.file:line, context=fix_suggestion.direction.
200
-
201
- 3. **Hypothesis generation**: Per symptom cluster, analyze affected code and generate 3-5 ranked hypotheses (each becomes a wave 1 row).
202
-
203
- 4. **Fix task generation**: Pre-generate wave 2 fix row per hypothesis (`deps`/`context_from` -> hypothesis ID). Only executes if hypothesis confirmed.
204
-
205
- 5. **CSV generation**: Hypothesis rows (wave 1) + fix rows (wave 2).
206
-
207
- **Wave computation**: Simple 2-wave -- all hypothesis tasks = wave 1, all fix tasks = wave 2.
208
-
209
- **User validation**: Display hypothesis breakdown (skip if AUTO_YES).
210
-
211
- ### Phase 2: Wave Execution Engine
212
-
213
- **Objective**: Investigate hypotheses wave-by-wave via spawn_agents_on_csv.
214
-
215
- #### Wave 1: Hypothesis Investigation (Parallel)
216
-
217
- 1. Extract wave 1 pending rows from master `tasks.csv` into `wave-1.csv` (no prev_context needed)
218
- 2. Execute:
219
-
220
- ```javascript
221
- spawn_agents_on_csv({
222
- csv_path: `${sessionFolder}/wave-1.csv`,
223
- id_column: "id",
224
- instruction: buildInvestigationInstruction(sessionFolder), // agent: ~/.codex/agents/workflow-debugger.toml
225
- max_concurrency: maxConcurrency, max_runtime_seconds: 3600,
226
- output_csv_path: `${sessionFolder}/wave-1-results.csv`,
227
- output_schema: { id, status: [confirmed|refuted|inconclusive|failed], findings, evidence_for, evidence_against, error }
228
- })
229
- ```
230
-
231
- 3. Merge results into master `tasks.csv`, delete `wave-1.csv`
232
- 4. **Filter for wave 2**: Mark fix tasks as `skipped` if their hypothesis was `refuted` or `inconclusive`
233
-
234
- #### Wave 2: Fix Attempts (Parallel, Confirmed Only)
235
-
236
- 1. If no confirmed hypotheses remain, skip wave 2 entirely
237
- 2. Extract wave 2 pending rows, build `prev_context` from confirmed wave 1 findings
238
- 3. Write `wave-2.csv`, then execute:
239
-
240
- ```javascript
241
- spawn_agents_on_csv({
242
- csv_path: `${sessionFolder}/wave-2.csv`,
243
- id_column: "id",
244
- instruction: buildFixInstruction(sessionFolder), // agent: ~/.codex/agents/workflow-debugger.toml
245
- max_concurrency: maxConcurrency, max_runtime_seconds: 3600,
246
- output_csv_path: `${sessionFolder}/wave-2-results.csv`,
247
- output_schema: { id, status: [fixed|fix_failed|failed], findings, fix_applied, verified, error }
248
- })
249
- ```
250
-
251
- 4. Merge results into master `tasks.csv`, delete `wave-2.csv`
252
-
253
- ### Phase 3: Results Aggregation
254
-
255
- **Objective**: Generate final results and human-readable report.
256
-
257
- 1. Export final `tasks.csv` as `results.csv`
258
-
259
- 2. **Generate context.md**: Debug report with summary (mode, hypothesis/confirmed/fixed/verified counts), per-hypothesis results (hypothesis, evidence for/against, findings, status), per-fix results (fix applied, verified, findings), aggregated root causes, and next steps.
260
-
261
- 2b. **Debug confidence scoring**:
262
-
263
- Dimensions (4): hypothesis_quality, evidence_completeness, root_cause_isolation, fix_confidence. Factors (weights): evidence_depth(.30), evidence_strength(.25), coverage_breadth(.20), reproduction(.15), consistency(.10). Map to legacy: <40% = low, 40-70% = medium, >70% = high. Append confidence assessment to context.md.
264
-
265
- 3. **UAT update** (if --from-uat): Update `uat.md` gaps with `root_cause`, `fix_direction`, `affected_files` for confirmed hypotheses.
266
-
267
- 4. **Issue update**: If `issues.jsonl` exists, update matching issues with status `diagnosed`, add `context.suggested_fix` and `context.notes`.
268
-
269
- 5. **Register artifact** (phase-scoped only): Append to `state.json.artifacts[]` with `type: "debug"`, `id: DBG-NNN`, `depends_on: triggering_review_id || exec_art.id`.
270
-
271
- 6. **Post-debug Knowledge Inquiry**: Prompt user to capture knowledge when:
272
- - Recurring root cause pattern detected -> `/spec-add debug`
273
- - Non-obvious fix strategy used -> `/spec-add learning`
274
- - Architectural gap identified -> `/spec-add arch`
275
-
276
- 8. **Next step routing**:
277
-
278
- | Result | Suggestion |
279
- |--------|------------|
280
- | All fixes verified | Run tests: `Skill({ skill: "quality-test", args: "{phase}" })` |
281
- | Fixes applied, not verified | Re-verify: `Skill({ skill: "maestro-verify", args: "{phase}" })` |
282
- | Confirmed but no fix | Plan fixes: `Skill({ skill: "maestro-plan", args: "{phase} --gaps" })` |
283
- | All inconclusive | Resume with more context or manual investigation |
284
- | From UAT, all diagnosed | `Skill({ skill: "quality-test", args: "{phase} --auto-fix" })` |
285
-
286
- 9. Display summary.
287
-
288
- ### Shared Discovery Board Protocol
289
-
290
- #### Standard Discovery Types
291
-
292
- | Type | Dedup Key | Data Schema | Description |
293
- |------|-----------|-------------|-------------|
294
- | `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
295
- | `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
296
- | `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
297
- | `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue found |
298
- | `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
299
-
300
- #### Domain Discovery Types
301
-
302
- | Type | Dedup Key | Data Schema | Description |
303
- |------|-----------|-------------|-------------|
304
- | `root_cause` | `data.location` | `{location, cause, severity, confidence_score, confidence_factors}` | Confirmed root cause |
305
- | `hypothesis_evidence` | `data.hypothesis+data.location` | `{hypothesis, location, type, conclusion}` | Evidence for/against hypothesis |
306
- | `affected_component` | `data.component` | `{component, files[], impact}` | Component affected by bug |
307
- | `reproduction_path` | `data.trigger` | `{trigger, steps[], frequency}` | Bug reproduction path |
308
-
309
- #### Protocol
310
-
311
- Read `discoveries.ndjson` before investigation. Append-only: dedup by type+key before writing, never modify/delete.
312
-
313
- ```bash
314
- echo '{"ts":"<ISO>","worker":"{id}","type":"root_cause","data":{"location":"src/auth/login.ts:42","cause":"null_dereference","severity":"high","confidence":"confirmed"}}' >> {session_folder}/discoveries.ndjson
315
- ```
316
- </execution>
317
-
318
- <error_codes>
319
-
320
- | Error | Resolution |
321
- |-------|------------|
322
- | No bug description and no --from-uat/--from-auto-test | Abort with error: "Issue description required" |
323
- | UAT file not found for --from-uat phase | Abort with error: "uat.md not found for phase {N}" |
324
- | Auto-test report not found for --from-auto-test phase | Abort with error: "report.json not found for phase {N}" |
325
- | No gaps in UAT file / no code_defects in report | Abort with error: "No failed gaps/defects found" |
326
- | Hypothesis agent timeout | Mark as inconclusive, continue with remaining |
327
- | All hypotheses refuted | Skip wave 2, suggest manual investigation |
328
- | Fix agent timeout | Mark as fix_failed, report partial results |
329
- | CSV parse error | Validate format, show line number |
330
- | discoveries.ndjson corrupt | Ignore malformed lines |
331
- | Continue mode: no session found | List available sessions |
332
- | Existing debug session found | Offer resume (skip if AUTO_YES) |
333
- </error_codes>
334
-
335
- <success_criteria>
336
- - [ ] Session folder created with valid tasks.csv
337
- - [ ] Wave 1 hypotheses investigated in parallel
338
- - [ ] Refuted/inconclusive hypotheses correctly skip wave 2 fix tasks
339
- - [ ] Wave 2 fixes attempted only for confirmed hypotheses
340
- - [ ] context.md produced with diagnosis summary
341
- - [ ] Multi-factor confidence scored per hypothesis replacing simple high/medium/low
342
- - [ ] Confidence assessment appended to context.md
343
- - [ ] UAT gaps updated (if --from-uat)
344
- - [ ] Issues updated with diagnosis results
345
- - [ ] discoveries.ndjson append-only throughout
346
- </success_criteria>
1
+ ---
2
+ name: quality-debug
3
+ description: Use when bugs, test failures, or unexpected behavior need systematic root cause investigation
4
+ argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"[bug description] [--from-uat <phase>] [--parallel]\""
5
+ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Wave-based hypothesis-driven debugging using `spawn_agents_on_csv`. Wave 1 explores hypotheses in parallel, Wave 2 attempts fixes on confirmed hypotheses in parallel.
10
+
11
+ **Core workflow**: Gather Symptoms -> Generate Hypotheses -> Parallel Investigation -> Parallel Fix Attempts -> Unify Results
12
+
13
+ ## Iron Law
14
+
15
+ **NO FIX PROPOSALS WITHOUT ROOT CAUSE EVIDENCE.** Before proposing any fix, you MUST have reproduced/confirmed the symptom, gathered evidence, and identified the root cause with file:line references.
16
+
17
+ ## Red Flags — These Thoughts Mean STOP
18
+ - "Quick fix for now, investigate later" / "I don't fully understand but this might work"
19
+ - "The fix is obvious, I don't need to reproduce it" / "Multiple changes at once will be faster"
20
+ - "I already know what the problem is" (without evidence)
21
+ All mean: **return to evidence gathering**.
22
+
23
+ ## Escalation Rule
24
+ After **3 failed hypotheses**, STOP. Summarize failures, question architecture, present to user.
25
+
26
+ ## Backward Tracing
27
+ Find where incorrect value appears → trace backward through call chain → fix at source, not symptom.
28
+
29
+ ```
30
+ +---------------------------------------------------------------------------+
31
+ | DEBUG CSV WAVE WORKFLOW |
32
+ +---------------------------------------------------------------------------+
33
+ | |
34
+ | Phase 1: Input Resolution -> CSV |
35
+ | +-- Parse mode: standalone / --from-uat / --parallel |
36
+ | +-- Gather symptoms (interactive) or load UAT gaps (pre-filled) |
37
+ | +-- Cluster gaps by component (if from-uat) |
38
+ | +-- Generate 3-5 hypotheses per cluster/issue |
39
+ | +-- Generate tasks.csv with one row per hypothesis |
40
+ | +-- User validates hypothesis breakdown (skip if -y) |
41
+ | |
42
+ | Phase 2: Wave Execution Engine |
43
+ | +-- Wave 1: Hypothesis Investigation (parallel) |
44
+ | | +-- Each agent investigates one hypothesis |
45
+ | | +-- Agent searches code, logs evidence, confirms/refutes |
46
+ | | +-- Discoveries shared via board (code patterns, root causes) |
47
+ | | +-- Results: evidence_for + evidence_against per hypothesis |
48
+ | +-- Wave 2: Fix Attempts (parallel, confirmed hypotheses only) |
49
+ | | +-- Filter: only hypotheses with status=confirmed from wave 1 |
50
+ | | +-- Each agent attempts fix for its confirmed root cause |
51
+ | | +-- Agent applies fix, runs verification, logs result |
52
+ | | +-- Results: fix_applied + verified per fix task |
53
+ | +-- discoveries.ndjson shared across all waves (append-only) |
54
+ | |
55
+ | Phase 3: Results Aggregation |
56
+ | +-- Export results.csv with all investigation + fix outcomes |
57
+ | +-- Generate context.md with diagnosis summary |
58
+ | +-- Update UAT gaps with diagnosis (if --from-uat) |
59
+ | +-- Update issues.jsonl with diagnosis results |
60
+ | +-- Display summary with next steps |
61
+ | |
62
+ +---------------------------------------------------------------------------+
63
+ ```
64
+ </purpose>
65
+
66
+ <context>
67
+ ```bash
68
+ $quality-debug "Login button throws 500 error on click"
69
+ $quality-debug -y "JWT token not refreshed --from-uat 3"
70
+ $quality-debug -c 4 "Navigation crash --from-uat 3 --parallel"
71
+ $quality-debug -y "--from-auto-test 3"
72
+ $quality-debug --continue "20260318-debug-P3-jwt-expiry"
73
+ ```
74
+
75
+ **Flags**:
76
+ - `-y, --yes`: Skip all confirmations (auto mode)
77
+ - `-c, --concurrency N`: Max concurrent agents within each wave (default: 5)
78
+ - `--continue`: Resume existing session
79
+ - `--from-uat <phase>`: Load gaps from UAT uat.md as pre-filled symptoms
80
+ - `--from-auto-test <phase>`: Load code_defect failures from auto-test report.json as pre-filled symptoms
81
+ - `--parallel`: One agent per gap cluster (implies from-uat or from-auto-test)
82
+
83
+ When `--yes` or `-y`: Auto-confirm hypothesis selection, skip interactive symptom gathering (require bug description in args), use defaults for mode detection.
84
+
85
+ **Output Directory**: `.workflow/.csv-wave/{session-id}/`
86
+ **Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (human-readable report)
87
+ </context>
88
+
89
+ <csv_schema>
90
+
91
+ ### tasks.csv (Master State)
92
+
93
+ ```csv
94
+ id,title,description,hypothesis,evidence_for,evidence_against,deps,context_from,wave,status,findings,fix_applied,verified,error
95
+ "H1","Null pointer in login handler","Investigate whether login handler crashes due to null user object after failed DB lookup","User object is null when DB returns empty result; login.ts:42 dereferences without null check","","","","","1","","","","",""
96
+ "H2","Missing error boundary","Investigate whether unhandled promise rejection in auth middleware propagates to 500","Auth middleware catches DB errors but not validation errors; middleware.ts:78 has no catch block","","","","","1","","","","",""
97
+ "H3","Stale session token","Investigate whether expired session tokens bypass refresh logic","Session refresh only triggers on 403 but server returns 401 for expired tokens; session.ts:15","","","","","1","","","","",""
98
+ "FIX-H1","Fix null pointer in login","Apply null check before user object dereference in login handler","","","","H1","H1","2","","","","",""
99
+ "FIX-H3","Fix session token refresh","Update refresh trigger to also handle 401 status codes","","","","H3","H3","2","","","","",""
100
+ ```
101
+
102
+ **Columns**:
103
+
104
+ | Column | Phase | Description |
105
+ |--------|-------|-------------|
106
+ | `id` | Input | Unique task identifier: `H{N}` for hypotheses (wave 1), `FIX-H{N}` for fixes (wave 2) |
107
+ | `title` | Input | Short hypothesis or fix title |
108
+ | `description` | Input | Detailed investigation/fix instructions |
109
+ | `hypothesis` | Input | The hypothesis being tested (wave 1) or empty (wave 2) |
110
+ | `evidence_for` | Output | Evidence supporting the hypothesis |
111
+ | `evidence_against` | Output | Evidence refuting the hypothesis |
112
+ | `deps` | Input | Semicolon-separated dependency task IDs (wave 2 depends on wave 1) |
113
+ | `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
114
+ | `wave` | Computed | Wave number (1 = investigation, 2 = fix attempt) |
115
+ | `status` | Output | `pending` -> `confirmed` / `refuted` / `inconclusive` / `fixed` / `fix_failed` / `skipped` |
116
+ | `findings` | Output | Key findings summary (max 500 chars) |
117
+ | `fix_applied` | Output | Description of fix applied (wave 2 only) |
118
+ | `verified` | Output | `true` / `false` -- whether fix was verified to work (wave 2 only) |
119
+ | `error` | Output | Error message if failed |
120
+
121
+ ### Per-Wave CSV (Temporary)
122
+
123
+ Each wave generates `wave-{N}.csv` with extra `prev_context` column.
124
+
125
+ ### Output Artifacts
126
+
127
+ | File | Purpose | Lifecycle |
128
+ |------|---------|-----------|
129
+ | `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
130
+ | `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
131
+ | `results.csv` | Final export of all task results | Created in Phase 3 |
132
+ | `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
133
+ | `context.md` | Human-readable diagnosis report | Created in Phase 3 |
134
+
135
+ ### Session Structure
136
+
137
+ ```
138
+ .workflow/.csv-wave/{YYYYMMDD}-debug-P{N}-{slug}/
139
+ +-- tasks.csv
140
+ +-- results.csv
141
+ +-- discoveries.ndjson
142
+ +-- context.md
143
+ +-- wave-{N}.csv (temporary)
144
+ ```
145
+ </csv_schema>
146
+
147
+ <invariants>
148
+ 1. **Start Immediately**: First action is session initialization, then Phase 1
149
+ 2. **Wave Order is Sacred**: Never execute wave 2 before wave 1 completes and results are merged
150
+ 3. **CSV is Source of Truth**: Master tasks.csv holds all state
151
+ 4. **Context Propagation**: prev_context built from master CSV, not from memory
152
+ 5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
153
+ 6. **Skip on Refuted**: Wave 2 fix tasks skip if their hypothesis was refuted or inconclusive
154
+ 7. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
155
+ 8. **DO NOT STOP**: Continuous execution until all waves complete
156
+ </invariants>
157
+
158
+ <execution>
159
+
160
+ ### Session Initialization
161
+
162
+ ```
163
+ Parse from $ARGUMENTS:
164
+ AUTO_YES ← --yes | -y
165
+ continueMode ← --continue
166
+ maxConcurrency ← --concurrency | -c N (default: 5)
167
+ fromUat ← --from-uat <phase> (default: null)
168
+ fromAutoTest ← --from-auto-test <phase> (default: null)
169
+ parallelMode ← --parallel
170
+ bugDescription ← remaining text after flag removal
171
+
172
+ Derive:
173
+ phaseRef ← fromUat || fromAutoTest || null
174
+ sourceType ← fromAutoTest ? "auto-test" : fromUat ? "uat" : "standalone"
175
+ slug ← bugDescription kebab-cased, max 40 chars
176
+ dateStr ← UTC+8 YYYYMMDD
177
+ sessionId ← phaseRef ? "{dateStr}-debug-P{phaseRef}-{slug}" : "{dateStr}-debug-{slug}"
178
+ sessionFolder ← ".workflow/.csv-wave/{sessionId}"
179
+
180
+ mkdir -p {sessionFolder}
181
+ ```
182
+
183
+ ### Phase 1: Input Resolution -> CSV
184
+
185
+ **Objective**: Parse mode, gather symptoms or load UAT gaps, generate hypotheses, build tasks.csv.
186
+
187
+ **Decomposition Rules**:
188
+
189
+ 1. **Mode detection**:
190
+
191
+ | Condition | Mode |
192
+ |-----------|------|
193
+ | `--from-uat` flag present | from-uat (load gaps from uat.md) |
194
+ | `--from-auto-test` flag present | from-auto-test (load code_defects from report.json) |
195
+ | `--parallel` flag present | parallel (implies from-uat or from-auto-test, one agent per gap cluster) |
196
+ | Neither flag | standalone (gather symptoms interactively) |
197
+
198
+ 2. **Related session discovery**: Query `state.json.artifacts[]` for matching phase+milestone. Extract relevant outputs by type: execute -> .summaries/.task/, review -> review.json (guide hypotheses), debug -> understanding.md (avoid re-investigation), test -> uat.md + .tests/auto-test/report.json.
199
+
200
+ 2b. **Load codebase + wiki context** (optional, informs hypothesis generation):
201
+ - If `.workflow/codebase/ARCHITECTURE.md` exists: read module boundaries to scope impact analysis
202
+ - Run `maestro wiki search "<symptom keywords>" --json 2>/dev/null`; if results: check for prior investigations on similar issues
203
+ - Run `maestro spec load --category debug --keyword "<symptom keywords>"`; if tools found: extract known issues, workarounds, and root-cause notes to inform hypotheses
204
+ - All are optional — proceed without if unavailable
205
+
206
+ 3. **Symptom collection**:
207
+
208
+ | Mode | Source | Action |
209
+ |------|--------|--------|
210
+ | standalone | User input | Ask 5 questions: expected, actual, errors, timeline, reproduction |
211
+ | from-uat | test artifact's uat.md (via registry) | Parse Gaps section, cluster by component |
212
+ | from-auto-test | test artifact's `.tests/auto-test/report.json` (via registry) | Parse `failures[]` where `classification == "code_defect"`, cluster by target module |
213
+ | parallel | test artifact's uat.md or report.json (via registry) | Same as from-uat/from-auto-test, one investigation per cluster |
214
+
215
+ **from-auto-test specifics**: Each `code_defect` failure provides: `scenario_id`, `req_ref`, `description`, `expected`, `actual`, `fix_suggestion.file`, `fix_suggestion.line`, `fix_suggestion.direction`. Map these to symptoms: expected=failure.expected, actual=failure.actual, location=fix_suggestion.file:line, context=fix_suggestion.direction.
216
+
217
+ 3. **Hypothesis generation**: Per symptom cluster, analyze affected code and generate 3-5 ranked hypotheses (each becomes a wave 1 row).
218
+
219
+ 4. **Fix task generation**: Pre-generate wave 2 fix row per hypothesis (`deps`/`context_from` -> hypothesis ID). Only executes if hypothesis confirmed.
220
+
221
+ 5. **CSV generation**: Hypothesis rows (wave 1) + fix rows (wave 2).
222
+
223
+ **Wave computation**: Simple 2-wave -- all hypothesis tasks = wave 1, all fix tasks = wave 2.
224
+
225
+ **User validation**: Display hypothesis breakdown (skip if AUTO_YES).
226
+
227
+ ### Phase 2: Wave Execution Engine
228
+
229
+ **Objective**: Investigate hypotheses wave-by-wave via spawn_agents_on_csv.
230
+
231
+ #### Wave 1: Hypothesis Investigation (Parallel)
232
+
233
+ 1. Extract wave 1 pending rows from master `tasks.csv` into `wave-1.csv` (no prev_context needed)
234
+ 2. Execute:
235
+
236
+ ```javascript
237
+ spawn_agents_on_csv({
238
+ csv_path: `${sessionFolder}/wave-1.csv`,
239
+ id_column: "id",
240
+ instruction: buildInvestigationInstruction(sessionFolder), // agent: ~/.codex/agents/workflow-debugger.toml
241
+ max_concurrency: maxConcurrency, max_runtime_seconds: 3600,
242
+ output_csv_path: `${sessionFolder}/wave-1-results.csv`,
243
+ output_schema: { id, status: [confirmed|refuted|inconclusive|failed], findings, evidence_for, evidence_against, error }
244
+ })
245
+ ```
246
+
247
+ 3. Merge results into master `tasks.csv`, delete `wave-1.csv`
248
+ 4. **Filter for wave 2**: Mark fix tasks as `skipped` if their hypothesis was `refuted` or `inconclusive`
249
+
250
+ #### Wave 2: Fix Attempts (Parallel, Confirmed Only)
251
+
252
+ 1. If no confirmed hypotheses remain, skip wave 2 entirely
253
+ 2. Extract wave 2 pending rows, build `prev_context` from confirmed wave 1 findings
254
+ 3. Write `wave-2.csv`, then execute:
255
+
256
+ ```javascript
257
+ spawn_agents_on_csv({
258
+ csv_path: `${sessionFolder}/wave-2.csv`,
259
+ id_column: "id",
260
+ instruction: buildFixInstruction(sessionFolder), // agent: ~/.codex/agents/workflow-debugger.toml
261
+ max_concurrency: maxConcurrency, max_runtime_seconds: 3600,
262
+ output_csv_path: `${sessionFolder}/wave-2-results.csv`,
263
+ output_schema: { id, status: [fixed|fix_failed|failed], findings, fix_applied, verified, error }
264
+ })
265
+ ```
266
+
267
+ 4. Merge results into master `tasks.csv`, delete `wave-2.csv`
268
+
269
+ ### Phase 3: Results Aggregation
270
+
271
+ **Objective**: Generate final results and human-readable report.
272
+
273
+ 1. Export final `tasks.csv` as `results.csv`
274
+
275
+ 2. **Generate context.md**: Debug report with summary (mode, hypothesis/confirmed/fixed/verified counts), per-hypothesis results (hypothesis, evidence for/against, findings, status), per-fix results (fix applied, verified, findings), aggregated root causes, and next steps.
276
+
277
+ 2b. **Debug confidence scoring**:
278
+
279
+ Dimensions (4): hypothesis_quality, evidence_completeness, root_cause_isolation, fix_confidence. Factors (weights): evidence_depth(.30), evidence_strength(.25), coverage_breadth(.20), reproduction(.15), consistency(.10). Map to legacy: <40% = low, 40-70% = medium, >70% = high. Append confidence assessment to context.md.
280
+
281
+ 3. **UAT update** (if --from-uat): Update `uat.md` gaps with `root_cause`, `fix_direction`, `affected_files` for confirmed hypotheses.
282
+
283
+ 4. **Issue update**: If `issues.jsonl` exists, update matching issues with status `diagnosed`, add `context.suggested_fix` and `context.notes`.
284
+
285
+ 5. **Register artifact** (phase-scoped only): Append to `state.json.artifacts[]` with `type: "debug"`, `id: DBG-NNN`, `depends_on: triggering_review_id || exec_art.id`.
286
+
287
+ 6. **Post-debug Knowledge Inquiry**: Prompt user to capture knowledge when:
288
+ - Recurring root cause pattern detected -> `/spec-add debug`
289
+ - Non-obvious fix strategy used -> `/spec-add learning`
290
+ - Architectural gap identified -> `/spec-add arch`
291
+
292
+ 8. **Next step routing**:
293
+
294
+ | Result | Suggestion |
295
+ |--------|------------|
296
+ | All fixes verified | Run tests: `Skill({ skill: "quality-test", args: "{phase}" })` |
297
+ | Fixes applied, not verified | Re-verify: `Skill({ skill: "maestro-verify", args: "{phase}" })` |
298
+ | Confirmed but no fix | Plan fixes: `Skill({ skill: "maestro-plan", args: "{phase} --gaps" })` |
299
+ | All inconclusive | Resume with more context or manual investigation |
300
+ | From UAT, all diagnosed | `Skill({ skill: "quality-test", args: "{phase} --auto-fix" })` |
301
+
302
+ 9. Display summary.
303
+
304
+ ### Shared Discovery Board Protocol
305
+
306
+ #### Standard Discovery Types
307
+
308
+ | Type | Dedup Key | Data Schema | Description |
309
+ |------|-----------|-------------|-------------|
310
+ | `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
311
+ | `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
312
+ | `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
313
+ | `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue found |
314
+ | `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
315
+
316
+ #### Domain Discovery Types
317
+
318
+ | Type | Dedup Key | Data Schema | Description |
319
+ |------|-----------|-------------|-------------|
320
+ | `root_cause` | `data.location` | `{location, cause, severity, confidence_score, confidence_factors}` | Confirmed root cause |
321
+ | `hypothesis_evidence` | `data.hypothesis+data.location` | `{hypothesis, location, type, conclusion}` | Evidence for/against hypothesis |
322
+ | `affected_component` | `data.component` | `{component, files[], impact}` | Component affected by bug |
323
+ | `reproduction_path` | `data.trigger` | `{trigger, steps[], frequency}` | Bug reproduction path |
324
+
325
+ #### Protocol
326
+
327
+ Read `discoveries.ndjson` before investigation. Append-only: dedup by type+key before writing, never modify/delete.
328
+
329
+ ```bash
330
+ echo '{"ts":"<ISO>","worker":"{id}","type":"root_cause","data":{"location":"src/auth/login.ts:42","cause":"null_dereference","severity":"high","confidence":"confirmed"}}' >> {session_folder}/discoveries.ndjson
331
+ ```
332
+ </execution>
333
+
334
+ <error_codes>
335
+
336
+ | Error | Resolution |
337
+ |-------|------------|
338
+ | No bug description and no --from-uat/--from-auto-test | Abort with error: "Issue description required" |
339
+ | UAT file not found for --from-uat phase | Abort with error: "uat.md not found for phase {N}" |
340
+ | Auto-test report not found for --from-auto-test phase | Abort with error: "report.json not found for phase {N}" |
341
+ | No gaps in UAT file / no code_defects in report | Abort with error: "No failed gaps/defects found" |
342
+ | Hypothesis agent timeout | Mark as inconclusive, continue with remaining |
343
+ | All hypotheses refuted | Skip wave 2, suggest manual investigation |
344
+ | Fix agent timeout | Mark as fix_failed, report partial results |
345
+ | CSV parse error | Validate format, show line number |
346
+ | discoveries.ndjson corrupt | Ignore malformed lines |
347
+ | Continue mode: no session found | List available sessions |
348
+ | Existing debug session found | Offer resume (skip if AUTO_YES) |
349
+ </error_codes>
350
+
351
+ <success_criteria>
352
+ - [ ] Session folder created with valid tasks.csv
353
+ - [ ] Wave 1 hypotheses investigated in parallel
354
+ - [ ] Refuted/inconclusive hypotheses correctly skip wave 2 fix tasks
355
+ - [ ] Wave 2 fixes attempted only for confirmed hypotheses
356
+ - [ ] context.md produced with diagnosis summary
357
+ - [ ] Multi-factor confidence scored per hypothesis replacing simple high/medium/low
358
+ - [ ] Confidence assessment appended to context.md
359
+ - [ ] UAT gaps updated (if --from-uat)
360
+ - [ ] Issues updated with diagnosis results
361
+ - [ ] discoveries.ndjson append-only throughout
362
+ </success_criteria>