agentic-qe 3.3.3 → 3.3.5

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 (553) hide show
  1. package/.claude/agents/v3/README.md +100 -0
  2. package/.claude/agents/v3/qe-accessibility-auditor.md +112 -11
  3. package/.claude/agents/v3/qe-bdd-generator.md +40 -0
  4. package/.claude/agents/v3/qe-coverage-specialist.md +39 -0
  5. package/.claude/agents/v3/qe-defect-predictor.md +36 -0
  6. package/.claude/agents/v3/qe-gap-detector.md +39 -0
  7. package/.claude/agents/v3/qe-pattern-learner.md +31 -0
  8. package/.claude/agents/v3/qe-product-factors-assessor.md +34 -0
  9. package/.claude/agents/v3/qe-quality-criteria-recommender.md +32 -0
  10. package/.claude/agents/v3/qe-quality-gate.md +39 -0
  11. package/.claude/agents/v3/qe-queen-coordinator.md +332 -166
  12. package/.claude/agents/v3/qe-requirements-validator.md +37 -0
  13. package/.claude/agents/v3/qe-risk-assessor.md +33 -0
  14. package/.claude/agents/v3/qe-tdd-specialist.md +33 -0
  15. package/.claude/agents/v3/qe-test-architect.md +36 -0
  16. package/.claude/helpers/statusline-v3.cjs +38 -42
  17. package/.claude/skills/README.md +30 -104
  18. package/.claude/skills/a11y-ally/SKILL.md +1658 -0
  19. package/.claude/skills/qcsd-ideation-swarm/SKILL.md +1750 -0
  20. package/.claude/skills/skills-manifest.json +78 -8
  21. package/README.md +18 -4
  22. package/package.json +1 -1
  23. package/scripts/cloud-db-config.json +10 -5
  24. package/scripts/demo-warmup.sh +45 -0
  25. package/scripts/fetch-content.js +460 -0
  26. package/scripts/merge-v3-to-root.sql +48 -0
  27. package/v3/CHANGELOG.md +166 -0
  28. package/v3/README.md +11 -6
  29. package/v3/assets/agents/v3/README.md +100 -0
  30. package/v3/assets/agents/v3/qe-accessibility-auditor.md +112 -11
  31. package/v3/assets/agents/v3/qe-bdd-generator.md +40 -0
  32. package/v3/assets/agents/v3/qe-coverage-specialist.md +39 -0
  33. package/v3/assets/agents/v3/qe-defect-predictor.md +36 -0
  34. package/v3/assets/agents/v3/qe-gap-detector.md +39 -0
  35. package/v3/assets/agents/v3/qe-pattern-learner.md +31 -0
  36. package/v3/assets/agents/v3/qe-product-factors-assessor.md +34 -0
  37. package/v3/assets/agents/v3/qe-quality-criteria-recommender.md +32 -0
  38. package/v3/assets/agents/v3/qe-quality-gate.md +39 -0
  39. package/v3/assets/agents/v3/qe-queen-coordinator.md +332 -166
  40. package/v3/assets/agents/v3/qe-requirements-validator.md +37 -0
  41. package/v3/assets/agents/v3/qe-risk-assessor.md +33 -0
  42. package/v3/assets/agents/v3/qe-tdd-specialist.md +33 -0
  43. package/v3/assets/agents/v3/qe-test-architect.md +36 -0
  44. package/v3/assets/hooks/cross-phase-memory.yaml +253 -0
  45. package/v3/assets/skills/a11y-ally/SKILL.md +1658 -0
  46. package/v3/assets/skills/qcsd-ideation-swarm/SKILL.md +1750 -0
  47. package/v3/assets/skills/skills-manifest.json +753 -0
  48. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts.map +1 -1
  49. package/v3/dist/adapters/claude-flow/model-router-bridge.js +6 -4
  50. package/v3/dist/adapters/claude-flow/model-router-bridge.js.map +1 -1
  51. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -1
  52. package/v3/dist/adapters/claude-flow/pretrain-bridge.js +13 -8
  53. package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -1
  54. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -1
  55. package/v3/dist/adapters/claude-flow/trajectory-bridge.js +9 -6
  56. package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -1
  57. package/v3/dist/benchmarks/performance-benchmarks.d.ts.map +1 -1
  58. package/v3/dist/benchmarks/performance-benchmarks.js +5 -3
  59. package/v3/dist/benchmarks/performance-benchmarks.js.map +1 -1
  60. package/v3/dist/cli/bundle.js +27646 -23204
  61. package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
  62. package/v3/dist/cli/commands/hooks.js +288 -0
  63. package/v3/dist/cli/commands/hooks.js.map +1 -1
  64. package/v3/dist/cli/commands/sync.d.ts.map +1 -1
  65. package/v3/dist/cli/commands/sync.js +0 -6
  66. package/v3/dist/cli/commands/sync.js.map +1 -1
  67. package/v3/dist/cli/handlers/init-handler.d.ts.map +1 -1
  68. package/v3/dist/cli/handlers/init-handler.js +11 -0
  69. package/v3/dist/cli/handlers/init-handler.js.map +1 -1
  70. package/v3/dist/cli/index.js +14 -2
  71. package/v3/dist/cli/index.js.map +1 -1
  72. package/v3/dist/cli/scheduler/persistent-scheduler.d.ts.map +1 -1
  73. package/v3/dist/cli/scheduler/persistent-scheduler.js +3 -2
  74. package/v3/dist/cli/scheduler/persistent-scheduler.js.map +1 -1
  75. package/v3/dist/cli/wizards/test-wizard.d.ts.map +1 -1
  76. package/v3/dist/cli/wizards/test-wizard.js +6 -4
  77. package/v3/dist/cli/wizards/test-wizard.js.map +1 -1
  78. package/v3/dist/coordination/consensus/providers/claude-provider.js +1 -1
  79. package/v3/dist/coordination/consensus/providers/gemini-provider.js +1 -1
  80. package/v3/dist/coordination/consensus/providers/native-learning-provider.d.ts.map +1 -1
  81. package/v3/dist/coordination/consensus/providers/native-learning-provider.js +10 -8
  82. package/v3/dist/coordination/consensus/providers/native-learning-provider.js.map +1 -1
  83. package/v3/dist/coordination/consensus/providers/ollama-provider.d.ts.map +1 -1
  84. package/v3/dist/coordination/consensus/providers/ollama-provider.js +5 -4
  85. package/v3/dist/coordination/consensus/providers/ollama-provider.js.map +1 -1
  86. package/v3/dist/coordination/consensus/providers/openai-provider.d.ts.map +1 -1
  87. package/v3/dist/coordination/consensus/providers/openai-provider.js +5 -4
  88. package/v3/dist/coordination/consensus/providers/openai-provider.js.map +1 -1
  89. package/v3/dist/coordination/constants.d.ts +198 -0
  90. package/v3/dist/coordination/constants.d.ts.map +1 -0
  91. package/v3/dist/coordination/constants.js +210 -0
  92. package/v3/dist/coordination/constants.js.map +1 -0
  93. package/v3/dist/coordination/mincut/dream-integration.d.ts.map +1 -1
  94. package/v3/dist/coordination/mincut/dream-integration.js +5 -1
  95. package/v3/dist/coordination/mincut/dream-integration.js.map +1 -1
  96. package/v3/dist/coordination/queen-coordinator.d.ts +9 -1
  97. package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
  98. package/v3/dist/coordination/queen-coordinator.js +49 -9
  99. package/v3/dist/coordination/queen-coordinator.js.map +1 -1
  100. package/v3/dist/coordination/task-executor.d.ts.map +1 -1
  101. package/v3/dist/coordination/task-executor.js +7 -8
  102. package/v3/dist/coordination/task-executor.js.map +1 -1
  103. package/v3/dist/coordination/workflow-orchestrator.d.ts.map +1 -1
  104. package/v3/dist/coordination/workflow-orchestrator.js +261 -0
  105. package/v3/dist/coordination/workflow-orchestrator.js.map +1 -1
  106. package/v3/dist/domains/chaos-resilience/plugin.d.ts +14 -3
  107. package/v3/dist/domains/chaos-resilience/plugin.d.ts.map +1 -1
  108. package/v3/dist/domains/chaos-resilience/plugin.js +96 -0
  109. package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
  110. package/v3/dist/domains/chaos-resilience/services/performance-profiler.d.ts.map +1 -1
  111. package/v3/dist/domains/chaos-resilience/services/performance-profiler.js +12 -8
  112. package/v3/dist/domains/chaos-resilience/services/performance-profiler.js.map +1 -1
  113. package/v3/dist/domains/code-intelligence/plugin.d.ts +13 -3
  114. package/v3/dist/domains/code-intelligence/plugin.d.ts.map +1 -1
  115. package/v3/dist/domains/code-intelligence/plugin.js +85 -0
  116. package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
  117. package/v3/dist/domains/code-intelligence/services/product-factors-bridge.d.ts.map +1 -1
  118. package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js +3 -2
  119. package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js.map +1 -1
  120. package/v3/dist/domains/constants.d.ts +481 -0
  121. package/v3/dist/domains/constants.d.ts.map +1 -0
  122. package/v3/dist/domains/constants.js +503 -0
  123. package/v3/dist/domains/constants.js.map +1 -0
  124. package/v3/dist/domains/contract-testing/plugin.d.ts +6 -1
  125. package/v3/dist/domains/contract-testing/plugin.d.ts.map +1 -1
  126. package/v3/dist/domains/contract-testing/plugin.js +80 -1
  127. package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
  128. package/v3/dist/domains/contract-testing/services/contract-validator.d.ts.map +1 -1
  129. package/v3/dist/domains/contract-testing/services/contract-validator.js +5 -4
  130. package/v3/dist/domains/contract-testing/services/contract-validator.js.map +1 -1
  131. package/v3/dist/domains/coverage-analysis/services/hnsw-index.d.ts.map +1 -1
  132. package/v3/dist/domains/coverage-analysis/services/hnsw-index.js +1 -0
  133. package/v3/dist/domains/coverage-analysis/services/hnsw-index.js.map +1 -1
  134. package/v3/dist/domains/defect-intelligence/coordinator.d.ts +2 -2
  135. package/v3/dist/domains/defect-intelligence/coordinator.d.ts.map +1 -1
  136. package/v3/dist/domains/defect-intelligence/coordinator.js.map +1 -1
  137. package/v3/dist/domains/defect-intelligence/plugin.d.ts +6 -1
  138. package/v3/dist/domains/defect-intelligence/plugin.d.ts.map +1 -1
  139. package/v3/dist/domains/defect-intelligence/plugin.js +101 -0
  140. package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
  141. package/v3/dist/domains/defect-intelligence/services/defect-predictor.d.ts.map +1 -1
  142. package/v3/dist/domains/defect-intelligence/services/defect-predictor.js +3 -2
  143. package/v3/dist/domains/defect-intelligence/services/defect-predictor.js.map +1 -1
  144. package/v3/dist/domains/domain-interface.d.ts.map +1 -1
  145. package/v3/dist/domains/domain-interface.js +24 -9
  146. package/v3/dist/domains/domain-interface.js.map +1 -1
  147. package/v3/dist/domains/learning-optimization/plugin.d.ts +2 -1
  148. package/v3/dist/domains/learning-optimization/plugin.d.ts.map +1 -1
  149. package/v3/dist/domains/learning-optimization/plugin.js +49 -0
  150. package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
  151. package/v3/dist/domains/quality-assessment/coordinator.d.ts +90 -1
  152. package/v3/dist/domains/quality-assessment/coordinator.d.ts.map +1 -1
  153. package/v3/dist/domains/quality-assessment/coordinator.js +310 -0
  154. package/v3/dist/domains/quality-assessment/coordinator.js.map +1 -1
  155. package/v3/dist/domains/requirements-validation/index.d.ts +1 -0
  156. package/v3/dist/domains/requirements-validation/index.d.ts.map +1 -1
  157. package/v3/dist/domains/requirements-validation/index.js +2 -0
  158. package/v3/dist/domains/requirements-validation/index.js.map +1 -1
  159. package/v3/dist/domains/requirements-validation/plugin.d.ts +13 -1
  160. package/v3/dist/domains/requirements-validation/plugin.d.ts.map +1 -1
  161. package/v3/dist/domains/requirements-validation/plugin.js +94 -0
  162. package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
  163. package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.d.ts +245 -0
  164. package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.d.ts.map +1 -0
  165. package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js +1143 -0
  166. package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js.map +1 -0
  167. package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.d.ts.map +1 -1
  168. package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js +3 -2
  169. package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js.map +1 -1
  170. package/v3/dist/domains/security-compliance/plugin.d.ts +3 -2
  171. package/v3/dist/domains/security-compliance/plugin.d.ts.map +1 -1
  172. package/v3/dist/domains/security-compliance/plugin.js +64 -0
  173. package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
  174. package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.d.ts +25 -0
  175. package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.d.ts.map +1 -0
  176. package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.js +160 -0
  177. package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.js.map +1 -0
  178. package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts +48 -0
  179. package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts.map +1 -0
  180. package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js +385 -0
  181. package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js.map +1 -0
  182. package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.d.ts +20 -0
  183. package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.d.ts.map +1 -0
  184. package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.js +99 -0
  185. package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.js.map +1 -0
  186. package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +62 -0
  187. package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts.map +1 -0
  188. package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js +329 -0
  189. package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js.map +1 -0
  190. package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts +46 -0
  191. package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts.map +1 -0
  192. package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js +180 -0
  193. package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js.map +1 -0
  194. package/v3/dist/domains/security-compliance/services/scanners/index.d.ts +14 -0
  195. package/v3/dist/domains/security-compliance/services/scanners/index.d.ts.map +1 -0
  196. package/v3/dist/domains/security-compliance/services/scanners/index.js +16 -0
  197. package/v3/dist/domains/security-compliance/services/scanners/index.js.map +1 -0
  198. package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts +92 -0
  199. package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts.map +1 -0
  200. package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js +440 -0
  201. package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js.map +1 -0
  202. package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts +78 -0
  203. package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts.map +1 -0
  204. package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js +179 -0
  205. package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js.map +1 -0
  206. package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +91 -0
  207. package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts.map +1 -0
  208. package/v3/dist/domains/security-compliance/services/scanners/scanner-types.js +15 -0
  209. package/v3/dist/domains/security-compliance/services/scanners/scanner-types.js.map +1 -0
  210. package/v3/dist/domains/security-compliance/services/scanners/security-patterns.d.ts +16 -0
  211. package/v3/dist/domains/security-compliance/services/scanners/security-patterns.d.ts.map +1 -0
  212. package/v3/dist/domains/security-compliance/services/scanners/security-patterns.js +507 -0
  213. package/v3/dist/domains/security-compliance/services/scanners/security-patterns.js.map +1 -0
  214. package/v3/dist/domains/security-compliance/services/security-auditor.d.ts.map +1 -1
  215. package/v3/dist/domains/security-compliance/services/security-auditor.js +2 -1
  216. package/v3/dist/domains/security-compliance/services/security-auditor.js.map +1 -1
  217. package/v3/dist/domains/security-compliance/services/security-scanner.d.ts +20 -213
  218. package/v3/dist/domains/security-compliance/services/security-scanner.d.ts.map +1 -1
  219. package/v3/dist/domains/security-compliance/services/security-scanner.js +37 -2013
  220. package/v3/dist/domains/security-compliance/services/security-scanner.js.map +1 -1
  221. package/v3/dist/domains/security-compliance/services/semgrep-integration.d.ts.map +1 -1
  222. package/v3/dist/domains/security-compliance/services/semgrep-integration.js +7 -6
  223. package/v3/dist/domains/security-compliance/services/semgrep-integration.js.map +1 -1
  224. package/v3/dist/domains/test-execution/services/auth-state-manager.d.ts.map +1 -1
  225. package/v3/dist/domains/test-execution/services/auth-state-manager.js +6 -4
  226. package/v3/dist/domains/test-execution/services/auth-state-manager.js.map +1 -1
  227. package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts +55 -0
  228. package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts.map +1 -0
  229. package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.js +407 -0
  230. package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.js.map +1 -0
  231. package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts +122 -0
  232. package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts.map +1 -0
  233. package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js +325 -0
  234. package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js.map +1 -0
  235. package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts +97 -0
  236. package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts.map +1 -0
  237. package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js +297 -0
  238. package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js.map +1 -0
  239. package/v3/dist/domains/test-execution/services/e2e/index.d.ts +22 -0
  240. package/v3/dist/domains/test-execution/services/e2e/index.d.ts.map +1 -0
  241. package/v3/dist/domains/test-execution/services/e2e/index.js +52 -0
  242. package/v3/dist/domains/test-execution/services/e2e/index.js.map +1 -0
  243. package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts +51 -0
  244. package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts.map +1 -0
  245. package/v3/dist/domains/test-execution/services/e2e/result-collector.js +133 -0
  246. package/v3/dist/domains/test-execution/services/e2e/result-collector.js.map +1 -0
  247. package/v3/dist/domains/test-execution/services/e2e/step-executors.d.ts +48 -0
  248. package/v3/dist/domains/test-execution/services/e2e/step-executors.d.ts.map +1 -0
  249. package/v3/dist/domains/test-execution/services/e2e/step-executors.js +422 -0
  250. package/v3/dist/domains/test-execution/services/e2e/step-executors.js.map +1 -0
  251. package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.d.ts +49 -0
  252. package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.d.ts.map +1 -0
  253. package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js +146 -0
  254. package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js.map +1 -0
  255. package/v3/dist/domains/test-execution/services/e2e/types.d.ts +138 -0
  256. package/v3/dist/domains/test-execution/services/e2e/types.d.ts.map +1 -0
  257. package/v3/dist/domains/test-execution/services/e2e/types.js +65 -0
  258. package/v3/dist/domains/test-execution/services/e2e/types.js.map +1 -0
  259. package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts +33 -0
  260. package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts.map +1 -0
  261. package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.js +114 -0
  262. package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.js.map +1 -0
  263. package/v3/dist/domains/test-execution/services/e2e-runner.d.ts +18 -392
  264. package/v3/dist/domains/test-execution/services/e2e-runner.d.ts.map +1 -1
  265. package/v3/dist/domains/test-execution/services/e2e-runner.js +25 -1757
  266. package/v3/dist/domains/test-execution/services/e2e-runner.js.map +1 -1
  267. package/v3/dist/domains/test-execution/services/flaky-detector.d.ts.map +1 -1
  268. package/v3/dist/domains/test-execution/services/flaky-detector.js +12 -9
  269. package/v3/dist/domains/test-execution/services/flaky-detector.js.map +1 -1
  270. package/v3/dist/domains/test-execution/services/retry-handler.d.ts.map +1 -1
  271. package/v3/dist/domains/test-execution/services/retry-handler.js +7 -5
  272. package/v3/dist/domains/test-execution/services/retry-handler.js.map +1 -1
  273. package/v3/dist/domains/test-execution/services/test-executor.d.ts.map +1 -1
  274. package/v3/dist/domains/test-execution/services/test-executor.js +4 -3
  275. package/v3/dist/domains/test-execution/services/test-executor.js.map +1 -1
  276. package/v3/dist/domains/visual-accessibility/coordinator.d.ts +70 -0
  277. package/v3/dist/domains/visual-accessibility/coordinator.d.ts.map +1 -1
  278. package/v3/dist/domains/visual-accessibility/coordinator.js +172 -0
  279. package/v3/dist/domains/visual-accessibility/coordinator.js.map +1 -1
  280. package/v3/dist/domains/visual-accessibility/plugin.d.ts +2 -1
  281. package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
  282. package/v3/dist/domains/visual-accessibility/plugin.js +63 -0
  283. package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
  284. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
  285. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +3 -2
  286. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
  287. package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.d.ts.map +1 -1
  288. package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js +22 -12
  289. package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js.map +1 -1
  290. package/v3/dist/domains/visual-accessibility/services/viewport-capture.d.ts.map +1 -1
  291. package/v3/dist/domains/visual-accessibility/services/viewport-capture.js +3 -2
  292. package/v3/dist/domains/visual-accessibility/services/viewport-capture.js.map +1 -1
  293. package/v3/dist/domains/visual-accessibility/services/visual-regression.d.ts.map +1 -1
  294. package/v3/dist/domains/visual-accessibility/services/visual-regression.js +3 -2
  295. package/v3/dist/domains/visual-accessibility/services/visual-regression.js.map +1 -1
  296. package/v3/dist/hooks/cross-phase-hooks.d.ts +42 -0
  297. package/v3/dist/hooks/cross-phase-hooks.d.ts.map +1 -0
  298. package/v3/dist/hooks/cross-phase-hooks.js +338 -0
  299. package/v3/dist/hooks/cross-phase-hooks.js.map +1 -0
  300. package/v3/dist/hooks/index.d.ts +9 -0
  301. package/v3/dist/hooks/index.d.ts.map +1 -0
  302. package/v3/dist/hooks/index.js +9 -0
  303. package/v3/dist/hooks/index.js.map +1 -0
  304. package/v3/dist/init/agents-installer.d.ts.map +1 -1
  305. package/v3/dist/init/agents-installer.js +6 -4
  306. package/v3/dist/init/agents-installer.js.map +1 -1
  307. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -1
  308. package/v3/dist/init/enhancements/claude-flow-adapter.js +15 -9
  309. package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -1
  310. package/v3/dist/init/enhancements/detector.js +6 -4
  311. package/v3/dist/init/enhancements/detector.js.map +1 -1
  312. package/v3/dist/init/init-wizard.d.ts +5 -0
  313. package/v3/dist/init/init-wizard.d.ts.map +1 -1
  314. package/v3/dist/init/init-wizard.js +77 -14
  315. package/v3/dist/init/init-wizard.js.map +1 -1
  316. package/v3/dist/init/migration/data-migrator.d.ts.map +1 -1
  317. package/v3/dist/init/migration/data-migrator.js +6 -4
  318. package/v3/dist/init/migration/data-migrator.js.map +1 -1
  319. package/v3/dist/init/phases/02-analysis.js +2 -2
  320. package/v3/dist/init/phases/02-analysis.js.map +1 -1
  321. package/v3/dist/init/phases/04-database.d.ts.map +1 -1
  322. package/v3/dist/init/phases/04-database.js +0 -1
  323. package/v3/dist/init/phases/04-database.js.map +1 -1
  324. package/v3/dist/init/phases/05-learning.js +1 -1
  325. package/v3/dist/init/phases/05-learning.js.map +1 -1
  326. package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -1
  327. package/v3/dist/init/phases/11-claude-md.js +25 -0
  328. package/v3/dist/init/phases/11-claude-md.js.map +1 -1
  329. package/v3/dist/init/phases/12-verification.d.ts.map +1 -1
  330. package/v3/dist/init/phases/12-verification.js +2 -1
  331. package/v3/dist/init/phases/12-verification.js.map +1 -1
  332. package/v3/dist/init/project-analyzer.d.ts.map +1 -1
  333. package/v3/dist/init/project-analyzer.js +12 -8
  334. package/v3/dist/init/project-analyzer.js.map +1 -1
  335. package/v3/dist/init/skills-installer.d.ts.map +1 -1
  336. package/v3/dist/init/skills-installer.js +6 -4
  337. package/v3/dist/init/skills-installer.js.map +1 -1
  338. package/v3/dist/init/token-bootstrap.d.ts.map +1 -1
  339. package/v3/dist/init/token-bootstrap.js +2 -1
  340. package/v3/dist/init/token-bootstrap.js.map +1 -1
  341. package/v3/dist/integrations/agent-booster-wasm/index.d.ts.map +1 -1
  342. package/v3/dist/integrations/agent-booster-wasm/index.js +8 -4
  343. package/v3/dist/integrations/agent-booster-wasm/index.js.map +1 -1
  344. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts.map +1 -1
  345. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js +3 -2
  346. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js.map +1 -1
  347. package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts.map +1 -1
  348. package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js.map +1 -1
  349. package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.d.ts.map +1 -1
  350. package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js.map +1 -1
  351. package/v3/dist/integrations/browser/agent-browser/client.d.ts.map +1 -1
  352. package/v3/dist/integrations/browser/agent-browser/client.js +9 -6
  353. package/v3/dist/integrations/browser/agent-browser/client.js.map +1 -1
  354. package/v3/dist/integrations/browser/agent-browser/command-executor.d.ts.map +1 -1
  355. package/v3/dist/integrations/browser/agent-browser/command-executor.js +3 -2
  356. package/v3/dist/integrations/browser/agent-browser/command-executor.js.map +1 -1
  357. package/v3/dist/integrations/browser/index.d.ts +1 -0
  358. package/v3/dist/integrations/browser/index.d.ts.map +1 -1
  359. package/v3/dist/integrations/browser/index.js +6 -0
  360. package/v3/dist/integrations/browser/index.js.map +1 -1
  361. package/v3/dist/integrations/browser/web-content-fetcher.d.ts +154 -0
  362. package/v3/dist/integrations/browser/web-content-fetcher.d.ts.map +1 -0
  363. package/v3/dist/integrations/browser/web-content-fetcher.js +529 -0
  364. package/v3/dist/integrations/browser/web-content-fetcher.js.map +1 -0
  365. package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -1
  366. package/v3/dist/integrations/coherence/threshold-tuner.js +3 -2
  367. package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -1
  368. package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -1
  369. package/v3/dist/integrations/coherence/wasm-loader.js +3 -2
  370. package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -1
  371. package/v3/dist/integrations/n8n/agent-factory.d.ts.map +1 -1
  372. package/v3/dist/integrations/n8n/agent-factory.js +6 -4
  373. package/v3/dist/integrations/n8n/agent-factory.js.map +1 -1
  374. package/v3/dist/integrations/rl-suite/persistence/q-value-store.d.ts.map +1 -1
  375. package/v3/dist/integrations/rl-suite/persistence/q-value-store.js.map +1 -1
  376. package/v3/dist/integrations/ruvector/interfaces.js +1 -1
  377. package/v3/dist/integrations/ruvector/interfaces.js.map +1 -1
  378. package/v3/dist/integrations/ruvector/sona-persistence.d.ts.map +1 -1
  379. package/v3/dist/integrations/ruvector/sona-persistence.js +6 -4
  380. package/v3/dist/integrations/ruvector/sona-persistence.js.map +1 -1
  381. package/v3/dist/integrations/vibium/client.d.ts.map +1 -1
  382. package/v3/dist/integrations/vibium/client.js +3 -2
  383. package/v3/dist/integrations/vibium/client.js.map +1 -1
  384. package/v3/dist/kernel/agent-coordinator.d.ts +1 -1
  385. package/v3/dist/kernel/agent-coordinator.d.ts.map +1 -1
  386. package/v3/dist/kernel/agent-coordinator.js +4 -4
  387. package/v3/dist/kernel/agent-coordinator.js.map +1 -1
  388. package/v3/dist/kernel/constants.d.ts +155 -0
  389. package/v3/dist/kernel/constants.d.ts.map +1 -0
  390. package/v3/dist/kernel/constants.js +169 -0
  391. package/v3/dist/kernel/constants.js.map +1 -0
  392. package/v3/dist/kernel/event-bus.d.ts +8 -0
  393. package/v3/dist/kernel/event-bus.d.ts.map +1 -1
  394. package/v3/dist/kernel/event-bus.js +79 -17
  395. package/v3/dist/kernel/event-bus.js.map +1 -1
  396. package/v3/dist/kernel/hybrid-backend.d.ts.map +1 -1
  397. package/v3/dist/kernel/hybrid-backend.js +4 -3
  398. package/v3/dist/kernel/hybrid-backend.js.map +1 -1
  399. package/v3/dist/kernel/index.d.ts +1 -1
  400. package/v3/dist/kernel/index.d.ts.map +1 -1
  401. package/v3/dist/kernel/index.js +3 -1
  402. package/v3/dist/kernel/index.js.map +1 -1
  403. package/v3/dist/kernel/kernel.d.ts.map +1 -1
  404. package/v3/dist/kernel/kernel.js +3 -2
  405. package/v3/dist/kernel/kernel.js.map +1 -1
  406. package/v3/dist/kernel/memory-backend.d.ts.map +1 -1
  407. package/v3/dist/kernel/memory-backend.js +4 -3
  408. package/v3/dist/kernel/memory-backend.js.map +1 -1
  409. package/v3/dist/kernel/unified-memory.d.ts +26 -0
  410. package/v3/dist/kernel/unified-memory.d.ts.map +1 -1
  411. package/v3/dist/kernel/unified-memory.js +68 -13
  412. package/v3/dist/kernel/unified-memory.js.map +1 -1
  413. package/v3/dist/kernel/unified-persistence.js +3 -2
  414. package/v3/dist/kernel/unified-persistence.js.map +1 -1
  415. package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -1
  416. package/v3/dist/learning/aqe-learning-engine.js +12 -8
  417. package/v3/dist/learning/aqe-learning-engine.js.map +1 -1
  418. package/v3/dist/learning/dream/index.d.ts +1 -1
  419. package/v3/dist/learning/dream/index.d.ts.map +1 -1
  420. package/v3/dist/learning/dream/index.js +3 -1
  421. package/v3/dist/learning/dream/index.js.map +1 -1
  422. package/v3/dist/learning/dream/spreading-activation.d.ts +41 -0
  423. package/v3/dist/learning/dream/spreading-activation.d.ts.map +1 -1
  424. package/v3/dist/learning/dream/spreading-activation.js +79 -0
  425. package/v3/dist/learning/dream/spreading-activation.js.map +1 -1
  426. package/v3/dist/learning/pattern-store.d.ts.map +1 -1
  427. package/v3/dist/learning/pattern-store.js +16 -6
  428. package/v3/dist/learning/pattern-store.js.map +1 -1
  429. package/v3/dist/learning/qe-unified-memory.js +1 -1
  430. package/v3/dist/learning/qe-unified-memory.js.map +1 -1
  431. package/v3/dist/learning/real-embeddings.d.ts.map +1 -1
  432. package/v3/dist/learning/real-embeddings.js +7 -1
  433. package/v3/dist/learning/real-embeddings.js.map +1 -1
  434. package/v3/dist/learning/real-qe-reasoning-bank.js +2 -2
  435. package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
  436. package/v3/dist/learning/sqlite-persistence.d.ts +2 -2
  437. package/v3/dist/learning/sqlite-persistence.d.ts.map +1 -1
  438. package/v3/dist/learning/sqlite-persistence.js +1 -1
  439. package/v3/dist/learning/sqlite-persistence.js.map +1 -1
  440. package/v3/dist/learning/v2-to-v3-migration.d.ts +2 -2
  441. package/v3/dist/learning/v2-to-v3-migration.d.ts.map +1 -1
  442. package/v3/dist/learning/v2-to-v3-migration.js +2 -2
  443. package/v3/dist/learning/v2-to-v3-migration.js.map +1 -1
  444. package/v3/dist/logging/console-logger.d.ts +96 -0
  445. package/v3/dist/logging/console-logger.d.ts.map +1 -0
  446. package/v3/dist/logging/console-logger.js +247 -0
  447. package/v3/dist/logging/console-logger.js.map +1 -0
  448. package/v3/dist/logging/index.d.ts +42 -0
  449. package/v3/dist/logging/index.d.ts.map +1 -0
  450. package/v3/dist/logging/index.js +39 -0
  451. package/v3/dist/logging/index.js.map +1 -0
  452. package/v3/dist/logging/logger-factory.d.ts +145 -0
  453. package/v3/dist/logging/logger-factory.d.ts.map +1 -0
  454. package/v3/dist/logging/logger-factory.js +218 -0
  455. package/v3/dist/logging/logger-factory.js.map +1 -0
  456. package/v3/dist/logging/logger.d.ts +89 -0
  457. package/v3/dist/logging/logger.d.ts.map +1 -0
  458. package/v3/dist/logging/logger.js +74 -0
  459. package/v3/dist/logging/logger.js.map +1 -0
  460. package/v3/dist/mcp/bundle.js +11385 -7526
  461. package/v3/dist/mcp/handlers/agent-handlers.js +2 -2
  462. package/v3/dist/mcp/handlers/agent-handlers.js.map +1 -1
  463. package/v3/dist/mcp/handlers/core-handlers.d.ts +2 -0
  464. package/v3/dist/mcp/handlers/core-handlers.d.ts.map +1 -1
  465. package/v3/dist/mcp/handlers/core-handlers.js +33 -0
  466. package/v3/dist/mcp/handlers/core-handlers.js.map +1 -1
  467. package/v3/dist/mcp/handlers/cross-phase-handlers.d.ts +110 -0
  468. package/v3/dist/mcp/handlers/cross-phase-handlers.d.ts.map +1 -0
  469. package/v3/dist/mcp/handlers/cross-phase-handlers.js +216 -0
  470. package/v3/dist/mcp/handlers/cross-phase-handlers.js.map +1 -0
  471. package/v3/dist/mcp/handlers/domain-handler-configs.d.ts +151 -0
  472. package/v3/dist/mcp/handlers/domain-handler-configs.d.ts.map +1 -0
  473. package/v3/dist/mcp/handlers/domain-handler-configs.js +486 -0
  474. package/v3/dist/mcp/handlers/domain-handler-configs.js.map +1 -0
  475. package/v3/dist/mcp/handlers/domain-handlers.d.ts +174 -120
  476. package/v3/dist/mcp/handlers/domain-handlers.d.ts.map +1 -1
  477. package/v3/dist/mcp/handlers/domain-handlers.js +178 -1049
  478. package/v3/dist/mcp/handlers/domain-handlers.js.map +1 -1
  479. package/v3/dist/mcp/handlers/handler-factory.d.ts +182 -0
  480. package/v3/dist/mcp/handlers/handler-factory.d.ts.map +1 -0
  481. package/v3/dist/mcp/handlers/handler-factory.js +327 -0
  482. package/v3/dist/mcp/handlers/handler-factory.js.map +1 -0
  483. package/v3/dist/mcp/handlers/index.d.ts +1 -0
  484. package/v3/dist/mcp/handlers/index.d.ts.map +1 -1
  485. package/v3/dist/mcp/handlers/index.js +2 -0
  486. package/v3/dist/mcp/handlers/index.js.map +1 -1
  487. package/v3/dist/mcp/handlers/task-handlers.d.ts +1 -0
  488. package/v3/dist/mcp/handlers/task-handlers.d.ts.map +1 -1
  489. package/v3/dist/mcp/handlers/task-handlers.js +91 -7
  490. package/v3/dist/mcp/handlers/task-handlers.js.map +1 -1
  491. package/v3/dist/mcp/server.d.ts.map +1 -1
  492. package/v3/dist/mcp/server.js +107 -1
  493. package/v3/dist/mcp/server.js.map +1 -1
  494. package/v3/dist/mcp/types.d.ts +5 -3
  495. package/v3/dist/mcp/types.d.ts.map +1 -1
  496. package/v3/dist/memory/cross-phase-memory.d.ts +55 -0
  497. package/v3/dist/memory/cross-phase-memory.d.ts.map +1 -0
  498. package/v3/dist/memory/cross-phase-memory.js +265 -0
  499. package/v3/dist/memory/cross-phase-memory.js.map +1 -0
  500. package/v3/dist/memory/index.d.ts +9 -0
  501. package/v3/dist/memory/index.d.ts.map +1 -0
  502. package/v3/dist/memory/index.js +9 -0
  503. package/v3/dist/memory/index.js.map +1 -0
  504. package/v3/dist/shared/io/file-reader.d.ts.map +1 -1
  505. package/v3/dist/shared/io/file-reader.js +3 -2
  506. package/v3/dist/shared/io/file-reader.js.map +1 -1
  507. package/v3/dist/shared/utils/binary-insert.d.ts +85 -0
  508. package/v3/dist/shared/utils/binary-insert.d.ts.map +1 -0
  509. package/v3/dist/shared/utils/binary-insert.js +122 -0
  510. package/v3/dist/shared/utils/binary-insert.js.map +1 -0
  511. package/v3/dist/shared/utils/index.d.ts +1 -0
  512. package/v3/dist/shared/utils/index.d.ts.map +1 -1
  513. package/v3/dist/shared/utils/index.js +1 -0
  514. package/v3/dist/shared/utils/index.js.map +1 -1
  515. package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -1
  516. package/v3/dist/strange-loop/belief-reconciler.js +3 -2
  517. package/v3/dist/strange-loop/belief-reconciler.js.map +1 -1
  518. package/v3/dist/sync/claude-flow-bridge.d.ts +1 -1
  519. package/v3/dist/sync/claude-flow-bridge.d.ts.map +1 -1
  520. package/v3/dist/sync/claude-flow-bridge.js +7 -5
  521. package/v3/dist/sync/claude-flow-bridge.js.map +1 -1
  522. package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -1
  523. package/v3/dist/sync/cloud/postgres-writer.js +0 -1
  524. package/v3/dist/sync/cloud/postgres-writer.js.map +1 -1
  525. package/v3/dist/sync/interfaces.d.ts +6 -0
  526. package/v3/dist/sync/interfaces.d.ts.map +1 -1
  527. package/v3/dist/sync/interfaces.js +34 -47
  528. package/v3/dist/sync/interfaces.js.map +1 -1
  529. package/v3/dist/sync/readers/sqlite-reader.d.ts +1 -1
  530. package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -1
  531. package/v3/dist/sync/readers/sqlite-reader.js +4 -3
  532. package/v3/dist/sync/readers/sqlite-reader.js.map +1 -1
  533. package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.d.ts.map +1 -1
  534. package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js +3 -2
  535. package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js.map +1 -1
  536. package/v3/dist/test-scheduling/git-aware/test-selector.d.ts.map +1 -1
  537. package/v3/dist/test-scheduling/git-aware/test-selector.js +3 -2
  538. package/v3/dist/test-scheduling/git-aware/test-selector.js.map +1 -1
  539. package/v3/dist/types/cross-phase-signals.d.ts +119 -0
  540. package/v3/dist/types/cross-phase-signals.d.ts.map +1 -0
  541. package/v3/dist/types/cross-phase-signals.js +33 -0
  542. package/v3/dist/types/cross-phase-signals.js.map +1 -0
  543. package/v3/dist/types/index.d.ts +9 -0
  544. package/v3/dist/types/index.d.ts.map +1 -0
  545. package/v3/dist/types/index.js +9 -0
  546. package/v3/dist/types/index.js.map +1 -0
  547. package/v3/dist/workers/worker-manager.d.ts.map +1 -1
  548. package/v3/dist/workers/worker-manager.js +3 -2
  549. package/v3/dist/workers/worker-manager.js.map +1 -1
  550. package/v3/dist/workflows/browser/workflow-loader.d.ts +3 -3
  551. package/v3/dist/workflows/browser/workflow-loader.d.ts.map +1 -1
  552. package/v3/dist/workflows/browser/workflow-loader.js.map +1 -1
  553. package/v3/package.json +4 -1
