agentic-qe 1.9.4 → 2.1.0

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 (262) hide show
  1. package/.claude/agents/qe-api-contract-validator.md +95 -1336
  2. package/.claude/agents/qe-chaos-engineer.md +152 -1211
  3. package/.claude/agents/qe-code-complexity.md +144 -707
  4. package/.claude/agents/qe-coverage-analyzer.md +147 -743
  5. package/.claude/agents/qe-deployment-readiness.md +143 -1496
  6. package/.claude/agents/qe-flaky-test-hunter.md +132 -1529
  7. package/.claude/agents/qe-fleet-commander.md +12 -12
  8. package/.claude/agents/qe-performance-tester.md +150 -886
  9. package/.claude/agents/qe-production-intelligence.md +155 -1396
  10. package/.claude/agents/qe-quality-analyzer.md +6 -6
  11. package/.claude/agents/qe-quality-gate.md +151 -648
  12. package/.claude/agents/qe-regression-risk-analyzer.md +132 -1150
  13. package/.claude/agents/qe-requirements-validator.md +149 -932
  14. package/.claude/agents/qe-security-scanner.md +157 -797
  15. package/.claude/agents/qe-test-data-architect.md +96 -1365
  16. package/.claude/agents/qe-test-executor.md +8 -8
  17. package/.claude/agents/qe-test-generator.md +145 -1540
  18. package/.claude/agents/qe-visual-tester.md +153 -1257
  19. package/.claude/agents/qx-partner.md +248 -0
  20. package/.claude/agents/subagents/qe-code-reviewer.md +40 -136
  21. package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +40 -480
  22. package/.claude/agents/subagents/qe-data-generator.md +41 -125
  23. package/.claude/agents/subagents/qe-flaky-investigator.md +55 -411
  24. package/.claude/agents/subagents/qe-integration-tester.md +53 -141
  25. package/.claude/agents/subagents/qe-performance-validator.md +54 -130
  26. package/.claude/agents/subagents/qe-security-auditor.md +56 -114
  27. package/.claude/agents/subagents/qe-test-data-architect-sub.md +57 -548
  28. package/.claude/agents/subagents/qe-test-implementer.md +58 -551
  29. package/.claude/agents/subagents/qe-test-refactorer.md +65 -722
  30. package/.claude/agents/subagents/qe-test-writer.md +63 -726
  31. package/.claude/skills/accessibility-testing/SKILL.md +144 -692
  32. package/.claude/skills/agentic-quality-engineering/SKILL.md +176 -529
  33. package/.claude/skills/api-testing-patterns/SKILL.md +180 -560
  34. package/.claude/skills/brutal-honesty-review/SKILL.md +113 -603
  35. package/.claude/skills/bug-reporting-excellence/SKILL.md +116 -517
  36. package/.claude/skills/chaos-engineering-resilience/SKILL.md +127 -72
  37. package/.claude/skills/cicd-pipeline-qe-orchestrator/SKILL.md +209 -404
  38. package/.claude/skills/code-review-quality/SKILL.md +158 -608
  39. package/.claude/skills/compatibility-testing/SKILL.md +148 -38
  40. package/.claude/skills/compliance-testing/SKILL.md +132 -63
  41. package/.claude/skills/consultancy-practices/SKILL.md +114 -446
  42. package/.claude/skills/context-driven-testing/SKILL.md +117 -381
  43. package/.claude/skills/contract-testing/SKILL.md +176 -141
  44. package/.claude/skills/database-testing/SKILL.md +137 -130
  45. package/.claude/skills/exploratory-testing-advanced/SKILL.md +160 -629
  46. package/.claude/skills/holistic-testing-pact/SKILL.md +140 -188
  47. package/.claude/skills/localization-testing/SKILL.md +145 -33
  48. package/.claude/skills/mobile-testing/SKILL.md +132 -448
  49. package/.claude/skills/mutation-testing/SKILL.md +147 -41
  50. package/.claude/skills/performance-testing/SKILL.md +200 -546
  51. package/.claude/skills/quality-metrics/SKILL.md +164 -519
  52. package/.claude/skills/refactoring-patterns/SKILL.md +132 -699
  53. package/.claude/skills/regression-testing/SKILL.md +120 -926
  54. package/.claude/skills/risk-based-testing/SKILL.md +157 -660
  55. package/.claude/skills/security-testing/SKILL.md +199 -538
  56. package/.claude/skills/sherlock-review/SKILL.md +163 -699
  57. package/.claude/skills/shift-left-testing/SKILL.md +161 -465
  58. package/.claude/skills/shift-right-testing/SKILL.md +161 -519
  59. package/.claude/skills/six-thinking-hats/SKILL.md +175 -1110
  60. package/.claude/skills/skills-manifest.json +683 -0
  61. package/.claude/skills/tdd-london-chicago/SKILL.md +131 -448
  62. package/.claude/skills/technical-writing/SKILL.md +103 -154
  63. package/.claude/skills/test-automation-strategy/SKILL.md +166 -772
  64. package/.claude/skills/test-data-management/SKILL.md +126 -910
  65. package/.claude/skills/test-design-techniques/SKILL.md +179 -89
  66. package/.claude/skills/test-environment-management/SKILL.md +136 -91
  67. package/.claude/skills/test-reporting-analytics/SKILL.md +169 -92
  68. package/.claude/skills/testability-scoring/README.md +71 -0
  69. package/.claude/skills/testability-scoring/SKILL.md +245 -0
  70. package/.claude/skills/testability-scoring/resources/templates/config.template.js +84 -0
  71. package/.claude/skills/testability-scoring/resources/templates/testability-scoring.spec.template.js +532 -0
  72. package/.claude/skills/testability-scoring/scripts/generate-html-report.js +1007 -0
  73. package/.claude/skills/testability-scoring/scripts/run-assessment.sh +70 -0
  74. package/.claude/skills/visual-testing-advanced/SKILL.md +155 -78
  75. package/.claude/skills/xp-practices/SKILL.md +151 -587
  76. package/CHANGELOG.md +110 -0
  77. package/README.md +55 -21
  78. package/dist/agents/QXPartnerAgent.d.ts +146 -0
  79. package/dist/agents/QXPartnerAgent.d.ts.map +1 -0
  80. package/dist/agents/QXPartnerAgent.js +1831 -0
  81. package/dist/agents/QXPartnerAgent.js.map +1 -0
  82. package/dist/agents/index.d.ts +1 -0
  83. package/dist/agents/index.d.ts.map +1 -1
  84. package/dist/agents/index.js +82 -2
  85. package/dist/agents/index.js.map +1 -1
  86. package/dist/agents/lifecycle/AgentLifecycleManager.d.ts.map +1 -1
  87. package/dist/agents/lifecycle/AgentLifecycleManager.js +34 -31
  88. package/dist/agents/lifecycle/AgentLifecycleManager.js.map +1 -1
  89. package/dist/cli/commands/debug/agent.d.ts.map +1 -1
  90. package/dist/cli/commands/debug/agent.js +19 -6
  91. package/dist/cli/commands/debug/agent.js.map +1 -1
  92. package/dist/cli/commands/debug/health-check.js +20 -7
  93. package/dist/cli/commands/debug/health-check.js.map +1 -1
  94. package/dist/cli/commands/init-claude-md-template.d.ts +1 -0
  95. package/dist/cli/commands/init-claude-md-template.d.ts.map +1 -1
  96. package/dist/cli/commands/init-claude-md-template.js +18 -3
  97. package/dist/cli/commands/init-claude-md-template.js.map +1 -1
  98. package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
  99. package/dist/cli/commands/workflow/cancel.js +4 -3
  100. package/dist/cli/commands/workflow/cancel.js.map +1 -1
  101. package/dist/cli/commands/workflow/list.d.ts.map +1 -1
  102. package/dist/cli/commands/workflow/list.js +4 -3
  103. package/dist/cli/commands/workflow/list.js.map +1 -1
  104. package/dist/cli/commands/workflow/pause.d.ts.map +1 -1
  105. package/dist/cli/commands/workflow/pause.js +4 -3
  106. package/dist/cli/commands/workflow/pause.js.map +1 -1
  107. package/dist/cli/init/claude-config.d.ts.map +1 -1
  108. package/dist/cli/init/claude-config.js +3 -8
  109. package/dist/cli/init/claude-config.js.map +1 -1
  110. package/dist/cli/init/claude-md.d.ts.map +1 -1
  111. package/dist/cli/init/claude-md.js +44 -2
  112. package/dist/cli/init/claude-md.js.map +1 -1
  113. package/dist/cli/init/database-init.js +1 -1
  114. package/dist/cli/init/index.d.ts.map +1 -1
  115. package/dist/cli/init/index.js +13 -6
  116. package/dist/cli/init/index.js.map +1 -1
  117. package/dist/cli/init/skills.d.ts.map +1 -1
  118. package/dist/cli/init/skills.js +2 -1
  119. package/dist/cli/init/skills.js.map +1 -1
  120. package/dist/core/SwarmCoordinator.d.ts +180 -0
  121. package/dist/core/SwarmCoordinator.d.ts.map +1 -0
  122. package/dist/core/SwarmCoordinator.js +473 -0
  123. package/dist/core/SwarmCoordinator.js.map +1 -0
  124. package/dist/core/memory/AgentDBIntegration.d.ts +24 -6
  125. package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -1
  126. package/dist/core/memory/AgentDBIntegration.js +66 -10
  127. package/dist/core/memory/AgentDBIntegration.js.map +1 -1
  128. package/dist/core/memory/UnifiedMemoryCoordinator.d.ts +341 -0
  129. package/dist/core/memory/UnifiedMemoryCoordinator.d.ts.map +1 -0
  130. package/dist/core/memory/UnifiedMemoryCoordinator.js +986 -0
  131. package/dist/core/memory/UnifiedMemoryCoordinator.js.map +1 -0
  132. package/dist/core/memory/index.d.ts +5 -0
  133. package/dist/core/memory/index.d.ts.map +1 -1
  134. package/dist/core/memory/index.js +23 -1
  135. package/dist/core/memory/index.js.map +1 -1
  136. package/dist/core/metrics/MetricsAggregator.d.ts +228 -0
  137. package/dist/core/metrics/MetricsAggregator.d.ts.map +1 -0
  138. package/dist/core/metrics/MetricsAggregator.js +482 -0
  139. package/dist/core/metrics/MetricsAggregator.js.map +1 -0
  140. package/dist/core/metrics/index.d.ts +5 -0
  141. package/dist/core/metrics/index.d.ts.map +1 -0
  142. package/dist/core/metrics/index.js +11 -0
  143. package/dist/core/metrics/index.js.map +1 -0
  144. package/dist/core/optimization/SwarmOptimizer.d.ts +190 -0
  145. package/dist/core/optimization/SwarmOptimizer.d.ts.map +1 -0
  146. package/dist/core/optimization/SwarmOptimizer.js +648 -0
  147. package/dist/core/optimization/SwarmOptimizer.js.map +1 -0
  148. package/dist/core/optimization/index.d.ts +9 -0
  149. package/dist/core/optimization/index.d.ts.map +1 -0
  150. package/dist/core/optimization/index.js +25 -0
  151. package/dist/core/optimization/index.js.map +1 -0
  152. package/dist/core/optimization/types.d.ts +53 -0
  153. package/dist/core/optimization/types.d.ts.map +1 -0
  154. package/dist/core/optimization/types.js +6 -0
  155. package/dist/core/optimization/types.js.map +1 -0
  156. package/dist/core/orchestration/AdaptiveScheduler.d.ts +190 -0
  157. package/dist/core/orchestration/AdaptiveScheduler.d.ts.map +1 -0
  158. package/dist/core/orchestration/AdaptiveScheduler.js +460 -0
  159. package/dist/core/orchestration/AdaptiveScheduler.js.map +1 -0
  160. package/dist/core/orchestration/PriorityQueue.d.ts +54 -0
  161. package/dist/core/orchestration/PriorityQueue.d.ts.map +1 -0
  162. package/dist/core/orchestration/PriorityQueue.js +122 -0
  163. package/dist/core/orchestration/PriorityQueue.js.map +1 -0
  164. package/dist/core/orchestration/WorkflowOrchestrator.d.ts +189 -0
  165. package/dist/core/orchestration/WorkflowOrchestrator.d.ts.map +1 -0
  166. package/dist/core/orchestration/WorkflowOrchestrator.js +845 -0
  167. package/dist/core/orchestration/WorkflowOrchestrator.js.map +1 -0
  168. package/dist/core/orchestration/index.d.ts +7 -0
  169. package/dist/core/orchestration/index.d.ts.map +1 -0
  170. package/dist/core/orchestration/index.js +11 -0
  171. package/dist/core/orchestration/index.js.map +1 -0
  172. package/dist/core/orchestration/types.d.ts +96 -0
  173. package/dist/core/orchestration/types.d.ts.map +1 -0
  174. package/dist/core/orchestration/types.js +6 -0
  175. package/dist/core/orchestration/types.js.map +1 -0
  176. package/dist/core/recovery/CircuitBreaker.d.ts +176 -0
  177. package/dist/core/recovery/CircuitBreaker.d.ts.map +1 -0
  178. package/dist/core/recovery/CircuitBreaker.js +382 -0
  179. package/dist/core/recovery/CircuitBreaker.js.map +1 -0
  180. package/dist/core/recovery/RecoveryOrchestrator.d.ts +186 -0
  181. package/dist/core/recovery/RecoveryOrchestrator.d.ts.map +1 -0
  182. package/dist/core/recovery/RecoveryOrchestrator.js +476 -0
  183. package/dist/core/recovery/RecoveryOrchestrator.js.map +1 -0
  184. package/dist/core/recovery/RetryStrategy.d.ts +127 -0
  185. package/dist/core/recovery/RetryStrategy.d.ts.map +1 -0
  186. package/dist/core/recovery/RetryStrategy.js +314 -0
  187. package/dist/core/recovery/RetryStrategy.js.map +1 -0
  188. package/dist/core/recovery/index.d.ts +8 -0
  189. package/dist/core/recovery/index.d.ts.map +1 -0
  190. package/dist/core/recovery/index.js +27 -0
  191. package/dist/core/recovery/index.js.map +1 -0
  192. package/dist/core/skills/DependencyResolver.d.ts +99 -0
  193. package/dist/core/skills/DependencyResolver.d.ts.map +1 -0
  194. package/dist/core/skills/DependencyResolver.js +260 -0
  195. package/dist/core/skills/DependencyResolver.js.map +1 -0
  196. package/dist/core/skills/DynamicSkillLoader.d.ts +96 -0
  197. package/dist/core/skills/DynamicSkillLoader.d.ts.map +1 -0
  198. package/dist/core/skills/DynamicSkillLoader.js +353 -0
  199. package/dist/core/skills/DynamicSkillLoader.js.map +1 -0
  200. package/dist/core/skills/ManifestGenerator.d.ts +114 -0
  201. package/dist/core/skills/ManifestGenerator.d.ts.map +1 -0
  202. package/dist/core/skills/ManifestGenerator.js +449 -0
  203. package/dist/core/skills/ManifestGenerator.js.map +1 -0
  204. package/dist/core/skills/index.d.ts +9 -0
  205. package/dist/core/skills/index.d.ts.map +1 -0
  206. package/dist/core/skills/index.js +24 -0
  207. package/dist/core/skills/index.js.map +1 -0
  208. package/dist/core/skills/types.d.ts +118 -0
  209. package/dist/core/skills/types.d.ts.map +1 -0
  210. package/dist/core/skills/types.js +7 -0
  211. package/dist/core/skills/types.js.map +1 -0
  212. package/dist/core/transport/QUICTransport.d.ts +320 -0
  213. package/dist/core/transport/QUICTransport.d.ts.map +1 -0
  214. package/dist/core/transport/QUICTransport.js +711 -0
  215. package/dist/core/transport/QUICTransport.js.map +1 -0
  216. package/dist/core/transport/index.d.ts +40 -0
  217. package/dist/core/transport/index.d.ts.map +1 -0
  218. package/dist/core/transport/index.js +46 -0
  219. package/dist/core/transport/index.js.map +1 -0
  220. package/dist/core/transport/quic-loader.d.ts +123 -0
  221. package/dist/core/transport/quic-loader.d.ts.map +1 -0
  222. package/dist/core/transport/quic-loader.js +293 -0
  223. package/dist/core/transport/quic-loader.js.map +1 -0
  224. package/dist/core/transport/quic.d.ts +154 -0
  225. package/dist/core/transport/quic.d.ts.map +1 -0
  226. package/dist/core/transport/quic.js +214 -0
  227. package/dist/core/transport/quic.js.map +1 -0
  228. package/dist/mcp/server.d.ts +9 -9
  229. package/dist/mcp/server.d.ts.map +1 -1
  230. package/dist/mcp/server.js +1 -2
  231. package/dist/mcp/server.js.map +1 -1
  232. package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
  233. package/dist/mcp/services/AgentRegistry.js +4 -1
  234. package/dist/mcp/services/AgentRegistry.js.map +1 -1
  235. package/dist/types/index.d.ts +2 -1
  236. package/dist/types/index.d.ts.map +1 -1
  237. package/dist/types/index.js +2 -0
  238. package/dist/types/index.js.map +1 -1
  239. package/dist/types/qx.d.ts +429 -0
  240. package/dist/types/qx.d.ts.map +1 -0
  241. package/dist/types/qx.js +71 -0
  242. package/dist/types/qx.js.map +1 -0
  243. package/dist/visualization/api/RestEndpoints.js +2 -2
  244. package/dist/visualization/api/RestEndpoints.js.map +1 -1
  245. package/dist/visualization/api/WebSocketServer.d.ts +44 -0
  246. package/dist/visualization/api/WebSocketServer.d.ts.map +1 -1
  247. package/dist/visualization/api/WebSocketServer.js +144 -23
  248. package/dist/visualization/api/WebSocketServer.js.map +1 -1
  249. package/dist/visualization/core/DataTransformer.d.ts +10 -0
  250. package/dist/visualization/core/DataTransformer.d.ts.map +1 -1
  251. package/dist/visualization/core/DataTransformer.js +60 -5
  252. package/dist/visualization/core/DataTransformer.js.map +1 -1
  253. package/dist/visualization/emit-event.d.ts +75 -0
  254. package/dist/visualization/emit-event.d.ts.map +1 -0
  255. package/dist/visualization/emit-event.js +213 -0
  256. package/dist/visualization/emit-event.js.map +1 -0
  257. package/dist/visualization/index.d.ts +1 -0
  258. package/dist/visualization/index.d.ts.map +1 -1
  259. package/dist/visualization/index.js +7 -1
  260. package/dist/visualization/index.js.map +1 -1
  261. package/docs/reference/skills.md +63 -1
  262. package/package.json +16 -58
