agentic-qe 3.7.16 → 3.7.17

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 (280) hide show
  1. package/.claude/agents/v3/qe-devils-advocate.md +20 -0
  2. package/.claude/agents/v3/qe-gap-detector.md +25 -0
  3. package/.claude/agents/v3/qe-quality-gate.md +8 -0
  4. package/.claude/agents/v3/qe-requirements-validator.md +25 -0
  5. package/.claude/agents/v3/subagents/qe-code-reviewer.md +11 -0
  6. package/.claude/agents/v3/subagents/qe-integration-reviewer.md +11 -0
  7. package/.claude/agents/v3/subagents/qe-performance-reviewer.md +11 -0
  8. package/.claude/agents/v3/subagents/qe-security-reviewer.md +11 -0
  9. package/.claude/helpers/adr-compliance.sh +10 -10
  10. package/.claude/helpers/auto-memory-hook.mjs +24 -9
  11. package/.claude/helpers/brain-checkpoint.cjs +55 -145
  12. package/.claude/helpers/ddd-tracker.sh +2 -2
  13. package/.claude/helpers/guidance-hooks.sh +2 -2
  14. package/.claude/helpers/hook-handler.cjs +57 -18
  15. package/.claude/helpers/statusline.cjs +414 -595
  16. package/.claude/helpers/v3/quality-criteria/evidence-classification.md +116 -116
  17. package/.claude/helpers/v3/quality-criteria/htsm-categories.md +139 -139
  18. package/.claude/skills/README.md +8 -11
  19. package/.claude/skills/brutal-honesty-review/SKILL.md +3 -0
  20. package/.claude/skills/code-review-quality/SKILL.md +3 -0
  21. package/.claude/skills/qcsd-cicd-swarm/SKILL.md +79 -2075
  22. package/.claude/skills/qcsd-cicd-swarm/steps/01-flag-detection.md +62 -0
  23. package/.claude/skills/qcsd-cicd-swarm/steps/02-core-agents.md +33 -0
  24. package/.claude/skills/qcsd-cicd-swarm/steps/03-batch1-results.md +21 -0
  25. package/.claude/skills/qcsd-cicd-swarm/steps/04-conditional-agents.md +23 -0
  26. package/.claude/skills/qcsd-cicd-swarm/steps/05-decision-synthesis.md +30 -0
  27. package/.claude/skills/qcsd-cicd-swarm/steps/06-report-generation.md +17 -0
  28. package/.claude/skills/qcsd-cicd-swarm/steps/07-learning-persistence.md +27 -0
  29. package/.claude/skills/qcsd-cicd-swarm/steps/08-deployment-advisor.md +25 -0
  30. package/.claude/skills/qcsd-cicd-swarm/steps/09-final-output.md +16 -0
  31. package/.claude/skills/qcsd-development-swarm/SKILL.md +79 -2027
  32. package/.claude/skills/qcsd-development-swarm/steps/01-flag-detection.md +50 -0
  33. package/.claude/skills/qcsd-development-swarm/steps/02-core-agents.md +29 -0
  34. package/.claude/skills/qcsd-development-swarm/steps/03-batch1-results.md +14 -0
  35. package/.claude/skills/qcsd-development-swarm/steps/04-conditional-agents.md +23 -0
  36. package/.claude/skills/qcsd-development-swarm/steps/05-decision-synthesis.md +30 -0
  37. package/.claude/skills/qcsd-development-swarm/steps/06-report-generation.md +16 -0
  38. package/.claude/skills/qcsd-development-swarm/steps/07-learning-persistence.md +25 -0
  39. package/.claude/skills/qcsd-development-swarm/steps/08-defect-predictor.md +25 -0
  40. package/.claude/skills/qcsd-development-swarm/steps/09-final-output.md +16 -0
  41. package/.claude/skills/qcsd-ideation-swarm/SKILL.md +94 -1894
  42. package/.claude/skills/qcsd-ideation-swarm/steps/01-flag-detection.md +57 -0
  43. package/.claude/skills/qcsd-ideation-swarm/steps/02-core-agents.md +29 -0
  44. package/.claude/skills/qcsd-ideation-swarm/steps/03-batch1-results.md +15 -0
  45. package/.claude/skills/qcsd-ideation-swarm/steps/04-conditional-agents.md +23 -0
  46. package/.claude/skills/qcsd-ideation-swarm/steps/05-decision-synthesis.md +29 -0
  47. package/.claude/skills/qcsd-ideation-swarm/steps/06-report-generation.md +18 -0
  48. package/.claude/skills/qcsd-ideation-swarm/steps/07-learning-persistence.md +29 -0
  49. package/.claude/skills/qcsd-ideation-swarm/steps/08-final-output.md +18 -0
  50. package/.claude/skills/qcsd-production-swarm/SKILL.md +88 -2663
  51. package/.claude/skills/qcsd-production-swarm/steps/01-flag-detection.md +206 -0
  52. package/.claude/skills/qcsd-production-swarm/steps/02-core-agents.md +428 -0
  53. package/.claude/skills/qcsd-production-swarm/steps/03-batch1-results.md +101 -0
  54. package/.claude/skills/qcsd-production-swarm/steps/04-conditional-agents.md +125 -0
  55. package/.claude/skills/qcsd-production-swarm/steps/05-decision-synthesis.md +136 -0
  56. package/.claude/skills/qcsd-production-swarm/steps/06-report-generation.md +181 -0
  57. package/.claude/skills/qcsd-production-swarm/steps/07-learning-persistence.md +185 -0
  58. package/.claude/skills/qcsd-production-swarm/steps/08-feedback-loop.md +122 -0
  59. package/.claude/skills/qcsd-production-swarm/steps/09-final-output.md +140 -0
  60. package/.claude/skills/qcsd-refinement-swarm/SKILL.md +59 -2312
  61. package/.claude/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +91 -0
  62. package/.claude/skills/qcsd-refinement-swarm/steps/02-core-agents.md +40 -0
  63. package/.claude/skills/qcsd-refinement-swarm/steps/03-batch1-results.md +40 -0
  64. package/.claude/skills/qcsd-refinement-swarm/steps/04-conditional-agents.md +35 -0
  65. package/.claude/skills/qcsd-refinement-swarm/steps/05-decision-synthesis.md +43 -0
  66. package/.claude/skills/qcsd-refinement-swarm/steps/06-report-generation.md +42 -0
  67. package/.claude/skills/qcsd-refinement-swarm/steps/07-learning-persistence.md +53 -0
  68. package/.claude/skills/qcsd-refinement-swarm/steps/08-transformation.md +36 -0
  69. package/.claude/skills/qcsd-refinement-swarm/steps/09-final-output.md +46 -0
  70. package/.claude/skills/sherlock-review/SKILL.md +3 -0
  71. package/.claude/skills/skill-builder/SKILL.md +103 -0
  72. package/.claude/skills/skills-manifest.json +1 -1
  73. package/CHANGELOG.md +22 -0
  74. package/assets/agents/v3/qe-devils-advocate.md +20 -0
  75. package/assets/agents/v3/qe-gap-detector.md +25 -0
  76. package/assets/agents/v3/qe-quality-gate.md +8 -0
  77. package/assets/agents/v3/qe-requirements-validator.md +25 -0
  78. package/assets/agents/v3/subagents/qe-code-reviewer.md +11 -0
  79. package/assets/agents/v3/subagents/qe-integration-reviewer.md +11 -0
  80. package/assets/agents/v3/subagents/qe-performance-reviewer.md +11 -0
  81. package/assets/agents/v3/subagents/qe-security-reviewer.md +11 -0
  82. package/assets/helpers/statusline-v3.cjs +693 -0
  83. package/assets/skills/brutal-honesty-review/SKILL.md +3 -0
  84. package/assets/skills/code-review-quality/SKILL.md +3 -0
  85. package/assets/skills/qcsd-cicd-swarm/SKILL.md +79 -2075
  86. package/assets/skills/qcsd-cicd-swarm/steps/01-flag-detection.md +62 -0
  87. package/assets/skills/qcsd-cicd-swarm/steps/02-core-agents.md +33 -0
  88. package/assets/skills/qcsd-cicd-swarm/steps/03-batch1-results.md +21 -0
  89. package/assets/skills/qcsd-cicd-swarm/steps/04-conditional-agents.md +23 -0
  90. package/assets/skills/qcsd-cicd-swarm/steps/05-decision-synthesis.md +30 -0
  91. package/assets/skills/qcsd-cicd-swarm/steps/06-report-generation.md +17 -0
  92. package/assets/skills/qcsd-cicd-swarm/steps/07-learning-persistence.md +27 -0
  93. package/assets/skills/qcsd-cicd-swarm/steps/08-deployment-advisor.md +25 -0
  94. package/assets/skills/qcsd-cicd-swarm/steps/09-final-output.md +16 -0
  95. package/assets/skills/qcsd-development-swarm/SKILL.md +79 -2027
  96. package/assets/skills/qcsd-development-swarm/steps/01-flag-detection.md +50 -0
  97. package/assets/skills/qcsd-development-swarm/steps/02-core-agents.md +29 -0
  98. package/assets/skills/qcsd-development-swarm/steps/03-batch1-results.md +14 -0
  99. package/assets/skills/qcsd-development-swarm/steps/04-conditional-agents.md +23 -0
  100. package/assets/skills/qcsd-development-swarm/steps/05-decision-synthesis.md +30 -0
  101. package/assets/skills/qcsd-development-swarm/steps/06-report-generation.md +16 -0
  102. package/assets/skills/qcsd-development-swarm/steps/07-learning-persistence.md +25 -0
  103. package/assets/skills/qcsd-development-swarm/steps/08-defect-predictor.md +25 -0
  104. package/assets/skills/qcsd-development-swarm/steps/09-final-output.md +16 -0
  105. package/assets/skills/qcsd-ideation-swarm/SKILL.md +94 -1894
  106. package/assets/skills/qcsd-ideation-swarm/steps/01-flag-detection.md +57 -0
  107. package/assets/skills/qcsd-ideation-swarm/steps/02-core-agents.md +29 -0
  108. package/assets/skills/qcsd-ideation-swarm/steps/03-batch1-results.md +15 -0
  109. package/assets/skills/qcsd-ideation-swarm/steps/04-conditional-agents.md +23 -0
  110. package/assets/skills/qcsd-ideation-swarm/steps/05-decision-synthesis.md +29 -0
  111. package/assets/skills/qcsd-ideation-swarm/steps/06-report-generation.md +18 -0
  112. package/assets/skills/qcsd-ideation-swarm/steps/07-learning-persistence.md +29 -0
  113. package/assets/skills/qcsd-ideation-swarm/steps/08-final-output.md +18 -0
  114. package/assets/skills/qcsd-production-swarm/SKILL.md +88 -2663
  115. package/assets/skills/qcsd-production-swarm/steps/01-flag-detection.md +206 -0
  116. package/assets/skills/qcsd-production-swarm/steps/02-core-agents.md +428 -0
  117. package/assets/skills/qcsd-production-swarm/steps/03-batch1-results.md +101 -0
  118. package/assets/skills/qcsd-production-swarm/steps/04-conditional-agents.md +125 -0
  119. package/assets/skills/qcsd-production-swarm/steps/05-decision-synthesis.md +136 -0
  120. package/assets/skills/qcsd-production-swarm/steps/06-report-generation.md +181 -0
  121. package/assets/skills/qcsd-production-swarm/steps/07-learning-persistence.md +185 -0
  122. package/assets/skills/qcsd-production-swarm/steps/08-feedback-loop.md +122 -0
  123. package/assets/skills/qcsd-production-swarm/steps/09-final-output.md +140 -0
  124. package/assets/skills/qcsd-refinement-swarm/SKILL.md +59 -2312
  125. package/assets/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +91 -0
  126. package/assets/skills/qcsd-refinement-swarm/steps/02-core-agents.md +40 -0
  127. package/assets/skills/qcsd-refinement-swarm/steps/03-batch1-results.md +40 -0
  128. package/assets/skills/qcsd-refinement-swarm/steps/04-conditional-agents.md +35 -0
  129. package/assets/skills/qcsd-refinement-swarm/steps/05-decision-synthesis.md +43 -0
  130. package/assets/skills/qcsd-refinement-swarm/steps/06-report-generation.md +42 -0
  131. package/assets/skills/qcsd-refinement-swarm/steps/07-learning-persistence.md +53 -0
  132. package/assets/skills/qcsd-refinement-swarm/steps/08-transformation.md +36 -0
  133. package/assets/skills/qcsd-refinement-swarm/steps/09-final-output.md +46 -0
  134. package/assets/skills/sherlock-review/SKILL.md +3 -0
  135. package/assets/templates/agent-override-example.yaml +39 -0
  136. package/dist/agents/devils-advocate/agent.d.ts +25 -1
  137. package/dist/agents/devils-advocate/agent.js +108 -4
  138. package/dist/agents/devils-advocate/types.d.ts +54 -0
  139. package/dist/agents/devils-advocate/types.js +14 -0
  140. package/dist/agents/overlay-loader.d.ts +28 -0
  141. package/dist/agents/overlay-loader.js +232 -0
  142. package/dist/agents/overlay-schema.d.ts +56 -0
  143. package/dist/agents/overlay-schema.js +77 -0
  144. package/dist/analysis/branch-enumerator.d.ts +68 -0
  145. package/dist/analysis/branch-enumerator.js +393 -0
  146. package/dist/analysis/index.d.ts +2 -0
  147. package/dist/analysis/index.js +2 -0
  148. package/dist/cli/bundle.js +2396 -614
  149. package/dist/cli/commands/coverage.js +50 -0
  150. package/dist/context/compiler.d.ts +62 -0
  151. package/dist/context/compiler.js +143 -0
  152. package/dist/context/index.d.ts +8 -0
  153. package/dist/context/index.js +6 -0
  154. package/dist/context/sources/coverage-source.d.ts +15 -0
  155. package/dist/context/sources/coverage-source.js +77 -0
  156. package/dist/context/sources/git-source.d.ts +12 -0
  157. package/dist/context/sources/git-source.js +33 -0
  158. package/dist/context/sources/index.d.ts +6 -0
  159. package/dist/context/sources/index.js +5 -0
  160. package/dist/context/sources/memory-source.d.ts +17 -0
  161. package/dist/context/sources/memory-source.js +94 -0
  162. package/dist/context/sources/test-source.d.ts +13 -0
  163. package/dist/context/sources/test-source.js +53 -0
  164. package/dist/context/sources/types.d.ts +42 -0
  165. package/dist/context/sources/types.js +5 -0
  166. package/dist/init/agents-installer.d.ts +9 -0
  167. package/dist/init/agents-installer.js +72 -0
  168. package/dist/init/phases/07-hooks.d.ts +11 -0
  169. package/dist/init/phases/07-hooks.js +67 -0
  170. package/dist/init/phases/09-assets.js +3 -0
  171. package/dist/init/settings-merge.js +1 -1
  172. package/dist/mcp/bundle.js +4411 -3979
  173. package/dist/mcp/services/task-router.d.ts +11 -0
  174. package/dist/mcp/services/task-router.js +26 -0
  175. package/dist/routing/qe-agent-registry.d.ts +11 -0
  176. package/dist/routing/qe-agent-registry.js +34 -0
  177. package/dist/routing/qe-task-router.d.ts +1 -0
  178. package/dist/routing/qe-task-router.js +34 -2
  179. package/dist/routing/types.d.ts +2 -0
  180. package/dist/validation/index.d.ts +3 -0
  181. package/dist/validation/index.js +10 -0
  182. package/dist/validation/pipeline.d.ts +80 -0
  183. package/dist/validation/pipeline.js +173 -0
  184. package/dist/validation/steps/requirements.d.ts +32 -0
  185. package/dist/validation/steps/requirements.js +596 -0
  186. package/package.json +6 -6
  187. package/.claude/agents/consensus/README.md +0 -253
  188. package/.claude/agents/deprecated/qe-api-contract-validator.md.v2 +0 -162
  189. package/.claude/agents/deprecated/qe-coverage-analyzer.md.v2 +0 -208
  190. package/.claude/agents/deprecated/qe-test-generator.md.v2 +0 -212
  191. package/.claude/agents/deprecated/qe-visual-tester.md.v2 +0 -216
  192. package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -130
  193. package/.claude/agents/hive-mind/queen-coordinator.md +0 -203
  194. package/.claude/agents/hive-mind/scout-explorer.md +0 -242
  195. package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -193
  196. package/.claude/agents/hive-mind/worker-specialist.md +0 -217
  197. package/.claude/agents/neural/safla-neural.md +0 -74
  198. package/.claude/agents/optimization/README.md +0 -250
  199. package/.claude/agents/reasoning/agent.md +0 -816
  200. package/.claude/agents/reasoning/goal-planner.md +0 -73
  201. package/.claude/agents/subagents/qe-code-reviewer.md +0 -76
  202. package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +0 -76
  203. package/.claude/agents/subagents/qe-data-generator.md +0 -77
  204. package/.claude/agents/subagents/qe-flaky-investigator.md +0 -91
  205. package/.claude/agents/subagents/qe-integration-tester.md +0 -90
  206. package/.claude/agents/subagents/qe-performance-validator.md +0 -92
  207. package/.claude/agents/subagents/qe-security-auditor.md +0 -94
  208. package/.claude/agents/subagents/qe-test-data-architect-sub.md +0 -93
  209. package/.claude/agents/subagents/qe-test-implementer.md +0 -106
  210. package/.claude/agents/subagents/qe-test-refactorer.md +0 -117
  211. package/.claude/agents/subagents/qe-test-writer.md +0 -112
  212. package/.claude/agents/swarm/README.md +0 -190
  213. package/.claude/agents/templates/migration-plan.md +0 -746
  214. package/.claude/agents/testing/unit/tdd-london-swarm.md +0 -244
  215. package/.claude/agents/testing/validation/production-validator.md +0 -395
  216. package/.claude/agents/v3/README.md +0 -39
  217. package/.claude/agents/v3/typescript-specialist.yaml +0 -21
  218. package/.claude/agents/v3/v3-memory-specialist.md +0 -318
  219. package/.claude/agents/v3/v3-performance-engineer.md +0 -397
  220. package/.claude/agents/v3/v3-queen-coordinator.md +0 -98
  221. package/.claude/agents/v3/v3-security-architect.md +0 -174
  222. package/.claude/commands/README.md +0 -106
  223. package/.claude/commands/agents/README.md +0 -10
  224. package/.claude/commands/agents/agent-capabilities.md +0 -21
  225. package/.claude/commands/agents/agent-coordination.md +0 -28
  226. package/.claude/commands/agents/agent-spawning.md +0 -28
  227. package/.claude/commands/agents/agent-types.md +0 -26
  228. package/.claude/commands/coordination/README.md +0 -9
  229. package/.claude/commands/coordination/agent-spawn.md +0 -25
  230. package/.claude/commands/coordination/init.md +0 -44
  231. package/.claude/commands/coordination/orchestrate.md +0 -43
  232. package/.claude/commands/coordination/spawn.md +0 -45
  233. package/.claude/commands/coordination/swarm-init.md +0 -85
  234. package/.claude/commands/coordination/task-orchestrate.md +0 -25
  235. package/.claude/commands/hive-mind/README.md +0 -17
  236. package/.claude/commands/hive-mind/hive-mind-consensus.md +0 -8
  237. package/.claude/commands/hive-mind/hive-mind-init.md +0 -18
  238. package/.claude/commands/hive-mind/hive-mind-memory.md +0 -8
  239. package/.claude/commands/hive-mind/hive-mind-metrics.md +0 -8
  240. package/.claude/commands/hive-mind/hive-mind-resume.md +0 -8
  241. package/.claude/commands/hive-mind/hive-mind-sessions.md +0 -8
  242. package/.claude/commands/hive-mind/hive-mind-spawn.md +0 -21
  243. package/.claude/commands/hive-mind/hive-mind-status.md +0 -8
  244. package/.claude/commands/hive-mind/hive-mind-stop.md +0 -8
  245. package/.claude/commands/hive-mind/hive-mind-wizard.md +0 -8
  246. package/.claude/commands/hive-mind/hive-mind.md +0 -27
  247. package/.claude/commands/memory/README.md +0 -9
  248. package/.claude/commands/memory/memory-persist.md +0 -25
  249. package/.claude/commands/memory/memory-search.md +0 -25
  250. package/.claude/commands/memory/memory-usage.md +0 -25
  251. package/.claude/commands/memory/neural.md +0 -47
  252. package/.claude/commands/swarm/README.md +0 -15
  253. package/.claude/commands/swarm/swarm-analysis.md +0 -8
  254. package/.claude/commands/swarm/swarm-background.md +0 -8
  255. package/.claude/commands/swarm/swarm-init.md +0 -19
  256. package/.claude/commands/swarm/swarm-modes.md +0 -8
  257. package/.claude/commands/swarm/swarm-monitor.md +0 -8
  258. package/.claude/commands/swarm/swarm-spawn.md +0 -19
  259. package/.claude/commands/swarm/swarm-status.md +0 -8
  260. package/.claude/commands/swarm/swarm-strategies.md +0 -8
  261. package/.claude/commands/swarm/swarm.md +0 -27
  262. package/.claude/commands/training/README.md +0 -9
  263. package/.claude/commands/training/model-update.md +0 -25
  264. package/.claude/commands/training/neural-patterns.md +0 -74
  265. package/.claude/commands/training/neural-train.md +0 -25
  266. package/.claude/commands/training/pattern-learn.md +0 -25
  267. package/.claude/commands/training/specialization.md +0 -63
  268. package/.claude/commands/workflows/README.md +0 -9
  269. package/.claude/commands/workflows/development.md +0 -78
  270. package/.claude/commands/workflows/research.md +0 -63
  271. package/.claude/commands/workflows/workflow-create.md +0 -25
  272. package/.claude/commands/workflows/workflow-execute.md +0 -25
  273. package/.claude/commands/workflows/workflow-export.md +0 -25
  274. package/.claude/skills/agentic-jujutsu/SKILL.md +0 -645
  275. package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
  276. package/.claude/skills/iterative-loop/SKILL.md +0 -371
  277. package/.claude/skills/performance-analysis/SKILL.md +0 -569
  278. package/.claude/skills/performance-analysis/evals/performance-analysis.yaml +0 -144
  279. package/.claude/skills/performance-analysis/schemas/output.json +0 -588
  280. package/.claude/skills/performance-analysis/scripts/validate-config.json +0 -36
