agentic-qe 1.2.0 → 1.3.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 (342) hide show
  1. package/.claude/settings.json +44 -6
  2. package/.claude/skills/accessibility-testing/SKILL.md +777 -0
  3. package/.claude/skills/chaos-engineering-resilience/SKILL.md +109 -0
  4. package/.claude/skills/compatibility-testing/SKILL.md +101 -0
  5. package/.claude/skills/compliance-testing/SKILL.md +162 -0
  6. package/.claude/skills/contract-testing/SKILL.md +193 -0
  7. package/.claude/skills/database-testing/SKILL.md +243 -0
  8. package/.claude/skills/localization-testing/SKILL.md +115 -0
  9. package/.claude/skills/mobile-testing/SKILL.md +548 -0
  10. package/.claude/skills/mutation-testing/SKILL.md +129 -0
  11. package/.claude/skills/regression-testing/SKILL.md +1045 -0
  12. package/.claude/skills/shift-left-testing/SKILL.md +535 -0
  13. package/.claude/skills/shift-right-testing/SKILL.md +591 -0
  14. package/.claude/skills/skill-builder/SKILL.md +1 -1
  15. package/.claude/skills/test-data-management/SKILL.md +1067 -0
  16. package/.claude/skills/test-design-techniques/SKILL.md +160 -0
  17. package/.claude/skills/test-environment-management/SKILL.md +204 -0
  18. package/.claude/skills/test-reporting-analytics/SKILL.md +143 -0
  19. package/.claude/skills/visual-testing-advanced/SKILL.md +148 -0
  20. package/CHANGELOG.md +130 -511
  21. package/README.md +21 -10
  22. package/dist/agents/BaseAgent.d.ts.map +1 -1
  23. package/dist/agents/BaseAgent.js +5 -4
  24. package/dist/agents/BaseAgent.js.map +1 -1
  25. package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
  26. package/dist/agents/CoverageAnalyzerAgent.js +9 -8
  27. package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
  28. package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
  29. package/dist/agents/FlakyTestHunterAgent.js +3 -2
  30. package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
  31. package/dist/agents/FleetCommanderAgent.d.ts.map +1 -1
  32. package/dist/agents/FleetCommanderAgent.js +2 -1
  33. package/dist/agents/FleetCommanderAgent.js.map +1 -1
  34. package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -1
  35. package/dist/agents/PerformanceTesterAgent.js +7 -6
  36. package/dist/agents/PerformanceTesterAgent.js.map +1 -1
  37. package/dist/agents/ProductionIntelligenceAgent.d.ts.map +1 -1
  38. package/dist/agents/ProductionIntelligenceAgent.js +7 -6
  39. package/dist/agents/ProductionIntelligenceAgent.js.map +1 -1
  40. package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
  41. package/dist/agents/QualityAnalyzerAgent.js +37 -36
  42. package/dist/agents/QualityAnalyzerAgent.js.map +1 -1
  43. package/dist/agents/QualityGateAgent.d.ts.map +1 -1
  44. package/dist/agents/QualityGateAgent.js +2 -1
  45. package/dist/agents/QualityGateAgent.js.map +1 -1
  46. package/dist/agents/RegressionRiskAnalyzerAgent.d.ts.map +1 -1
  47. package/dist/agents/RegressionRiskAnalyzerAgent.js +15 -14
  48. package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
  49. package/dist/agents/SecurityScannerAgent.d.ts.map +1 -1
  50. package/dist/agents/SecurityScannerAgent.js +2 -1
  51. package/dist/agents/SecurityScannerAgent.js.map +1 -1
  52. package/dist/agents/TestDataArchitectAgent.d.ts.map +1 -1
  53. package/dist/agents/TestDataArchitectAgent.js +12 -11
  54. package/dist/agents/TestDataArchitectAgent.js.map +1 -1
  55. package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
  56. package/dist/agents/TestExecutorAgent.js +17 -16
  57. package/dist/agents/TestExecutorAgent.js.map +1 -1
  58. package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
  59. package/dist/agents/TestGeneratorAgent.js +10 -9
  60. package/dist/agents/TestGeneratorAgent.js.map +1 -1
  61. package/dist/agents/index.d.ts.map +1 -1
  62. package/dist/agents/index.js +2 -1
  63. package/dist/agents/index.js.map +1 -1
  64. package/dist/cli/commands/agent/benchmark.d.ts.map +1 -1
  65. package/dist/cli/commands/agent/benchmark.js +2 -1
  66. package/dist/cli/commands/agent/benchmark.js.map +1 -1
  67. package/dist/cli/commands/agent/spawn.d.ts.map +1 -1
  68. package/dist/cli/commands/agent/spawn.js +2 -1
  69. package/dist/cli/commands/agent/spawn.js.map +1 -1
  70. package/dist/cli/commands/analyze.d.ts.map +1 -1
  71. package/dist/cli/commands/analyze.js +2 -1
  72. package/dist/cli/commands/analyze.js.map +1 -1
  73. package/dist/cli/commands/config/list.d.ts.map +1 -1
  74. package/dist/cli/commands/config/list.js +2 -1
  75. package/dist/cli/commands/config/list.js.map +1 -1
  76. package/dist/cli/commands/config/set.d.ts +7 -0
  77. package/dist/cli/commands/config/set.d.ts.map +1 -1
  78. package/dist/cli/commands/config/set.js +35 -4
  79. package/dist/cli/commands/config/set.js.map +1 -1
  80. package/dist/cli/commands/fleet/logs.d.ts.map +1 -1
  81. package/dist/cli/commands/fleet/logs.js +2 -1
  82. package/dist/cli/commands/fleet/logs.js.map +1 -1
  83. package/dist/cli/commands/fleet/metrics.d.ts.map +1 -1
  84. package/dist/cli/commands/fleet/metrics.js +2 -1
  85. package/dist/cli/commands/fleet/metrics.js.map +1 -1
  86. package/dist/cli/commands/fleet/monitor.d.ts.map +1 -1
  87. package/dist/cli/commands/fleet/monitor.js +7 -5
  88. package/dist/cli/commands/fleet/monitor.js.map +1 -1
  89. package/dist/cli/commands/fleet.d.ts.map +1 -1
  90. package/dist/cli/commands/fleet.js +2 -1
  91. package/dist/cli/commands/fleet.js.map +1 -1
  92. package/dist/cli/commands/generate.d.ts.map +1 -1
  93. package/dist/cli/commands/generate.js +2 -1
  94. package/dist/cli/commands/generate.js.map +1 -1
  95. package/dist/cli/commands/improve/index.d.ts.map +1 -1
  96. package/dist/cli/commands/improve/index.js +12 -11
  97. package/dist/cli/commands/improve/index.js.map +1 -1
  98. package/dist/cli/commands/init.d.ts +1 -1
  99. package/dist/cli/commands/init.d.ts.map +1 -1
  100. package/dist/cli/commands/init.js +54 -27
  101. package/dist/cli/commands/init.js.map +1 -1
  102. package/dist/cli/commands/learn/index.d.ts.map +1 -1
  103. package/dist/cli/commands/learn/index.js +13 -12
  104. package/dist/cli/commands/learn/index.js.map +1 -1
  105. package/dist/cli/commands/monitor/alerts.d.ts.map +1 -1
  106. package/dist/cli/commands/monitor/alerts.js +2 -1
  107. package/dist/cli/commands/monitor/alerts.js.map +1 -1
  108. package/dist/cli/commands/patterns/index.d.ts.map +1 -1
  109. package/dist/cli/commands/patterns/index.js +20 -19
  110. package/dist/cli/commands/patterns/index.js.map +1 -1
  111. package/dist/cli/commands/quality/decision.d.ts.map +1 -1
  112. package/dist/cli/commands/quality/decision.js +9 -7
  113. package/dist/cli/commands/quality/decision.js.map +1 -1
  114. package/dist/cli/commands/quality/gate.d.ts.map +1 -1
  115. package/dist/cli/commands/quality/gate.js +10 -8
  116. package/dist/cli/commands/quality/gate.js.map +1 -1
  117. package/dist/cli/commands/quality/policy.d.ts.map +1 -1
  118. package/dist/cli/commands/quality/policy.js +10 -8
  119. package/dist/cli/commands/quality/policy.js.map +1 -1
  120. package/dist/cli/commands/quality/risk.d.ts.map +1 -1
  121. package/dist/cli/commands/quality/risk.js +5 -3
  122. package/dist/cli/commands/quality/risk.js.map +1 -1
  123. package/dist/cli/commands/quality/validate.d.ts.map +1 -1
  124. package/dist/cli/commands/quality/validate.js +10 -8
  125. package/dist/cli/commands/quality/validate.js.map +1 -1
  126. package/dist/cli/commands/quantization.d.ts +6 -0
  127. package/dist/cli/commands/quantization.d.ts.map +1 -0
  128. package/dist/cli/commands/quantization.js +188 -0
  129. package/dist/cli/commands/quantization.js.map +1 -0
  130. package/dist/cli/commands/routing/index.d.ts +0 -6
  131. package/dist/cli/commands/routing/index.d.ts.map +1 -1
  132. package/dist/cli/commands/routing/index.js +17 -16
  133. package/dist/cli/commands/routing/index.js.map +1 -1
  134. package/dist/cli/commands/run.d.ts.map +1 -1
  135. package/dist/cli/commands/run.js +2 -1
  136. package/dist/cli/commands/run.js.map +1 -1
  137. package/dist/cli/commands/skills/index.d.ts.map +1 -1
  138. package/dist/cli/commands/skills/index.js +10 -9
  139. package/dist/cli/commands/skills/index.js.map +1 -1
  140. package/dist/cli/commands/test/debug.d.ts.map +1 -1
  141. package/dist/cli/commands/test/debug.js +2 -1
  142. package/dist/cli/commands/test/debug.js.map +1 -1
  143. package/dist/cli/commands/test/mutate.d.ts.map +1 -1
  144. package/dist/cli/commands/test/mutate.js +2 -1
  145. package/dist/cli/commands/test/mutate.js.map +1 -1
  146. package/dist/cli/commands/test/parallel.d.ts.map +1 -1
  147. package/dist/cli/commands/test/parallel.js +6 -4
  148. package/dist/cli/commands/test/parallel.js.map +1 -1
  149. package/dist/cli/commands/test/profile.d.ts.map +1 -1
  150. package/dist/cli/commands/test/profile.js +3 -2
  151. package/dist/cli/commands/test/profile.js.map +1 -1
  152. package/dist/cli/commands/test/queue.d.ts.map +1 -1
  153. package/dist/cli/commands/test/queue.js +2 -1
  154. package/dist/cli/commands/test/queue.js.map +1 -1
  155. package/dist/cli/commands/test/retry.d.ts.map +1 -1
  156. package/dist/cli/commands/test/retry.js +6 -4
  157. package/dist/cli/commands/test/retry.js.map +1 -1
  158. package/dist/cli/commands/test/trace.d.ts.map +1 -1
  159. package/dist/cli/commands/test/trace.js +2 -1
  160. package/dist/cli/commands/test/trace.js.map +1 -1
  161. package/dist/cli/commands/test/watch.d.ts.map +1 -1
  162. package/dist/cli/commands/test/watch.js +3 -2
  163. package/dist/cli/commands/test/watch.js.map +1 -1
  164. package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
  165. package/dist/cli/commands/workflow/cancel.js +2 -1
  166. package/dist/cli/commands/workflow/cancel.js.map +1 -1
  167. package/dist/cli/index-working.js +9 -8
  168. package/dist/cli/index-working.js.map +1 -1
  169. package/dist/cli/index.js +5 -0
  170. package/dist/cli/index.js.map +1 -1
  171. package/dist/core/coordination/OODACoordination.d.ts.map +1 -1
  172. package/dist/core/coordination/OODACoordination.js +2 -1
  173. package/dist/core/coordination/OODACoordination.js.map +1 -1
  174. package/dist/core/memory/AgentDBManager.d.ts.map +1 -1
  175. package/dist/core/memory/AgentDBManager.js +2 -19
  176. package/dist/core/memory/AgentDBManager.js.map +1 -1
  177. package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
  178. package/dist/core/memory/RealAgentDBAdapter.js +4 -3
  179. package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
  180. package/dist/core/memory/ReasoningBankAdapter.d.ts.map +1 -1
  181. package/dist/core/memory/ReasoningBankAdapter.js +2 -5
  182. package/dist/core/memory/ReasoningBankAdapter.js.map +1 -1
  183. package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
  184. package/dist/core/memory/SwarmMemoryManager.js +4 -3
  185. package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
  186. package/dist/core/neural/NeuralTrainer.d.ts.map +1 -1
  187. package/dist/core/neural/NeuralTrainer.js +3 -2
  188. package/dist/core/neural/NeuralTrainer.js.map +1 -1
  189. package/dist/core/quantization/QuantizationManager.d.ts +83 -0
  190. package/dist/core/quantization/QuantizationManager.d.ts.map +1 -0
  191. package/dist/core/quantization/QuantizationManager.js +264 -0
  192. package/dist/core/quantization/QuantizationManager.js.map +1 -0
  193. package/dist/core/quantization/index.d.ts +5 -0
  194. package/dist/core/quantization/index.d.ts.map +1 -0
  195. package/dist/core/quantization/index.js +9 -0
  196. package/dist/core/quantization/index.js.map +1 -0
  197. package/dist/learning/LearningEngine.d.ts.map +1 -1
  198. package/dist/learning/LearningEngine.js +4 -1
  199. package/dist/learning/LearningEngine.js.map +1 -1
  200. package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts +3 -3
  201. package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts.map +1 -1
  202. package/dist/mcp/handlers/advanced/mutation-test-execute.js +5 -4
  203. package/dist/mcp/handlers/advanced/mutation-test-execute.js.map +1 -1
  204. package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -1
  205. package/dist/mcp/handlers/agent-spawn.js +2 -1
  206. package/dist/mcp/handlers/agent-spawn.js.map +1 -1
  207. package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.d.ts.map +1 -1
  208. package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js +9 -8
  209. package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js.map +1 -1
  210. package/dist/mcp/handlers/analysis/coverageGapsDetect.d.ts.map +1 -1
  211. package/dist/mcp/handlers/analysis/coverageGapsDetect.js +6 -5
  212. package/dist/mcp/handlers/analysis/coverageGapsDetect.js.map +1 -1
  213. package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.d.ts.map +1 -1
  214. package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js +5 -4
  215. package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js.map +1 -1
  216. package/dist/mcp/handlers/analysis/performanceBenchmarkRun.d.ts.map +1 -1
  217. package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js +8 -7
  218. package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js.map +1 -1
  219. package/dist/mcp/handlers/analysis/performanceMonitorRealtime.d.ts.map +1 -1
  220. package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js +7 -6
  221. package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js.map +1 -1
  222. package/dist/mcp/handlers/analysis/securityScanComprehensive.d.ts.map +1 -1
  223. package/dist/mcp/handlers/analysis/securityScanComprehensive.js +18 -21
  224. package/dist/mcp/handlers/analysis/securityScanComprehensive.js.map +1 -1
  225. package/dist/mcp/handlers/base-handler.d.ts.map +1 -1
  226. package/dist/mcp/handlers/base-handler.js +2 -9
  227. package/dist/mcp/handlers/base-handler.js.map +1 -1
  228. package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts.map +1 -1
  229. package/dist/mcp/handlers/chaos/chaos-inject-failure.js +4 -3
  230. package/dist/mcp/handlers/chaos/chaos-inject-failure.js.map +1 -1
  231. package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts.map +1 -1
  232. package/dist/mcp/handlers/chaos/chaos-inject-latency.js +6 -5
  233. package/dist/mcp/handlers/chaos/chaos-inject-latency.js.map +1 -1
  234. package/dist/mcp/handlers/coordination/event-emit.d.ts.map +1 -1
  235. package/dist/mcp/handlers/coordination/event-emit.js +2 -1
  236. package/dist/mcp/handlers/coordination/event-emit.js.map +1 -1
  237. package/dist/mcp/handlers/coordination/event-subscribe.d.ts.map +1 -1
  238. package/dist/mcp/handlers/coordination/event-subscribe.js +2 -1
  239. package/dist/mcp/handlers/coordination/event-subscribe.js.map +1 -1
  240. package/dist/mcp/handlers/coordination/workflow-checkpoint.d.ts.map +1 -1
  241. package/dist/mcp/handlers/coordination/workflow-checkpoint.js +2 -1
  242. package/dist/mcp/handlers/coordination/workflow-checkpoint.js.map +1 -1
  243. package/dist/mcp/handlers/coordination/workflow-create.d.ts.map +1 -1
  244. package/dist/mcp/handlers/coordination/workflow-create.js +2 -1
  245. package/dist/mcp/handlers/coordination/workflow-create.js.map +1 -1
  246. package/dist/mcp/handlers/coordination/workflow-execute.d.ts.map +1 -1
  247. package/dist/mcp/handlers/coordination/workflow-execute.js +2 -1
  248. package/dist/mcp/handlers/coordination/workflow-execute.js.map +1 -1
  249. package/dist/mcp/handlers/coordination/workflow-resume.d.ts.map +1 -1
  250. package/dist/mcp/handlers/coordination/workflow-resume.js +2 -1
  251. package/dist/mcp/handlers/coordination/workflow-resume.js.map +1 -1
  252. package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
  253. package/dist/mcp/handlers/fleet-init.js +2 -1
  254. package/dist/mcp/handlers/fleet-init.js.map +1 -1
  255. package/dist/mcp/handlers/fleet-status.d.ts.map +1 -1
  256. package/dist/mcp/handlers/fleet-status.js +31 -30
  257. package/dist/mcp/handlers/fleet-status.js.map +1 -1
  258. package/dist/mcp/handlers/integration/dependency-check.d.ts.map +1 -1
  259. package/dist/mcp/handlers/integration/dependency-check.js +3 -2
  260. package/dist/mcp/handlers/integration/dependency-check.js.map +1 -1
  261. package/dist/mcp/handlers/integration/integration-test-orchestrate.d.ts.map +1 -1
  262. package/dist/mcp/handlers/integration/integration-test-orchestrate.js +2 -1
  263. package/dist/mcp/handlers/integration/integration-test-orchestrate.js.map +1 -1
  264. package/dist/mcp/handlers/optimize-tests.d.ts.map +1 -1
  265. package/dist/mcp/handlers/optimize-tests.js +33 -32
  266. package/dist/mcp/handlers/optimize-tests.js.map +1 -1
  267. package/dist/mcp/handlers/predict-defects.d.ts.map +1 -1
  268. package/dist/mcp/handlers/predict-defects.js +46 -45
  269. package/dist/mcp/handlers/predict-defects.js.map +1 -1
  270. package/dist/mcp/handlers/prediction/deployment-readiness-check.d.ts.map +1 -1
  271. package/dist/mcp/handlers/prediction/deployment-readiness-check.js +24 -23
  272. package/dist/mcp/handlers/prediction/deployment-readiness-check.js.map +1 -1
  273. package/dist/mcp/handlers/prediction/predict-defects-ai.d.ts.map +1 -1
  274. package/dist/mcp/handlers/prediction/predict-defects-ai.js +10 -9
  275. package/dist/mcp/handlers/prediction/predict-defects-ai.js.map +1 -1
  276. package/dist/mcp/handlers/prediction/regression-risk-analyze.d.ts.map +1 -1
  277. package/dist/mcp/handlers/prediction/regression-risk-analyze.js +10 -9
  278. package/dist/mcp/handlers/prediction/regression-risk-analyze.js.map +1 -1
  279. package/dist/mcp/handlers/prediction/visual-test-regression.d.ts.map +1 -1
  280. package/dist/mcp/handlers/prediction/visual-test-regression.js +7 -6
  281. package/dist/mcp/handlers/prediction/visual-test-regression.js.map +1 -1
  282. package/dist/mcp/handlers/quality-analyze.d.ts.map +1 -1
  283. package/dist/mcp/handlers/quality-analyze.js +53 -52
  284. package/dist/mcp/handlers/quality-analyze.js.map +1 -1
  285. package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -1
  286. package/dist/mcp/handlers/task-orchestrate.js +19 -18
  287. package/dist/mcp/handlers/task-orchestrate.js.map +1 -1
  288. package/dist/mcp/handlers/test/test-execute-parallel.d.ts.map +1 -1
  289. package/dist/mcp/handlers/test/test-execute-parallel.js +7 -6
  290. package/dist/mcp/handlers/test/test-execute-parallel.js.map +1 -1
  291. package/dist/mcp/handlers/test/test-generate-enhanced.d.ts.map +1 -1
  292. package/dist/mcp/handlers/test/test-generate-enhanced.js +2 -1
  293. package/dist/mcp/handlers/test/test-generate-enhanced.js.map +1 -1
  294. package/dist/mcp/handlers/test/test-optimize-sublinear.d.ts.map +1 -1
  295. package/dist/mcp/handlers/test/test-optimize-sublinear.js +3 -2
  296. package/dist/mcp/handlers/test/test-optimize-sublinear.js.map +1 -1
  297. package/dist/mcp/handlers/test-execute.d.ts.map +1 -1
  298. package/dist/mcp/handlers/test-execute.js +11 -10
  299. package/dist/mcp/handlers/test-execute.js.map +1 -1
  300. package/dist/mcp/handlers/test-generate.d.ts.map +1 -1
  301. package/dist/mcp/handlers/test-generate.js +4 -3
  302. package/dist/mcp/handlers/test-generate.js.map +1 -1
  303. package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
  304. package/dist/mcp/services/AgentRegistry.js +2 -1
  305. package/dist/mcp/services/AgentRegistry.js.map +1 -1
  306. package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.d.ts.map +1 -1
  307. package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js +10 -9
  308. package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js.map +1 -1
  309. package/dist/mcp/streaming/StreamingMCPTool.d.ts.map +1 -1
  310. package/dist/mcp/streaming/StreamingMCPTool.js +2 -1
  311. package/dist/mcp/streaming/StreamingMCPTool.js.map +1 -1
  312. package/dist/mcp/streaming/TestExecuteStreamHandler.d.ts.map +1 -1
  313. package/dist/mcp/streaming/TestExecuteStreamHandler.js +6 -5
  314. package/dist/mcp/streaming/TestExecuteStreamHandler.js.map +1 -1
  315. package/dist/reasoning/TestTemplateCreator.d.ts +10 -2
  316. package/dist/reasoning/TestTemplateCreator.d.ts.map +1 -1
  317. package/dist/reasoning/TestTemplateCreator.js +81 -21
  318. package/dist/reasoning/TestTemplateCreator.js.map +1 -1
  319. package/dist/types/pattern.types.d.ts +39 -3
  320. package/dist/types/pattern.types.d.ts.map +1 -1
  321. package/dist/utils/Config.js +2 -2
  322. package/dist/utils/Config.js.map +1 -1
  323. package/dist/utils/ProcessExit.d.ts +23 -0
  324. package/dist/utils/ProcessExit.d.ts.map +1 -0
  325. package/dist/utils/ProcessExit.js +40 -0
  326. package/dist/utils/ProcessExit.js.map +1 -0
  327. package/dist/utils/SecureRandom.d.ts +171 -0
  328. package/dist/utils/SecureRandom.d.ts.map +1 -0
  329. package/dist/utils/SecureRandom.js +229 -0
  330. package/dist/utils/SecureRandom.js.map +1 -0
  331. package/dist/utils/SecureUrlValidator.d.ts +167 -0
  332. package/dist/utils/SecureUrlValidator.d.ts.map +1 -0
  333. package/dist/utils/SecureUrlValidator.js +306 -0
  334. package/dist/utils/SecureUrlValidator.js.map +1 -0
  335. package/dist/utils/SecureValidation.d.ts +131 -0
  336. package/dist/utils/SecureValidation.d.ts.map +1 -0
  337. package/dist/utils/SecureValidation.js +265 -0
  338. package/dist/utils/SecureValidation.js.map +1 -0
  339. package/dist/utils/validation.d.ts.map +1 -1
  340. package/dist/utils/validation.js +5 -4
  341. package/dist/utils/validation.js.map +1 -1
  342. package/package.json +3 -3
