maestro-flow 0.3.32 → 0.3.34

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 (241) hide show
  1. package/.claude/commands/learn-retro.md +1 -1
  2. package/.claude/commands/maestro-composer.md +2 -2
  3. package/.claude/commands/maestro-ralph-execute.md +1 -1
  4. package/.claude/commands/maestro-ralph.md +11 -11
  5. package/.claude/commands/maestro-verify.md +1 -1
  6. package/.claude/commands/maestro.md +1 -2
  7. package/.claude/commands/quality-auto-test.md +124 -0
  8. package/.claude/commands/quality-refactor.md +1 -1
  9. package/.claude/commands/quality-test.md +3 -3
  10. package/.codex/skills/learn-retro/SKILL.md +1 -1
  11. package/.codex/skills/maestro/SKILL.md +1 -1
  12. package/.codex/skills/maestro-link-coordinate/SKILL.md +1 -1
  13. package/.codex/skills/maestro-milestone-audit/SKILL.md +9 -1
  14. package/.codex/skills/maestro-plan/SKILL.md +72 -6
  15. package/.codex/skills/maestro-ralph/SKILL.md +159 -159
  16. package/.codex/skills/maestro-roadmap/SKILL.md +31 -5
  17. package/.codex/skills/maestro-verify/SKILL.md +1 -1
  18. package/.codex/skills/quality-auto-test/SKILL.md +547 -0
  19. package/.codex/skills/quality-debug/SKILL.md +18 -6
  20. package/.codex/skills/quality-refactor/SKILL.md +8 -1
  21. package/.codex/skills/quality-sync/SKILL.md +23 -4
  22. package/.codex/skills/quality-test/SKILL.md +498 -166
  23. package/dashboard/dist-server/src/config/cli-tools-config.js +5 -20
  24. package/dashboard/dist-server/src/config/cli-tools-config.js.map +1 -1
  25. package/dashboard/dist-server/src/config/cli-tools-defaults.json +17 -0
  26. package/dist/src/commands/config.d.ts.map +1 -1
  27. package/dist/src/commands/config.js +168 -32
  28. package/dist/src/commands/config.js.map +1 -1
  29. package/dist/src/commands/hooks.d.ts +9 -0
  30. package/dist/src/commands/hooks.d.ts.map +1 -1
  31. package/dist/src/commands/hooks.js +1 -1
  32. package/dist/src/commands/hooks.js.map +1 -1
  33. package/dist/src/commands/install.js +1 -1
  34. package/dist/src/commands/install.js.map +1 -1
  35. package/dist/src/commands/overlay.js +1 -1
  36. package/dist/src/commands/overlay.js.map +1 -1
  37. package/dist/src/commands/tools.d.ts.map +1 -1
  38. package/dist/src/commands/tools.js +7 -17
  39. package/dist/src/commands/tools.js.map +1 -1
  40. package/dist/src/commands/uninstall.js +1 -1
  41. package/dist/src/commands/uninstall.js.map +1 -1
  42. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  43. package/dist/src/config/cli-tools-config.js +5 -20
  44. package/dist/src/config/cli-tools-config.js.map +1 -1
  45. package/dist/src/config/cli-tools-defaults.json +17 -0
  46. package/dist/src/tui/config-ui/ConfigHub.d.ts +14 -0
  47. package/dist/src/tui/config-ui/ConfigHub.d.ts.map +1 -0
  48. package/dist/src/tui/config-ui/ConfigHub.js +125 -0
  49. package/dist/src/tui/config-ui/ConfigHub.js.map +1 -0
  50. package/dist/src/tui/config-ui/ConfigSourcesView.d.ts +6 -0
  51. package/dist/src/tui/config-ui/ConfigSourcesView.d.ts.map +1 -0
  52. package/dist/src/tui/config-ui/ConfigSourcesView.js +25 -0
  53. package/dist/src/tui/config-ui/ConfigSourcesView.js.map +1 -0
  54. package/dist/src/tui/config-ui/HooksPanel.d.ts +6 -0
  55. package/dist/src/tui/config-ui/HooksPanel.d.ts.map +1 -0
  56. package/dist/src/tui/config-ui/HooksPanel.js +92 -0
  57. package/dist/src/tui/config-ui/HooksPanel.js.map +1 -0
  58. package/dist/src/tui/config-ui/SkillConfigDashboard.d.ts +9 -0
  59. package/dist/src/tui/config-ui/SkillConfigDashboard.d.ts.map +1 -0
  60. package/dist/src/tui/config-ui/SkillConfigDashboard.js +64 -0
  61. package/dist/src/tui/config-ui/SkillConfigDashboard.js.map +1 -0
  62. package/dist/src/tui/config-ui/SkillParamEditor.d.ts +12 -0
  63. package/dist/src/tui/config-ui/SkillParamEditor.d.ts.map +1 -0
  64. package/dist/src/tui/config-ui/SkillParamEditor.js +162 -0
  65. package/dist/src/tui/config-ui/SkillParamEditor.js.map +1 -0
  66. package/dist/src/tui/config-ui/SkillsList.d.ts +12 -0
  67. package/dist/src/tui/config-ui/SkillsList.d.ts.map +1 -0
  68. package/dist/src/tui/config-ui/SkillsList.js +91 -0
  69. package/dist/src/tui/config-ui/SkillsList.js.map +1 -0
  70. package/dist/src/tui/config-ui/SpecPanel.d.ts +6 -0
  71. package/dist/src/tui/config-ui/SpecPanel.d.ts.map +1 -0
  72. package/dist/src/tui/config-ui/SpecPanel.js +79 -0
  73. package/dist/src/tui/config-ui/SpecPanel.js.map +1 -0
  74. package/dist/src/tui/config-ui/index.d.ts +23 -0
  75. package/dist/src/tui/config-ui/index.d.ts.map +1 -0
  76. package/dist/src/tui/config-ui/index.js +34 -0
  77. package/dist/src/tui/config-ui/index.js.map +1 -0
  78. package/dist/src/tui/index.d.ts +7 -0
  79. package/dist/src/tui/index.d.ts.map +1 -0
  80. package/dist/src/tui/index.js +10 -0
  81. package/dist/src/tui/index.js.map +1 -0
  82. package/dist/src/tui/install-ui/BackupConfig.d.ts +10 -0
  83. package/dist/src/tui/install-ui/BackupConfig.d.ts.map +1 -0
  84. package/dist/src/tui/install-ui/BackupConfig.js +46 -0
  85. package/dist/src/tui/install-ui/BackupConfig.js.map +1 -0
  86. package/dist/src/tui/install-ui/BlueprintPreview.d.ts +9 -0
  87. package/dist/src/tui/install-ui/BlueprintPreview.d.ts.map +1 -0
  88. package/dist/src/tui/install-ui/BlueprintPreview.js +65 -0
  89. package/dist/src/tui/install-ui/BlueprintPreview.js.map +1 -0
  90. package/dist/src/tui/install-ui/BlueprintPreview.logic.d.ts +33 -0
  91. package/dist/src/tui/install-ui/BlueprintPreview.logic.d.ts.map +1 -0
  92. package/dist/src/tui/install-ui/BlueprintPreview.logic.js +51 -0
  93. package/dist/src/tui/install-ui/BlueprintPreview.logic.js.map +1 -0
  94. package/dist/src/tui/install-ui/ComponentGrid.d.ts +13 -0
  95. package/dist/src/tui/install-ui/ComponentGrid.d.ts.map +1 -0
  96. package/dist/src/tui/install-ui/ComponentGrid.js +75 -0
  97. package/dist/src/tui/install-ui/ComponentGrid.js.map +1 -0
  98. package/dist/src/tui/install-ui/ComponentGrid.logic.d.ts +31 -0
  99. package/dist/src/tui/install-ui/ComponentGrid.logic.d.ts.map +1 -0
  100. package/dist/src/tui/install-ui/ComponentGrid.logic.js +58 -0
  101. package/dist/src/tui/install-ui/ComponentGrid.logic.js.map +1 -0
  102. package/dist/src/tui/install-ui/ConfigPanel.d.ts +11 -0
  103. package/dist/src/tui/install-ui/ConfigPanel.d.ts.map +1 -0
  104. package/dist/src/tui/install-ui/ConfigPanel.js +35 -0
  105. package/dist/src/tui/install-ui/ConfigPanel.js.map +1 -0
  106. package/dist/src/tui/install-ui/CyberItem.d.ts +18 -0
  107. package/dist/src/tui/install-ui/CyberItem.d.ts.map +1 -0
  108. package/dist/src/tui/install-ui/CyberItem.js +33 -0
  109. package/dist/src/tui/install-ui/CyberItem.js.map +1 -0
  110. package/dist/src/tui/install-ui/CyberdeckBlueprint.d.ts +7 -0
  111. package/dist/src/tui/install-ui/CyberdeckBlueprint.d.ts.map +1 -0
  112. package/dist/src/tui/install-ui/CyberdeckBlueprint.js +91 -0
  113. package/dist/src/tui/install-ui/CyberdeckBlueprint.js.map +1 -0
  114. package/dist/src/tui/install-ui/ExecutionView.d.ts +12 -0
  115. package/dist/src/tui/install-ui/ExecutionView.d.ts.map +1 -0
  116. package/dist/src/tui/install-ui/ExecutionView.js +154 -0
  117. package/dist/src/tui/install-ui/ExecutionView.js.map +1 -0
  118. package/dist/src/tui/install-ui/GradientHeader.d.ts +8 -0
  119. package/dist/src/tui/install-ui/GradientHeader.d.ts.map +1 -0
  120. package/dist/src/tui/install-ui/GradientHeader.js +18 -0
  121. package/dist/src/tui/install-ui/GradientHeader.js.map +1 -0
  122. package/dist/src/tui/install-ui/HooksConfig.d.ts +8 -0
  123. package/dist/src/tui/install-ui/HooksConfig.d.ts.map +1 -0
  124. package/dist/src/tui/install-ui/HooksConfig.js +35 -0
  125. package/dist/src/tui/install-ui/HooksConfig.js.map +1 -0
  126. package/dist/src/tui/install-ui/InstallConfirm.d.ts +27 -0
  127. package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -0
  128. package/dist/src/tui/install-ui/InstallConfirm.js +25 -0
  129. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -0
  130. package/dist/src/tui/install-ui/InstallExecution.d.ts +21 -0
  131. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -0
  132. package/dist/src/tui/install-ui/InstallExecution.js +154 -0
  133. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -0
  134. package/dist/src/tui/install-ui/InstallFlow.d.ts +14 -0
  135. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -0
  136. package/dist/src/tui/install-ui/InstallFlow.js +186 -0
  137. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -0
  138. package/dist/src/tui/install-ui/InstallHub.d.ts +33 -0
  139. package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -0
  140. package/dist/src/tui/install-ui/InstallHub.js +97 -0
  141. package/dist/src/tui/install-ui/InstallHub.js.map +1 -0
  142. package/dist/src/tui/install-ui/InstallResult.d.ts +7 -0
  143. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -0
  144. package/dist/src/tui/install-ui/InstallResult.js +15 -0
  145. package/dist/src/tui/install-ui/InstallResult.js.map +1 -0
  146. package/dist/src/tui/install-ui/McpConfig.d.ts +12 -0
  147. package/dist/src/tui/install-ui/McpConfig.d.ts.map +1 -0
  148. package/dist/src/tui/install-ui/McpConfig.js +69 -0
  149. package/dist/src/tui/install-ui/McpConfig.js.map +1 -0
  150. package/dist/src/tui/install-ui/ResultDashboard.d.ts +8 -0
  151. package/dist/src/tui/install-ui/ResultDashboard.d.ts.map +1 -0
  152. package/dist/src/tui/install-ui/ResultDashboard.js +17 -0
  153. package/dist/src/tui/install-ui/ResultDashboard.js.map +1 -0
  154. package/dist/src/tui/install-ui/ReviewPanel.d.ts +19 -0
  155. package/dist/src/tui/install-ui/ReviewPanel.d.ts.map +1 -0
  156. package/dist/src/tui/install-ui/ReviewPanel.js +25 -0
  157. package/dist/src/tui/install-ui/ReviewPanel.js.map +1 -0
  158. package/dist/src/tui/install-ui/ShortcutFooter.d.ts +7 -0
  159. package/dist/src/tui/install-ui/ShortcutFooter.d.ts.map +1 -0
  160. package/dist/src/tui/install-ui/ShortcutFooter.js +15 -0
  161. package/dist/src/tui/install-ui/ShortcutFooter.js.map +1 -0
  162. package/dist/src/tui/install-ui/StatuslineConfig.d.ts +11 -0
  163. package/dist/src/tui/install-ui/StatuslineConfig.d.ts.map +1 -0
  164. package/dist/src/tui/install-ui/StatuslineConfig.js +39 -0
  165. package/dist/src/tui/install-ui/StatuslineConfig.js.map +1 -0
  166. package/dist/src/tui/install-ui/StepSelector.d.ts +14 -0
  167. package/dist/src/tui/install-ui/StepSelector.d.ts.map +1 -0
  168. package/dist/src/tui/install-ui/StepSelector.js +46 -0
  169. package/dist/src/tui/install-ui/StepSelector.js.map +1 -0
  170. package/dist/src/tui/install-ui/index.d.ts +8 -0
  171. package/dist/src/tui/install-ui/index.d.ts.map +1 -0
  172. package/dist/src/tui/install-ui/index.js +10 -0
  173. package/dist/src/tui/install-ui/index.js.map +1 -0
  174. package/dist/src/tui/install-ui/types.d.ts +35 -0
  175. package/dist/src/tui/install-ui/types.d.ts.map +1 -0
  176. package/dist/src/tui/install-ui/types.js +25 -0
  177. package/dist/src/tui/install-ui/types.js.map +1 -0
  178. package/dist/src/tui/overlay-ui/OverlayList.d.ts +37 -0
  179. package/dist/src/tui/overlay-ui/OverlayList.d.ts.map +1 -0
  180. package/dist/src/tui/overlay-ui/OverlayList.js +146 -0
  181. package/dist/src/tui/overlay-ui/OverlayList.js.map +1 -0
  182. package/dist/src/tui/overlay-ui/index.d.ts +18 -0
  183. package/dist/src/tui/overlay-ui/index.d.ts.map +1 -0
  184. package/dist/src/tui/overlay-ui/index.js +204 -0
  185. package/dist/src/tui/overlay-ui/index.js.map +1 -0
  186. package/dist/src/tui/render.d.ts +13 -0
  187. package/dist/src/tui/render.d.ts.map +1 -0
  188. package/dist/src/tui/render.js +31 -0
  189. package/dist/src/tui/render.js.map +1 -0
  190. package/dist/src/tui/tools-ui/CommandReference.d.ts +7 -0
  191. package/dist/src/tui/tools-ui/CommandReference.d.ts.map +1 -0
  192. package/dist/src/tui/tools-ui/CommandReference.js +33 -0
  193. package/dist/src/tui/tools-ui/CommandReference.js.map +1 -0
  194. package/dist/src/tui/tools-ui/ConfigSources.d.ts +6 -0
  195. package/dist/src/tui/tools-ui/ConfigSources.d.ts.map +1 -0
  196. package/dist/src/tui/tools-ui/ConfigSources.js +27 -0
  197. package/dist/src/tui/tools-ui/ConfigSources.js.map +1 -0
  198. package/dist/src/tui/tools-ui/RegisterSettings.d.ts +8 -0
  199. package/dist/src/tui/tools-ui/RegisterSettings.d.ts.map +1 -0
  200. package/dist/src/tui/tools-ui/RegisterSettings.js +125 -0
  201. package/dist/src/tui/tools-ui/RegisterSettings.js.map +1 -0
  202. package/dist/src/tui/tools-ui/RoleMappings.d.ts +9 -0
  203. package/dist/src/tui/tools-ui/RoleMappings.d.ts.map +1 -0
  204. package/dist/src/tui/tools-ui/RoleMappings.js +104 -0
  205. package/dist/src/tui/tools-ui/RoleMappings.js.map +1 -0
  206. package/dist/src/tui/tools-ui/ToolsDashboard.d.ts +8 -0
  207. package/dist/src/tui/tools-ui/ToolsDashboard.d.ts.map +1 -0
  208. package/dist/src/tui/tools-ui/ToolsDashboard.js +60 -0
  209. package/dist/src/tui/tools-ui/ToolsDashboard.js.map +1 -0
  210. package/dist/src/tui/tools-ui/ToolsOverview.d.ts +9 -0
  211. package/dist/src/tui/tools-ui/ToolsOverview.d.ts.map +1 -0
  212. package/dist/src/tui/tools-ui/ToolsOverview.js +84 -0
  213. package/dist/src/tui/tools-ui/ToolsOverview.js.map +1 -0
  214. package/dist/src/tui/tools-ui/index.d.ts +3 -0
  215. package/dist/src/tui/tools-ui/index.d.ts.map +1 -0
  216. package/dist/src/tui/tools-ui/index.js +6 -0
  217. package/dist/src/tui/tools-ui/index.js.map +1 -0
  218. package/dist/src/tui/uninstall-ui/UninstallFlow.d.ts +7 -0
  219. package/dist/src/tui/uninstall-ui/UninstallFlow.d.ts.map +1 -0
  220. package/dist/src/tui/uninstall-ui/UninstallFlow.js +189 -0
  221. package/dist/src/tui/uninstall-ui/UninstallFlow.js.map +1 -0
  222. package/dist/src/tui/uninstall-ui/index.d.ts +3 -0
  223. package/dist/src/tui/uninstall-ui/index.d.ts.map +1 -0
  224. package/dist/src/tui/uninstall-ui/index.js +6 -0
  225. package/dist/src/tui/uninstall-ui/index.js.map +1 -0
  226. package/package.json +1 -1
  227. package/workflows/auto-test.md +682 -0
  228. package/workflows/business-test.md +570 -0
  229. package/workflows/integration-test.md +1 -1
  230. package/workflows/maestro.codex.md +4 -3
  231. package/workflows/maestro.md +5 -4
  232. package/workflows/status.md +2 -2
  233. package/workflows/test.md +1 -1
  234. package/workflows/verify.md +1 -1
  235. package/.claude/commands/quality-business-test.md +0 -110
  236. package/.claude/commands/quality-integration-test.md +0 -67
  237. package/.claude/commands/quality-test-gen.md +0 -68
  238. package/.codex/skills/maestro-ralph-execute/SKILL.md +0 -219
  239. package/.codex/skills/quality-business-test/SKILL.md +0 -218
  240. package/.codex/skills/quality-integration-test/SKILL.md +0 -427
  241. package/.codex/skills/quality-test-gen/SKILL.md +0 -352
