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,71 @@
1
+ # Testability Scoring Skill
2
+
3
+ Quick reference for AI-powered testability assessment using 10 principles of intrinsic testability.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Run assessment
9
+ .claude/skills/testability-scoring/scripts/run-assessment.sh https://example.com/
10
+
11
+ # Generate HTML report from JSON
12
+ AUTO_OPEN=false node .claude/skills/testability-scoring/scripts/generate-html-report.js tests/reports/testability-results-*.json
13
+ ```
14
+
15
+ ## 10 Principles
16
+
17
+ 1. **Observability** (15%) - Can we see what's happening?
18
+ 2. **Controllability** (15%) - Can we control the application?
19
+ 3. **Algorithmic Simplicity** (10%) - Are behaviors simple?
20
+ 4. **Algorithmic Transparency** (10%) - Can we understand it?
21
+ 5. **Algorithmic Stability** (10%) - Does it stay consistent?
22
+ 6. **Explainability** (10%) - Is the interface clear?
23
+ 7. **Unbugginess** (10%) - How error-free is it?
24
+ 8. **Smallness** (10%) - Are components appropriate size?
25
+ 9. **Decomposability** (5%) - Can we test parts separately?
26
+ 10. **Similarity** (5%) - How familiar is the tech?
27
+
28
+ ## Scoring
29
+
30
+ - **90-100 (A)**: Excellent
31
+ - **80-89 (B)**: Good
32
+ - **70-79 (C)**: Adequate
33
+ - **60-69 (D)**: Below average
34
+ - **0-59 (F)**: Poor
35
+
36
+ ## Files
37
+
38
+ ```
39
+ .claude/skills/testability-scoring/
40
+ ├── SKILL.md # Complete documentation
41
+ ├── scripts/
42
+ │ ├── run-assessment.sh # Main runner
43
+ │ └── generate-html-report.js # Report generator
44
+ └── resources/templates/ # Templates
45
+
46
+ tests/testability-scoring/
47
+ ├── testability-scoring.spec.js # Test implementation
48
+ └── config.js # Configuration
49
+
50
+ tests/reports/
51
+ ├── testability-results-*.json # Results
52
+ └── testability-report-*.html # Reports
53
+ ```
54
+
55
+ ## Common Commands
56
+
57
+ ```bash
58
+ # Disable auto-open
59
+ AUTO_OPEN=false ./scripts/run-assessment.sh https://example.com/
60
+
61
+ # With timeout
62
+ timeout 180 ./scripts/run-assessment.sh https://example.com/
63
+
64
+ # Specific browser
65
+ ./scripts/run-assessment.sh https://example.com/ firefox
66
+ ```
67
+
68
+ ## Credits
69
+
70
+ Based on James Bach and Michael Bolton's *Heuristics for Software Testability*
71
+ Implementation: https://github.com/fndlalit/testability-scorer
@@ -0,0 +1,611 @@
1
+ ---
2
+ name: "Testability Scoring"
3
+ description: "AI-powered testability assessment using 10 principles of intrinsic testability with Playwright. Evaluates web applications against Observability, Controllability, Algorithmic Simplicity, Algorithmic Transparency, Algorithmic Stability, Explainability, Unbugginess, Smallness, Decomposability, and Similarity. Use when assessing software testability, evaluating test readiness, identifying testability improvements, or generating testability reports for web applications."
4
+ ---
5
+
6
+ # Testability Scoring
7
+
8
+ ## What This Skill Does
9
+
10
+ Performs comprehensive AI-powered testability assessments of web applications using Playwright and the 10 Principles of Intrinsic Testability framework developed by James Bach and Michael Bolton. Generates detailed scoring reports with visual charts, metrics breakdowns, and actionable AI-driven recommendations for improving testability.
11
+
12
+ ### Core Capabilities
13
+
14
+ - **10-Principle Analysis**: Complete assessment across all intrinsic testability dimensions
15
+ - **Quantitative Scoring**: 0-100 scale with letter grades (A-F) for each principle
16
+ - **AI-Enhanced Insights**: Intelligent recommendations powered by advanced analysis
17
+ - **Interactive HTML Reports**: Beautiful visual reports with Chart.js radar visualizations
18
+ - **Multi-User Comparison**: Side-by-side testability analysis across user types
19
+ - **Historical Tracking**: Progress measurement and improvement validation
20
+ - **Automated Analysis**: Hands-free assessment with error-resilient execution
21
+
22
+ ## The 10 Principles of Intrinsic Testability
23
+
24
+ ### 1. **Observability** (15% weight)
25
+ Can we see what's happening in the system?
26
+ - State visibility and capture
27
+ - Event logging and monitoring
28
+ - Network request tracking
29
+ - Error visibility
30
+ - Visual state inspection
31
+
32
+ ### 2. **Controllability** (15% weight)
33
+ Can we control the application precisely?
34
+ - Direct input control
35
+ - State manipulation
36
+ - API accessibility
37
+ - Test data injection
38
+ - Deterministic behavior
39
+
40
+ ### 3. **Algorithmic Simplicity** (10% weight)
41
+ Are behaviors simple and predictable?
42
+ - Clear input-output relationships
43
+ - Operation complexity
44
+ - Interaction patterns
45
+ - Behavior predictability
46
+
47
+ ### 4. **Algorithmic Transparency** (10% weight)
48
+ Can we understand what the system does?
49
+ - Behavior visibility
50
+ - Process understanding
51
+ - Black box reduction
52
+ - Code readability indicators
53
+
54
+ ### 5. **Algorithmic Stability** (10% weight)
55
+ Does behavior remain consistent?
56
+ - Change resilience
57
+ - Test maintainability
58
+ - Behavior consistency
59
+ - Version stability
60
+
61
+ ### 6. **Explainability** (10% weight)
62
+ Can users and developers understand the interface?
63
+ - Documentation quality
64
+ - Code clarity
65
+ - Semantic structure
66
+ - Help text and guidance
67
+ - Error message clarity
68
+
69
+ ### 7. **Unbugginess** (10% weight)
70
+ How error-free is the application?
71
+ - Console error tracking
72
+ - Page error monitoring
73
+ - Warning analysis
74
+ - Runtime stability
75
+
76
+ ### 8. **Smallness** (10% weight)
77
+ Are components appropriately sized?
78
+ - Page complexity
79
+ - Element count
80
+ - Script/style bloat
81
+ - Component granularity
82
+
83
+ ### 9. **Decomposability** (5% weight)
84
+ Can we test parts in isolation?
85
+ - Component separation
86
+ - Isolated testing capability
87
+ - Modular design
88
+ - Feature independence
89
+
90
+ ### 10. **Similarity** (5% weight)
91
+ How familiar is the technology stack?
92
+ - Standard frameworks
93
+ - Common patterns
94
+ - Known platforms
95
+ - Familiar conventions
96
+
97
+ ## Quick Start
98
+
99
+ ### Method 1: Shell Script (Recommended)
100
+ ```bash
101
+ # Run assessment on any URL (runtime override)
102
+ TEST_URL='https://example.com/' npx playwright test tests/testability-scoring/testability-scoring.spec.js --project=chromium --workers=1
103
+
104
+ # Or use the shell script wrapper
105
+ .claude/skills/testability-scoring/scripts/run-assessment.sh https://example.com/
106
+
107
+ # With specific browser
108
+ .claude/skills/testability-scoring/scripts/run-assessment.sh https://example.com/ firefox
109
+ ```
110
+
111
+ ### Method 2: Update Config File (Persistent)
112
+ ```bash
113
+ # Update config for repeated runs
114
+ echo 'module.exports = { baseURL: "https://example.com/", ... };' > tests/testability-scoring/config.js
115
+
116
+ # Run assessment
117
+ npx playwright test tests/testability-scoring/testability-scoring.spec.js --project=chromium --workers=1
118
+ ```
119
+
120
+ ### Method 3: Generate HTML Report Only
121
+ ```bash
122
+ # From existing JSON results
123
+ AUTO_OPEN=false node .claude/skills/testability-scoring/scripts/generate-html-report.js tests/reports/testability-results-*.json
124
+ ```
125
+
126
+ ## Complete Usage Guide
127
+
128
+ ### Assessment Workflow
129
+
130
+ 1. **Run Assessment**: Execute tests against target URL
131
+ 2. **JSON Generation**: Automated results saved to `tests/reports/`
132
+ 3. **HTML Report**: Interactive report with charts automatically generated
133
+ 4. **Browser Opening**: Report opens automatically (configurable)
134
+ 5. **Analysis**: Review scores, charts, and recommendations
135
+
136
+ ### Configuration
137
+
138
+ #### Runtime URL Override (Recommended)
139
+ Use the `TEST_URL` environment variable for one-time assessments:
140
+ ```bash
141
+ TEST_URL='https://example.com/' npx playwright test tests/testability-scoring/testability-scoring.spec.js --project=chromium --workers=1
142
+ ```
143
+
144
+ #### Config File Location
145
+ `tests/testability-scoring/config.js`
146
+
147
+ ```javascript
148
+ module.exports = {
149
+ // Runtime URL override via TEST_URL environment variable
150
+ baseURL: process.env.TEST_URL || 'https://your-application.com/',
151
+ timeout: 60000, // 60 second timeout
152
+ networkTimeout: 15000 // 15 second network idle timeout
153
+ };
154
+ ```
155
+
156
+ #### Playwright Configuration
157
+ Located in `playwright.config.js`:
158
+ - Timeout: 60s per test
159
+ - Workers: 1 (serial execution)
160
+ - Launch args: `--no-sandbox`, `--disable-dev-shm-usage`
161
+ - Viewport: 1280x720
162
+ - ignoreHTTPSErrors: true
163
+
164
+ ### Environment Variables
165
+
166
+ ```bash
167
+ # Disable automatic browser opening
168
+ AUTO_OPEN=false .claude/skills/testability-scoring/scripts/run-assessment.sh https://example.com/
169
+
170
+ # With custom timeout
171
+ timeout 180 .claude/skills/testability-scoring/scripts/run-assessment.sh https://example.com/
172
+ ```
173
+
174
+ ## Assessment Script Architecture
175
+
176
+ ### Error Handling Strategy
177
+
178
+ The assessment script uses **progressive fallback** strategy:
179
+
180
+ ```javascript
181
+ // Navigation with multi-level fallback
182
+ async function navigateToPage(page) {
183
+ try {
184
+ // Level 1: domcontentloaded
185
+ await page.goto(baseURL, {
186
+ waitUntil: 'domcontentloaded',
187
+ timeout: 45000
188
+ });
189
+
190
+ // Level 2: networkidle with timeout
191
+ await page.waitForLoadState('networkidle', {
192
+ timeout: 15000
193
+ }).catch(() => console.log('[NAV] Continuing without networkidle'));
194
+
195
+ return true;
196
+ } catch (error) {
197
+ // Level 3: commit fallback
198
+ await page.goto(baseURL, {
199
+ waitUntil: 'commit',
200
+ timeout: 45000
201
+ });
202
+ return true;
203
+ }
204
+ }
205
+ ```
206
+
207
+ ### Default Scoring
208
+
209
+ All principles initialized with default scores (50/F) before testing:
210
+ ```javascript
211
+ function initializeDefaultScores() {
212
+ testabilityScores.principles = {
213
+ observability: { score: 50, grade: 'F', weight: 15 },
214
+ controllability: { score: 50, grade: 'F', weight: 15 },
215
+ algorithmicSimplicity: { score: 50, grade: 'F', weight: 10 },
216
+ algorithmicTransparency: { score: 50, grade: 'F', weight: 10 },
217
+ algorithmicStability: { score: 50, grade: 'F', weight: 10 },
218
+ explainability: { score: 50, grade: 'F', weight: 10 },
219
+ unbugginess: { score: 50, grade: 'F', weight: 10 },
220
+ smallness: { score: 50, grade: 'F', weight: 10 },
221
+ decomposability: { score: 50, grade: 'F', weight: 5 },
222
+ similarity: { score: 50, grade: 'F', weight: 5 }
223
+ };
224
+ }
225
+ ```
226
+
227
+ ### Test Execution Pattern
228
+
229
+ Each principle test follows this pattern:
230
+ ```javascript
231
+ test('1. Observability Assessment', async ({ page }) => {
232
+ try {
233
+ const loaded = await navigateToPage(page);
234
+ if (!loaded) throw new Error('Failed to load page');
235
+
236
+ // Principle-specific analysis
237
+ let score = 0;
238
+ // ... scoring logic ...
239
+
240
+ testabilityScores.principles.observability = {
241
+ score: Math.min(score, 100),
242
+ grade: getLetterGrade(score),
243
+ weight: config.weights.observability
244
+ };
245
+
246
+ // Generate recommendations if score is low
247
+ if (score < 70) {
248
+ testabilityScores.recommendations.push({
249
+ principle: 'Observability',
250
+ severity: 'medium',
251
+ recommendation: 'Implement detailed event logging...',
252
+ impact: 15,
253
+ effort: 'Low (4-6 hours)'
254
+ });
255
+ }
256
+ } catch (error) {
257
+ console.error('Observability assessment failed:', error.message);
258
+ // Fallback to default score
259
+ testabilityScores.principles.observability = {
260
+ score: 50,
261
+ grade: 'F',
262
+ weight: config.weights.observability
263
+ };
264
+ }
265
+ });
266
+ ```
267
+
268
+ ## HTML Report Features
269
+
270
+ ### Interactive Elements
271
+
272
+ - **Radar Chart**: Visual representation of all 10 principles
273
+ - **Score Cards**: Color-coded principle scores with grades
274
+ - **Detailed Breakdowns**: Expandable sections for each principle
275
+ - **Recommendations**: Prioritized improvement suggestions
276
+ - **Metadata**: URL, browser, version, duration, timestamp
277
+
278
+ ### Chart.js Integration
279
+
280
+ Reports use Chart.js for beautiful visualizations:
281
+ ```javascript
282
+ new Chart(ctx, {
283
+ type: 'radar',
284
+ data: {
285
+ labels: [
286
+ 'Observability', 'Controllability', 'Simplicity',
287
+ 'Transparency', 'Explainability', 'Similarity',
288
+ 'Stability', 'Unbugginess', 'Smallness', 'Decomposability'
289
+ ],
290
+ datasets: [{
291
+ label: 'Testability Scores',
292
+ data: [92, 20, 75, 60, 75, 85, 70, 85, 95, 70],
293
+ backgroundColor: 'rgba(74, 144, 226, 0.2)',
294
+ borderColor: 'rgba(74, 144, 226, 1)',
295
+ pointBackgroundColor: 'rgba(74, 144, 226, 1)'
296
+ }]
297
+ }
298
+ });
299
+ ```
300
+
301
+ ### Report Sections
302
+
303
+ 1. **Executive Summary**: Overall score, grade, and quick stats
304
+ 2. **Principle Scores**: Detailed breakdown with grades
305
+ 3. **Visual Analysis**: Radar chart and score distribution
306
+ 4. **Recommendations**: Actionable improvements prioritized by impact
307
+ 5. **Metadata**: Assessment details and context
308
+
309
+ ## Scoring Methodology
310
+
311
+ ### Grade Scale
312
+ - **90-100 (A)**: Excellent testability
313
+ - **80-89 (B)**: Good testability
314
+ - **70-79 (C)**: Adequate testability
315
+ - **60-69 (D)**: Below average testability
316
+ - **0-59 (F)**: Poor testability
317
+
318
+ ### Weighted Calculation
319
+
320
+ Overall score uses weighted average:
321
+ ```javascript
322
+ function calculateOverallScore(principles) {
323
+ let totalWeightedScore = 0;
324
+ let totalWeight = 0;
325
+
326
+ for (const [principle, data] of Object.entries(principles)) {
327
+ totalWeightedScore += data.score * data.weight;
328
+ totalWeight += data.weight;
329
+ }
330
+
331
+ return Math.round(totalWeightedScore / totalWeight);
332
+ }
333
+ ```
334
+
335
+ ### Letter Grade Assignment
336
+ ```javascript
337
+ function getLetterGrade(score) {
338
+ if (score >= 90) return 'A';
339
+ if (score >= 80) return 'B';
340
+ if (score >= 70) return 'C';
341
+ if (score >= 60) return 'D';
342
+ return 'F';
343
+ }
344
+ ```
345
+
346
+ ## File Structure
347
+
348
+ ```
349
+ .claude/skills/testability-scoring/
350
+ ├── SKILL.md # This file
351
+ ├── README.md # Quick reference
352
+ ├── scripts/
353
+ │ ├── run-assessment.sh # Main assessment runner
354
+ │ └── generate-html-report.js # HTML report generator
355
+ ├── resources/
356
+ │ └── templates/
357
+ │ └── config.template.js # Config file template
358
+ ├── examples/
359
+ │ ├── sample-assessment.json # Example JSON output
360
+ │ └── sample-report.html # Example HTML report
361
+ └── docs/
362
+ ├── ARCHITECTURE.md # System architecture
363
+ ├── SCORING-METHODOLOGY.md # Detailed scoring guide
364
+ └── TROUBLESHOOTING.md # Common issues and fixes
365
+
366
+ tests/testability-scoring/
367
+ ├── testability-scoring.spec.js # Main test file
368
+ ├── config.js # Runtime configuration
369
+ └── playwright.config.js # (optional) Test-specific config
370
+
371
+ tests/reports/
372
+ ├── testability-results-<timestamp>.json # JSON results
373
+ ├── testability-report-<timestamp>.html # HTML reports
374
+ └── latest.json # Symlink to latest results
375
+ ```
376
+
377
+ ## Example Assessments
378
+
379
+ ### Example 1: High Testability Site
380
+ ```bash
381
+ $ .claude/skills/testability-scoring/scripts/run-assessment.sh https://talesoftesting.com/
382
+
383
+ Results:
384
+ Overall Score: 71/100 (C)
385
+ - Observability: 92 (A) ⭐
386
+ - Controllability: 20 (F) ⚠️
387
+ - Algorithmic Simplicity: 75 (C)
388
+ - Algorithmic Transparency: 60 (D)
389
+ - Explainability: 75 (C)
390
+ - Similarity: 85 (B)
391
+ - Algorithmic Stability: 70 (C)
392
+ - Unbugginess: 85 (B)
393
+ - Smallness: 95 (A) ⭐
394
+ - Decomposability: 70 (C)
395
+ ```
396
+
397
+ ### Example 2: E-Commerce Site
398
+ ```bash
399
+ $ .claude/skills/testability-scoring/scripts/run-assessment.sh https://www.saucedemo.com/
400
+
401
+ Results:
402
+ Overall Score: 69/100 (D)
403
+ - Observability: 92 (A) ⭐
404
+ - Controllability: 20 (F) ⚠️ Critical Issue
405
+ - Smallness: 100 (A) ⭐ Perfect
406
+ - Similarity: 85 (B)
407
+ - Unbugginess: 85 (B)
408
+ - Algorithmic Simplicity: 75 (C)
409
+ - Algorithmic Stability: 70 (C)
410
+ - Algorithmic Transparency: 60 (D)
411
+ - Explainability: 60 (D)
412
+ - Decomposability: 50 (F)
413
+ ```
414
+
415
+ ## Integration Examples
416
+
417
+ ### CI/CD Integration
418
+ ```yaml
419
+ # GitHub Actions
420
+ - name: Testability Assessment
421
+ run: |
422
+ timeout 180 .claude/skills/testability-scoring/scripts/run-assessment.sh ${{ env.APP_URL }}
423
+
424
+ - name: Upload Reports
425
+ uses: actions/upload-artifact@v3
426
+ with:
427
+ name: testability-reports
428
+ path: tests/reports/testability-*.html
429
+ ```
430
+
431
+ ### Programmatic Usage
432
+ ```javascript
433
+ const { spawn } = require('child_process');
434
+
435
+ function runTestabilityAssessment(url) {
436
+ return new Promise((resolve, reject) => {
437
+ const proc = spawn('.claude/skills/testability-scoring/scripts/run-assessment.sh', [url]);
438
+
439
+ let output = '';
440
+ proc.stdout.on('data', data => output += data);
441
+
442
+ proc.on('close', code => {
443
+ if (code === 0) {
444
+ resolve(output);
445
+ } else {
446
+ reject(new Error(`Assessment failed with code ${code}`));
447
+ }
448
+ });
449
+ });
450
+ }
451
+
452
+ // Usage
453
+ const results = await runTestabilityAssessment('https://example.com/');
454
+ console.log(results);
455
+ ```
456
+
457
+ ## Best Practices
458
+
459
+ ### 1. Baseline Establishment
460
+ - Run initial assessment to establish baseline
461
+ - Document scores before any changes
462
+ - Create historical comparison point
463
+
464
+ ### 2. Focus Areas
465
+ - Prioritize principles with lowest scores
466
+ - Address "F" grades first (scores < 60)
467
+ - Target quick wins (low effort, high impact)
468
+
469
+ ### 3. Iterative Improvement
470
+ - Make targeted changes
471
+ - Re-run assessment to validate
472
+ - Track progress over time
473
+
474
+ ### 4. Continuous Monitoring
475
+ - Integrate into CI/CD pipeline
476
+ - Set minimum score thresholds
477
+ - Alert on score degradation
478
+
479
+ ### 5. Multi-User Testing
480
+ - Test with different user personas
481
+ - Compare accessibility across roles
482
+ - Identify role-specific issues
483
+
484
+ ## Troubleshooting
485
+
486
+ ### Common Issues
487
+
488
+ #### Tests Timing Out
489
+ ```bash
490
+ # Increase timeout
491
+ timeout 300 .claude/skills/testability-scoring/scripts/run-assessment.sh https://slow-site.com/
492
+ ```
493
+
494
+ #### Partial Results (Not All 10 Principles)
495
+ - Check for JavaScript errors in console
496
+ - Verify network connectivity
497
+ - Increase timeouts in playwright.config.js
498
+ - Review navigation fallback strategy
499
+
500
+ #### HTML Report Not Opening
501
+ ```bash
502
+ # Disable auto-open and open manually
503
+ AUTO_OPEN=false .claude/skills/testability-scoring/scripts/run-assessment.sh https://example.com/
504
+
505
+ # Then open manually
506
+ open tests/reports/testability-report-<timestamp>.html
507
+ ```
508
+
509
+ #### Config Not Updating
510
+ ```bash
511
+ # Manually update config
512
+ echo 'module.exports = { baseURL: "https://example.com/" };' > tests/testability-scoring/config.js
513
+
514
+ # Run direct playwright
515
+ npx playwright test tests/testability-scoring/testability-scoring.spec.js --project=chromium --workers=1
516
+ ```
517
+
518
+ ## Advanced Features
519
+
520
+ ### Custom Scoring Weights
521
+
522
+ Modify weights in test spec file:
523
+ ```javascript
524
+ const config = {
525
+ weights: {
526
+ observability: 20, // Increased importance
527
+ controllability: 20, // Increased importance
528
+ algorithmicSimplicity: 10,
529
+ algorithmicTransparency: 5, // Decreased importance
530
+ algorithmicStability: 5,
531
+ explainability: 10,
532
+ unbugginess: 10,
533
+ smallness: 10,
534
+ decomposability: 5,
535
+ similarity: 5
536
+ }
537
+ };
538
+ ```
539
+
540
+ ### Custom Recommendations
541
+
542
+ Add domain-specific recommendations:
543
+ ```javascript
544
+ if (score < 70) {
545
+ testabilityScores.recommendations.push({
546
+ principle: 'Observability',
547
+ severity: 'critical',
548
+ recommendation: 'Implement centralized logging with Datadog',
549
+ impact: 25,
550
+ effort: 'Medium (1-2 days)',
551
+ priority: 'P0'
552
+ });
553
+ }
554
+ ```
555
+
556
+ ### Multi-Browser Comparison
557
+ ```bash
558
+ # Run on all browsers
559
+ for browser in chromium firefox webkit; do
560
+ .claude/skills/testability-scoring/scripts/run-assessment.sh https://example.com/ $browser
561
+ done
562
+ ```
563
+
564
+ ## Performance Considerations
565
+
566
+ - **Serial Execution**: Tests run with `--workers=1` for consistent results
567
+ - **Timeout Strategy**: Progressive fallback (domcontentloaded → commit)
568
+ - **Network Handling**: 15s networkidle with graceful continuation
569
+ - **Error Resilience**: Default scores prevent incomplete reports
570
+ - **Memory Management**: Single worker prevents memory exhaustion
571
+
572
+ ## Limitations
573
+
574
+ - **Client-Side Only**: Assesses UI/frontend, not backend APIs directly
575
+ - **Snapshot Assessment**: Point-in-time analysis, not continuous monitoring
576
+ - **Heuristic-Based**: Scores are estimates based on observable patterns
577
+ - **Browser-Dependent**: Results may vary slightly across browsers
578
+ - **Static Analysis**: Cannot assess dynamic runtime behaviors fully
579
+
580
+ ## Credits & References
581
+
582
+ ### Framework Origin
583
+ - **Heuristics for Software Testability** by James Bach and Michael Bolton
584
+ - Available at: https://www.satisfice.com/download/heuristics-of-software-testability
585
+
586
+ ### Implementation
587
+ - Based on https://github.com/fndlalit/testability-scorer
588
+ - Playwright v1.49.0+ with AI capabilities
589
+ - Chart.js for visualizations
590
+
591
+ ### Inspiration
592
+ - Conference workshop material by Lalit Kumar
593
+ - Interactive demonstrations for teaching testability concepts
594
+
595
+ ## Support
596
+
597
+ ### Documentation
598
+ - Full architecture: `docs/ARCHITECTURE.md`
599
+ - Scoring details: `docs/SCORING-METHODOLOGY.md`
600
+ - Troubleshooting: `docs/TROUBLESHOOTING.md`
601
+
602
+ ### Resources
603
+ - [Playwright Documentation](https://playwright.dev/)
604
+ - [Intrinsic Testability Heuristics](https://www.satisfice.com/download/heuristics-of-software-testability)
605
+ - [Original Repository](https://github.com/fndlalit/testability-scorer)
606
+
607
+ ---
608
+
609
+ **Version**: 1.0.0
610
+ **Last Updated**: December 2025
611
+ **Compatibility**: Claude Code 2.0+, Playwright 1.49.0+