@@ -0,0 +1,1658 @@
1
+ ---
2
+ name: a11y-ally
3
+ description: "Comprehensive WCAG accessibility auditing with multi-tool testing (axe-core + pa11y + Lighthouse), TRUE PARALLEL execution with Promise.allSettled, graceful degradation, retry with backoff, context-aware remediation, learning integration, and video accessibility. Uses 3-tier browser cascade: Vibium → agent-browser → Playwright+Stealth."
4
+ category: specialized-testing
5
+ priority: critical
6
+ tokenEstimate: 10000
7
+ agents: []
8
+ implementation_status: active
9
+ optimization_version: 7.0
10
+ last_optimized: 2026-01-26
11
+ dependencies: [playwright, playwright-extra, puppeteer-extra-plugin-stealth, "@axe-core/playwright", pa11y, lighthouse]
12
+ quick_reference_card: true
13
+ tags: [accessibility, wcag, a11y, video, captions, audiodesc, vtt, eu-compliance, context-aware, remediation, axe-core, pa11y, lighthouse, parallel, resilient, graceful-degradation, retry]
14
+ ---
15
+
16
+ # /a11y-ally - Comprehensive Accessibility Audit
17
+
18
+ <default_to_action>
19
+ When this skill is invoked with a URL, Claude executes ALL steps automatically without waiting for user prompts between steps.
20
+
21
+ ## THIS IS AN LLM-POWERED SKILL
22
+
23
+ The value of this skill is **Claude's intelligence**, not just running automated tools:
24
+
25
+ | Automated Tools Do | Claude (This Skill) Does |
26
+ |--------------------|--------------------------|
27
+ | Flag "button has no name" | Analyze context: icon class, parent element, nearby text → generate "Add to wishlist" |
28
+ | Flag "image missing alt" | Use Vision to see the image → describe actual content |
29
+ | Flag "video has no captions" | Download video, extract frames, analyze each frame with Vision → generate real captions |
30
+ | Output generic templates | Generate context-specific, copy-paste ready fixes |
31
+
32
+ **IF YOU SKIP THE LLM ANALYSIS, THIS SKILL HAS NO VALUE.**
33
+
34
+ ---
35
+
36
+ ## EXECUTION MODEL
37
+
38
+ **CLAUDE EXECUTES ALL STEPS WITHOUT STOPPING.**
39
+
40
+ Do NOT wait for user prompts between steps. Execute the full pipeline:
41
+
42
+ 1. **Data Collection**: Run multi-tool scan (axe-core, pa11y, Lighthouse) via Bash
43
+ 2. **LLM Analysis**: Read results and analyze context for each violation
44
+ 3. **Vision Pipeline**: If videos detected → download → extract frames → Read each frame → describe
45
+ 4. **Intelligent Remediation**: Generate context-specific fixes using your reasoning
46
+ 5. **Generate Reports**: Write all output files to `docs/accessibility-scans/{page-slug}/`
47
+
48
+ **WRONG:**
49
+ ```
50
+ Claude: "I found 5 violations. Should I analyze them?"
51
+ User: "Yes"
52
+ Claude: "I see a video. Should I run the video pipeline?"
53
+ User: "Yes"
54
+ ```
55
+
56
+ **RIGHT:**
57
+ ```
58
+ Claude: [Runs scan] → [Analyzes violations] → [Downloads video] → [Extracts frames] →
59
+ [Reads each frame with Vision] → [Generates captions] → [Writes all files]
60
+ "Audit complete. Generated 4 files in docs/accessibility-scans/example/"
61
+ ```
62
+
63
+ ---
64
+
65
+ ## STEP 1: BROWSER AUTOMATION - Content Fetching
66
+
67
+ ### 1.1: Try VIBIUM First (Primary)
68
+ ```javascript
69
+ ToolSearch("select:mcp__vibium__browser_launch")
70
+ ToolSearch("select:mcp__vibium__browser_navigate")
71
+ mcp__vibium__browser_launch({ headless: true })
72
+ mcp__vibium__browser_navigate({ url: "TARGET_URL" })
73
+ ```
74
+
75
+ **If Vibium fails** → Go to STEP 1b
76
+
77
+ ### 1b: Try AGENT-BROWSER Fallback
78
+ ```javascript
79
+ ToolSearch("select:mcp__claude-flow_alpha__browser_open")
80
+ mcp__claude-flow_alpha__browser_open({ url: "TARGET_URL", waitUntil: "networkidle" })
81
+ ```
82
+
83
+ **If agent-browser fails** → Go to STEP 1c
84
+
85
+ ### 1c: PLAYWRIGHT + STEALTH (Final Fallback)
86
+ ```bash
87
+ mkdir -p /tmp/a11y-work && cd /tmp/a11y-work
88
+ npm init -y 2>/dev/null
89
+ npm install playwright-extra puppeteer-extra-plugin-stealth @axe-core/playwright pa11y lighthouse chrome-launcher 2>/dev/null
90
+ ```
91
+
92
+ Create and run scan script - see STEP 2 for full multi-tool scan code.
93
+
94
+ ### 1d: PARALLEL MULTI-PAGE AUDIT (Optional)
95
+
96
+ For auditing multiple URLs simultaneously, use parallel execution:
97
+
98
+ ```javascript
99
+ // /tmp/a11y-work/parallel-audit.js
100
+ const { chromium } = require('playwright-extra');
101
+ const stealth = require('puppeteer-extra-plugin-stealth')();
102
+ const { AxeBuilder } = require('@axe-core/playwright');
103
+
104
+ chromium.use(stealth);
105
+
106
+ const MAX_CONCURRENT = 6; // Maximum parallel auditors
107
+
108
+ async function auditUrl(browser, url) {
109
+ const context = await browser.newContext();
110
+ const page = await context.newPage();
111
+
112
+ try {
113
+ await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60000 });
114
+ await page.waitForTimeout(2000);
115
+
116
+ const axeResults = await new AxeBuilder({ page })
117
+ .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'])
118
+ .analyze();
119
+
120
+ return { url, success: true, violations: axeResults.violations };
121
+ } catch (error) {
122
+ return { url, success: false, error: error.message };
123
+ } finally {
124
+ await context.close();
125
+ }
126
+ }
127
+
128
+ async function parallelAudit(urls) {
129
+ const browser = await chromium.launch({ headless: true });
130
+ const results = [];
131
+
132
+ // Process in chunks of MAX_CONCURRENT
133
+ for (let i = 0; i < urls.length; i += MAX_CONCURRENT) {
134
+ const chunk = urls.slice(i, i + MAX_CONCURRENT);
135
+ console.log(`Auditing batch ${Math.floor(i/MAX_CONCURRENT) + 1}: ${chunk.length} URLs`);
136
+
137
+ const chunkResults = await Promise.all(
138
+ chunk.map(url => auditUrl(browser, url))
139
+ );
140
+ results.push(...chunkResults);
141
+ }
142
+
143
+ await browser.close();
144
+ return results;
145
+ }
146
+
147
+ // Usage: node parallel-audit.js url1 url2 url3 ...
148
+ const urls = process.argv.slice(2);
149
+ if (urls.length > 0) {
150
+ parallelAudit(urls).then(results => {
151
+ console.log(JSON.stringify(results, null, 2));
152
+ });
153
+ }
154
+ ```
155
+
156
+ **Usage for multi-page audit:**
157
+ ```bash
158
+ node parallel-audit.js https://example.com https://example.com/about https://example.com/contact
159
+ ```
160
+
161
+ ### 1e: SITE CRAWL MODE (Optional)
162
+
163
+ For comprehensive site audits, crawl and audit all pages:
164
+
165
+ ```javascript
166
+ // /tmp/a11y-work/crawl-audit.js
167
+ async function crawlAndAudit(startUrl, maxPages = 50) {
168
+ const browser = await chromium.launch({ headless: true });
169
+ const visited = new Set();
170
+ const toVisit = [startUrl];
171
+ const results = [];
172
+ const baseUrl = new URL(startUrl).origin;
173
+
174
+ while (toVisit.length > 0 && results.length < maxPages) {
175
+ const url = toVisit.shift();
176
+ if (visited.has(url)) continue;
177
+ visited.add(url);
178
+
179
+ console.log(`[${results.length + 1}/${maxPages}] Auditing: ${url}`);
180
+
181
+ const context = await browser.newContext();
182
+ const page = await context.newPage();
183
+
184
+ try {
185
+ await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 });
186
+
187
+ // Extract same-domain links for crawling
188
+ const links = await page.evaluate((base) => {
189
+ return [...document.querySelectorAll('a[href]')]
190
+ .map(a => a.href)
191
+ .filter(href => href.startsWith(base) && !href.includes('#'))
192
+ .filter(href => !href.match(/\.(pdf|jpg|png|gif|css|js)$/i));
193
+ }, baseUrl);
194
+
195
+ // Add new links to queue
196
+ links.forEach(link => {
197
+ if (!visited.has(link) && !toVisit.includes(link)) {
198
+ toVisit.push(link);
199
+ }
200
+ });
201
+
202
+ // Run accessibility audit
203
+ const axeResults = await new AxeBuilder({ page })
204
+ .withTags(['wcag2a', 'wcag2aa', 'wcag22aa'])
205
+ .analyze();
206
+
207
+ results.push({ url, violations: axeResults.violations });
208
+ } catch (e) {
209
+ results.push({ url, error: e.message });
210
+ }
211
+
212
+ await context.close();
213
+ }
214
+
215
+ await browser.close();
216
+ return { pagesAudited: results.length, results };
217
+ }
218
+
219
+ // Usage: node crawl-audit.js https://example.com 50
220
+ const [startUrl, maxPages] = process.argv.slice(2);
221
+ crawlAndAudit(startUrl, parseInt(maxPages) || 50).then(r => console.log(JSON.stringify(r, null, 2)));
222
+ ```
223
+
224
+ ---
225
+
226
+ ## STEP 2: COMPREHENSIVE WCAG SCAN (Multi-Tool, Parallel, Resilient)
227
+
228
+ **IMPORTANT:** This step uses THREE accessibility testing tools for maximum coverage:
229
+ - **axe-core**: Industry standard, excellent for ARIA and semantic issues
230
+ - **pa11y**: Strong on contrast, links, and HTML validation
231
+ - **Lighthouse**: Google's accessibility scoring with performance correlation
232
+
233
+ Combined detection rate is ~15% higher than any single tool.
234
+
235
+ ### 2.0: RESILIENCE ARCHITECTURE (v7.0 Enhancement)
236
+
237
+ **Key improvements over v6.0:**
238
+
239
+ | Feature | v6.0 (Old) | v7.0 (New) |
240
+ |---------|------------|------------|
241
+ | Tool execution | Sequential | **Parallel (Promise.allSettled)** |
242
+ | Timeout handling | Global 60s | **Per-tool (60s/60s/90s)** |
243
+ | Failure mode | All-or-nothing | **Graceful degradation** |
244
+ | Retry logic | None | **Exponential backoff (3 retries)** |
245
+ | Output style | Wait for all | **Progressive (stream as ready)** |
246
+ | Minimum tools | 3 required | **1 of 3 sufficient** |
247
+
248
+ **Coverage by tools succeeded:**
249
+ - 3/3 tools: ~95% detection (optimal)
250
+ - 2/3 tools: ~85% detection (good)
251
+ - 1/3 tools: ~70% detection (acceptable)
252
+ - 0/3 tools: FAIL - retry with different strategy
253
+
254
+ ### 2.1: Run Multi-Tool Analysis (PARALLEL + RESILIENT)
255
+ Create and run `/tmp/a11y-work/multi-tool-scan.js`:
256
+ ```javascript
257
+ const { chromium } = require('playwright-extra');
258
+ const stealth = require('puppeteer-extra-plugin-stealth')();
259
+ const { AxeBuilder } = require('@axe-core/playwright');
260
+ const pa11y = require('pa11y');
261
+ const lighthouse = require('lighthouse').default || require('lighthouse');
262
+ const { launch: launchChrome } = require('chrome-launcher');
263
+ const fs = require('fs');
264
+
265
+ chromium.use(stealth);
266
+
267
+ const TARGET_URL = process.argv[2] || 'TARGET_URL';
268
+ const OUTPUT_FILE = '/tmp/a11y-work/scan-results.json';
269
+ const SYSTEM_CHROMIUM = '/usr/bin/chromium';
270
+
271
+ // ========== RESILIENCE UTILITIES ==========
272
+
273
+ // Timeout wrapper - wraps any promise with a timeout
274
+ function withTimeout(promise, ms, name) {
275
+ return Promise.race([
276
+ promise,
277
+ new Promise((_, reject) =>
278
+ setTimeout(() => reject(new Error(`${name} timed out after ${ms}ms`)), ms)
279
+ )
280
+ ]);
281
+ }
282
+
283
+ // Retry wrapper - retries with exponential backoff
284
+ async function withRetry(fn, name, maxRetries = 3, baseDelay = 2000) {
285
+ for (let attempt = 1; attempt <= maxRetries; attempt++) {
286
+ try {
287
+ return await fn();
288
+ } catch (error) {
289
+ const isLastAttempt = attempt === maxRetries;
290
+ console.log(`[${name}] Attempt ${attempt}/${maxRetries} failed: ${error.message}`);
291
+ if (isLastAttempt) throw error;
292
+ const delay = baseDelay * Math.pow(2, attempt - 1); // Exponential backoff
293
+ console.log(`[${name}] Retrying in ${delay}ms...`);
294
+ await new Promise(r => setTimeout(r, delay));
295
+ }
296
+ }
297
+ }
298
+
299
+ // Sleep utility
300
+ const sleep = (ms) => new Promise(r => setTimeout(r, ms));
301
+
302
+ // Progressive output - append results as they arrive
303
+ function progressiveOutput(tool, data) {
304
+ console.log(`\n=== ${tool.toUpperCase()} COMPLETE ===`);
305
+ console.log(JSON.stringify(data, null, 2));
306
+
307
+ // Append to results file for progressive access
308
+ try {
309
+ let results = {};
310
+ if (fs.existsSync(OUTPUT_FILE)) {
311
+ results = JSON.parse(fs.readFileSync(OUTPUT_FILE, 'utf8'));
312
+ }
313
+ results[tool] = data;
314
+ results.lastUpdated = new Date().toISOString();
315
+ fs.writeFileSync(OUTPUT_FILE, JSON.stringify(results, null, 2));
316
+ } catch (e) { /* ignore file errors */ }
317
+ }
318
+
319
+ // ========== TOOL RUNNERS ==========
320
+
321
+ // TOOL 1: Axe-core (with page info extraction)
322
+ async function runAxeCore(url) {
323
+ console.log('[axe-core] Starting...');
324
+ const browser = await chromium.launch({
325
+ headless: true,
326
+ executablePath: SYSTEM_CHROMIUM,
327
+ args: [
328
+ '--no-sandbox',
329
+ '--disable-setuid-sandbox',
330
+ '--disable-dev-shm-usage',
331
+ '--disable-blink-features=AutomationControlled'
332
+ ]
333
+ });
334
+
335
+ const context = await browser.newContext({
336
+ userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
337
+ locale: 'en-US',
338
+ viewport: { width: 1920, height: 1080 }
339
+ });
340
+
341
+ const page = await context.newPage();
342
+
343
+ try {
344
+ // Use domcontentloaded (faster, more reliable than networkidle)
345
+ await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 });
346
+
347
+ // Random delay to appear human
348
+ await sleep(2000 + Math.random() * 2000);
349
+
350
+ // Try to dismiss cookie banners
351
+ try {
352
+ const cookieSelectors = [
353
+ 'button:has-text("Accept")', 'button:has-text("Akzeptieren")',
354
+ 'button:has-text("Alle akzeptieren")', '[data-testid="cookie-accept"]',
355
+ '#onetrust-accept-btn-handler', '.cookie-consent-accept'
356
+ ];
357
+ for (const selector of cookieSelectors) {
358
+ const btn = await page.$(selector);
359
+ if (btn) { await btn.click(); await sleep(500); break; }
360
+ }
361
+ } catch (e) { /* ignore cookie errors */ }
362
+
363
+ // Run axe-core analysis
364
+ const axeResults = await new AxeBuilder({ page })
365
+ .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'])
366
+ .analyze();
367
+
368
+ // Extract comprehensive page info
369
+ const pageInfo = await page.evaluate(() => ({
370
+ title: document.title,
371
+ url: window.location.href,
372
+ lang: document.documentElement.lang,
373
+ images: {
374
+ total: document.querySelectorAll('img').length,
375
+ withAlt: document.querySelectorAll('img[alt]').length,
376
+ withoutAlt: document.querySelectorAll('img:not([alt])').length,
377
+ emptyAlt: document.querySelectorAll('img[alt=""]').length
378
+ },
379
+ headings: {
380
+ h1: Array.from(document.querySelectorAll('h1')).map(h => h.textContent.trim().slice(0,60)),
381
+ h2: document.querySelectorAll('h2').length,
382
+ h3: document.querySelectorAll('h3').length,
383
+ total: document.querySelectorAll('h1,h2,h3,h4,h5,h6').length
384
+ },
385
+ forms: {
386
+ total: document.querySelectorAll('form').length,
387
+ inputs: document.querySelectorAll('input, select, textarea').length,
388
+ buttons: document.querySelectorAll('button').length
389
+ },
390
+ links: { total: document.querySelectorAll('a').length },
391
+ aria: {
392
+ ariaLabels: document.querySelectorAll('[aria-label]').length,
393
+ roles: document.querySelectorAll('[role]').length
394
+ },
395
+ landmarks: {
396
+ main: document.querySelectorAll('main').length,
397
+ nav: document.querySelectorAll('nav').length,
398
+ header: document.querySelectorAll('header').length,
399
+ footer: document.querySelectorAll('footer').length
400
+ },
401
+ media: {
402
+ videos: document.querySelectorAll('video').length,
403
+ iframes: document.querySelectorAll('iframe').length,
404
+ videoUrls: Array.from(document.querySelectorAll('video')).map(v => {
405
+ const src = v.src || (v.querySelector('source') ? v.querySelector('source').src : '');
406
+ return {
407
+ src: src,
408
+ hasCaptions: !!v.querySelector('track[kind="captions"]')
409
+ };
410
+ })
411
+ }
412
+ }));
413
+
414
+ const violations = axeResults.violations.map(v => ({
415
+ tool: 'axe-core',
416
+ id: v.id,
417
+ impact: v.impact,
418
+ description: v.description,
419
+ help: v.help,
420
+ helpUrl: v.helpUrl,
421
+ tags: v.tags,
422
+ nodeCount: v.nodes.length,
423
+ nodes: v.nodes.slice(0, 5).map(n => ({
424
+ html: n.html.slice(0, 200),
425
+ target: n.target,
426
+ failureSummary: n.failureSummary
427
+ }))
428
+ }));
429
+
430
+ return {
431
+ success: true,
432
+ pageInfo,
433
+ violations,
434
+ passesCount: axeResults.passes.length
435
+ };
436
+ } finally {
437
+ await context.close();
438
+ await browser.close();
439
+ }
440
+ }
441
+
442
+ // TOOL 2: Pa11y
443
+ async function runPa11y(url) {
444
+ console.log('[pa11y] Starting...');
445
+ const results = await pa11y(url, {
446
+ standard: 'WCAG2AA',
447
+ timeout: 45000,
448
+ wait: 2000,
449
+ chromeLaunchConfig: {
450
+ executablePath: SYSTEM_CHROMIUM,
451
+ args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage']
452
+ }
453
+ });
454
+
455
+ const violations = results.issues.map(issue => ({
456
+ tool: 'pa11y',
457
+ id: issue.code,
458
+ impact: issue.type === 'error' ? 'serious' : issue.type === 'warning' ? 'moderate' : 'minor',
459
+ description: issue.message,
460
+ selector: issue.selector,
461
+ context: (issue.context || '').slice(0, 200)
462
+ }));
463
+
464
+ return { success: true, violations, total: results.issues.length };
465
+ }
466
+
467
+ // TOOL 3: Lighthouse
468
+ async function runLighthouse(url) {
469
+ console.log('[lighthouse] Starting...');
470
+ const chrome = await launchChrome({
471
+ chromePath: SYSTEM_CHROMIUM,
472
+ chromeFlags: ['--headless', '--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage']
473
+ });
474
+
475
+ try {
476
+ const result = await lighthouse(url, {
477
+ port: chrome.port,
478
+ onlyCategories: ['accessibility'],
479
+ output: 'json'
480
+ });
481
+
482
+ const lhr = result.lhr;
483
+ const score = Math.round(lhr.categories.accessibility.score * 100);
484
+ const violations = Object.values(lhr.audits)
485
+ .filter(audit => audit.score !== null && audit.score < 1)
486
+ .map(audit => ({
487
+ tool: 'lighthouse',
488
+ id: audit.id,
489
+ impact: audit.score === 0 ? 'critical' : audit.score < 0.5 ? 'serious' : 'moderate',
490
+ score: audit.score,
491
+ description: audit.title
492
+ }));
493
+
494
+ return { success: true, score, violations };
495
+ } finally {
496
+ await chrome.kill();
497
+ }
498
+ }
499
+
500
+ // ========== MAIN: PARALLEL EXECUTION WITH GRACEFUL DEGRADATION ==========
501
+
502
+ (async () => {
503
+ console.log('=== MULTI-TOOL ACCESSIBILITY SCAN (v7.0 PARALLEL + RESILIENT) ===');
504
+ console.log('Target:', TARGET_URL);
505
+ console.log('Strategy: Promise.allSettled with per-tool timeouts\n');
506
+
507
+ const startTime = Date.now();
508
+
509
+ // Run ALL tools in PARALLEL with individual timeouts
510
+ const [axeResult, pa11yResult, lighthouseResult] = await Promise.allSettled([
511
+ withTimeout(
512
+ withRetry(() => runAxeCore(TARGET_URL), 'axe-core', 2, 3000),
513
+ 60000, 'axe-core'
514
+ ),
515
+ withTimeout(
516
+ withRetry(() => runPa11y(TARGET_URL), 'pa11y', 2, 3000),
517
+ 60000, 'pa11y'
518
+ ),
519
+ withTimeout(
520
+ withRetry(() => runLighthouse(TARGET_URL), 'lighthouse', 2, 3000),
521
+ 90000, 'lighthouse'
522
+ )
523
+ ]);
524
+
525
+ // ========== PROCESS RESULTS (Graceful Degradation) ==========
526
+ const results = {
527
+ url: TARGET_URL,
528
+ timestamp: new Date().toISOString(),
529
+ duration: `${((Date.now() - startTime) / 1000).toFixed(1)}s`,
530
+ toolsSucceeded: 0,
531
+ toolsFailed: 0,
532
+ pageInfo: null,
533
+ violations: [],
534
+ byTool: {}
535
+ };
536
+
537
+ // Process axe-core results
538
+ if (axeResult.status === 'fulfilled') {
539
+ results.toolsSucceeded++;
540
+ results.pageInfo = axeResult.value.pageInfo;
541
+ results.violations.push(...axeResult.value.violations);
542
+ results.byTool['axe-core'] = {
543
+ success: true,
544
+ count: axeResult.value.violations.length,
545
+ passes: axeResult.value.passesCount
546
+ };
547
+ progressiveOutput('axe-core', axeResult.value);
548
+ } else {
549
+ results.toolsFailed++;
550
+ results.byTool['axe-core'] = { success: false, error: axeResult.reason.message };
551
+ console.log('\n[axe-core] FAILED:', axeResult.reason.message);
552
+ }
553
+
554
+ // Process pa11y results
555
+ if (pa11yResult.status === 'fulfilled') {
556
+ results.toolsSucceeded++;
557
+ results.violations.push(...pa11yResult.value.violations);
558
+ results.byTool['pa11y'] = {
559
+ success: true,
560
+ count: pa11yResult.value.violations.length
561
+ };
562
+ progressiveOutput('pa11y', pa11yResult.value);
563
+ } else {
564
+ results.toolsFailed++;
565
+ results.byTool['pa11y'] = { success: false, error: pa11yResult.reason.message };
566
+ console.log('\n[pa11y] FAILED:', pa11yResult.reason.message);
567
+ }
568
+
569
+ // Process lighthouse results
570
+ if (lighthouseResult.status === 'fulfilled') {
571
+ results.toolsSucceeded++;
572
+ results.violations.push(...lighthouseResult.value.violations);
573
+ results.byTool['lighthouse'] = {
574
+ success: true,
575
+ score: lighthouseResult.value.score,
576
+ count: lighthouseResult.value.violations.length
577
+ };
578
+ progressiveOutput('lighthouse', lighthouseResult.value);
579
+ } else {
580
+ results.toolsFailed++;
581
+ results.byTool['lighthouse'] = { success: false, error: lighthouseResult.reason.message };
582
+ console.log('\n[lighthouse] FAILED:', lighthouseResult.reason.message);
583
+ }
584
+
585
+ // ========== DEDUPLICATE VIOLATIONS ==========
586
+ const seen = new Set();
587
+ const uniqueViolations = [];
588
+ for (const v of results.violations) {
589
+ const key = (v.description || '').toLowerCase().slice(0, 50);
590
+ if (!seen.has(key)) {
591
+ seen.add(key);
592
+ uniqueViolations.push(v);
593
+ }
594
+ }
595
+ results.uniqueViolations = uniqueViolations;
596
+ results.totalUnique = uniqueViolations.length;
597
+
598
+ // ========== FINAL OUTPUT ==========
599
+ console.log('\n' + '='.repeat(60));
600
+ console.log('=== SCAN COMPLETE ===');
601
+ console.log('='.repeat(60));
602
+ console.log(`Tools succeeded: ${results.toolsSucceeded}/3`);
603
+ console.log(`Tools failed: ${results.toolsFailed}/3`);
604
+ console.log(`Duration: ${results.duration}`);
605
+ console.log(`Total unique violations: ${results.totalUnique}`);
606
+
607
+ if (results.toolsSucceeded === 0) {
608
+ console.log('\n⚠️ ALL TOOLS FAILED - Consider:');
609
+ console.log(' 1. Site may have strong bot protection');
610
+ console.log(' 2. Try Vibium MCP browser instead');
611
+ console.log(' 3. Check network connectivity');
612
+ } else if (results.toolsSucceeded < 3) {
613
+ console.log(`\n⚠️ Partial coverage (${results.toolsSucceeded}/3 tools) - Results still usable`);
614
+ } else {
615
+ console.log('\n✅ Full coverage achieved (3/3 tools)');
616
+ }
617
+
618
+ console.log('\n=== PAGE INFO ===');
619
+ console.log(JSON.stringify(results.pageInfo, null, 2));
620
+
621
+ console.log('\n=== VIOLATIONS BY TOOL ===');
622
+ console.log(JSON.stringify(results.byTool, null, 2));
623
+
624
+ console.log('\n=== UNIQUE VIOLATIONS ===');
625
+ console.log(JSON.stringify(results.uniqueViolations, null, 2));
626
+
627
+ // Save final results
628
+ fs.writeFileSync(OUTPUT_FILE, JSON.stringify(results, null, 2));
629
+ console.log(`\nResults saved to: ${OUTPUT_FILE}`);
630
+ })();
631
+ ```
632
+
633
+ ### 2.2: Read Scan Results
634
+
635
+ After running the scan, read the results file:
636
+ ```bash
637
+ cat /tmp/a11y-work/scan-results.json
638
+ ```
639
+
640
+ The results include:
641
+ - **pageInfo**: Page structure, images, headings, media
642
+ - **violations**: All violations from all tools (deduplicated)
643
+ - **byTool**: Success/failure status per tool
644
+ - **toolsSucceeded**: Number of tools that completed (1-3)
645
+
646
+ ### 2.3: Graceful Degradation Decision Tree
647
+
648
+ | Tools Succeeded | Action |
649
+ |-----------------|--------|
650
+ | **3/3** | ✅ Full coverage - proceed with all results |
651
+ | **2/3** | ⚠️ Good coverage - note which tool failed in report |
652
+ | **1/3** | ⚠️ Basic coverage - proceed but flag limited confidence |
653
+ | **0/3** | ❌ Retry with Vibium MCP, or document failure |
654
+
655
+ ### 2.4: MANDATORY - Check for Videos and Trigger Pipeline
656
+
657
+ After reading scan results, check `pageInfo.media.videoUrls`:
658
+
659
+ ```javascript
660
+ // Check scan-results.json for videos
661
+ const results = JSON.parse(fs.readFileSync('/tmp/a11y-work/scan-results.json'));
662
+ if (results.pageInfo && results.pageInfo.media.videoUrls.length > 0) {
663
+ console.log('=== VIDEOS DETECTED - TRIGGERING VIDEO PIPELINE ===');
664
+ for (const video of results.pageInfo.media.videoUrls) {
665
+ console.log(`Video: ${video.src}`);
666
+ console.log(` Has captions: ${video.hasCaptions}`);
667
+ }
668
+ // PROCEED TO STEP 7 IMMEDIATELY
669
+ }
670
+ ```
671
+
672
+ **IF videos detected AND hasCaptions=false → STEP 7 is MANDATORY before generating reports.**
673
+
674
+ ---
675
+
676
+ ## STEP 3: CONTEXT-AWARE REMEDIATION (LLM-POWERED)
677
+
678
+ **THIS IS WHERE CLAUDE'S INTELLIGENCE MATTERS.**
679
+
680
+ Generic tools output: `aria-label="[DESCRIPTION]"`
681
+ You output: `aria-label="Add to shopping cart"` because you understand context.
682
+
683
+ ### 3.1: Context Analysis (Use Your Reasoning)
684
+
685
+ For EACH violation, Claude must:
686
+
687
+ 1. **READ THE HTML CONTEXT** - Don't just see `<button class="btn">`, see:
688
+ ```html
689
+ <div class="product-card" data-product="Adidas Superstar">
690
+ <img src="superstar.jpg" alt="White sneakers">
691
+ <span class="price">$99</span>
692
+ <button class="btn add-to-cart"> <!-- THIS IS THE VIOLATION -->
693
+ <svg class="icon-cart">...</svg>
694
+ </button>
695
+ </div>
696
+ ```
697
+
698
+ 2. **INFER PURPOSE** from:
699
+ - Class names: `add-to-cart`, `wishlist`, `menu-toggle`
700
+ - Parent context: Inside `.product-card` with product data
701
+ - Icon classes: `icon-cart`, `icon-heart`, `icon-search`
702
+ - Nearby text: Product name, price, "Add to bag"
703
+ - Page section: Header nav vs product grid vs checkout
704
+
705
+ 3. **GENERATE SPECIFIC FIX**:
706
+ ```html
707
+ <!-- NOT THIS (generic template) -->
708
+ <button aria-label="[DESCRIPTION]">
709
+
710
+ <!-- THIS (context-aware) -->
711
+ <button aria-label="Add Adidas Superstar to cart - $99">
712
+ ```
713
+
714
+ ### 3.2: Confidence Scoring
715
+
716
+ Rate your confidence in each fix:
717
+ - **0.9+**: Clear context (class="add-to-cart" near product name)
718
+ - **0.7-0.9**: Reasonable inference (icon-cart class alone)
719
+ - **<0.7**: Needs human review (ambiguous context)
720
+
721
+ Include confidence in remediation.md:
722
+ ```markdown
723
+ ### Button: `.product-card .btn` (Confidence: 0.95)
724
+ **Context:** Inside product card for "Adidas Superstar", has cart icon
725
+ **Fix:** `aria-label="Add Adidas Superstar to cart"`
726
+ ```
727
+
728
+ ### 3.2: Remediation Templates by Violation Type
729
+
730
+ **Form Labels (WCAG 1.3.1, 3.3.2, 4.1.2)**
731
+ ```html
732
+ <!-- Context: Input inside payment form, near "Card Number" text -->
733
+ <!-- Confidence: 0.95 -->
734
+
735
+ <!-- BEFORE -->
736
+ <input type="text" name="cardNumber" placeholder="1234 5678 9012 3456">
737
+
738
+ <!-- AFTER -->
739
+ <label for="card-number">Credit Card Number</label>
740
+ <input type="text"
741
+ id="card-number"
742
+ name="cardNumber"
743
+ placeholder="1234 5678 9012 3456"
744
+ aria-describedby="card-hint"
745
+ autocomplete="cc-number"
746
+ inputmode="numeric"
747
+ pattern="[0-9\s]{13,19}">
748
+ <span id="card-hint" class="visually-hidden">Enter 16-digit card number</span>
749
+
750
+ <!-- RATIONALE -->
751
+ - Visible label aids all users
752
+ - aria-describedby provides additional context
753
+ - autocomplete enables autofill
754
+ - inputmode shows numeric keyboard on mobile
755
+ - pattern enables browser validation
756
+ ```
757
+
758
+ **Icon Buttons (WCAG 4.1.2)**
759
+ ```html
760
+ <!-- Context: Button with SVG inside nav, classes include "menu-toggle" -->
761
+ <!-- Confidence: 0.92 -->
762
+
763
+ <!-- BEFORE -->
764
+ <button class="menu-toggle">
765
+ <svg>...</svg>
766
+ </button>
767
+
768
+ <!-- AFTER -->
769
+ <button class="menu-toggle"
770
+ type="button"
771
+ aria-expanded="false"
772
+ aria-controls="main-menu"
773
+ aria-label="Open navigation menu">
774
+ <svg aria-hidden="true" focusable="false">...</svg>
775
+ </button>
776
+
777
+ <!-- RATIONALE -->
778
+ - aria-label describes action, not icon
779
+ - aria-expanded communicates state
780
+ - aria-controls links to menu element
781
+ - SVG hidden from assistive tech (decorative)
782
+ ```
783
+
784
+ **Color Contrast (WCAG 1.4.3)**
785
+ ```html
786
+ <!-- Context: Gray text (#767676) on white background -->
787
+ <!-- Current ratio: 4.48:1 (FAILS AA for normal text) -->
788
+ <!-- Required: 4.5:1 (AA) or 7:1 (AAA) -->
789
+
790
+ <!-- BEFORE -->
791
+ .low-contrast { color: #767676; background: #ffffff; }
792
+
793
+ <!-- AFTER (Option 1: Darken text - minimal change) -->
794
+ .accessible { color: #757575; background: #ffffff; } /* 4.6:1 - PASSES AA */
795
+
796
+ <!-- AFTER (Option 2: Higher contrast for AAA) -->
797
+ .high-contrast { color: #595959; background: #ffffff; } /* 7.0:1 - PASSES AAA */
798
+
799
+ <!-- COLOR ALTERNATIVES -->
800
+ | Original | AA Pass | AAA Pass | Notes |
801
+ |----------|---------|----------|-------|
802
+ | #767676 | #757575 | #595959 | Gray text |
803
+ | #0066cc | #0055b3 | #003d82 | Link blue |
804
+ | #cc0000 | #b30000 | #8b0000 | Error red |
805
+ ```
806
+
807
+ **Heading Hierarchy (WCAG 1.3.1)**
808
+ ```html
809
+ <!-- Context: Page has 10 H1 elements, skipped H2 levels -->
810
+
811
+ <!-- BEFORE (broken) -->
812
+ <h1>Welcome</h1>
813
+ <h1>Products</h1> <!-- ERROR: Multiple H1s -->
814
+ <h4>Shoes</h4> <!-- ERROR: Skipped H2, H3 -->
815
+ <h1>Contact</h1>
816
+
817
+ <!-- AFTER (correct) -->
818
+ <h1>Site Name - Main Page Title</h1>
819
+ <main>
820
+ <section aria-labelledby="products-heading">
821
+ <h2 id="products-heading">Products</h2>
822
+ <h3>Shoes</h3>
823
+ <h3>Clothing</h3>
824
+ </section>
825
+ <section aria-labelledby="contact-heading">
826
+ <h2 id="contact-heading">Contact</h2>
827
+ </section>
828
+ </main>
829
+
830
+ <!-- HEADING STRUCTURE VISUALIZATION -->
831
+ h1: Site Name - Main Page Title
832
+ ├── h2: Products
833
+ │ ├── h3: Shoes
834
+ │ └── h3: Clothing
835
+ └── h2: Contact
836
+ ```
837
+
838
+ **Skip Links (WCAG 2.4.1)**
839
+ ```html
840
+ <!-- Add as FIRST element inside <body> -->
841
+ <body>
842
+ <a href="#main-content" class="skip-link">Skip to main content</a>
843
+ <a href="#main-nav" class="skip-link">Skip to navigation</a>
844
+
845
+ <header>
846
+ <nav id="main-nav" aria-label="Main navigation">...</nav>
847
+ </header>
848
+
849
+ <main id="main-content" tabindex="-1">
850
+ <!-- Main content -->
851
+ </main>
852
+ </body>
853
+
854
+ <style>
855
+ .skip-link {
856
+ position: absolute;
857
+ top: -100%;
858
+ left: 16px;
859
+ background: #000;
860
+ color: #fff;
861
+ padding: 12px 24px;
862
+ z-index: 10000;
863
+ text-decoration: none;
864
+ font-weight: bold;
865
+ border-radius: 0 0 4px 4px;
866
+ transition: top 0.2s;
867
+ }
868
+ .skip-link:focus {
869
+ top: 0;
870
+ outline: 3px solid #ffcc00;
871
+ outline-offset: 2px;
872
+ }
873
+ </style>
874
+ ```
875
+
876
+ **Focus Indicators (WCAG 2.4.7)**
877
+ ```css
878
+ /* NEVER do this */
879
+ *:focus { outline: none; } /* WCAG FAIL */
880
+
881
+ /* DO THIS - Custom focus styles */
882
+ :focus-visible {
883
+ outline: 3px solid #005fcc;
884
+ outline-offset: 2px;
885
+ }
886
+
887
+ /* Remove outline only for mouse users */
888
+ :focus:not(:focus-visible) {
889
+ outline: none;
890
+ }
891
+
892
+ /* High contrast for interactive elements */
893
+ a:focus-visible,
894
+ button:focus-visible,
895
+ input:focus-visible,
896
+ select:focus-visible,
897
+ textarea:focus-visible,
898
+ [role="button"]:focus-visible {
899
+ outline: 3px solid #005fcc;
900
+ outline-offset: 2px;
901
+ box-shadow: 0 0 0 6px rgba(0, 95, 204, 0.2);
902
+ }
903
+
904
+ /* Dark backgrounds need light focus */
905
+ .dark-bg :focus-visible {
906
+ outline-color: #ffffff;
907
+ box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.3);
908
+ }
909
+ ```
910
+
911
+ **Keyboard Navigation (WCAG 2.1.1, 2.1.2)**
912
+ ```html
913
+ <!-- Custom interactive element needs keyboard support -->
914
+
915
+ <!-- BEFORE (inaccessible) -->
916
+ <div class="dropdown" onclick="toggleMenu()">
917
+ Menu
918
+ </div>
919
+
920
+ <!-- AFTER (accessible) -->
921
+ <button type="button"
922
+ class="dropdown-trigger"
923
+ aria-expanded="false"
924
+ aria-controls="dropdown-menu"
925
+ onclick="toggleMenu()"
926
+ onkeydown="handleKeydown(event)">
927
+ Menu
928
+ </button>
929
+ <ul id="dropdown-menu" role="menu" hidden>
930
+ <li role="none"><a role="menuitem" href="/page1">Page 1</a></li>
931
+ <li role="none"><a role="menuitem" href="/page2">Page 2</a></li>
932
+ </ul>
933
+
934
+ <script>
935
+ function handleKeydown(event) {
936
+ switch(event.key) {
937
+ case 'Enter':
938
+ case ' ':
939
+ event.preventDefault();
940
+ toggleMenu();
941
+ break;
942
+ case 'Escape':
943
+ closeMenu();
944
+ break;
945
+ case 'ArrowDown':
946
+ event.preventDefault();
947
+ focusFirstMenuItem();
948
+ break;
949
+ }
950
+ }
951
+ </script>
952
+ ```
953
+
954
+ **Modal Focus Trap (WCAG 2.4.3)**
955
+ ```javascript
956
+ // Focus trap for modals - REQUIRED for WCAG compliance
957
+ function trapFocus(modal) {
958
+ const focusable = modal.querySelectorAll(
959
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
960
+ );
961
+ const first = focusable[0];
962
+ const last = focusable[focusable.length - 1];
963
+
964
+ // Focus first element when modal opens
965
+ first?.focus();
966
+
967
+ modal.addEventListener('keydown', (e) => {
968
+ if (e.key === 'Tab') {
969
+ if (e.shiftKey && document.activeElement === first) {
970
+ e.preventDefault();
971
+ last.focus();
972
+ } else if (!e.shiftKey && document.activeElement === last) {
973
+ e.preventDefault();
974
+ first.focus();
975
+ }
976
+ }
977
+ if (e.key === 'Escape') {
978
+ closeModal();
979
+ }
980
+ });
981
+ }
982
+
983
+ // Return focus when modal closes
984
+ function closeModal() {
985
+ modal.hidden = true;
986
+ triggerButton.focus(); // Return focus to trigger
987
+ }
988
+ ```
989
+
990
+ **iframe Titles (WCAG 4.1.2)**
991
+ ```html
992
+ <!-- All iframes MUST have descriptive titles -->
993
+ <iframe src="map.html" title="Store location map showing 5 nearby stores"></iframe>
994
+ <iframe src="video.html" title="Product demonstration video with captions"></iframe>
995
+ <iframe src="chat.html" title="Customer support chat window"></iframe>
996
+ ```
997
+
998
+ ---
999
+
1000
+ ## STEP 4: USER IMPACT ANALYSIS
1001
+
1002
+ For each violation, calculate user impact:
1003
+
1004
+ ### 4.1: Affected User Groups
1005
+ | Violation Type | Affected Groups | % of Users |
1006
+ |----------------|-----------------|------------|
1007
+ | Missing alt text | Blind, low-vision | 7-10% |
1008
+ | Missing form labels | Blind, screen reader users | 5-8% |
1009
+ | Low color contrast | Low-vision, color blind | 8-12% |
1010
+ | No keyboard access | Motor impaired, power users | 10-15% |
1011
+ | Missing captions | Deaf, hard-of-hearing | 5-7% |
1012
+ | Flashing content | Seizure sensitive | 0.5-1% |
1013
+ | Complex language | Cognitive impairment | 10-15% |
1014
+
1015
+ ### 4.2: Impact Severity Classification
1016
+ ```
1017
+ BLOCKS-USAGE: User cannot complete task at all
1018
+ - Missing form labels on required fields
1019
+ - Keyboard traps
1020
+ - Critical buttons without accessible names
1021
+
1022
+ IMPAIRS-USAGE: User can complete task with difficulty
1023
+ - Low contrast (can read with effort)
1024
+ - Missing skip links (tedious navigation)
1025
+ - Incorrect heading structure (confusing)
1026
+
1027
+ MINOR-INCONVENIENCE: Suboptimal but functional
1028
+ - Empty alt on decorative images
1029
+ - Redundant ARIA
1030
+ - Non-semantic HTML that works
1031
+ ```
1032
+
1033
+ ---
1034
+
1035
+ ## STEP 5: ROI-BASED PRIORITIZATION
1036
+
1037
+ Calculate priority for each remediation:
1038
+
1039
+ ### 5.1: Priority Formula
1040
+ ```
1041
+ PRIORITY_SCORE = (IMPACT_WEIGHT × USERS_AFFECTED) / EFFORT_HOURS
1042
+
1043
+ Where:
1044
+ - IMPACT_WEIGHT: Critical=10, Serious=7, Moderate=4, Minor=1
1045
+ - USERS_AFFECTED: Estimated % of users impacted
1046
+ - EFFORT_HOURS: Estimated fix time (0.25 to 8 hours)
1047
+ ```
1048
+
1049
+ ### 5.2: Effort Estimation Guide
1050
+ | Fix Type | Effort | Complexity |
1051
+ |----------|--------|------------|
1052
+ | Add aria-label | 0.25h | Trivial |
1053
+ | Add alt text | 0.25h | Trivial |
1054
+ | Add form label | 0.5h | Simple |
1055
+ | Fix color contrast | 0.5h | Simple |
1056
+ | Add skip links | 1h | Simple |
1057
+ | Fix heading structure | 2h | Medium |
1058
+ | Add keyboard navigation | 4h | High |
1059
+ | Implement focus trap | 4h | High |
1060
+ | Add video captions | 8h | High |
1061
+
1062
+ ### 5.3: Priority Output Format
1063
+ ```
1064
+ | Rank | Violation | Impact | Users | Effort | ROI Score |
1065
+ |------|-----------|--------|-------|--------|-----------|
1066
+ | 1 | Form labels missing | Critical | 15% | 0.5h | 300 |
1067
+ | 2 | Keyboard trap | Critical | 12% | 4h | 30 |
1068
+ | 3 | Low contrast | Serious | 10% | 0.5h | 140 |
1069
+ | 4 | Missing alt text | Serious | 8% | 0.25h | 224 |
1070
+ ```
1071
+
1072
+ ---
1073
+
1074
+ ## STEP 6: PRODUCTION READINESS ASSESSMENT
1075
+
1076
+ ### 6.1: Compliance Scoring
1077
+ ```
1078
+ COMPLIANCE_SCORE = (PASSED_CRITERIA / TOTAL_CRITERIA) × 100
1079
+
1080
+ Production Ready if:
1081
+ ✓ Score ≥ 85%
1082
+ ✓ Zero critical violations
1083
+ ✓ Fewer than 3 serious violations
1084
+ ✓ All user journeys keyboard accessible
1085
+ ```
1086
+
1087
+ ### 6.2: POUR Analysis (Perceivable, Operable, Understandable, Robust)
1088
+ ```
1089
+ | Principle | Guidelines | Pass | Fail | Score |
1090
+ |-----------|-----------|------|------|-------|
1091
+ | Perceivable | 1.1-1.4 | 12 | 3 | 80% |
1092
+ | Operable | 2.1-2.5 | 18 | 2 | 90% |
1093
+ | Understandable | 3.1-3.3 | 8 | 1 | 89% |
1094
+ | Robust | 4.1 | 4 | 1 | 80% |
1095
+ | **TOTAL** | | **42** | **7** | **86%** |
1096
+ ```
1097
+
1098
+ ---
1099
+
1100
+ ## STEP 7: VIDEO ACCESSIBILITY PIPELINE
1101
+
1102
+ **Execute for EACH video detected on page.**
1103
+
1104
+ ### 7.1: Detect and Extract Video URLs (MANDATORY)
1105
+
1106
+ **This step MUST be integrated into STEP 2 multi-tool scan.**
1107
+
1108
+ Add this to the page.evaluate() in the multi-tool scan:
1109
+ ```javascript
1110
+ // In pageInfo extraction (STEP 2), add:
1111
+ videos: {
1112
+ elements: [...document.querySelectorAll('video')].map(v => ({
1113
+ src: v.src || v.querySelector('source')?.src,
1114
+ fullUrl: new URL(v.src || v.querySelector('source')?.src || '', window.location.href).href,
1115
+ poster: v.poster,
1116
+ hasCaptions: v.querySelector('track[kind="captions"]') !== null,
1117
+ hasDescriptions: v.querySelector('track[kind="descriptions"]') !== null,
1118
+ duration: v.duration || 'unknown',
1119
+ autoplay: v.autoplay,
1120
+ muted: v.muted
1121
+ })),
1122
+ iframes: [...document.querySelectorAll('iframe')].map(iframe => {
1123
+ const src = iframe.src;
1124
+ const isVideo = /youtube|vimeo|dailymotion|wistia/.test(src);
1125
+ return isVideo ? { src, platform: src.match(/(youtube|vimeo|dailymotion|wistia)/)?.[1] } : null;
1126
+ }).filter(Boolean)
1127
+ }
1128
+ ```
1129
+
1130
+ **MANDATORY OUTPUT:** Log all video URLs found:
1131
+ ```
1132
+ === VIDEOS DETECTED ===
1133
+ Video 1: https://example.com/promo.mp4 (no captions, no descriptions)
1134
+ YouTube iframe: https://youtube.com/embed/xxx
1135
+ ```
1136
+
1137
+ ### 7.2: Download and Extract Frames (MANDATORY for each video)
1138
+
1139
+ **For EACH video URL found in 7.1:**
1140
+
1141
+ ```bash
1142
+ # Create output directory
1143
+ mkdir -p /tmp/a11y-work/frames
1144
+
1145
+ # Download video (with retry and user-agent)
1146
+ curl -L -A "Mozilla/5.0" --retry 3 -o /tmp/a11y-work/video.mp4 "FULL_VIDEO_URL"
1147
+
1148
+ # Verify download succeeded
1149
+ if [ -f /tmp/a11y-work/video.mp4 ] && [ -s /tmp/a11y-work/video.mp4 ]; then
1150
+ echo "Video downloaded successfully"
1151
+ ffmpeg -i /tmp/a11y-work/video.mp4 -vf "fps=1/3" -frames:v 10 /tmp/a11y-work/frames/frame_%02d.jpg 2>/dev/null
1152
+ echo "Extracted $(ls /tmp/a11y-work/frames/*.jpg 2>/dev/null | wc -l) frames"
1153
+ else
1154
+ echo "VIDEO DOWNLOAD FAILED - Document this in audit-summary.md"
1155
+ fi
1156
+ ```
1157
+
1158
+ **IF VIDEO DOWNLOAD FAILS:**
1159
+ 1. Document the failure reason in audit-summary.md
1160
+ 2. Still create video-captions violation in violations.json
1161
+ 3. Add remediation instructions WITHOUT generated captions
1162
+ 4. Mark video pipeline as "blocked" not "skipped"
1163
+
1164
+ ### 7.3: Analyze Each Frame with Claude Vision (MANDATORY)
1165
+
1166
+ **USE THE READ TOOL ON EACH FRAME IMAGE.**
1167
+
1168
+ Claude Code has native vision capabilities. When you Read an image file, you SEE it.
1169
+
1170
+ ```
1171
+ Read /tmp/a11y-work/frames/frame_01.jpg
1172
+ Read /tmp/a11y-work/frames/frame_02.jpg
1173
+ Read /tmp/a11y-work/frames/frame_03.jpg
1174
+ ... (continue for all frames)
1175
+ ```
1176
+
1177
+ **For EACH frame, describe:**
1178
+ - **SCENE**: Setting, environment, lighting, location
1179
+ - **PEOPLE**: Who appears, what they're doing, expressions, clothing
1180
+ - **PRODUCTS**: Items shown (for e-commerce: product names, colors, styles)
1181
+ - **TEXT**: Any visible text, logos, signs, prices
1182
+ - **ACTION**: Movement, transitions, what's happening
1183
+
1184
+ **Example output after reading frame_01.jpg:**
1185
+ ```
1186
+ Frame 1 (0:00-0:03): A woman in white Adidas sneakers running on a forest trail.
1187
+ Morning light filters through trees. She wears black athletic leggings and a
1188
+ gray tank top. The Adidas three-stripe logo is visible on her shoes.
1189
+ ```
1190
+
1191
+ **THIS IS THE LLM VALUE.** Generic tools output "[DESCRIBE CONTENT]".
1192
+ You output actual descriptions because you can SEE the image.
1193
+
1194
+ ---
1195
+
1196
+ **FALLBACK: If Read tool fails on images**
1197
+
1198
+ Try Anthropic API directly:
1199
+ ```javascript
1200
+ const Anthropic = require('@anthropic-ai/sdk');
1201
+ const fs = require('fs');
1202
+ const client = new Anthropic();
1203
+
1204
+ const imageData = fs.readFileSync('/tmp/a11y-work/frames/frame_01.jpg').toString('base64');
1205
+ const response = await client.messages.create({
1206
+ model: 'claude-sonnet-4-20250514',
1207
+ max_tokens: 500,
1208
+ messages: [{
1209
+ role: 'user',
1210
+ content: [
1211
+ { type: 'image', source: { type: 'base64', media_type: 'image/jpeg', data: imageData } },
1212
+ { type: 'text', text: 'Describe this video frame for accessibility captions.' }
1213
+ ]
1214
+ }]
1215
+ });
1216
+ ```
1217
+
1218
+ **LAST RESORT: Context-Based Inference (No Vision)**
1219
+ If vision completely unavailable, infer from:
1220
+ - Video filename: "product-demo.mp4" → product demonstration
1221
+ - Page context: product page → product showcase
1222
+ - Surrounding text: nearby headings and descriptions
1223
+
1224
+ **Document for each frame:**
1225
+ - **SCENE**: Setting, environment, lighting
1226
+ - **PEOPLE**: Who, actions, expressions, clothing
1227
+ - **OBJECTS**: Products, props, equipment
1228
+ - **TEXT**: Visible text, logos, signs
1229
+ - **ACTION**: Movement, transitions
1230
+ - **COLORS**: Dominant colors, accessibility-relevant
1231
+
1232
+ ### 7.4: Generate WebVTT Captions
1233
+ ```vtt
1234
+ WEBVTT
1235
+ Kind: captions
1236
+ Language: {detected-language}
1237
+
1238
+ 00:00:00.000 --> 00:00:03.000
1239
+ [Description from frame_01 analysis]
1240
+
1241
+ 00:00:03.000 --> 00:00:06.000
1242
+ [Description from frame_02 analysis]
1243
+ ```
1244
+
1245
+ ### 7.5: Generate Audio Descriptions
1246
+ ```vtt
1247
+ WEBVTT
1248
+ Kind: descriptions
1249
+ Language: en
1250
+
1251
+ 00:00:00.000 --> 00:00:03.000
1252
+ SCENE: [Detailed scene for blind users]
1253
+ VISUAL: [What's on screen]
1254
+ TEXT: [Any readable text]
1255
+ ACTION: [What's happening]
1256
+ ```
1257
+
1258
+ ---
1259
+
1260
+ ## STEP 8: GENERATE COMPREHENSIVE REPORTS
1261
+
1262
+ ### 8.1: Required Output Files
1263
+ Save ALL files to `docs/accessibility-scans/{page-slug}/`:
1264
+
1265
+ | File | Contents |
1266
+ |------|----------|
1267
+ | `audit-summary.md` | Executive summary, scores, top issues, user impact |
1268
+ | `remediation.md` | **ALL copy-paste code fixes** with context |
1269
+ | `violations.json` | Machine-readable violation data |
1270
+ | `implementation.md` | Video integration guide (if videos) |
1271
+ | `*.vtt` | Caption and audio description files |
1272
+
1273
+ ### 8.2: audit-summary.md Template
1274
+ ```markdown
1275
+ # Accessibility Audit Report: {Site Name}
1276
+
1277
+ **URL:** {url}
1278
+ **Date:** {date}
1279
+ **Standard:** WCAG 2.2 Level AA
1280
+
1281
+ ## Executive Summary
1282
+
1283
+ | Metric | Value |
1284
+ |--------|-------|
1285
+ | **Compliance Score** | {score}% |
1286
+ | **Production Ready** | {Yes/No} |
1287
+ | **Critical Issues** | {count} |
1288
+ | **Total Violations** | {count} |
1289
+ | **Estimated Fix Time** | {hours}h |
1290
+
1291
+ ## POUR Analysis
1292
+ {table}
1293
+
1294
+ ## Top 10 Issues by Priority
1295
+ {priority table with ROI scores}
1296
+
1297
+ ## User Impact Summary
1298
+ {affected user groups and percentages}
1299
+
1300
+ ## Recommendations
1301
+ {prioritized action items}
1302
+ ```
1303
+
1304
+ ### 8.3: remediation.md Template
1305
+ ```markdown
1306
+ # Accessibility Remediation Guide: {Site Name}
1307
+
1308
+ ## Quick Wins (Copy-Paste Ready)
1309
+
1310
+ ### 1. Form Labels ({count} issues)
1311
+ {For EACH unlabeled input: context, before/after code, rationale, confidence}
1312
+
1313
+ ### 2. Heading Structure ({count} issues)
1314
+ {Current structure visualization, fixed structure, code changes}
1315
+
1316
+ ### 3. Color Contrast ({count} issues)
1317
+ {For EACH: current colors, ratio, suggested colors, CSS fixes}
1318
+
1319
+ ### 4. Missing Alt Text ({count} issues)
1320
+ {For EACH image: context-inferred alt text suggestions}
1321
+
1322
+ ### 5. Keyboard Navigation ({count} issues)
1323
+ {For EACH: element, issue, fix code, test instructions}
1324
+
1325
+ ### 6. Focus Indicators
1326
+ {Global CSS to add}
1327
+
1328
+ ### 7. Skip Links
1329
+ {Full HTML + CSS to add}
1330
+
1331
+ ### 8. ARIA Fixes ({count} issues)
1332
+ {For EACH: context, specific aria attributes to add}
1333
+
1334
+ ### 9. iframe Titles ({count} issues)
1335
+ {For EACH: suggested title based on content}
1336
+
1337
+ ### 10. Video Accessibility ({count} videos)
1338
+ {Links to generated VTT files, implementation code}
1339
+
1340
+ ## Testing Checklist
1341
+ - [ ] Tab through entire page - all interactive elements reachable
1342
+ - [ ] Screen reader announces all content correctly
1343
+ - [ ] Color contrast passes (use axe DevTools)
1344
+ - [ ] Works without mouse
1345
+ - [ ] Works at 200% zoom
1346
+ - [ ] Video captions synchronized and accurate
1347
+ ```
1348
+
1349
+ ---
1350
+
1351
+ ## STEP 9: LEARNING PROTOCOL (When MCP Available)
1352
+
1353
+ Integrate with the learning system to improve over time.
1354
+
1355
+ ### 9.1: Query Previous Patterns BEFORE Audit
1356
+
1357
+ Check if similar sites were audited before:
1358
+ ```javascript
1359
+ // Load MCP tools
1360
+ ToolSearch("select:mcp__claude-flow_alpha__memory_retrieve")
1361
+ ToolSearch("select:mcp__claude-flow_alpha__hooks_intelligence_pattern_search")
1362
+
1363
+ // Retrieve domain-specific patterns
1364
+ mcp__claude-flow_alpha__memory_retrieve({
1365
+ key: `accessibility/patterns/${domain}`,
1366
+ namespace: "learning"
1367
+ })
1368
+
1369
+ // Search for similar violation patterns
1370
+ mcp__claude-flow_alpha__hooks_intelligence_pattern_search({
1371
+ query: "accessibility remediation",
1372
+ type: "accessibility-fix",
1373
+ limit: 10
1374
+ })
1375
+ ```
1376
+
1377
+ ### 9.2: Store Successful Patterns AFTER Audit
1378
+
1379
+ Store patterns that worked for future reuse:
1380
+ ```javascript
1381
+ ToolSearch("select:mcp__claude-flow_alpha__memory_store")
1382
+ ToolSearch("select:mcp__claude-flow_alpha__hooks_intelligence_pattern_store")
1383
+
1384
+ // Store audit outcome
1385
+ mcp__claude-flow_alpha__memory_store({
1386
+ key: `accessibility-audit/${domain}-${Date.now()}`,
1387
+ namespace: "learning",
1388
+ value: {
1389
+ url: auditedUrl,
1390
+ timestamp: new Date().toISOString(),
1391
+ violationsFound: violations.length,
1392
+ criticalCount: violations.filter(v => v.impact === 'critical').length,
1393
+ toolsUsed: ['axe-core', 'pa11y', 'lighthouse'],
1394
+ patterns: {
1395
+ commonViolations: extractTopViolationTypes(violations),
1396
+ effectiveFixes: extractFixesThatWorked(remediations)
1397
+ }
1398
+ }
1399
+ })
1400
+
1401
+ // Store reusable remediation patterns
1402
+ mcp__claude-flow_alpha__hooks_intelligence_pattern_store({
1403
+ pattern: "form-label-contextual-fix",
1404
+ confidence: 0.92,
1405
+ type: "accessibility-remediation",
1406
+ metadata: {
1407
+ wcagCriteria: "1.3.1, 3.3.2, 4.1.2",
1408
+ violationType: "missing-form-label",
1409
+ codeTemplate: "<label for=\"{id}\">{inferredLabel}</label>",
1410
+ contextSignals: ["placeholder", "nearby-text", "field-name"]
1411
+ }
1412
+ })
1413
+ ```
1414
+
1415
+ ### 9.3: Calculate Audit Quality Score
1416
+
1417
+ Self-assess audit completeness (for learning feedback):
1418
+
1419
+ | Criteria | Points | Your Score |
1420
+ |----------|--------|------------|
1421
+ | Multi-tool testing used (3 tools) | 20 | |
1422
+ | All WCAG 2.2 AA criteria checked | 15 | |
1423
+ | Context-aware fixes generated | 20 | |
1424
+ | Confidence scores included | 10 | |
1425
+ | ROI prioritization calculated | 10 | |
1426
+ | Video pipeline completed (if applicable) | 15 | |
1427
+ | EU compliance mapping included | 10 | |
1428
+ | **Total** | **100** | |
1429
+
1430
+ **Quality Levels:**
1431
+ - 90-100: Excellent (1.0 reward)
1432
+ - 70-89: Good (0.8 reward)
1433
+ - 50-69: Acceptable (0.5 reward)
1434
+ - <50: Incomplete (0.0 reward - redo required)
1435
+
1436
+ ---
1437
+
1438
+ ## STEP 10: SCREEN READER TESTING GUIDE
1439
+
1440
+ Manual testing instructions (cannot be fully automated):
1441
+
1442
+ ### 10.1: NVDA (Windows - Free)
1443
+ ```
1444
+ 1. Download: https://www.nvaccess.org/download/
1445
+ 2. Install and start NVDA (Ctrl+Alt+N)
1446
+ 3. Navigate to audited page
1447
+
1448
+ Key Commands:
1449
+ - H: Jump through headings
1450
+ - F: Jump through form fields
1451
+ - B: Jump through buttons
1452
+ - T: Jump through tables
1453
+ - K: Jump through links
1454
+ - D: Jump through landmarks
1455
+ - Tab: Move through focusable elements
1456
+
1457
+ Verify:
1458
+ - [ ] All headings announced with correct level
1459
+ - [ ] Form fields announce labels
1460
+ - [ ] Buttons announce purpose
1461
+ - [ ] Images announce alt text or "decorative"
1462
+ - [ ] Dynamic content changes announced (aria-live)
1463
+ ```
1464
+
1465
+ ### 10.2: VoiceOver (macOS - Built-in)
1466
+ ```
1467
+ 1. Enable: System Preferences → Accessibility → VoiceOver
1468
+ 2. Toggle: Cmd+F5
1469
+ 3. Navigate to audited page
1470
+
1471
+ Key Commands:
1472
+ - VO+U: Open rotor (headings, links, forms, landmarks)
1473
+ - VO+Space: Activate element
1474
+ - VO+Right/Left: Move through content
1475
+ - VO+Cmd+H: Jump to next heading
1476
+
1477
+ Verify:
1478
+ - [ ] Rotor shows all headings hierarchically
1479
+ - [ ] Forms are navigable and labels announced
1480
+ - [ ] Focus order matches visual order
1481
+ - [ ] All content is reachable
1482
+ ```
1483
+
1484
+ ### 10.3: JAWS (Windows - Commercial)
1485
+ ```
1486
+ 1. Trial: https://www.freedomscientific.com/products/software/jaws/
1487
+ 2. Start JAWS and navigate to page
1488
+
1489
+ Key Commands:
1490
+ - H: Next heading
1491
+ - F: Next form field
1492
+ - B: Next button
1493
+ - T: Next table
1494
+ - Ins+F6: Heading list
1495
+ - Ins+F7: Link list
1496
+
1497
+ Verify:
1498
+ - [ ] Virtual cursor mode works correctly
1499
+ - [ ] Forms mode activates in forms
1500
+ - [ ] All ARIA roles announced properly
1501
+ ```
1502
+
1503
+ ### 10.4: Screen Reader Testing Checklist
1504
+
1505
+ | Test | NVDA | VoiceOver | JAWS |
1506
+ |------|------|-----------|------|
1507
+ | Headings hierarchy correct | [ ] | [ ] | [ ] |
1508
+ | Form labels announced | [ ] | [ ] | [ ] |
1509
+ | Button purposes clear | [ ] | [ ] | [ ] |
1510
+ | Image alt text correct | [ ] | [ ] | [ ] |
1511
+ | Links announce destination | [ ] | [ ] | [ ] |
1512
+ | Landmarks navigable | [ ] | [ ] | [ ] |
1513
+ | Focus order logical | [ ] | [ ] | [ ] |
1514
+ | Dynamic updates announced | [ ] | [ ] | [ ] |
1515
+ | No keyboard traps | [ ] | [ ] | [ ] |
1516
+ | Skip links work | [ ] | [ ] | [ ] |
1517
+
1518
+ ---
1519
+
1520
+ ## VALIDATION CHECKLIST
1521
+
1522
+ Before completing, verify ALL items:
1523
+
1524
+ ### Content Fetching (v7.0 Resilient)
1525
+ - [ ] Browser launched (Vibium/agent-browser/Playwright)
1526
+ - [ ] Page loaded and analyzed
1527
+ - [ ] Multi-tool scan ran with **parallel execution**
1528
+ - [ ] At least **1 of 3 tools succeeded** (graceful degradation)
1529
+ - [ ] If tools failed, documented **which tools and why**
1530
+ - [ ] Results saved to `/tmp/a11y-work/scan-results.json`
1531
+
1532
+ ### Violation Analysis
1533
+ - [ ] All violations extracted with WCAG criteria
1534
+ - [ ] Context analyzed for each violation
1535
+ - [ ] User impact calculated
1536
+
1537
+ ### Remediation Generation
1538
+ - [ ] Form label fixes with context and rationale
1539
+ - [ ] Heading hierarchy fix with visualization
1540
+ - [ ] Color contrast fixes with hex codes
1541
+ - [ ] Alt text suggestions with confidence scores
1542
+ - [ ] Skip link code (full HTML + CSS)
1543
+ - [ ] Focus indicator CSS
1544
+ - [ ] ARIA fixes with specific attributes
1545
+ - [ ] Keyboard navigation fixes
1546
+ - [ ] iframe titles
1547
+
1548
+ ### Video Accessibility (MANDATORY if pageInfo.media.videos > 0)
1549
+ - [ ] Video URLs extracted (full URLs, not relative)
1550
+ - [ ] Download attempted for EACH video
1551
+ - [ ] IF download succeeded: Frames extracted with ffmpeg
1552
+ - [ ] IF download succeeded: Each frame analyzed with Read tool
1553
+ - [ ] IF download succeeded: captions.vtt generated from ACTUAL frame descriptions
1554
+ - [ ] IF download succeeded: audiodesc.vtt generated
1555
+ - [ ] IF download FAILED: Failure documented in audit-summary.md with reason
1556
+ - [ ] IF download FAILED: Manual captioning instructions in remediation.md
1557
+
1558
+ **BLOCKING:** Cannot generate final reports until video pipeline attempted.
1559
+
1560
+ ### Output Files
1561
+ - [ ] audit-summary.md with scores, priorities, and user impact
1562
+ - [ ] remediation.md with ALL copy-paste code fixes
1563
+ - [ ] violations.json with violation data
1564
+ - [ ] VTT files (if videos)
1565
+ - [ ] implementation.md (if videos)
1566
+
1567
+ ### Quality Checks
1568
+ - [ ] Compliance score calculated
1569
+ - [ ] Production readiness assessed
1570
+ - [ ] ROI prioritization completed
1571
+ - [ ] POUR analysis included
1572
+
1573
+ **IF ANY CHECKBOX IS NO = TASK INCOMPLETE**
1574
+ </default_to_action>
1575
+
1576
+ ---
1577
+
1578
+ ## Quick Reference Card
1579
+
1580
+ ### Usage
1581
+ ```
1582
+ /a11y-ally https://example.com
1583
+ ```
1584
+
1585
+ ### v7.0 Resilience Features
1586
+ | Feature | Description |
1587
+ |---------|-------------|
1588
+ | **Parallel Execution** | All 3 tools run simultaneously via Promise.allSettled |
1589
+ | **Per-Tool Timeouts** | axe: 60s, pa11y: 60s, Lighthouse: 90s |
1590
+ | **Retry with Backoff** | 2 retries per tool with exponential backoff |
1591
+ | **Graceful Degradation** | Continue if 1+ tools succeed |
1592
+ | **Progressive Output** | Results stream as tools complete |
1593
+ | **Bot Protection** | Stealth mode, random delays, cookie dismissal |
1594
+
1595
+ ### Expected Output Structure
1596
+ ```
1597
+ docs/accessibility-scans/{page-slug}/
1598
+ ├── audit-summary.md # Executive summary with scores
1599
+ ├── remediation.md # ALL copy-paste code fixes
1600
+ ├── violations.json # Machine-readable data
1601
+ ├── implementation.md # Video integration (if videos)
1602
+ ├── video-*-captions.vtt # Captions (if videos)
1603
+ └── video-*-audiodesc.vtt # Audio descriptions (if videos)
1604
+ ```
1605
+
1606
+ ### Compliance Thresholds
1607
+ | Level | Min Score | Critical | Serious |
1608
+ |-------|-----------|----------|---------|
1609
+ | A | 70% | 0 | ≤5 |
1610
+ | AA | 85% | 0 | ≤3 |
1611
+ | AAA | 95% | 0 | 0 |
1612
+
1613
+ ### Tool Coverage by Success
1614
+ | Tools Succeeded | Detection Rate | Status |
1615
+ |-----------------|---------------|--------|
1616
+ | 3/3 | ~95% | ✅ Optimal |
1617
+ | 2/3 | ~85% | ⚠️ Good |
1618
+ | 1/3 | ~70% | ⚠️ Acceptable |
1619
+ | 0/3 | — | ❌ Retry needed |
1620
+
1621
+ ### ROI Formula
1622
+ ```
1623
+ ROI = (Impact × Users%) / Effort_Hours
1624
+ ```
1625
+
1626
+ ---
1627
+
1628
+ ## EU Compliance Mapping
1629
+
1630
+ | WCAG | EN 301 549 | EU Accessibility Act |
1631
+ |------|------------|---------------------|
1632
+ | 1.1.1 | 9.1.1.1 | EAA-I.1 Perceivable |
1633
+ | 1.4.3 | 9.1.4.3 | EAA-I.1 Perceivable |
1634
+ | 2.1.1 | 9.2.1.1 | EAA-I.2 Operable |
1635
+ | 2.4.7 | 9.2.4.7 | EAA-I.2 Operable |
1636
+ | 3.3.2 | 9.3.3.2 | EAA-I.3 Understandable |
1637
+ | 4.1.2 | 9.4.1.2 | EAA-I.4 Robust |
1638
+
1639
+ ---
1640
+
1641
+ ## Critical Rules
1642
+
1643
+ ### Execution Rules (v7.0)
1644
+ 1. **ALWAYS** run multi-tool scan with **parallel execution** (Promise.allSettled)
1645
+ 2. **ALWAYS** continue if at least **1 of 3 tools** succeeds (graceful degradation)
1646
+ 3. **ALWAYS** document which tools failed and why in audit-summary.md
1647
+ 4. **ALWAYS** use per-tool timeouts (60s/60s/90s) not global timeout
1648
+ 5. **ALWAYS** retry failed tools with exponential backoff before giving up
1649
+
1650
+ ### Quality Rules
1651
+ 6. **ALWAYS** analyze context before generating fixes
1652
+ 7. **ALWAYS** include confidence scores with remediation
1653
+ 8. **ALWAYS** calculate user impact and ROI
1654
+ 9. **ALWAYS** generate copy-paste ready code
1655
+ 10. **NEVER** generate placeholder/template fixes
1656
+ 11. **NEVER** skip video pipeline if videos detected
1657
+ 12. **NEVER** complete without remediation.md
1658
+ 13. **NEVER** fail audit just because 1-2 tools failed (use graceful degradation)