@@ -1,352 +0,0 @@
1
- ---
2
- name: quality-test-gen
3
- description: Test generation via CSV wave pipeline. Decomposes source files into independent parallel agents, each generating tests with TDD/E2E classification and RED-GREEN methodology. Replaces quality-test-gen command.
4
- argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--type unit|integration|e2e] [--framework jest|vitest|...]\""
5
- allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
- ---
7
-
8
- <purpose>
9
- Wave-based test generation using `spawn_agents_on_csv`. Each source file/module gets an independent agent that classifies, plans, and writes tests using RED-GREEN methodology. All agents run in a single parallel wave.
10
-
11
- **Core workflow**: Discover Infrastructure -> Identify Gaps -> Classify Files -> Decompose to CSV -> Parallel Test Gen -> Aggregate Results
12
-
13
- ```
14
- +---------------------------------------------------------------------------+
15
- | TEST GENERATION CSV WAVE WORKFLOW |
16
- +---------------------------------------------------------------------------+
17
- | |
18
- | Phase 1: Gap Analysis -> CSV |
19
- | +-- Resolve phase directory from arguments |
20
- | +-- Discover test infrastructure (framework, patterns, conventions) |
21
- | +-- Identify gaps from verification.json + coverage-report.json |
22
- | +-- Classify changed files into unit/integration/e2e/skip |
23
- | +-- Apply --type filter if set |
24
- | +-- Generate tasks.csv with one row per source file |
25
- | +-- User validates test plan breakdown (skip if -y) |
26
- | |
27
- | Phase 2: Wave Execution Engine |
28
- | +-- Wave 1: Test Generation (independent parallel) |
29
- | | +-- Each agent generates tests for its assigned source file |
30
- | | +-- RED phase: write failing test targeting real behavior |
31
- | | +-- GREEN assessment: check if source already satisfies |
32
- | | +-- Discoveries shared via board (test patterns, fixtures) |
33
- | | +-- Results: tests_created + coverage_delta per source file |
34
- | +-- discoveries.ndjson shared across all agents (append-only) |
35
- | |
36
- | Phase 3: Results Aggregation |
37
- | +-- Export results.csv + test-gen-report.json |
38
- | +-- Run full test suite to verify no regressions |
39
- | +-- Generate context.md with all findings |
40
- | +-- Update validation.json with new coverage status |
41
- | +-- Display summary with next steps |
42
- | |
43
- +---------------------------------------------------------------------------+
44
- ```
45
- </purpose>
46
-
47
- <context>
48
- ```bash
49
- $quality-test-gen "3"
50
- $quality-test-gen -c 4 "3 --type unit"
51
- $quality-test-gen -y "3 --type e2e --framework vitest"
52
- $quality-test-gen --continue "20260318-testgen-P3-auth"
53
- ```
54
-
55
- **Flags**:
56
- - `-y, --yes`: Skip all confirmations (auto mode)
57
- - `-c, --concurrency N`: Max concurrent agents within the wave (default: 6)
58
- - `--continue`: Resume existing session
59
-
60
- When `--yes` or `-y`: Auto-confirm test plan, skip interactive validation, use defaults for framework detection.
61
-
62
- **Output Directory**: `.workflow/.csv-wave/{session-id}/`
63
- **Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (human-readable report) + `test-gen-report.json` (structured output for downstream)
64
- </context>
65
-
66
- <csv_schema>
67
-
68
- ### tasks.csv (Master State)
69
-
70
- ```csv
71
- id,title,description,source_file,test_type,test_framework,deps,context_from,wave,status,findings,tests_created,coverage_delta,error
72
- "1","Test validate.ts","Generate unit tests for src/utils/validate.ts: email validation, input sanitization. RED-GREEN methodology. Follow existing vitest patterns. Gap: SC-002 MISSING coverage.","src/utils/validate.ts","unit","vitest","","","1","","","","",""
73
- "2","Test ChatWindow.tsx","Generate e2e tests for src/components/ChatWindow.tsx: message rendering, scroll behavior, input handling. Follow existing Playwright patterns. Gap: SC-005 PARTIAL coverage.","src/components/ChatWindow.tsx","e2e","playwright","","","1","","","","",""
74
- "3","Test comments.ts","Generate integration tests for src/api/comments.ts: CRUD endpoints, auth middleware, error responses. Follow existing supertest patterns. Gap: SC-003 MISSING coverage.","src/api/comments.ts","integration","vitest","","","1","","","","",""
75
- "4","Test useChat.ts","Generate unit tests for src/hooks/useChat.ts: state management, WebSocket connection, message queue. RED-GREEN methodology. Gap: SC-004 MISSING coverage.","src/hooks/useChat.ts","unit","vitest","","","1","","","","",""
76
- "5","Test auth.ts","Generate unit tests for src/auth/auth.ts: token verification, session management, password hashing. Follow existing test patterns. Gap: SC-001 MISSING coverage.","src/auth/auth.ts","unit","vitest","","","1","","","","",""
77
- ```
78
-
79
- **Columns**:
80
-
81
- | Column | Phase | Description |
82
- |--------|-------|-------------|
83
- | `id` | Input | Unique task identifier (string) |
84
- | `title` | Input | Short task title |
85
- | `description` | Input | Detailed test generation instructions for this source file, including gap refs and pattern guidance |
86
- | `source_file` | Input | Source file path to generate tests for |
87
- | `test_type` | Input | Test category: unit/integration/e2e |
88
- | `test_framework` | Input | Detected or specified framework: jest/vitest/pytest/mocha/playwright/cypress |
89
- | `deps` | Input | Semicolon-separated dependency task IDs (empty for independent parallel) |
90
- | `context_from` | Input | Semicolon-separated task IDs whose findings this task needs (empty for wave 1) |
91
- | `wave` | Computed | Wave number (always 1 -- independent parallel topology) |
92
- | `status` | Output | `pending` -> `completed` / `failed` / `skipped` |
93
- | `findings` | Output | Key findings summary: bugs discovered, patterns used (max 500 chars) |
94
- | `tests_created` | Output | Semicolon-separated paths to generated test files |
95
- | `coverage_delta` | Output | Coverage improvement estimate: `+N%` or `N new cases` |
96
- | `error` | Output | Error message if failed |
97
-
98
- ### Per-Wave CSV (Temporary)
99
-
100
- Each wave generates `wave-{N}.csv` with extra `prev_context` column (empty for wave 1).
101
-
102
- ### Output Artifacts
103
-
104
- | File | Purpose | Lifecycle |
105
- |------|---------|-----------|
106
- | `tasks.csv` | Master state -- all tasks with status/findings | Updated after wave completes |
107
- | `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
108
- | `results.csv` | Final export of all task results | Created in Phase 3 |
109
- | `discoveries.ndjson` | Shared exploration board | Append-only, carries across agents |
110
- | `context.md` | Human-readable test generation report | Created in Phase 3 |
111
- | `test-gen-report.json` | Structured output for downstream commands | Created in Phase 3 |
112
-
113
- ### Session Structure
114
-
115
- ```
116
- .workflow/.csv-wave/{YYYYMMDD}-testgen-P{N}-{slug}/
117
- +-- tasks.csv
118
- +-- results.csv
119
- +-- discoveries.ndjson
120
- +-- context.md
121
- +-- test-gen-report.json
122
- +-- wave-{N}.csv (temporary)
123
- ```
124
- </csv_schema>
125
-
126
- <invariants>
127
- 1. **Start Immediately**: First action is session initialization, then Phase 1
128
- 2. **Single Wave**: All test generation agents run in one parallel wave (independent topology)
129
- 3. **CSV is Source of Truth**: Master tasks.csv holds all state
130
- 4. **RED-GREEN Methodology**: Write failing test first, then assess -- never write trivially passing tests
131
- 5. **Tests Expose, Not Fix**: Failing tests document bugs; source code changes are NOT permitted
132
- 6. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
133
- 7. **Follow Existing Patterns**: Generated tests must match project's test conventions (imports, structure, assertions)
134
- 8. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
135
- 9. **DO NOT STOP**: Continuous execution until all agents complete and results are aggregated
136
- </invariants>
137
-
138
- <execution>
139
-
140
- ### Session Initialization
141
-
142
- ```
143
- Parse from $ARGUMENTS:
144
- AUTO_YES ← --yes | -y
145
- continueMode ← --continue
146
- maxConcurrency ← --concurrency | -c N (default: 6)
147
- typeFilter ← --type unit|integration|e2e (default: all)
148
- framework ← --framework jest|vitest|... (default: auto-detect)
149
- phaseArg ← remaining text after flag removal
150
-
151
- Derive:
152
- dateStr ← UTC+8 YYYYMMDD
153
- sessionId ← "{dateStr}-testgen-P{phaseArg}-{phaseSlug}"
154
- sessionFolder ← ".workflow/.csv-wave/{sessionId}"
155
-
156
- mkdir -p {sessionFolder}
157
- ```
158
-
159
- ### Phase 1: Gap Analysis -> CSV
160
-
161
- **Objective**: Discover test infrastructure, identify coverage gaps, classify files, generate tasks.csv.
162
-
163
- **Decomposition Rules**:
164
-
165
- 1. **Phase resolution**: Resolve `{phaseArg}` via artifact registry in `state.json` to `.workflow/scratch/{YYYYMMDD}-{type}-{slug}/`
166
-
167
- 2. **Related session discovery**: Query `state.json.artifacts[]` for matching phase+milestone. Extract relevant outputs by type: review -> review.json (focused test targets), debug -> understanding.md (regression targets), test -> uat.md (behavior gaps).
168
-
169
- 3. **Test infrastructure discovery**: Scan for config files (`jest.config.*`, `vitest.config.*`, `pytest.ini`, `.mocharc.*`), existing test files (`*.test.*`, `*.spec.*`, `test_*`), and test utilities. Read 2-3 existing tests to learn patterns. Error E003 if no framework detected.
170
-
171
- 3. **Gap identification**:
172
-
173
- | Source | Gap Type | Priority |
174
- |--------|----------|----------|
175
- | `verification.json` gaps where status = MISSING | No test at all | HIGH |
176
- | `coverage-report.json` requirements_uncovered | Untested requirement | HIGH |
177
- | `verification.json` gaps where status = PARTIAL | Incomplete test | MEDIUM |
178
- | Task summaries (modified files) | Changed code | LOW |
179
-
180
- 4. **File classification**:
181
-
182
- | File Type | Test Category | Rationale |
183
- |-----------|---------------|-----------|
184
- | Pure function / utility | unit | Isolated, no side effects |
185
- | React component | unit + e2e | Unit for logic, E2E for rendering |
186
- | API route / handler | integration | Needs request context |
187
- | Database model / query | integration | Needs DB connection |
188
- | CLI command | e2e | Needs process execution |
189
- | Config / types / constants | skip | No behavior to test |
190
- | CSS / styles | skip | Visual, not testable |
191
- | Test files themselves | skip | Don't test tests |
192
-
193
- 5. **Filter application**: If `--type` flag set, include only matching test type.
194
-
195
- 6. **Framework resolution**: Use `--framework` if provided, otherwise auto-detected framework.
196
-
197
- 7. **CSV generation**: One row per source file (skip category excluded).
198
-
199
- **Wave computation**: Single wave -- all tasks are independent parallel (wave = 1).
200
-
201
- **User validation**: Display test plan breakdown (skip if AUTO_YES).
202
-
203
- ### Phase 2: Wave Execution Engine
204
-
205
- **Objective**: Execute test generation agents in parallel via spawn_agents_on_csv.
206
-
207
- #### Wave 1: Test Generation (Independent Parallel)
208
-
209
- 1. Extract wave 1 pending rows from master `tasks.csv` into `wave-1.csv` (no prev_context needed)
210
- 2. Execute:
211
-
212
- ```javascript
213
- spawn_agents_on_csv({
214
- csv_path: `${sessionFolder}/wave-1.csv`,
215
- id_column: "id",
216
- instruction: buildTestGenInstruction(sessionFolder),
217
- max_concurrency: maxConcurrency, max_runtime_seconds: 3600,
218
- output_csv_path: `${sessionFolder}/wave-1-results.csv`,
219
- output_schema: { id, status: [completed|failed], findings, tests_created, coverage_delta, error }
220
- })
221
- ```
222
-
223
- 3. Merge results into master `tasks.csv`, delete `wave-1.csv`
224
-
225
- **Agent Instruction** (`buildTestGenInstruction`): Each agent receives source file path, test type, detected framework, existing patterns, gap references, and RED-GREEN methodology (RED: write failing test -> verify it fails -> GREEN: assess if source satisfies). Agents must NOT fix source code -- failing tests document bugs. Discovery board protocol included.
226
-
227
- ### Phase 3: Results Aggregation
228
-
229
- **Objective**: Run full suite, generate final results and human-readable report.
230
-
231
- 1. Export final `tasks.csv` as `results.csv`
232
-
233
- 2. **Run full test suite**: Categorize results as new passing (gap filled), new failing (bug discovered), existing broken (regression).
234
-
235
- 3. **Archive previous artifacts**: Move existing `test-gen-report.json` to `.history/` with timestamp before overwriting.
236
-
237
- 4. Build `test-gen-report.json`:
238
-
239
- ```json
240
- {
241
- "phase": "<phase>",
242
- "generated_at": "<ISO>",
243
- "session_id": "<session-id>",
244
- "infrastructure": {
245
- "framework": "vitest",
246
- "test_dir": "__tests__/",
247
- "run_command": "npm test"
248
- },
249
- "classification": {
250
- "unit": ["src/utils/validate.ts", "src/hooks/useChat.ts"],
251
- "integration": ["src/api/comments.ts"],
252
- "e2e": ["src/components/ChatWindow.tsx"],
253
- "skip": ["src/types/index.ts"]
254
- },
255
- "generated": [
256
- {
257
- "id": "1",
258
- "source_file": "src/utils/validate.ts",
259
- "test_file": "src/utils/__tests__/validate.test.ts",
260
- "test_type": "unit",
261
- "test_cases": 4,
262
- "status": "passing|failing|mixed",
263
- "bugs_discovered": []
264
- }
265
- ],
266
- "summary": {
267
- "files_generated": 5,
268
- "test_cases_total": 22,
269
- "passing": 18,
270
- "failing": 4,
271
- "bugs_discovered": 2,
272
- "coverage_delta": "+12%"
273
- }
274
- }
275
- ```
276
-
277
- 5. **Generate context.md**: Report with summary (framework, file count, type filter), classification table (unit/integration/e2e/skipped counts), generation results per file (source, type, tests, status, bugs), test suite verification (passing/failing/regression counts), discovered bugs, and next steps.
278
-
279
- 6. **Update validation.json**: Change MISSING -> COVERED for gaps that now have tests.
280
-
281
- 7. **Copy** `test-gen-report.json` to phase `.tests/` directory.
282
-
283
- 8. **Register artifact**: Append to `state.json.artifacts[]` with `type: "test"`, `id: TST-NNN`, `depends_on: exec_art.id`.
284
-
285
- 9. Display summary.
286
-
287
- **Next step routing**:
288
-
289
- | Result | Suggestion |
290
- |--------|------------|
291
- | All tests passing | `maestro-verify {phase}` to update Nyquist coverage |
292
- | Bugs discovered (failing tests) | `quality-debug --from-uat {phase}` to investigate |
293
- | Regressions found | `quality-debug` immediately |
294
- | Coverage still low | Run again with `--type` for uncovered layers |
295
-
296
- ### Shared Discovery Board Protocol
297
-
298
- #### Standard Discovery Types
299
-
300
- | Type | Dedup Key | Data Schema | Description |
301
- |------|-----------|-------------|-------------|
302
- | `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
303
- | `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
304
- | `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
305
- | `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue found |
306
- | `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
307
-
308
- #### Domain Discovery Types
309
-
310
- | Type | Dedup Key | Data Schema | Description |
311
- |------|-----------|-------------|-------------|
312
- | `test_pattern` | `data.name` | `{name, file, framework, description}` | Reusable test pattern (describe structure, assertion style) |
313
- | `test_fixture` | `data.name` | `{name, file, setup, teardown}` | Shared test fixture or factory |
314
- | `mock_strategy` | `data.module` | `{module, strategy, file}` | How a dependency is mocked |
315
- | `bug_discovered` | `data.location` | `{location, test_file, description, severity}` | Bug found via failing test |
316
-
317
- #### Protocol
318
-
319
- Read `discoveries.ndjson` before test generation. Append-only: dedup by type+key before writing, never modify/delete.
320
-
321
- ```bash
322
- echo '{"ts":"<ISO>","worker":"{id}","type":"test_pattern","data":{"name":"api-endpoint-test","file":"src/api/__tests__/users.test.ts","framework":"vitest","description":"supertest + vitest pattern for REST endpoints"}}' >> {session_folder}/discoveries.ndjson
323
- ```
324
- </execution>
325
-
326
- <error_codes>
327
-
328
- | Error | Resolution |
329
- |-------|------------|
330
- | Phase directory not found | Abort with error: "Phase {N} not found" |
331
- | No verification results found | Abort with error: "No verification results -- run maestro-verify first" |
332
- | No test framework detected | Abort with error: "No test framework detected (E003)" |
333
- | No gaps identified | Info: "No coverage gaps found -- phase fully tested" |
334
- | Agent timeout | Mark as failed, continue with remaining agents |
335
- | Test file write conflict | Agent checks for existing test, extends rather than overwrites |
336
- | CSV parse error | Validate format, show line number |
337
- | discoveries.ndjson corrupt | Ignore malformed lines |
338
- | Continue mode: no session found | List available sessions |
339
- | Regression detected in existing tests | Flag as blocker (W002), do not fix source code |
340
- </error_codes>
341
-
342
- <success_criteria>
343
- - [ ] Session folder created with valid tasks.csv
344
- - [ ] All test generation agents executed in parallel (single wave)
345
- - [ ] Test files created following project conventions
346
- - [ ] RED-GREEN methodology applied (no trivially passing tests)
347
- - [ ] test-gen-report.json produced with classification and results
348
- - [ ] context.md produced with test generation report
349
- - [ ] Full test suite run to verify no regressions
350
- - [ ] validation.json gaps updated for covered items
351
- - [ ] discoveries.ndjson append-only throughout
352
- </success_criteria>