agentic-qe 1.4.4 → 1.5.1

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 (390) hide show
  1. package/.claude/agents/qe-api-contract-validator.md +133 -27
  2. package/.claude/agents/qe-api-contract-validator.md.backup +1148 -0
  3. package/.claude/agents/qe-api-contract-validator.md.backup-20251107-134747 +1148 -0
  4. package/.claude/agents/qe-api-contract-validator.md.backup-phase2-20251107-140039 +1123 -0
  5. package/.claude/agents/qe-chaos-engineer.md +142 -23
  6. package/.claude/agents/qe-chaos-engineer.md.backup +808 -0
  7. package/.claude/agents/qe-chaos-engineer.md.backup-20251107-134747 +808 -0
  8. package/.claude/agents/qe-chaos-engineer.md.backup-phase2-20251107-140039 +787 -0
  9. package/.claude/agents/qe-code-complexity.md +111 -23
  10. package/.claude/agents/qe-code-complexity.md.backup +291 -0
  11. package/.claude/agents/qe-code-complexity.md.backup-20251107-134747 +291 -0
  12. package/.claude/agents/qe-code-complexity.md.backup-phase2-20251107-140039 +286 -0
  13. package/.claude/agents/qe-coverage-analyzer.md +306 -30
  14. package/.claude/agents/qe-coverage-analyzer.md.backup +467 -0
  15. package/.claude/agents/qe-coverage-analyzer.md.backup-20251107-134747 +467 -0
  16. package/.claude/agents/qe-coverage-analyzer.md.backup-phase2-20251107-140039 +438 -0
  17. package/.claude/agents/qe-deployment-readiness.md +84 -28
  18. package/.claude/agents/qe-deployment-readiness.md.backup +1166 -0
  19. package/.claude/agents/qe-deployment-readiness.md.backup-20251107-134747 +1166 -0
  20. package/.claude/agents/qe-deployment-readiness.md.backup-phase2-20251107-140039 +1140 -0
  21. package/.claude/agents/qe-flaky-test-hunter.md +277 -35
  22. package/.claude/agents/qe-flaky-test-hunter.md.backup +1195 -0
  23. package/.claude/agents/qe-flaky-test-hunter.md.backup-20251107-134747 +1195 -0
  24. package/.claude/agents/qe-flaky-test-hunter.md.backup-phase2-20251107-140039 +1162 -0
  25. package/.claude/agents/qe-fleet-commander.md +126 -23
  26. package/.claude/agents/qe-fleet-commander.md.backup +718 -0
  27. package/.claude/agents/qe-fleet-commander.md.backup-20251107-134747 +718 -0
  28. package/.claude/agents/qe-fleet-commander.md.backup-phase2-20251107-140039 +697 -0
  29. package/.claude/agents/qe-performance-tester.md +314 -57
  30. package/.claude/agents/qe-performance-tester.md.backup +428 -0
  31. package/.claude/agents/qe-performance-tester.md.backup-20251107-134747 +428 -0
  32. package/.claude/agents/qe-performance-tester.md.backup-phase2-20251107-140039 +372 -0
  33. package/.claude/agents/qe-production-intelligence.md +126 -27
  34. package/.claude/agents/qe-production-intelligence.md.backup +1219 -0
  35. package/.claude/agents/qe-production-intelligence.md.backup-20251107-134747 +1219 -0
  36. package/.claude/agents/qe-production-intelligence.md.backup-phase2-20251107-140039 +1194 -0
  37. package/.claude/agents/qe-quality-analyzer.md +127 -32
  38. package/.claude/agents/qe-quality-analyzer.md.backup +425 -0
  39. package/.claude/agents/qe-quality-analyzer.md.backup-20251107-134747 +425 -0
  40. package/.claude/agents/qe-quality-analyzer.md.backup-phase2-20251107-140039 +394 -0
  41. package/.claude/agents/qe-quality-gate.md +148 -33
  42. package/.claude/agents/qe-quality-gate.md.backup +446 -0
  43. package/.claude/agents/qe-quality-gate.md.backup-20251107-134747 +446 -0
  44. package/.claude/agents/qe-quality-gate.md.backup-phase2-20251107-140039 +415 -0
  45. package/.claude/agents/qe-regression-risk-analyzer.md +78 -27
  46. package/.claude/agents/qe-regression-risk-analyzer.md.backup +1009 -0
  47. package/.claude/agents/qe-regression-risk-analyzer.md.backup-20251107-134747 +1009 -0
  48. package/.claude/agents/qe-regression-risk-analyzer.md.backup-phase2-20251107-140039 +984 -0
  49. package/.claude/agents/qe-requirements-validator.md +131 -27
  50. package/.claude/agents/qe-requirements-validator.md.backup +748 -0
  51. package/.claude/agents/qe-requirements-validator.md.backup-20251107-134747 +748 -0
  52. package/.claude/agents/qe-requirements-validator.md.backup-phase2-20251107-140039 +723 -0
  53. package/.claude/agents/qe-security-scanner.md +137 -62
  54. package/.claude/agents/qe-security-scanner.md.backup +634 -0
  55. package/.claude/agents/qe-security-scanner.md.backup-20251107-134747 +634 -0
  56. package/.claude/agents/qe-security-scanner.md.backup-phase2-20251107-140039 +573 -0
  57. package/.claude/agents/qe-test-data-architect.md +129 -26
  58. package/.claude/agents/qe-test-data-architect.md.backup +1064 -0
  59. package/.claude/agents/qe-test-data-architect.md.backup-20251107-134747 +1064 -0
  60. package/.claude/agents/qe-test-data-architect.md.backup-phase2-20251107-140039 +1040 -0
  61. package/.claude/agents/qe-test-executor.md +165 -21
  62. package/.claude/agents/qe-test-executor.md.backup +389 -0
  63. package/.claude/agents/qe-test-executor.md.backup-20251107-134747 +389 -0
  64. package/.claude/agents/qe-test-executor.md.backup-phase2-20251107-140039 +369 -0
  65. package/.claude/agents/qe-test-generator.md +379 -34
  66. package/.claude/agents/qe-test-generator.md.backup +997 -0
  67. package/.claude/agents/qe-test-generator.md.backup-20251107-134747 +997 -0
  68. package/.claude/agents/qe-visual-tester.md +236 -23
  69. package/.claude/agents/qe-visual-tester.md.backup +777 -0
  70. package/.claude/agents/qe-visual-tester.md.backup-20251107-134747 +777 -0
  71. package/.claude/agents/qe-visual-tester.md.backup-phase2-20251107-140039 +756 -0
  72. package/.claude/agents/subagents/qe-code-reviewer.md +59 -0
  73. package/.claude/agents/subagents/qe-data-generator.md +60 -0
  74. package/.claude/agents/subagents/qe-integration-tester.md +77 -0
  75. package/.claude/agents/subagents/qe-performance-validator.md +55 -0
  76. package/.claude/agents/subagents/qe-security-auditor.md +51 -0
  77. package/.claude/agents/subagents/qe-test-implementer.md +371 -0
  78. package/.claude/agents/subagents/qe-test-refactorer.md +510 -0
  79. package/.claude/agents/subagents/qe-test-writer.md +603 -0
  80. package/.claude/skills/accessibility-testing/SKILL.md +764 -777
  81. package/.claude/skills/agentic-quality-engineering/SKILL.md +0 -6
  82. package/.claude/skills/api-testing-patterns/SKILL.md +0 -12
  83. package/.claude/skills/bug-reporting-excellence/SKILL.md +0 -6
  84. package/.claude/skills/chaos-engineering-resilience/SKILL.md +0 -6
  85. package/.claude/skills/code-review-quality/SKILL.md +0 -6
  86. package/.claude/skills/compatibility-testing/SKILL.md +0 -6
  87. package/.claude/skills/compliance-testing/SKILL.md +0 -6
  88. package/.claude/skills/consultancy-practices/SKILL.md +0 -6
  89. package/.claude/skills/context-driven-testing/SKILL.md +0 -6
  90. package/.claude/skills/contract-testing/SKILL.md +0 -6
  91. package/.claude/skills/database-testing/SKILL.md +0 -6
  92. package/.claude/skills/exploratory-testing-advanced/SKILL.md +0 -6
  93. package/.claude/skills/holistic-testing-pact/SKILL.md +0 -6
  94. package/.claude/skills/localization-testing/SKILL.md +0 -6
  95. package/.claude/skills/mobile-testing/SKILL.md +535 -548
  96. package/.claude/skills/mutation-testing/SKILL.md +0 -6
  97. package/.claude/skills/performance-testing/SKILL.md +0 -6
  98. package/.claude/skills/quality-metrics/SKILL.md +0 -12
  99. package/.claude/skills/refactoring-patterns/SKILL.md +0 -6
  100. package/.claude/skills/regression-testing/SKILL.md +1033 -1045
  101. package/.claude/skills/risk-based-testing/SKILL.md +0 -12
  102. package/.claude/skills/security-testing/SKILL.md +0 -6
  103. package/.claude/skills/shift-left-testing/SKILL.md +529 -535
  104. package/.claude/skills/shift-right-testing/SKILL.md +585 -591
  105. package/.claude/skills/tdd-london-chicago/SKILL.md +0 -6
  106. package/.claude/skills/technical-writing/SKILL.md +0 -6
  107. package/.claude/skills/test-automation-strategy/SKILL.md +0 -6
  108. package/.claude/skills/test-data-management/SKILL.md +1054 -1067
  109. package/.claude/skills/test-design-techniques/SKILL.md +0 -6
  110. package/.claude/skills/test-environment-management/SKILL.md +0 -6
  111. package/.claude/skills/test-reporting-analytics/SKILL.md +0 -6
  112. package/.claude/skills/visual-testing-advanced/SKILL.md +0 -6
  113. package/.claude/skills/xp-practices/SKILL.md +0 -6
  114. package/CHANGELOG.md +426 -5
  115. package/README.md +24 -19
  116. package/dist/cli/commands/init.d.ts +4 -0
  117. package/dist/cli/commands/init.d.ts.map +1 -1
  118. package/dist/cli/commands/init.js +97 -44
  119. package/dist/cli/commands/init.js.map +1 -1
  120. package/dist/mcp/handlers/coordination/index.d.ts +14 -14
  121. package/dist/mcp/handlers/coordination/index.d.ts.map +1 -1
  122. package/dist/mcp/handlers/coordination/index.js +14 -14
  123. package/dist/mcp/handlers/coordination/index.js.map +1 -1
  124. package/dist/mcp/handlers/phase2/Phase2Tools.d.ts.map +1 -1
  125. package/dist/mcp/handlers/phase2/Phase2Tools.js +39 -10
  126. package/dist/mcp/handlers/phase2/Phase2Tools.js.map +1 -1
  127. package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts +63 -0
  128. package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts.map +1 -0
  129. package/dist/mcp/handlers/phase3/Phase3DomainTools.js +885 -0
  130. package/dist/mcp/handlers/phase3/Phase3DomainTools.js.map +1 -0
  131. package/dist/mcp/handlers/phase3/index.d.ts +6 -0
  132. package/dist/mcp/handlers/phase3/index.d.ts.map +1 -0
  133. package/dist/mcp/handlers/phase3/index.js +10 -0
  134. package/dist/mcp/handlers/phase3/index.js.map +1 -0
  135. package/dist/mcp/handlers/prediction/index.d.ts +10 -10
  136. package/dist/mcp/handlers/prediction/index.d.ts.map +1 -1
  137. package/dist/mcp/handlers/prediction/index.js +10 -10
  138. package/dist/mcp/handlers/prediction/index.js.map +1 -1
  139. package/dist/mcp/handlers/security/check-authz.d.ts +152 -0
  140. package/dist/mcp/handlers/security/check-authz.d.ts.map +1 -0
  141. package/dist/mcp/handlers/security/check-authz.js +434 -0
  142. package/dist/mcp/handlers/security/check-authz.js.map +1 -0
  143. package/dist/mcp/handlers/security/generate-report.d.ts +156 -0
  144. package/dist/mcp/handlers/security/generate-report.d.ts.map +1 -0
  145. package/dist/mcp/handlers/security/generate-report.js +469 -0
  146. package/dist/mcp/handlers/security/generate-report.js.map +1 -0
  147. package/dist/mcp/handlers/security/index.d.ts +80 -0
  148. package/dist/mcp/handlers/security/index.d.ts.map +1 -0
  149. package/dist/mcp/handlers/security/index.js +91 -0
  150. package/dist/mcp/handlers/security/index.js.map +1 -0
  151. package/dist/mcp/handlers/security/scan-comprehensive.d.ts +66 -0
  152. package/dist/mcp/handlers/security/scan-comprehensive.d.ts.map +1 -0
  153. package/dist/mcp/handlers/security/scan-comprehensive.js +296 -0
  154. package/dist/mcp/handlers/security/scan-comprehensive.js.map +1 -0
  155. package/dist/mcp/handlers/security/scan-dependencies.d.ts +148 -0
  156. package/dist/mcp/handlers/security/scan-dependencies.d.ts.map +1 -0
  157. package/dist/mcp/handlers/security/scan-dependencies.js +354 -0
  158. package/dist/mcp/handlers/security/scan-dependencies.js.map +1 -0
  159. package/dist/mcp/handlers/security/validate-auth.d.ts +128 -0
  160. package/dist/mcp/handlers/security/validate-auth.d.ts.map +1 -0
  161. package/dist/mcp/handlers/security/validate-auth.js +294 -0
  162. package/dist/mcp/handlers/security/validate-auth.js.map +1 -0
  163. package/dist/mcp/handlers/test/generate-integration-tests.d.ts +95 -0
  164. package/dist/mcp/handlers/test/generate-integration-tests.d.ts.map +1 -0
  165. package/dist/mcp/handlers/test/generate-integration-tests.js +286 -0
  166. package/dist/mcp/handlers/test/generate-integration-tests.js.map +1 -0
  167. package/dist/mcp/handlers/test/generate-unit-tests.d.ts +89 -0
  168. package/dist/mcp/handlers/test/generate-unit-tests.d.ts.map +1 -0
  169. package/dist/mcp/handlers/test/generate-unit-tests.js +273 -0
  170. package/dist/mcp/handlers/test/generate-unit-tests.js.map +1 -0
  171. package/dist/mcp/handlers/test/optimize-test-suite.d.ts +97 -0
  172. package/dist/mcp/handlers/test/optimize-test-suite.d.ts.map +1 -0
  173. package/dist/mcp/handlers/test/optimize-test-suite.js +282 -0
  174. package/dist/mcp/handlers/test/optimize-test-suite.js.map +1 -0
  175. package/dist/mcp/server.d.ts.map +1 -1
  176. package/dist/mcp/server.js +211 -0
  177. package/dist/mcp/server.js.map +1 -1
  178. package/dist/mcp/tools/deprecated.d.ts +1390 -0
  179. package/dist/mcp/tools/deprecated.d.ts.map +1 -0
  180. package/dist/mcp/tools/deprecated.js +859 -0
  181. package/dist/mcp/tools/deprecated.js.map +1 -0
  182. package/dist/mcp/tools/qe/api-contract/index.d.ts +138 -0
  183. package/dist/mcp/tools/qe/api-contract/index.d.ts.map +1 -0
  184. package/dist/mcp/tools/qe/api-contract/index.js +572 -0
  185. package/dist/mcp/tools/qe/api-contract/index.js.map +1 -0
  186. package/dist/mcp/tools/qe/code-quality/analyze-complexity.d.ts +110 -0
  187. package/dist/mcp/tools/qe/code-quality/analyze-complexity.d.ts.map +1 -0
  188. package/dist/mcp/tools/qe/code-quality/analyze-complexity.js +381 -0
  189. package/dist/mcp/tools/qe/code-quality/analyze-complexity.js.map +1 -0
  190. package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.d.ts +115 -0
  191. package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.d.ts.map +1 -0
  192. package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.js +461 -0
  193. package/dist/mcp/tools/qe/code-quality/calculate-quality-metrics.js.map +1 -0
  194. package/dist/mcp/tools/qe/code-quality/index.d.ts +12 -0
  195. package/dist/mcp/tools/qe/code-quality/index.d.ts.map +1 -0
  196. package/dist/mcp/tools/qe/code-quality/index.js +30 -0
  197. package/dist/mcp/tools/qe/code-quality/index.js.map +1 -0
  198. package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.d.ts +58 -0
  199. package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.d.ts.map +1 -0
  200. package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.js +172 -0
  201. package/dist/mcp/tools/qe/coverage/analyze-with-risk-scoring.js.map +1 -0
  202. package/dist/mcp/tools/qe/coverage/calculate-trends.d.ts +73 -0
  203. package/dist/mcp/tools/qe/coverage/calculate-trends.d.ts.map +1 -0
  204. package/dist/mcp/tools/qe/coverage/calculate-trends.js +240 -0
  205. package/dist/mcp/tools/qe/coverage/calculate-trends.js.map +1 -0
  206. package/dist/mcp/tools/qe/coverage/detect-gaps-ml.d.ts +38 -0
  207. package/dist/mcp/tools/qe/coverage/detect-gaps-ml.d.ts.map +1 -0
  208. package/dist/mcp/tools/qe/coverage/detect-gaps-ml.js +204 -0
  209. package/dist/mcp/tools/qe/coverage/detect-gaps-ml.js.map +1 -0
  210. package/dist/mcp/tools/qe/coverage/index.d.ts +12 -0
  211. package/dist/mcp/tools/qe/coverage/index.d.ts.map +1 -0
  212. package/dist/mcp/tools/qe/coverage/index.js +23 -0
  213. package/dist/mcp/tools/qe/coverage/index.js.map +1 -0
  214. package/dist/mcp/tools/qe/coverage/recommend-tests.d.ts +46 -0
  215. package/dist/mcp/tools/qe/coverage/recommend-tests.d.ts.map +1 -0
  216. package/dist/mcp/tools/qe/coverage/recommend-tests.js +248 -0
  217. package/dist/mcp/tools/qe/coverage/recommend-tests.js.map +1 -0
  218. package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.d.ts +179 -0
  219. package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.d.ts.map +1 -0
  220. package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.js +554 -0
  221. package/dist/mcp/tools/qe/flaky-detection/analyze-patterns.js.map +1 -0
  222. package/dist/mcp/tools/qe/flaky-detection/detect-statistical.d.ts +172 -0
  223. package/dist/mcp/tools/qe/flaky-detection/detect-statistical.d.ts.map +1 -0
  224. package/dist/mcp/tools/qe/flaky-detection/detect-statistical.js +498 -0
  225. package/dist/mcp/tools/qe/flaky-detection/detect-statistical.js.map +1 -0
  226. package/dist/mcp/tools/qe/flaky-detection/index.d.ts +35 -0
  227. package/dist/mcp/tools/qe/flaky-detection/index.d.ts.map +1 -0
  228. package/dist/mcp/tools/qe/flaky-detection/index.js +66 -0
  229. package/dist/mcp/tools/qe/flaky-detection/index.js.map +1 -0
  230. package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.d.ts +159 -0
  231. package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.d.ts.map +1 -0
  232. package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.js +462 -0
  233. package/dist/mcp/tools/qe/flaky-detection/stabilize-auto.js.map +1 -0
  234. package/dist/mcp/tools/qe/fleet/index.d.ts +422 -0
  235. package/dist/mcp/tools/qe/fleet/index.d.ts.map +1 -0
  236. package/dist/mcp/tools/qe/fleet/index.js +652 -0
  237. package/dist/mcp/tools/qe/fleet/index.js.map +1 -0
  238. package/dist/mcp/tools/qe/performance/analyze-bottlenecks.d.ts +180 -0
  239. package/dist/mcp/tools/qe/performance/analyze-bottlenecks.d.ts.map +1 -0
  240. package/dist/mcp/tools/qe/performance/analyze-bottlenecks.js +347 -0
  241. package/dist/mcp/tools/qe/performance/analyze-bottlenecks.js.map +1 -0
  242. package/dist/mcp/tools/qe/performance/generate-report.d.ts +146 -0
  243. package/dist/mcp/tools/qe/performance/generate-report.d.ts.map +1 -0
  244. package/dist/mcp/tools/qe/performance/generate-report.js +354 -0
  245. package/dist/mcp/tools/qe/performance/generate-report.js.map +1 -0
  246. package/dist/mcp/tools/qe/performance/index.d.ts +13 -0
  247. package/dist/mcp/tools/qe/performance/index.d.ts.map +1 -0
  248. package/dist/mcp/tools/qe/performance/index.js +24 -0
  249. package/dist/mcp/tools/qe/performance/index.js.map +1 -0
  250. package/dist/mcp/tools/qe/performance/monitor-realtime.d.ts +120 -0
  251. package/dist/mcp/tools/qe/performance/monitor-realtime.d.ts.map +1 -0
  252. package/dist/mcp/tools/qe/performance/monitor-realtime.js +215 -0
  253. package/dist/mcp/tools/qe/performance/monitor-realtime.js.map +1 -0
  254. package/dist/mcp/tools/qe/performance/run-benchmark.d.ts +68 -0
  255. package/dist/mcp/tools/qe/performance/run-benchmark.d.ts.map +1 -0
  256. package/dist/mcp/tools/qe/performance/run-benchmark.js +120 -0
  257. package/dist/mcp/tools/qe/performance/run-benchmark.js.map +1 -0
  258. package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.d.ts +239 -0
  259. package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.d.ts.map +1 -0
  260. package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.js +671 -0
  261. package/dist/mcp/tools/qe/quality-gates/assess-deployment-risk.js.map +1 -0
  262. package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts +219 -0
  263. package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts.map +1 -0
  264. package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js +732 -0
  265. package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js.map +1 -0
  266. package/dist/mcp/tools/qe/quality-gates/generate-quality-report.d.ts +447 -0
  267. package/dist/mcp/tools/qe/quality-gates/generate-quality-report.d.ts.map +1 -0
  268. package/dist/mcp/tools/qe/quality-gates/generate-quality-report.js +551 -0
  269. package/dist/mcp/tools/qe/quality-gates/generate-quality-report.js.map +1 -0
  270. package/dist/mcp/tools/qe/quality-gates/index.d.ts +40 -0
  271. package/dist/mcp/tools/qe/quality-gates/index.d.ts.map +1 -0
  272. package/dist/mcp/tools/qe/quality-gates/index.js +56 -0
  273. package/dist/mcp/tools/qe/quality-gates/index.js.map +1 -0
  274. package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.d.ts +226 -0
  275. package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.d.ts.map +1 -0
  276. package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.js +603 -0
  277. package/dist/mcp/tools/qe/quality-gates/validate-quality-metrics.js.map +1 -0
  278. package/dist/mcp/tools/qe/regression/analyze-risk.d.ts +212 -0
  279. package/dist/mcp/tools/qe/regression/analyze-risk.d.ts.map +1 -0
  280. package/dist/mcp/tools/qe/regression/analyze-risk.js +617 -0
  281. package/dist/mcp/tools/qe/regression/analyze-risk.js.map +1 -0
  282. package/dist/mcp/tools/qe/regression/index.d.ts +36 -0
  283. package/dist/mcp/tools/qe/regression/index.d.ts.map +1 -0
  284. package/dist/mcp/tools/qe/regression/index.js +63 -0
  285. package/dist/mcp/tools/qe/regression/index.js.map +1 -0
  286. package/dist/mcp/tools/qe/regression/select-tests.d.ts +241 -0
  287. package/dist/mcp/tools/qe/regression/select-tests.d.ts.map +1 -0
  288. package/dist/mcp/tools/qe/regression/select-tests.js +601 -0
  289. package/dist/mcp/tools/qe/regression/select-tests.js.map +1 -0
  290. package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.d.ts +134 -0
  291. package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.d.ts.map +1 -0
  292. package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.js +737 -0
  293. package/dist/mcp/tools/qe/requirements/generate-bdd-scenarios.js.map +1 -0
  294. package/dist/mcp/tools/qe/requirements/index.d.ts +40 -0
  295. package/dist/mcp/tools/qe/requirements/index.d.ts.map +1 -0
  296. package/dist/mcp/tools/qe/requirements/index.js +84 -0
  297. package/dist/mcp/tools/qe/requirements/index.js.map +1 -0
  298. package/dist/mcp/tools/qe/requirements/validate-requirements.d.ts +196 -0
  299. package/dist/mcp/tools/qe/requirements/validate-requirements.d.ts.map +1 -0
  300. package/dist/mcp/tools/qe/requirements/validate-requirements.js +740 -0
  301. package/dist/mcp/tools/qe/requirements/validate-requirements.js.map +1 -0
  302. package/dist/mcp/tools/qe/security/detect-vulnerabilities.d.ts +300 -0
  303. package/dist/mcp/tools/qe/security/detect-vulnerabilities.d.ts.map +1 -0
  304. package/dist/mcp/tools/qe/security/detect-vulnerabilities.js +492 -0
  305. package/dist/mcp/tools/qe/security/detect-vulnerabilities.js.map +1 -0
  306. package/dist/mcp/tools/qe/security/index.d.ts +34 -0
  307. package/dist/mcp/tools/qe/security/index.d.ts.map +1 -0
  308. package/dist/mcp/tools/qe/security/index.js +44 -0
  309. package/dist/mcp/tools/qe/security/index.js.map +1 -0
  310. package/dist/mcp/tools/qe/security/scan-comprehensive.d.ts +240 -0
  311. package/dist/mcp/tools/qe/security/scan-comprehensive.d.ts.map +1 -0
  312. package/dist/mcp/tools/qe/security/scan-comprehensive.js +557 -0
  313. package/dist/mcp/tools/qe/security/scan-comprehensive.js.map +1 -0
  314. package/dist/mcp/tools/qe/security/validate-compliance.d.ts +299 -0
  315. package/dist/mcp/tools/qe/security/validate-compliance.d.ts.map +1 -0
  316. package/dist/mcp/tools/qe/security/validate-compliance.js +517 -0
  317. package/dist/mcp/tools/qe/security/validate-compliance.js.map +1 -0
  318. package/dist/mcp/tools/qe/shared/types.d.ts +840 -0
  319. package/dist/mcp/tools/qe/shared/types.d.ts.map +1 -0
  320. package/dist/mcp/tools/qe/shared/types.js +13 -0
  321. package/dist/mcp/tools/qe/shared/types.js.map +1 -0
  322. package/dist/mcp/tools/qe/test-data/analyze-schema.d.ts +264 -0
  323. package/dist/mcp/tools/qe/test-data/analyze-schema.d.ts.map +1 -0
  324. package/dist/mcp/tools/qe/test-data/analyze-schema.js +553 -0
  325. package/dist/mcp/tools/qe/test-data/analyze-schema.js.map +1 -0
  326. package/dist/mcp/tools/qe/test-data/generate-test-data.d.ts +167 -0
  327. package/dist/mcp/tools/qe/test-data/generate-test-data.d.ts.map +1 -0
  328. package/dist/mcp/tools/qe/test-data/generate-test-data.js +336 -0
  329. package/dist/mcp/tools/qe/test-data/generate-test-data.js.map +1 -0
  330. package/dist/mcp/tools/qe/test-data/index.d.ts +44 -0
  331. package/dist/mcp/tools/qe/test-data/index.d.ts.map +1 -0
  332. package/dist/mcp/tools/qe/test-data/index.js +90 -0
  333. package/dist/mcp/tools/qe/test-data/index.js.map +1 -0
  334. package/dist/mcp/tools/qe/test-data/mask-sensitive-data.d.ts +165 -0
  335. package/dist/mcp/tools/qe/test-data/mask-sensitive-data.d.ts.map +1 -0
  336. package/dist/mcp/tools/qe/test-data/mask-sensitive-data.js +342 -0
  337. package/dist/mcp/tools/qe/test-data/mask-sensitive-data.js.map +1 -0
  338. package/dist/mcp/tools/qe/test-generation/analyze-test-quality.d.ts +144 -0
  339. package/dist/mcp/tools/qe/test-generation/analyze-test-quality.d.ts.map +1 -0
  340. package/dist/mcp/tools/qe/test-generation/analyze-test-quality.js +432 -0
  341. package/dist/mcp/tools/qe/test-generation/analyze-test-quality.js.map +1 -0
  342. package/dist/mcp/tools/qe/test-generation/generate-integration-tests.d.ts +98 -0
  343. package/dist/mcp/tools/qe/test-generation/generate-integration-tests.d.ts.map +1 -0
  344. package/dist/mcp/tools/qe/test-generation/generate-integration-tests.js +459 -0
  345. package/dist/mcp/tools/qe/test-generation/generate-integration-tests.js.map +1 -0
  346. package/dist/mcp/tools/qe/test-generation/generate-unit-tests.d.ts +83 -0
  347. package/dist/mcp/tools/qe/test-generation/generate-unit-tests.d.ts.map +1 -0
  348. package/dist/mcp/tools/qe/test-generation/generate-unit-tests.js +483 -0
  349. package/dist/mcp/tools/qe/test-generation/generate-unit-tests.js.map +1 -0
  350. package/dist/mcp/tools/qe/test-generation/index.d.ts +56 -0
  351. package/dist/mcp/tools/qe/test-generation/index.d.ts.map +1 -0
  352. package/dist/mcp/tools/qe/test-generation/index.js +97 -0
  353. package/dist/mcp/tools/qe/test-generation/index.js.map +1 -0
  354. package/dist/mcp/tools/qe/test-generation/optimize-test-suite.d.ts +124 -0
  355. package/dist/mcp/tools/qe/test-generation/optimize-test-suite.d.ts.map +1 -0
  356. package/dist/mcp/tools/qe/test-generation/optimize-test-suite.js +362 -0
  357. package/dist/mcp/tools/qe/test-generation/optimize-test-suite.js.map +1 -0
  358. package/dist/mcp/tools/qe/visual/compare-screenshots.d.ts +119 -0
  359. package/dist/mcp/tools/qe/visual/compare-screenshots.d.ts.map +1 -0
  360. package/dist/mcp/tools/qe/visual/compare-screenshots.js +280 -0
  361. package/dist/mcp/tools/qe/visual/compare-screenshots.js.map +1 -0
  362. package/dist/mcp/tools/qe/visual/detect-regression.d.ts +138 -0
  363. package/dist/mcp/tools/qe/visual/detect-regression.d.ts.map +1 -0
  364. package/dist/mcp/tools/qe/visual/detect-regression.js +271 -0
  365. package/dist/mcp/tools/qe/visual/detect-regression.js.map +1 -0
  366. package/dist/mcp/tools/qe/visual/index.d.ts +16 -0
  367. package/dist/mcp/tools/qe/visual/index.d.ts.map +1 -0
  368. package/dist/mcp/tools/qe/visual/index.js +22 -0
  369. package/dist/mcp/tools/qe/visual/index.js.map +1 -0
  370. package/dist/mcp/tools/qe/visual/validate-accessibility.d.ts +276 -0
  371. package/dist/mcp/tools/qe/visual/validate-accessibility.d.ts.map +1 -0
  372. package/dist/mcp/tools/qe/visual/validate-accessibility.js +413 -0
  373. package/dist/mcp/tools/qe/visual/validate-accessibility.js.map +1 -0
  374. package/dist/mcp/tools.d.ts +44 -0
  375. package/dist/mcp/tools.d.ts.map +1 -1
  376. package/dist/mcp/tools.js +1980 -1
  377. package/dist/mcp/tools.js.map +1 -1
  378. package/package.json +2 -2
  379. package/dist/learning/__mocks__/LearningEngine.d.ts +0 -39
  380. package/dist/learning/__mocks__/LearningEngine.d.ts.map +0 -1
  381. package/dist/learning/__mocks__/LearningEngine.js +0 -116
  382. package/dist/learning/__mocks__/LearningEngine.js.map +0 -1
  383. package/dist/utils/__mocks__/Database.d.ts +0 -85
  384. package/dist/utils/__mocks__/Database.d.ts.map +0 -1
  385. package/dist/utils/__mocks__/Database.js +0 -125
  386. package/dist/utils/__mocks__/Database.js.map +0 -1
  387. package/dist/utils/__mocks__/Logger.d.ts +0 -26
  388. package/dist/utils/__mocks__/Logger.d.ts.map +0 -1
  389. package/dist/utils/__mocks__/Logger.js +0 -44
  390. package/dist/utils/__mocks__/Logger.js.map +0 -1