@@ -54,2345 +54,92 @@ Shift-left quality engineering swarm for Sprint Refinement sessions.
54
54
  ## Overview
55
55
 
56
56
  The Refinement Swarm takes user stories that passed Ideation and prepares them
57
- for Sprint commitment. Where the Ideation Swarm asks "Should we build this?"
58
- using HTSM quality criteria, the Refinement Swarm asks "How should we test
59
- this?" using SFDIPOT product factors, BDD scenarios, and INVEST validation.
57
+ for Sprint commitment using SFDIPOT product factors, BDD scenarios, and INVEST validation.
58
+ It renders a READY / CONDITIONAL / NOT-READY decision.
60
59
 
61
- ### Key Differentiators from Ideation Swarm
60
+ ### QCSD Phase Positioning
62
61
 
63
- | Dimension | Ideation Swarm | Refinement Swarm |
64
- |-----------|---------------|------------------|
65
- | Framework | HTSM v6.3 (10 categories) | SFDIPOT (7 factors, 37 subcategories) |
66
- | Agents | 9 (3 core + 6 conditional) | 10 (3 core + 6 conditional + 1 transformation) |
67
- | Core Output | Quality Criteria HTML report | BDD Gherkin scenarios |
68
- | Decision | GO / CONDITIONAL / NO-GO | READY / CONDITIONAL / NOT-READY |
69
- | Flags | HAS_UI, HAS_SECURITY, HAS_UX, HAS_MIDDLEWARE, HAS_SAP_INTEGRATION, HAS_AUTHORIZATION | HAS_API, HAS_REFACTORING, HAS_DEPENDENCIES, HAS_SECURITY, HAS_MIDDLEWARE, HAS_SAP_INTEGRATION, HAS_AUTHORIZATION |
70
- | Phase | PI Planning / Sprint Planning | Sprint Refinement |
71
- | Final Step | Report generation | Test idea rewriter transformation |
62
+ | Phase | Swarm | Decision | When |
63
+ |-------|-------|----------|------|
64
+ | Ideation | qcsd-ideation-swarm | GO / CONDITIONAL / NO-GO | PI/Sprint Planning |
65
+ | **Refinement** | **qcsd-refinement-swarm** | **READY / CONDITIONAL / NOT-READY** | **Sprint Refinement** |
66
+ | Development | qcsd-development-swarm | SHIP / CONDITIONAL / HOLD | During Sprint |
67
+ | Verification | qcsd-cicd-swarm | RELEASE / REMEDIATE / BLOCK | Pre-Release / CI-CD |
68
+ | Production | qcsd-production-swarm | HEALTHY / DEGRADED / CRITICAL | Post-Release |
69
+
70
+ ### Parameters
71
+
72
+ - `STORY_CONTENT`: User story with acceptance criteria (required)
73
+ - `OUTPUT_FOLDER`: Where to save reports (default: `${PROJECT_ROOT}/Agentic QCSD/refinement/`)
72
74
 
73
75
  ---
74
76
 
75
77
  ## ENFORCEMENT RULES - READ FIRST
76
78
 
77
- **These rules are NON-NEGOTIABLE. Violation means skill execution failure.**
78
-
79
79
  | Rule | Enforcement |
80
80
  |------|-------------|
81
- | **E1** | You MUST spawn ALL THREE core agents (qe-product-factors-assessor, qe-bdd-generator, qe-requirements-validator) in Phase 2. No exceptions. |
82
- | **E2** | You MUST put all parallel Task calls in a SINGLE message. |
83
- | **E3** | You MUST STOP and WAIT after each batch. No proceeding early. |
84
- | **E4** | You MUST spawn conditional agents if flags are TRUE. No skipping. |
85
- | **E5** | You MUST apply READY/CONDITIONAL/NOT-READY logic exactly as specified in Phase 5. |
86
- | **E6** | You MUST generate the full report structure. No abbreviated versions. |
81
+ | **E1** | MUST spawn ALL THREE core agents in Step 2. |
82
+ | **E2** | MUST put all parallel Task calls in a SINGLE message. |
83
+ | **E3** | MUST STOP and WAIT after each batch. |
84
+ | **E4** | MUST spawn conditional agents if flags are TRUE. |
85
+ | **E5** | MUST apply READY/CONDITIONAL/NOT-READY logic exactly. |
86
+ | **E6** | MUST generate the full report structure. |
87
87
  | **E7** | Each agent MUST read its reference files before analysis. |
88
- | **E8** | You MUST apply qe-test-idea-rewriter transformation on ALL test ideas in Phase 8. Always. |
89
- | **E9** | You MUST execute Phase 7 learning persistence. Store refinement findings to memory BEFORE Phase 8. No skipping. |
90
-
91
- **PROHIBITED BEHAVIORS:**
92
- - Summarizing instead of spawning agents
93
- - Skipping agents "for brevity"
94
- - Proceeding before background tasks complete
95
- - Providing your own analysis instead of spawning specialists
96
- - Omitting report sections
97
- - Using placeholder text like "[details here]"
98
- - Skipping the test idea rewriter transformation
99
- - Skipping learning persistence (Phase 7) or treating it as optional
100
- - Generating BDD scenarios yourself instead of using qe-bdd-generator
101
-
102
- ---
103
-
104
- ## PHASE 1: Analyze Story Content (Flag Detection)
105
-
106
- **MANDATORY: You must complete this analysis before Phase 2.**
107
-
108
- Scan the story content and SET these flags. Do not skip any flag.
109
-
110
- ### Flag Detection (Check ALL SEVEN)
111
-
112
- ```
113
- HAS_API = FALSE
114
- Set TRUE if story contains ANY of: API, endpoint, REST, GraphQL, contract,
115
- integration, webhook, microservice, service-to-service, HTTP, gRPC,
116
- request, response, payload, schema, OpenAPI, Swagger, consumer, provider
117
-
118
- HAS_REFACTORING = FALSE
119
- Set TRUE if story contains ANY of: refactor, rearchitect, rewrite,
120
- migrate, modernize, tech debt, legacy, restructure, decouple,
121
- consolidate, simplify, extract, decompose, re-engineer
122
-
123
- HAS_DEPENDENCIES = FALSE
124
- Set TRUE if story contains ANY of: dependency, coupling, module,
125
- package, library, import, shared, cross-team, upstream, downstream,
126
- third-party, external, vendor, SDK, plugin, middleware
127
-
128
- HAS_SECURITY = FALSE
129
- Set TRUE if story contains ANY of: auth, security, credential, token,
130
- encrypt, PII, compliance, password, login, session, OAuth, JWT,
131
- permission, role, access control, RBAC, sensitive, private
132
-
133
- HAS_MIDDLEWARE = FALSE
134
- Set TRUE if story contains ANY of: middleware, ESB, message broker, MQ,
135
- Kafka, RabbitMQ, integration bus, API gateway, message queue, pub/sub
136
-
137
- HAS_SAP_INTEGRATION = FALSE
138
- Set TRUE if story contains ANY of: SAP, RFC, BAPI, IDoc, OData,
139
- S/4HANA, EWM, ECC, ABAP, CDS view, Fiori
140
-
141
- HAS_AUTHORIZATION = FALSE
142
- Set TRUE if story contains ANY of: SoD, segregation of duties,
143
- role conflict, authorization object, T-code, user role,
144
- access control matrix, GRC
145
- ```
146
-
147
- ### Validation Checkpoint
148
-
149
- Before proceeding to Phase 2, confirm:
150
-
151
- ```
152
- +-- I have read the entire story content
153
- +-- I have evaluated ALL SEVEN flags
154
- +-- I have recorded which flags are TRUE
155
- +-- I understand which conditional agents will be needed
156
- ```
157
-
158
- **DO NOT proceed to Phase 2 until all checkboxes are confirmed.**
159
-
160
- ### MANDATORY: Output Flag Detection Results
161
-
162
- You MUST output flag detection results before proceeding:
163
-
164
- ```
165
- +-------------------------------------------------------------+
166
- | FLAG DETECTION RESULTS |
167
- +-------------------------------------------------------------+
168
- | |
169
- | HAS_API: [TRUE/FALSE] |
170
- | Evidence: [what triggered it - specific patterns] |
171
- | |
172
- | HAS_REFACTORING: [TRUE/FALSE] |
173
- | Evidence: [what triggered it - specific patterns] |
174
- | |
175
- | HAS_DEPENDENCIES: [TRUE/FALSE] |
176
- | Evidence: [what triggered it - specific patterns] |
177
- | |
178
- | HAS_SECURITY: [TRUE/FALSE] |
179
- | Evidence: [what triggered it - specific patterns] |
180
- | |
181
- | HAS_MIDDLEWARE: [TRUE/FALSE] |
182
- | Evidence: [what triggered it - specific] |
183
- | |
184
- | HAS_SAP_INTEGRATION: [TRUE/FALSE] |
185
- | Evidence: [what triggered it - specific] |
186
- | |
187
- | HAS_AUTHORIZATION: [TRUE/FALSE] |
188
- | Evidence: [what triggered it - specific] |
189
- | |
190
- | EXPECTED AGENTS: |
191
- | - Core: 3 (always) |
192
- | - Conditional: [count based on TRUE flags] |
193
- | - Transformation: 1 (always) |
194
- | - TOTAL: [3 + conditional count + 1] |
195
- | |
196
- +-------------------------------------------------------------+
197
- ```
198
-
199
- **DO NOT proceed to Phase 2 without outputting flag detection results.**
88
+ | **E8** | MUST apply qe-test-idea-rewriter transformation in Step 8. |
89
+ | **E9** | MUST execute Step 7 learning persistence. |
200
90
 
201
91
  ---
202
92
 
