agentic-qe 1.9.3 → 2.0.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 (271) hide show
  1. package/.claude/agents/qe-api-contract-validator.md +95 -1336
  2. package/.claude/agents/qe-chaos-engineer.md +152 -1211
  3. package/.claude/agents/qe-code-complexity.md +144 -707
  4. package/.claude/agents/qe-coverage-analyzer.md +147 -743
  5. package/.claude/agents/qe-deployment-readiness.md +143 -1496
  6. package/.claude/agents/qe-flaky-test-hunter.md +132 -1529
  7. package/.claude/agents/qe-fleet-commander.md +12 -12
  8. package/.claude/agents/qe-performance-tester.md +150 -886
  9. package/.claude/agents/qe-production-intelligence.md +155 -1396
  10. package/.claude/agents/qe-quality-analyzer.md +6 -6
  11. package/.claude/agents/qe-quality-gate.md +151 -648
  12. package/.claude/agents/qe-regression-risk-analyzer.md +132 -1150
  13. package/.claude/agents/qe-requirements-validator.md +149 -932
  14. package/.claude/agents/qe-security-scanner.md +157 -797
  15. package/.claude/agents/qe-test-data-architect.md +96 -1365
  16. package/.claude/agents/qe-test-executor.md +8 -8
  17. package/.claude/agents/qe-test-generator.md +145 -1540
  18. package/.claude/agents/qe-visual-tester.md +153 -1257
  19. package/.claude/agents/qx-partner.md +235 -0
  20. package/.claude/agents/subagents/qe-code-reviewer.md +40 -136
  21. package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +40 -480
  22. package/.claude/agents/subagents/qe-data-generator.md +41 -125
  23. package/.claude/agents/subagents/qe-flaky-investigator.md +55 -411
  24. package/.claude/agents/subagents/qe-integration-tester.md +53 -141
  25. package/.claude/agents/subagents/qe-performance-validator.md +54 -130
  26. package/.claude/agents/subagents/qe-security-auditor.md +56 -114
  27. package/.claude/agents/subagents/qe-test-data-architect-sub.md +57 -548
  28. package/.claude/agents/subagents/qe-test-implementer.md +58 -551
  29. package/.claude/agents/subagents/qe-test-refactorer.md +65 -722
  30. package/.claude/agents/subagents/qe-test-writer.md +63 -726
  31. package/.claude/skills/skills-manifest.json +632 -0
  32. package/.claude/skills/testability-scoring/README.md +71 -0
  33. package/.claude/skills/testability-scoring/SKILL.md +611 -0
  34. package/.claude/skills/testability-scoring/resources/templates/config.template.js +84 -0
  35. package/.claude/skills/testability-scoring/resources/templates/testability-scoring.spec.template.js +532 -0
  36. package/.claude/skills/testability-scoring/scripts/generate-html-report.js +1007 -0
  37. package/.claude/skills/testability-scoring/scripts/run-assessment.sh +70 -0
  38. package/CHANGELOG.md +116 -0
  39. package/README.md +59 -7
  40. package/config/.env.otel.example +25 -0
  41. package/config/OTEL-QUICK-REFERENCE.md +137 -0
  42. package/config/README-OTEL.md +222 -0
  43. package/config/alerting-rules.yml +518 -0
  44. package/config/docker-compose.otel.yml +187 -0
  45. package/config/grafana/dashboards/agentic-qe-overview.json +286 -0
  46. package/config/grafana/provisioning/dashboards/dashboards.yml +19 -0
  47. package/config/grafana/provisioning/datasources/datasources.yml +53 -0
  48. package/config/otel-collector-config.yaml.example +145 -0
  49. package/config/prometheus.yml.example +106 -0
  50. package/dist/agents/QXPartnerAgent.d.ts +139 -0
  51. package/dist/agents/QXPartnerAgent.d.ts.map +1 -0
  52. package/dist/agents/QXPartnerAgent.js +769 -0
  53. package/dist/agents/QXPartnerAgent.js.map +1 -0
  54. package/dist/agents/index.d.ts +1 -0
  55. package/dist/agents/index.d.ts.map +1 -1
  56. package/dist/agents/index.js +82 -2
  57. package/dist/agents/index.js.map +1 -1
  58. package/dist/alerting/AlertManager.d.ts +120 -0
  59. package/dist/alerting/AlertManager.d.ts.map +1 -0
  60. package/dist/alerting/AlertManager.js +345 -0
  61. package/dist/alerting/AlertManager.js.map +1 -0
  62. package/dist/alerting/FeedbackRouter.d.ts +98 -0
  63. package/dist/alerting/FeedbackRouter.d.ts.map +1 -0
  64. package/dist/alerting/FeedbackRouter.js +331 -0
  65. package/dist/alerting/FeedbackRouter.js.map +1 -0
  66. package/dist/alerting/StrategyApplicator.d.ts +120 -0
  67. package/dist/alerting/StrategyApplicator.d.ts.map +1 -0
  68. package/dist/alerting/StrategyApplicator.js +299 -0
  69. package/dist/alerting/StrategyApplicator.js.map +1 -0
  70. package/dist/alerting/index.d.ts +68 -0
  71. package/dist/alerting/index.d.ts.map +1 -0
  72. package/dist/alerting/index.js +112 -0
  73. package/dist/alerting/index.js.map +1 -0
  74. package/dist/alerting/types.d.ts +118 -0
  75. package/dist/alerting/types.d.ts.map +1 -0
  76. package/dist/alerting/types.js +11 -0
  77. package/dist/alerting/types.js.map +1 -0
  78. package/dist/cli/commands/debug/agent.d.ts.map +1 -1
  79. package/dist/cli/commands/debug/agent.js +19 -6
  80. package/dist/cli/commands/debug/agent.js.map +1 -1
  81. package/dist/cli/commands/debug/health-check.js +20 -7
  82. package/dist/cli/commands/debug/health-check.js.map +1 -1
  83. package/dist/cli/commands/init-claude-md-template.d.ts +1 -0
  84. package/dist/cli/commands/init-claude-md-template.d.ts.map +1 -1
  85. package/dist/cli/commands/init-claude-md-template.js +4 -3
  86. package/dist/cli/commands/init-claude-md-template.js.map +1 -1
  87. package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
  88. package/dist/cli/commands/workflow/cancel.js +4 -3
  89. package/dist/cli/commands/workflow/cancel.js.map +1 -1
  90. package/dist/cli/commands/workflow/list.d.ts.map +1 -1
  91. package/dist/cli/commands/workflow/list.js +4 -3
  92. package/dist/cli/commands/workflow/list.js.map +1 -1
  93. package/dist/cli/commands/workflow/pause.d.ts.map +1 -1
  94. package/dist/cli/commands/workflow/pause.js +4 -3
  95. package/dist/cli/commands/workflow/pause.js.map +1 -1
  96. package/dist/cli/init/claude-config.d.ts.map +1 -1
  97. package/dist/cli/init/claude-config.js +13 -13
  98. package/dist/cli/init/claude-config.js.map +1 -1
  99. package/dist/cli/init/claude-md.d.ts.map +1 -1
  100. package/dist/cli/init/claude-md.js +44 -2
  101. package/dist/cli/init/claude-md.js.map +1 -1
  102. package/dist/cli/init/database-init.js +1 -1
  103. package/dist/cli/init/index.d.ts.map +1 -1
  104. package/dist/cli/init/index.js +13 -6
  105. package/dist/cli/init/index.js.map +1 -1
  106. package/dist/cli/init/skills.d.ts.map +1 -1
  107. package/dist/cli/init/skills.js +2 -1
  108. package/dist/cli/init/skills.js.map +1 -1
  109. package/dist/core/memory/AgentDBIntegration.d.ts +24 -6
  110. package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -1
  111. package/dist/core/memory/AgentDBIntegration.js +66 -10
  112. package/dist/core/memory/AgentDBIntegration.js.map +1 -1
  113. package/dist/core/memory/IPatternStore.d.ts +209 -0
  114. package/dist/core/memory/IPatternStore.d.ts.map +1 -0
  115. package/dist/core/memory/IPatternStore.js +15 -0
  116. package/dist/core/memory/IPatternStore.js.map +1 -0
  117. package/dist/core/memory/MigrationTools.d.ts +192 -0
  118. package/dist/core/memory/MigrationTools.d.ts.map +1 -0
  119. package/dist/core/memory/MigrationTools.js +615 -0
  120. package/dist/core/memory/MigrationTools.js.map +1 -0
  121. package/dist/core/memory/NeuralEnhancement.d.ts +154 -0
  122. package/dist/core/memory/NeuralEnhancement.d.ts.map +1 -0
  123. package/dist/core/memory/NeuralEnhancement.js +598 -0
  124. package/dist/core/memory/NeuralEnhancement.js.map +1 -0
  125. package/dist/core/memory/PatternStoreFactory.d.ts +143 -0
  126. package/dist/core/memory/PatternStoreFactory.d.ts.map +1 -0
  127. package/dist/core/memory/PatternStoreFactory.js +370 -0
  128. package/dist/core/memory/PatternStoreFactory.js.map +1 -0
  129. package/dist/core/memory/RealAgentDBAdapter.d.ts +1 -0
  130. package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
  131. package/dist/core/memory/RealAgentDBAdapter.js +28 -20
  132. package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
  133. package/dist/core/memory/RuVectorPatternStore.d.ts +198 -0
  134. package/dist/core/memory/RuVectorPatternStore.d.ts.map +1 -0
  135. package/dist/core/memory/RuVectorPatternStore.js +605 -0
  136. package/dist/core/memory/RuVectorPatternStore.js.map +1 -0
  137. package/dist/core/memory/SelfHealingMonitor.d.ts +186 -0
  138. package/dist/core/memory/SelfHealingMonitor.d.ts.map +1 -0
  139. package/dist/core/memory/SelfHealingMonitor.js +451 -0
  140. package/dist/core/memory/SelfHealingMonitor.js.map +1 -0
  141. package/dist/core/memory/SwarmMemoryManager.d.ts +62 -0
  142. package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
  143. package/dist/core/memory/SwarmMemoryManager.js +97 -0
  144. package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
  145. package/dist/core/memory/UnifiedMemoryCoordinator.d.ts +341 -0
  146. package/dist/core/memory/UnifiedMemoryCoordinator.d.ts.map +1 -0
  147. package/dist/core/memory/UnifiedMemoryCoordinator.js +986 -0
  148. package/dist/core/memory/UnifiedMemoryCoordinator.js.map +1 -0
  149. package/dist/core/memory/index.d.ts +16 -0
  150. package/dist/core/memory/index.d.ts.map +1 -1
  151. package/dist/core/memory/index.js +58 -1
  152. package/dist/core/memory/index.js.map +1 -1
  153. package/dist/core/optimization/SwarmOptimizer.d.ts +185 -0
  154. package/dist/core/optimization/SwarmOptimizer.d.ts.map +1 -0
  155. package/dist/core/optimization/SwarmOptimizer.js +631 -0
  156. package/dist/core/optimization/SwarmOptimizer.js.map +1 -0
  157. package/dist/core/optimization/index.d.ts +9 -0
  158. package/dist/core/optimization/index.d.ts.map +1 -0
  159. package/dist/core/optimization/index.js +25 -0
  160. package/dist/core/optimization/index.js.map +1 -0
  161. package/dist/core/optimization/types.d.ts +53 -0
  162. package/dist/core/optimization/types.d.ts.map +1 -0
  163. package/dist/core/optimization/types.js +6 -0
  164. package/dist/core/optimization/types.js.map +1 -0
  165. package/dist/core/orchestration/PriorityQueue.d.ts +54 -0
  166. package/dist/core/orchestration/PriorityQueue.d.ts.map +1 -0
  167. package/dist/core/orchestration/PriorityQueue.js +122 -0
  168. package/dist/core/orchestration/PriorityQueue.js.map +1 -0
  169. package/dist/core/orchestration/WorkflowOrchestrator.d.ts +176 -0
  170. package/dist/core/orchestration/WorkflowOrchestrator.d.ts.map +1 -0
  171. package/dist/core/orchestration/WorkflowOrchestrator.js +813 -0
  172. package/dist/core/orchestration/WorkflowOrchestrator.js.map +1 -0
  173. package/dist/core/orchestration/index.d.ts +7 -0
  174. package/dist/core/orchestration/index.d.ts.map +1 -0
  175. package/dist/core/orchestration/index.js +11 -0
  176. package/dist/core/orchestration/index.js.map +1 -0
  177. package/dist/core/orchestration/types.d.ts +96 -0
  178. package/dist/core/orchestration/types.d.ts.map +1 -0
  179. package/dist/core/orchestration/types.js +6 -0
  180. package/dist/core/orchestration/types.js.map +1 -0
  181. package/dist/core/skills/DynamicSkillLoader.d.ts +96 -0
  182. package/dist/core/skills/DynamicSkillLoader.d.ts.map +1 -0
  183. package/dist/core/skills/DynamicSkillLoader.js +353 -0
  184. package/dist/core/skills/DynamicSkillLoader.js.map +1 -0
  185. package/dist/core/skills/types.d.ts +118 -0
  186. package/dist/core/skills/types.d.ts.map +1 -0
  187. package/dist/core/skills/types.js +7 -0
  188. package/dist/core/skills/types.js.map +1 -0
  189. package/dist/core/transport/QUICTransport.d.ts +320 -0
  190. package/dist/core/transport/QUICTransport.d.ts.map +1 -0
  191. package/dist/core/transport/QUICTransport.js +711 -0
  192. package/dist/core/transport/QUICTransport.js.map +1 -0
  193. package/dist/core/transport/index.d.ts +40 -0
  194. package/dist/core/transport/index.d.ts.map +1 -0
  195. package/dist/core/transport/index.js +46 -0
  196. package/dist/core/transport/index.js.map +1 -0
  197. package/dist/core/transport/quic-loader.d.ts +123 -0
  198. package/dist/core/transport/quic-loader.d.ts.map +1 -0
  199. package/dist/core/transport/quic-loader.js +293 -0
  200. package/dist/core/transport/quic-loader.js.map +1 -0
  201. package/dist/core/transport/quic.d.ts +154 -0
  202. package/dist/core/transport/quic.d.ts.map +1 -0
  203. package/dist/core/transport/quic.js +214 -0
  204. package/dist/core/transport/quic.js.map +1 -0
  205. package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
  206. package/dist/mcp/services/AgentRegistry.js +4 -1
  207. package/dist/mcp/services/AgentRegistry.js.map +1 -1
  208. package/dist/reasoning/RuVectorReasoningAdapter.d.ts +232 -0
  209. package/dist/reasoning/RuVectorReasoningAdapter.d.ts.map +1 -0
  210. package/dist/reasoning/RuVectorReasoningAdapter.js +585 -0
  211. package/dist/reasoning/RuVectorReasoningAdapter.js.map +1 -0
  212. package/dist/reasoning/index.d.ts +2 -0
  213. package/dist/reasoning/index.d.ts.map +1 -1
  214. package/dist/reasoning/index.js +6 -1
  215. package/dist/reasoning/index.js.map +1 -1
  216. package/dist/reporting/ResultAggregator.d.ts +107 -0
  217. package/dist/reporting/ResultAggregator.d.ts.map +1 -0
  218. package/dist/reporting/ResultAggregator.js +435 -0
  219. package/dist/reporting/ResultAggregator.js.map +1 -0
  220. package/dist/reporting/index.d.ts +48 -0
  221. package/dist/reporting/index.d.ts.map +1 -0
  222. package/dist/reporting/index.js +154 -0
  223. package/dist/reporting/index.js.map +1 -0
  224. package/dist/reporting/reporters/ControlLoopReporter.d.ts +128 -0
  225. package/dist/reporting/reporters/ControlLoopReporter.d.ts.map +1 -0
  226. package/dist/reporting/reporters/ControlLoopReporter.js +417 -0
  227. package/dist/reporting/reporters/ControlLoopReporter.js.map +1 -0
  228. package/dist/reporting/reporters/HumanReadableReporter.d.ts +140 -0
  229. package/dist/reporting/reporters/HumanReadableReporter.d.ts.map +1 -0
  230. package/dist/reporting/reporters/HumanReadableReporter.js +524 -0
  231. package/dist/reporting/reporters/HumanReadableReporter.js.map +1 -0
  232. package/dist/reporting/reporters/JSONReporter.d.ts +193 -0
  233. package/dist/reporting/reporters/JSONReporter.d.ts.map +1 -0
  234. package/dist/reporting/reporters/JSONReporter.js +324 -0
  235. package/dist/reporting/reporters/JSONReporter.js.map +1 -0
  236. package/dist/reporting/reporters/index.d.ts +14 -0
  237. package/dist/reporting/reporters/index.d.ts.map +1 -0
  238. package/dist/reporting/reporters/index.js +19 -0
  239. package/dist/reporting/reporters/index.js.map +1 -0
  240. package/dist/reporting/types.d.ts +427 -0
  241. package/dist/reporting/types.d.ts.map +1 -0
  242. package/dist/reporting/types.js +12 -0
  243. package/dist/reporting/types.js.map +1 -0
  244. package/dist/types/index.d.ts +2 -1
  245. package/dist/types/index.d.ts.map +1 -1
  246. package/dist/types/index.js +2 -0
  247. package/dist/types/index.js.map +1 -1
  248. package/dist/types/qx.d.ts +397 -0
  249. package/dist/types/qx.d.ts.map +1 -0
  250. package/dist/types/qx.js +71 -0
  251. package/dist/types/qx.js.map +1 -0
  252. package/dist/visualization/api/RestEndpoints.js +1 -1
  253. package/dist/visualization/api/RestEndpoints.js.map +1 -1
  254. package/dist/visualization/api/WebSocketServer.d.ts +44 -0
  255. package/dist/visualization/api/WebSocketServer.d.ts.map +1 -1
  256. package/dist/visualization/api/WebSocketServer.js +144 -23
  257. package/dist/visualization/api/WebSocketServer.js.map +1 -1
  258. package/dist/visualization/core/DataTransformer.d.ts +10 -0
  259. package/dist/visualization/core/DataTransformer.d.ts.map +1 -1
  260. package/dist/visualization/core/DataTransformer.js +60 -5
  261. package/dist/visualization/core/DataTransformer.js.map +1 -1
  262. package/dist/visualization/emit-event.d.ts +75 -0
  263. package/dist/visualization/emit-event.d.ts.map +1 -0
  264. package/dist/visualization/emit-event.js +213 -0
  265. package/dist/visualization/emit-event.js.map +1 -0
  266. package/dist/visualization/index.d.ts +1 -0
  267. package/dist/visualization/index.d.ts.map +1 -1
  268. package/dist/visualization/index.js +7 -1
  269. package/dist/visualization/index.js.map +1 -1
  270. package/docs/reference/skills.md +63 -1
  271. package/package.json +12 -4
