agentic-qe 1.1.0 → 1.2.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 (297) hide show
  1. package/.claude/agents/qe-coverage-analyzer.md +8 -0
  2. package/.claude/agents/qe-flaky-test-hunter.md +9 -1
  3. package/.claude/agents/qe-test-generator.md +7 -0
  4. package/.claude/agents/reasoning/agent.md +816 -0
  5. package/.claude/agents/reasoning/goal-planner.md +73 -0
  6. package/.claude/settings.json +21 -20
  7. package/.claude/skills/README.md +124 -0
  8. package/.claude/skills/agentdb-advanced/SKILL.md +550 -0
  9. package/.claude/skills/agentdb-learning/SKILL.md +545 -0
  10. package/.claude/skills/agentdb-memory-patterns/SKILL.md +339 -0
  11. package/.claude/skills/agentdb-optimization/SKILL.md +509 -0
  12. package/.claude/skills/agentdb-vector-search/SKILL.md +339 -0
  13. package/.claude/skills/agentic-quality-engineering/SKILL.md +604 -0
  14. package/.claude/skills/api-testing-patterns/SKILL.md +686 -0
  15. package/.claude/skills/bug-reporting-excellence/SKILL.md +632 -0
  16. package/.claude/skills/code-review-quality/SKILL.md +683 -0
  17. package/.claude/skills/consultancy-practices/SKILL.md +540 -0
  18. package/.claude/skills/context-driven-testing/SKILL.md +466 -0
  19. package/.claude/skills/exploratory-testing-advanced/SKILL.md +676 -0
  20. package/.claude/skills/flow-nexus-neural/SKILL.md +738 -0
  21. package/.claude/skills/flow-nexus-platform/SKILL.md +1157 -0
  22. package/.claude/skills/flow-nexus-swarm/SKILL.md +610 -0
  23. package/.claude/skills/github-code-review/SKILL.md +1140 -0
  24. package/.claude/skills/github-multi-repo/SKILL.md +874 -0
  25. package/.claude/skills/github-project-management/SKILL.md +1277 -0
  26. package/.claude/skills/github-release-management/SKILL.md +1081 -0
  27. package/.claude/skills/github-workflow-automation/SKILL.md +1065 -0
  28. package/.claude/skills/hive-mind-advanced/SKILL.md +712 -0
  29. package/.claude/skills/holistic-testing-pact/SKILL.md +225 -0
  30. package/.claude/skills/hooks-automation/SKILL.md +1201 -0
  31. package/.claude/skills/pair-programming/SKILL.md +1202 -0
  32. package/.claude/skills/performance-analysis/SKILL.md +563 -0
  33. package/.claude/skills/performance-testing/SKILL.md +662 -0
  34. package/.claude/skills/quality-metrics/SKILL.md +592 -0
  35. package/.claude/skills/reasoningbank-agentdb/SKILL.md +446 -0
  36. package/.claude/skills/reasoningbank-intelligence/SKILL.md +201 -0
  37. package/.claude/skills/refactoring-patterns/SKILL.md +778 -0
  38. package/.claude/skills/risk-based-testing/SKILL.md +721 -0
  39. package/.claude/skills/security-testing/SKILL.md +651 -0
  40. package/.claude/skills/skill-builder/SKILL.md +910 -0
  41. package/.claude/skills/sparc-methodology/SKILL.md +1115 -0
  42. package/.claude/skills/stream-chain/SKILL.md +563 -0
  43. package/.claude/skills/swarm-advanced/SKILL.md +973 -0
  44. package/.claude/skills/swarm-orchestration/SKILL.md +179 -0
  45. package/.claude/skills/tdd-london-chicago/SKILL.md +567 -0
  46. package/.claude/skills/technical-writing/SKILL.md +235 -0
  47. package/.claude/skills/test-automation-strategy/SKILL.md +842 -0
  48. package/.claude/skills/verification-quality/SKILL.md +649 -0
  49. package/.claude/skills/xp-practices/SKILL.md +671 -0
  50. package/.claude/statusline-command.sh +176 -0
  51. package/CHANGELOG.md +536 -1
  52. package/README.md +92 -3
  53. package/config/improvement-loop.config.ts +323 -0
  54. package/config/neural-agent.config.ts +197 -0
  55. package/dist/adapters/MemoryStoreAdapter.d.ts +16 -16
  56. package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
  57. package/dist/adapters/MemoryStoreAdapter.js +16 -16
  58. package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
  59. package/dist/agents/BaseAgent.d.ts +69 -0
  60. package/dist/agents/BaseAgent.d.ts.map +1 -1
  61. package/dist/agents/BaseAgent.js +382 -1
  62. package/dist/agents/BaseAgent.js.map +1 -1
  63. package/dist/agents/CoverageAnalyzerAgent.d.ts +13 -2
  64. package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
  65. package/dist/agents/CoverageAnalyzerAgent.js +105 -6
  66. package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
  67. package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -1
  68. package/dist/agents/DeploymentReadinessAgent.js +13 -13
  69. package/dist/agents/DeploymentReadinessAgent.js.map +1 -1
  70. package/dist/agents/FlakyTestHunterAgent.d.ts +28 -0
  71. package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
  72. package/dist/agents/FlakyTestHunterAgent.js +159 -4
  73. package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
  74. package/dist/agents/FleetCommanderAgent.d.ts.map +1 -1
  75. package/dist/agents/FleetCommanderAgent.js +2 -2
  76. package/dist/agents/FleetCommanderAgent.js.map +1 -1
  77. package/dist/agents/LearningAgent.d.ts +14 -5
  78. package/dist/agents/LearningAgent.d.ts.map +1 -1
  79. package/dist/agents/LearningAgent.js +36 -16
  80. package/dist/agents/LearningAgent.js.map +1 -1
  81. package/dist/agents/NeuralAgentExtension.d.ts +117 -0
  82. package/dist/agents/NeuralAgentExtension.d.ts.map +1 -0
  83. package/dist/agents/NeuralAgentExtension.js +288 -0
  84. package/dist/agents/NeuralAgentExtension.js.map +1 -0
  85. package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -1
  86. package/dist/agents/PerformanceTesterAgent.js +4 -3
  87. package/dist/agents/PerformanceTesterAgent.js.map +1 -1
  88. package/dist/agents/ProductionIntelligenceAgent.js +7 -7
  89. package/dist/agents/ProductionIntelligenceAgent.js.map +1 -1
  90. package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
  91. package/dist/agents/QualityAnalyzerAgent.js +2 -2
  92. package/dist/agents/QualityAnalyzerAgent.js.map +1 -1
  93. package/dist/agents/QualityGateAgent.js +5 -5
  94. package/dist/agents/QualityGateAgent.js.map +1 -1
  95. package/dist/agents/RegressionRiskAnalyzerAgent.js +7 -7
  96. package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
  97. package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -1
  98. package/dist/agents/RequirementsValidatorAgent.js +1 -1
  99. package/dist/agents/RequirementsValidatorAgent.js.map +1 -1
  100. package/dist/agents/SecurityScannerAgent.js +6 -6
  101. package/dist/agents/SecurityScannerAgent.js.map +1 -1
  102. package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
  103. package/dist/agents/TestExecutorAgent.js +1 -3
  104. package/dist/agents/TestExecutorAgent.js.map +1 -1
  105. package/dist/agents/TestGeneratorAgent.d.ts +15 -4
  106. package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
  107. package/dist/agents/TestGeneratorAgent.js +165 -43
  108. package/dist/agents/TestGeneratorAgent.js.map +1 -1
  109. package/dist/agents/mixins/NeuralCapableMixin.d.ts +130 -0
  110. package/dist/agents/mixins/NeuralCapableMixin.d.ts.map +1 -0
  111. package/dist/agents/mixins/NeuralCapableMixin.js +358 -0
  112. package/dist/agents/mixins/NeuralCapableMixin.js.map +1 -0
  113. package/dist/agents/mixins/QUICCapableMixin.d.ts +34 -0
  114. package/dist/agents/mixins/QUICCapableMixin.d.ts.map +1 -0
  115. package/dist/agents/mixins/QUICCapableMixin.js +346 -0
  116. package/dist/agents/mixins/QUICCapableMixin.js.map +1 -0
  117. package/dist/cli/commands/agent/index.d.ts +5 -0
  118. package/dist/cli/commands/agent/index.d.ts.map +1 -1
  119. package/dist/cli/commands/agent/index.js +11 -6
  120. package/dist/cli/commands/agent/index.js.map +1 -1
  121. package/dist/cli/commands/agent/kill.d.ts +13 -0
  122. package/dist/cli/commands/agent/kill.d.ts.map +1 -0
  123. package/dist/cli/commands/agent/kill.js +65 -0
  124. package/dist/cli/commands/agent/kill.js.map +1 -0
  125. package/dist/cli/commands/agent/list.d.ts +19 -0
  126. package/dist/cli/commands/agent/list.d.ts.map +1 -0
  127. package/dist/cli/commands/agent/list.js +92 -0
  128. package/dist/cli/commands/agent/list.js.map +1 -0
  129. package/dist/cli/commands/agent/logs.d.ts +14 -0
  130. package/dist/cli/commands/agent/logs.d.ts.map +1 -0
  131. package/dist/cli/commands/agent/logs.js +77 -0
  132. package/dist/cli/commands/agent/logs.js.map +1 -0
  133. package/dist/cli/commands/agent/metrics.d.ts +21 -0
  134. package/dist/cli/commands/agent/metrics.d.ts.map +1 -0
  135. package/dist/cli/commands/agent/metrics.js +87 -0
  136. package/dist/cli/commands/agent/metrics.js.map +1 -0
  137. package/dist/cli/commands/agent/spawn.d.ts +28 -0
  138. package/dist/cli/commands/agent/spawn.d.ts.map +1 -0
  139. package/dist/cli/commands/agent/spawn.js +83 -0
  140. package/dist/cli/commands/agent/spawn.js.map +1 -0
  141. package/dist/cli/commands/init.d.ts +24 -0
  142. package/dist/cli/commands/init.d.ts.map +1 -1
  143. package/dist/cli/commands/init.js +475 -7
  144. package/dist/cli/commands/init.js.map +1 -1
  145. package/dist/cli/commands/skills/index.d.ts +51 -0
  146. package/dist/cli/commands/skills/index.d.ts.map +1 -0
  147. package/dist/cli/commands/skills/index.js +364 -0
  148. package/dist/cli/commands/skills/index.js.map +1 -0
  149. package/dist/cli/index.js +92 -1
  150. package/dist/cli/index.js.map +1 -1
  151. package/dist/core/EventBus.d.ts +38 -0
  152. package/dist/core/EventBus.d.ts.map +1 -1
  153. package/dist/core/EventBus.js +176 -31
  154. package/dist/core/EventBus.js.map +1 -1
  155. package/dist/core/FleetManager.d.ts +35 -1
  156. package/dist/core/FleetManager.d.ts.map +1 -1
  157. package/dist/core/FleetManager.js +121 -45
  158. package/dist/core/FleetManager.js.map +1 -1
  159. package/dist/core/MemoryManager.d.ts +19 -1
  160. package/dist/core/MemoryManager.d.ts.map +1 -1
  161. package/dist/core/MemoryManager.js +25 -1
  162. package/dist/core/MemoryManager.js.map +1 -1
  163. package/dist/core/embeddings/EmbeddingCache.d.ts +134 -0
  164. package/dist/core/embeddings/EmbeddingCache.d.ts.map +1 -0
  165. package/dist/core/embeddings/EmbeddingCache.js +239 -0
  166. package/dist/core/embeddings/EmbeddingCache.js.map +1 -0
  167. package/dist/core/embeddings/EmbeddingGenerator.d.ts +224 -0
  168. package/dist/core/embeddings/EmbeddingGenerator.d.ts.map +1 -0
  169. package/dist/core/embeddings/EmbeddingGenerator.js +459 -0
  170. package/dist/core/embeddings/EmbeddingGenerator.js.map +1 -0
  171. package/dist/core/embeddings/index.d.ts +15 -0
  172. package/dist/core/embeddings/index.d.ts.map +1 -0
  173. package/dist/core/embeddings/index.js +22 -0
  174. package/dist/core/embeddings/index.js.map +1 -0
  175. package/dist/core/memory/AgentDBIntegration.d.ts +35 -0
  176. package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -0
  177. package/dist/core/memory/AgentDBIntegration.js +75 -0
  178. package/dist/core/memory/AgentDBIntegration.js.map +1 -0
  179. package/dist/core/memory/AgentDBManager.d.ts +200 -0
  180. package/dist/core/memory/AgentDBManager.d.ts.map +1 -0
  181. package/dist/core/memory/AgentDBManager.js +263 -0
  182. package/dist/core/memory/AgentDBManager.js.map +1 -0
  183. package/dist/core/memory/AgentDBService.d.ts +160 -0
  184. package/dist/core/memory/AgentDBService.d.ts.map +1 -0
  185. package/dist/core/memory/AgentDBService.js +450 -0
  186. package/dist/core/memory/AgentDBService.js.map +1 -0
  187. package/dist/core/memory/RealAgentDBAdapter.d.ts +51 -0
  188. package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -0
  189. package/dist/core/memory/RealAgentDBAdapter.js +230 -0
  190. package/dist/core/memory/RealAgentDBAdapter.js.map +1 -0
  191. package/dist/core/memory/ReasoningBankAdapter.d.ts +58 -0
  192. package/dist/core/memory/ReasoningBankAdapter.d.ts.map +1 -0
  193. package/dist/core/memory/ReasoningBankAdapter.js +80 -0
  194. package/dist/core/memory/ReasoningBankAdapter.js.map +1 -0
  195. package/dist/core/memory/SwarmMemoryManager.d.ts +75 -3
  196. package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
  197. package/dist/core/memory/SwarmMemoryManager.js +236 -52
  198. package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
  199. package/dist/core/memory/index.d.ts +4 -0
  200. package/dist/core/memory/index.d.ts.map +1 -1
  201. package/dist/core/memory/index.js +9 -1
  202. package/dist/core/memory/index.js.map +1 -1
  203. package/dist/core/neural/NeuralTrainer.d.ts +137 -0
  204. package/dist/core/neural/NeuralTrainer.d.ts.map +1 -0
  205. package/dist/core/neural/NeuralTrainer.js +543 -0
  206. package/dist/core/neural/NeuralTrainer.js.map +1 -0
  207. package/dist/core/neural/index.d.ts +8 -0
  208. package/dist/core/neural/index.d.ts.map +1 -0
  209. package/dist/core/neural/index.js +24 -0
  210. package/dist/core/neural/index.js.map +1 -0
  211. package/dist/core/neural/types.d.ts +216 -0
  212. package/dist/core/neural/types.d.ts.map +1 -0
  213. package/dist/core/neural/types.js +8 -0
  214. package/dist/core/neural/types.js.map +1 -0
  215. package/dist/core/security/CertificateValidator.d.ts +130 -0
  216. package/dist/core/security/CertificateValidator.d.ts.map +1 -0
  217. package/dist/core/security/CertificateValidator.js +376 -0
  218. package/dist/core/security/CertificateValidator.js.map +1 -0
  219. package/dist/core/transport/QUICTransport.d.ts +62 -0
  220. package/dist/core/transport/QUICTransport.d.ts.map +1 -0
  221. package/dist/core/transport/QUICTransport.js +381 -0
  222. package/dist/core/transport/QUICTransport.js.map +1 -0
  223. package/dist/core/transport/SecureQUICTransport.d.ts +71 -0
  224. package/dist/core/transport/SecureQUICTransport.d.ts.map +1 -0
  225. package/dist/core/transport/SecureQUICTransport.js +253 -0
  226. package/dist/core/transport/SecureQUICTransport.js.map +1 -0
  227. package/dist/learning/AdvancedFeatureExtractor.d.ts +123 -0
  228. package/dist/learning/AdvancedFeatureExtractor.d.ts.map +1 -0
  229. package/dist/learning/AdvancedFeatureExtractor.js +423 -0
  230. package/dist/learning/AdvancedFeatureExtractor.js.map +1 -0
  231. package/dist/learning/FlakyPredictionModel.d.ts +11 -1
  232. package/dist/learning/FlakyPredictionModel.d.ts.map +1 -1
  233. package/dist/learning/FlakyPredictionModel.js +82 -35
  234. package/dist/learning/FlakyPredictionModel.js.map +1 -1
  235. package/dist/learning/FlakyTestDetector.d.ts +9 -0
  236. package/dist/learning/FlakyTestDetector.d.ts.map +1 -1
  237. package/dist/learning/FlakyTestDetector.js +28 -6
  238. package/dist/learning/FlakyTestDetector.js.map +1 -1
  239. package/dist/learning/ImprovementLoop.d.ts +16 -2
  240. package/dist/learning/ImprovementLoop.d.ts.map +1 -1
  241. package/dist/learning/ImprovementLoop.js +67 -8
  242. package/dist/learning/ImprovementLoop.js.map +1 -1
  243. package/dist/learning/ImprovementWorker.d.ts +83 -0
  244. package/dist/learning/ImprovementWorker.d.ts.map +1 -0
  245. package/dist/learning/ImprovementWorker.js +164 -0
  246. package/dist/learning/ImprovementWorker.js.map +1 -0
  247. package/dist/learning/NeuralPatternMatcher.d.ts +184 -0
  248. package/dist/learning/NeuralPatternMatcher.d.ts.map +1 -0
  249. package/dist/learning/NeuralPatternMatcher.js +702 -0
  250. package/dist/learning/NeuralPatternMatcher.js.map +1 -0
  251. package/dist/learning/NeuralTrainer.d.ts +209 -0
  252. package/dist/learning/NeuralTrainer.d.ts.map +1 -0
  253. package/dist/learning/NeuralTrainer.js +478 -0
  254. package/dist/learning/NeuralTrainer.js.map +1 -0
  255. package/dist/learning/index.d.ts +13 -7
  256. package/dist/learning/index.d.ts.map +1 -1
  257. package/dist/learning/index.js +27 -11
  258. package/dist/learning/index.js.map +1 -1
  259. package/dist/learning/types.d.ts +1 -0
  260. package/dist/learning/types.d.ts.map +1 -1
  261. package/dist/learning/types.js +16 -0
  262. package/dist/learning/types.js.map +1 -1
  263. package/dist/mcp/MCPToolRegistry.d.ts +34 -0
  264. package/dist/mcp/MCPToolRegistry.d.ts.map +1 -0
  265. package/dist/mcp/MCPToolRegistry.js +48 -0
  266. package/dist/mcp/MCPToolRegistry.js.map +1 -0
  267. package/dist/mcp/server.d.ts +4 -4
  268. package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
  269. package/dist/mcp/services/AgentRegistry.js +7 -1
  270. package/dist/mcp/services/AgentRegistry.js.map +1 -1
  271. package/dist/transport/QUICTransport.d.ts +340 -0
  272. package/dist/transport/QUICTransport.d.ts.map +1 -0
  273. package/dist/transport/QUICTransport.js +814 -0
  274. package/dist/transport/QUICTransport.js.map +1 -0
  275. package/dist/transport/UDPTransport.d.ts +348 -0
  276. package/dist/transport/UDPTransport.d.ts.map +1 -0
  277. package/dist/transport/UDPTransport.js +820 -0
  278. package/dist/transport/UDPTransport.js.map +1 -0
  279. package/dist/types/errors.d.ts +1 -1
  280. package/dist/types/index.d.ts +37 -0
  281. package/dist/types/index.d.ts.map +1 -1
  282. package/dist/types/index.js +2 -0
  283. package/dist/types/index.js.map +1 -1
  284. package/dist/types/quic.d.ts +339 -0
  285. package/dist/types/quic.d.ts.map +1 -0
  286. package/dist/types/quic.js +48 -0
  287. package/dist/types/quic.js.map +1 -0
  288. package/dist/utils/Config.js +1 -1
  289. package/dist/utils/Config.js.map +1 -1
  290. package/dist/utils/Database.d.ts +14 -0
  291. package/dist/utils/Database.d.ts.map +1 -1
  292. package/dist/utils/Database.js +51 -4
  293. package/dist/utils/Database.js.map +1 -1
  294. package/dist/utils/Logger.d.ts.map +1 -1
  295. package/dist/utils/Logger.js +111 -26
  296. package/dist/utils/Logger.js.map +1 -1
  297. package/package.json +30 -7