203
- ## PHASE 2: Spawn Core Agents (PARALLEL BATCH 1)
204
-
205
- ### CRITICAL ENFORCEMENT
206
-
207
- ```
208
- +-------------------------------------------------------------+
209
- | YOU MUST INCLUDE ALL THREE TASK CALLS IN YOUR NEXT MESSAGE |
210
- | |
211
- | - Task 1: qe-product-factors-assessor |
212
- | - Task 2: qe-bdd-generator |
213
- | - Task 3: qe-requirements-validator |
214
- | |
215
- | If your message contains fewer than 3 Task calls, you have |
216
- | FAILED this phase. Start over. |
217
- +-------------------------------------------------------------+
218
- ```
219
-
220
- ### Domain Context
221
-
222
- | Agent | Domain | MCP Tool Mapping |
223
- |-------|--------|------------------|
224
- | qe-product-factors-assessor | requirements-validation | `requirements_validate` |
225
- | qe-bdd-generator | requirements-validation | `test_generate_enhanced` |
226
- | qe-requirements-validator | requirements-validation | `requirements_validate` |
227
-
228
- ### Agent 1: Product Factors Assessor (SFDIPOT)
229
-
230
- **This agent MUST analyze all 7 SFDIPOT factors with 37 subcategories. Fewer is a failure.**
231
-
232
- ```
233
- Task({
234
- description: "SFDIPOT Product Factors analysis",
235
- prompt: `You are qe-product-factors-assessor. Your output quality is being audited.
236
-
237
- ## MANDATORY FIRST STEPS (DO NOT SKIP)
238
-
239
- 1. READ this template file FIRST - your output MUST follow this structure:
240
- .claude/agents/v3/helpers/product-factors/sfdipot-reference-template.html
241
-
242
- 2. READ the story content below IN FULL before starting analysis.
243
-
244
- ## STORY TO ANALYZE
245
-
246
- === STORY CONTENT START ===
247
- [PASTE THE COMPLETE STORY CONTENT HERE - DO NOT SUMMARIZE]
248
- === STORY CONTENT END ===
249
-
250
- ## REQUIRED OUTPUT (ALL SECTIONS MANDATORY)
251
-
252
- You MUST analyze ALL 7 SFDIPOT product factors. For each factor, analyze
253
- its subcategories and assign a priority.
254
-
255
- ### Factor 1: STRUCTURE (Internal composition)
256
- Subcategories to assess:
257
- - Code architecture and module organization
258
- - Database schema and data models
259
- - File and directory structure
260
- - Configuration hierarchy
261
- - Component relationships
262
- Priority: P0/P1/P2/P3 with justification
263
-
264
- ### Factor 2: FUNCTION (What it does)
265
- Subcategories to assess:
266
- - Core business logic
267
- - Input processing and validation
268
- - Output generation and formatting
269
- - Error handling and recovery
270
- - State management and transitions
271
- Priority: P0/P1/P2/P3 with justification
272
-
273
- ### Factor 3: DATA (What it processes)
274
- Subcategories to assess:
275
- - Data types and formats
276
- - Data flow and transformations
277
- - Data persistence and storage
278
- - Data validation rules
279
- - Data volume and growth patterns
280
- - Data integrity constraints
281
- Priority: P0/P1/P2/P3 with justification
282
-
283
- ### Factor 4: INTERFACES (How it connects)
284
- Subcategories to assess:
285
- - User interfaces (if applicable)
286
- - API contracts and endpoints
287
- - Event/message interfaces
288
- - File-based interfaces
289
- - Hardware interfaces (if applicable)
290
- - Inter-system communication protocols
291
- Priority: P0/P1/P2/P3 with justification
292
-
293
- ### Factor 5: PLATFORM (What it depends on)
294
- Subcategories to assess:
295
- - Operating system dependencies
296
- - Runtime environment (Node, JVM, etc.)
297
- - Cloud provider services
298
- - Container/orchestration platform
299
- - Browser/client platform
300
- - Network infrastructure
301
- Priority: P0/P1/P2/P3 with justification
302
-
303
- ### Factor 6: OPERATIONS (How it runs in production)
304
- Subcategories to assess:
305
- - Deployment process
306
- - Monitoring and alerting
307
- - Logging and observability
308
- - Backup and recovery
309
- - Scaling and capacity
310
- - Incident response procedures
311
- Priority: P0/P1/P2/P3 with justification
312
-
313
- ### Factor 7: TIME (How it changes)
314
- Subcategories to assess:
315
- - Scheduling and time-based triggers
316
- - Temporal data (timestamps, durations)
317
- - Concurrency and race conditions
318
- - Timeout and retry behavior
319
- - Historical data and versioning
320
- - Time zone handling
321
- Priority: P0/P1/P2/P3 with justification
322
-
323
- ## SCORING REQUIREMENTS
324
-
325
- For each of the 7 factors, provide:
326
-
327
- | Field | Requirement |
328
- |-------|-------------|
329
- | Factor Name | One of the 7 SFDIPOT factors |
330
- | Priority | P0, P1, P2, or P3 with justification |
331
- | Subcategories Assessed | Count of subcategories analyzed |
332
- | Coverage Depth | Shallow / Adequate / Deep |
333
- | Key Findings | Top 3 findings for this factor |
334
- | Test Focus Areas | Specific areas requiring test coverage |
335
-
336
- ## OUTPUT FORMAT
337
-
338
- Save your complete analysis in Markdown to:
339
- ${OUTPUT_FOLDER}/02-sfdipot-analysis.md
340
-
341
- Use the Write tool to save BEFORE completing.
342
- Report MUST be complete - no placeholders.
343
-
344
- ## VALIDATION BEFORE SUBMITTING
345
-
346
- +-- Did I read the SFDIPOT reference template?
347
- +-- Did I analyze all 7 factors?
348
- +-- Did I assess at least 37 subcategories total?
349
- +-- Does every factor have a priority with justification?
350
- +-- Did I identify test focus areas for each factor?
351
- +-- Did I save the report to the correct output path?`,
352
- subagent_type: "qe-product-factors-assessor",
353
- run_in_background: true
354
- })
355
- ```
356
-
357
- ### Agent 2: BDD Scenario Generator
358
-
359
- **This agent MUST generate at least 5 Gherkin scenarios. Fewer is a failure.**
360
-
361
- ```
362
- Task({
363
- description: "BDD Gherkin scenario generation",
364
- prompt: `You are qe-bdd-generator. Your output quality is being audited.
365
-
366
- ## METHODOLOGY
367
-
368
- Apply Behaviour-Driven Development (BDD) principles to generate
369
- comprehensive Gherkin scenarios from the story and its acceptance criteria.
370
-
371
- ## STORY TO ANALYZE
372
-
373
- === STORY CONTENT START ===
374
- [PASTE THE COMPLETE STORY CONTENT HERE - DO NOT SUMMARIZE]
375
- === STORY CONTENT END ===
376
-
377
- ## REQUIRED OUTPUT (ALL SECTIONS MANDATORY)
378
-
379
- ### 1. Feature File Header
380
-
381
- Write a proper Gherkin feature header:
382
-
383
- Feature: [Feature name derived from story]
384
- As a [role from story]
385
- I want [capability from story]
386
- So that [business value from story]
387
-
388
- ### 2. Scenario Categories (ALL MANDATORY)
389
-
390
- You MUST generate scenarios in ALL of these categories:
391
-
392
- #### Category A: Happy Path Scenarios (minimum 2)
393
- - Primary success flow
394
- - Variant success flows
395
-
396
- #### Category B: Error/Negative Path Scenarios (minimum 2)
397
- - Invalid input handling
398
- - System error handling
399
- - Boundary violations
400
-
401
- #### Category C: Boundary/Edge Case Scenarios (minimum 1)
402
- - Minimum and maximum values
403
- - Empty states
404
- - Null/undefined handling
405
-
406
- #### Category D: Security Scenarios (if HAS_SECURITY flag is TRUE)
407
- - Authentication failures
408
- - Authorization violations
409
- - Data protection scenarios
410
-
411
- ### 3. Gherkin Format Requirements
412
-
413
- EVERY scenario MUST follow this structure:
414
-
415
- Scenario: [Descriptive name]
416
- Given [precondition with specific data]
417
- And [additional precondition if needed]
418
- When [action with specific input]
419
- And [additional action if needed]
420
- Then [expected outcome with specific assertion]
421
- And [additional assertion if needed]
422
-
423
- RULES:
424
- - Use concrete data, not abstract descriptions
425
- - Include data tables where 3+ similar checks apply
426
- - Use Scenario Outline + Examples for parameterized cases
427
- - Every Then step must be verifiable/assertable
428
- - No vague steps like "the system works correctly"
429
-
430
- ### 4. Scenario Outline with Examples (minimum 1)
431
-
432
- At least one scenario MUST use Scenario Outline:
433
-
434
- Scenario Outline: [Parameterized scenario name]
435
- Given [precondition with <parameter>]
436
- When [action with <input>]
437
- Then [expected <outcome>]
438
-
439
- Examples:
440
- | parameter | input | outcome |
441
- | value1 | val1 | result1 |
442
- | value2 | val2 | result2 |
443
- | value3 | val3 | result3 |
444
-
445
- ### 5. Traceability Matrix
446
-
447
- Map each scenario back to acceptance criteria:
448
-
449
- | Scenario | Acceptance Criterion | Category |
450
- |----------|---------------------|----------|
451
- | Scenario 1 | AC-1 | Happy Path |
452
- | Scenario 2 | AC-1, AC-3 | Error Path |
453
- | ... | ... | ... |
454
-
455
- ### 6. Summary Metrics
456
-
457
- | Metric | Value |
458
- |--------|-------|
459
- | Total Scenarios | __ |
460
- | Happy Path | __ |
461
- | Error Path | __ |
462
- | Boundary | __ |
463
- | Security | __ |
464
- | Scenario Outlines | __ |
465
- | Total Examples | __ |
466
- | AC Coverage | __% |
467
-
468
- **MINIMUM: 5 total scenarios. Target: 10+ scenarios.**
469
-
470
- ## OUTPUT FORMAT
471
-
472
- Save your complete analysis in Markdown (with embedded Gherkin) to:
473
- ${OUTPUT_FOLDER}/03-bdd-scenarios.md
474
-
475
- Use the Write tool to save BEFORE completing.
476
- Report MUST be complete - no placeholders.
477
-
478
- ## VALIDATION BEFORE SUBMITTING
479
-
480
- +-- Did I generate at least 5 scenarios?
481
- +-- Did I cover Happy Path, Error Path, and Boundary categories?
482
- +-- Does every scenario have concrete data (not abstract)?
483
- +-- Did I include at least one Scenario Outline with Examples?
484
- +-- Did I map scenarios back to acceptance criteria?
485
- +-- Did I calculate AC coverage percentage?
486
- +-- Did I save the report to the correct output path?`,
487
- subagent_type: "qe-bdd-generator",
488
- run_in_background: true
489
- })
490
- ```
491
-
492
- ### Agent 3: Requirements Validator (INVEST)
493
-
494
- **This agent MUST provide an INVEST completeness score 0-100. No ranges.**
495
-
496
- ```
497
- Task({
498
- description: "INVEST requirements validation and testability scoring",
499
- prompt: `You are qe-requirements-validator. Your output quality is being audited.
500
-
501
- ## METHODOLOGY
502
-
503
- Apply INVEST validation and testability-scoring principles.
504
-
505
- ## STORY AND ACCEPTANCE CRITERIA TO VALIDATE
506
-
507
- === STORY CONTENT START ===
508
- [PASTE THE COMPLETE STORY + ACCEPTANCE CRITERIA HERE - DO NOT SUMMARIZE]
509
- === STORY CONTENT END ===
510
-
511
- ## REQUIRED OUTPUT (ALL SECTIONS MANDATORY)
512
-
513
- ### 1. INVEST Validation (MANDATORY - ALL SIX CRITERIA)
514
-
515
- Score each INVEST criterion 0-100:
516
-
517
- | Criterion | Score | Evidence | Issues |
518
- |-----------|-------|----------|--------|
519
- | **I**ndependent | X/100 | Can this story be developed and tested independently of other stories? | [issues found] |
520
- | **N**egotiable | X/100 | Is the story expressed as intent (not implementation detail)? | [issues found] |
521
- | **V**aluable | X/100 | Does it deliver clear value to users or the business? | [issues found] |
522
- | **E**stimable | X/100 | Can the team estimate effort with confidence? | [issues found] |
523
- | **S**mall | X/100 | Can it be completed in a single sprint? | [issues found] |
524
- | **T**estable | X/100 | Are there clear, verifiable acceptance criteria? | [issues found] |
525
-
526
- **INVEST COMPLETENESS SCORE: XX/100** (average of all six criteria)
527
-
528
- ### 2. Acceptance Criteria Assessment
529
-
530
- For EACH acceptance criterion:
531
-
532
- | AC ID | Text | Testable? | Issues | Suggested Rewrite |
533
- |-------|------|-----------|--------|-------------------|
534
- | AC-1 | [original text] | Yes/No | [issues] | [improved version if needed] |
535
- | AC-2 | ... | ... | ... | ... |
536
-
537
- For non-testable ACs, explain WHY and provide a testable rewrite.
538
-
539
- ### 3. Gap Analysis (MANDATORY)
540
-
541
- Identify ALL gaps in the story:
542
-
543
- #### Missing Requirements
544
- - [Gap 1: Description of what is missing]
545
- - [Gap 2: ...]
546
-
547
- #### Ambiguous Language
548
- - [Ambiguity 1: Quote the ambiguous text and explain]
549
- - [Ambiguity 2: ...]
550
-
551
- #### Missing Edge Cases
552
- - [Edge Case 1: Scenario not covered by current ACs]
553
- - [Edge Case 2: ...]
554
-
555
- #### Missing Non-Functional Requirements
556
- - Performance: [specified? missing?]
557
- - Security: [specified? missing?]
558
- - Accessibility: [specified? missing?]
559
- - Error handling: [specified? missing?]
560
-
561
- **CRITICAL GAPS COUNT: __** (gaps that block sprint readiness)
562
-
563
- **MINIMUM: Identify at least 3 gaps or explicitly state "No gaps found
564
- after thorough analysis of all requirement dimensions"**
565
-
566
- ### 4. Definition of Ready (DoR) Checklist
567
-
568
- | DoR Item | Status | Notes |
569
- |----------|--------|-------|
570
- | Story has clear title and description | Pass/Fail | ... |
571
- | Acceptance criteria are defined | Pass/Fail | ... |
572
- | ACs are testable | Pass/Fail | ... |
573
- | Dependencies are identified | Pass/Fail | ... |
574
- | Story is estimated | Pass/Fail | ... |
575
- | Story fits in a sprint | Pass/Fail | ... |
576
- | UX designs available (if needed) | Pass/Fail/N/A | ... |
577
- | API contracts defined (if needed) | Pass/Fail/N/A | ... |
578
- | Test data requirements known | Pass/Fail | ... |
579
- | No blockers identified | Pass/Fail | ... |
580
-
581
- **DoR PASS RATE: X/10 (or X/N if N/A items excluded)**
582
-
583
- ### 5. Recommendations
584
-
585
- Specific, actionable recommendations to make this story sprint-ready:
586
-
587
- | Priority | Recommendation | Owner |
588
- |----------|---------------|-------|
589
- | P0 - Blocker | [must fix before sprint] | [who] |
590
- | P1 - Important | [should fix before sprint] | [who] |
591
- | P2 - Nice to have | [can refine during sprint] | [who] |
592
-
593
- ## OUTPUT FORMAT
594
-
595
- Save your complete analysis in Markdown to:
596
- ${OUTPUT_FOLDER}/04-requirements-validation.md
597
-
598
- Use the Write tool to save BEFORE completing.
599
- Report MUST be complete - no placeholders.
600
-
601
- ## VALIDATION BEFORE SUBMITTING
602
-
603
- +-- Did I score all 6 INVEST criteria?
604
- +-- Did I calculate a single INVEST completeness score (not a range)?
605
- +-- Did I assess every AC for testability?
606
- +-- Did I provide rewrites for non-testable ACs?
607
- +-- Did I identify gaps (or explicitly confirm none)?
608
- +-- Did I count critical gaps?
609
- +-- Did I complete the DoR checklist?
610
- +-- Did I save the report to the correct output path?`,
611
- subagent_type: "qe-requirements-validator",
612
- run_in_background: true
613
- })
614
- ```
615
-
616
- ### Alternative: MCP Tools Execution
617
-
618
- If using MCP instead of Task tool:
619
-
620
- ```javascript
621
- // Option 1: Orchestrate via Fleet
622
- mcp__agentic-qe__fleet_init({
623
- topology: "hierarchical",
624
- enabledDomains: ["requirements-validation", "test-generation"],
625
- maxAgents: 7,
626
- lazyLoading: true
627
- })
93
+ ## Step Execution Protocol
628
94
 
629
- // Submit tasks to specific domains
630
- mcp__agentic-qe__task_submit({
631
- type: "product-factors-assessment",
632
- priority: "p0",
633
- payload: {
634
- storyContent: storyContent,
635
- framework: "sfdipot",
636
- factorCount: 7
637
- }
638
- })
95
+ Execute steps sequentially by reading each step file with the Read tool.
639
96
 
640
- mcp__agentic-qe__task_submit({
641
- type: "bdd-scenario-generation",
642
- priority: "p0",
643
- payload: {
644
- storyContent: storyContent,
645
- format: "gherkin",
646
- minScenarios: 5
647
- }
648
- })
97
+ ### Steps
649
98
 
650
- mcp__agentic-qe__task_submit({
651
- type: "requirements-validation",
652
- priority: "p0",
653
- payload: {
654
- storyContent: storyContent,
655
- validateInvest: true,
656
- assessDoR: true
657
- }
658
- })
99
+ 1. **Flag Detection** -- `steps/01-flag-detection.md` -- Analyze story content, evaluate all 7 flags
100
+ 2. **Core Agents** -- `steps/02-core-agents.md` -- Spawn qe-product-factors-assessor, qe-bdd-generator, qe-requirements-validator
101
+ 3. **Batch 1 Results** -- `steps/03-batch1-results.md` -- Wait and extract metrics
102
+ 4. **Conditional Agents** -- `steps/04-conditional-agents.md` -- Spawn flagged agents
103
+ 5. **Decision Synthesis** -- `steps/05-decision-synthesis.md` -- Apply READY/CONDITIONAL/NOT-READY logic
104
+ 6. **Report Generation** -- `steps/06-report-generation.md` -- Generate refinement report
105
+ 7. **Learning Persistence** -- `steps/07-learning-persistence.md` -- Store findings to memory
106
+ 8. **Transformation** -- `steps/08-transformation.md` -- Run test idea rewriter on all test ideas
107
+ 9. **Final Output** -- `steps/09-final-output.md` -- Display completion summary
659
108
 
660
- // Check task status
661
- mcp__agentic-qe__task_list({ status: "pending" })
662
- ```
109
+ ### Execution Instructions
663
110
 