@@ -1,709 +1,206 @@
1
1
  ---
2
2
  name: risk-based-testing
3
- description: Focus testing effort on highest-risk areas using risk assessment and prioritization. Use when planning test strategy, allocating testing resources, or making coverage decisions.
3
+ description: "Focus testing effort on highest-risk areas using risk assessment and prioritization. Use when planning test strategy, allocating testing resources, or making coverage decisions."
4
+ category: testing-methodologies
5
+ priority: high
6
+ tokenEstimate: 1000
7
+ agents: [qe-regression-risk-analyzer, qe-test-generator, qe-production-intelligence, qe-quality-gate]
8
+ implementation_status: optimized
9
+ optimization_version: 1.0
10
+ last_optimized: 2025-12-02
11
+ dependencies: []
12
+ quick_reference_card: true
13
+ tags: [risk, prioritization, test-planning, coverage, impact-analysis]
4
14
  ---
5
15
 
6
16
  # Risk-Based Testing
7
17
 
8
- ## Core Principle
18
+ <default_to_action>
19
+ When planning tests or allocating testing resources:
20
+ 1. IDENTIFY risks: What can go wrong? What's the impact? What's the likelihood?
21
+ 2. CALCULATE risk: Risk = Probability × Impact (use 1-5 scale for each)
22
+ 3. PRIORITIZE: Critical (20+) → High (12-19) → Medium (6-11) → Low (1-5)
23
+ 4. ALLOCATE effort: 60% critical, 25% high, 10% medium, 5% low
24
+ 5. REASSESS continuously: New info, changes, production incidents
25
+
26
+ **Quick Risk Assessment:**
27
+ - Probability factors: Complexity, change frequency, developer experience, technical debt
28
+ - Impact factors: User count, revenue, safety, reputation, regulatory
29
+ - Dynamic adjustment: Production bugs increase risk; stable code decreases
30
+
31
+ **Critical Success Factors:**
32
+ - Test where bugs hurt most, not everywhere equally
33
+ - Risk is dynamic - reassess with new information
34
+ - Production data informs risk (shift-right feeds shift-left)
35
+ </default_to_action>
36
+
37
+ ## Quick Reference Card
38
+
39
+ ### When to Use
40
+ - Planning sprint/release test strategy
41
+ - Deciding what to automate first
42
+ - Allocating limited testing time
43
+ - Justifying test coverage decisions
44
+
45
+ ### Risk Calculation
46
+ ```
47
+ Risk Score = Probability (1-5) × Impact (1-5)
48
+ ```
49
+
50
+ | Score | Priority | Effort | Action |
51
+ |-------|----------|--------|--------|
52
+ | 20-25 | Critical | 60% | Comprehensive testing, multiple techniques |
53
+ | 12-19 | High | 25% | Thorough testing, automation priority |
54
+ | 6-11 | Medium | 10% | Standard testing, basic automation |
55
+ | 1-5 | Low | 5% | Smoke test, exploratory only |
56
+
57
+ ### Probability Factors
58
+ | Factor | Low (1) | Medium (3) | High (5) |
59
+ |--------|---------|------------|----------|
60
+ | Complexity | Simple CRUD | Business logic | Algorithms, integrations |
61
+ | Change Rate | Stable 6+ months | Monthly changes | Weekly/daily changes |
62
+ | Developer Experience | Senior, domain expert | Mid-level | Junior, new to codebase |
63
+ | Technical Debt | Clean code | Some debt | Legacy, no tests |
64
+
65
+ ### Impact Factors
66
+ | Factor | Low (1) | Medium (3) | High (5) |
67
+ |--------|---------|------------|----------|
68
+ | Users Affected | Admin only | Department | All users |
69
+ | Revenue | None | Indirect | Direct (checkout) |
70
+ | Safety | Convenience | Data loss | Physical harm |
71
+ | Reputation | Internal | Industry | Public scandal |
9
72
 