@@ -0,0 +1,592 @@
1
+ ---
2
+ name: quality-metrics
3
+ description: Measure quality effectively with actionable metrics. Use when establishing quality dashboards, defining KPIs, or evaluating test effectiveness.
4
+ version: 1.0.0
5
+ category: quality-engineering
6
+ tags:
7
+ - metrics
8
+ - kpis
9
+ - quality-dashboards
10
+ - dora-metrics
11
+ - measurement
12
+ - continuous-improvement
13
+ difficulty: intermediate
14
+ estimated_time: 30-45 minutes
15
+ author: user
16
+ ---
17
+
18
+ # Quality Metrics
19
+
20
+ ## Core Principle
21
+
22
+ **Measure what matters, not what's easy to measure.**
23
+
24
+ Metrics should drive better decisions, not just prettier dashboards. If a metric doesn't change behavior or inform action, stop tracking it.
25
+
26
+ ## The Vanity Metrics Problem
27
+
28
+ ### Vanity Metrics (Stop Measuring These)
29
+
30
+ **Test Count**
31
+ - "We have 5,000 tests!"
32
+ - So what? Are they finding bugs? Are they maintainable? Do they give confidence?
33
+
34
+ **Code Coverage Percentage**
35
+ - "We achieved 85% coverage!"
36
+ - Useless without context. 85% of what? Critical paths? Or just getters/setters?
37
+
38
+ **Test Cases Executed**
39
+ - "Ran 10,000 test cases today!"
40
+ - How many found problems? How many are redundant?
41
+
42
+ **Bugs Found**
43
+ - "QA found 200 bugs this sprint!"
44
+ - Is that good or bad? Are they trivial or critical? Should they have been found earlier?
45
+
46
+ **Story Points Completed**
47
+ - "We completed 50 points of testing work!"
48
+ - Points are relative and gameable. What actually got better?
49
+
50
+ ### Why Vanity Metrics Fail
51
+
52
+ 1. **Easily gamed**: People optimize for the metric, not the goal
53
+ 2. **No context**: Numbers without meaning
54
+ 3. **No action**: What do you do differently based on this number?
55
+ 4. **False confidence**: High numbers that mean nothing
56
+
57
+ ## Meaningful Metrics
58
+
59
+ ### 1. Defect Escape Rate
60
+
61
+ **What**: Percentage of bugs that reach production vs. caught before release
62
+
63
+ **Why it matters**: Measures effectiveness of your quality process
64
+
65
+ **How to measure**:
66
+ ```
67
+ Defect Escape Rate = (Production Bugs / Total Bugs Found) × 100
68
+ ```
69
+
70
+ **Good**: < 5% escape rate
71
+ **Needs work**: > 15% escape rate
72
+
73
+ **Actions**:
74
+ - High escape rate → Shift testing left, improve risk assessment
75
+ - Low escape rate but slow releases → Maybe over-testing, reduce friction
76
+
77
+ ### 2. Mean Time to Detect (MTTD)
78
+
79
+ **What**: How long from bug introduction to discovery
80
+
81
+ **Why it matters**: Faster detection = cheaper fixes
82
+
83
+ **How to measure**:
84
+ ```
85
+ MTTD = Time bug found - Time bug introduced
86
+ ```
87
+
88
+ **Good**: < 1 day for critical paths
89
+ **Needs work**: > 1 week
90
+
91
+ **Actions**:
92
+ - High MTTD → Add monitoring, improve test coverage on critical paths
93
+ - Very low MTTD → Your fast feedback loops are working
94
+
95
+ ### 3. Mean Time to Resolution (MTTR)
96
+
97
+ **What**: Time from bug discovery to fix deployed
98
+
99
+ **Why it matters**: Indicates team efficiency and process friction
100
+
101
+ **How to measure**:
102
+ ```
103
+ MTTR = Time fix deployed - Time bug discovered
104
+ ```
105
+
106
+ **Good**: < 24 hours for critical bugs, < 1 week for minor
107
+ **Needs work**: > 1 week for critical bugs
108
+
109
+ **Actions**:
110
+ - High MTTR → Investigate bottlenecks (test env access? deployment pipeline? handoffs?)
111
+ - Very low MTTR but high escape rate → Rushing fixes, need better verification
112
+
113
+ ### 4. Deployment Frequency
114
+
115
+ **What**: How often you deploy to production
116
+
117
+ **Why it matters**: Proxy for team confidence and process maturity
118
+
119
+ **How to measure**:
120
+ ```
121
+ Deployments per week (or day)
122
+ ```
123
+
124
+ **Good**: Multiple per day
125
+ **Decent**: Multiple per week
126
+ **Needs work**: Less than weekly
127
+
128
+ **Actions**:
129
+ - Low frequency → Reduce batch size, improve automation, build confidence
130
+ - High frequency with high defect rate → Need better automated checks
131
+
132
+ ### 5. Change Failure Rate
133
+
134
+ **What**: Percentage of deployments that cause production issues
135
+
136
+ **Why it matters**: Measures release quality
137
+
138
+ **How to measure**:
139
+ ```
140
+ Change Failure Rate = (Failed Deployments / Total Deployments) × 100
141
+ ```
142
+
143
+ **Good**: < 5%
144
+ **Needs work**: > 15%
145
+
146
+ **Actions**:
147
+ - High failure rate → Improve pre-production validation, add canary deployments
148
+ - Very low but slow releases → Maybe you can deploy more frequently
149
+
150
+ ### 6. Test Execution Time
151
+
152
+ **What**: How long your test suite takes to run
153
+
154
+ **Why it matters**: Slow tests = slow feedback = less frequent testing
155
+
156
+ **How to measure**:
157
+ ```
158
+ Time from commit to test completion
159
+ ```
160
+
161
+ **Good**: < 10 minutes for unit tests, < 30 minutes for full suite
162
+ **Needs work**: > 1 hour
163
+
164
+ **Actions**:
165
+ - Slow tests → Parallelize, remove redundant tests, optimize slow tests
166
+ - Fast tests but bugs escaping → Coverage gaps, need better tests
167
+
168
+ ### 7. Flaky Test Rate
169
+
170
+ **What**: Percentage of tests that fail intermittently
171
+
172
+ **Why it matters**: Flaky tests destroy confidence
173
+
174
+ **How to measure**:
175
+ ```
176
+ Flaky Test Rate = (Flaky Tests / Total Tests) × 100
177
+ ```
178
+
179
+ **Good**: < 1%
180
+ **Needs work**: > 5%
181
+
182
+ **Actions**:
183
+ - High flakiness → Fix or delete flaky tests immediately (quarantine pattern)
184
+ - Low flakiness → Maintain vigilance, don't let it creep up
185
+
186
+ ## Context-Specific Metrics
187
+
188
+ ### For Startups
189
+
190
+ **Focus on**:
191
+ - Deployment frequency (speed to market)
192
+ - Critical path coverage (protect revenue)
193
+ - MTTR (move fast, fix fast)
194
+
195
+ **Skip**:
196
+ - Comprehensive coverage metrics
197
+ - Detailed test documentation
198
+ - Complex traceability
199
+
200
+ ### For Regulated Industries
201
+
202
+ **Focus on**:
203
+ - Traceability (requirement → test → result)
204
+ - Test documentation completeness
205
+ - Audit trail integrity
206
+
207
+ **Don't skip**:
208
+ - Deployment frequency still matters
209
+ - But compliance isn't optional
210
+
211
+ ### For Established Products
212
+
213
+ **Focus on**:
214
+ - Defect escape rate (protect reputation)
215
+ - Regression detection (maintain stability)
216
+ - Test maintenance cost
217
+
218
+ **Balance**:
219
+ - Innovation vs. stability
220
+ - New features vs. technical debt
221
+
222
+ ## Leading vs. Lagging Indicators
223
+
224
+ ### Lagging Indicators (Rearview Mirror)
225
+ - Defect escape rate
226
+ - Production incidents
227
+ - Customer complaints
228
+ - MTTR
229
+
230
+ **Use for**: Understanding what happened, trending over time
231
+
232
+ ### Leading Indicators (Windshield)
233
+ - Code review quality
234
+ - Test coverage on new code
235
+ - Deployment frequency trend
236
+ - Team confidence surveys
237
+
238
+ **Use for**: Predicting problems, early intervention
239
+
240
+ ## Metrics for Different Audiences
241
+
242
+ ### For Developers
243
+ - Test execution time
244
+ - Flaky test rate
245
+ - Code review turnaround
246
+ - Build failure frequency
247
+
248
+ **Language**: Technical, actionable
249
+
250
+ ### For Product/Management
251
+ - Deployment frequency
252
+ - Change failure rate
253
+ - Feature lead time
254
+ - Customer-impacting incidents
255
+
256
+ **Language**: Business outcomes, not technical details
257
+
258
+ ### For Executive Leadership
259
+ - Defect escape rate trend
260
+ - Mean time to resolution
261
+ - Release velocity
262
+ - Customer satisfaction (related to quality)
263
+
264
+ **Language**: Business impact, strategic
265
+
266
+ ## Building a Metrics Dashboard
267
+
268
+ ### Essential Dashboard (Start Here)
269
+
270
+ **Top Row (Health)**
271
+ - Defect escape rate (last 30 days)
272
+ - Deployment frequency (last 7 days)
273
+ - Change failure rate (last 30 days)
274
+
275
+ **Middle Row (Speed)**
276
+ - MTTD (average, last 30 days)
277
+ - MTTR (average, last 30 days)
278
+ - Test execution time (current)
279
+
280
+ **Bottom Row (Trends)**
281
+ - All of the above as sparklines (3-6 months)
282
+
283
+ ### Advanced Dashboard (If Needed)
284
+
285
+ Add:
286
+ - Flaky test rate
287
+ - Test coverage on critical paths (not overall %)
288
+ - Production error rate
289
+ - Customer-reported bugs vs. internally found
290
+
291
+ ## Anti-Patterns
292
+
293
+ ### ❌ Metric-Driven Development
294
+ **Problem**: Optimizing for metrics instead of quality
295
+
296
+ **Example**: Writing useless tests to hit coverage targets
297
+
298
+ **Fix**: Focus on outcomes (can we deploy confidently?) not numbers
299
+
300
+ ### ❌ Too Many Metrics
301
+ **Problem**: Dashboard overload, no clear priorities
302
+
303
+ **Example**: Tracking 30+ metrics that no one understands
304
+
305
+ **Fix**: Start with 5-7 core metrics, add only if they drive decisions
306
+
307
+ ### ❌ Metrics Without Action
308
+ **Problem**: Tracking numbers but not changing behavior
309
+
310
+ **Example**: Watching MTTR climb for months without investigating
311
+
312
+ **Fix**: For every metric, define thresholds and actions
313
+
314
+ ### ❌ Gaming the System
315
+ **Problem**: People optimize for metrics, not quality
316
+
317
+ **Example**: Marking bugs as "won't fix" to improve resolution time
318
+
319
+ **Fix**: Multiple complementary metrics, qualitative reviews
320
+
321
+ ### ❌ One-Size-Fits-All
322
+ **Problem**: Using same metrics for all teams/contexts
323
+
324
+ **Example**: Measuring startup team same as regulated medical device team
325
+
326
+ **Fix**: Context-driven metric selection
327
+
328
+ ## Metric Hygiene
329
+
330
+ ### Review Quarterly
331
+ - Are we still using this metric to make decisions?
332
+ - Is it being gamed?
333
+ - Does it reflect current priorities?
334
+
335
+ ### Adjust Thresholds
336
+ - What's "good" changes as you improve
337
+ - Don't keep celebrating the same baseline
338
+ - Raise the bar when appropriate
339
+
340
+ ### Kill Zombie Metrics
341
+ - If no one looks at it → Delete it
342
+ - If no one can explain what action to take → Delete it
343
+ - If it's always green or always red → Delete it
344
+
345
+ ## Real-World Examples
346
+
347
+ ### Example 1: E-Commerce Company
348
+
349
+ **Before**:
350
+ - Measured: Test count (5,000 tests)
351
+ - Result: Slow CI, frequent production bugs
352
+
353
+ **After**:
354
+ - Measured: Defect escape rate (8%), MTTD (3 days), deployment frequency (2/week)
355
+ - Actions:
356
+ - Removed 2,000 redundant tests
357
+ - Added monitoring for critical paths
358
+ - Improved deployment pipeline
359
+ - Result: Escape rate to 3%, MTTD to 6 hours, deploy 5x/day
360
+
361
+ ### Example 2: SaaS Platform
362
+
363
+ **Before**:
364
+ - Measured: Code coverage (85%)
365
+ - Result: False confidence, bugs in uncovered critical paths
366
+
367
+ **After**:
368
+ - Measured: Critical path coverage (60%), deployment frequency, change failure rate
369
+ - Actions:
370
+ - Focused testing on payment, auth, data integrity
371
+ - Removed tests on deprecated features
372
+ - Added production monitoring
373
+ - Result: Fewer production incidents, faster releases
374
+
375
+ ## Questions to Ask About Any Metric
376
+
377
+ 1. **What decision does this inform?**
378
+ - If none → Don't track it
379
+
380
+ 2. **What action do we take if it's red?**
381
+ - If you don't know → Define thresholds and actions
382
+
383
+ 3. **Can this be gamed?**
384
+ - If yes → Add complementary metrics
385
+
386
+ 4. **Does this reflect actual quality?**
387
+ - If no → Replace it with something that does
388
+
389
+ 5. **Who needs to see this?**
390
+ - If no one → Stop tracking it
391
+
392
+ ## Remember
393
+
394
+ **Good metrics**:
395
+ - Drive better decisions
396
+ - Are actionable
397
+ - Reflect actual outcomes
398
+ - Change as you mature
399
+
400
+ **Bad metrics**:
401
+ - Make dashboards pretty
402
+ - Are easily gamed
403
+ - Provide false confidence
404
+ - Persist long after they're useful
405
+
406
+ **Start small**: 5-7 metrics that matter
407
+ **Review often**: Quarterly at minimum
408
+ **Kill ruthlessly**: Remove metrics that don't drive action
409
+ **Stay contextual**: What matters changes with your situation
410
+
411
+ ## Using with QE Agents
412
+
413
+ ### Automated Metrics Collection
414
+
415
+ **qe-quality-analyzer** collects and analyzes quality metrics:
416
+ ```typescript
417
+ // Agent collects comprehensive metrics automatically
418
+ await agent.collectMetrics({
419
+ scope: 'all',
420
+ timeframe: '30d',
421
+ categories: [
422
+ 'deployment-frequency',
423
+ 'defect-escape-rate',
424
+ 'test-execution-time',
425
+ 'flaky-test-rate',
426
+ 'coverage-trends'
427
+ ]
428
+ });
429
+
430
+ // Returns real-time dashboard data
431
+ // No manual tracking required
432
+ ```
433
+
434
+ ### Intelligent Metric Analysis
435
+
436
+ **qe-quality-analyzer** identifies trends and anomalies:
437
+ ```typescript
438
+ // Agent detects metric anomalies
439
+ const analysis = await agent.analyzeTrends({
440
+ metric: 'defect-escape-rate',
441
+ timeframe: '90d',
442
+ alertThreshold: 0.15
443
+ });
444
+
445
+ // Returns:
446
+ // {
447
+ // trend: 'increasing',
448
+ // currentValue: 0.18,
449
+ // avgValue: 0.08,
450
+ // anomaly: true,
451
+ // recommendation: 'Increase pre-release testing focus',
452
+ // relatedMetrics: ['test-coverage: decreasing', 'MTTR: increasing']
453
+ // }
454
+ ```
455
+
456
+ ### Actionable Insights from Metrics
457
+
458
+ **qe-quality-gate** uses metrics for decision-making:
459
+ ```typescript
460
+ // Agent makes GO/NO-GO decisions based on metrics
461
+ const decision = await agent.evaluateMetrics({
462
+ release: 'v3.2',
463
+ thresholds: {
464
+ defectEscapeRate: '<5%',
465
+ changeFailureRate: '<10%',
466
+ testExecutionTime: '<15min',
467
+ flakyTestRate: '<2%'
468
+ }
469
+ });
470
+
471
+ // Returns:
472
+ // {
473
+ // decision: 'NO-GO',
474
+ // blockers: [
475
+ // 'Flaky test rate: 4.2% (threshold: 2%)'
476
+ // ],
477
+ // recommendations: [
478
+ // 'Run qe-flaky-test-hunter to stabilize tests'
479
+ // ]
480
+ // }
481
+ ```
482
+
483
+ ### Real-Time Metrics Dashboard
484
+
485
+ **qe-quality-analyzer** generates live dashboards:
486
+ ```typescript
487
+ // Agent creates context-specific dashboards
488
+ await agent.createDashboard({
489
+ audience: 'executive', // or 'developer', 'product'
490
+ focus: 'release-readiness',
491
+ updateFrequency: 'real-time'
492
+ });
493
+
494
+ // Executive Dashboard:
495
+ // - Defect escape rate: 3.2% ✅
496
+ // - Deployment frequency: 5/day ✅
497
+ // - Change failure rate: 7% ✅
498
+ // - Customer-impacting incidents: 1 (down from 3)
499
+ ```
500
+
501
+ ### Metric-Driven Test Optimization
502
+
503
+ **qe-regression-risk-analyzer** uses metrics to optimize testing:
504
+ ```typescript
505
+ // Agent identifies which tests provide most value
506
+ const optimization = await agent.optimizeTestSuite({
507
+ metrics: {
508
+ executionTime: 'per-test',
509
+ defectDetectionRate: 'per-test',
510
+ maintenanceCost: 'per-test'
511
+ },
512
+ goal: 'maximize-value-per-minute'
513
+ });
514
+
515
+ // Recommends:
516
+ // - Remove 50 tests with 0% defect detection (save 15 min)
517
+ // - Keep top 200 tests (95% defect detection)
518
+ // - Result: 40% faster suite, 5% defect detection loss
519
+ ```
520
+
521
+ ### Fleet Coordination for Metrics
522
+
523
+ ```typescript
524
+ // Multiple agents collaborate on metrics collection and analysis
525
+ const metricsFleet = await FleetManager.coordinate({
526
+ strategy: 'quality-metrics',
527
+ agents: [
528
+ 'qe-test-executor', // Collect execution metrics
529
+ 'qe-coverage-analyzer', // Collect coverage metrics
530
+ 'qe-production-intelligence', // Collect production metrics
531
+ 'qe-quality-analyzer', // Analyze and visualize
532
+ 'qe-quality-gate' // Make decisions
533
+ ],
534
+ topology: 'hierarchical'
535
+ });
536
+
537
+ // Continuous metrics pipeline
538
+ await metricsFleet.execute({
539
+ schedule: 'continuous',
540
+ aggregationInterval: '5min'
541
+ });
542
+ ```
543
+
544
+ ### Context-Aware Metric Selection
545
+
546
+ ```typescript
547
+ // Agent recommends metrics based on context
548
+ const recommendation = await qe-quality-analyzer.recommendMetrics({
549
+ context: 'startup',
550
+ stage: 'early',
551
+ team: 'small',
552
+ compliance: 'none'
553
+ });
554
+
555
+ // Recommends:
556
+ // - deployment-frequency (speed to market)
557
+ // - critical-path-coverage (protect revenue)
558
+ // - MTTR (move fast, fix fast)
559
+ //
560
+ // Skip:
561
+ // - comprehensive coverage %
562
+ // - detailed traceability
563
+ // - process compliance metrics
564
+ ```
565
+
566
+ ---
567
+
568
+ ## Related Skills
569
+
570
+ **Core Quality Practices:**
571
+ - [agentic-quality-engineering](../agentic-quality-engineering/) - Metrics-driven agent coordination
572
+ - [holistic-testing-pact](../holistic-testing-pact/) - Metrics across test quadrants
573
+
574
+ **Testing Approaches:**
575
+ - [risk-based-testing](../risk-based-testing/) - Risk-based metric selection
576
+ - [test-automation-strategy](../test-automation-strategy/) - Automation effectiveness metrics
577
+ - [exploratory-testing-advanced](../exploratory-testing-advanced/) - Exploratory session metrics
578
+
579
+ **Development Practices:**
580
+ - [xp-practices](../xp-practices/) - XP success metrics (velocity, lead time)
581
+
582
+ ---
583
+
584
+ ## Resources
585
+
586
+ - **Accelerate** by Forsgren, Humble, Kim (DORA metrics)
587
+ - **How to Measure Anything** by Douglas Hubbard (measuring intangibles)
588
+ - Your own retrospectives (which metrics helped? Which didn't?)
589
+
590
+ Metrics are tools for better decisions, not scorecards for performance reviews. Use them wisely.
591
+
592
+ **With Agents**: Agents automate metrics collection, detect trends and anomalies, and provide context-aware recommendations. Use agents to make metrics actionable and avoid vanity metrics. Agents continuously analyze what drives quality outcomes in your specific context.