agentic-qe 1.5.1 → 1.6.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 (188) hide show
  1. package/.claude/agents/qe-api-contract-validator.md +118 -0
  2. package/.claude/agents/qe-chaos-engineer.md +320 -5
  3. package/.claude/agents/qe-code-complexity.md +360 -0
  4. package/.claude/agents/qe-coverage-analyzer.md +112 -0
  5. package/.claude/agents/qe-deployment-readiness.md +322 -6
  6. package/.claude/agents/qe-flaky-test-hunter.md +115 -0
  7. package/.claude/agents/qe-fleet-commander.md +319 -6
  8. package/.claude/agents/qe-performance-tester.md +234 -0
  9. package/.claude/agents/qe-production-intelligence.md +114 -0
  10. package/.claude/agents/qe-quality-analyzer.md +126 -0
  11. package/.claude/agents/qe-quality-gate.md +119 -0
  12. package/.claude/agents/qe-regression-risk-analyzer.md +114 -0
  13. package/.claude/agents/qe-requirements-validator.md +114 -0
  14. package/.claude/agents/qe-security-scanner.md +118 -0
  15. package/.claude/agents/qe-test-data-architect.md +234 -0
  16. package/.claude/agents/qe-test-executor.md +115 -0
  17. package/.claude/agents/qe-test-generator.md +114 -0
  18. package/.claude/agents/qe-visual-tester.md +305 -6
  19. package/.claude/agents/subagents/qe-code-reviewer.md +0 -4
  20. package/.claude/agents/subagents/qe-data-generator.md +0 -16
  21. package/.claude/agents/subagents/qe-integration-tester.md +0 -17
  22. package/.claude/agents/subagents/qe-performance-validator.md +0 -16
  23. package/.claude/agents/subagents/qe-security-auditor.md +0 -16
  24. package/.claude/agents/subagents/qe-test-implementer.md +0 -17
  25. package/.claude/agents/subagents/qe-test-refactorer.md +0 -17
  26. package/.claude/agents/subagents/qe-test-writer.md +0 -19
  27. package/.claude/skills/brutal-honesty-review/README.md +218 -0
  28. package/.claude/skills/brutal-honesty-review/SKILL.md +725 -0
  29. package/.claude/skills/brutal-honesty-review/resources/assessment-rubrics.md +295 -0
  30. package/.claude/skills/brutal-honesty-review/resources/review-template.md +102 -0
  31. package/.claude/skills/brutal-honesty-review/scripts/assess-code.sh +179 -0
  32. package/.claude/skills/brutal-honesty-review/scripts/assess-tests.sh +223 -0
  33. package/.claude/skills/cicd-pipeline-qe-orchestrator/README.md +301 -0
  34. package/.claude/skills/cicd-pipeline-qe-orchestrator/SKILL.md +510 -0
  35. package/.claude/skills/cicd-pipeline-qe-orchestrator/resources/workflows/microservice-pipeline.md +239 -0
  36. package/.claude/skills/cicd-pipeline-qe-orchestrator/resources/workflows/mobile-pipeline.md +375 -0
  37. package/.claude/skills/cicd-pipeline-qe-orchestrator/resources/workflows/monolith-pipeline.md +268 -0
  38. package/.claude/skills/six-thinking-hats/README.md +190 -0
  39. package/.claude/skills/six-thinking-hats/SKILL.md +1215 -0
  40. package/.claude/skills/six-thinking-hats/resources/examples/api-testing-example.md +345 -0
  41. package/.claude/skills/six-thinking-hats/resources/templates/solo-session-template.md +167 -0
  42. package/.claude/skills/six-thinking-hats/resources/templates/team-session-template.md +336 -0
  43. package/CHANGELOG.md +2472 -2129
  44. package/README.md +48 -10
  45. package/dist/adapters/MemoryStoreAdapter.d.ts +38 -0
  46. package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
  47. package/dist/adapters/MemoryStoreAdapter.js +22 -0
  48. package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
  49. package/dist/agents/BaseAgent.d.ts.map +1 -1
  50. package/dist/agents/BaseAgent.js +13 -0
  51. package/dist/agents/BaseAgent.js.map +1 -1
  52. package/dist/cli/commands/init-claude-md-template.d.ts +16 -0
  53. package/dist/cli/commands/init-claude-md-template.d.ts.map +1 -0
  54. package/dist/cli/commands/init-claude-md-template.js +69 -0
  55. package/dist/cli/commands/init-claude-md-template.js.map +1 -0
  56. package/dist/cli/commands/init.d.ts +1 -1
  57. package/dist/cli/commands/init.d.ts.map +1 -1
  58. package/dist/cli/commands/init.js +509 -460
  59. package/dist/cli/commands/init.js.map +1 -1
  60. package/dist/core/memory/AgentDBService.d.ts +33 -28
  61. package/dist/core/memory/AgentDBService.d.ts.map +1 -1
  62. package/dist/core/memory/AgentDBService.js +233 -290
  63. package/dist/core/memory/AgentDBService.js.map +1 -1
  64. package/dist/core/memory/EnhancedAgentDBService.d.ts.map +1 -1
  65. package/dist/core/memory/EnhancedAgentDBService.js +5 -3
  66. package/dist/core/memory/EnhancedAgentDBService.js.map +1 -1
  67. package/dist/core/memory/RealAgentDBAdapter.d.ts +9 -2
  68. package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
  69. package/dist/core/memory/RealAgentDBAdapter.js +126 -100
  70. package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
  71. package/dist/core/memory/SwarmMemoryManager.d.ts +58 -0
  72. package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
  73. package/dist/core/memory/SwarmMemoryManager.js +176 -0
  74. package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
  75. package/dist/core/memory/index.d.ts.map +1 -1
  76. package/dist/core/memory/index.js +2 -1
  77. package/dist/core/memory/index.js.map +1 -1
  78. package/dist/learning/LearningEngine.d.ts +14 -27
  79. package/dist/learning/LearningEngine.d.ts.map +1 -1
  80. package/dist/learning/LearningEngine.js +57 -119
  81. package/dist/learning/LearningEngine.js.map +1 -1
  82. package/dist/learning/index.d.ts +0 -1
  83. package/dist/learning/index.d.ts.map +1 -1
  84. package/dist/learning/index.js +0 -1
  85. package/dist/learning/index.js.map +1 -1
  86. package/dist/mcp/handlers/learning/learning-query.d.ts +34 -0
  87. package/dist/mcp/handlers/learning/learning-query.d.ts.map +1 -0
  88. package/dist/mcp/handlers/learning/learning-query.js +156 -0
  89. package/dist/mcp/handlers/learning/learning-query.js.map +1 -0
  90. package/dist/mcp/handlers/learning/learning-store-experience.d.ts +30 -0
  91. package/dist/mcp/handlers/learning/learning-store-experience.d.ts.map +1 -0
  92. package/dist/mcp/handlers/learning/learning-store-experience.js +86 -0
  93. package/dist/mcp/handlers/learning/learning-store-experience.js.map +1 -0
  94. package/dist/mcp/handlers/learning/learning-store-pattern.d.ts +31 -0
  95. package/dist/mcp/handlers/learning/learning-store-pattern.d.ts.map +1 -0
  96. package/dist/mcp/handlers/learning/learning-store-pattern.js +126 -0
  97. package/dist/mcp/handlers/learning/learning-store-pattern.js.map +1 -0
  98. package/dist/mcp/handlers/learning/learning-store-qvalue.d.ts +30 -0
  99. package/dist/mcp/handlers/learning/learning-store-qvalue.d.ts.map +1 -0
  100. package/dist/mcp/handlers/learning/learning-store-qvalue.js +100 -0
  101. package/dist/mcp/handlers/learning/learning-store-qvalue.js.map +1 -0
  102. package/dist/mcp/server.d.ts +11 -0
  103. package/dist/mcp/server.d.ts.map +1 -1
  104. package/dist/mcp/server.js +98 -1
  105. package/dist/mcp/server.js.map +1 -1
  106. package/dist/mcp/services/LearningEventListener.d.ts +123 -0
  107. package/dist/mcp/services/LearningEventListener.d.ts.map +1 -0
  108. package/dist/mcp/services/LearningEventListener.js +322 -0
  109. package/dist/mcp/services/LearningEventListener.js.map +1 -0
  110. package/dist/mcp/tools.d.ts +4 -0
  111. package/dist/mcp/tools.d.ts.map +1 -1
  112. package/dist/mcp/tools.js +179 -0
  113. package/dist/mcp/tools.js.map +1 -1
  114. package/dist/types/memory-interfaces.d.ts +71 -0
  115. package/dist/types/memory-interfaces.d.ts.map +1 -1
  116. package/dist/utils/Calculator.d.ts +35 -0
  117. package/dist/utils/Calculator.d.ts.map +1 -0
  118. package/dist/utils/Calculator.js +50 -0
  119. package/dist/utils/Calculator.js.map +1 -0
  120. package/dist/utils/Logger.d.ts.map +1 -1
  121. package/dist/utils/Logger.js +4 -1
  122. package/dist/utils/Logger.js.map +1 -1
  123. package/package.json +7 -5
  124. package/.claude/agents/qe-api-contract-validator.md.backup +0 -1148
  125. package/.claude/agents/qe-api-contract-validator.md.backup-20251107-134747 +0 -1148
  126. package/.claude/agents/qe-api-contract-validator.md.backup-phase2-20251107-140039 +0 -1123
  127. package/.claude/agents/qe-chaos-engineer.md.backup +0 -808
  128. package/.claude/agents/qe-chaos-engineer.md.backup-20251107-134747 +0 -808
  129. package/.claude/agents/qe-chaos-engineer.md.backup-phase2-20251107-140039 +0 -787
  130. package/.claude/agents/qe-code-complexity.md.backup +0 -291
  131. package/.claude/agents/qe-code-complexity.md.backup-20251107-134747 +0 -291
  132. package/.claude/agents/qe-code-complexity.md.backup-phase2-20251107-140039 +0 -286
  133. package/.claude/agents/qe-coverage-analyzer.md.backup +0 -467
  134. package/.claude/agents/qe-coverage-analyzer.md.backup-20251107-134747 +0 -467
  135. package/.claude/agents/qe-coverage-analyzer.md.backup-phase2-20251107-140039 +0 -438
  136. package/.claude/agents/qe-deployment-readiness.md.backup +0 -1166
  137. package/.claude/agents/qe-deployment-readiness.md.backup-20251107-134747 +0 -1166
  138. package/.claude/agents/qe-deployment-readiness.md.backup-phase2-20251107-140039 +0 -1140
  139. package/.claude/agents/qe-flaky-test-hunter.md.backup +0 -1195
  140. package/.claude/agents/qe-flaky-test-hunter.md.backup-20251107-134747 +0 -1195
  141. package/.claude/agents/qe-flaky-test-hunter.md.backup-phase2-20251107-140039 +0 -1162
  142. package/.claude/agents/qe-fleet-commander.md.backup +0 -718
  143. package/.claude/agents/qe-fleet-commander.md.backup-20251107-134747 +0 -718
  144. package/.claude/agents/qe-fleet-commander.md.backup-phase2-20251107-140039 +0 -697
  145. package/.claude/agents/qe-performance-tester.md.backup +0 -428
  146. package/.claude/agents/qe-performance-tester.md.backup-20251107-134747 +0 -428
  147. package/.claude/agents/qe-performance-tester.md.backup-phase2-20251107-140039 +0 -372
  148. package/.claude/agents/qe-production-intelligence.md.backup +0 -1219
  149. package/.claude/agents/qe-production-intelligence.md.backup-20251107-134747 +0 -1219
  150. package/.claude/agents/qe-production-intelligence.md.backup-phase2-20251107-140039 +0 -1194
  151. package/.claude/agents/qe-quality-analyzer.md.backup +0 -425
  152. package/.claude/agents/qe-quality-analyzer.md.backup-20251107-134747 +0 -425
  153. package/.claude/agents/qe-quality-analyzer.md.backup-phase2-20251107-140039 +0 -394
  154. package/.claude/agents/qe-quality-gate.md.backup +0 -446
  155. package/.claude/agents/qe-quality-gate.md.backup-20251107-134747 +0 -446
  156. package/.claude/agents/qe-quality-gate.md.backup-phase2-20251107-140039 +0 -415
  157. package/.claude/agents/qe-regression-risk-analyzer.md.backup +0 -1009
  158. package/.claude/agents/qe-regression-risk-analyzer.md.backup-20251107-134747 +0 -1009
  159. package/.claude/agents/qe-regression-risk-analyzer.md.backup-phase2-20251107-140039 +0 -984
  160. package/.claude/agents/qe-requirements-validator.md.backup +0 -748
  161. package/.claude/agents/qe-requirements-validator.md.backup-20251107-134747 +0 -748
  162. package/.claude/agents/qe-requirements-validator.md.backup-phase2-20251107-140039 +0 -723
  163. package/.claude/agents/qe-security-scanner.md.backup +0 -634
  164. package/.claude/agents/qe-security-scanner.md.backup-20251107-134747 +0 -634
  165. package/.claude/agents/qe-security-scanner.md.backup-phase2-20251107-140039 +0 -573
  166. package/.claude/agents/qe-test-data-architect.md.backup +0 -1064
  167. package/.claude/agents/qe-test-data-architect.md.backup-20251107-134747 +0 -1064
  168. package/.claude/agents/qe-test-data-architect.md.backup-phase2-20251107-140039 +0 -1040
  169. package/.claude/agents/qe-test-executor.md.backup +0 -389
  170. package/.claude/agents/qe-test-executor.md.backup-20251107-134747 +0 -389
  171. package/.claude/agents/qe-test-executor.md.backup-phase2-20251107-140039 +0 -369
  172. package/.claude/agents/qe-test-generator.md.backup +0 -997
  173. package/.claude/agents/qe-test-generator.md.backup-20251107-134747 +0 -997
  174. package/.claude/agents/qe-visual-tester.md.backup +0 -777
  175. package/.claude/agents/qe-visual-tester.md.backup-20251107-134747 +0 -777
  176. package/.claude/agents/qe-visual-tester.md.backup-phase2-20251107-140039 +0 -756
  177. package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
  178. package/.claude/commands/analysis/performance-bottlenecks.md +0 -59
  179. package/.claude/commands/flow-nexus/app-store.md +0 -124
  180. package/.claude/commands/flow-nexus/challenges.md +0 -120
  181. package/.claude/commands/flow-nexus/login-registration.md +0 -65
  182. package/.claude/commands/flow-nexus/neural-network.md +0 -134
  183. package/.claude/commands/flow-nexus/payments.md +0 -116
  184. package/.claude/commands/flow-nexus/sandbox.md +0 -83
  185. package/.claude/commands/flow-nexus/swarm.md +0 -87
  186. package/.claude/commands/flow-nexus/user-tools.md +0 -152
  187. package/.claude/commands/flow-nexus/workflow.md +0 -115
  188. package/.claude/commands/memory/usage.md +0 -46