@@ -0,0 +1,235 @@
1
+ ---
2
+ name: qx-partner
3
+ description: Quality Experience (QX) analysis combining QA advocacy and UX perspectives to co-create quality for all stakeholders
4
+ ---
5
+
6
+ <qe_agent_definition>
7
+ <identity>
8
+ You are the QX Partner Agent, bridging Quality Advocacy (QA) and User Experience (UX) to co-create quality experience for everyone associated with the product.
9
+ Mission: Solve oracle problems when quality criteria are unclear, find balance between user experience and business needs, and ensure "value to someone who matters" for all stakeholders.
10
+ </identity>
11
+
12
+ <implementation_status>
13
+ ✅ Working:
14
+ - Comprehensive QX analysis combining QA and UX perspectives
15
+ - Oracle problem detection when quality criteria are unclear
16
+ - UX testing heuristics (Rule of Three, user/business needs analysis)
17
+ - Impact analysis for visible and invisible effects
18
+ - Balance finder between user experience and business objectives
19
+ - Testability scoring integration (10 Principles)
20
+ - Memory coordination via AQE hooks
21
+ - Learning protocol integration
22
+
23
+ ⚠️ Partial:
24
+ - Competitive analysis across competitor sites
25
+ - Real-time collaboration with UX/QA agents
26
+
27
+ ❌ Planned:
28
+ - AI-powered design change impact prediction
29
+ - Continuous QX monitoring in production
30
+ </implementation_status>
31
+
32
+ <default_to_action>
33
+ Perform QX analysis immediately when provided with URLs, designs, or requirements.
34
+ Make autonomous decisions about oracle problems and stakeholder conflicts without asking.
35
+ Detect user vs business imbalances automatically and generate recommendations.
36
+ Apply UX heuristics and generate actionable insights without confirmation.
37
+ Report findings with severity, impact, and effort estimates for remediation.
38
+ </default_to_action>
39
+
40
+ <parallel_execution>
41
+ Analyze problem understanding, user needs, and business needs simultaneously.
42
+ Execute oracle detection and impact analysis concurrently.
43
+ Process heuristic evaluation and testability integration in parallel.
44
+ Batch memory operations for analyses, recommendations, and reports in single transactions.
45
+ </parallel_execution>
46
+
47
+ <capabilities>
48
+ - **QX Analysis**: Comprehensive analysis combining QA advocacy and UX perspectives with 0-100 scoring
49
+ - **Oracle Problem Detection**: Identify when quality criteria are unclear (user vs business conflicts, missing information, stakeholder disagreements)
50
+ - **UX Testing Heuristics**: 25+ heuristics across 6 categories (problem analysis, user needs, business needs, balance, impact, creativity)
51
+ - **User-Business Balance**: Find optimal balance between UX and business objectives with alignment scoring
52
+ - **Impact Analysis**: Analyze visible impacts (GUI flow, user feelings) and invisible impacts (performance, security, accessibility)
53
+ - **Testability Integration**: Combine with testability scoring (10 Principles) for holistic quality insights
54
+ - **Collaborative QX**: Coordinate with Visual Tester (UX) and Quality Analyzer (QA) agents
55
+ </capabilities>
56
+
57
+ <memory_namespace>
58
+ Reads:
59
+ - aqe/qx/config - QX analysis configuration
60
+ - aqe/qx/historical-analyses - Past QX analyses for pattern matching
61
+ - aqe/qx/oracle-patterns - Known oracle problem patterns
62
+ - aqe/testability/* - Testability scoring results for integration
63
+ - aqe/learning/patterns/qx/* - Learned QX strategies
64
+
65
+ Writes:
66
+ - aqe/qx/analysis-results - QX analysis results with scoring
67
+ - aqe/qx/oracle-problems - Detected oracle problems
68
+ - aqe/qx/recommendations - QX improvement recommendations
69
+ - aqe/qx/impact-reports - Impact analysis reports
70
+ - aqe/qx/balance-assessments - User vs business balance results
71
+
72
+ Coordination:
73
+ - aqe/qx/status - Current QX analysis status
74
+ - aqe/qx/alerts - Critical oracle problem alerts
75
+ - aqe/swarm/qx/* - Cross-agent coordination with Visual Tester and Quality Analyzer
76
+ </memory_namespace>
77
+
78
+ <learning_protocol>
79
+ Query before analysis:
80
+ ```javascript
81
+ mcp__agentic_qe__learning_query({
82
+ agentId: "qx-partner",
83
+ taskType: "qx-analysis",
84
+ minReward: 0.8,
85
+ queryType: "all",
86
+ limit: 10
87
+ })
88
+ ```
89
+
90
+ Store after completion:
91
+ ```javascript
92
+ mcp__agentic_qe__learning_store_experience({
93
+ agentId: "qx-partner",
94
+ taskType: "qx-analysis",
95
+ reward: 0.95,
96
+ outcome: {
97
+ qxScore: 82,
98
+ oracleProblemsDetected: 2,
99
+ recommendationsGenerated: 8,
100
+ heuristicsApplied: 12,
101
+ executionTime: 6500
102
+ },
103
+ metadata: {
104
+ analysisMode: "full",
105
+ testabilityIntegrated: true,
106
+ targetUrl: "https://example.com"
107
+ }
108
+ })
109
+ ```
110
+
111
+ Store patterns when discovered:
112
+ ```javascript
113
+ mcp__agentic_qe__learning_store_pattern({
114
+ pattern: "User convenience vs business revenue conflicts indicate oracle problem requiring stakeholder alignment session",
115
+ confidence: 0.92,
116
+ domain: "qx-oracle-detection",
117
+ metadata: {
118
+ oracleType: "stakeholder-conflict",
119
+ resolutionApproach: "facilitated-discussion",
120
+ successRate: 0.88
121
+ }
122
+ })
123
+ ```
124
+
125
+ Reward criteria:
126
+ - 1.0: Perfect (All heuristics applied, oracle problems resolved, <5s)
127
+ - 0.9: Excellent (95%+ heuristics, actionable recommendations, <10s)
128
+ - 0.7: Good (90%+ heuristics, balance found, <20s)
129
+ - 0.5: Acceptable (Core analysis complete, recommendations generated)
130
+ </learning_protocol>
131
+
132
+ <output_format>
133
+ - JSON for QX analysis results (scores, oracle problems, recommendations)
134
+ - Markdown for stakeholder reports and balance assessments
135
+ - HTML for visual impact analysis with diagrams
136
+ </output_format>
137
+
138
+ <examples>
139
+ Example 1: Oracle problem detection
140
+ ```
141
+ Input: Analyze checkout redesign for mystore.com
142
+ - Context: Mobile-first, conversion-focused
143
+ - Stakeholders: Users, Business, Support
144
+
145
+ Output: QX Analysis Results
146
+ - QX Score: 72/100 (C)
147
+ - Oracle Problems: 2 detected
148
+ 1. HIGH: User convenience vs business revenue conflict
149
+ - One-click checkout reduces upsell opportunities
150
+ - Resolution: A/B test with revenue tracking
151
+ 2. MEDIUM: Missing mobile usability data
152
+ - Cannot validate mobile-first assumption
153
+ - Resolution: Conduct mobile user research
154
+ - Balance: Slightly favors business (User: 68, Business: 81)
155
+ - Recommendations: 8 prioritized actions
156
+ ```
157
+
158
+ Example 2: User-business balance analysis
159
+ ```
160
+ Input: Analyze feature request "Add social login"
161
+ - User Need: Faster registration
162
+ - Business Need: Collect email for marketing
163
+
164
+ Output: Balance Analysis
165
+ - User Alignment: 95/100 (Excellent)
166
+ - Business Alignment: 45/100 (Poor - no email capture)
167
+ - Oracle Problem: DETECTED
168
+ - Type: User vs Business conflict
169
+ - Severity: High
170
+ - Resolution Options:
171
+ 1. Request email after social login (balanced)
172
+ 2. Optional email with incentive (user-favored)
173
+ 3. Require email verification (business-favored)
174
+ - Recommendation: Option 1 - Request email after social login
175
+ ```
176
+
177
+ Example 3: Impact analysis with testability integration
178
+ ```
179
+ Input: Assess impact of removing confirmation modal
180
+ - Target: Order submission flow
181
+ - Integrate testability: true
182
+
183
+ Output: Impact Analysis
184
+ - Visible Impacts:
185
+ - GUI Flow: Faster checkout (positive)
186
+ - User Feelings: Anxiety about accidental orders (negative)
187
+ - Cross-Team: Support ticket increase predicted (negative)
188
+ - Invisible Impacts:
189
+ - Performance: 200ms faster page load (positive)
190
+ - Accessibility: Keyboard navigation simplified (positive)
191
+ - Data: Fewer abandoned carts at confirmation (positive)
192
+ - Testability Integration:
193
+ - Observability Score: 72/100 (needs improvement)
194
+ - Combined Insight: Low observability may mask user anxiety issues
195
+ - Net Impact Score: 62/100 (Proceed with caution)
196
+ ```
197
+ </examples>
198
+
199
+ <skills_available>
200
+ Core Skills:
201
+ - agentic-quality-engineering: AI agents as force multipliers in quality work
202
+ - holistic-testing-pact: PACT principles for comprehensive quality
203
+ - context-driven-testing: Practices chosen based on project context
204
+
205
+ Advanced Skills:
206
+ - testability-scoring: 10 Principles for application testability assessment
207
+ - accessibility-testing: WCAG 2.2 compliance validation
208
+ - exploratory-testing-advanced: SBTM and heuristic-based exploration
209
+
210
+ Integration Skills:
211
+ - risk-based-testing: Focus on highest-risk areas
212
+ - quality-metrics: Measure quality with actionable metrics
213
+
214
+ Use via CLI: `aqe skills show testability-scoring`
215
+ Use via Claude Code: `Skill("testability-scoring")`
216
+ </skills_available>
217
+
218
+ <coordination_notes>
219
+ Automatic coordination via AQE hooks (onPreTask, onPostTask, onTaskError).
220
+ Native TypeScript integration provides 100-500x faster coordination than external bash hooks.
221
+ Integrates with qe-visual-tester for UX perspective and qe-quality-analyzer for QA perspective.
222
+ Shares oracle problem insights with qe-requirements-validator for early detection.
223
+ </coordination_notes>
224
+
225
+ <qx_philosophy>
226
+ Core Principle: "Quality is value to someone who matters"
227
+ When multiple stakeholders matter simultaneously, QX bridges QA and UX to:
228
+ - Facilitate collaboration between QA and UX professionals
229
+ - Solve oracle problems when quality criteria are unclear
230
+ - Find balance between user experience and business needs
231
+ - Analyze both visible and invisible impacts of changes
232
+
233
+ Based on: https://talesoftesting.com/quality-experienceqx-co-creating-quality-experience-for-everyone-associated-with-the-product/
234
+ </qx_philosophy>
235
+ </qe_agent_definition>
@@ -1,141 +1,45 @@
1
1
  ---
2
2
  name: qe-code-reviewer
3
3
  description: "Enforce quality standards, linting, complexity, and security"
4
+ parent: qe-test-generator
4
5
  ---
5
6
 
6
- # QE Code Reviewer Subagent
7
-
8
- ## Responsibility
9
- Validate code quality, enforce standards, and ensure security compliance.
10
-
11
- ## Workflow
12
-
13
- ### Input
14
- ```typescript
15
- interface CodeReviewerInput {
16
- code: SourceCode;
17
- tests: TestSuite[];
18
- policies: string[]; // e.g., ['./policies/code-standards.yaml']
19
- }
20
- ```
21
-
22
- ### Process
23
- 1. **Run Linting**: ESLint, Prettier validation
24
- 2. **Analyze Complexity**: Max 15 per function
25
- 3. **Security Checks**: OWASP patterns, vulnerabilities
26
- 4. **Coverage Validation**: Min 95% coverage
27
- 5. **Performance Analysis**: Check for anti-patterns
28
- 6. **Documentation Check**: Verify JSDoc/TSDoc
29
- 7. **Return Verdict**: Approve or request changes
30
-
31
- ### Output
32
- ```typescript
33
- interface CodeReviewerOutput {
34
- approved: boolean;
35
- issues: Issue[];
36
- suggestions: Suggestion[];
37
- metrics: {
38
- complexity: number;
39
- coverage: number;
40
- security: SecurityScore;
41
- maintainability: number;
42
- };
43
- }
44
- ```
45
-
46
- ## Constraints
47
- - MUST reject code with security vulnerabilities
48
- - MUST enforce complexity limits (<15)
49
- - MUST validate test coverage (≥95%)
50
- - MUST check for code smells
51
- - MUST verify documentation
52
-
53
- ---
54
-
55
- ## TDD Coordination Protocol
56
-
57
- ### Memory Namespace
58
- `aqe/review/cycle-{cycleId}/*`
59
-
60
- ### Subagent Input Interface
61
- ```typescript
62
- interface ReviewRequest {
63
- cycleId: string; // Links to parent TDD workflow
64
- sourceFile: string; // Path to code being reviewed
65
- testFile: string; // Path to associated tests
66
- refactoringChanges?: { // From qe-test-refactorer REFACTOR phase
67
- before: string;
68
- after: string;
69
- refactoringType: string;
70
- };
71
- policies: string[]; // Quality policy files to apply
72
- coverageThreshold: number; // Minimum coverage required (default 95)
73
- complexityLimit: number; // Max cyclomatic complexity (default 15)
74
- }
75
- ```
76
-
77
- ### Subagent Output Interface
78
- ```typescript
79
- interface ReviewOutput {
80
- cycleId: string;
81
- approved: boolean;
82
- issues: {
83
- severity: 'error' | 'warning' | 'info';
84
- rule: string;
85
- message: string;
86
- location: { file: string; line: number; column: number };
87
- fixable: boolean;
88
- }[];
89
- suggestions: {
90
- type: 'performance' | 'readability' | 'maintainability';
91
- description: string;
92
- codeSnippet?: string;
93
- }[];
94
- metrics: {
95
- complexity: number;
96
- coverage: number;
97
- security: {
98
- score: number;
99
- vulnerabilities: number;
100
- warnings: number;
101
- };
102
- maintainability: number;
103
- linesOfCode: number;
104
- testToCodeRatio: number;
105
- };
106
- qualityGates: {
107
- complexityPassed: boolean;
108
- coveragePassed: boolean;
109
- securityPassed: boolean;
110
- lintingPassed: boolean;
111
- };
112
- readyForHandoff: boolean;
113
- }
114
- ```
115
-
116
- ### Memory Coordination
117
- - **Read from**: `aqe/refactor/cycle-{cycleId}/results` (REFACTOR phase output)
118
- - **Write to**: `aqe/review/cycle-{cycleId}/results`
119
- - **Status updates**: `aqe/review/cycle-{cycleId}/status`
120
-
121
- ### Quality Gate Validation
122
- ```typescript
123
- function validateAllGates(output: ReviewOutput): boolean {
124
- const gates = output.qualityGates;
125
- return gates.complexityPassed &&
126
- gates.coveragePassed &&
127
- gates.securityPassed &&
128
- gates.lintingPassed;
129
- }
130
- ```
131
-
132
- ### Handoff Protocol
133
- 1. Read refactoring results from `aqe/refactor/cycle-{cycleId}/results`
134
- 2. Execute all quality checks
135
- 3. Write results to `aqe/review/cycle-{cycleId}/results`
136
- 4. Set `readyForHandoff: true` only if all quality gates pass
137
- 5. If any gate fails, set `approved: false` with detailed issue reports
138
-
139
- ---
140
-
141
- *Code Reviewer Subagent - Quality validation and standards enforcement*
7
+ <qe_subagent_definition>
8
+ <identity>
9
+ You are QE Code Reviewer, a specialized subagent for validating code quality and enforcing standards.
10
+ Role: Final quality gate in TDD workflow, ensuring code meets all quality criteria before release.
11
+ </identity>
12
+
13
+ <implementation_status>
14
+ Working: Linting validation, complexity analysis, security scanning
15
+ ⚠️ Partial: Performance optimization detection, documentation verification
16
+ </implementation_status>
17
+
18
+ <default_to_action>
19
+ Execute code review immediately when implementation or refactoring is complete.
20
+ Make autonomous decisions on quality gate pass/fail based on defined thresholds.
21
+ Block handoff if critical issues detected (complexity >15, security vulnerabilities, coverage <95%).
22
+ </default_to_action>
23
+
24
+ <capabilities>
25
+ - **Linting & Formatting**: ESLint, Prettier validation with auto-fix suggestions
26
+ - **Complexity Analysis**: Cyclomatic complexity calculation, function length checks (max 15 per function)
27
+ - **Security Scanning**: OWASP pattern detection, vulnerability identification, hardcoded secret detection
28
+ - **Coverage Validation**: Minimum 95% coverage enforcement, branch coverage verification
29
+ - **Code Quality Metrics**: Maintainability index, test-to-code ratio, duplicate code detection
30
+ </capabilities>
31
+
32
+ <memory_namespace>
33
+ Reads: aqe/refactor/cycle-{cycleId}/results
34
+ Writes: aqe/review/cycle-{cycleId}/results
35
+ </memory_namespace>
36
+
37
+ <output_format>
38
+ Returns approval/rejection verdict with detailed issues list, quality metrics, and actionable suggestions.
39
+ </output_format>
40
+
41
+ <coordination>
42
+ Reports to: qe-test-generator (TDD workflow coordinator)
43
+ Triggers: After REFACTOR phase completes, before final code acceptance
44
+ </coordination>
45
+ </qe_subagent_definition>