@@ -0,0 +1,535 @@
1
+ ---
2
+ name: shift-left-testing
3
+ description: Move testing activities earlier (left) in software development lifecycle - unit tests, TDD, BDD, design for testability, and CI/CD integration. Use when reducing bug costs, implementing DevOps practices, or enabling continuous deployment.
4
+ version: 1.0.0
5
+ category: testing-methodologies
6
+ tags: [shift-left, tdd, bdd, cicd, devops, early-testing, design-for-testability]
7
+ difficulty: intermediate
8
+ estimated_time: 60 minutes
9
+ author: agentic-qe
10
+ ---
11
+
12
+ # Shift-Left Testing
13
+
14
+ ## Core Principle
15
+
16
+ **Finding bugs earlier reduces cost by 10x-100x.**
17
+
18
+ Shift-left testing moves testing activities earlier (left on timeline) in software development lifecycle. The earlier you test, the cheaper bugs are to fix and the faster you can deploy.
19
+
20
+ ## What is Shift-Left Testing?
21
+
22
+ **Shift-Left:** Moving testing activities earlier (left on timeline) in software development lifecycle.
23
+
24
+ **Traditional (Shift-Right):**
25
+ ```
26
+ Requirements → Design → Code → Test → Deploy
27
+
28
+ Testing happens here (late, expensive)
29
+ ```
30
+
31
+ **Shift-Left:**
32
+ ```
33
+ Requirements → Design → Code → Deploy
34
+ ↓ ↓ ↓
35
+ Test Test Test (continuous, cheap)
36
+ ```
37
+
38
+ **Benefits:**
39
+ - 10x-100x cost reduction (bugs found early)
40
+ - Faster feedback (minutes vs days)
41
+ - Better quality (built-in vs bolted-on)
42
+ - Confident deployments (continuous validation)
43
+
44
+ ## Shift-Left Strategies
45
+
46
+ ### Level 1: Traditional Testing
47
+
48
+ - Testing after development complete
49
+ - Separate QA phase
50
+ - Manual testing dominant
51
+ - Waterfall approach
52
+
53
+ **Cost of Bug:** $1,000-10,000
54
+
55
+ ---
56
+
57
+ ### Level 2: Shift-Left (Unit Tests)
58
+
59
+ - Developers write unit tests
60
+ - TDD practices
61
+ - Automated unit tests in CI
62
+ - Test coverage metrics
63
+
64
+ **Cost of Bug:** $100-1,000 (10x cheaper)
65
+
66
+ ```javascript
67
+ // Developer writes test BEFORE code (TDD)
68
+ test('calculateTotal sums line items', () => {
69
+ const items = [{ price: 10 }, { price: 20 }];
70
+ expect(calculateTotal(items)).toBe(30);
71
+ });
72
+
73
+ // Then implements code
74
+ function calculateTotal(items) {
75
+ return items.reduce((sum, item) => sum + item.price, 0);
76
+ }
77
+ ```
78
+
79
+ **TDD Cycle (Red-Green-Refactor):**
80
+ 1. **Red**: Write failing test
81
+ 2. **Green**: Write minimal code to pass
82
+ 3. **Refactor**: Improve code quality
83
+
84
+ ---
85
+
86
+ ### Level 3: Shift-Further-Left (Requirements)
87
+
88
+ - Testable acceptance criteria
89
+ - BDD with Gherkin scenarios
90
+ - Executable specifications
91
+ - Test cases from requirements
92
+
93
+ **Cost of Bug:** $10-100 (100x cheaper)
94
+
95
+ ```gherkin
96
+ # Specification IS test
97
+ Feature: Shopping Cart
98
+
99
+ Scenario: Calculate total with tax
100
+ Given I have items worth $100
101
+ When I apply 10% tax
102
+ Then the total should be $110
103
+ ```
104
+
105
+ **BDD Benefits:**
106
+ - Business stakeholders write tests
107
+ - Living documentation
108
+ - Automated acceptance testing
109
+ - Shared understanding
110
+
111
+ **Tools:** Cucumber, SpecFlow, Behave
112
+
113
+ ---
114
+
115
+ ### Level 4: Shift-All-The-Way-Left (Design)
116
+
117
+ - Testability in architecture
118
+ - Design for testability
119
+ - API design reviewed for testing
120
+ - Security/performance considered early
121
+
122
+ **Cost of Bug:** $1-10 (1000x cheaper)
123
+
124
+ ```typescript
125
+ // Design decision: Dependency injection for testability
126
+ class OrderService {
127
+ constructor(
128
+ private paymentGateway: PaymentGateway, // Injectable
129
+ private emailService: EmailService // Mockable
130
+ ) {}
131
+
132
+ // Easy to test with mocks
133
+ async placeOrder(order: Order) {
134
+ await this.paymentGateway.charge(order.total);
135
+ await this.emailService.sendConfirmation(order);
136
+ }
137
+ }
138
+
139
+ // Test with mocks (no real payment gateway needed)
140
+ test('places order successfully', async () => {
141
+ const mockPayment = { charge: jest.fn() };
142
+ const mockEmail = { sendConfirmation: jest.fn() };
143
+
144
+ const service = new OrderService(mockPayment, mockEmail);
145
+ await service.placeOrder({ total: 100 });
146
+
147
+ expect(mockPayment.charge).toHaveBeenCalledWith(100);
148
+ expect(mockEmail.sendConfirmation).toHaveBeenCalled();
149
+ });
150
+ ```
151
+
152
+ **Design Patterns for Testability:**
153
+ - Dependency Injection
154
+ - Interface-based design
155
+ - Single Responsibility Principle
156
+ - Avoid global state
157
+ - Pure functions (no side effects)
158
+
159
+ ---
160
+
161
+ ## Continuous Testing in CI/CD
162
+
163
+ ### CI/CD Pipeline with Shift-Left Testing
164
+
165
+ **Goal:** Test at every stage, fail fast, high confidence
166
+
167
+ ```yaml
168
+ # .github/workflows/ci.yml
169
+ name: Shift-Left Testing Pipeline
170
+
171
+ on: [push, pull_request]
172
+
173
+ jobs:
174
+ # Stage 1: Fast Feedback (< 5 minutes)
175
+ fast-feedback:
176
+ runs-on: ubuntu-latest
177
+ timeout-minutes: 5
178
+ steps:
179
+ - uses: actions/checkout@v3
180
+
181
+ # Static Analysis (30 seconds)
182
+ - name: Lint
183
+ run: npm run lint
184
+
185
+ - name: Type Check
186
+ run: npm run type-check
187
+
188
+ # Unit Tests (2 minutes)
189
+ - name: Unit Tests
190
+ run: npm run test:unit
191
+
192
+ - name: Coverage Check
193
+ run: npm run coverage -- --threshold 80
194
+
195
+ # Stage 2: Integration Tests (< 10 minutes)
196
+ integration-tests:
197
+ needs: fast-feedback
198
+ runs-on: ubuntu-latest
199
+ timeout-minutes: 10
200
+ steps:
201
+ - uses: actions/checkout@v3
202
+
203
+ # Integration Tests (5 minutes)
204
+ - name: Integration Tests
205
+ run: npm run test:integration
206
+
207
+ # Security Scanning (3 minutes)
208
+ - name: Security Scan
209
+ run: npm audit && npm run security:scan
210
+
211
+ # Stage 3: E2E Tests (< 15 minutes)
212
+ e2e-tests:
213
+ needs: integration-tests
214
+ runs-on: ubuntu-latest
215
+ timeout-minutes: 15
216
+ steps:
217
+ - uses: actions/checkout@v3
218
+
219
+ # E2E Tests (10 minutes)
220
+ - name: E2E Tests with Playwright
221
+ run: npm run test:e2e
222
+
223
+ # Performance Tests (5 minutes)
224
+ - name: Performance Tests
225
+ run: npm run test:performance
226
+
227
+ # Stage 4: Deploy to Staging
228
+ deploy-staging:
229
+ needs: e2e-tests
230
+ if: github.ref == 'refs/heads/main'
231
+ steps:
232
+ - name: Deploy to Staging
233
+ run: ./deploy.sh staging
234
+
235
+ # Smoke Tests on Staging
236
+ - name: Smoke Tests
237
+ run: npm run test:smoke -- --env=staging
238
+ ```
239
+
240
+ **Pipeline Best Practices:**
241
+ 1. **Fail Fast**: Run fastest tests first (lint, unit)
242
+ 2. **Parallel Execution**: Run independent tests concurrently
243
+ 3. **Clear Feedback**: Immediate notification on failures
244
+ 4. **Incremental Testing**: Only run affected tests when possible
245
+ 5. **Quality Gates**: Block merges on test failures
246
+
247
+ ---
248
+
249
+ ## Test Pyramid (Shift-Left Strategy)
250
+
251
+ ```
252
+ /\
253
+ /E2E\ Few (slow, expensive, brittle)
254
+ /------\
255
+ / Int. \ Some (moderate speed/cost)
256
+ /----------\
257
+ / Unit \ Many (fast, cheap, reliable)
258
+ /--------------\
259
+ ```
260
+
261
+ **Unit Tests (Base):**
262
+ - 70-80% of tests
263
+ - Milliseconds execution
264
+ - Test individual functions/classes
265
+ - High coverage, low cost
266
+
267
+ **Integration Tests (Middle):**
268
+ - 15-20% of tests
269
+ - Seconds execution
270
+ - Test component interactions
271
+ - Database, API, services
272
+
273
+ **E2E Tests (Top):**
274
+ - 5-10% of tests
275
+ - Minutes execution
276
+ - Test critical user journeys
277
+ - Full stack, realistic scenarios
278
+
279
+ **Shift-Left Impact:**
280
+ Most testing happens at UNIT level (early, cheap, fast).
281
+
282
+ ---
283
+
284
+ ## Shift-Left Practices
285
+
286
+ ### 1. Test-Driven Development (TDD)
287
+
288
+ **Process:**
289
+ ```javascript
290
+ // 1. RED: Write failing test
291
+ test('validates email format', () => {
292
+ expect(isValidEmail('invalid')).toBe(false);
293
+ expect(isValidEmail('user@example.com')).toBe(true);
294
+ });
295
+
296
+ // 2. GREEN: Minimal implementation
297
+ function isValidEmail(email) {
298
+ return email.includes('@'); // Simple, passes test
299
+ }
300
+
301
+ // 3. REFACTOR: Improve implementation
302
+ function isValidEmail(email) {
303
+ const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
304
+ return regex.test(email);
305
+ }
306
+ ```
307
+
308
+ **Benefits:**
309
+ - Better design (testable by default)
310
+ - Complete test coverage
311
+ - Confident refactoring
312
+ - Living documentation
313
+
314
+ ---
315
+
316
+ ### 2. Behavior-Driven Development (BDD)
317
+
318
+ **Process:**
319
+ ```gherkin
320
+ # Business writes this (executable spec)
321
+ Feature: User Registration
322
+
323
+ Scenario: New user signs up successfully
324
+ Given I am on the registration page
325
+ When I enter valid email "user@example.com"
326
+ And I enter password "SecurePass123"
327
+ And I click "Sign Up"
328
+ Then I should see "Welcome"
329
+ And I should receive a confirmation email
330
+ ```
331
+
332
+ **Implementation:**
333
+ ```typescript
334
+ // Developer implements step definitions
335
+ Given('I am on the registration page', async () => {
336
+ await page.goto('/register');
337
+ });
338
+
339
+ When('I enter valid email {string}', async (email: string) => {
340
+ await page.fill('[data-test=email]', email);
341
+ });
342
+
343
+ // ... more step definitions
344
+ ```
345
+
346
+ **Benefits:**
347
+ - Shared language (business + dev)
348
+ - Testable requirements
349
+ - Automated acceptance tests
350
+ - Reduced misunderstandings
351
+
352
+ ---
353
+
354
+ ### 3. Design for Testability
355
+
356
+ **Principles:**
357
+
358
+ **a) Dependency Injection**
359
+ ```typescript
360
+ // ❌ Hard to test (tight coupling)
361
+ class UserService {
362
+ async createUser(data) {
363
+ const db = new Database(); // Hard-coded dependency
364
+ return db.insert('users', data);
365
+ }
366
+ }
367
+
368
+ // ✅ Easy to test (loose coupling)
369
+ class UserService {
370
+ constructor(private db: Database) {}
371
+
372
+ async createUser(data) {
373
+ return this.db.insert('users', data);
374
+ }
375
+ }
376
+
377
+ // Test with mock
378
+ const mockDb = { insert: jest.fn() };
379
+ const service = new UserService(mockDb);
380
+ ```
381
+
382
+ **b) Pure Functions**
383
+ ```typescript
384
+ // ❌ Hard to test (side effects, global state)
385
+ let total = 0;
386
+ function addToTotal(amount) {
387
+ total += amount; // Modifies global state
388
+ return total;
389
+ }
390
+
391
+ // ✅ Easy to test (pure, no side effects)
392
+ function calculateTotal(current, amount) {
393
+ return current + amount;
394
+ }
395
+
396
+ test('adds amounts correctly', () => {
397
+ expect(calculateTotal(100, 50)).toBe(150);
398
+ expect(calculateTotal(0, 10)).toBe(10);
399
+ });
400
+ ```
401
+
402
+ **c) Single Responsibility**
403
+ ```typescript
404
+ // ❌ Hard to test (multiple responsibilities)
405
+ class OrderProcessor {
406
+ processOrder(order) {
407
+ this.validateOrder(order);
408
+ this.chargePayment(order);
409
+ this.sendEmail(order);
410
+ this.updateInventory(order);
411
+ // Too many responsibilities!
412
+ }
413
+ }
414
+
415
+ // ✅ Easy to test (single responsibility)
416
+ class OrderValidator {
417
+ validate(order) { /* ... */ }
418
+ }
419
+
420
+ class PaymentService {
421
+ charge(order) { /* ... */ }
422
+ }
423
+
424
+ class EmailService {
425
+ sendConfirmation(order) { /* ... */ }
426
+ }
427
+
428
+ // Each class has one reason to change, one thing to test
429
+ ```
430
+
431
+ ---
432
+
433
+ ## Shift-Left Metrics
434
+
435
+ **Track Effectiveness:**
436
+
437
+ **1. Defect Detection Percentage (DDP)**
438
+ ```
439
+ DDP = (Defects found in phase / Total defects) × 100
440
+
441
+ Target: 80%+ defects found before production
442
+ ```
443
+
444
+ **2. Test Coverage**
445
+ ```
446
+ Coverage = (Lines covered / Total lines) × 100
447
+
448
+ Target: 80%+ for unit tests
449
+ ```
450
+
451
+ **3. Time to Feedback**
452
+ ```
453
+ Feedback Time = Time from commit to test results
454
+
455
+ Target: < 10 minutes for unit tests
456
+ < 30 minutes for integration tests
457
+ < 60 minutes for E2E tests
458
+ ```
459
+
460
+ **4. Cost of Defects**
461
+ ```
462
+ Track cost by phase discovered:
463
+ - Requirements: $1-10
464
+ - Development: $100-1,000
465
+ - QA: $1,000-10,000
466
+ - Production: $10,000-100,000+
467
+ ```
468
+
469
+ ---
470
+
471
+ ## Tools for Shift-Left Testing
472
+
473
+ **Unit Testing:**
474
+ - Jest, Mocha, Vitest (JavaScript)
475
+ - JUnit, TestNG (Java)
476
+ - pytest (Python)
477
+ - RSpec (Ruby)
478
+
479
+ **BDD Frameworks:**
480
+ - Cucumber, SpecFlow (Gherkin)
481
+ - Behave (Python)
482
+ - Jasmine (JavaScript)
483
+
484
+ **CI/CD Platforms:**
485
+ - GitHub Actions
486
+ - GitLab CI
487
+ - Jenkins
488
+ - CircleCI
489
+ - Travis CI
490
+
491
+ **Code Quality:**
492
+ - ESLint, SonarQube
493
+ - Code coverage (Jest, Istanbul, c8)
494
+ - Static analysis (TypeScript, Flow)
495
+
496
+ ---
497
+
498
+ ## Related Skills
499
+
500
+ **Core Testing:**
501
+ - [test-automation-strategy](../test-automation-strategy/)
502
+ - [tdd-london-chicago](../tdd-london-chicago/)
503
+ - [regression-testing](../regression-testing/)
504
+
505
+ **DevOps:**
506
+ - [shift-right-testing](../shift-right-testing/) - Testing IN production
507
+ - [test-design-techniques](../test-design-techniques/)
508
+ - [mutation-testing](../mutation-testing/)
509
+
510
+ **Complementary:**
511
+ - [shift-right-testing](../shift-right-testing/) - Production validation (the other half)
512
+
513
+ ---
514
+
515
+ ## Remember
516
+
517
+ **The earlier you find bugs, the cheaper they are to fix.**
518
+
519
+ **Cost by Phase:**
520
+ - Design/Requirements: $1-10
521
+ - Development (unit tests): $100-1,000
522
+ - QA/Integration: $1,000-10,000
523
+ - Production: $10,000-100,000+
524
+
525
+ **Shift-Left = 10x-100x cost reduction**
526
+
527
+ **Best Practices:**
528
+ 1. Write tests BEFORE code (TDD)
529
+ 2. Make requirements testable (BDD)
530
+ 3. Design for testability (DI, pure functions)
531
+ 4. Automate everything (CI/CD)
532
+ 5. Fail fast (run fastest tests first)
533
+ 6. Test pyramid (many unit, few E2E)
534
+
535
+ **With Agents:** `qe-test-generator` automatically generates shift-left tests (unit, integration) during development. `qe-regression-risk-analyzer` selects which tests to run based on code changes. Together, they enable true shift-left automation with minimal developer effort.