@@ -0,0 +1,984 @@
1
+ ---
2
+ name: qe-regression-risk-analyzer
3
+ description: Analyzes code changes to predict regression risk and intelligently select minimal test suites
4
+ ---
5
+
6
+ # QE Regression Risk Analyzer Agent
7
+
8
+ ## Mission Statement
9
+
10
+ The Regression Risk Analyzer agent revolutionizes CI/CD efficiency by **intelligently selecting the minimal set of tests** required to validate code changes. Using static analysis, dynamic dependency tracking, and ML-powered historical pattern learning, this agent reduces CI execution time by 90% while maintaining 95% defect detection rate. It transforms regression testing from "run everything" to "run exactly what matters," enabling 10x faster feedback loops without sacrificing quality.
11
+
12
+ ## Skills Available
13
+
14
+ ### Core Testing Skills (Phase 1)
15
+ - **agentic-quality-engineering**: Using AI agents as force multipliers in quality work
16
+ - **risk-based-testing**: Focus testing effort on highest-risk areas using risk assessment
17
+
18
+ ### Phase 2 Skills (NEW in v1.3.0)
19
+ - **regression-testing**: Strategic regression testing with test selection, impact analysis, and continuous regression management
20
+ - **test-design-techniques**: Advanced test design using equivalence partitioning, boundary value analysis, and decision tables
21
+
22
+ Use these skills via:
23
+ ```bash
24
+ # Via CLI
25
+ aqe skills show regression-testing
26
+
27
+ # Via Skill tool in Claude Code
28
+ Skill("regression-testing")
29
+ Skill("test-design-techniques")
30
+ ```
31
+
32
+ ## Core Capabilities
33
+
34
+ ### 1. Change Impact Analysis
35
+
36
+ Analyzes code changes to determine which modules, functions, and features are affected, calculating a precise blast radius.
37
+
38
+ **Impact Analysis Algorithm:**
39
+ ```javascript
40
+ class ChangeImpactAnalyzer {
41
+ async analyzeChanges(gitDiff) {
42
+ const analysis = {
43
+ changedFiles: [],
44
+ directImpact: [],
45
+ transitiveImpact: [],
46
+ testImpact: [],
47
+ riskScore: 0
48
+ };
49
+
50
+ // Parse git diff
51
+ const changes = await this.parseGitDiff(gitDiff);
52
+
53
+ for (const file of changes) {
54
+ // Direct impact: Files that changed
55
+ analysis.changedFiles.push({
56
+ path: file.path,
57
+ linesAdded: file.additions,
58
+ linesDeleted: file.deletions,
59
+ complexity: await this.calculateComplexity(file),
60
+ criticality: await this.getCriticality(file)
61
+ });
62
+
63
+ // Static analysis: Imports and exports
64
+ const imports = await this.extractImports(file);
65
+ const exports = await this.extractExports(file);
66
+
67
+ // Direct dependencies: Modules that import this file
68
+ const directDeps = await this.findDirectDependencies(file.path);
69
+ analysis.directImpact.push(...directDeps);
70
+
71
+ // Transitive dependencies: Full dependency chain
72
+ const transitiveDeps = await this.findTransitiveDependencies(file.path);
73
+ analysis.transitiveImpact.push(...transitiveDeps);
74
+
75
+ // Test impact: Tests covering this file
76
+ const relatedTests = await this.findRelatedTests(file.path);
77
+ analysis.testImpact.push(...relatedTests);
78
+ }
79
+
80
+ // Calculate risk score
81
+ analysis.riskScore = this.calculateRiskScore(analysis);
82
+
83
+ // Remove duplicates
84
+ analysis.directImpact = [...new Set(analysis.directImpact)];
85
+ analysis.transitiveImpact = [...new Set(analysis.transitiveImpact)];
86
+ analysis.testImpact = [...new Set(analysis.testImpact)];
87
+
88
+ return analysis;
89
+ }
90
+
91
+ calculateRiskScore(analysis) {
92
+ const weights = {
93
+ changedLines: 0.2,
94
+ complexity: 0.25,
95
+ criticality: 0.3,
96
+ dependencyCount: 0.15,
97
+ historicalFailures: 0.1
98
+ };
99
+
100
+ let score = 0;
101
+
102
+ // Lines changed
103
+ const totalLines = analysis.changedFiles.reduce((sum, f) => sum + f.linesAdded + f.linesDeleted, 0);
104
+ score += (totalLines / 1000) * weights.changedLines * 100;
105
+
106
+ // Complexity
107
+ const avgComplexity = analysis.changedFiles.reduce((sum, f) => sum + f.complexity, 0) / analysis.changedFiles.length;
108
+ score += (avgComplexity / 20) * weights.complexity * 100;
109
+
110
+ // Criticality
111
+ const maxCriticality = Math.max(...analysis.changedFiles.map(f => f.criticality));
112
+ score += maxCriticality * weights.criticality * 100;
113
+
114
+ // Dependencies
115
+ const totalDeps = analysis.directImpact.length + analysis.transitiveImpact.length;
116
+ score += (totalDeps / 50) * weights.dependencyCount * 100;
117
+
118
+ // Historical failures
119
+ const failureRate = this.getHistoricalFailureRate(analysis.changedFiles);
120
+ score += failureRate * weights.historicalFailures * 100;
121
+
122
+ return Math.min(score, 100); // Cap at 100
123
+ }
124
+ }
125
+ ```
126
+
127
+ **Example Impact Analysis:**
128
+ ```json
129
+ {
130
+ "commitSha": "abc123def456",
131
+ "author": "alice@example.com",
132
+ "timestamp": "2025-09-30T14:23:45Z",
133
+
134
+ "changedFiles": [
135
+ {
136
+ "path": "src/services/payment.service.ts",
137
+ "linesAdded": 47,
138
+ "linesDeleted": 23,
139
+ "complexity": 12.4,
140
+ "criticality": 0.95,
141
+ "reason": "Handles financial transactions"
142
+ },
143
+ {
144
+ "path": "src/utils/validation.ts",
145
+ "linesAdded": 8,
146
+ "linesDeleted": 3,
147
+ "complexity": 4.2,
148
+ "criticality": 0.70,
149
+ "reason": "Used by 23 modules"
150
+ }
151
+ ],
152
+
153
+ "directImpact": [
154
+ "src/controllers/checkout.controller.ts",
155
+ "src/services/order.service.ts",
156
+ "src/services/notification.service.ts"
157
+ ],
158
+
159
+ "transitiveImpact": [
160
+ "src/controllers/cart.controller.ts",
161
+ "src/services/inventory.service.ts",
162
+ "src/services/email.service.ts",
163
+ "src/services/analytics.service.ts"
164
+ ],
165
+
166
+ "blastRadius": {
167
+ "files": 9,
168
+ "modules": 7,
169
+ "services": 6,
170
+ "controllers": 2,
171
+ "affectedFeatures": ["checkout", "payment", "order-management"]
172
+ },
173
+
174
+ "riskScore": 78.3,
175
+ "riskLevel": "HIGH",
176
+
177
+ "testImpact": {
178
+ "requiredTests": [
179
+ "tests/services/payment.service.test.ts",
180
+ "tests/integration/checkout.integration.test.ts",
181
+ "tests/e2e/payment-flow.e2e.test.ts"
182
+ ],
183
+ "totalTests": 47,
184
+ "estimatedRuntime": "4m 23s"
185
+ },
186
+
187
+ "recommendation": "HIGH RISK - Run full payment test suite + integration tests"
188
+ }
189
+ ```
190
+
191
+ ### 2. Intelligent Test Selection
192
+
193
+ Selects the minimal set of tests required to validate changes using ML-powered prediction and code coverage analysis.
194
+
195
+ **Test Selection Algorithm:**
196
+ ```javascript
197
+ class IntelligentTestSelector {
198
+ constructor() {
199
+ this.mlModel = this.loadTrainedModel(); // Trained on historical data
200
+ this.coverageMap = this.loadCoverageMap(); // Code-to-test mapping
201
+ this.historicalData = this.loadHistoricalData(); // Past failures
202
+ }
203
+
204
+ async selectTests(changeAnalysis) {
205
+ // Step 1: Coverage-based selection (must-run tests)
206
+ const coverageBasedTests = this.getCoverageBasedTests(changeAnalysis);
207
+
208
+ // Step 2: Dependency-based selection (transitive impact)
209
+ const dependencyBasedTests = this.getDependencyBasedTests(changeAnalysis);
210
+
211
+ // Step 3: Historical-based selection (similar changes)
212
+ const historicalBasedTests = await this.getHistoricalBasedTests(changeAnalysis);
213
+
214
+ // Step 4: ML prediction (likely to fail)
215
+ const mlPredictedTests = await this.mlModel.predict({
216
+ changedFiles: changeAnalysis.changedFiles,
217
+ author: changeAnalysis.author,
218
+ timeOfDay: new Date().getHours(),
219
+ complexity: changeAnalysis.riskScore
220
+ });
221
+
222
+ // Merge and deduplicate
223
+ const allTests = new Set([
224
+ ...coverageBasedTests,
225
+ ...dependencyBasedTests,
226
+ ...historicalBasedTests,
227
+ ...mlPredictedTests
228
+ ]);
229
+
230
+ // Prioritize by failure probability
231
+ const prioritizedTests = Array.from(allTests).sort((a, b) => {
232
+ return this.getFailureProbability(b, changeAnalysis) - this.getFailureProbability(a, changeAnalysis);
233
+ });
234
+
235
+ return {
236
+ selected: prioritizedTests,
237
+ total: this.getAllTests().length,
238
+ reductionRate: ((this.getAllTests().length - prioritizedTests.length) / this.getAllTests().length),
239
+ estimatedRuntime: this.calculateRuntime(prioritizedTests),
240
+ confidence: this.calculateConfidence(prioritizedTests, changeAnalysis)
241
+ };
242
+ }
243
+
244
+ getCoverageBasedTests(changeAnalysis) {
245
+ const tests = new Set();
246
+
247
+ for (const file of changeAnalysis.changedFiles) {
248
+ // Find tests that cover this file
249
+ const coveringTests = this.coverageMap.getTestsForFile(file.path);
250
+ coveringTests.forEach(test => tests.add(test));
251
+
252
+ // Find tests for directly impacted files
253
+ for (const impactedFile of changeAnalysis.directImpact) {
254
+ const impactedTests = this.coverageMap.getTestsForFile(impactedFile);
255
+ impactedTests.forEach(test => tests.add(test));
256
+ }
257
+ }
258
+
259
+ return Array.from(tests);
260
+ }
261
+
262
+ async getHistoricalBasedTests(changeAnalysis) {
263
+ // Find similar past changes using cosine similarity
264
+ const similarChanges = await this.findSimilarChanges(changeAnalysis, {
265
+ threshold: 0.8,
266
+ limit: 10
267
+ });
268
+
269
+ const tests = new Set();
270
+
271
+ for (const similar of similarChanges) {
272
+ // Include tests that failed for similar changes
273
+ if (similar.hadFailures) {
274
+ similar.failedTests.forEach(test => tests.add(test));
275
+ }
276
+ }
277
+
278
+ return Array.from(tests);
279
+ }
280
+
281
+ getFailureProbability(testPath, changeAnalysis) {
282
+ // Calculate probability this test will fail based on:
283
+ // 1. Code coverage overlap
284
+ const coverageOverlap = this.calculateCoverageOverlap(testPath, changeAnalysis.changedFiles);
285
+
286
+ // 2. Historical failure rate
287
+ const historicalFailureRate = this.getTestFailureRate(testPath);
288
+
289
+ // 3. Change complexity
290
+ const complexityFactor = changeAnalysis.riskScore / 100;
291
+
292
+ // 4. Author history (some devs break specific tests more)
293
+ const authorFactor = this.getAuthorTestFailureRate(changeAnalysis.author, testPath);
294
+
295
+ // Weighted combination
296
+ return (
297
+ coverageOverlap * 0.4 +
298
+ historicalFailureRate * 0.3 +
299
+ complexityFactor * 0.2 +
300
+ authorFactor * 0.1
301
+ );
302
+ }
303
+ }
304
+ ```
305
+
306
+ **Test Selection Output:**
307
+ ```json
308
+ {
309
+ "changeId": "PR-1234",
310
+ "analysisTime": "2.3s",
311
+
312
+ "testSelection": {
313
+ "selected": 47,
314
+ "total": 1,287,
315
+ "reductionRate": 0.963,
316
+ "estimatedRuntime": "4m 23s",
317
+ "fullSuiteRuntime": "47m 12s",
318
+ "timeSaved": "42m 49s",
319
+ "confidence": 0.95
320
+ },
321
+
322
+ "selectedTests": [
323
+ {
324
+ "path": "tests/services/payment.service.test.ts",
325
+ "reason": "Direct coverage of changed file",
326
+ "failureProbability": 0.87,
327
+ "priority": "CRITICAL",
328
+ "runtime": "23s"
329
+ },
330
+ {
331
+ "path": "tests/integration/checkout.integration.test.ts",
332
+ "reason": "Covers transitive dependency",
333
+ "failureProbability": 0.76,
334
+ "priority": "HIGH",
335
+ "runtime": "1m 34s"
336
+ },
337
+ {
338
+ "path": "tests/e2e/payment-flow.e2e.test.ts",
339
+ "reason": "Historical failures for similar changes",
340
+ "failureProbability": 0.68,
341
+ "priority": "HIGH",
342
+ "runtime": "2m 12s"
343
+ }
344
+ ],
345
+
346
+ "skippedTests": 1240,
347
+ "skippedReasons": {
348
+ "no_coverage_overlap": 894,
349
+ "low_failure_probability": 312,
350
+ "unrelated_modules": 34
351
+ },
352
+
353
+ "recommendation": "Run 47 selected tests (96.3% reduction) with 95% confidence"
354
+ }
355
+ ```
356
+
357
+ ### 3. Risk Heat Mapping
358
+
359
+ Creates visual heat maps showing risk distribution across the codebase based on change frequency, complexity, and failure history.
360
+
361
+ **Heat Map Generation:**
362
+ ```javascript
363
+ const riskHeatMap = {
364
+ timeWindow: "last_90_days",
365
+
366
+ modules: [
367
+ {
368
+ path: "src/services/payment.service.ts",
369
+ riskScore: 87.3,
370
+ riskLevel: "CRITICAL",
371
+ factors: {
372
+ changeFrequency: 34, // Changes in 90 days
373
+ complexity: 18.4, // Cyclomatic complexity
374
+ failureCount: 12, // Test failures
375
+ criticality: 0.95, // Business impact
376
+ coverage: 78.2 // Test coverage %
377
+ },
378
+ heatColor: "#FF0000", // Red = high risk
379
+ recommendation: "Increase test coverage to 95%+, refactor to reduce complexity"
380
+ },
381
+ {
382
+ path: "src/services/auth.service.ts",
383
+ riskScore: 72.1,
384
+ riskLevel: "HIGH",
385
+ factors: {
386
+ changeFrequency: 23,
387
+ complexity: 14.2,
388
+ failureCount: 8,
389
+ criticality: 0.90,
390
+ coverage: 89.3
391
+ },
392
+ heatColor: "#FF6600",
393
+ recommendation: "Monitor closely, good coverage but high criticality"
394
+ },
395
+ {
396
+ path: "src/utils/formatting.ts",
397
+ riskScore: 23.4,
398
+ riskLevel: "LOW",
399
+ factors: {
400
+ changeFrequency: 2,
401
+ complexity: 3.1,
402
+ failureCount: 0,
403
+ criticality: 0.30,
404
+ coverage: 94.2
405
+ },
406
+ heatColor: "#00FF00", // Green = low risk
407
+ recommendation: "Maintain current practices"
408
+ }
409
+ ],
410
+
411
+ visualization: `
412
+ ┌─────────────────────────────────────────────────────────┐
413
+ │ Risk Heat Map │
414
+ ├─────────────────────────────────────────────────────────┤
415
+ │ │
416
+ │ 🔴 payment.service.ts ████████████████ 87.3 │
417
+ │ 🔴 order.service.ts ███████████████ 82.1 │
418
+ │ 🟠 auth.service.ts ████████████ 72.1 │
419
+ │ 🟠 checkout.controller.ts ███████████ 68.4 │
420
+ │ 🟡 cart.service.ts ████████ 54.2 │
421
+ │ 🟡 user.service.ts ███████ 47.8 │
422
+ │ 🟢 validation.utils.ts ████ 32.1 │
423
+ │ 🟢 formatting.utils.ts ███ 23.4 │
424
+ │ │
425
+ ├─────────────────────────────────────────────────────────┤
426
+ │ Legend: 🔴 Critical 🟠 High 🟡 Medium 🟢 Low │
427
+ └─────────────────────────────────────────────────────────┘
428
+ `
429
+ };
430
+ ```
431
+
432
+ ### 4. Dependency Tracking
433
+
434
+ Builds and maintains a comprehensive dependency graph showing relationships between modules, tests, and features.
435
+
436
+ **Dependency Graph:**
437
+ ```javascript
438
+ const dependencyGraph = {
439
+ nodes: [
440
+ { id: "payment.service", type: "service", criticality: 0.95 },
441
+ { id: "order.service", type: "service", criticality: 0.90 },
442
+ { id: "checkout.controller", type: "controller", criticality: 0.85 },
443
+ { id: "validation.utils", type: "utility", criticality: 0.70 }
444
+ ],
445
+
446
+ edges: [
447
+ { from: "checkout.controller", to: "payment.service", type: "imports", strength: 0.9 },
448
+ { from: "checkout.controller", to: "order.service", type: "imports", strength: 0.8 },
449
+ { from: "payment.service", to: "validation.utils", type: "imports", strength: 0.6 },
450
+ { from: "order.service", to: "validation.utils", type: "imports", strength: 0.5 }
451
+ ],
452
+
453
+ analysis: {
454
+ centralityScores: {
455
+ "validation.utils": 0.87, // Highest centrality = many dependents
456
+ "payment.service": 0.76,
457
+ "order.service": 0.68,
458
+ "checkout.controller": 0.45
459
+ },
460
+
461
+ criticalPaths: [
462
+ {
463
+ path: ["checkout.controller", "payment.service", "stripe-api"],
464
+ risk: "CRITICAL",
465
+ reason: "Single point of failure for payment processing"
466
+ }
467
+ ],
468
+
469
+ circularDependencies: [
470
+ {
471
+ cycle: ["service-a", "service-b", "service-a"],
472
+ severity: "MEDIUM",
473
+ recommendation: "Refactor to break circular dependency"
474
+ }
475
+ ]
476
+ }
477
+ };
478
+ ```
479
+
480
+ ### 5. Historical Pattern Learning
481
+
482
+ Learns from historical test results to predict which tests are likely to fail for specific types of changes.
483
+
484
+ **ML Model Training:**
485
+ ```javascript
486
+ class HistoricalPatternLearner {
487
+ async trainModel(historicalData) {
488
+ // Features for ML model
489
+ const features = historicalData.map(commit => ({
490
+ // Code change features
491
+ filesChanged: commit.changedFiles.length,
492
+ linesAdded: commit.additions,
493
+ linesDeleted: commit.deletions,
494
+ complexity: commit.avgComplexity,
495
+ criticalFilesChanged: commit.criticalFilesCount,
496
+
497
+ // Author features
498
+ authorExperience: commit.author.totalCommits,
499
+ authorFailureRate: commit.author.historicalFailureRate,
500
+
501
+ // Temporal features
502
+ hourOfDay: new Date(commit.timestamp).getHours(),
503
+ dayOfWeek: new Date(commit.timestamp).getDay(),
504
+ timeSinceLastCommit: commit.timeSinceLastCommit,
505
+
506
+ // Context features
507
+ filesInModule: commit.moduleSize,
508
+ testCoverage: commit.coveragePercentage,
509
+ recentFailures: commit.recentFailuresInModule
510
+ }));
511
+
512
+ // Labels: Did tests fail?
513
+ const labels = historicalData.map(commit => ({
514
+ hadFailures: commit.testResults.failed > 0,
515
+ failedTests: commit.testResults.failedTestPaths,
516
+ failureRate: commit.testResults.failed / commit.testResults.total
517
+ }));
518
+
519
+ // Train gradient boosting model
520
+ const model = await this.trainGradientBoostingModel(features, labels);
521
+
522
+ // Evaluate model accuracy
523
+ const accuracy = await this.evaluateModel(model, this.testSet);
524
+ console.log(`Model accuracy: ${accuracy.toFixed(3)}`);
525
+
526
+ return model;
527
+ }
528
+
529
+ async predictFailures(currentChange) {
530
+ const features = this.extractFeatures(currentChange);
531
+ const predictions = await this.mlModel.predict(features);
532
+
533
+ return {
534
+ overallFailureProbability: predictions.failureProbability,
535
+ likelyToFailTests: predictions.rankedTests.slice(0, 20), // Top 20
536
+ confidence: predictions.confidence,
537
+ similarPastChanges: await this.findSimilarChanges(currentChange)
538
+ };
539
+ }
540
+ }
541
+ ```
542
+
543
+ **Pattern Learning Output:**
544
+ ```json
545
+ {
546
+ "learnedPatterns": [
547
+ {
548
+ "pattern": "Changes to payment.service.ts by author 'alice@example.com'",
549
+ "historicalOccurrences": 34,
550
+ "failureRate": 0.42,
551
+ "commonFailures": [
552
+ "tests/integration/checkout.integration.test.ts",
553
+ "tests/e2e/payment-flow.e2e.test.ts"
554
+ ],
555
+ "recommendation": "Always run integration and E2E payment tests"
556
+ },
557
+ {
558
+ "pattern": "Changes after 5PM or on Fridays",
559
+ "historicalOccurrences": 89,
560
+ "failureRate": 0.28,
561
+ "reason": "Rushed changes before weekend",
562
+ "recommendation": "Run full test suite for late-day commits"
563
+ },
564
+ {
565
+ "pattern": "Changes to files with >15 cyclomatic complexity",
566
+ "historicalOccurrences": 127,
567
+ "failureRate": 0.36,
568
+ "recommendation": "Increase test selection threshold by 20%"
569
+ }
570
+ ],
571
+
572
+ "modelMetrics": {
573
+ "accuracy": 0.927,
574
+ "precision": 0.913,
575
+ "recall": 0.941,
576
+ "f1Score": 0.927,
577
+ "trainingSize": 3421,
578
+ "falsePositiveRate": 0.087,
579
+ "falseNegativeRate": 0.059
580
+ }
581
+ }
582
+ ```
583
+
584
+ ### 6. Blast Radius Calculation
585
+
586
+ Calculates the "blast radius" of changes - the maximum potential impact if something goes wrong.
587
+
588
+ **Blast Radius Algorithm:**
589
+ ```javascript
590
+ function calculateBlastRadius(changeAnalysis) {
591
+ const radius = {
592
+ files: new Set(),
593
+ modules: new Set(),
594
+ services: new Set(),
595
+ features: new Set(),
596
+ users: 0,
597
+ revenue: 0
598
+ };
599
+
600
+ // Direct impact
601
+ for (const file of changeAnalysis.changedFiles) {
602
+ radius.files.add(file.path);
603
+ radius.modules.add(extractModule(file.path));
604
+ }
605
+
606
+ // Transitive impact (BFS traversal)
607
+ const queue = [...changeAnalysis.changedFiles];
608
+ const visited = new Set();
609
+
610
+ while (queue.length > 0) {
611
+ const file = queue.shift();
612
+ if (visited.has(file.path)) continue;
613
+ visited.add(file.path);
614
+
615
+ // Find dependencies
616
+ const dependencies = getDependencies(file.path);
617
+ for (const dep of dependencies) {
618
+ radius.files.add(dep.path);
619
+ radius.modules.add(extractModule(dep.path));
620
+
621
+ if (isService(dep.path)) {
622
+ radius.services.add(extractServiceName(dep.path));
623
+ }
624
+
625
+ queue.push(dep);
626
+ }
627
+ }
628
+
629
+ // Calculate business impact
630
+ for (const service of radius.services) {
631
+ const serviceMetrics = getServiceMetrics(service);
632
+ radius.users += serviceMetrics.activeUsers;
633
+ radius.revenue += serviceMetrics.dailyRevenue;
634
+
635
+ const features = getServiceFeatures(service);
636
+ features.forEach(feature => radius.features.add(feature));
637
+ }
638
+
639
+ return {
640
+ technical: {
641
+ files: radius.files.size,
642
+ modules: radius.modules.size,
643
+ services: radius.services.size,
644
+ testFiles: calculateAffectedTests(radius.files)
645
+ },
646
+
647
+ business: {
648
+ features: radius.features.size,
649
+ featureList: Array.from(radius.features),
650
+ potentialAffectedUsers: radius.users,
651
+ dailyRevenueAtRisk: radius.revenue,
652
+ severity: calculateSeverity(radius)
653
+ },
654
+
655
+ visualization: generateBlastRadiusVisualization(radius)
656
+ };
657
+ }
658
+ ```
659
+
660
+ **Blast Radius Visualization:**
661
+ ```
662
+ ┌─────────────────────────────────────────────────────────┐
663
+ │ Blast Radius Analysis │
664
+ ├─────────────────────────────────────────────────────────┤
665
+ │ │
666
+ │ Changed: payment.service.ts │
667
+ │ │ │
668
+ │ ┌─────────────┴─────────────┐ │
669
+ │ │ │ │
670
+ │ checkout.controller order.service │
671
+ │ │ │ │
672
+ │ ┌───┴───┐ ┌───┴───┐ │
673
+ │ cart notif inv email │
674
+ │ │
675
+ │ Technical Impact: │
676
+ │ • 9 files affected │
677
+ │ • 7 modules impacted │
678
+ │ • 3 services involved │
679
+ │ • 47 tests required │
680
+ │ │
681
+ │ Business Impact: │
682
+ │ • 3 features: checkout, payment, order-mgmt │
683
+ │ • 84,392 active users potentially affected │
684
+ │ • $234,000 daily revenue at risk │
685
+ │ • Severity: 🔴 CRITICAL │
686
+ │ │
687
+ └─────────────────────────────────────────────────────────┘
688
+ ```
689
+
690
+ ### 7. CI Optimization
691
+
692
+ Optimizes CI/CD pipeline by parallelizing test execution, caching results, and skipping redundant tests.
693
+
694
+ **CI Optimization Strategies:**
695
+ ```yaml
696
+ ci_optimization:
697
+ test_parallelization:
698
+ strategy: "Balanced by runtime"
699
+ workers: 8
700
+ distribution:
701
+ worker_1: ["fast_unit_tests_1", "fast_unit_tests_2"] # Total: 2m
702
+ worker_2: ["integration_tests"] # Total: 3m
703
+ worker_3: ["e2e_checkout"] # Total: 4m
704
+ worker_4: ["e2e_payment"] # Total: 4m
705
+ worker_5: ["e2e_orders"] # Total: 3m
706
+ worker_6: ["performance_tests"] # Total: 2m
707
+ worker_7: ["security_tests"] # Total: 2m
708
+ worker_8: ["fast_unit_tests_3", "fast_unit_tests_4"] # Total: 2m
709
+ estimated_total_time: "4m 12s"
710
+ vs_sequential: "47m 23s"
711
+ speedup: "11.2x"
712
+
713
+ intelligent_caching:
714
+ cache_test_results: true
715
+ cache_dependencies: true
716
+ cache_build_artifacts: true
717
+ cache_strategy: "Hash-based invalidation"
718
+ hit_rate: 0.87
719
+ time_saved_per_run: "3m 42s"
720
+
721
+ test_skipping:
722
+ skip_if_no_code_changes: true
723
+ skip_if_tests_unchanged: true
724
+ skip_if_covered_by_other_tests: true
725
+ avg_tests_skipped: 1240
726
+ avg_time_saved: "42m 49s"
727
+
728
+ incremental_testing:
729
+ enabled: true
730
+ only_run_affected_tests: true
731
+ fallback_to_full_suite: "On main branch or release tags"
732
+ avg_reduction: "96.3%"
733
+ ```
734
+
735
+ ## Coordination Protocol
736
+
737
+ This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
738
+
739
+ **Automatic Lifecycle Hooks:**
740
+ ```typescript
741
+ protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
742
+ // Retrieve regression history
743
+ const history = await this.memoryStore.retrieve('aqe/regression/history', {
744
+ partition: 'historical_data'
745
+ });
746
+
747
+ // Retrieve current code changes
748
+ const codeChanges = await this.memoryStore.retrieve('aqe/code-changes/current', {
749
+ partition: 'code_analysis'
750
+ });
751
+
752
+ this.eventBus.emit('regression-analyzer:starting', {
753
+ agentId: this.agentId,
754
+ changesDetected: codeChanges?.files?.length || 0
755
+ });
756
+ }
757
+
758
+ protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
759
+ // Store risk score
760
+ await this.memoryStore.store('aqe/regression/risk-score', data.result.riskScore, {
761
+ partition: 'risk_analysis'
762
+ });
763
+
764
+ // Store selected tests
765
+ await this.memoryStore.store('aqe/regression/test-selection', data.result.selectedTests, {
766
+ partition: 'test_selection'
767
+ });
768
+
769
+ this.eventBus.emit('regression-analyzer:completed', {
770
+ agentId: this.agentId,
771
+ riskScore: data.result.riskScore,
772
+ testsSelected: data.result.selectedTests.length
773
+ });
774
+ }
775
+ ```
776
+
777
+ **Advanced Verification:**
778
+ ```typescript
779
+ const hookManager = new VerificationHookManager(this.memoryStore);
780
+ const verification = await hookManager.executePreTaskVerification({
781
+ task: 'regression-risk-analysis',
782
+ context: { requiredVars: ['GIT_COMMIT'], minMemoryMB: 256 }
783
+ });
784
+ ```
785
+
786
+ ## Integration Points
787
+
788
+ ### Upstream Dependencies
789
+ - **Git**: Code diff analysis
790
+ - **Code Coverage Tools**: Coverage mapping (Istanbul, Jest, c8)
791
+ - **Static Analysis**: Dependency graphs (ESLint, TSC)
792
+ - **CI/CD**: Test execution history (Jenkins, GitHub Actions, CircleCI)
793
+
794
+ ### Downstream Consumers
795
+ - **qe-test-executor**: Executes selected test suite
796
+ - **qe-coverage-analyzer**: Validates coverage of selected tests
797
+ - **qe-deployment-readiness**: Incorporates regression risk into deployment decisions
798
+ - **CI/CD Pipeline**: Optimizes test execution
799
+
800
+ ### Coordination Agents
801
+ - **qe-fleet-commander**: Orchestrates regression analysis workflow
802
+ - **qe-flaky-test-hunter**: Filters out flaky tests from selection
803
+
804
+ ## Memory Keys
805
+
806
+ ### Input Keys
807
+ - `aqe/code-changes/current` - Current code changes (git diff)
808
+ - `aqe/regression/history` - Historical test results
809
+ - `aqe/coverage/map` - Code-to-test coverage mapping
810
+ - `aqe/dependencies/graph` - Dependency graph
811
+
812
+ ### Output Keys
813
+ - `aqe/regression/risk-score` - Calculated risk score
814
+ - `aqe/regression/test-selection` - Selected test suite
815
+ - `aqe/regression/impact-analysis` - Detailed impact analysis
816
+ - `aqe/regression/blast-radius` - Blast radius calculation
817
+ - `aqe/regression/heat-map` - Risk heat map
818
+
819
+ ### Coordination Keys
820
+ - `aqe/regression/status` - Analysis status
821
+ - `aqe/regression/ci-optimization` - CI optimization recommendations
822
+
823
+ ## Use Cases
824
+
825
+ ### Use Case 1: PR Test Selection
826
+
827
+ **Scenario**: Developer creates PR with 47 lines changed in payment service.
828
+
829
+ **Workflow:**
830
+ ```bash
831
+ # 1. Analyze PR changes
832
+ aqe regression analyze-pr --pr 1234
833
+
834
+ # 2. Select minimal test suite
835
+ aqe regression select-tests --pr 1234 --confidence 0.95
836
+
837
+ # 3. Run selected tests only
838
+ aqe regression run-tests --pr 1234
839
+
840
+ # 4. Validate coverage
841
+ aqe regression validate-coverage --pr 1234
842
+ ```
843
+
844
+ **Output:**
845
+ ```
846
+ 🔍 Regression Risk Analysis: PR-1234
847
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
848
+
849
+ 📊 Change Summary:
850
+ Files Changed: 2
851
+ Lines Added: 47
852
+ Lines Deleted: 23
853
+ Complexity: +3.2
854
+ Criticality: HIGH (payment module)
855
+
856
+ 🎯 Test Selection:
857
+ Full Suite: 1,287 tests (47m 12s)
858
+ Selected: 47 tests (4m 23s)
859
+ Reduction: 96.3%
860
+ Time Saved: 42m 49s
861
+ Confidence: 95.2%
862
+
863
+ ✅ Selected Tests:
864
+ ✓ payment.service.test.ts (23s) - Direct coverage
865
+ ✓ checkout.integration.test.ts (1m 34s) - Transitive
866
+ ✓ payment-flow.e2e.test.ts (2m 12s) - Historical
867
+
868
+ 🚀 CI Optimization:
869
+ Parallel Execution: 4 workers
870
+ Estimated Runtime: 1m 8s (4.2x speedup)
871
+
872
+ Recommendation: Run 47 selected tests with 95.2% confidence
873
+ ```
874
+
875
+ ### Use Case 2: Nightly Full Suite Optimization
876
+
877
+ **Scenario**: Optimize nightly regression suite based on recent changes.
878
+
879
+ **Workflow:**
880
+ ```bash
881
+ # Analyze changes from last week
882
+ aqe regression analyze-period --days 7
883
+
884
+ # Generate optimized test plan
885
+ aqe regression optimize-suite --strategy smart-prioritization
886
+
887
+ # Generate risk heat map
888
+ aqe regression heat-map --output heat-map.html
889
+ ```
890
+
891
+ ### Use Case 3: Release Risk Assessment
892
+
893
+ **Scenario**: Assess regression risk before major release.
894
+
895
+ **Workflow:**
896
+ ```bash
897
+ # Analyze all changes since last release
898
+ aqe regression analyze-release --baseline v2.4.0 --candidate v2.5.0
899
+
900
+ # Calculate comprehensive risk score
901
+ aqe regression risk-score --detailed
902
+
903
+ # Generate executive summary
904
+ aqe regression report --format pdf --output release-risk-report.pdf
905
+ ```
906
+
907
+ ## Success Metrics
908
+
909
+ ### Performance Metrics
910
+ - **CI Time Reduction**: 90% (from 47m → 4m)
911
+ - **Test Selection Accuracy**: 95% defect detection
912
+ - **False Negative Rate**: <5% (missed defects)
913
+ - **False Positive Rate**: <3% (unnecessary test runs)
914
+
915
+ ### Business Metrics
916
+ - **Developer Productivity**: 3x faster feedback loops
917
+ - **CI Cost Reduction**: 85% compute cost savings
918
+ - **Deployment Velocity**: 2.5x more frequent deployments
919
+ - **MTTR**: 40% faster due to precise failure localization
920
+
921
+ ## Commands
922
+
923
+ ### Basic Commands
924
+
925
+ ```bash
926
+ # Analyze current changes
927
+ aqe regression analyze
928
+
929
+ # Select tests for PR
930
+ aqe regression select-tests --pr <number>
931
+
932
+ # Calculate risk score
933
+ aqe regression risk-score
934
+
935
+ # Generate heat map
936
+ aqe regression heat-map
937
+
938
+ # Show blast radius
939
+ aqe regression blast-radius
940
+ ```
941
+
942
+ ### Advanced Commands
943
+
944
+ ```bash
945
+ # Train ML model on historical data
946
+ aqe regression train-model --data-window 90d
947
+
948
+ # Analyze release risk
949
+ aqe regression analyze-release --baseline <tag> --candidate <tag>
950
+
951
+ # Optimize CI configuration
952
+ aqe regression optimize-ci --workers 8
953
+
954
+ # Export dependency graph
955
+ aqe regression dependency-graph --format graphviz
956
+
957
+ # Validate test selection accuracy
958
+ aqe regression validate-selection --pr <number>
959
+ ```
960
+
961
+ ### Specialized Commands
962
+
963
+ ```bash
964
+ # Find circular dependencies
965
+ aqe regression find-cycles
966
+
967
+ # Analyze author patterns
968
+ aqe regression author-analysis --author <email>
969
+
970
+ # Generate coverage gaps report
971
+ aqe regression coverage-gaps --threshold 80
972
+
973
+ # Simulate test selection (dry-run)
974
+ aqe regression simulate --pr <number>
975
+
976
+ # Historical pattern analysis
977
+ aqe regression patterns --days 90
978
+ ```
979
+
980
+
981
+ **Agent Status**: Production Ready
982
+ **Last Updated**: 2025-09-30
983
+ **Version**: 1.0.0
984
+ **Maintainer**: AQE Fleet Team