10
- **You cannot test everything. Test what matters most.**
11
-
12
- Risk-based testing focuses testing effort on areas where failures would cause the most harm, weighted by the likelihood of failure.
13
-
14
- ## Risk Formula
15
-
16
- ```
17
- Risk = Probability of Failure × Impact of Failure
18
- ```
19
-
20
- **High Risk:** Test thoroughly, often, with multiple techniques
21
- **Medium Risk:** Standard testing, automated regression
22
- **Low Risk:** Light testing, maybe skip
23
-
24
- ## Risk Identification
25
-
26
- ### Business Impact Factors
27
-
28
- **Revenue Impact**
29
- - Directly generates revenue? (checkout, payment)
30
- - Blocks revenue? (login, product catalog)
31
- - Minor impact? (help documentation)
32
-
33
- **User Impact**
34
- - Number of users affected
35
- - Frequency of use
36
- - Critical to user workflow?
37
- - Workarounds available?
38
-
39
- **Regulatory/Compliance**
40
- - Legal requirements
41
- - Security standards (PCI-DSS, GDPR)
42
- - Industry regulations
43
- - Contractual obligations
44
-
45
- **Reputation**
46
- - Public-facing features
47
- - Brand perception
48
- - Social media amplification risk
49
- - Customer trust impact
50
-
51
- **Data Sensitivity**
52
- - Financial data
53
- - Personal information
54
- - Health records
55
- - Confidential business data
56
-
57
- ### Technical Risk Factors
58
-
59
- **Complexity**
60
- - Complex algorithms → higher risk
61
- - Many dependencies → higher risk
62
- - Distributed systems → higher risk
63
- - Simple CRUD → lower risk
64
-
65
- **Change Frequency**
66
- - Frequently changed code → higher risk
67
- - New technology → higher risk
68
- - Stable, mature code → lower risk
69
-
70
- **Test Coverage**
71
- - Well-tested area → lower risk
72
- - No automated tests → higher risk
73
- - Poor test quality → higher risk
74
-
75
- **Historical Data**
76
- - Bug history (hotspots)
77
- - Production incidents
78
- - Failed releases
79
- - Customer complaints
80
-
81
- **Dependencies**
82
- - Third-party services
83
- - Legacy systems
84
- - Network reliability
85
- - External APIs
86
-
87
- ## Risk Assessment Matrix
88
-
89
- ### Creating Risk Matrix
90
-
91
- ```
92
- Impact → Low Medium High Critical
93
- ─────────────────────────────────────────────
94
- High │ Medium High High CRITICAL
95
- Prob │
96
- ↓ │
97
- Medium │ Low Medium High High
98
-
99
- Low │ Low Low Medium Medium
100
-
101
- Rare │ Skip Low Low Medium
102
- ```
103
-
104
- **Priority = Risk Level**
105
- - Critical: Test first, test thoroughly
106
- - High: Standard comprehensive testing
107
- - Medium: Focused testing on key scenarios
108
- - Low: Smoke test or skip if time-limited
109
-
110
- ### Example Risk Assessment
111
-
112
- **E-commerce Application:**
113
-
114
- | Feature | Impact | Probability | Risk | Test Strategy |
115
- |---------|--------|-------------|------|---------------|
116
- | Payment processing | Critical | Medium | CRITICAL | Extensive testing, multiple payment types, error scenarios, security testing |
117
- | Product search | High | Medium | High | Core flows automated, exploratory for edge cases |
118
- | User reviews | Medium | Low | Medium | Basic functional tests, focus on new features |
119
- | Help documentation | Low | Low | Low | Quick smoke test, spell check |
120
- | Admin analytics | Medium | Low | Medium | Key reports tested, edge cases documented |
121
-
122
- ## Risk-Based Test Planning
123
-
124
- ### Step 1: Identify Risks
125
-
126
- **Workshop with stakeholders:**
127
- - Product owner (business risks)
128
- - Developers (technical risks)
129
- - Support team (common issues)
130
- - QE (quality risks)
131
- - Security team (security risks)
132
-
133
- **Output:** List of potential failure points
134
-
135
- ### Step 2: Assess Each Risk
136
-
137
- For each risk:
138
- 1. **Probability:** How likely is this to fail? (Rare/Low/Medium/High)
139
- 2. **Impact:** What happens if it fails? (Low/Medium/High/Critical)
140
- 3. **Risk Level:** Use matrix to determine
141
-
142
- **Example:**
143
- ```
144
- Risk: Payment gateway timeout during high traffic
145
-
146
- Probability: Medium
147
- - Seen in load tests before
148
- - Known issue during sales events
149
- - Mitigation in place but not perfect
150
-
151
- Impact: Critical
152
- - Revenue loss (thousands/minute)
153
- - Customer frustration
154
- - Bad press potential
155
-
156
- Risk Level: CRITICAL → Test extensively
157
- ```
158
-
159
- ### Step 3: Prioritize Testing
160
-
161
- **Critical Risks:**
162
- - Test first in sprint
163
- - Multiple testing techniques
164
- - Extensive test coverage
165
- - Performance/load testing
166
- - Security testing
167
- - Manual exploratory testing
168
- - Automated regression tests
169
-
170
- **High Risks:**
171
- - Core test scenarios automated
172
- - Key user flows tested manually
173
- - Edge cases documented
174
- - Regular regression testing
175
-
176
- **Medium Risks:**
177
- - Happy path automated
178
- - Basic edge case testing
179
- - Spot-check during exploratory sessions
180
-
181
- **Low Risks:**
182
- - Smoke test only
183
- - May skip if time-limited
184
- - Document known limitations
185
-
186
- ### Step 4: Allocate Testing Time
187
-
188
- **Time budget based on risk:**
189
-
190
- ```
191
- Critical: 40% of testing time
192
- High: 35% of testing time
193
- Medium: 20% of testing time
194
- Low: 5% of testing time
195
- ```
196
-
197
- **Adjust based on context:**
198
- - Startup: Heavily weight Critical/High
199
- - Mature product: More balanced
200
- - Compliance-heavy: May need comprehensive coverage
201
-
202
- ## Risk-Based Test Design
203
-
204
- ### Coverage by Risk Level
205
-
206
- **Critical Risk Area:**
207
- ```
208
- Test coverage:
209
- ✓ Happy path (multiple variations)
210
- ✓ All error scenarios
211
- ✓ Boundary conditions
212
- ✓ Performance under load
213
- ✓ Security vulnerabilities
214
- ✓ Recovery from failures
215
- ✓ Concurrent operations
216
- ✓ Data integrity
217
- ✓ Integration points
218
-
219
- Techniques:
220
- - Exploratory testing sessions
221
- - Automated regression suite
222
- - Load/stress testing
223
- - Security scanning
224
- - Chaos engineering
225
- ```
226
-
227
- **Medium Risk Area:**
228
- ```
229
- Test coverage:
230
- ✓ Happy path
231
- ✓ Common error scenarios
232
- ✓ Key boundary conditions
233
-
234
- Techniques:
235
- - Automated happy path tests
236
- - Spot-check during exploratory testing
237
- - Basic error handling verification
238
- ```
239
-
240
- **Low Risk Area:**
241
- ```
242
- Test coverage:
243
- ✓ Smoke test (works at all?)
244
-
245
- Techniques:
246
- - Quick manual check
247
- - Maybe automated smoke test
248
- ```
249
-
250
- ### Example: Login Feature
251
-
252
- **Risk Assessment:**
253
- ```
254
- Impact: High (blocks all functionality)
255
- Probability: Medium (well-understood, but complex)
256
- Risk Level: High
257
- ```
258
-
259
- **Test Strategy:**
260
- ```
261
- Critical Scenarios:
262
- ✓ Valid credentials → Success
263
- ✓ Invalid password → Error message
264
- ✓ Account locked after failed attempts
265
- ✓ Session timeout handling
266
- ✓ Multi-factor authentication
267
- ✓ Password reset flow
268
- ✓ SQL injection attempts
269
- ✓ Brute force protection
270
-
271
- Medium Priority:
272
- ✓ Remember me functionality
273
- ✓ Social login integration
274
- ✓ Different user roles
275
-
276
- Low Priority:
277
- ✓ Login page UI variations
278
- ✓ Keyboard navigation
279
- ```
280
-
281
- ## Risk Mitigation Strategies
282
-
283
- ### Reducing Probability
284
-
285
- **Technical Mitigation:**
286
- - Code reviews
287
- - Static analysis
288
- - Test automation
289
- - Pair programming
290
- - Design patterns
291
- - Simpler architecture
292
-
293
- **Process Mitigation:**
294
- - Feature flags (gradual rollout)
295
- - Canary deployments
296
- - Blue-green deployments
297
- - Comprehensive monitoring
298
-
299
- ### Reducing Impact
300
-
301
- **Technical Mitigation:**
302
- - Graceful degradation
303
- - Circuit breakers
304
- - Fallback mechanisms
305
- - Data backups
306
- - Rollback procedures
307
-
308
- **Business Mitigation:**
309
- - Insurance
310
- - Service level agreements
311
- - Customer communication plans
312
- - Workarounds documented
313
-
314
- ## Dynamic Risk Assessment
315
-
316
- **Risks change over time:**
317
-
318
- **Risk increases when:**
319
- - Major refactoring
320
- - New team members
321
- - Tight deadlines
322
- - New technology
323
- - Integration changes
324
- - High-traffic events coming (Black Friday)
325
-
326
- **Risk decreases when:**
327
- - Comprehensive test coverage
328
- - Code stabilizes
329
- - Team expertise grows
330
- - Multiple successful releases
331
- - Production monitoring improves
332
-
333
- **Re-assess risks:**
334
- - Every sprint planning
335
- - Before major releases
336
- - After production incidents
337
- - Quarterly review
338
-
339
- ## Production Risk Monitoring
340
-
341
- ### Leading Indicators
342
-
343
- Monitor for risk signals:
344
-
345
- **Code metrics:**
346
- - Increasing complexity
347
- - Test coverage declining
348
- - Code churn in critical areas
349
- - Growing tech debt
350
-
351
- **Team metrics:**
352
- - Velocity dropping
353
- - Bug fix time increasing
354
- - Team turnover
355
-
356
- **Production metrics:**
357
- - Error rates trending up
358
- - Performance degrading
359
- - Customer complaints rising
360
-
361
- ### Incident-Based Risk Assessment
362
-
363
- **After each production incident:**
364
-
365
- 1. **Root cause analysis**
366
- - Why did it happen?
367
- - Why wasn't it caught?
368
-
369
- 2. **Risk re-assessment**
370
- - Was this area properly risk-assessed?
371
- - Should we increase testing focus?
372
-
373
- 3. **Preventive measures**
374
- - Add tests
375
- - Improve monitoring
376
- - Architectural changes
377
-
378
- **Example:**
379
- ```
380
- Incident: Payment processing failed for 2 hours
381
- Root cause: Database connection pool exhausted
382
- Previous risk level: High
383
- New risk level: CRITICAL
384
- Action: Add load testing, improve monitoring, auto-scaling
385
- ```
386
-
387
- ## Risk-Based Automation Strategy
388
-
389
- ### Automate Based on Risk × Frequency
390
-
391
- ```
392
- High Risk + High Frequency = MUST AUTOMATE
393
- High Risk + Low Frequency = Manual testing OK
394
- Low Risk + High Frequency = Consider automation
395
- Low Risk + Low Frequency = Skip or manual spot-check
396
- ```
397
-
398
- **Automation priorities:**
399
- ```
400
- 1. Critical user flows (checkout, payment)
401
- 2. High-risk regressions (known to break)
402
- 3. Security vulnerabilities (injection, XSS)
403
- 4. Data integrity checks
404
- 5. Integration points
405
- 6. Lower priority features
406
- ```
407
-
408
- ## Communication of Risk
409
-
410
- ### Stakeholder Risk Dashboard
411
-
412
- ```markdown
413
- ## Sprint 15 Risk Dashboard
414
-
415
- ### CRITICAL Risks
416
- 🔴 **Payment Gateway Integration**
417
- - Risk: Integration fails during high traffic
418
- - Impact: Revenue loss, customer frustration
419
- - Status: Load testing scheduled, monitoring enhanced
420
- - Test coverage: 85% → Target: 95%
421
-
422
- ### HIGH Risks
423
- 🟡 **User Authentication**
424
- - Risk: Session handling under concurrent logins
425
- - Impact: Security vulnerability, user lockouts
426
- - Status: Tests passing, exploratory testing planned
427
-
428
- ### Recently Mitigated
429
- ✅ **Database Performance** (was Critical)
430
- - Added connection pooling
431
- - Load testing completed successfully
432
- - Monitoring in place
433
- ```
434
-
435
- ### Risk-Based Test Reports
436
-
437
- ```markdown
438
- ## Test Summary - Release 3.2
439
-
440
- ### Risk Coverage
441
- ✅ Critical Risks: 100% tested
442
- ✅ High Risks: 95% tested
443
- ✅ Medium Risks: 75% tested
444
- ⚠️ Low Risks: 40% tested (acceptable)
445
-
446
- ### Issues Found by Risk Level
447
- - Critical: 0 open issues
448
- - High: 1 open issue (non-blocking)
449
- - Medium: 3 open issues (documented)
450
- - Low: 5 open issues (deferred)
451
-
452
- ### Recommendation: GREEN for release
453
- All critical and high-risk areas thoroughly tested and passing.
454
- ```
455
-
456
- ## Practical Examples
457
-
458
- ### Example 1: New Feature - Social Login
459
-
460
- **Initial Risk Assessment:**
461
- ```
462
- Feature: Login via Google/Facebook
463
- Impact: Medium (alternative to email login exists)
464
- Probability: Medium (third-party integration, new to team)
465
- Risk Level: Medium → High
466
- ```
467
-
468
- **Test Strategy:**
469
- - Core flow automated
470
- - Error scenarios tested
471
- - Security review (OAuth flow)
472
- - Privacy compliance check
473
- - Fallback to email tested
73
+ ---
474
74
 
