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,110 +0,0 @@
1
- ---
2
- name: quality-business-test
3
- description: PRD-forward business testing with requirement traceability, fixture generation, and multi-layer execution
4
- argument-hint: "<phase> [--spec SPEC-xxx] [--layer L1|L2|L3] [--gen-code] [--dry-run] [--re-run] [-y]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Agent
13
- - AskUserQuestion
14
- ---
15
- <purpose>
16
- Validate built features against PRD acceptance criteria through automated multi-layer business testing. Unlike quality-test (interactive UAT from code gaps) and quality-test-gen (generate tests from coverage gaps), this command starts from REQ-*.md acceptance criteria and works forward to verify business rules are satisfied.
17
-
18
- Key mechanisms:
19
- - **PRD-forward extraction**: Parse REQ-*.md acceptance criteria with RFC 2119 priority mapping
20
- - **Three-tier fixture generation**: Schema-derived (valid/invalid/boundary), criteria-derived (expected outcomes), scenario-derived (multi-entity packs)
21
- - **Progressive L1-L3 layers**: Interface Contract -> Business Rule -> Business Scenario (fail-fast on critical)
22
- - **Generator-Critic loop**: Max 3 iterations per layer to distinguish test defects from code defects
23
- - **Requirement traceability**: Every failure traces back to REQ-NNN:AC-N
24
- - **Degraded mode**: Falls back to success_criteria + plan.json when no spec package exists
25
- </purpose>
26
-
27
- <required_reading>
28
- @~/.maestro/workflows/business-test.md
29
- </required_reading>
30
-
31
- <context>
32
- Phase: $ARGUMENTS (required -- phase number)
33
-
34
- **Flags:**
35
- - `--spec SPEC-xxx` -- Explicit spec reference (default: auto-detect from index.json.spec_ref)
36
- - `--layer L1|L2|L3` -- Run only specific layer (default: progressive L1->L2->L3)
37
- - `--gen-code` -- Generate framework-specific test classes (JUnit/RestAssured, supertest/vitest, pytest/httpx)
38
- - `--dry-run` -- Extract scenarios and fixtures only, don't execute
39
- - `--re-run` -- Re-run only previously failed/blocked scenarios
40
- - `-y` -- Skip interactive confirmations
41
-
42
- **Layer definitions:**
43
-
44
- | Layer | Name | Tests | Source |
45
- |-------|------|-------|--------|
46
- | L1 | Interface Contract | Single endpoint request/response, input validation, schema compliance | Architecture API endpoints + REQ AC |
47
- | L2 | Business Rule | Multi-step logic, state transitions, business constraints, edge cases | REQ acceptance criteria + NFR |
48
- | L3 | Business Scenario | Full user flows, multi-service chains, error propagation | Epic user stories |
49
-
50
- **Priority mapping (RFC 2119):**
51
-
52
- | Keyword | Priority | Failure = |
53
- |---------|----------|-----------|
54
- | MUST / SHALL | critical | blocker |
55
- | SHOULD / RECOMMENDED | high | major |
56
- | MAY / OPTIONAL | medium | minor |
57
-
58
- Context files:
59
- - `.workflow/.spec/SPEC-xxx/requirements/REQ-*.md` -- Functional requirements + acceptance criteria
60
- - `.workflow/.spec/SPEC-xxx/requirements/NFR-*.md` -- Non-functional requirements
61
- - `.workflow/.spec/SPEC-xxx/architecture/_index.md` -- API endpoints, data model, state machines
62
- - `.workflow/.spec/SPEC-xxx/epics/EPIC-*.md` -- User stories for E2E scenarios
63
- - Phase artifacts (resolve via `state.json.artifacts[]` → `.workflow/scratch/` paths):
64
- - plan.json -- Task overview (degraded mode)
65
- - verification.json -- Cross-reference for must_haves
66
- - .tests/business/ -- Previous business test artifacts
67
- </context>
68
-
69
- <execution>
70
- Follow '~/.maestro/workflows/business-test.md' completely.
71
-
72
- **Next-step routing on completion:**
73
- - All requirements verified → `/maestro-milestone-audit`
74
- - Failures found → `/quality-debug --from-business-test {phase}`
75
- - Re-run all pass → `/maestro-verify {phase}`
76
- - Low coverage → `/quality-test-gen {phase}`
77
- - Need integration tests → `/quality-integration-test {phase}`
78
- </execution>
79
-
80
- <error_codes>
81
- | Code | Severity | Condition | Recovery |
82
- |------|----------|-----------|----------|
83
- | E001 | error | Phase number required | Prompt user for phase number |
84
- | E002 | error | Phase artifacts not found | Verify phase has artifacts in state.json |
85
- | E003 | error | No spec package AND no success_criteria (can't extract scenarios) | Run maestro-roadmap --mode full or maestro-plan first |
86
- | E004 | error | L1 critical failures block L2/L3 progression | Fix blockers first via quality-debug |
87
- | W001 | warning | Degraded mode (no spec package, using success_criteria) | Consider running maestro-roadmap --mode full for full coverage |
88
- | W002 | warning | Some requirements have no testable acceptance criteria | Note in report, suggest spec refinement |
89
- | W003 | warning | Generator-Critic loop exhausted (3 iterations) without full convergence | Accept current state, proceed with known defects |
90
- | W004 | warning | Mock services not available for L3 scenarios | Skip L3 or run with --gen-code for TestContainers |
91
- </error_codes>
92
-
93
- <success_criteria>
94
- - [ ] Phase resolved and spec package loaded (or degraded mode activated)
95
- - [ ] Business test scenarios extracted from REQ acceptance criteria
96
- - [ ] RFC 2119 keywords mapped to test priorities
97
- - [ ] Test fixtures generated (valid/invalid/boundary per REQ data model)
98
- - [ ] business-test-plan.json written with layer distribution
99
- - [ ] User confirmed plan (or -y skipped confirmation)
100
- - [ ] Test code generated if --gen-code (framework-appropriate)
101
- - [ ] L1 executed with Generator-Critic loop (max 3 iterations)
102
- - [ ] L2 executed if no L1 critical failures
103
- - [ ] L3 executed if no L2 critical failures
104
- - [ ] Traceability matrix built (every result -> REQ-NNN:AC-N)
105
- - [ ] business-test-report.json written with requirement_coverage
106
- - [ ] business-test-summary.md written (human-readable)
107
- - [ ] index.json updated with business_test section
108
- - [ ] Issues auto-created for failures (ISS-* in issues.jsonl with req_ref)
109
- - [ ] Next step routed based on results
110
- </success_criteria>
@@ -1,67 +0,0 @@
1
- ---
2
- name: quality-integration-test
3
- description: Self-iterating integration test cycle with reflection-driven strategy and L0-L3 progressive layers
4
- argument-hint: "<phase> [--max-iter <N>] [--layer <L0|L1|L2|L3>]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Agent
13
- - AskUserQuestion
14
- ---
15
- <purpose>
16
- Run a self-iterating integration test cycle that combines exploration, test design, test execution, reflection, and adaptive strategy adjustment. Unlike quality-test (UAT with user) or quality-test-gen (generate missing tests), this command runs automated integration tests in a closed loop that self-corrects until convergence. Full 6-phase cycle, adaptive strategy engine, and L0-L3 progressive layers defined in workflow integration-test.md.
17
- </purpose>
18
-
19
- <required_reading>
20
- @~/.maestro/workflows/integration-test.md
21
- </required_reading>
22
-
23
- <context>
24
- Phase: $ARGUMENTS (required -- phase number)
25
-
26
- **Flags:**
27
- - `--max-iter <N>` -- Maximum iterations (default: 5)
28
- - `--layer <L0|L1|L2|L3>` -- Start from specific layer (default: auto-detect)
29
-
30
- L0-L3 layer definitions, state file formats, and strategy engine rules defined in workflow integration-test.md.
31
- </context>
32
-
33
- <execution>
34
- Follow '~/.maestro/workflows/integration-test.md' completely.
35
-
36
- **Next-step routing on completion:**
37
- - Converged (pass rate met) → `/maestro-milestone-audit`
38
- - Max iterations, pass rate close → `/quality-debug {phase}` (investigate remaining failures)
39
- - Regressions detected → `/quality-debug {phase}`
40
- - Stuck 3+ iterations → `/maestro-analyze {phase} -q` (reassess approach)
41
- </execution>
42
-
43
- <error_codes>
44
- | Code | Severity | Condition | Recovery |
45
- |------|----------|-----------|----------|
46
- | E001 | error | Phase number required | Check arguments format, re-run with correct input |
47
- | E002 | error | Phase directory not found | Check arguments format, re-run with correct input |
48
- | E003 | error | No test framework detected | Install test framework or verify project setup |
49
- | W001 | warning | Max iterations reached without convergence | Review reflection log, consider manual intervention |
50
- | W002 | warning | Regression detected, switching to Surgical strategy | Review reflection log, consider manual intervention |
51
- | W003 | warning | Stuck 3+ iterations, switching to Reflective strategy | Review reflection log, consider manual intervention |
52
- </error_codes>
53
-
54
- <success_criteria>
55
- - [ ] Integration test session initialized with state.json
56
- - [ ] Codebase explored for integration points
57
- - [ ] Test plan designed with L0-L3 layers
58
- - [ ] Tests written following existing patterns
59
- - [ ] Tests executed with results recorded per iteration
60
- - [ ] Reflection logged with pattern analysis
61
- - [ ] Strategy adapted based on results (conservative/aggressive/surgical/reflective)
62
- - [ ] Iterations continue until convergence or max_iter
63
- - [ ] summary.json written with final results
64
- - [ ] reflection-log.md contains full iteration history
65
- - [ ] index.json updated with integration test status
66
- - [ ] Next step routed (phase-transition if converged, debug if failures, analyze -q if stuck)
67
- </success_criteria>
@@ -1,68 +0,0 @@
1
- ---
2
- name: quality-test-gen
3
- description: Generate missing tests with TDD/E2E classification and RED-GREEN methodology
4
- argument-hint: "<phase> [--layer <unit|e2e|all>]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Agent
13
- - AskUserQuestion
14
- ---
15
- <purpose>
16
- Generate missing automated tests for a phase based on gap analysis from maestro-verify (Nyquist audit) and quality-test (UAT coverage gaps). Bridges verification (finds MISSING coverage) and testing (runs UAT) by producing the automated tests that make Nyquist coverage pass. TDD/E2E classification, test discovery, plan approval, and RED-GREEN methodology defined in workflow test-gen.md.
17
- </purpose>
18
-
19
- <required_reading>
20
- @~/.maestro/workflows/test-gen.md
21
- </required_reading>
22
-
23
- <context>
24
- Phase: $ARGUMENTS (required -- phase number)
25
-
26
- **Flags:**
27
- - `--layer <unit|e2e|all>` -- Generate only specific test layer (default: all)
28
-
29
- Context files:
30
- - Phase artifacts (resolve via `state.json.artifacts[]` → scratch paths):
31
- - verification.json -- Nyquist gaps (MISSING/PARTIAL)
32
- - validation.json -- requirement-to-test mapping
33
- - .tests/coverage-report.json -- UAT coverage gaps
34
- - .summaries/TASK-*.md -- what was built
35
- </context>
36
-
37
- <execution>
38
- Follow '~/.maestro/workflows/test-gen.md' completely.
39
-
40
- **Next-step routing on completion:**
41
- - All tests pass → `/quality-test {phase}`
42
- - Bugs discovered (failing tests) → `/quality-debug {phase}`
43
- - Regressions in existing tests → `/quality-debug {phase}`
44
- - Coverage still low → `/quality-test-gen {phase} --layer {missing_layer}`
45
- </execution>
46
-
47
- <error_codes>
48
- | Code | Severity | Condition | Recovery |
49
- |------|----------|-----------|----------|
50
- | E001 | error | Phase number required | Check arguments format, re-run with correct input |
51
- | E002 | error | No verification results found (run maestro-verify first) | Check arguments format, re-run with correct input |
52
- | E003 | error | No test framework detected | Install test framework or configure test runner |
53
- | W001 | warning | Some generated tests fail (bugs discovered) | Investigate test failures, fix source code |
54
- | W002 | warning | Regression in existing tests | Investigate test failures, fix source code |
55
- </error_codes>
56
-
57
- <success_criteria>
58
- - [ ] Test infrastructure discovered (framework, patterns, conventions)
59
- - [ ] Gaps identified from verification.json and coverage-report.json
60
- - [ ] Changed files classified into unit/integration/e2e/skip
61
- - [ ] Test plan generated and approved by user
62
- - [ ] Tests written following existing patterns (RED-GREEN methodology)
63
- - [ ] Tests run and results categorized (passing/failing/regression)
64
- - [ ] test-gen-report.json written with full results
65
- - [ ] validation.json updated with new coverage status
66
- - [ ] Bugs discovered documented (not fixed)
67
- - [ ] Next step routed (quality-test if pass, quality-debug if bugs discovered)
68
- </success_criteria>
@@ -1,219 +0,0 @@
1
- ---
2
- name: maestro-ralph-execute
3
- description: Single-step skill executor — spawned by maestro-ralph via CSV, reads ralph session context, executes one skill command, reports result
4
- argument-hint: "[-y] <skill_call>"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep
6
- ---
7
-
8
- <purpose>
9
- Worker agent spawned by maestro-ralph via `spawn_agents_on_csv`.
10
- Each invocation executes exactly ONE skill command and reports the result.
11
-
12
- Receives `skill_call` (e.g. `$maestro-plan 1`) from the wave CSV.
13
- Before execution, reads the ralph session status.json to obtain execution context
14
- (phase, milestone, intent, artifact paths) — uses this to enrich skill args when needed.
15
-
16
- Writes back **nothing** to status.json — ralph coordinator reads the result CSV and updates status.json itself.
17
- Decision nodes never arrive here — ralph processes them directly.
18
- </purpose>
19
-
20
- <context>
21
- **From CSV row:**
22
- - `skill_call` — full skill invocation string (e.g. `$maestro-plan 1`, `$quality-review 1`)
23
- - `topic` — brief description of what this step does
24
-
25
- **The skill_call format:** `$<skill-name> <args>`
26
-
27
- **Ralph session status.json** — located at `.workflow/.maestro/ralph-*/status.json` (latest running session).
28
- Read-only for this agent. Provides:
29
-
30
- ```json
31
- {
32
- "session_id": "ralph-{YYYYMMDD-HHmmss}",
33
- "source": "ralph",
34
- "intent": "用户原始输入",
35
- "status": "running",
36
- "phase": 1,
37
- "milestone": "MVP",
38
- "auto_mode": false,
39
- "lifecycle_position": "plan",
40
- "context": {
41
- "plan_dir": ".workflow/scratch/...",
42
- "analysis_dir": ".workflow/scratch/...",
43
- "brainstorm_dir": null
44
- },
45
- "steps": [...],
46
- "current_step": 3
47
- }
48
- ```
49
-
50
- **Project state** — `.workflow/state.json` provides artifact registry:
51
- ```json
52
- {
53
- "current_milestone": "MVP",
54
- "artifacts": [
55
- { "id": "ANL-001", "type": "analyze", "phase": 1,
56
- "path": "phases/01-auth-multi-tenant", "status": "completed" }
57
- ]
58
- }
59
- ```
60
- </context>
61
-
62
- <execution>
63
-
64
- ## Step 1: Parse skill_call
65
-
66
- ```
67
- Parse $ARGUMENTS:
68
- Contains "-y" or "--yes" → auto = true, remove flag from remaining args
69
- Remaining → skill_call
70
-
71
- Extract from skill_call:
72
- skill_name = text between $ and first space (e.g. "maestro-plan")
73
- skill_args = remainder after first space (e.g. "1")
74
-
75
- If skill_call is empty or malformed:
76
- → report_agent_job_result({ status: "failed", error: "Invalid skill_call" })
77
- → End.
78
- ```
79
-
80
- Also read `session.auto_mode` from ralph status.json — if `true`, treat as `-y` even if flag not passed.
81
-
82
- ## Step 2: Load ralph session context
83
-
84
- ```
85
- Glob .workflow/.maestro/ralph-*/status.json
86
- Filter: status == "running"
87
- Sort by created_at DESC, take first
88
- → ralph_session
89
-
90
- If not found: proceed with skill_args as-is (standalone execution)
91
- ```
92
-
93
- Extract from ralph_session:
94
- - `phase` — current phase number
95
- - `milestone` — current milestone name
96
- - `intent` — user's original input text
97
- - `context.plan_dir` — latest plan artifact directory
98
- - `context.analysis_dir` — latest analysis artifact directory
99
- - `context.brainstorm_dir` — brainstorm output directory
100
-
101
- Also read `.workflow/state.json` for artifact registry when needed.
102
-
103
- ## Step 3: Enrich skill args
104
-
105
- If skill_args contain unresolved context or are insufficient, enrich based on skill type:
106
-
107
- ```
108
- Per-skill enrichment (when args need context from session):
109
-
110
- maestro-brainstorm:
111
- If args empty → args = '"{intent}"'
112
-
113
- maestro-roadmap:
114
- If args empty → args = '"{intent}"'
115
-
116
- maestro-analyze:
117
- If args is just a number → keep as phase number
118
- If args empty → args = '{phase}' or '"{intent}"'
119
-
120
- maestro-plan:
121
- If args is number → keep as phase
122
- If needs artifact dir → resolve latest analyze artifact:
123
- state.json.artifacts[] → filter(type=="analyze", phase==session.phase) → latest → --dir .workflow/scratch/{path}
124
-
125
- maestro-execute:
126
- If args is number → keep as phase
127
- If needs artifact dir → resolve latest plan artifact:
128
- state.json.artifacts[] → filter(type=="plan", phase==session.phase) → latest → --dir .workflow/scratch/{path}
129
-
130
- quality-debug:
131
- Read previous step's result artifacts for gap/failure context
132
- If from verify: append gap summary from verification.json
133
- If from test: append --from-uat {phase}
134
- If from business-test: append --from-business-test {phase}
135
-
136
- quality-* (review, test, test-gen, business-test):
137
- If args empty → args = '{phase}'
138
-
139
- maestro-verify, maestro-milestone-audit, maestro-milestone-complete:
140
- If args empty → args = '{phase}' (or empty for milestone-*)
141
- ```
142
-
143
- ## Step 4: Execute skill
144
-
145
- **`-y` auto flag 传播:** 当 `auto == true` 时,按传播表附加 flag:
146
- ```
147
- auto_flag_map = {
148
- "maestro-init": "-y",
149
- "maestro-analyze": "-y",
150
- "maestro-brainstorm": "-y",
151
- "maestro-roadmap": "-y",
152
- "maestro-plan": "-y",
153
- "maestro-execute": "-y",
154
- "quality-business-test": "-y",
155
- "quality-test": "-y --auto-fix",
156
- "quality-retrospective": "-y",
157
- "maestro-milestone-complete": "-y"
158
- }
159
- flag = auto_flag_map[skill_name] || ""
160
- skill_args = flag ? `${skill_args} ${flag}` : skill_args
161
- ```
162
-
163
- ```
164
- Read .codex/skills/{skill_name}/SKILL.md to understand the skill
165
- Execute the skill with enriched skill_args as $ARGUMENTS
166
-
167
- Track:
168
- - Artifact paths produced (scratch dirs, plan.json, verification.json, etc.)
169
- - Session IDs created (WFS-*, ANL-*, PLN-*, etc.)
170
- - Success/failure status
171
- ```
172
-
173
- ## Step 5: Report result
174
-
175
- ```
176
- report_agent_job_result({
177
- status: "completed" | "failed",
178
- skill_call: "{original_skill_call}",
179
- summary: "one-line result description",
180
- artifacts: "comma-separated artifact paths or empty string",
181
- error: "failure reason or empty string"
182
- })
183
- ```
184
-
185
- **Artifact paths to report** (for ralph's barrier analysis):
186
- | Skill | Report |
187
- |-------|--------|
188
- | maestro-analyze | scratch dir path containing context.md |
189
- | maestro-plan | scratch dir path containing plan.json |
190
- | maestro-execute | scratch dir path containing .summaries/ |
191
- | maestro-brainstorm | .brainstorming/ output dir |
192
- | maestro-roadmap | roadmap.md path |
193
- | maestro-verify | verification.json path |
194
- | quality-review | review.json path |
195
- | quality-test | uat.md path |
196
- | quality-business-test | business test output path |
197
- | Others | empty or relevant output path |
198
-
199
- </execution>
200
-
201
- <error_codes>
202
- | Code | Severity | Description | Recovery |
203
- |------|----------|-------------|----------|
204
- | E001 | error | skill_call parsing failed | Report failed |
205
- | E002 | error | Skill SKILL.md not found | Report failed |
206
- | E003 | error | Skill execution error | Report failed with error details |
207
- | E004 | error | Ralph session not found (standalone mode) | Execute with args as-is |
208
- | W001 | warning | Artifact dir not found for enrichment | Use args as-is, warn in summary |
209
- </error_codes>
210
-
211
- <success_criteria>
212
- - [ ] skill_call correctly parsed into skill_name + skill_args
213
- - [ ] Ralph session status.json read for context (phase, intent, artifact paths)
214
- - [ ] Args enriched per-skill when context needed (brainstorm→intent, plan→dir, debug→gaps)
215
- - [ ] Skill executed via its own SKILL.md
216
- - [ ] Artifact paths accurately reported for ralph's barrier analysis
217
- - [ ] status.json NEVER written by this agent
218
- - [ ] Result reported via report_agent_job_result
219
- </success_criteria>
@@ -1,218 +0,0 @@
1
- ---
2
- name: quality-business-test
3
- description: PRD-forward business testing with requirement traceability, multi-layer execution (L1 Interface -> L2 Business Rule -> L3 Scenario), fixture generation, and feedback loop.
4
- argument-hint: "<phase> [--spec SPEC-xxx] [--layer L1|L2|L3] [--gen-code] [--dry-run] [--re-run] [-y]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
6
- ---
7
-
8
- <purpose>
9
- Validate built features against PRD acceptance criteria through automated multi-layer business testing. Unlike quality-test (interactive UAT from code gaps) and quality-test-gen (generate tests from coverage gaps), this starts from REQ-*.md acceptance criteria and works forward.
10
-
11
- **Three-track testing** (complementary, not replacements):
12
-
13
- | Command | Input Source | Verification Angle |
14
- |---------|-------------|-------------------|
15
- | `quality-business-test` | REQ-*.md acceptance criteria | **PRD-forward** -- are business rules satisfied? |
16
- | `quality-test` | verification.json must_haves | **Code-backward** -- does the code work? |
17
- | `quality-test-gen` | validation.json gaps | **Coverage-backward** -- is coverage sufficient? |
18
-
19
- **Layer definitions:**
20
-
21
- | Layer | Name | Tests | Source |
22
- |-------|------|-------|--------|
23
- | L1 | Interface Contract | Single endpoint request/response, input validation, schema compliance | Architecture API endpoints + REQ AC |
24
- | L2 | Business Rule | Multi-step logic, state transitions, business constraints, edge cases | REQ acceptance criteria + NFR |
25
- | L3 | Business Scenario | Full user flows, multi-service chains, error propagation | Epic user stories |
26
- </purpose>
27
-
28
- <context>
29
- $ARGUMENTS -- phase number plus optional flags.
30
-
31
- **Usage**:
32
-
33
- ```bash
34
- $quality-business-test "3" # test phase 3 against PRD
35
- $quality-business-test "3 --layer L1" # L1 interface tests only
36
- $quality-business-test "3 --gen-code" # generate framework-specific test classes
37
- $quality-business-test "3 --dry-run" # extract scenarios only, don't execute
38
- $quality-business-test "3 --re-run" # re-run only previously failed scenarios
39
- $quality-business-test "3 --spec SPEC-auth-2026-04" # explicit spec reference
40
- $quality-business-test "3 -y" # skip plan confirmation
41
- ```
42
-
43
- **Flags**:
44
- - `<phase>`: Phase number (required)
45
- - `--spec SPEC-xxx`: Explicit spec package reference (default: auto-detect from index.json)
46
- - `--layer L1|L2|L3`: Run only specific layer
47
- - `--gen-code`: Generate framework-specific test classes (JUnit/RestAssured, supertest/vitest, pytest/httpx)
48
- - `--dry-run`: Extract scenarios and fixtures only, don't execute
49
- - `--re-run`: Re-run only previously failed/blocked scenarios
50
- - `-y`: Skip interactive confirmations
51
-
52
- `-y` skips interactive confirmation of test plan. `--dry-run` extracts scenarios only without execution.
53
-
54
- **Output**: `{artifact_dir}/.tests/business/business-test-plan.json` + `business-test-report.json` + `business-test-summary.md`
55
- </context>
56
-
57
- <invariants>
58
- 1. **PRD is source of truth** -- business rules drive test scenarios, not code structure
59
- 2. **RFC 2119 keyword priority** -- MUST = critical, SHOULD = high, MAY = medium
60
- 3. **Fail-fast across layers** -- critical L1 failures block L2/L3
61
- 4. **Generator-Critic loop max 3 iterations** per layer
62
- 5. **Traceability on every result** -- every pass/fail maps to REQ-NNN:AC-N
63
- 6. **Agent calls use `run_in_background: false`** for synchronous execution
64
- 7. **Auto-create issues** in `.workflow/issues/issues.jsonl` for every failure
65
- 8. **Degraded mode** works without spec package (from success_criteria + plan.json)
66
- 9. **Never modify source code** -- this command tests, it doesn't fix
67
- </invariants>
68
-
69
- <execution>
70
-
71
- ### Step 1: Resolve Target & Load Spec Package
72
-
73
- 1. Parse `$ARGUMENTS` for phase number and flags
74
- 2. Resolve `PHASE_DIR` via artifact registry in `state.json` to `.workflow/scratch/{YYYYMMDD}-{type}-{slug}/`
75
- 3. **Related session discovery**: Query `state.json.artifacts[]` for all artifacts matching `phase === target_phase && milestone === current_milestone`. Each artifact's type determines its outputs: review → review.json (findings inform which business rules need extra scrutiny), debug → understanding.md (root causes map to specific requirement failures), test → uat.md (prior UAT gaps identify untested business scenarios). Extract conclusions that may affect business test scenario priorities.
76
- 4. Load `index.json` -> find `spec_ref` -> locate `.workflow/.spec/SPEC-xxx/`
77
- 4. **Full mode**: Read `requirements/_index.md` + all `REQ-*.md` + `NFR-*.md` + `architecture/_index.md` + `epics/EPIC-*.md`
78
- 5. **Degraded mode** (no spec package): Read `index.json.success_criteria` + `plan.json` convergence criteria + `.summaries/TASK-*.md`
79
- 6. If `--re-run`: load previous `business-test-report.json`, filter to failed/blocked scenarios
80
-
81
- ### Step 2: Extract Business Test Scenarios from PRD
82
-
83
- For each `REQ-NNN-{slug}.md`:
84
-
85
- 1. Parse `## Acceptance Criteria` section
86
- 2. Map RFC 2119 keywords to priority:
87
-
88
- | Keyword | Priority | Failure = |
89
- |---------|----------|-----------|
90
- | MUST / SHALL | critical | blocker |
91
- | SHOULD / RECOMMENDED | high | major |
92
- | MAY / OPTIONAL | medium | minor |
93
-
94
- 3. Classify scenario into layer:
95
-
96
- | Source | Layer | Category |
97
- |--------|-------|----------|
98
- | Architecture API endpoints + REQ AC about request/response | L1 | api_contract |
99
- | REQ AC about business logic, validation, state changes | L2 | business_rule |
100
- | Architecture state machine transitions | L2 | state_transition |
101
- | Epic user stories (multi-step flows) | L3 | user_flow |
102
- | NFR performance/security constraints | L2 | non_functional |
103
-
104
- 4. Generate scenario JSON with `id`, `req_ref` (REQ-NNN:AC-N), `layer`, `priority`, `name`, `category`, `endpoint`, `input`, `expected`, `preconditions`, `postconditions`, `mock_services`
105
-
106
- **Degraded mode**: Extract from success_criteria (each -> L2 scenario), plan.json convergence criteria (each -> L1/L2), all default priority: high. No L3 in degraded mode.
107
-
108
- ### Step 3: Generate Test Data (Fixtures)
109
-
110
- Three tiers:
111
-
112
- **Tier 1 -- Schema-derived**: From REQ data models, generate valid/invalid/boundary variants per entity:
113
- - valid: satisfies all constraints
114
- - invalid: violate each constraint individually (null, empty, overflow, wrong type)
115
- - boundary: edge values (min, max, min-1, max+1)
116
-
117
- **Tier 2 -- Criteria-derived**: From "MUST return X when Y" -> `{ input: Y, expected: X }`. From "MUST validate Z" -> `{ input: invalid_Z, expected: error }`.
118
-
119
- **Tier 3 -- Scenario-derived (L3 only)**: From Epic user stories -> scenario packs with coordinated entity IDs across steps.
120
-
121
- **Microservice mocks**: From architecture API contract -> request/response pairs for WireMock stubs.
122
-
123
- ### Step 4: Write Test Plan & Confirm
124
-
125
- 1. Archive previous `business-test-plan.json` to `.history/` if exists
126
- 2. Write `.tests/business/business-test-plan.json` with scenarios, fixtures, mock_contracts, requirement_coverage_plan
127
- 3. Display plan summary (scenario counts per layer, fixture counts, requirement coverage)
128
- 4. If not `-y`: wait for user confirmation (yes/edit/cancel)
129
- 5. If `--dry-run`: stop here, report plan
130
-
131
- ### Step 5: Generate Test Code (if --gen-code)
132
-
133
- Detect project tech stack from `.workflow/project.md` Tech Stack section or codebase scan.
134
-
135
- | Stack | L1 | L2 | L3 |
136
- |-------|----|----|-----|
137
- | Java/Spring Boot | RestAssured + MockMvc | JUnit 5 Parameterized + WireMock | TestContainers |
138
- | TypeScript/Node | supertest + vitest | vitest + nock | playwright/cypress |
139
- | Python | httpx + pytest | pytest + responses | pytest + selenium |
140
-
141
- Each test method includes REQ-NNN:AC-N reference in display name. Test files placed in `.tests/business/{layer}/`.
142
-
143
- If no `--gen-code`: scenarios stay as structured JSON for AI agent execution.
144
-
145
- ### Step 6: Execute Tests (Progressive L1 -> L2 -> L3)
146
-
147
- **Fail-fast**: L1 critical failures -> STOP (don't run L2). L2 critical failures -> STOP (don't run L3).
148
-
149
- **Generator-Critic loop per layer (max 3 iterations):**
150
-
151
- | Iteration | Action |
152
- |-----------|--------|
153
- | 1 | Run all scenarios. Critic: classify failures as test_defect / code_defect / env_issue |
154
- | 2 | Auto-fix test_defects, re-run ALL scenarios |
155
- | 3 | Final confirmation. Remaining failures = confirmed code_defects |
156
-
157
- **Execution modes:**
158
- - `--gen-code`: run via test framework (`mvn test`, `npx vitest`, etc.)
159
- - default: AI agent executes scenarios against running application
160
-
161
- Record results in `.tests/business/test-results-iter-{N}.json`.
162
-
163
- ### Step 7: Build Traceability Matrix
164
-
165
- Map each result to `REQ-NNN:AC-N`. Per AC: `passed` (all scenarios pass), `failed` (any fail), `blocked` (any blocked, none failed), `untested` (no scenarios). Per REQ verdict: `verified` (all MUST+SHOULD AC passed), `partial` (some failed), `unverified` (all failed/untested).
166
-
167
- ### Step 8: Generate Reports
168
-
169
- 1. Archive previous report/summary to `.history/`
170
- 2. Write `.tests/business/business-test-report.json` with:
171
- - `layers`: per-layer stats (total, passed, failed, blocked, pass_rate)
172
- - `requirement_coverage`: per-REQ criteria results with failure details
173
- - `failures`: each with req_ref, severity, expected/actual, fix_suggestion
174
- - `summary`: total_requirements, fully_verified, partially_verified, unverified, coverage_pct
175
- 3. Write `.tests/business/business-test-summary.md` (human-readable tables)
176
- 4. Update `index.json` with `business_test` section
177
-
178
- ### Step 9: Feedback Loop
179
-
180
- 1. Auto-create issues from failures in `.workflow/issues/issues.jsonl` (each with `req_ref`, `source: "business-test"`)
181
- 2. Report results
182
- 3. **Register artifact**: Append to `state.json.artifacts[]` with `type: "test"`, `id: TST-NNN`, `path: "scratch/{YYYYMMDD}-business-test-P{N}-{slug}"`, `depends_on: exec_art.id`.
183
- 4. Route next step:
184
-
185
- | Result | Suggestion |
186
- |--------|------------|
187
- | All requirements verified | Skill({ skill: "maestro-milestone-audit" }) |
188
- | Failures found | Skill({ skill: "quality-debug", args: "--from-business-test {phase}" }) |
189
- | `--re-run` all pass | Skill({ skill: "maestro-verify", args: "{phase}" }) |
190
- | Low coverage (< 60%) | Skill({ skill: "quality-test-gen", args: "{phase}" }) |
191
-
192
- **Closure criteria**: Requirement marked "verified" ONLY when ALL MUST+SHOULD acceptance criteria pass.
193
- </execution>
194
-
195
- <error_codes>
196
- | Code | Severity | Condition | Recovery |
197
- |------|----------|-----------|----------|
198
- | E001 | error | Phase number required | Prompt user for phase number |
199
- | E002 | error | Phase directory not found | Resolve via state.json artifact registry |
200
- | E003 | error | No spec package AND no success_criteria | Run maestro-roadmap --mode full or maestro-plan first |
201
- | E004 | error | L1 critical failures block L2/L3 | Fix blockers via quality-debug |
202
- | W001 | warning | Degraded mode (no spec package) | Consider running maestro-roadmap --mode full |
203
- | W002 | warning | Some REQs have no testable AC | Note in report |
204
- | W003 | warning | Generator-Critic loop exhausted | Accept current state |
205
- | W004 | warning | Mock services unavailable for L3 | Skip L3 or use --gen-code |
206
- </error_codes>
207
-
208
- <success_criteria>
209
- - [ ] Phase resolved and spec package loaded (or degraded mode activated)
210
- - [ ] Business test scenarios extracted from PRD acceptance criteria
211
- - [ ] Fixtures generated for all layers
212
- - [ ] Test plan written and confirmed (or -y/--dry-run)
213
- - [ ] Tests executed progressively L1 -> L2 -> L3 with fail-fast
214
- - [ ] Traceability matrix maps every result to REQ-NNN:AC-N
215
- - [ ] Reports generated (JSON + summary markdown)
216
- - [ ] Issues auto-created for all failures
217
- - [ ] Next step suggested based on results
218
- </success_criteria>