664
- ### Alternative: CLI Execution
111
+ 1. Use the Read tool to load the current step file
112
+ 2. Execute the step's instructions completely
113
+ 3. Verify all success criteria are met
114
+ 4. Pass output as context to next step
115
+ 5. If a step fails, halt and report
665
116
 
666
- If using CLI instead of Task tool:
117
+ ### Resume Support
667
118
 
668
- ```bash
669
- # Initialize swarm for refinement
670
- npx @claude-flow/cli@latest swarm init \
671
- --topology hierarchical \
672
- --max-agents 7 \
673
- --strategy specialized
674
-
675
- # Pre-task hook for routing
676
- npx @claude-flow/cli@latest hooks pre-task \
677
- --description "QCSD Refinement: SFDIPOT, BDD Scenarios, INVEST Validation"
678
-
679
- # Spawn agents (run in separate terminals or background)
680
- npx @claude-flow/cli@latest agent spawn \
681
- --type qe-product-factors-assessor \
682
- --task "SFDIPOT 7-factor analysis for story" &
683
-
684
- npx @claude-flow/cli@latest agent spawn \
685
- --type qe-bdd-generator \
686
- --task "Gherkin BDD scenario generation" &
687
-
688
- npx @claude-flow/cli@latest agent spawn \
689
- --type qe-requirements-validator \
690
- --task "INVEST validation and DoR assessment" &
691
-
692
- # Wait for completion
693
- wait
694
-
695
- # Check swarm status
696
- npx @claude-flow/cli@latest swarm status
697
- ```
698
-
699
- ### Post-Spawn Confirmation
700
-
701
- After sending all three Task calls, you MUST tell the user:
702
-
703
- ```
704
- I've launched 3 core agents in parallel:
705
-
706
- qe-product-factors-assessor [Domain: requirements-validation]
707
- - Analyzing all 7 SFDIPOT factors (37 subcategories)
708
- - Assigning P0-P3 priorities per factor
709
- - Identifying test focus areas
710
-
711
- qe-bdd-generator [Domain: requirements-validation]
712
- - Generating Gherkin scenarios (happy, error, boundary, security)
713
- - Creating Scenario Outlines with Examples tables
714
- - Mapping scenarios to acceptance criteria
715
-
716
- qe-requirements-validator [Domain: requirements-validation]
717
- - Scoring INVEST criteria (6 dimensions)
718
- - Assessing AC testability with rewrites
719
- - Running Definition of Ready checklist
720
-
721
- WAITING for all agents to complete before proceeding...
722
- ```
723
-
724
- **DO NOT proceed to Phase 3 until you have sent this confirmation.**
119
+ To resume from a specific step: specify `--from-step N`.
725
120
 
726
121
  ---
727
122
 
728
- ## PHASE 3: Wait for Batch 1 Completion
729
-
730
- ### ENFORCEMENT: NO EARLY PROCEEDING
731
-
732
- ```
733
- +-------------------------------------------------------------+
734
- | YOU MUST WAIT FOR ALL THREE BACKGROUND TASKS TO COMPLETE |
735
- | |
736
- | DO NOT summarize what agents "would" find |
737
- | DO NOT proceed to Phase 4 early |
738
- | DO NOT provide your own analysis as substitute |
739
- | |
740
- | WAIT for actual agent results |
741
- | ONLY proceed when all three have returned |
742
- +-------------------------------------------------------------+
743
- ```
123
+ ## Agent Inventory
744
124
 
745
- ### Results Extraction Checklist
125
+ | Agent | Type | Domain | Batch |
126
+ |-------|------|--------|-------|
127
+ | qe-product-factors-assessor | Core | requirements-validation | 1 |
128
+ | qe-bdd-generator | Core | requirements-validation | 1 |
129
+ | qe-requirements-validator | Core | requirements-validation | 1 |
130
+ | qe-contract-validator | Conditional (HAS_API) | contract-testing | 2 |
131
+ | qe-impact-analyzer | Conditional (HAS_REFACTORING) | code-intelligence | 2 |
132
+ | qe-dependency-mapper | Conditional (HAS_DEPENDENCIES) | code-intelligence | 2 |
133
+ | qe-middleware-validator | Conditional (HAS_MIDDLEWARE) | enterprise-integration | 2 |
134
+ | qe-odata-contract-tester | Conditional (HAS_SAP_INTEGRATION) | enterprise-integration | 2 |
135
+ | qe-sod-analyzer | Conditional (HAS_AUTHORIZATION) | enterprise-integration | 2 |
136
+ | qe-test-idea-rewriter | Transformation (always) | test-generation | 3 |
746
137
 