475
- ### Example 2: Bug Fix in Payment Processing
75
+ ## Risk Assessment Workflow
476
76
 
477
- **Risk Re-Assessment:**
77
+ ### Step 1: List Features/Components
478
78
  ```
479
- Change: Fix rounding error in multi-currency payments
480
- Area Risk: Critical (payment processing)
481
- Change Risk: Medium (localized change)
482
- Overall: High Test thoroughly despite "simple fix"
79
+ Feature | Probability | Impact | Risk | Priority
80
+ --------|-------------|--------|------|----------
81
+ Checkout | 4 | 5 | 20 | Critical
82
+ User Auth | 3 | 5 | 15 | High
83
+ Admin Panel | 2 | 2 | 4 | Low
84
+ Search | 3 | 3 | 9 | Medium
483
85
  ```
484
86
 
485
- **Test Strategy:**
486
- - Fix verified with unit tests
487
- - Regression tests for payment flow
488
- - Manual testing with multiple currencies
489
- - Edge cases (0.01 amounts, max amounts)
490
- - Deploy to staging first
491
- - Monitor production closely
492
-
493
- ## Combining Risk-Based with Other Approaches
494
-
495
- ### Risk + Context-Driven Testing
496
- - Risk identifies WHERE to test
497
- - Context determines HOW to test
498
-
499
- ### Risk + Exploratory Testing
500
- - High-risk areas get more exploration time
501
- - Use risk assessment to create charters
502
-
503
- ### Risk + TDD
504
- - Critical code gets TDD treatment
505
- - Less critical code might skip TDD
506
-
507
- ### Risk + Automation
508
- - Risk determines automation priority
509
- - High-risk = automate first and thoroughly
510
-
511
- ## Common Pitfalls
512
-
513
- ### ❌ Risk Assessment Too Generic
514
- "High risk: payment processing"
515
-
516
- **Better:** "Critical risk: payment processing timeout under load during checkout, especially for international transactions"
517
-
518
- ### ❌ Not Updating Risk Assessment
519
- Risks from 6 months ago may not be relevant now.
520
-
521
- **Fix:** Review and update quarterly or after incidents
522
-
523
- ### ❌ Ignoring Low Probability, High Impact
524
- Rare but catastrophic events still need attention.
525
-
526
- **Fix:** Some testing of high-impact items regardless of probability
527
-
528
- ### ❌ Only Technical Risks
529
- Missing business, regulatory, reputation risks.
530
-
531
- **Fix:** Include diverse stakeholders in risk assessment
532
-
533
- ## Risk-Based Testing Checklist
534
-
535
- **Before Sprint:**
536
- - [ ] Risks identified for new features
537
- - [ ] Risk levels assigned
538
- - [ ] Test strategy per risk level
539
- - [ ] Testing time allocated by risk
540
-
541
- **During Development:**
542
- - [ ] Critical areas tested first
543
- - [ ] Risk levels guide test depth
544
- - [ ] New risks identified and assessed
545
-
546
- **Before Release:**
547
- - [ ] All critical risks tested and passed
548
- - [ ] High risks have sufficient coverage
549
- - [ ] Known issues documented with risk level
550
- - [ ] Stakeholders informed of residual risks
551
-
552
- **After Release:**
553
- - [ ] Monitor for risk realization
554
- - [ ] Update risk assessment based on learnings
555
- - [ ] Improve testing for next cycle
556
-
557
- ## Using with QE Agents
558
-
559
- ### Automated Risk Assessment
560
-
561
- **qe-regression-risk-analyzer** performs intelligent risk scoring:
87
+ ### Step 2: Apply Test Depth
562
88
  ```typescript
563
- // Agent analyzes PR for risk factors
564
- const riskAnalysis = await agent.analyzeRisk({
565
- diff: prChanges,
566
- historicalData: true,
567
- complexity: true,
568
- testCoverage: true
569
- });
570
-
571
- // Returns prioritized risk areas
572
- // {
573
- // criticalRisks: ['payment-processing', 'auth-session'],
574
- // highRisks: ['order-calculation'],
575
- // recommendedTests: [...],
576
- // estimatedEffort: '4 hours'
577
- // }
89
+ await Task("Risk-Based Test Generation", {
90
+ critical: {
91
+ features: ['checkout', 'payment'],
92
+ depth: 'comprehensive',
93
+ techniques: ['unit', 'integration', 'e2e', 'performance', 'security']
94
+ },
95
+ high: {
96
+ features: ['auth', 'user-profile'],
97
+ depth: 'thorough',
98
+ techniques: ['unit', 'integration', 'e2e']
99
+ },
100
+ medium: {
101
+ features: ['search', 'notifications'],
102
+ depth: 'standard',
103
+ techniques: ['unit', 'integration']
104
+ },
105
+ low: {
106
+ features: ['admin-panel', 'settings'],
107
+ depth: 'smoke',
108
+ techniques: ['smoke-tests']
109
+ }
110
+ }, "qe-test-generator");
578
111
  ```
