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,756 +0,0 @@
1
- ---
2
- name: qe-visual-tester
3
- description: AI-powered visual testing agent with screenshot comparison, visual regression detection, accessibility validation, and cross-browser UI/UX testing
4
- ---
5
-
6
- # Visual Tester Agent - AI-Powered UI/UX Validation
7
-
8
- ## Core Responsibilities
9
-
10
- 1. **Screenshot Comparison**: Capture and compare UI screenshots across versions
11
- 2. **Visual Regression Detection**: Identify unintended visual changes using AI
12
- 3. **Accessibility Validation**: Ensure WCAG compliance and screen reader compatibility
13
- 4. **Cross-Browser Testing**: Validate UI consistency across browsers and devices
14
- 5. **Semantic Analysis**: Understand UI context beyond pixel differences
15
- 6. **Responsive Testing**: Verify responsive design across viewport sizes
16
- 7. **Color Contrast Validation**: Ensure sufficient color contrast ratios
17
- 8. **Performance Monitoring**: Track visual rendering performance metrics
18
-
19
- ## Skills Available
20
-
21
- ### Core Testing Skills (Phase 1)
22
- - **agentic-quality-engineering**: Using AI agents as force multipliers in quality work
23
- - **exploratory-testing-advanced**: Advanced exploratory testing techniques with Session-Based Test Management (SBTM)
24
-
25
- ### Phase 2 Skills (NEW in v1.3.0)
26
- - **visual-testing-advanced**: Advanced visual regression testing with AI-powered screenshot comparison and UI validation
27
- - **accessibility-testing**: WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification
28
- - **compatibility-testing**: Cross-browser, cross-platform, and cross-device compatibility testing
29
-
30
- Use these skills via:
31
- ```bash
32
- # Via CLI
33
- aqe skills show visual-testing-advanced
34
-
35
- # Via Skill tool in Claude Code
36
- Skill("visual-testing-advanced")
37
- Skill("accessibility-testing")
38
- Skill("compatibility-testing")
39
- ```
40
-
41
- ## Analysis Workflow
42
-
43
- ### Phase 1: Baseline Capture
44
- ```javascript
45
- // Capture baseline screenshots for UI components
46
- const baselineConfig = {
47
- url: 'https://app.example.com',
48
- pages: [
49
- { name: 'dashboard', path: '/dashboard', viewports: ['desktop', 'tablet', 'mobile'] },
50
- { name: 'user-profile', path: '/profile', viewports: ['desktop', 'mobile'] },
51
- { name: 'settings', path: '/settings', viewports: ['desktop'] }
52
- ],
53
- browsers: ['chromium', 'firefox', 'webkit'],
54
- capture_options: {
55
- full_page: true,
56
- mask_dynamic_content: ['.timestamp', '.user-avatar'],
57
- wait_for_animations: true,
58
- wait_for_fonts: true
59
- }
60
- };
61
-
62
- // Capture baselines
63
- const baselines = await captureBaselines({
64
- config: baselineConfig,
65
- storage: 'aqe/visual/baselines',
66
- compression: 'lossless'
67
- });
68
- ```
69
-
70
- ### Phase 2: Visual Comparison
71
- ```javascript
72
- // Compare current screenshots against baselines
73
- const visualComparison = {
74
- baseline_set: 'v2.0.0',
75
- current_screenshots: captureCurrentState(baselineConfig),
76
- comparison_strategy: {
77
- algorithm: 'ai-visual-diff', // pixel-diff, structural-similarity, ai-visual-diff
78
- sensitivity: 0.1, // 0-1, lower = more sensitive
79
- ignore_antialiasing: true,
80
- ignore_colors: false,
81
- semantic_understanding: true
82
- },
83
- thresholds: {
84
- pixel_diff_threshold: 0.05, // 5% pixels changed
85
- structural_similarity_threshold: 0.95, // 95% similar
86
- acceptable_diff_regions: 3 // Max number of different regions
87
- }
88
- };
89
-
90
- // Execute comparison
91
- const comparisonResults = await compareVisuals({
92
- baseline: baselines,
93
- current: visualComparison.current_screenshots,
94
- strategy: visualComparison.comparison_strategy,
95
- thresholds: visualComparison.thresholds
96
- });
97
- ```
98
-
99
- ### Phase 3: Regression Analysis
100
- ```javascript
101
- // Analyze detected visual differences
102
- const regressionAnalysis = {
103
- differences: comparisonResults.differences,
104
- classification: await classifyDifferences({
105
- differences: comparisonResults.differences,
106
- use_ai: true,
107
- categories: [
108
- 'layout-shift',
109
- 'color-change',
110
- 'font-change',
111
- 'missing-element',
112
- 'new-element',
113
- 'size-change',
114
- 'position-change'
115
- ]
116
- }),
117
- severity_assessment: {
118
- critical: [], // Blocking issues
119
- high: [], // Major visual regressions
120
- medium: [], // Minor visual changes
121
- low: [] // Acceptable variations
122
- }
123
- };
124
-
125
- // Generate regression report
126
- const regressionReport = generateRegressionReport({
127
- analysis: regressionAnalysis,
128
- include_screenshots: true,
129
- include_diffs: true,
130
- include_suggestions: true
131
- });
132
- ```
133
-
134
- ### Phase 4: Accessibility Testing
135
- ```javascript
136
- // Validate WCAG compliance
137
- const accessibilityTests = {
138
- standards: ['WCAG-2.1-AA', 'WCAG-2.2-AAA'],
139
- validations: [
140
- 'color-contrast',
141
- 'keyboard-navigation',
142
- 'screen-reader-compatibility',
143
- 'focus-indicators',
144
- 'alt-text-presence',
145
- 'aria-labels',
146
- 'semantic-html',
147
- 'form-labels',
148
- 'heading-structure'
149
- ],
150
- tools: ['axe-core', 'pa11y', 'lighthouse-accessibility']
151
- };
152
-
153
- // Execute accessibility tests
154
- const accessibilityResults = await validateAccessibility({
155
- pages: baselineConfig.pages,
156
- standards: accessibilityTests.standards,
157
- validations: accessibilityTests.validations,
158
- tools: accessibilityTests.tools
159
- });
160
- ```
161
-
162
- ## Coordination Protocol
163
-
164
- This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
165
-
166
- **Automatic Lifecycle Hooks:**
167
- ```typescript
168
- protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
169
- // Retrieve baselines
170
- const baselines = await this.memoryStore.retrieve(`aqe/visual/baselines/${this.version}`, {
171
- partition: 'visual_baselines'
172
- });
173
-
174
- // Retrieve test configuration
175
- const testConfig = await this.memoryStore.retrieve('aqe/visual/test-config', {
176
- partition: 'configuration'
177
- });
178
-
179
- this.eventBus.emit('visual-tester:starting', {
180
- agentId: this.agentId,
181
- pagesCount: testConfig.pages.length
182
- });
183
- }
184
-
185
- protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
186
- // Store visual test results
187
- await this.memoryStore.store(`aqe/visual/test-results/${data.result.testRunId}`, data.result, {
188
- partition: 'visual_results',
189
- ttl: 86400
190
- });
191
-
192
- // Store detected regressions
193
- if (data.result.regressions.length > 0) {
194
- await this.memoryStore.store(`aqe/visual/regressions/${data.result.buildId}`, data.result.regressions, {
195
- partition: 'regressions'
196
- });
197
- }
198
-
199
- // Store accessibility reports
200
- await this.memoryStore.store(`aqe/visual/accessibility/${data.result.page}`, data.result.a11yReport, {
201
- partition: 'accessibility'
202
- });
203
-
204
- this.eventBus.emit('visual-tester:completed', {
205
- agentId: this.agentId,
206
- pagesTested: data.result.pagesTested,
207
- regressionsFound: data.result.regressions.length
208
- });
209
- }
210
- ```
211
-
212
- **Event Bus Integration:**
213
- ```typescript
214
- // Subscribe to visual testing events
215
- this.registerEventHandler({
216
- eventType: 'visual:regression-detected',
217
- handler: async (event) => {
218
- await this.qualityGate.blockDeployment(event.severity);
219
- }
220
- });
221
-
222
- this.registerEventHandler({
223
- eventType: 'visual:baseline-updated',
224
- handler: async (event) => {
225
- await this.notificationAgent.notifyTeam('New visual baseline created');
226
- }
227
- });
228
- ```
229
-
230
- **Advanced Verification:**
231
- ```typescript
232
- const hookManager = new VerificationHookManager(this.memoryStore);
233
- const verification = await hookManager.executePreTaskVerification({
234
- task: 'visual-regression-test',
235
- context: { requiredVars: ['BASELINE_VERSION'], minMemoryMB: 2048 }
236
- });
237
- ```
238
-
239
- ### Agent Collaboration
240
- - **QE Test Executor**: Integrates visual tests into test suites
241
- - **QE Quality Gate**: Blocks deployments on visual regressions
242
- - **QE Test Generator**: Generates visual test cases automatically
243
- - **QE Performance Tester**: Correlates visual issues with performance
244
- - **Fleet Commander**: Reports visual testing resource usage
245
-
246
- ## Memory Keys
247
-
248
- ### Input Keys
249
- - `aqe/visual/baselines`: Baseline screenshot repository
250
- - `aqe/visual/test-config`: Visual testing configuration
251
- - `aqe/visual/comparison-thresholds`: Acceptable difference thresholds
252
- - `aqe/visual/ignore-regions`: UI regions to ignore in comparisons
253
- - `aqe/visual/test-targets`: Pages and components to test
254
-
255
- ### Output Keys
256
- - `aqe/visual/test-results`: Visual test execution results
257
- - `aqe/visual/regressions`: Detected visual regressions
258
- - `aqe/visual/diff-images`: Generated diff images
259
- - `aqe/visual/accessibility-reports`: WCAG compliance reports
260
- - `aqe/visual/cross-browser-matrix`: Cross-browser test results
261
- - `aqe/visual/performance-metrics`: Visual rendering metrics
262
-
263
- ### Coordination Keys
264
- - `aqe/visual/status`: Current visual testing status
265
- - `aqe/visual/test-queue`: Queued visual test jobs
266
- - `aqe/visual/baseline-updates`: Pending baseline updates
267
- - `aqe/visual/alerts`: Visual testing alerts and warnings
268
-
269
- ## Coordination Protocol
270
-
271
- ### Swarm Integration
272
-
273
- All swarm coordination is handled via **AQE hooks (Agentic QE native hooks)** and the EventBus. Use Claude Code's Task tool to spawn agents and orchestrate workflows - the native hooks handle all coordination automatically without external MCP commands.
274
-
275
- ## Visual Comparison Algorithms
276
-
277
- ### Pixel-by-Pixel Comparison
278
- ```javascript
279
- // Traditional pixel difference detection
280
- const pixelDiff = {
281
- algorithm: 'pixelmatch',
282
- options: {
283
- threshold: 0.1, // Pixel difference threshold
284
- includeAA: false, // Ignore anti-aliasing
285
- alpha: 0.1, // Opacity of diff overlay
286
- diffColor: [255, 0, 0], // Red diff color
287
- diffMask: false
288
- }
289
- };
290
-
291
- // Execute pixel comparison
292
- const pixelDiffResult = await compareScreenshots({
293
- baseline: baselineImage,
294
- current: currentImage,
295
- algorithm: pixelDiff
296
- });
297
- ```
298
-
299
- ### Structural Similarity (SSIM)
300
- ```javascript
301
- // Perceptual similarity comparison
302
- const structuralComparison = {
303
- algorithm: 'ssim',
304
- options: {
305
- window_size: 11,
306
- k1: 0.01,
307
- k2: 0.03,
308
- luminance_weight: 1.0,
309
- contrast_weight: 1.0,
310
- structure_weight: 1.0
311
- }
312
- };
313
-
314
- // Execute structural comparison
315
- const ssimResult = await compareScreenshots({
316
- baseline: baselineImage,
317
- current: currentImage,
318
- algorithm: structuralComparison
319
- });
320
- ```
321
-
322
- ### AI-Powered Visual Diff
323
- ```javascript
324
- // Semantic visual understanding
325
- const aiVisualDiff = {
326
- algorithm: 'ai-visual-diff',
327
- options: {
328
- use_neural_network: true,
329
- model: 'visual-regression-v2',
330
- semantic_understanding: true,
331
- context_awareness: true,
332
- ignore_minor_variations: true,
333
- classification: [
334
- 'intentional-change',
335
- 'unintentional-regression',
336
- 'acceptable-variation',
337
- 'critical-breakage'
338
- ]
339
- }
340
- };
341
-
342
- // Execute AI comparison
343
- const aiDiffResult = await compareScreenshots({
344
- baseline: baselineImage,
345
- current: currentImage,
346
- algorithm: aiVisualDiff
347
- });
348
- ```
349
-
350
- ## Cross-Browser Testing
351
-
352
- ### Browser Matrix
353
- ```javascript
354
- // Define cross-browser test matrix
355
- const browserMatrix = {
356
- browsers: [
357
- { name: 'chromium', version: 'latest' },
358
- { name: 'chromium', version: 'latest-1' },
359
- { name: 'firefox', version: 'latest' },
360
- { name: 'webkit', version: 'latest' },
361
- { name: 'edge', version: 'latest' }
362
- ],
363
- viewports: [
364
- { name: 'desktop', width: 1920, height: 1080 },
365
- { name: 'laptop', width: 1366, height: 768 },
366
- { name: 'tablet', width: 768, height: 1024 },
367
- { name: 'mobile', width: 375, height: 667 }
368
- ],
369
- pages: baselineConfig.pages,
370
- parallel: true,
371
- max_concurrent: 10
372
- };
373
-
374
- // Execute cross-browser tests
375
- const crossBrowserResults = await executeCrossBrowserTests(browserMatrix);
376
- ```
377
-
378
- ### Browser-Specific Handling
379
- ```javascript
380
- // Handle browser-specific differences
381
- const browserSpecificConfig = {
382
- chromium: {
383
- ignore_font_smoothing: true,
384
- ignore_scrollbar: true
385
- },
386
- firefox: {
387
- ignore_svg_rendering: true,
388
- ignore_css_filters: true
389
- },
390
- webkit: {
391
- ignore_shadow_dom_styles: true,
392
- ignore_webkit_appearance: true
393
- }
394
- };
395
- ```
396
-
397
- ## Accessibility Validation
398
-
399
- ### WCAG 2.1 AA Compliance
400
- ```javascript
401
- // Comprehensive accessibility testing
402
- const wcagValidation = {
403
- standard: 'WCAG-2.1-AA',
404
- rules: {
405
- perceivable: [
406
- 'color-contrast',
407
- 'text-alternatives',
408
- 'adaptable-content',
409
- 'distinguishable-content'
410
- ],
411
- operable: [
412
- 'keyboard-accessible',
413
- 'enough-time',
414
- 'seizure-safe',
415
- 'navigable'
416
- ],
417
- understandable: [
418
- 'readable',
419
- 'predictable',
420
- 'input-assistance'
421
- ],
422
- robust: [
423
- 'compatible',
424
- 'parsing-valid'
425
- ]
426
- }
427
- };
428
-
429
- // Execute WCAG validation
430
- const wcagResults = await validateWCAG({
431
- pages: baselineConfig.pages,
432
- standard: wcagValidation.standard,
433
- rules: wcagValidation.rules
434
- });
435
- ```
436
-
437
- ### Color Contrast Analysis
438
- ```javascript
439
- // Validate color contrast ratios
440
- const colorContrastValidation = {
441
- minimum_ratio_normal: 4.5, // WCAG AA normal text
442
- minimum_ratio_large: 3.0, // WCAG AA large text
443
- minimum_ratio_aaa: 7.0, // WCAG AAA
444
- analyze_all_elements: true,
445
- generate_suggestions: true
446
- };
447
-
448
- // Execute contrast analysis
449
- const contrastResults = await analyzeColorContrast({
450
- pages: baselineConfig.pages,
451
- validation: colorContrastValidation
452
- });
453
- ```
454
-
455
- ### Keyboard Navigation Testing
456
- ```javascript
457
- // Test keyboard accessibility
458
- const keyboardTests = {
459
- test_tab_order: true,
460
- test_focus_indicators: true,
461
- test_skip_links: true,
462
- test_keyboard_traps: true,
463
- test_shortcut_conflicts: false,
464
- record_navigation_path: true
465
- };
466
-
467
- // Execute keyboard navigation tests
468
- const keyboardResults = await testKeyboardNavigation({
469
- pages: baselineConfig.pages,
470
- tests: keyboardTests
471
- });
472
- ```
473
-
474
- ## Responsive Design Testing
475
-
476
- ### Viewport Testing
477
- ```javascript
478
- // Test responsive breakpoints
479
- const responsiveTests = {
480
- breakpoints: [
481
- { name: 'mobile-small', width: 320, height: 568 },
482
- { name: 'mobile', width: 375, height: 667 },
483
- { name: 'mobile-large', width: 414, height: 896 },
484
- { name: 'tablet', width: 768, height: 1024 },
485
- { name: 'desktop', width: 1366, height: 768 },
486
- { name: 'desktop-large', width: 1920, height: 1080 },
487
- { name: '4k', width: 3840, height: 2160 }
488
- ],
489
- validations: [
490
- 'layout-integrity',
491
- 'text-readability',
492
- 'image-scaling',
493
- 'navigation-usability',
494
- 'content-visibility'
495
- ]
496
- };
497
-
498
- // Execute responsive tests
499
- const responsiveResults = await testResponsiveDesign(responsiveTests);
500
- ```
501
-
502
- ### Orientation Testing
503
- ```javascript
504
- // Test portrait and landscape orientations
505
- const orientationTests = {
506
- devices: ['mobile', 'tablet'],
507
- orientations: ['portrait', 'landscape'],
508
- validate_layout_shift: true,
509
- validate_content_reflow: true
510
- };
511
-
512
- // Execute orientation tests
513
- const orientationResults = await testOrientations(orientationTests);
514
- ```
515
-
516
- ## Performance Metrics
517
-
518
- ### Visual Rendering Performance
519
- ```javascript
520
- // Measure visual performance metrics
521
- const performanceMetrics = {
522
- metrics: [
523
- 'first-contentful-paint',
524
- 'largest-contentful-paint',
525
- 'cumulative-layout-shift',
526
- 'speed-index',
527
- 'time-to-interactive',
528
- 'total-blocking-time'
529
- ],
530
- thresholds: {
531
- fcp: 1800, // ms
532
- lcp: 2500,
533
- cls: 0.1,
534
- si: 3000,
535
- tti: 3800,
536
- tbt: 200
537
- }
538
- };
539
-
540
- // Measure performance
541
- const perfResults = await measureVisualPerformance({
542
- pages: baselineConfig.pages,
543
- metrics: performanceMetrics
544
- });
545
- ```
546
-
547
- ### Layout Shift Detection
548
- ```javascript
549
- // Detect cumulative layout shifts
550
- const layoutShiftDetection = {
551
- monitor_duration: 5000, // ms
552
- threshold: 0.1, // CLS threshold
553
- track_elements: true,
554
- identify_causes: true
555
- };
556
-
557
- // Execute layout shift detection
558
- const layoutShiftResults = await detectLayoutShifts({
559
- pages: baselineConfig.pages,
560
- detection: layoutShiftDetection
561
- });
562
- ```
563
-
564
- ## Example Outputs
565
-
566
- ### Visual Regression Report
567
- ```json
568
- {
569
- "test_run_id": "vt-2025-09-30-001",
570
- "status": "completed",
571
- "execution_time": "3m 42s",
572
- "summary": {
573
- "total_pages": 15,
574
- "total_screenshots": 45,
575
- "browsers_tested": 3,
576
- "viewports_tested": 3,
577
- "regressions_found": 2,
578
- "accessibility_violations": 5
579
- },
580
- "regressions": [
581
- {
582
- "page": "dashboard",
583
- "browser": "chromium",
584
- "viewport": "desktop",
585
- "severity": "high",
586
- "type": "layout-shift",
587
- "description": "Navigation menu shifted 15px right",
588
- "affected_area": { "x": 0, "y": 0, "width": 250, "height": 1080 },
589
- "pixel_diff_percentage": 3.2,
590
- "baseline_image": "baseline-dashboard-chromium-desktop.png",
591
- "current_image": "current-dashboard-chromium-desktop.png",
592
- "diff_image": "diff-dashboard-chromium-desktop.png",
593
- "suggested_fix": "Check CSS grid template columns in navigation.css"
594
- },
595
- {
596
- "page": "user-profile",
597
- "browser": "firefox",
598
- "viewport": "mobile",
599
- "severity": "medium",
600
- "type": "color-change",
601
- "description": "Button color changed from #007bff to #0056b3",
602
- "affected_area": { "x": 150, "y": 400, "width": 100, "height": 40 },
603
- "pixel_diff_percentage": 0.8,
604
- "baseline_image": "baseline-profile-firefox-mobile.png",
605
- "current_image": "current-profile-firefox-mobile.png",
606
- "diff_image": "diff-profile-firefox-mobile.png",
607
- "suggested_fix": "Verify CSS variable --primary-color value"
608
- }
609
- ],
610
- "accessibility": {
611
- "standard": "WCAG-2.1-AA",
612
- "compliance_score": 91,
613
- "violations": [
614
- {
615
- "rule": "color-contrast",
616
- "severity": "serious",
617
- "page": "dashboard",
618
- "element": "button.secondary",
619
- "description": "Contrast ratio 3.2:1 insufficient (minimum 4.5:1)",
620
- "location": ".dashboard-actions > button:nth-child(2)",
621
- "suggested_fix": "Darken button text or lighten background"
622
- }
623
- ]
624
- },
625
- "cross_browser_consistency": {
626
- "chromium": "98% consistent",
627
- "firefox": "95% consistent",
628
- "webkit": "97% consistent"
629
- }
630
- }
631
- ```
632
-
633
- ### Accessibility Report
634
- ```json
635
- {
636
- "page": "dashboard",
637
- "standard": "WCAG-2.1-AA",
638
- "compliance_score": 91,
639
- "test_date": "2025-09-30T10:00:00Z",
640
- "violations": [
641
- {
642
- "rule": "button-name",
643
- "severity": "critical",
644
- "wcag_criterion": "4.1.2",
645
- "element": "<button class=\"icon-btn\"></button>",
646
- "location": ".toolbar > button:nth-child(3)",
647
- "description": "Button has no accessible name",
648
- "impact": "Buttons without names are unusable by screen readers",
649
- "suggested_fix": "Add aria-label or visible text content",
650
- "code_suggestion": "<button class=\"icon-btn\" aria-label=\"Save changes\"></button>"
651
- }
652
- ],
653
- "passes": [
654
- "html-has-lang",
655
- "document-title",
656
- "landmark-one-main",
657
- "page-has-heading-one"
658
- ],
659
- "warnings": [
660
- {
661
- "rule": "color-contrast-enhanced",
662
- "description": "Some text does not meet WCAG AAA contrast ratio"
663
- }
664
- ]
665
- }
666
- ```
667
-
668
- ## Commands
669
-
670
- ### Basic Operations
671
- ```bash
672
- # Initialize visual tester
673
- agentic-qe agent spawn --name qe-visual-tester --type visual-tester
674
-
675
- # Capture baselines
676
- agentic-qe visual baseline --pages all --browsers chromium,firefox,webkit
677
-
678
- # Run visual regression tests
679
- agentic-qe visual test --compare-baseline v2.0.0
680
-
681
- # Check test status
682
- agentic-qe visual status --test-run-id vt-123
683
- ```
684
-
685
- ### Advanced Operations
686
- ```bash
687
- # Cross-browser visual testing
688
- agentic-qe visual cross-browser \
689
- --browsers "chromium,firefox,webkit" \
690
- --viewports "desktop,tablet,mobile"
691
-
692
- # Accessibility validation
693
- agentic-qe visual accessibility \
694
- --standard WCAG-2.1-AA \
695
- --pages all
696
-
697
- # Responsive design testing
698
- agentic-qe visual responsive \
699
- --breakpoints "320,768,1366,1920"
700
-
701
- # Update baselines
702
- agentic-qe visual update-baseline \
703
- --page dashboard \
704
- --version v2.1.0
705
- ```
706
-
707
- ### Analysis Operations
708
- ```bash
709
- # Analyze regressions
710
- agentic-qe visual analyze-regressions \
711
- --severity high \
712
- --ai-classification
713
-
714
- # Generate diff report
715
- agentic-qe visual diff-report \
716
- --test-run-id vt-123 \
717
- --format html
718
-
719
- # Compare versions
720
- agentic-qe visual compare-versions \
721
- --baseline v2.0.0 \
722
- --target v2.1.0
723
- ```
724
-
725
- ## Quality Metrics
726
-
727
- - **Regression Detection**: >99% accuracy for visual regressions
728
- - **False Positive Rate**: <2% false positives with AI-powered diff
729
- - **Accessibility Coverage**: 100% WCAG 2.1 AA rule validation
730
- - **Cross-Browser Coverage**: 5+ browsers, 7+ viewport sizes
731
- - **Performance**: <30 seconds per page cross-browser test
732
- - **Baseline Storage**: Lossless compression, <5MB per page
733
- - **Test Execution**: Parallel execution across 10 browsers
734
-
735
- ## Integration with QE Fleet
736
-
737
- This agent integrates with the Agentic QE Fleet through:
738
- - **EventBus**: Real-time visual regression alerts
739
- - **MemoryManager**: Baseline and regression data storage
740
- - **FleetManager**: Coordinated visual testing workflows
741
- - **Neural Network**: AI-powered visual diff and regression classification
742
- - **Quality Gate**: Automated deployment blocking on visual regressions
743
-
744
- ## Advanced Features
745
-
746
- ### AI-Powered Visual Understanding
747
- Uses neural networks to understand UI context and semantics, not just pixel differences
748
-
749
- ### Smart Baseline Management
750
- Automatically suggests baseline updates when intentional design changes are detected
751
-
752
- ### Visual Test Generation
753
- Generates visual test cases automatically from UI component libraries
754
-
755
- ### Continuous Visual Monitoring
756
- Monitors production UI for visual degradation in real-time