747
- When results return, extract and record:
748
-
749
- ```
750
- From qe-product-factors-assessor:
751
- [ ] sfdipotCoverage = __/7 factors analyzed
752
- [ ] p0Count = __ P0 priority factors
753
- [ ] subcategoriesAssessed = __/37 subcategories
754
- [ ] testFocusAreas = __ areas identified
755
-
756
- From qe-bdd-generator:
757
- [ ] bddScenarioCount = __ scenarios generated
758
- [ ] happyPathCount = __ happy path scenarios
759
- [ ] errorPathCount = __ error path scenarios
760
- [ ] boundaryCount = __ boundary scenarios
761
- [ ] acCoverage = __% acceptance criteria covered
762
-
763
- From qe-requirements-validator:
764
- [ ] investCompleteness = __% (average of 6 INVEST criteria)
765
- [ ] criticalGaps = __ critical gaps identified
766
- [ ] dorPassRate = __/10 Definition of Ready items passing
767
- [ ] untestableACs = __ acceptance criteria needing rewrite
768
- ```
769
-
770
- ### Metrics Summary Box
771
-
772
- Output extracted metrics:
773
-
774
- ```
775
- +-------------------------------------------------------------+
776
- | BATCH 1 RESULTS SUMMARY |
777
- +-------------------------------------------------------------+
778
- | |
779
- | SFDIPOT Coverage: __/7 factors |
780
- | P0 Factors: __ |
781
- | Subcategories Assessed: __/37 |
782
- | |
783
- | BDD Scenarios: __ total |
784
- | - Happy Path: __ |
785
- | - Error Path: __ |
786
- | - Boundary: __ |
787
- | AC Coverage: __% |
788
- | |
789
- | INVEST Completeness: __% |
790
- | Critical Gaps: __ |
791
- | DoR Pass Rate: __/10 |
792
- | Untestable ACs: __ |
793
- | |
794
- +-------------------------------------------------------------+
795
- ```
796
-
797
- **DO NOT proceed to Phase 4 until ALL fields are filled.**
798
-
799
- ---
800
-
801
- ## PHASE 4: Spawn Conditional Agents (PARALLEL BATCH 2)
802
-
803
- ### ENFORCEMENT: NO SKIPPING CONDITIONAL AGENTS
804
-
805
- ```
806
- +-------------------------------------------------------------+
807
- | IF A FLAG IS TRUE, YOU MUST SPAWN THAT AGENT |
808
- | |
809
- | HAS_API = TRUE -> MUST spawn qe-contract-validator |
810
- | HAS_REFACTORING = TRUE -> MUST spawn qe-impact-analyzer |
811
- | HAS_DEPENDENCIES = TRUE -> MUST spawn qe-dependency-mapper |
812
- | HAS_MIDDLEWARE = TRUE -> MUST spawn qe-middleware-validator |
813
- | HAS_SAP_INTEGRATION = TRUE -> MUST spawn qe-odata-contract-tester|
814
- | HAS_AUTHORIZATION = TRUE -> MUST spawn qe-sod-analyzer |
815
- | |
816
- | Skipping a flagged agent is a FAILURE of this skill. |
817
- +-------------------------------------------------------------+
818
- ```
819
-
820
- ### Conditional Domain Mapping
821
-
822
- | Flag | Agent | Domain | MCP Tool |
823
- |------|-------|--------|----------|
824
- | HAS_API | qe-contract-validator | contract-testing | `contract_test` |
825
- | HAS_REFACTORING | qe-impact-analyzer | code-intelligence | `coverage_analyze_sublinear` |
826
- | HAS_DEPENDENCIES | qe-dependency-mapper | code-intelligence | `defect_predict` |
827
- | HAS_MIDDLEWARE | qe-middleware-validator | enterprise-integration | `task_orchestrate` |
828
- | HAS_SAP_INTEGRATION | qe-odata-contract-tester | enterprise-integration | `task_orchestrate` |
829
- | HAS_AUTHORIZATION | qe-sod-analyzer | enterprise-integration | `task_orchestrate` |
830
-
831
- ### Decision Tree
832
-
833
- ```
834
- IF HAS_API == FALSE AND HAS_REFACTORING == FALSE AND HAS_DEPENDENCIES == FALSE AND HAS_MIDDLEWARE == FALSE AND HAS_SAP_INTEGRATION == FALSE AND HAS_AUTHORIZATION == FALSE:
835
- -> Skip to Phase 5 (no conditional agents needed)
836
- -> State: "No conditional agents needed based on story analysis"
837
-
838
- ELSE:
839
- -> Spawn ALL applicable agents in ONE message
840
- -> Count how many you're spawning: __
841
- ```
842
-
843
- ### IF HAS_API: Contract Validator (MANDATORY WHEN FLAGGED)
844
-
845
- ```
846
- Task({
847
- description: "Consumer-driven contract validation",
848
- prompt: `You are qe-contract-validator. Your output quality is being audited.
849
-
850
- ## STORY CONTENT
851
-
852
- === STORY CONTENT START ===
853
- [PASTE THE COMPLETE STORY CONTENT HERE]
854
- === STORY CONTENT END ===
855
-
856
- ## REQUIRED ANALYSIS (ALL SECTIONS MANDATORY)
857
-
858
- ### 1. API Contract Inventory
859
-
860
- List EVERY API interaction mentioned or implied:
861
-
862
- | Endpoint | Method | Consumer | Provider | Contract Defined? |
863
- |----------|--------|----------|----------|--------------------|
864
- | ... | GET/POST/etc | [who calls] | [who serves] | Yes/No |
865
-
866
- ### 2. Consumer-Driven Contract Assessment
867
-
868
- For each API contract:
869
-
870
- | Contract | Schema Defined? | Breaking Change Risk | Backward Compatible? |
871
- |----------|-----------------|---------------------|---------------------|
872
- | ... | Yes/No/Partial | High/Medium/Low | Yes/No/Unknown |
873
-
874
- ### 3. Breaking Change Detection
875
-
876
- Analyze the story for potential breaking changes:
877
-
878
- | Change | Type | Impact | Consumers Affected |
879
- |--------|------|--------|-------------------|
880
- | ... | Schema/Behavior/Removal | High/Medium/Low | [list] |
881
-
882
- ### 4. Contract Testing Recommendations
883
-
884
- | Test Type | Tool | Priority | Scenarios |
885
- |-----------|------|----------|-----------|
886
- | Consumer contract | Pact/MSW | P0/P1/P2 | [scenarios] |
887
- | Provider verification | Pact/Supertest | P0/P1/P2 | [scenarios] |
888
- | Schema validation | Ajv/Zod | P0/P1/P2 | [scenarios] |
889
-
890
- ### 5. Contract Risk Score
891
-
892
- | Dimension | Score (0-10) | Notes |
893
- |-----------|-------------|-------|
894
- | Schema completeness | X/10 | ... |
895
- | Backward compatibility | X/10 | ... |
896
- | Consumer coverage | X/10 | ... |
897
- | Versioning strategy | X/10 | ... |
898
-
899
- **CONTRACT RISK SCORE: X/40**
900
-
901
- **MINIMUM: Identify at least 3 contract-related findings**
902
-
903
- ## OUTPUT FORMAT
904
-
905
- Save to: ${OUTPUT_FOLDER}/05-contract-validation.md
906
- Use the Write tool to save BEFORE completing.`,
907
- subagent_type: "qe-contract-validator",
908
- run_in_background: true
909
- })
910
- ```
911
-
912
- ### IF HAS_REFACTORING: Impact Analyzer (MANDATORY WHEN FLAGGED)
913
-
914
- ```
915
- Task({
916
- description: "Refactoring blast radius and impact analysis",
917
- prompt: `You are qe-impact-analyzer. Your output quality is being audited.
918
-
919
- ## STORY CONTENT
920
-
921
- === STORY CONTENT START ===
922
- [PASTE THE COMPLETE STORY CONTENT HERE]
923
- === STORY CONTENT END ===
924
-
925
- ## REQUIRED ANALYSIS (ALL SECTIONS MANDATORY)
926
-
927
- ### 1. Blast Radius Assessment
928
-
929
- Identify all components affected by the refactoring:
930
-
931
- | Component | Direct/Indirect | Change Type | Risk Level |
932
- |-----------|----------------|-------------|------------|
933
- | ... | Direct | Modified/Renamed/Moved/Deleted | High/Medium/Low |
934
-
935
- ### 2. Affected Test Inventory
936
-
937
- | Test File/Suite | Status | Action Required |
938
- |-----------------|--------|-----------------|
939
- | ... | Will Break / May Break / Safe | Update / Rewrite / None |
940
-
941
- ### 3. Dependency Chain Analysis
942
-
943
- Map the dependency chain for affected components:
944
-
945
- ```
946
- [Changed Component]
947
- +-- [Direct Dependent 1]
948
- | +-- [Transitive Dependent 1a]
949
- | +-- [Transitive Dependent 1b]
950
- +-- [Direct Dependent 2]
951
- +-- [Transitive Dependent 2a]
952
- ```
953
-
954
- ### 4. Regression Risk Matrix
955
-
956
- | Area | Change Probability | Test Coverage | Regression Risk |
957
- |------|-------------------|---------------|-----------------|
958
- | ... | High/Medium/Low | Good/Partial/None | Critical/High/Medium/Low |
959
-
960
- ### 5. Migration Strategy
961
-
962
- | Phase | Action | Rollback Plan | Verification |
963
- |-------|--------|---------------|-------------|
964
- | 1 | ... | ... | [how to verify] |
965
- | 2 | ... | ... | [how to verify] |
966
-
967
- ### 6. Impact Score
968
-
969
- | Dimension | Score (0-10) | Notes |
970
- |-----------|-------------|-------|
971
- | Blast radius | X/10 | Number of affected components |
972
- | Test impact | X/10 | Tests requiring updates |
973
- | Rollback complexity | X/10 | Difficulty of rollback |
974
- | Data migration risk | X/10 | Data transformation needed |
975
-
976
- **IMPACT SCORE: X/40**
977
-
978
- **MINIMUM: Map at least 5 affected components or explain why fewer exist**
979
-
980
- ## OUTPUT FORMAT
981
-
982
- Save to: ${OUTPUT_FOLDER}/06-impact-analysis.md
983
- Use the Write tool to save BEFORE completing.`,
984
- subagent_type: "qe-impact-analyzer",
985
- run_in_background: true
986
- })
987
- ```
988
-
989
- ### IF HAS_DEPENDENCIES: Dependency Mapper (MANDATORY WHEN FLAGGED)
990
-
991
- ```
992
- Task({
993
- description: "Dependency coupling analysis and circular detection",
994
- prompt: `You are qe-dependency-mapper. Your output quality is being audited.
995
-
996
- ## STORY CONTENT
997
-
998
- === STORY CONTENT START ===
999
- [PASTE THE COMPLETE STORY CONTENT HERE]
1000
- === STORY CONTENT END ===
1001
-
1002
- ## REQUIRED ANALYSIS (ALL SECTIONS MANDATORY)
1003
-
1004
- ### 1. Dependency Inventory
1005
-
1006
- List ALL dependencies (direct and transitive) mentioned or implied:
1007
-
1008
- | Dependency | Type | Version | Status | Risk |
1009
- |------------|------|---------|--------|------|
1010
- | ... | Direct/Transitive | X.Y.Z | Current/Outdated/Deprecated | High/Medium/Low |
1011
-
1012
- ### 2. Coupling Metrics
1013
-
1014
- Calculate Robert C. Martin's package coupling metrics:
1015
-
1016
- | Module | Ca (Afferent) | Ce (Efferent) | I (Instability) | Category |
1017
- |--------|---------------|---------------|-----------------|----------|
1018
- | ... | [incoming deps] | [outgoing deps] | Ce/(Ca+Ce) | Stable/Flexible/Unstable |
1019
-
1020
- Where:
1021
- - Ca = number of classes outside that depend on this
1022
- - Ce = number of classes inside that depend on outside
1023
- - I = Ce / (Ca + Ce), range [0,1]: 0=maximally stable, 1=maximally unstable
1024
-
1025
- ### 3. Circular Dependency Detection
1026
-
1027
- | Cycle | Components Involved | Severity | Resolution |
1028
- |-------|--------------------|----------|------------|
1029
- | Cycle 1 | A -> B -> C -> A | Critical/Warning | [how to break] |
1030
-
1031
- If no cycles: "No circular dependencies detected"
1032
-
1033
- ### 4. Cross-Team Dependencies
1034
-
1035
- | Dependency | Owning Team | Communication Channel | SLA | Risk |
1036
- |------------|-------------|----------------------|-----|------|
1037
- | ... | [team name] | [Slack/Jira/etc] | [response time] | High/Medium/Low |
1038
-
1039
- ### 5. Dependency Health Dashboard
1040
-
1041
- | Health Indicator | Status | Details |
1042
- |-----------------|--------|---------|
1043
- | Outdated dependencies | X of Y | [list] |
1044
- | Known vulnerabilities | X CVEs | [list] |
1045
- | License compliance | Pass/Fail | [issues] |
1046
- | Bundle size impact | +X KB | [breakdown] |
1047
-
1048
- ### 6. Coupling Score
1049
-
1050
- | Dimension | Score (0-10) | Notes |
1051
- |-----------|-------------|-------|
1052
- | Afferent coupling | X/10 | Fan-in complexity |
1053
- | Efferent coupling | X/10 | Fan-out complexity |
1054
- | Circular dependencies | X/10 | Cycle severity |
1055
- | Cross-team coupling | X/10 | External team risk |
1056
-
1057
- **COUPLING SCORE: X/40**
1058
-
1059
- **MINIMUM: Map at least 5 dependencies or explain why fewer exist**
1060
-
1061
- ## OUTPUT FORMAT
1062
-
1063
- Save to: ${OUTPUT_FOLDER}/07-dependency-map.md
1064
- Use the Write tool to save BEFORE completing.`,
1065
- subagent_type: "qe-dependency-mapper",
1066
- run_in_background: true
1067
- })
1068
- ```
1069
-
1070
- ### IF HAS_MIDDLEWARE: Middleware Validator (MANDATORY WHEN FLAGGED)
1071
-
1072
- ```
1073
- Task({
1074
- description: "Middleware routing, transformation, and ESB flow validation",
1075
- prompt: `You are qe-middleware-validator. Your output quality is being audited.
1076
-
1077
- ## STORY CONTENT
1078
-
1079
- === STORY CONTENT START ===
1080
- [PASTE THE COMPLETE STORY CONTENT HERE]
1081
- === STORY CONTENT END ===
1082
-
1083
- ## REQUIRED ANALYSIS (ALL SECTIONS MANDATORY)
1084
-
1085
- ### 1. Middleware Topology Inventory
1086
-
1087
- Map ALL middleware components mentioned or implied:
1088
-
1089
- | Component | Type | Protocol | Direction | SLA |
1090
- |-----------|------|----------|-----------|-----|
1091
- | ... | ESB/MQ/Gateway/Broker | AMQP/MQTT/HTTP/gRPC | Inbound/Outbound/Bidirectional | [latency/throughput] |
1092
-
1093
- ### 2. Message Flow Analysis
1094
-
1095
- For each message flow:
1096
-
1097
- | Flow | Source | Middleware | Target | Transform? | Error Handling |
1098
- |------|--------|-----------|--------|------------|----------------|
1099
- | ... | [producer] | [broker/ESB] | [consumer] | Yes/No | DLQ/Retry/Drop |
1100
-
1101
- ### 3. Transformation Validation
1102
-
1103
- | Transform | Input Format | Output Format | Validation Rules | Risk |
1104
- |-----------|-------------|---------------|-----------------|------|
1105
- | ... | JSON/XML/CSV | JSON/XML/CSV | [schema rules] | High/Medium/Low |
1106
-
1107
- ### 4. Middleware Testing Recommendations
1108
-
1109
- | Test Type | Tool | Priority | Scenarios |
1110
- |-----------|------|----------|-----------|
1111
- | Message routing | WireMock/Testcontainers | P0/P1/P2 | [scenarios] |
1112
- | Transform accuracy | Schema validators | P0/P1/P2 | [scenarios] |
1113
- | Dead letter queue | DLQ monitors | P0/P1/P2 | [scenarios] |
1114
- | Throughput | Load generators | P0/P1/P2 | [scenarios] |
1115
-
1116
- ### 5. Middleware Risk Score
1117
-
1118
- | Dimension | Score (0-10) | Notes |
1119
- |-----------|-------------|-------|
1120
- | Routing complexity | X/10 | ... |
1121
- | Transform accuracy | X/10 | ... |
1122
- | Error handling coverage | X/10 | ... |
1123
- | Throughput risk | X/10 | ... |
1124
-
1125
- **MIDDLEWARE RISK SCORE: X/40**
1126
-
1127
- **MINIMUM: Identify at least 3 middleware-related findings**
1128
-
1129
- ## OUTPUT FORMAT
1130
-
1131
- Save to: ${"$"}{OUTPUT_FOLDER}/10-middleware-validation.md
1132
- Use the Write tool to save BEFORE completing.`,
1133
- subagent_type: "qe-middleware-validator",
1134
- run_in_background: true
1135
- })
1136
- ```
1137
-
1138
- ### IF HAS_SAP_INTEGRATION: OData Contract Tester (MANDATORY WHEN FLAGGED)
1139
-
1140
- ```
1141
- Task({
1142
- description: "OData contract and SAP service validation",
1143
- prompt: `You are qe-odata-contract-tester. Your output quality is being audited.
1144
-
1145
- ## STORY CONTENT
1146
-
1147
- === STORY CONTENT START ===
1148
- [PASTE THE COMPLETE STORY CONTENT HERE]
1149
- === STORY CONTENT END ===
1150
-
1151
- ## REQUIRED ANALYSIS (ALL SECTIONS MANDATORY)
1152
-
1153
- ### 1. SAP Service Inventory
1154
-
1155
- Map ALL SAP services and OData endpoints mentioned or implied:
1156
-
1157
- | Service | Type | Protocol | Entity Set | Operations |
1158
- |---------|------|----------|-----------|------------|
1159
- | ... | OData V2/V4/RFC/BAPI | HTTP/RFC | [entity] | CRUD/Custom |
1160
-
1161
- ### 2. OData Contract Assessment
1162
-
1163
- For each OData service:
1164
-
1165
- | Endpoint | $metadata Available? | Schema Validated? | Breaking Change Risk | Pagination |
1166
- |----------|---------------------|------------------|---------------------|------------|
1167
- | ... | Yes/No | Yes/No/Partial | High/Medium/Low | Server/Client/None |
1168
-
1169
- ### 3. SAP Integration Points
1170
-
1171
- | Integration | Source System | Target System | IDoc Type | Direction |
1172
- |-------------|-------------|---------------|-----------|-----------|
1173
- | ... | ECC/S4/EWM | [target] | [type] | Inbound/Outbound |
1174
-
1175
- ### 4. Contract Testing Recommendations
1176
-
1177
- | Test Type | Tool | Priority | Scenarios |
1178
- |-----------|------|----------|-----------|
1179
- | OData $metadata | OData validator | P0/P1/P2 | [scenarios] |
1180
- | Entity CRUD | SAP Gateway test | P0/P1/P2 | [scenarios] |
1181
- | Deep entity | Integration suite | P0/P1/P2 | [scenarios] |
1182
- | Error responses | Negative testing | P0/P1/P2 | [scenarios] |
1183
-
1184
- ### 5. SAP Integration Risk Score
1185
-
1186
- | Dimension | Score (0-10) | Notes |
1187
- |-----------|-------------|-------|
1188
- | Contract completeness | X/10 | ... |
1189
- | Schema stability | X/10 | ... |
1190
- | Error handling | X/10 | ... |
1191
- | Authorization coverage | X/10 | ... |
1192
-
1193
- **SAP INTEGRATION RISK SCORE: X/40**
1194
-
1195
- **MINIMUM: Identify at least 3 SAP integration findings**
1196
-
1197
- ## OUTPUT FORMAT
1198
-
1199
- Save to: ${"$"}{OUTPUT_FOLDER}/11-odata-contract-validation.md
1200
- Use the Write tool to save BEFORE completing.`,
1201
- subagent_type: "qe-odata-contract-tester",
1202
- run_in_background: true
1203
- })
1204
- ```
1205
-
1206
- ### IF HAS_AUTHORIZATION: SoD Analyzer (MANDATORY WHEN FLAGGED)
1207
-
1208
- ```
1209
- Task({
1210
- description: "Segregation of duties and authorization conflict analysis",
1211
- prompt: `You are qe-sod-analyzer. Your output quality is being audited.
1212
-
1213
- ## STORY CONTENT
1214
-
1215
- === STORY CONTENT START ===
1216
- [PASTE THE COMPLETE STORY CONTENT HERE]
1217
- === STORY CONTENT END ===
1218
-
1219
- ## REQUIRED ANALYSIS (ALL SECTIONS MANDATORY)
1220
-
1221
- ### 1. Authorization Object Inventory
1222
-
1223
- Map ALL authorization objects, roles, and T-codes mentioned or implied:
1224
-
1225
- | Auth Object | Field | Values | Role Assignment | Risk Level |
1226
- |-------------|-------|--------|----------------|------------|
1227
- | ... | [field] | [allowed values] | [role] | Critical/High/Medium/Low |
1228
-
1229
- ### 2. Segregation of Duties Matrix
1230
-
1231
- | Function A | Function B | Conflict Type | Risk | Mitigation |
1232
- |-----------|-----------|---------------|------|------------|
1233
- | [create PO] | [approve PO] | SoD violation | Critical | [control] |
1234
- | ... | ... | ... | ... | ... |
1235
-
1236
- ### 3. Role Conflict Detection
1237
-
1238
- | Role | Conflicting Role | Shared Users | Violation Type | GRC Status |
1239
- |------|-----------------|-------------|----------------|------------|
1240
- | ... | ... | [count] | SoD/Excessive/Toxic | Detected/Mitigated/Open |
1241
-
1242
- ### 4. Authorization Testing Recommendations
1243
-
1244
- | Test Type | Tool | Priority | Scenarios |
1245
- |-----------|------|----------|-----------|
1246
- | SoD simulation | GRC Access Risk | P0/P1/P2 | [scenarios] |
1247
- | Role testing | SU53/SUIM | P0/P1/P2 | [scenarios] |
1248
- | Negative auth | Auth trace | P0/P1/P2 | [scenarios] |
1249
- | Privilege escalation | Pentest suite | P0/P1/P2 | [scenarios] |
1250
-
1251
- ### 5. Authorization Risk Score
1252
-
1253
- | Dimension | Score (0-10) | Notes |
1254
- |-----------|-------------|-------|
1255
- | SoD compliance | X/10 | ... |
1256
- | Role design quality | X/10 | ... |
1257
- | Toxic combination risk | X/10 | ... |
1258
- | Audit trail coverage | X/10 | ... |
1259
-
1260
- **AUTHORIZATION RISK SCORE: X/40**
1261
-
1262
- **MINIMUM: Identify at least 3 authorization findings**
1263
-
1264
- ## OUTPUT FORMAT
1265
-
1266
- Save to: ${"$"}{OUTPUT_FOLDER}/12-sod-analysis.md
1267
- Use the Write tool to save BEFORE completing.`,
1268
- subagent_type: "qe-sod-analyzer",
1269
- run_in_background: true
1270
- })
1271
- ```
1272
-
1273
- ### Alternative: MCP Tools for Conditional Agents
1274
-
1275
- ```javascript
1276
- // IF HAS_API - Enable contract-testing domain
1277
- if (HAS_API) {
1278
- mcp__agentic-qe__task_submit({
1279
- type: "contract-validation",
1280
- priority: "p0",
1281
- payload: {
1282
- storyContent: storyContent,
1283
- framework: "consumer-driven",
1284
- detectBreaking: true
1285
- }
1286
- })
1287
- }
1288
-
1289
- // IF HAS_REFACTORING - Enable code-intelligence domain
1290
- if (HAS_REFACTORING) {
1291
- mcp__agentic-qe__coverage_analyze_sublinear({
1292
- target: "src/",
1293
- detectGaps: true,
1294
- blastRadius: true
1295
- })
1296
- }
1297
-
1298
- // IF HAS_DEPENDENCIES - Enable code-intelligence domain
1299
- if (HAS_DEPENDENCIES) {
1300
- mcp__agentic-qe__defect_predict({
1301
- target: "src/",
1302
- analyzeCoupling: true,
1303
- detectCircular: true
1304
- })
1305
- }
1306
-
1307
- // IF HAS_MIDDLEWARE - Enable enterprise-integration domain
1308
- if (HAS_MIDDLEWARE) {
1309
- mcp__agentic_qe__task_orchestrate({
1310
- task: "middleware-routing-validation",
1311
- strategy: "parallel",
1312
- payload: {
1313
- storyContent: storyContent,
1314
- validateRouting: true,
1315
- validateTransforms: true
1316
- }
1317
- })
1318
- }
1319
-
1320
- // IF HAS_SAP_INTEGRATION - Enable enterprise-integration domain
1321
- if (HAS_SAP_INTEGRATION) {
1322
- mcp__agentic_qe__task_orchestrate({
1323
- task: "odata-contract-validation",
1324
- strategy: "parallel",
1325
- payload: {
1326
- storyContent: storyContent,
1327
- validateMetadata: true,
1328
- validateSchema: true
1329
- }
1330
- })
1331
- }
1332
-
1333
- // IF HAS_AUTHORIZATION - Enable enterprise-integration domain
1334
- if (HAS_AUTHORIZATION) {
1335
- mcp__agentic_qe__task_orchestrate({
1336
- task: "sod-authorization-analysis",
1337
- strategy: "parallel",
1338
- payload: {
1339
- storyContent: storyContent,
1340
- detectSoD: true,
1341
- detectToxicCombos: true
1342
- }
1343
- })
1344
- }
1345
- ```
1346
-
1347
- ### Alternative: CLI for Conditional Agents
1348
-
1349
- ```bash
1350
- # IF HAS_API
1351
- if [ "$HAS_API" = "TRUE" ]; then
1352
- npx @claude-flow/cli@latest agent spawn \
1353
- --type qe-contract-validator \
1354
- --task "Consumer-driven contract validation" &
1355
- fi
1356
-
1357
- # IF HAS_REFACTORING
1358
- if [ "$HAS_REFACTORING" = "TRUE" ]; then
1359
- npx @claude-flow/cli@latest agent spawn \
1360
- --type qe-impact-analyzer \
1361
- --task "Refactoring blast radius analysis" &
1362
- fi
1363
-
1364
- # IF HAS_DEPENDENCIES
1365
- if [ "$HAS_DEPENDENCIES" = "TRUE" ]; then
1366
- npx @claude-flow/cli@latest agent spawn \
1367
- --type qe-dependency-mapper \
1368
- --task "Coupling metrics and circular detection" &
1369
- fi
1370
-
1371
- # IF HAS_MIDDLEWARE
1372
- if [ "$HAS_MIDDLEWARE" = "TRUE" ]; then
1373
- npx @claude-flow/cli@latest agent spawn \
1374
- --type qe-middleware-validator \
1375
- --task "Middleware routing and ESB flow validation" &
1376
- fi
1377
-
1378
- # IF HAS_SAP_INTEGRATION
1379
- if [ "$HAS_SAP_INTEGRATION" = "TRUE" ]; then
1380
- npx @claude-flow/cli@latest agent spawn \
1381
- --type qe-odata-contract-tester \
1382
- --task "OData contract and SAP service validation" &
1383
- fi
1384
-
1385
- # IF HAS_AUTHORIZATION
1386
- if [ "$HAS_AUTHORIZATION" = "TRUE" ]; then
1387
- npx @claude-flow/cli@latest agent spawn \
1388
- --type qe-sod-analyzer \
1389
- --task "Segregation of duties analysis" &
1390
- fi
1391
-
1392
- # Wait for conditional agents
1393
- wait
1394
- ```
1395
-
1396
- ### Agent Count Validation
1397
-
1398
- **Before proceeding, verify agent count:**
1399
-
1400
- ```
1401
- +-------------------------------------------------------------+
1402
- | AGENT COUNT VALIDATION |
1403
- +-------------------------------------------------------------+
1404
- | |
1405
- | CORE AGENTS (ALWAYS 3): |
1406
- | [ ] qe-product-factors-assessor - SPAWNED? [Y/N] |
1407
- | [ ] qe-bdd-generator - SPAWNED? [Y/N] |
1408
- | [ ] qe-requirements-validator - SPAWNED? [Y/N] |
1409
- | |
1410
- | CONDITIONAL AGENTS (based on flags): |
1411
- | [ ] qe-contract-validator - SPAWNED? [Y/N] (HAS_API) |
1412
- | [ ] qe-impact-analyzer - SPAWNED? [Y/N] (HAS_REFACTORING)|
1413
- | [ ] qe-dependency-mapper - SPAWNED? [Y/N] (HAS_DEPS) |
1414
- | [ ] qe-middleware-validator - SPAWNED? [Y/N] (HAS_MIDDLEWARE) |
1415
- | [ ] qe-odata-contract-tester - SPAWNED? [Y/N] (HAS_SAP_INTEG) |
1416
- | [ ] qe-sod-analyzer - SPAWNED? [Y/N] (HAS_AUTHORIZATION) |
1417
- | |
1418
- | VALIDATION: |
1419
- | Expected agents: [3 + count of TRUE flags] |
1420
- | Actual spawned: [count] |
1421
- | Status: [PASS/FAIL] |
1422
- | |
1423
- | If ACTUAL < EXPECTED, you have FAILED. Spawn missing |
1424
- | agents before proceeding. |
1425
- | |
1426
- +-------------------------------------------------------------+
1427
- ```
1428
-
1429
- **DO NOT proceed if validation FAILS.**
1430
-
1431
- ### Post-Spawn Confirmation (If Applicable)
1432
-
1433
- ```
1434
- I've launched [N] conditional agent(s) in parallel:
1435
-
1436
- [IF HAS_API] qe-contract-validator [Domain: contract-testing]
1437
- - Consumer-driven contracts, breaking changes
1438
- [IF HAS_REFACTORING] qe-impact-analyzer [Domain: code-intelligence]
1439
- - Blast radius, affected tests, regression risk
1440
- [IF HAS_DEPENDENCIES] qe-dependency-mapper [Domain: code-intelligence]
1441
- - Coupling metrics Ca/Ce/I, circular detection
1442
- [IF HAS_MIDDLEWARE] qe-middleware-validator [Domain: enterprise-integration]
1443
- - Middleware routing, transformation, ESB flow validation
1444
- [IF HAS_SAP_INTEGRATION] qe-odata-contract-tester [Domain: enterprise-integration]
1445
- - OData contract, SAP service, $metadata validation
1446
- [IF HAS_AUTHORIZATION] qe-sod-analyzer [Domain: enterprise-integration]
1447
- - Segregation of duties, role conflict, authorization analysis
1448
-
1449
- WAITING for conditional agents to complete...
1450
- ```
1451
-
1452
- ---
1453
-
1454
- ## PHASE 5: Synthesize Results & Determine Recommendation
1455
-
1456
- ### ENFORCEMENT: EXACT DECISION LOGIC
1457
-
1458
- **You MUST apply this logic EXACTLY. No interpretation.**
1459
-
1460
- ```
1461
- STEP 1: Check NOT-READY conditions (ANY triggers NOT-READY)
1462
- -----------------------------------------------------------
1463
- IF sfdipotCoverage < 5 -> NOT-READY ("Insufficient factor coverage")
1464
- IF bddScenarioCount < 3 -> NOT-READY ("Too few BDD scenarios")
1465
- IF investCompleteness < 50 -> NOT-READY ("Requirements incomplete")
1466
- IF criticalGaps > 3 -> NOT-READY ("Too many critical gaps")
1467
-
1468
- STEP 2: Check READY conditions (ALL required for READY)
1469
- -----------------------------------------------------------
1470
- IF sfdipotCoverage >= 7
1471
- AND bddScenarioCount >= 10
1472
- AND investCompleteness >= 90
1473
- AND criticalGaps == 0 -> READY
1474
-
1475
- STEP 3: Default
1476
- -----------------------------------------------------------
1477
- ELSE -> CONDITIONAL
1478
- ```
1479
-
1480
- ### Decision Recording
1481
-
1482
- ```
1483
- METRICS:
1484
- - sfdipotCoverage = __/7
1485
- - bddScenarioCount = __
1486
- - investCompleteness = __%
1487
- - criticalGaps = __
1488
-
1489
- NOT-READY CHECK:
1490
- - sfdipotCoverage < 5? __ (YES/NO)
1491
- - bddScenarioCount < 3? __ (YES/NO)
1492
- - investCompleteness < 50? __ (YES/NO)
1493
- - criticalGaps > 3? __ (YES/NO)
1494
-
1495
- READY CHECK (only if no NOT-READY triggered):
1496
- - sfdipotCoverage >= 7? __ (YES/NO)
1497
- - bddScenarioCount >= 10? __ (YES/NO)
1498
- - investCompleteness >= 90? __ (YES/NO)
1499
- - criticalGaps == 0? __ (YES/NO)
1500
-
1501
- FINAL RECOMMENDATION: [READY / CONDITIONAL / NOT-READY]
1502
- REASON: ___
1503
- ```
1504
-
1505
- ### Conditional Recommendations
1506
-
1507
- If recommendation is CONDITIONAL, provide specific blockers:
1508
-
1509
- | Blocker | Current Value | Required Value | Owner | Action |
1510
- |---------|--------------|----------------|-------|--------|
1511
- | ... | ... | ... | [who] | [what to do] |
1512
-
1513
- If recommendation is NOT-READY, provide mandatory remediation:
1514
-
1515
- | Remediation | Priority | Effort | Deadline |
1516
- |-------------|----------|--------|----------|
1517
- | ... | P0 | [hours/days] | [before next refinement] |
1518
-
1519
- ---
1520
-
1521
- ## PHASE 6: Generate Refinement Report
1522
-
1523
- ### ENFORCEMENT: COMPLETE REPORT STRUCTURE
1524
-
1525
- **ALL sections below are MANDATORY. No abbreviations.**
1526
-
1527
- ```markdown
1528
- # QCSD Refinement Report: [Story Name]
1529
-
1530
- **Generated**: [Date/Time]
1531
- **Recommendation**: [READY / CONDITIONAL / NOT-READY]
1532
- **Agents Executed**: [List all agents that ran]
1533
- **Parallel Batches**: [2 or 3 depending on conditional agents]
1534
-
1535
- ---
1536
-
1537
- ## Executive Summary
1538
-
1539
- | Metric | Value | Threshold | Status |
1540
- |--------|-------|-----------|--------|
1541
- | SFDIPOT Coverage | X/7 | >=7 | PASS/WARN/FAIL |
1542
- | BDD Scenarios | X | >=10 | PASS/WARN/FAIL |
1543
- | INVEST Completeness | X% | >=90% | PASS/WARN/FAIL |
1544
- | Critical Gaps | X | 0 | PASS/WARN/FAIL |
1545
-
1546
- **Recommendation Rationale**: [1-2 sentences explaining why READY/CONDITIONAL/NOT-READY]
1547
-
1548
- ---
1549
-
1550
- ## SFDIPOT Product Factors Analysis
1551
-
1552
- [EMBED or LINK the full report from qe-product-factors-assessor]
1553
-
1554
- ### Factor Priority Summary
1555
-
1556
- | Factor | Priority | Key Finding | Test Focus |
1557
- |--------|----------|-------------|------------|
1558
- | Structure | P0/P1/P2/P3 | [top finding] | [areas] |
1559
- | Function | P0/P1/P2/P3 | [top finding] | [areas] |
1560
- | Data | P0/P1/P2/P3 | [top finding] | [areas] |
1561
- | Interfaces | P0/P1/P2/P3 | [top finding] | [areas] |
1562
- | Platform | P0/P1/P2/P3 | [top finding] | [areas] |
1563
- | Operations | P0/P1/P2/P3 | [top finding] | [areas] |
1564
- | Time | P0/P1/P2/P3 | [top finding] | [areas] |
1565
-
1566
- ### Cross-Cutting Concerns
1567
- [List any concerns that span multiple factors]
1568
-
1569
- ---
1570
-
1571
- ## BDD Scenarios
1572
-
1573
- [EMBED the full Gherkin from qe-bdd-generator]
1574
-
1575
- ### Scenario Coverage Summary
1576
-
1577
- | Category | Count | AC Coverage |
1578
- |----------|-------|-------------|
1579
- | Happy Path | X | [ACs covered] |
1580
- | Error Path | X | [ACs covered] |
1581
- | Boundary | X | [ACs covered] |
1582
- | Security | X | [ACs covered] |
1583
- | **Total** | **X** | **X%** |
1584
-
1585
- ---
1586
-
1587
- ## Requirements Validation
1588
-
1589
- ### INVEST Score: X/100
1590
-
1591
- | Criterion | Score | Status |
1592
- |-----------|-------|--------|
1593
- | Independent | X/100 | PASS/WARN/FAIL |
1594
- | Negotiable | X/100 | PASS/WARN/FAIL |
1595
- | Valuable | X/100 | PASS/WARN/FAIL |
1596
- | Estimable | X/100 | PASS/WARN/FAIL |
1597
- | Small | X/100 | PASS/WARN/FAIL |
1598
- | Testable | X/100 | PASS/WARN/FAIL |
1599
-
1600
- ### AC Assessment
1601
-
1602
- | AC | Testable? | Issues | Rewrite Needed? |
1603
- |----|-----------|--------|-----------------|
1604
- [All ACs evaluated]
1605
-
1606
- ### Gaps Identified
1607
- 1. [Gap 1]
1608
- 2. [Gap 2]
1609
- [All gaps from qe-requirements-validator]
1610
-
1611
- ### Definition of Ready: X/10 passing
1612
-
1613
- ---
1614
-
1615
- ## Conditional Analysis
1616
-
1617
- [INCLUDE ONLY IF APPLICABLE - based on which conditional agents ran]
1618
-
1619
- ### Contract Validation (IF HAS_API)
1620
- [Full output from qe-contract-validator]
1621
-
1622
- ### Impact Analysis (IF HAS_REFACTORING)
1623
- [Full output from qe-impact-analyzer]
1624
-
1625
- ### Dependency Map (IF HAS_DEPENDENCIES)
1626
- [Full output from qe-dependency-mapper]
1627
-
1628
- ---
1629
-
1630
- ## Recommended Actions
1631
-
1632
- ### Before Sprint Commitment
1633
- - [ ] [Action based on findings]
1634
- - [ ] [Action based on findings]
1635
-
1636
- ### Sprint Planning Notes
1637
- - [ ] [Testing approach recommendation]
1638
- - [ ] [Dependency coordination needed]
1639
-
1640
- ### During Sprint
1641
- - [ ] [Action based on findings]
1642
-
1643
- ---
1644
-
1645
- ## Appendix: Agent Outputs
1646
-
1647
- [Link to or embed full outputs from each agent]
1648
-
1649
- ---
1650
-
1651
- *Generated by QCSD Refinement Swarm v1.0*
1652
- *Execution Model: Task Tool Parallel Swarm*
1653
- ```
1654
-
1655
- Write the executive summary report to:
1656
- `${OUTPUT_FOLDER}/01-executive-summary.md`
1657
-
1658
- ### Report Validation Checklist
1659
-
1660
- Before presenting report:
1661
-
1662
- ```
1663
- +-- Executive Summary table is complete with all 4 metrics
1664
- +-- Recommendation matches decision logic output
1665
- +-- SFDIPOT section includes all 7 factor priorities
1666
- +-- BDD section includes scenario coverage summary
1667
- +-- INVEST score shows all 6 criteria
1668
- +-- All gaps are listed
1669
- +-- Conditional sections included for all spawned agents
1670
- +-- Recommended actions are specific (not generic)
1671
- +-- Report saved to output folder
1672
- ```
1673
-
1674
- **DO NOT present an incomplete report.**
1675
-
1676
- ---
1677
-
1678
- ## PHASE 7: Store Learnings & Persist State
1679
-
1680
- ### ENFORCEMENT: ALWAYS RUN THIS PHASE
1681
-
1682
- ```
1683
- +-------------------------------------------------------------+
1684
- | LEARNING PERSISTENCE MUST ALWAYS EXECUTE |
1685
- | |
1686
- | This is NOT optional. It runs on EVERY refinement. |
1687
- | It stores findings for cross-phase feedback loops, |
1688
- | historical decision analysis, and pattern learning. |
1689
- | |
1690
- | DO NOT skip this phase for any reason. |
1691
- | DO NOT treat this as "nice to have". |
1692
- | Enforcement Rule E9 applies. |
1693
- +-------------------------------------------------------------+
1694
- ```
1695
-
1696
- ### Purpose
1697
-
1698
- Store refinement findings for:
1699
- - Cross-phase feedback loops (Development -> next Refinement cycle)
1700
- - Historical analysis of READY/CONDITIONAL/NOT-READY decisions
1701
- - SFDIPOT pattern learning across stories
1702
- - BDD scenario quality improvement over time
1703
-
1704
- ### Auto-Execution Steps (ALL THREE are MANDATORY)
1705
-
1706
- **Step 1: Store refinement findings to memory**
1707
-
1708
- You MUST execute this MCP call with actual values from the refinement analysis:
1709
-
1710
- ```javascript
1711
- mcp__agentic-qe__memory_store({
1712
- key: `qcsd-refinement-${storyId}-${Date.now()}`,
1713
- namespace: "qcsd-refinement",
1714
- value: {
1715
- storyId: storyId,
1716
- storyName: storyName,
1717
- recommendation: recommendation, // READY, CONDITIONAL, NOT-READY
1718
- metrics: {
1719
- sfdipotCoverage: sfdipotCoverage,
1720
- bddScenarioCount: bddScenarioCount,
1721
- investCompleteness: investCompleteness,
1722
- criticalGaps: criticalGaps
1723
- },
1724
- sfdipotPriorities: {
1725
- structure: "P0/P1/P2/P3",
1726
- function: "P0/P1/P2/P3",
1727
- data: "P0/P1/P2/P3",
1728
- interfaces: "P0/P1/P2/P3",
1729
- platform: "P0/P1/P2/P3",
1730
- operations: "P0/P1/P2/P3",
1731
- time: "P0/P1/P2/P3"
1732
- },
1733
- flags: {
1734
- HAS_API: HAS_API,
1735
- HAS_REFACTORING: HAS_REFACTORING,
1736
- HAS_DEPENDENCIES: HAS_DEPENDENCIES,
1737
- HAS_SECURITY: HAS_SECURITY,
1738
- HAS_MIDDLEWARE: HAS_MIDDLEWARE,
1739
- HAS_SAP_INTEGRATION: HAS_SAP_INTEGRATION,
1740
- HAS_AUTHORIZATION: HAS_AUTHORIZATION
1741
- },
1742
- agentsInvoked: agentList,
1743
- timestamp: new Date().toISOString()
1744
- }
1745
- })
1746
- ```
1747
-
1748
- **Step 2: Share learnings with learning coordinator**
1749
-
1750
- You MUST execute this MCP call to propagate patterns cross-domain:
1751
-
1752
- ```javascript
1753
- mcp__agentic-qe__memory_share({
1754
- sourceAgentId: "qcsd-refinement-swarm",
1755
- targetAgentIds: ["qe-learning-coordinator", "qe-pattern-learner"],
1756
- knowledgeDomain: "refinement-patterns"
1757
- })
1758
- ```
1759
-
1760
- **Step 3: Save learning persistence record to output folder**
1761
-
1762
- You MUST use the Write tool to save a JSON record of the persisted learnings:
1763
-
1764
- ```
1765
- Save to: ${OUTPUT_FOLDER}/09-learning-persistence.json
1766
-
1767
- Contents:
1768
- {
1769
- "phase": "QCSD-Refinement",
1770
- "storyId": "[story ID]",
1771
- "storyName": "[story name]",
1772
- "recommendation": "[READY/CONDITIONAL/NOT-READY]",
1773
- "memoryKey": "qcsd-refinement-[storyId]-[timestamp]",
1774
- "namespace": "qcsd-refinement",
1775
- "metrics": {
1776
- "sfdipotCoverage": [0-7],
1777
- "bddScenarioCount": [N],
1778
- "investCompleteness": [0-100],
1779
- "criticalGaps": [N],
1780
- "testIdeaQuality": [0-100]
1781
- },
1782
- "sfdipotPriorities": {
1783
- "structure": "P0/P1/P2/P3",
1784
- "function": "P0/P1/P2/P3",
1785
- "data": "P0/P1/P2/P3",
1786
- "interfaces": "P0/P1/P2/P3",
1787
- "platform": "P0/P1/P2/P3",
1788
- "operations": "P0/P1/P2/P3",
1789
- "time": "P0/P1/P2/P3"
1790
- },
1791
- "flags": {
1792
- "HAS_API": true/false,
1793
- "HAS_REFACTORING": true/false,
1794
- "HAS_DEPENDENCIES": true/false,
1795
- "HAS_SECURITY": true/false,
1796
- "HAS_MIDDLEWARE": true/false,
1797
- "HAS_SAP_INTEGRATION": true/false,
1798
- "HAS_AUTHORIZATION": true/false
1799
- },
1800
- "agentsInvoked": ["list", "of", "agents"],
1801
- "crossPhaseSignals": {
1802
- "toDevelopment": "BDD scenarios as test specification",
1803
- "toVerification": "INVEST gaps as verification focus"
1804
- },
1805
- "persistedAt": "[ISO timestamp]"
1806
- }
1807
- ```
1808
-
1809
- ### Fallback: CLI Memory Commands
1810
-
1811
- If MCP memory_store tool is unavailable, use CLI instead (STILL MANDATORY):
1812
-
1813
- ```bash
1814
- npx @claude-flow/cli@latest memory store \
1815
- --key "qcsd-refinement-${STORY_ID}-$(date +%s)" \
1816
- --value '{"recommendation":"[VALUE]","investCompleteness":[N],"sfdipotCoverage":[N],"bddScenarioCount":[N],"criticalGaps":[N]}' \
1817
- --namespace qcsd-refinement
1818
-
1819
- npx @claude-flow/cli@latest hooks post-task \
1820
- --task-id "qcsd-refinement-${STORY_ID}" \
1821
- --success true
1822
- ```
1823
-
1824
- ### Validation Before Proceeding to Phase 8
1825
-
1826
- ```
1827
- +-- Did I execute mcp__agentic-qe__memory_store with actual values? (not placeholders)
1828
- +-- Did I execute mcp__agentic-qe__memory_share to propagate learnings?
1829
- +-- Did I save 09-learning-persistence.json to the output folder?
1830
- +-- Does the JSON contain the correct recommendation from Phase 5?
1831
- +-- Does the JSON contain actual SFDIPOT priorities from Phase 2?
1832
- +-- Does the JSON contain actual flag values from Phase 1?
1833
- ```
1834
-
1835
- **If ANY validation check fails, DO NOT proceed to Phase 8.**
1836
-
1837
- ### Cross-Phase Signal Consumption
1838
-
1839
- The Refinement Swarm both consumes and produces signals for other QCSD phases:
1840
-
1841
- ```
1842
- CONSUMES (from other phases):
1843
- +-- Loop 2 (Tactical): SFDIPOT weights from Production Telemetry
1844
- | - Production incidents inform which factors to weight higher
1845
- | - Telemetry data adjusts P0-P3 priority thresholds
1846
- |
1847
- +-- Loop 4 (Quality-Criteria): Untestable patterns from Development
1848
- - Patterns the Development phase flagged as hard to test
1849
- - Feeds into INVEST testability scoring
1850
-
1851
- PRODUCES (for other phases):
1852
- +-- To Development Phase: BDD scenarios as test specification
1853
- | - Gherkin scenarios become automated test templates
1854
- | - SFDIPOT priorities guide test depth allocation
1855
- |
1856
- +-- To Verification Phase: INVEST gaps as verification focus
1857
- - Critical gaps become verification checkpoints
1858
- - DoR failures become sprint exit criteria
1859
- ```
1860
-
1861
- ---
1862
-
1863
- ## PHASE 8: Apply Test Idea Rewriter (Transformation)
1864
-
1865
- ### ENFORCEMENT: ALWAYS RUN THIS PHASE
1866
-
1867
- ```
1868
- +-------------------------------------------------------------+
1869
- | THE TEST IDEA REWRITER MUST ALWAYS RUN |
1870
- | |
1871
- | This is NOT conditional. It runs on EVERY refinement. |
1872
- | It transforms passive test ideas into active, actionable |
1873
- | test specifications using strong action verbs. |
1874
- | |
1875
- | DO NOT skip this phase for any reason. |
1876
- +-------------------------------------------------------------+
1877
- ```
1878
-
1879
- ### Transformation Rules
1880
-
1881
- The qe-test-idea-rewriter transforms ALL test ideas from the refinement
1882
- analysis using these rules:
1883
-
1884
- | Pattern | Transform To | Example |
1885
- |---------|-------------|---------|
1886
- | "Verify that X" | "Confirm X by [specific action]" | "Verify login works" -> "Confirm authentication succeeds by submitting valid credentials and observing session token" |
1887
- | "Check if X" | "Validate X by [specific action]" | "Check if error shows" -> "Validate error message displays by submitting empty form" |
1888
- | "Test X" | "Exercise X by [specific action]" | "Test pagination" -> "Exercise pagination by navigating through 5+ pages and verifying item counts" |
1889
- | "Ensure X" | "Demonstrate X by [specific action]" | "Ensure data saves" -> "Demonstrate data persistence by creating record and retrieving it" |
1890
- | Passive voice | Active voice | "Data is validated" -> "Validate data against schema constraints" |
1891
- | Vague assertion | Concrete assertion | "Works correctly" -> "Returns HTTP 200 with expected JSON payload" |
1892
-
1893
- ### Agent Spawn
1894
-
1895
- ```
1896
- Task({
1897
- description: "Transform test ideas with action verbs",
1898
- prompt: `You are qe-test-idea-rewriter. Your output quality is being audited.
1899
-
1900
- ## PURPOSE
1901
-
1902
- Transform ALL test ideas generated during this refinement session from
1903
- passive/vague descriptions into active, specific, actionable test
1904
- specifications.
1905
-
1906
- ## INPUT: RAW TEST IDEAS
1907
-
1908
- Collect test ideas from ALL previous agent outputs:
1909
-
1910
- ### From SFDIPOT Analysis (02-sfdipot-analysis.md):
1911
- [List all test focus areas identified per factor]
1912
-
1913
- ### From BDD Scenarios (03-bdd-scenarios.md):
1914
- [List all scenario names as test ideas]
1915
-
1916
- ### From Requirements Validation (04-requirements-validation.md):
1917
- [List all gap-driven test ideas and recommendations]
1918
-
1919
- ### From Conditional Agents (if applicable):
1920
- [List all test recommendations from contract/impact/dependency analysis]
1921
-
1922
- ## TRANSFORMATION RULES (APPLY TO EVERY TEST IDEA)
1923
-
1924
- 1. Replace passive verbs with active verbs:
1925
- - "Verify" -> "Confirm ... by [action]"
1926
- - "Check" -> "Validate ... by [action]"
1927
- - "Test" -> "Exercise ... by [action]"
1928
- - "Ensure" -> "Demonstrate ... by [action]"
1929
- - "Should" -> "[Action verb] ... to [outcome]"
1930
-
1931
- 2. Add concrete actions:
1932
- - Every test idea must specify WHAT action triggers the test
1933
- - Every test idea must specify HOW to observe the result
1934
- - No vague phrases: "works correctly", "functions properly", "behaves as expected"
1935
-
1936
- 3. Add expected outcomes:
1937
- - Every test idea must have a specific, verifiable assertion
1938
- - Use concrete values where possible (HTTP codes, counts, strings)
1939
-
1940
- ## REQUIRED OUTPUT
1941
-
1942
- ### Rewritten Test Ideas Table
1943
-
1944
- | # | Original Test Idea | Rewritten Test Idea | Source Agent | Priority |
1945
- |---|-------------------|---------------------|-------------|----------|
1946
- | 1 | [original] | [rewritten with action verb + concrete assertion] | [agent] | P0/P1/P2 |
1947
- | 2 | ... | ... | ... | ... |
1948
-
1949
- ### Transformation Metrics
1950
-
1951
- | Metric | Value |
1952
- |--------|-------|
1953
- | Total test ideas processed | __ |
1954
- | Ideas requiring rewrite | __ |
1955
- | Ideas already actionable | __ |
1956
- | New ideas added (from gaps) | __ |
1957
- | P0 test ideas | __ |
1958
- | P1 test ideas | __ |
1959
- | P2 test ideas | __ |
1960
-
1961
- ### Test Idea Quality Score
1962
-
1963
- | Dimension | Before | After |
1964
- |-----------|--------|-------|
1965
- | Action verb usage | __% | 100% |
1966
- | Concrete assertions | __% | __% |
1967
- | Specific test data | __% | __% |
1968
- | Observable outcomes | __% | __% |
1969
-
1970
- **OVERALL TEST IDEA QUALITY: __/100**
1971
-
1972
- ## OUTPUT FORMAT
1973
-
1974
- Save to: ${OUTPUT_FOLDER}/08-rewritten-test-ideas.md
1975
- Use the Write tool to save BEFORE completing.
1976
-
1977
- ## VALIDATION BEFORE SUBMITTING
1978
-
1979
- +-- Did I process ALL test ideas from ALL agent outputs?
1980
- +-- Does every rewritten idea use an active verb?
1981
- +-- Does every rewritten idea have a concrete assertion?
1982
- +-- Did I calculate transformation metrics?
1983
- +-- Did I save the report to the correct output path?`,
1984
- subagent_type: "qe-test-idea-rewriter",
1985
- run_in_background: true
1986
- })
1987
- ```
1988
-
1989
- ### Wait for Transformation Completion
1990
-
1991
- ```
1992
- +-------------------------------------------------------------+
1993
- | WAIT for qe-test-idea-rewriter to complete before |
1994
- | proceeding to Phase 9. |
1995
- | |
1996
- | The rewritten test ideas are the PRIMARY deliverable of |
1997
- | the Refinement Swarm - they feed directly into the |
1998
- | Development phase as test specifications. |
1999
- +-------------------------------------------------------------+
2000
- ```
2001
-
2002
- ---
2003
-
2004
- ## PHASE 9: Final Output
2005
-
2006
- **At the very end of swarm execution, ALWAYS output this completion summary:**
2007
-
2008
- ```
2009
- +---------------------------------------------------------------------+
2010
- | QCSD REFINEMENT SWARM COMPLETE |
2011
- +---------------------------------------------------------------------+
2012
- | |
2013
- | Story Analyzed: [Story Name/ID] |
2014
- | Reports Generated: [count] |
2015
- | Output Folder: ${OUTPUT_FOLDER} |
2016
- | |
2017
- | REFINEMENT SCORES: |
2018
- | +-- SFDIPOT Coverage: __/7 factors |
2019
- | +-- BDD Scenarios: __ generated |
2020
- | +-- INVEST Completeness: __% |
2021
- | +-- Critical Gaps: __ |
2022
- | +-- Test Idea Quality: __/100 |
2023
- | |
2024
- | RECOMMENDATION: [READY / CONDITIONAL / NOT-READY] |
2025
- | REASON: [1-2 sentence rationale] |
2026
- | |
2027
- | DELIVERABLES: |
2028
- | +-- 01-executive-summary.md |
2029
- | +-- 02-sfdipot-analysis.md |
2030
- | +-- 03-bdd-scenarios.md |
2031
- | +-- 04-requirements-validation.md |
2032
- | [IF HAS_API] |
2033
- | +-- 05-contract-validation.md |
2034
- | [IF HAS_REFACTORING] |
2035
- | +-- 06-impact-analysis.md |
2036
- | [IF HAS_DEPENDENCIES] |
2037
- | +-- 07-dependency-map.md |
2038
- | +-- 08-rewritten-test-ideas.md |
2039
- | +-- 09-learning-persistence.json |
2040
- | |
2041
- +---------------------------------------------------------------------+
2042
- ```
2043
-
2044
- **IF recommendation is NOT-READY, ALSO output this prominent action box:**
2045
-
2046
- ```
2047
- +---------------------------------------------------------------------+
2048
- | ACTION REQUIRED: STORY IS NOT READY FOR SPRINT |
2049
- +---------------------------------------------------------------------+
2050
- | |
2051
- | The following blockers MUST be resolved before next refinement: |
2052
- | |
2053
- | 1. [Blocker 1 with specific remediation] |
2054
- | 2. [Blocker 2 with specific remediation] |
2055
- | 3. [Blocker 3 with specific remediation] |
2056
- | |
2057
- | NEXT STEPS: |
2058
- | - Address all P0 blockers listed above |
2059
- | - Re-run /qcsd-refinement-swarm after fixes |
2060
- | - Target: INVEST completeness >= 90%, 0 critical gaps |
2061
- | |
2062
- +---------------------------------------------------------------------+
2063
- ```
2064
-
2065
- **IF recommendation is CONDITIONAL, output this guidance box:**
2066
-
2067
- ```
2068
- +---------------------------------------------------------------------+
2069
- | CONDITIONAL: STORY NEEDS MINOR ADJUSTMENTS |
2070
- +---------------------------------------------------------------------+
2071
- | |
2072
- | The story can enter the sprint WITH these conditions: |
2073
- | |
2074
- | 1. [Condition 1 - must be addressed in first 2 days] |
2075
- | 2. [Condition 2 - must be addressed before testing] |
2076
- | |
2077
- | RISK ACCEPTANCE: |
2078
- | - Team acknowledges remaining gaps |
2079
- | - Sprint scope may need adjustment if conditions not met |
2080
- | |
2081
- +---------------------------------------------------------------------+
2082
- ```
2083
-
2084
- **DO NOT end the swarm without displaying the completion summary.**
2085
-
2086
- ---
2087
-
2088
- ## Report Filename Mapping
2089
-
2090
- | Agent | Report Filename | Phase |
2091
- |-------|----------------|-------|
2092
- | qe-product-factors-assessor | `02-sfdipot-analysis.md` | Batch 1 |
2093
- | qe-bdd-generator | `03-bdd-scenarios.md` | Batch 1 |
2094
- | qe-requirements-validator | `04-requirements-validation.md` | Batch 1 |
2095
- | qe-contract-validator | `05-contract-validation.md` | Batch 2 (conditional) |
2096
- | qe-impact-analyzer | `06-impact-analysis.md` | Batch 2 (conditional) |
2097
- | qe-dependency-mapper | `07-dependency-map.md` | Batch 2 (conditional) |
2098
- | qe-test-idea-rewriter | `08-rewritten-test-ideas.md` | Batch 3 (transformation) |
2099
- | Learning Persistence | `09-learning-persistence.json` | Phase 7 (auto-execute) |
2100
- | Synthesis | `01-executive-summary.md` | Phase 6 |
2101
-
2102
- ---
2103
-
2104
- ## DDD Domain Integration
2105
-
2106
- This swarm operates across **1 primary domain**, **3 conditional domains**,
2107
- and **1 transformation domain**:
2108
-
2109
- ```
2110
- +-----------------------------------------------------------------------------+
2111
- | QCSD REFINEMENT - DOMAIN MAP |
2112
- +-----------------------------------------------------------------------------+
2113
- | |
2114
- | PRIMARY DOMAIN (Always Active) |
2115
- | +-----------------------------------------------------------------------+ |
2116
- | | requirements-validation | |
2117
- | | ----------------------------------------------------------------- | |
2118
- | | - qe-product-factors-assessor (SFDIPOT 7 factors) | |
2119
- | | - qe-bdd-generator (Gherkin scenarios) | |
2120
- | | - qe-requirements-validator (INVEST + DoR) | |
2121
- | +-----------------------------------------------------------------------+ |
2122
- | |
2123
- | CONDITIONAL DOMAINS (Based on Story Content) |
2124
- | +-----------------------+ +-----------------------+ |
2125
- | | contract-testing | | code-intelligence | |
2126
- | | ------------------- | | ------------------- | |
2127
- | | qe-contract- | | qe-impact-analyzer | |
2128
- | | validator | | qe-dependency-mapper | |
2129
- | | [IF HAS_API] | | [IF HAS_REFACTORING | |
2130
- | | | | or HAS_DEPENDENCIES]| |
2131
- | +-----------------------+ +-----------------------+ |
2132
- | |
2133
- | +------------------------------------------+ |
2134
- | | enterprise-integration | |
2135
- | | ---------------------------------------- | |
2136
- | | qe-middleware-validator | |
2137
- | | [IF HAS_MIDDLEWARE] | |
2138
- | | qe-odata-contract-tester | |
2139
- | | [IF HAS_SAP_INTEGRATION] | |
2140
- | | qe-sod-analyzer | |
2141
- | | [IF HAS_AUTHORIZATION] | |
2142
- | +------------------------------------------+ |
2143
- | |
2144
- | TRANSFORMATION DOMAIN (Always Active) |
2145
- | +-----------------------------------------------------------------------+ |
2146
- | | test-generation | |
2147
- | | ----------------------------------------------------------------- | |
2148
- | | - qe-test-idea-rewriter (action verb transformation) | |
2149
- | +-----------------------------------------------------------------------+ |
2150
- | |
2151
- +-----------------------------------------------------------------------------+
2152
- ```
2153
-
2154
- ---
2155
-
2156
- ## Execution Model Options
2157
-
2158
- This skill supports **3 execution models**. Choose based on your environment:
2159
-
2160
- | Model | When to Use | Pros | Cons |
2161
- |-------|-------------|------|------|
2162
- | **Task Tool** (PRIMARY) | Claude Code sessions | Full agent capabilities, parallel execution | Requires Claude Code |
2163
- | **MCP Tools** | MCP server available | Fleet coordination, memory persistence | Requires MCP setup |
2164
- | **CLI** | Terminal/scripts | Works anywhere, scriptable | Sequential only |
2165
-
2166
- ### Quick Start by Model
2167
-
2168
- **Option A: Task Tool (RECOMMENDED)**
2169
- ```
2170
- Just follow the skill phases below - uses Task() calls with run_in_background: true
2171
- ```
2172
-
2173
- **Option B: MCP Tools**
2174
- ```javascript
2175
- // Initialize fleet for Refinement domains
2176
- mcp__agentic-qe__fleet_init({
2177
- topology: "hierarchical",
2178
- enabledDomains: ["requirements-validation", "contract-testing", "code-intelligence", "test-generation"],
2179
- maxAgents: 7
2180
- })
2181
-
2182
- // Orchestrate refinement task
2183
- mcp__agentic-qe__task_orchestrate({
2184
- task: "qcsd-refinement-analysis",
2185
- strategy: "parallel"
2186
- })
2187
- ```
2188
-
2189
- **Option C: CLI**
2190
- ```bash
2191
- # Initialize coordination
2192
- npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 7
2193
-
2194
- # Route task
2195
- npx @claude-flow/cli@latest hooks pre-task --description "QCSD Refinement for [Story]"
2196
-
2197
- # Execute agents
2198
- npx @claude-flow/cli@latest agent spawn --type qe-product-factors-assessor
2199
- npx @claude-flow/cli@latest agent spawn --type qe-bdd-generator
2200
- npx @claude-flow/cli@latest agent spawn --type qe-requirements-validator
2201
- ```
2202
-
2203
- ---
2204
-
2205
- ## Quick Reference
2206
-
2207
- ### Enforcement Summary
2208
-
2209
- | Phase | Must Do | Failure Condition |
2210
- |-------|---------|-------------------|
2211
- | 1 | Check ALL 7 flags | Missing flag evaluation |
2212
- | 2 | Spawn ALL 3 core agents in ONE message | Fewer than 3 Task calls |
2213
- | 3 | WAIT for completion | Proceeding before results |
2214
- | 4 | Spawn ALL flagged conditional agents | Skipping a TRUE flag |
2215
- | 5 | Apply EXACT decision logic | Wrong recommendation |
2216
- | 6 | Generate COMPLETE report | Missing sections |
2217
- | 7 | ALWAYS store learnings + save 09-learning-persistence.json | Pattern loss, missing audit trail |
2218
- | 8 | ALWAYS run test idea rewriter | Skipping transformation |
2219
- | 9 | Output completion summary | Missing final output |
2220
-
2221
- ### Quality Gate Thresholds
2222
-
2223
- | Metric | READY | CONDITIONAL | NOT-READY |
2224
- |--------|-------|-------------|-----------|
2225
- | SFDIPOT Coverage | >=7/7 | 5-6/7 | <5/7 |
2226
- | BDD Scenarios | >=10 | 3-9 | <3 |
2227
- | INVEST Completeness | >=90% | 50-89% | <50% |
2228
- | Critical Gaps | 0 | 1-3 | >3 |
2229
-
2230
- ### Domain-to-Agent Mapping
2231
-
2232
- | Domain | Agent | Phase | Batch |
2233
- |--------|-------|-------|-------|
2234
- | requirements-validation | qe-product-factors-assessor | Core | 1 |
2235
- | requirements-validation | qe-bdd-generator | Core | 1 |
2236
- | requirements-validation | qe-requirements-validator | Core | 1 |
2237
- | contract-testing | qe-contract-validator | Conditional (HAS_API) | 2 |
2238
- | code-intelligence | qe-impact-analyzer | Conditional (HAS_REFACTORING) | 2 |
2239
- | code-intelligence | qe-dependency-mapper | Conditional (HAS_DEPENDENCIES) | 2 |
2240
- | enterprise-integration | qe-middleware-validator | Conditional (HAS_MIDDLEWARE) | 2 |
2241
- | enterprise-integration | qe-odata-contract-tester | Conditional (HAS_SAP_INTEGRATION) | 2 |
2242
- | enterprise-integration | qe-sod-analyzer | Conditional (HAS_AUTHORIZATION) | 2 |
2243
- | test-generation | qe-test-idea-rewriter | Transformation (ALWAYS) | 3 |
2244
-
2245
- ### Execution Model Quick Reference
2246
-
2247
- | Model | Initialization | Agent Spawn | Memory Store |
2248
- |-------|---------------|-------------|--------------|
2249
- | **Task Tool** | N/A | `Task({ subagent_type, run_in_background: true })` | N/A (use MCP) |
2250
- | **MCP Tools** | `fleet_init({})` | `task_submit({})` | `memory_store({})` |
2251
- | **CLI** | `swarm init` | `agent spawn` | `memory store` |
2252
-
2253
- ### MCP Tools Quick Reference
2254
-
2255
- ```javascript
2256
- // Initialization
2257
- mcp__agentic-qe__fleet_init({
2258
- topology: "hierarchical",
2259
- enabledDomains: ["requirements-validation", "contract-testing", "code-intelligence", "test-generation"],
2260
- maxAgents: 7
2261
- })
2262
-
2263
- // Task submission
2264
- mcp__agentic-qe__task_submit({ type: "...", priority: "p0", payload: {...} })
2265
- mcp__agentic-qe__task_orchestrate({ task: "...", strategy: "parallel" })
2266
-
2267
- // Status
2268
- mcp__agentic-qe__fleet_status({ verbose: true })
2269
- mcp__agentic-qe__task_list({ status: "pending" })
2270
-
2271
- // Memory
2272
- mcp__agentic-qe__memory_store({ key: "...", value: {...}, namespace: "qcsd-refinement" })
2273
- mcp__agentic-qe__memory_query({ pattern: "qcsd-refinement-*", namespace: "qcsd-refinement" })
2274
- mcp__agentic-qe__memory_share({
2275
- sourceAgentId: "qcsd-refinement-swarm",
2276
- targetAgentIds: ["qe-learning-coordinator"],
2277
- knowledgeDomain: "refinement-patterns"
2278
- })
2279
- ```
2280
-
2281
- ### CLI Quick Reference
2282
-
2283
- ```bash
2284
- # Initialization
2285
- npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 7
2286
-
2287
- # Agent operations
2288
- npx @claude-flow/cli@latest agent spawn --type [agent-type] --task "[description]"
2289
- npx @claude-flow/cli@latest hooks pre-task --description "[task]"
2290
- npx @claude-flow/cli@latest hooks post-task --task-id "[id]" --success true
2291
-
2292
- # Status
2293
- npx @claude-flow/cli@latest swarm status
2294
-
2295
- # Memory
2296
- npx @claude-flow/cli@latest memory store --key "[key]" --value "[json]" --namespace qcsd-refinement
2297
- npx @claude-flow/cli@latest memory search --query "[query]" --namespace qcsd-refinement
2298
- npx @claude-flow/cli@latest memory list --namespace qcsd-refinement
2299
- ```
2300
-
2301
- ---
2302
-
2303
- ## Swarm Topology
2304
-
2305
- ```
2306
- QCSD REFINEMENT SWARM v1.0
2307
- |
2308
- BATCH 1 (Core - Parallel)
2309
- +-----------+---+-----------+
2310
- | | |
2311
- +-----v-----+ +---v---+ +--------v--------+
2312
- | Product | | BDD | | Requirements |
2313
- | Factors | | Gen | | Validator |
2314
- | (SFDIPOT) | |(Ghrkn)| | (INVEST+DoR) |
2315
- |-----------| |-------| |-----------------|
2316
- | req-valid | |req-val| | req-valid |
2317
- +-----+-----+ +---+---+ +--------+--------+
2318
- | | |
2319
- +------------+--------------+
2320
- |
2321
- [METRICS GATE]
2322
- |
2323
- BATCH 2 (Conditional - Parallel)
2324
- +-----------+---+-----------+
2325
- | | |
2326
- +-----v-----+ +---v--------+ +---v----------+
2327
- | Contract | | Impact | | Dependency |
2328
- | Validator | | Analyzer | | Mapper |
2329
- | [IF API] | | [IF REFAC] | | [IF DEPS] |
2330
- |-----------| |------------| |--------------|
2331
- | contract | | code-intel | | code-intel |
2332
- +-----------+ +------------+ +--------------+
2333
- |
2334
- [SYNTHESIS]
2335
- |
2336
- PHASE 7 (Learning Persistence - Always)
2337
- |
2338
- +-------v-------+
2339
- | memory_store |
2340
- | memory_share |
2341
- | 09-learning- |
2342
- | persistence |
2343
- | (ALWAYS RUNS) |
2344
- +-------+-------+
2345
- |
2346
- BATCH 3 (Transformation - Always)
2347
- |
2348
- +-------v-------+
2349
- | Test Idea |
2350
- | Rewriter |
2351
- | (ALWAYS RUNS) |
2352
- |---------------|
2353
- | test-gen |
2354
- +-------+-------+
2355
- |
2356
- [FINAL REPORT]
2357
- ```
2358
-
2359
- ---
2360
-
2361
- ## Inventory Summary
2362
-
2363
- | Resource Type | Count | Primary | Conditional | Transformation |
2364
- |---------------|:-----:|:-------:|:-----------:|:--------------:|
2365
- | **Agents** | 10 | 3 | 6 | 1 |
2366
- | **Sub-agents** | 0 | - | - | - |
2367
- | **Skills** | 3 | 3 | - | - |
2368
- | **Domains** | 5 | 1 | 3 | 1 |
2369
- | **Parallel Batches** | 3 | 1 | 1 | 1 |
2370
-
2371
- **Skills Used:**
2372
- 1. `context-driven-testing` - Context-appropriate test strategy
2373
- 2. `testability-scoring` - 10 testability principles
2374
- 3. `risk-based-testing` - Risk prioritization matrix
2375
-
2376
- **Frameworks Applied:**
2377
- 1. SFDIPOT - 7 product factors, 37 subcategories
2378
- 2. BDD/Gherkin - Scenario specification language
2379
- 3. INVEST - Story quality validation (6 criteria)
2380
- 4. DoR - Definition of Ready checklist (10 items)
2381
- 5. Robert C. Martin coupling metrics (Ca/Ce/I)
138
+ **Total: 10 agents (3 core + 6 conditional + 1 transformation)**
2382
139
 
2383
140
  ---
2384
141
 
2385
142
  ## Key Principle
2386
143
 
2387
- **Stories enter sprints ready to test, not ready to argue about.**
2388
-
2389
- This swarm provides:
2390
- 1. **What product factors matter?** -> SFDIPOT Analysis (7 factors, 37 subcategories)
2391
- 2. **How should we test it?** -> BDD Scenarios (Gherkin specifications)
2392
- 3. **Are requirements complete?** -> INVEST Validation (6 criteria + DoR)
2393
- 4. **Are contracts safe?** -> Contract Validation (if APIs involved)
2394
- 5. **What is the blast radius?** -> Impact Analysis (if refactoring)
2395
- 6. **What are the coupling risks?** -> Dependency Mapping (if dependencies)
2396
- 7. **Are test ideas actionable?** -> Test Idea Rewriter (always)
2397
- 8. **Is it sprint-ready?** -> READY/CONDITIONAL/NOT-READY decision
2398
- 9. **What did we learn?** -> Memory persistence for future cycles
144
+ **Refinement quality determines sprint success. This swarm ensures stories are
145
+ testable, complete, and ready for development commitment.**