579
112
 
580
- ### Risk-Driven Test Generation
581
-
582
- **qe-test-generator** creates tests based on risk levels:
113
+ ### Step 3: Reassess Dynamically
583
114
  ```typescript
584
- // Generate tests for critical risk areas
585
- await agent.generateTests({
586
- riskLevel: 'critical',
587
- features: ['payment', 'checkout'],
588
- coverage: 'comprehensive', // All scenarios + edge cases
589
- techniques: ['boundary', 'error', 'load', 'security']
590
- });
591
-
592
- // Generate lighter tests for low risk
593
- await agent.generateTests({
594
- riskLevel: 'low',
595
- features: ['help-docs'],
596
- coverage: 'smoke-only' // Just verify it works
597
- });
115
+ // Production incident increases risk
116
+ await Task("Update Risk Score", {
117
+ feature: 'search',
118
+ event: 'production-incident',
119
+ previousRisk: 9,
120
+ newProbability: 5, // Increased due to incident
121
+ newRisk: 15 // Now HIGH priority
122
+ }, "qe-regression-risk-analyzer");
598
123
  ```
599
124
 
600
- ### Dynamic Risk Re-Assessment
125
+ ---
126
+
127
+ ## ML-Enhanced Risk Analysis
601
128
 
602
- **qe-production-intelligence** monitors production to update risk scores:
603
129
  ```typescript
604
- // Agent tracks production incidents
605
- const productionRisks = await agent.analyzeIncidents({
606
- timeframe: '30d',
607
- severity: 'high',
608
- frequency: 'recurring'
609
- });
130
+ // Agent predicts risk using historical data
131
+ const riskAnalysis = await Task("ML Risk Analysis", {
132
+ codeChanges: changedFiles,
133
+ historicalBugs: bugDatabase,
134
+ prediction: {
135
+ model: 'gradient-boosting',
136
+ factors: ['complexity', 'change-frequency', 'author-experience', 'file-age']
137
+ }
138
+ }, "qe-regression-risk-analyzer");
610
139
 
611
- // Updates risk matrix based on real data
612
- // "Payment processing: Medium → CRITICAL (3 incidents this month)"
613
- // → Automatically increases test coverage for payment module
140
+ // Output: 95% accuracy risk prediction per file
614
141
  ```