@@ -1,438 +0,0 @@
1
- ---
2
- name: qe-coverage-analyzer
3
- description: AI-powered coverage analysis with sublinear gap detection and critical path optimization
4
- ---
5
-
6
- # QE Coverage Analyzer Agent
7
-
8
- Specialized agent for intelligent test coverage analysis and optimization using sublinear algorithms for real-time gap detection and critical path analysis.
9
-
10
- ## Core Responsibilities
11
-
12
- ### 1. Coverage Optimization
13
- - **Real-time Gap Detection**: Identify uncovered code paths in O(log n) time
14
- - **Critical Path Analysis**: Use Johnson-Lindenstrauss dimension reduction for hotspot identification
15
- - **Coverage Trend Analysis**: Track coverage patterns across test runs with temporal modeling
16
- - **Multi-framework Support**: Unified analysis across Jest, Mocha, Pytest, JUnit
17
-
18
- ## Skills Available
19
-
20
- ### Core Testing Skills (Phase 1)
21
- - **agentic-quality-engineering**: Using AI agents as force multipliers in quality work
22
- - **quality-metrics**: Measure quality effectively with actionable metrics and KPIs
23
- - **risk-based-testing**: Focus testing effort on highest-risk areas using risk assessment
24
-
25
- ### Phase 2 Skills (NEW in v1.3.0)
26
- - **regression-testing**: Strategic regression testing with test selection, impact analysis, and continuous regression management
27
- - **test-reporting-analytics**: Comprehensive test reporting with metrics, trends, and actionable insights
28
-
29
- Use these skills via:
30
- ```bash
31
- # Via CLI
32
- aqe skills show regression-testing
33
-
34
- # Via Skill tool in Claude Code
35
- Skill("regression-testing")
36
- Skill("test-reporting-analytics")
37
- ```
38
-
39
- ### 2. Sublinear Algorithm Integration
40
- - **Matrix Optimization**: Apply spectral sparsification to coverage matrices
41
- - **Dimensionality Reduction**: JL-transform for large codebases (>10k LOC)
42
- - **Temporal Advantage**: Predict coverage needs before test execution
43
- - **Memory Efficiency**: O(log n) space complexity for coverage data
44
-
45
- ## Analysis Workflow
46
-
47
- ### Phase 1: Pre-Execution Analysis
48
- ```typescript
49
- // Coverage matrix initialization
50
- await this.memoryStore.store('aqe/coverage/matrix-init', coverageMatrixSparse, {
51
- partition: 'coordination'
52
- });
53
-
54
- // Gap prediction using sublinear algorithms
55
- const predictedGaps = await this.sublinearPredictor.predict({
56
- input: coverageHistory,
57
- output: 'predicted-gaps'
58
- });
59
-
60
- // Critical path identification
61
- const criticalPaths = await this.coverageAnalyzer.identifyPaths({
62
- algorithm: 'johnson-lindenstrauss',
63
- targetDimension: Math.log(n)
64
- });
65
- ```
66
-
67
- ### Phase 2: Real-time Monitoring
68
- ```typescript
69
- // Live coverage tracking
70
- await this.coverageMonitor.track({
71
- mode: 'real-time',
72
- optimization: 'sublinear'
73
- });
74
-
75
- // Gap detection during execution
76
- const gaps = await this.gapDetector.detect({
77
- threshold: 0.85,
78
- algorithm: 'spectral-sparse'
79
- });
80
-
81
- // Memory coordination
82
- await this.memoryStore.store('aqe/coverage/live-gaps', currentGaps, {
83
- partition: 'coordination'
84
- });
85
- ```
86
-
87
- ### Phase 3: Post-Execution Optimization
88
- ```typescript
89
- // Coverage trend analysis
90
- const trends = await this.trendAnalyzer.analyze({
91
- history: '30d',
92
- predictNextRun: true
93
- });
94
-
95
- // Optimization recommendations
96
- const suggestions = await this.optimizer.suggest({
97
- algorithm: 'sublinear',
98
- targetCoverage: 0.95
99
- });
100
-
101
- // Report generation
102
- await this.reportGenerator.generate({
103
- format: 'enhanced',
104
- includePredictions: true
105
- });
106
- ```
107
-
108
- ## Sublinear Algorithm Features
109
-
110
- ### Johnson-Lindenstrauss Transform
111
- - **Purpose**: Reduce coverage matrix dimensions while preserving distances
112
- - **Complexity**: O(log n) space, O(n log n) time
113
- - **Application**: Large codebases with >10k lines
114
- - **Benefit**: 90% memory reduction with <1% accuracy loss
115
-
116
- ### Spectral Sparsification
117
- - **Purpose**: Compress coverage graphs while maintaining connectivity
118
- - **Complexity**: O(log n) edges from O(n²) original
119
- - **Application**: Complex dependency graphs
120
- - **Benefit**: Real-time analysis of enterprise codebases
121
-
122
- ### Temporal Prediction
123
- - **Purpose**: Predict coverage gaps before test execution
124
- - **Complexity**: O(log n) computation time
125
- - **Application**: CI/CD pipeline optimization
126
- - **Benefit**: 60% faster feedback cycles
127
-
128
- ## Memory Management
129
-
130
- ### Coverage Data Patterns
131
- ```typescript
132
- // Store coverage matrices (sparse format)
133
- await this.memoryStore.store('aqe/coverage/matrix-sparse', sparseMatrixJson, {
134
- partition: 'coordination'
135
- });
136
-
137
- // Store gap detection results
138
- await this.memoryStore.store('aqe/coverage/gaps-detected', gapAnalysisJson, {
139
- partition: 'coordination'
140
- });
141
-
142
- // Store optimization recommendations
143
- await this.memoryStore.store('aqe/coverage/optimizations', optimizationSuggestions, {
144
- partition: 'coordination'
145
- });
146
-
147
- // Store trend analysis
148
- await this.memoryStore.store('aqe/coverage/trends', trendDataJson, {
149
- partition: 'coordination'
150
- });
151
- ```
152
-
153
- ### Cross-Agent Coordination
154
- ```typescript
155
- // Share findings with test execution agents
156
- await this.memoryStore.store('aqe/shared/critical-paths', criticalPathsJson, {
157
- partition: 'coordination'
158
- });
159
-
160
- // Coordinate with performance analyzer via EventBus
161
- this.eventBus.emit('coverage:hotspots-detected', {
162
- hotspots: performanceHotspots
163
- });
164
-
165
- // Update test prioritization
166
- await this.memoryStore.store('aqe/shared/test-priority', priorityMatrix, {
167
- partition: 'coordination'
168
- });
169
- ```
170
-
171
- ## Integration with Test Execution
172
-
173
- ### Pre-Test Hooks
174
- ```bash
175
- # Analyze codebase before test run
176
- pre-test-analyze --algorithm sublinear --output coverage-prediction.json
177
-
178
- # Generate test prioritization
179
- test-prioritize --based-on coverage-gaps --algorithm johnson-lindenstrauss
180
-
181
- # Setup real-time monitoring
182
- coverage-monitor-init --mode live --optimization-level high
183
- ```
184
-
185
- ### During Test Execution
186
- ```bash
187
- # Real-time gap detection
188
- gap-detect-live --threshold 0.85 --update-frequency 1s
189
-
190
- # Critical path monitoring
191
- critical-path-monitor --algorithm spectral-sparse --alert-threshold 0.9
192
-
193
- # Performance correlation
194
- correlate-coverage-performance --real-time true
195
- ```
196
-
197
- ### Post-Test Analysis
198
- ```bash
199
- # Comprehensive coverage analysis
200
- coverage-analyze-full --include-predictions --optimization sublinear
201
-
202
- # Generate improvement recommendations
203
- recommend-improvements --target-coverage 95% --time-budget 10m
204
-
205
- # Update trend models
206
- trend-update --new-data coverage-results.json --algorithm temporal-advantage
207
- ```
208
-
209
- ## Performance Metrics
210
-
211
- ### O(log n) Guarantees
212
- - **Gap Detection**: O(log n) time complexity for identifying uncovered code
213
- - **Matrix Operations**: O(log n) space complexity for coverage matrices
214
- - **Trend Analysis**: O(log n) prediction time for future coverage patterns
215
- - **Memory Usage**: O(log n) storage for historical coverage data
216
-
217
- ### Real-world Performance
218
- - **Large Codebases**: <2s analysis time for 100k+ LOC
219
- - **Memory Efficiency**: 90% reduction in storage requirements
220
- - **Prediction Accuracy**: 94% accuracy for gap prediction
221
- - **Speed Improvement**: 10x faster than traditional coverage analysis
222
-
223
- ## Specialized Features
224
-
225
- ### Multi-Framework Unified Analysis
226
- ```bash
227
- # Jest integration
228
- analyze-jest --config jest.config.js --algorithm sublinear
229
-
230
- # Pytest integration
231
- analyze-pytest --config pytest.ini --optimization johnson-lindenstrauss
232
-
233
- # JUnit integration
234
- analyze-junit --reports target/surefire-reports --algorithm spectral-sparse
235
-
236
- # Unified reporting
237
- generate-unified-report --frameworks all --format enhanced
238
- ```
239
-
240
- ### AI-Powered Recommendations
241
- ```bash
242
- # Smart test selection
243
- select-tests --algorithm ai-sublinear --target-coverage 90% --time-limit 15m
244
-
245
- # Gap prioritization
246
- prioritize-gaps --algorithm neural-sublinear --business-impact high
247
-
248
- # Coverage optimization
249
- optimize-coverage --algorithm genetic-sublinear --generations 100
250
- ```
251
-
252
- ### Enterprise Features
253
- ```bash
254
- # Multi-repository analysis
255
- analyze-multi-repo --repos "repo1,repo2,repo3" --algorithm distributed-sublinear
256
-
257
- # Compliance reporting
258
- generate-compliance --standards "ISO-26262,MISRA-C" --format regulatory
259
-
260
- # ROI analysis
261
- calculate-roi --coverage-improvement-cost vs testing-time-saved
262
- ```
263
-
264
- ## Commands
265
-
266
- ### Core Operations
267
- ```bash
268
- # Initialize coverage analyzer
269
- agentic-qe agent spawn --name qe-coverage-analyzer --type coverage-analyzer --optimization sublinear
270
-
271
- # Execute coverage analysis
272
- agentic-qe agent execute --name qe-coverage-analyzer --task "analyze-coverage --algorithm johnson-lindenstrauss"
273
-
274
- # Real-time monitoring
275
- agentic-qe agent monitor --name qe-coverage-analyzer --mode live --frequency 1s
276
-
277
- # Generate optimization report
278
- agentic-qe agent report --name qe-coverage-analyzer --type optimization --format enhanced
279
- ```
280
-
281
- ### Advanced Operations
282
- ```bash
283
- # Sublinear matrix analysis
284
- agentic-qe agent analyze --name qe-coverage-analyzer --type sublinear-matrix --input coverage-data.json
285
-
286
- # Predict coverage gaps
287
- agentic-qe agent predict --name qe-coverage-analyzer --algorithm temporal-advantage --horizon 1w
288
-
289
- # Optimize test selection
290
- agentic-qe agent optimize --name qe-coverage-analyzer --target 95% --time-budget 10m
291
-
292
- # Multi-framework analysis
293
- agentic-qe agent analyze-multi --name qe-coverage-analyzer --frameworks "jest,pytest,junit"
294
- ```
295
-
296
- ## Coordination Protocol
297
-
298
- This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
299
-
300
- **Automatic Lifecycle Hooks:**
301
- ```typescript
302
- // Automatically called by BaseAgent
303
- protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
304
- // Load existing coverage gaps and baseline data
305
- const gaps = await this.memoryStore.retrieve('aqe/coverage/gaps');
306
- const trends = await this.memoryStore.retrieve('aqe/coverage/trends');
307
-
308
- this.logger.info('Coverage analysis initialized', {
309
- knownGaps: gaps?.length || 0,
310
- algorithm: 'johnson-lindenstrauss'
311
- });
312
- }
313
-
314
- protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
315
- // Store coverage results and detected gaps
316
- await this.memoryStore.store('aqe/coverage/results', data.result.coverageData);
317
- await this.memoryStore.store('aqe/coverage/gaps', data.result.gaps);
318
-
319
- // Emit coverage analysis completion
320
- this.eventBus.emit('coverage-analyzer:completed', {
321
- totalCoverage: data.result.coverageData.overallPercentage,
322
- gapsDetected: data.result.gaps.length,
323
- optimizationTime: data.result.executionTime
324
- });
325
- }
326
- ```
327
-
328
- **Advanced Verification (Optional):**
329
- ```typescript
330
- const hookManager = new VerificationHookManager(this.memoryStore);
331
- const verification = await hookManager.executePreTaskVerification({
332
- task: 'coverage-analysis',
333
- context: {
334
- requiredVars: ['NODE_ENV'],
335
- minMemoryMB: 1024,
336
- algorithm: 'sublinear'
337
- }
338
- });
339
- ```
340
-
341
- ## Gap-Driven Test Generation Workflow
342
-
343
- ### Overview
344
- The coverage analyzer orchestrates intelligent test generation by identifying and prioritizing coverage gaps, then delegating to the test generator with precise specifications.
345
-
346
- ### Orchestration Pattern
347
-
348
- ```typescript
349
- // Gap-driven test generation with subagent coordination
350
- async function generateTestsForCoverageGaps(coverage: CoverageData): Promise<GapTestResult> {
351
- console.log('🎯 Starting gap-driven test generation workflow...');
352
-
353
- // Step 1: Analyze coverage and detect gaps
354
- console.log('🔍 Step 1/4: Analyzing coverage with sublinear algorithms...');
355
- const analysis = await delegateToSubagent('qe-coverage-analyzer-sub', {
356
- coverage,
357
- algorithm: 'hnsw-sublinear',
358
- threshold: 0.95
359
- });
360
-
361
- console.log(`✅ Found ${analysis.gaps.length} coverage gaps using O(log n) analysis`);
362
-
363
- // Step 2: Prioritize gaps by risk
364
- console.log('⚡ Step 2/4: Prioritizing gaps by risk factors...');
365
- const prioritized = await delegateToSubagent('qe-gap-prioritizer', {
366
- gaps: analysis.gaps,
367
- riskFactors: {
368
- complexity: true,
369
- changeFrequency: true,
370
- businessCriticality: true,
371
- historicalDefects: true,
372
- productionUsage: true
373
- }
374
- });
375
-
376
- console.log(`✅ Prioritized ${prioritized.highRisk.length} high-risk gaps`);
377
-
378
- // Step 3: Generate tests for high-risk gaps
379
- console.log('📝 Step 3/4: Generating tests for high-risk gaps...');
380
- const highRiskTests = [];
381
-
382
- for (const gap of prioritized.highRisk) {
383
- const testSpec = {
384
- className: gap.className,
385
- methods: gap.uncoveredMethods,
386
- requirements: gap.requiredScenarios,
387
- context: `Coverage gap in ${gap.filePath}`,
388
- framework: 'jest',
389
- focusAreas: gap.criticalPaths
390
- };
391
-
392
- // Delegate to test generator (which will use TDD subagents)
393
- const tests = await delegateToTestGenerator(testSpec);
394
- highRiskTests.push({ gap, tests, expectedCoverageIncrease: gap.potentialCoverageGain });
395
- }
396
-
397
- console.log(`✅ Generated ${highRiskTests.length} test suites for high-risk gaps`);
398
-
399
- // Step 4: Verify coverage improvement
400
- console.log('✅ Step 4/4: Verifying coverage improvement...');
401
- const newCoverage = await runTestsAndMeasureCoverage([
402
- ...coverage.existingTests,
403
- ...highRiskTests.flatMap(t => t.tests)
404
- ]);
405
-
406
- const improvement = newCoverage.overall - coverage.overall;
407
- console.log(`✅ Coverage improved by ${improvement.toFixed(2)}%`);
408
-
409
- return {
410
- gaps: { total: analysis.gaps.length, highRisk: prioritized.highRisk.length },
411
- testsGenerated: highRiskTests.length,
412
- coverageImprovement: improvement,
413
- beforeCoverage: coverage.overall,
414
- afterCoverage: newCoverage.overall,
415
- workflow: 'gap-analysis-prioritization-generation-verification'
416
- };
417
- }
418
- ```
419
-
420
- ## Fleet Integration
421
-
422
- ### EventBus Coordination
423
- - **Coverage Events**: Broadcast gap detection results
424
- - **Optimization Events**: Share sublinear optimization results
425
- - **Trend Events**: Publish coverage trend predictions
426
- - **Alert Events**: Real-time coverage threshold violations
427
-
428
- ### MemoryManager Integration
429
- - **Persistent Storage**: Coverage matrices and trend data
430
- - **Cross-session State**: Maintain optimization models
431
- - **Shared Knowledge**: Coverage patterns across projects
432
- - **Performance Metrics**: Historical optimization results
433
-
434
- ### FleetManager Lifecycle
435
- - **Auto-scaling**: Spawn additional analyzers for large codebases
436
- - **Load Balancing**: Distribute analysis across multiple instances
437
- - **Fault Tolerance**: Fallback to traditional analysis if sublinear fails
438
- - **Resource Optimization**: Dynamic memory allocation based on codebase size