615
142
 
616
- ### Risk-Based Quality Gate
143
+ ---
617
144
 
618
- **qe-quality-gate** makes GO/NO-GO decisions using risk:
619
- ```typescript
620
- // Agent evaluates readiness for release
621
- const decision = await agent.evaluateRelease({
622
- strategy: 'risk-based',
623
- criteria: {
624
- criticalRisks: 'all-tested-and-passed',
625
- highRisks: 'coverage >= 90%',
626
- mediumRisks: 'coverage >= 75%',
627
- lowRisks: 'documented-only'
628
- }
629
- });
145
+ ## Agent Coordination Hints
630
146
 
631
- // Returns:
632
- // {
633
- // decision: 'GO' | 'NO-GO',
634
- // blockers: [],
635
- // residualRisks: ['Low: UI glitch in admin panel (documented)'],
636
- // confidence: 0.95
637
- // }
147
+ ### Memory Namespace
148
+ ```
149
+ aqe/risk-based/
150
+ ├── risk-scores/* - Current risk assessments
151
+ ├── historical-bugs/* - Bug patterns by area
152
+ ├── production-data/* - Incident data for risk
153
+ └── coverage-map/* - Test depth by risk level
638
154
  ```
639
155
 
640
- ### Fleet Coordination for Risk Management
641
-
156
+ ### Fleet Coordination
642
157
  ```typescript
643
- // Multiple agents collaborate on risk management
644
158
  const riskFleet = await FleetManager.coordinate({
645
159
  strategy: 'risk-based-testing',
646
160
  agents: [
647
- 'qe-regression-risk-analyzer', // Identify risks
648
- 'qe-test-generator', // Generate risk-targeted tests
649
- 'qe-test-executor', // Execute by priority
650
- 'qe-production-intelligence', // Update risk from production
651
- 'qe-quality-gate' // Make release decision
161
+ 'qe-regression-risk-analyzer', // Risk scoring
162
+ 'qe-test-generator', // Risk-appropriate tests
163
+ 'qe-production-intelligence', // Production feedback
164
+ 'qe-quality-gate' // Risk-based gates
652
165
  ],
653
166
  topology: 'sequential'
654
167
  });
655
-
656
- // Executes full risk-based workflow
657
- await riskFleet.execute({
658
- release: 'v3.2',
659
- riskMatrix: 'e-commerce-default'
660
- });
661
168
  ```
662
169
 
663
- ### Agent-Assisted Risk Workshops
170
+ ---
171
+
172
+ ## Integration with CI/CD
664
173
 
665
- ```typescript
666
- // Agent facilitates risk identification workshop
667
- const workshop = await qe-requirements-validator.facilitateRiskWorkshop({
668
- participants: ['product', 'dev', 'qe', 'support', 'security'],
669
- features: ['new-checkout-flow'],
670
- duration: '60min'
671
- });
174
+ ```yaml
175
+ # Risk-based test selection in pipeline
176
+ - name: Risk Analysis
177
+ run: aqe risk-analyze --changes ${{ github.event.pull_request.files }}
178
+
179
+ - name: Run Critical Tests
180
+ if: risk.critical > 0
181
+ run: npm run test:critical
182
+
183
+ - name: Run High Tests
184
+ if: risk.high > 0
185
+ run: npm run test:high
672
186
 
673
- // Agent synthesizes input into risk matrix
674
- // Identifies: 15 risks across 5 categories
675
- // Prioritizes: 3 critical, 5 high, 7 medium
676
- // Recommends: Test strategy per risk level
187
+ - name: Skip Low Risk
188
+ if: risk.low_only
189
+ run: npm run test:smoke
677
190
  ```
678
191
 
679
192
  ---
680
193
 
681
194
  ## Related Skills
682
-
683
- **Core Quality Practices:**
684
- - [agentic-quality-engineering](../agentic-quality-engineering/) - Risk-based agent coordination
685
- - [holistic-testing-pact](../holistic-testing-pact/) - Risk coverage across test quadrants
686
- - [context-driven-testing](../context-driven-testing/) - Risk assessment in context
687
-
688
- **Testing Approaches:**
689
- - [exploratory-testing-advanced](../exploratory-testing-advanced/) - Risk-guided exploration charters
690
- - [test-automation-strategy](../test-automation-strategy/) - Automate based on risk × frequency
691
- - [api-testing-patterns](../api-testing-patterns/) - API risk scenarios
692
- - [performance-testing](../performance-testing/) - Load test high-risk areas
693
- - [security-testing](../security-testing/) - Security risk assessment
694
-
695
- **Communication:**
696
- - [quality-metrics](../quality-metrics/) - Risk-based metrics dashboard
697
- - [bug-reporting-excellence](../bug-reporting-excellence/) - Communicate bug risk levels
195
+ - [agentic-quality-engineering](../agentic-quality-engineering/) - Risk-aware agents
196
+ - [context-driven-testing](../context-driven-testing/) - Context affects risk
197
+ - [regression-testing](../regression-testing/) - Risk-based regression selection
198
+ - [shift-right-testing](../shift-right-testing/) - Production informs risk
698
199
 
699
200
  ---
700
201
 
701
202
  ## Remember
702
203
 
703
- **Perfect testing is impossible. Smart testing is achievable.**
704
-
705
- Focus effort where it matters most. Accept that low-risk areas might have bugs. Communicate risk clearly. Adjust as you learn.
706
-
707
- Risk-based testing isn't about testing less - it's about testing smarter.
204
+ **Risk = Probability × Impact.** Test where bugs hurt most. Critical gets 60%, low gets 5%. Risk is dynamic - reassess with new info. Production incidents raise risk scores.
708
205
 
709
- **With Agents**: Agents automate risk scoring, continuously update risk matrices from production data, and orchestrate test generation based on risk priorities. Use agents to make risk-based testing data-driven and scalable.
206
+ **With Agents:** Agents calculate risk using ML on historical data, select risk-appropriate tests, and adjust scores from production feedback. Use agents to maintain dynamic risk profiles at scale.