qa-skills 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/README.md +20 -149
  2. package/bin/cli.js +1 -40
  3. package/package.json +23 -26
  4. package/dist/agents/registry.d.ts +0 -5
  5. package/dist/agents/registry.d.ts.map +0 -1
  6. package/dist/agents/registry.js +0 -101
  7. package/dist/agents/registry.js.map +0 -1
  8. package/dist/agents/types.d.ts +0 -9
  9. package/dist/agents/types.d.ts.map +0 -1
  10. package/dist/agents/types.js +0 -2
  11. package/dist/agents/types.js.map +0 -1
  12. package/dist/dependencies.d.ts +0 -21
  13. package/dist/dependencies.d.ts.map +0 -1
  14. package/dist/dependencies.js +0 -125
  15. package/dist/dependencies.js.map +0 -1
  16. package/dist/installer.d.ts +0 -25
  17. package/dist/installer.d.ts.map +0 -1
  18. package/dist/installer.js +0 -437
  19. package/dist/installer.js.map +0 -1
  20. package/dist/scaffold.d.ts +0 -27
  21. package/dist/scaffold.d.ts.map +0 -1
  22. package/dist/scaffold.js +0 -182
  23. package/dist/scaffold.js.map +0 -1
  24. package/skills/qa-accessibility-test-writer/SKILL.md +0 -127
  25. package/skills/qa-accessibility-test-writer/references/axe-core-patterns.md +0 -349
  26. package/skills/qa-accessibility-test-writer/references/best-practices.md +0 -184
  27. package/skills/qa-accessibility-test-writer/references/wcag-tests.md +0 -331
  28. package/skills/qa-api-contract-curator/SKILL.md +0 -104
  29. package/skills/qa-api-contract-curator/references/breaking-changes.md +0 -363
  30. package/skills/qa-api-contract-curator/references/openapi-structure.md +0 -404
  31. package/skills/qa-browser-data-collector/SKILL.md +0 -132
  32. package/skills/qa-browser-data-collector/references/data-collection-checklist.md +0 -91
  33. package/skills/qa-browser-data-collector/references/playwright-mcp-patterns.md +0 -113
  34. package/skills/qa-bug-ticket-creator/SKILL.md +0 -148
  35. package/skills/qa-bug-ticket-creator/references/bug-report-format.md +0 -149
  36. package/skills/qa-bug-ticket-creator/references/severity-guide.md +0 -81
  37. package/skills/qa-bug-ticket-creator/templates/bug-ticket-template.md +0 -39
  38. package/skills/qa-changelog-analyzer/SKILL.md +0 -134
  39. package/skills/qa-changelog-analyzer/references/git-analysis-patterns.md +0 -138
  40. package/skills/qa-changelog-analyzer/references/impact-mapping.md +0 -120
  41. package/skills/qa-clickup-integration/SKILL.md +0 -166
  42. package/skills/qa-clickup-integration/references/api-patterns.md +0 -102
  43. package/skills/qa-clickup-integration/references/field-mapping.md +0 -71
  44. package/skills/qa-codeceptjs-writer/SKILL.md +0 -136
  45. package/skills/qa-codeceptjs-writer/references/best-practices.md +0 -207
  46. package/skills/qa-codeceptjs-writer/references/config.md +0 -255
  47. package/skills/qa-codeceptjs-writer/references/patterns.md +0 -285
  48. package/skills/qa-coverage-analyzer/SKILL.md +0 -166
  49. package/skills/qa-coverage-analyzer/references/best-practices.md +0 -142
  50. package/skills/qa-coverage-analyzer/references/coverage-dimensions.md +0 -155
  51. package/skills/qa-coverage-analyzer/references/tools.md +0 -204
  52. package/skills/qa-cypress-writer/SKILL.md +0 -134
  53. package/skills/qa-cypress-writer/references/assertions.md +0 -121
  54. package/skills/qa-cypress-writer/references/best-practices.md +0 -82
  55. package/skills/qa-cypress-writer/references/config.md +0 -121
  56. package/skills/qa-cypress-writer/references/patterns.md +0 -170
  57. package/skills/qa-data-factory/SKILL.md +0 -126
  58. package/skills/qa-data-factory/references/factory-patterns.md +0 -164
  59. package/skills/qa-data-factory/references/faker-guide.md +0 -131
  60. package/skills/qa-diagram-generator/SKILL.md +0 -125
  61. package/skills/qa-diagram-generator/references/c4-model.md +0 -53
  62. package/skills/qa-diagram-generator/references/charts.md +0 -58
  63. package/skills/qa-diagram-generator/references/class-diagram.md +0 -85
  64. package/skills/qa-diagram-generator/references/er-diagram.md +0 -69
  65. package/skills/qa-diagram-generator/references/flowchart.md +0 -92
  66. package/skills/qa-diagram-generator/references/from-screenshot.md +0 -45
  67. package/skills/qa-diagram-generator/references/gantt.md +0 -49
  68. package/skills/qa-diagram-generator/references/journey.md +0 -50
  69. package/skills/qa-diagram-generator/references/mindmap.md +0 -75
  70. package/skills/qa-diagram-generator/references/sequence.md +0 -69
  71. package/skills/qa-diagram-generator/references/state-diagram.md +0 -56
  72. package/skills/qa-discovery-interview/SKILL.md +0 -182
  73. package/skills/qa-discovery-interview/references/completeness-checklist.md +0 -53
  74. package/skills/qa-discovery-interview/references/conflict-patterns.md +0 -101
  75. package/skills/qa-discovery-interview/references/qa-categories.md +0 -147
  76. package/skills/qa-discovery-interview/templates/qa-brief-template.md +0 -168
  77. package/skills/qa-environment-checker/SKILL.md +0 -142
  78. package/skills/qa-environment-checker/references/dependency-matrix.md +0 -101
  79. package/skills/qa-environment-checker/references/health-checks.md +0 -209
  80. package/skills/qa-environment-checker/templates/env-readiness-template.md +0 -64
  81. package/skills/qa-flaky-detector/SKILL.md +0 -153
  82. package/skills/qa-flaky-detector/references/ci-analysis.md +0 -140
  83. package/skills/qa-flaky-detector/references/flaky-patterns.md +0 -247
  84. package/skills/qa-github-issues-enhanced/SKILL.md +0 -175
  85. package/skills/qa-github-issues-enhanced/references/issue-templates.md +0 -425
  86. package/skills/qa-github-issues-enhanced/references/label-taxonomy.md +0 -130
  87. package/skills/qa-github-issues-enhanced/references/workflow-patterns.md +0 -188
  88. package/skills/qa-httpx-writer/SKILL.md +0 -138
  89. package/skills/qa-httpx-writer/references/assertions.md +0 -195
  90. package/skills/qa-httpx-writer/references/best-practices.md +0 -140
  91. package/skills/qa-httpx-writer/references/config.md +0 -212
  92. package/skills/qa-httpx-writer/references/patterns.md +0 -262
  93. package/skills/qa-jest-writer/SKILL.md +0 -131
  94. package/skills/qa-jest-writer/references/assertions.md +0 -125
  95. package/skills/qa-jest-writer/references/best-practices.md +0 -136
  96. package/skills/qa-jest-writer/references/config.md +0 -134
  97. package/skills/qa-jest-writer/references/patterns.md +0 -172
  98. package/skills/qa-jira-integration/SKILL.md +0 -135
  99. package/skills/qa-jira-integration/references/api-patterns.md +0 -143
  100. package/skills/qa-jira-integration/references/field-mapping.md +0 -79
  101. package/skills/qa-jira-integration/references/xray-integration.md +0 -85
  102. package/skills/qa-jmeter-writer/SKILL.md +0 -171
  103. package/skills/qa-jmeter-writer/references/best-practices.md +0 -157
  104. package/skills/qa-jmeter-writer/references/config.md +0 -204
  105. package/skills/qa-jmeter-writer/references/patterns.md +0 -242
  106. package/skills/qa-junit5-writer/SKILL.md +0 -157
  107. package/skills/qa-junit5-writer/references/assertions.md +0 -118
  108. package/skills/qa-junit5-writer/references/config.md +0 -97
  109. package/skills/qa-junit5-writer/references/patterns.md +0 -162
  110. package/skills/qa-k6-writer/SKILL.md +0 -155
  111. package/skills/qa-k6-writer/references/best-practices.md +0 -236
  112. package/skills/qa-k6-writer/references/config.md +0 -219
  113. package/skills/qa-k6-writer/references/patterns.md +0 -304
  114. package/skills/qa-linear-integration/SKILL.md +0 -137
  115. package/skills/qa-linear-integration/references/api-patterns.md +0 -249
  116. package/skills/qa-linear-integration/references/field-mapping.md +0 -121
  117. package/skills/qa-locust-writer/SKILL.md +0 -151
  118. package/skills/qa-locust-writer/references/best-practices.md +0 -126
  119. package/skills/qa-locust-writer/references/config.md +0 -170
  120. package/skills/qa-locust-writer/references/patterns.md +0 -235
  121. package/skills/qa-manual-test-designer/SKILL.md +0 -145
  122. package/skills/qa-manual-test-designer/references/exploratory-charters.md +0 -138
  123. package/skills/qa-manual-test-designer/references/personas.md +0 -146
  124. package/skills/qa-manual-test-designer/templates/exploratory-charter-template.md +0 -47
  125. package/skills/qa-manual-test-designer/templates/test-case-template.md +0 -31
  126. package/skills/qa-mobile-test-writer/SKILL.md +0 -144
  127. package/skills/qa-mobile-test-writer/references/best-practices.md +0 -214
  128. package/skills/qa-mobile-test-writer/references/config.md +0 -309
  129. package/skills/qa-mobile-test-writer/references/patterns.md +0 -304
  130. package/skills/qa-nfr-analyst/SKILL.md +0 -177
  131. package/skills/qa-nfr-analyst/references/iso-25010-model.md +0 -159
  132. package/skills/qa-nfr-analyst/references/owasp-wstg-baseline.md +0 -202
  133. package/skills/qa-nfr-analyst/references/wcag-checklist.md +0 -184
  134. package/skills/qa-nfr-analyst/templates/owasp-checklist-template.md +0 -89
  135. package/skills/qa-nfr-analyst/templates/wcag-checklist-template.md +0 -48
  136. package/skills/qa-orchestrator/SKILL.md +0 -132
  137. package/skills/qa-orchestrator/references/handoff-chains.md +0 -105
  138. package/skills/qa-orchestrator/references/pipeline-modes.md +0 -115
  139. package/skills/qa-orchestrator/references/scheduler-rules.md +0 -84
  140. package/skills/qa-pact-writer/SKILL.md +0 -133
  141. package/skills/qa-pact-writer/references/best-practices.md +0 -100
  142. package/skills/qa-pact-writer/references/config.md +0 -135
  143. package/skills/qa-pact-writer/references/patterns.md +0 -161
  144. package/skills/qa-plan-creator/SKILL.md +0 -139
  145. package/skills/qa-plan-creator/references/introduction-plan.md +0 -43
  146. package/skills/qa-plan-creator/references/migration-plan.md +0 -44
  147. package/skills/qa-plan-creator/references/onboarding-plan.md +0 -46
  148. package/skills/qa-plan-creator/references/performance-plan.md +0 -44
  149. package/skills/qa-plan-creator/references/regression-plan.md +0 -45
  150. package/skills/qa-plan-creator/references/release-plan.md +0 -45
  151. package/skills/qa-plan-creator/references/sprint-plan.md +0 -44
  152. package/skills/qa-plan-creator/references/test-plan.md +0 -59
  153. package/skills/qa-plan-creator/references/uat-plan.md +0 -43
  154. package/skills/qa-plan-creator/templates/checklist-template.md +0 -36
  155. package/skills/qa-plan-creator/templates/regression-checklist-template.md +0 -49
  156. package/skills/qa-plan-creator/templates/release-checklist-template.md +0 -46
  157. package/skills/qa-plan-creator/templates/test-plan-template.md +0 -74
  158. package/skills/qa-playwright-py-writer/SKILL.md +0 -156
  159. package/skills/qa-playwright-py-writer/references/best-practices.md +0 -194
  160. package/skills/qa-playwright-py-writer/references/config.md +0 -195
  161. package/skills/qa-playwright-py-writer/references/patterns.md +0 -212
  162. package/skills/qa-playwright-ts-writer/SKILL.md +0 -151
  163. package/skills/qa-playwright-ts-writer/references/assertions.md +0 -109
  164. package/skills/qa-playwright-ts-writer/references/best-practices.md +0 -191
  165. package/skills/qa-playwright-ts-writer/references/config.md +0 -144
  166. package/skills/qa-playwright-ts-writer/references/patterns.md +0 -171
  167. package/skills/qa-pytest-writer/SKILL.md +0 -145
  168. package/skills/qa-pytest-writer/references/assertions.md +0 -149
  169. package/skills/qa-pytest-writer/references/best-practices.md +0 -97
  170. package/skills/qa-pytest-writer/references/config.md +0 -176
  171. package/skills/qa-pytest-writer/references/patterns.md +0 -251
  172. package/skills/qa-qase-integration/SKILL.md +0 -149
  173. package/skills/qa-qase-integration/references/api-reference.md +0 -354
  174. package/skills/qa-qase-integration/references/ci-integration.md +0 -196
  175. package/skills/qa-qase-integration/references/field-mapping.md +0 -157
  176. package/skills/qa-requirements-generator/SKILL.md +0 -152
  177. package/skills/qa-requirements-generator/references/iso-29148-structure.md +0 -153
  178. package/skills/qa-requirements-generator/references/requirement-patterns.md +0 -278
  179. package/skills/qa-rest-assured-writer/SKILL.md +0 -137
  180. package/skills/qa-rest-assured-writer/references/best-practices.md +0 -50
  181. package/skills/qa-rest-assured-writer/references/config.md +0 -124
  182. package/skills/qa-rest-assured-writer/references/patterns.md +0 -192
  183. package/skills/qa-risk-analyzer/SKILL.md +0 -158
  184. package/skills/qa-risk-analyzer/references/impact-analysis.md +0 -133
  185. package/skills/qa-risk-analyzer/references/risk-factors.md +0 -123
  186. package/skills/qa-robot-framework-writer/SKILL.md +0 -147
  187. package/skills/qa-robot-framework-writer/references/best-practices.md +0 -249
  188. package/skills/qa-robot-framework-writer/references/config.md +0 -204
  189. package/skills/qa-robot-framework-writer/references/libraries.md +0 -273
  190. package/skills/qa-robot-framework-writer/references/patterns.md +0 -216
  191. package/skills/qa-security-test-writer/SKILL.md +0 -123
  192. package/skills/qa-security-test-writer/references/best-practices.md +0 -155
  193. package/skills/qa-security-test-writer/references/owasp-top10.md +0 -331
  194. package/skills/qa-security-test-writer/references/zap-config.md +0 -258
  195. package/skills/qa-selenium-java-writer/SKILL.md +0 -143
  196. package/skills/qa-selenium-java-writer/references/best-practices.md +0 -59
  197. package/skills/qa-selenium-java-writer/references/config.md +0 -143
  198. package/skills/qa-selenium-java-writer/references/patterns.md +0 -170
  199. package/skills/qa-selenium-py-writer/SKILL.md +0 -150
  200. package/skills/qa-selenium-py-writer/references/best-practices.md +0 -175
  201. package/skills/qa-selenium-py-writer/references/config.md +0 -224
  202. package/skills/qa-selenium-py-writer/references/patterns.md +0 -255
  203. package/skills/qa-shortcut-integration/SKILL.md +0 -143
  204. package/skills/qa-shortcut-integration/references/api-patterns.md +0 -126
  205. package/skills/qa-shortcut-integration/references/field-mapping.md +0 -66
  206. package/skills/qa-spec-auditor/SKILL.md +0 -162
  207. package/skills/qa-spec-auditor/references/audit-checklist.md +0 -144
  208. package/skills/qa-spec-auditor/references/drift-patterns.md +0 -207
  209. package/skills/qa-spec-writer/SKILL.md +0 -143
  210. package/skills/qa-spec-writer/references/gherkin-guide.md +0 -253
  211. package/skills/qa-spec-writer/references/specification-patterns.md +0 -274
  212. package/skills/qa-spring-test-writer/SKILL.md +0 -170
  213. package/skills/qa-spring-test-writer/references/best-practices.md +0 -57
  214. package/skills/qa-spring-test-writer/references/config.md +0 -179
  215. package/skills/qa-spring-test-writer/references/patterns.md +0 -235
  216. package/skills/qa-supertest-writer/SKILL.md +0 -150
  217. package/skills/qa-supertest-writer/references/assertions.md +0 -192
  218. package/skills/qa-supertest-writer/references/best-practices.md +0 -102
  219. package/skills/qa-supertest-writer/references/config.md +0 -166
  220. package/skills/qa-supertest-writer/references/patterns.md +0 -242
  221. package/skills/qa-task-creator/SKILL.md +0 -142
  222. package/skills/qa-task-creator/references/linking-patterns.md +0 -127
  223. package/skills/qa-task-creator/references/task-types.md +0 -169
  224. package/skills/qa-task-creator/templates/task-template.md +0 -24
  225. package/skills/qa-test-doc-compiler/SKILL.md +0 -114
  226. package/skills/qa-test-doc-compiler/references/agile-tailoring.md +0 -220
  227. package/skills/qa-test-doc-compiler/references/iso-29119-3-documents.md +0 -302
  228. package/skills/qa-test-healer/SKILL.md +0 -101
  229. package/skills/qa-test-healer/references/diagnosis-patterns.md +0 -142
  230. package/skills/qa-test-healer/references/fix-strategies.md +0 -177
  231. package/skills/qa-test-reporter/SKILL.md +0 -130
  232. package/skills/qa-test-reporter/references/best-practices.md +0 -162
  233. package/skills/qa-test-reporter/references/iso-29119-reports.md +0 -236
  234. package/skills/qa-test-reporter/references/report-formats.md +0 -287
  235. package/skills/qa-test-reviewer/SKILL.md +0 -142
  236. package/skills/qa-test-reviewer/references/anti-patterns.md +0 -268
  237. package/skills/qa-test-reviewer/references/review-checklist.md +0 -93
  238. package/skills/qa-test-strategy/SKILL.md +0 -133
  239. package/skills/qa-test-strategy/references/entry-exit-criteria.md +0 -176
  240. package/skills/qa-test-strategy/references/risk-matrix.md +0 -102
  241. package/skills/qa-test-strategy/references/testing-types.md +0 -143
  242. package/skills/qa-testcase-from-docs/SKILL.md +0 -161
  243. package/skills/qa-testcase-from-docs/references/test-case-format.md +0 -196
  244. package/skills/qa-testcase-from-docs/references/test-design-techniques.md +0 -126
  245. package/skills/qa-testcase-from-docs/templates/test-case-template.md +0 -31
  246. package/skills/qa-testcase-from-ui/SKILL.md +0 -109
  247. package/skills/qa-testcase-from-ui/references/ui-element-patterns.md +0 -126
  248. package/skills/qa-testcase-from-ui/references/visual-analysis-guide.md +0 -146
  249. package/skills/qa-testcase-from-ui/templates/test-case-template.md +0 -31
  250. package/skills/qa-visual-regression-writer/SKILL.md +0 -175
  251. package/skills/qa-visual-regression-writer/references/best-practices.md +0 -154
  252. package/skills/qa-visual-regression-writer/references/config.md +0 -220
  253. package/skills/qa-visual-regression-writer/references/patterns.md +0 -213
  254. package/skills/qa-vitest-writer/SKILL.md +0 -141
  255. package/skills/qa-vitest-writer/references/assertions.md +0 -105
  256. package/skills/qa-vitest-writer/references/best-practices.md +0 -62
  257. package/skills/qa-vitest-writer/references/config.md +0 -127
  258. package/skills/qa-vitest-writer/references/patterns.md +0 -141
  259. package/skills/qa-webdriverio-writer/SKILL.md +0 -145
  260. package/skills/qa-webdriverio-writer/references/best-practices.md +0 -176
  261. package/skills/qa-webdriverio-writer/references/config.md +0 -240
  262. package/skills/qa-webdriverio-writer/references/patterns.md +0 -269
package/dist/scaffold.js DELETED
@@ -1,182 +0,0 @@
1
- import path from 'node:path';
2
- import fs from 'fs-extra';
3
- export const SKILL_OUTPUT_MAP = {
4
- 'requirements-generator': { dirs: ['docs/requirements'], pattern: 'REQ-{feature}.md' },
5
- 'spec-writer': { dirs: ['docs/specs'], pattern: 'SPEC-{feature}.md' },
6
- 'plan-creator': { dirs: ['docs/plans'], pattern: '{plan-type}-plan.md' },
7
- 'test-strategy': { dirs: ['docs/plans'], pattern: 'test-strategy.md' },
8
- 'discovery-interview': { dirs: ['docs/briefs'], pattern: 'brief-{project}.md' },
9
- 'bug-ticket-creator': { dirs: ['docs/bug-tickets'], pattern: 'BUG-{id}.md' },
10
- 'diagram-generator': { dirs: ['docs/diagrams'], pattern: '{type}-{name}.md' },
11
- 'nfr-analyst': { dirs: ['docs/nfr'], pattern: 'NFR-{feature}.md' },
12
- 'api-contract-curator': { dirs: ['docs/api-contracts'], pattern: '{service}.openapi.yaml' },
13
- 'test-doc-compiler': { dirs: ['docs/compiled'], pattern: '{doc-type}-{date}.md' },
14
- 'testcase-from-docs': { dirs: ['test-cases/from-docs'], pattern: 'TC-{feature}.md' },
15
- 'testcase-from-ui': { dirs: ['test-cases/from-ui'], pattern: 'TC-UI-{page}.md' },
16
- 'manual-test-designer': { dirs: ['test-cases/manual'], pattern: 'MTC-{feature}.md' },
17
- 'jest-writer': { dirs: ['tests/unit'], pattern: '{name}.test.ts' },
18
- 'vitest-writer': { dirs: ['tests/unit'], pattern: '{name}.test.ts' },
19
- 'pytest-writer': { dirs: ['tests/unit'], pattern: 'test_{name}.py' },
20
- 'junit5-writer': { dirs: ['tests/unit'], pattern: '{Name}Test.java' },
21
- 'playwright-ts-writer': { dirs: ['tests/e2e'], pattern: '{name}.spec.ts' },
22
- 'playwright-py-writer': { dirs: ['tests/e2e'], pattern: 'test_{name}.py' },
23
- 'cypress-writer': { dirs: ['tests/e2e'], pattern: '{name}.cy.ts' },
24
- 'selenium-py-writer': { dirs: ['tests/e2e'], pattern: 'test_{name}.py' },
25
- 'selenium-java-writer': { dirs: ['tests/e2e'], pattern: '{Name}Test.java' },
26
- 'webdriverio-writer': { dirs: ['tests/e2e'], pattern: '{name}.e2e.ts' },
27
- 'codeceptjs-writer': { dirs: ['tests/e2e'], pattern: '{name}.test.ts' },
28
- 'robot-framework-writer': { dirs: ['tests/e2e'], pattern: '{name}.robot' },
29
- 'supertest-writer': { dirs: ['tests/api', 'tests/integration'], pattern: '{name}.test.ts' },
30
- 'httpx-writer': { dirs: ['tests/api', 'tests/integration'], pattern: 'test_{name}.py' },
31
- 'rest-assured-writer': { dirs: ['tests/api', 'tests/integration'], pattern: '{Name}ApiTest.java' },
32
- 'spring-test-writer': { dirs: ['tests/integration'], pattern: '{Name}IntegrationTest.java' },
33
- 'k6-writer': { dirs: ['tests/performance'], pattern: '{name}.k6.js' },
34
- 'locust-writer': { dirs: ['tests/performance'], pattern: 'locustfile_{name}.py' },
35
- 'jmeter-writer': { dirs: ['tests/performance'], pattern: '{name}.jmx' },
36
- 'security-test-writer': { dirs: ['tests/security'], pattern: '{name}.security.ts' },
37
- 'accessibility-test-writer': { dirs: ['tests/accessibility'], pattern: '{name}.a11y.ts' },
38
- 'visual-regression-writer': { dirs: ['tests/visual'], pattern: '{name}.visual.ts' },
39
- 'mobile-test-writer': { dirs: ['tests/mobile'], pattern: '{name}.mobile.ts' },
40
- 'pact-writer': { dirs: ['tests/contracts'], pattern: '{consumer}-{provider}.pact.ts' },
41
- 'test-reporter': { dirs: ['reports/test-runs'], pattern: 'report-{date}.md' },
42
- 'coverage-analyzer': { dirs: ['reports/coverage'], pattern: 'coverage-{date}.md' },
43
- 'risk-analyzer': { dirs: ['reports/risk'], pattern: 'risk-{feature}.md' },
44
- 'spec-auditor': { dirs: ['reports/audit'], pattern: 'audit-{date}.md' },
45
- 'flaky-detector': { dirs: ['reports/flaky'], pattern: 'flaky-{date}.md' },
46
- 'test-reviewer': { dirs: ['reports/reviews'], pattern: 'review-{file}.md' },
47
- 'changelog-analyzer': { dirs: ['reports/changelog'], pattern: 'changelog-{date}.md' },
48
- 'data-factory': { dirs: ['data/fixtures'], pattern: '{entity}.fixture.ts' },
49
- };
50
- /**
51
- * Generate the qa-project-structure.mdc rule content for only the installed skills.
52
- */
53
- export function generateStructureRule(installedSkillIds) {
54
- const rows = [];
55
- for (const id of installedSkillIds) {
56
- const mapping = SKILL_OUTPUT_MAP[id];
57
- if (!mapping)
58
- continue;
59
- const skillName = id.startsWith('qa-') ? id : `qa-${id}`;
60
- for (const dir of mapping.dirs) {
61
- rows.push(`| ${skillName} | \`${dir}/\` | \`${mapping.pattern}\` |`);
62
- }
63
- }
64
- if (rows.length === 0)
65
- return '';
66
- return `---
67
- description: QA project artifact routing — maps each skill to its output directory
68
- globs: "**"
69
- alwaysApply: true
70
- ---
71
-
72
- # QA Project Structure
73
-
74
- When generating QA artifacts, save outputs to these project-relative directories.
75
- Create the directory on first use if it does not exist.
76
-
77
- | Skill | Output Directory | File Pattern |
78
- |-------|-----------------|--------------|
79
- ${rows.join('\n')}
80
-
81
- ## Conventions
82
-
83
- - All paths are relative to the project root.
84
- - Create directories on-demand when producing the first artifact — do NOT pre-create empty folders.
85
- - Test writers follow framework conventions for file naming within their output directory.
86
- - Reports include a date stamp in the filename for traceability.
87
- - Diagrams are saved as Mermaid-in-Markdown files.
88
- `;
89
- }
90
- /**
91
- * Check whether a given path prefix is covered by the project's .gitignore.
92
- */
93
- export async function isGitignored(targetDir, dirPrefix) {
94
- const gitignorePath = path.join(targetDir, '.gitignore');
95
- if (!(await fs.pathExists(gitignorePath)))
96
- return false;
97
- const content = await fs.readFile(gitignorePath, 'utf-8');
98
- const lines = content.split('\n').map((l) => l.trim()).filter((l) => l && !l.startsWith('#'));
99
- const normalized = dirPrefix.replace(/\\/g, '/').replace(/\/$/, '');
100
- const segment = normalized.split('/')[0];
101
- for (const pattern of lines) {
102
- const clean = pattern.replace(/\/$/, '');
103
- if (clean === segment || clean === `${segment}/` || clean === `.${segment}` || clean === `.${segment}/`) {
104
- return true;
105
- }
106
- if (clean === normalized || clean === `${normalized}/`) {
107
- return true;
108
- }
109
- }
110
- return false;
111
- }
112
- /**
113
- * Generate a portable AGENTS.md section with the project structure convention.
114
- * This file lives at the project root and is always committed to git.
115
- */
116
- export function generateAgentsMdSection(installedSkillIds) {
117
- const rows = [];
118
- for (const id of installedSkillIds) {
119
- const mapping = SKILL_OUTPUT_MAP[id];
120
- if (!mapping)
121
- continue;
122
- const skillName = id.startsWith('qa-') ? id : `qa-${id}`;
123
- for (const dir of mapping.dirs) {
124
- rows.push(`| ${skillName} | \`${dir}/\` | \`${mapping.pattern}\` |`);
125
- }
126
- }
127
- if (rows.length === 0)
128
- return '';
129
- return `# QA Project Structure
130
-
131
- When generating QA artifacts, save outputs to these project-relative directories.
132
- Create the directory on first use if it does not exist.
133
-
134
- | Skill | Output Directory | File Pattern |
135
- |-------|-----------------|--------------|
136
- ${rows.join('\n')}
137
-
138
- ## Conventions
139
-
140
- - All paths are relative to the project root.
141
- - Create directories on-demand — do NOT pre-create empty folders.
142
- - Test writers follow framework conventions for file naming within their output directory.
143
- - Reports include a date stamp in the filename for traceability.
144
- `;
145
- }
146
- /**
147
- * Write the structure rule to the appropriate agent rules directory.
148
- */
149
- export async function writeStructureRule(targetDir, rulesPath, installedSkillIds) {
150
- const content = generateStructureRule(installedSkillIds);
151
- if (!content)
152
- return false;
153
- const ruleFile = path.join(targetDir, rulesPath, 'qa-project-structure.mdc');
154
- await fs.ensureDir(path.dirname(ruleFile));
155
- await fs.writeFile(ruleFile, content, 'utf-8');
156
- return true;
157
- }
158
- /**
159
- * Write or append the structure convention to AGENTS.md at the project root.
160
- * This is the gitignore-safe fallback — AGENTS.md is always committed.
161
- */
162
- export async function writeAgentsMd(targetDir, installedSkillIds) {
163
- const section = generateAgentsMdSection(installedSkillIds);
164
- if (!section)
165
- return false;
166
- const agentsFile = path.join(targetDir, 'AGENTS.md');
167
- if (await fs.pathExists(agentsFile)) {
168
- const existing = await fs.readFile(agentsFile, 'utf-8');
169
- if (existing.includes('# QA Project Structure')) {
170
- const replaced = existing.replace(/# QA Project Structure[\s\S]*?(?=\n# |\n---|\Z)/, section);
171
- await fs.writeFile(agentsFile, replaced, 'utf-8');
172
- }
173
- else {
174
- await fs.writeFile(agentsFile, existing.trimEnd() + '\n\n' + section, 'utf-8');
175
- }
176
- }
177
- else {
178
- await fs.writeFile(agentsFile, section, 'utf-8');
179
- }
180
- return true;
181
- }
182
- //# sourceMappingURL=scaffold.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../src/scaffold.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAwD;IACnF,wBAAwB,EAAE,EAAE,IAAI,EAAE,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE;IACtF,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE;IACrE,cAAc,EAAE,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE;IACxE,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE;IACtE,qBAAqB,EAAE,EAAE,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE;IAC/E,oBAAoB,EAAE,EAAE,IAAI,EAAE,CAAC,kBAAkB,CAAC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aAAM,CAAC;YACN,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,MAAM,GAAG,OAAO,EAAE,OAAO,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,127 +0,0 @@
1
- ---
2
- name: qa-accessibility-test-writer
3
- description: Generate accessibility tests for WCAG 2.2 compliance using axe-core, Pa11y, and Lighthouse with automated checks for ARIA patterns, keyboard navigation, color contrast, and screen reader support.
4
- output_dir: tests/accessibility
5
- ---
6
-
7
- # QA Accessibility Test Writer
8
-
9
- ## Purpose
10
-
11
- Write accessibility tests ensuring WCAG 2.2 compliance. Transform NFR accessibility criteria (from qa-nfr-analyst) and application context into executable accessibility test scripts using axe-core, Pa11y, and Lighthouse. Support automated checks for ARIA patterns, keyboard navigation, focus management, color contrast, text alternatives, semantic HTML, form labels, skip links, responsive text sizing, and screen reader compatibility.
12
-
13
- ## Trigger Phrases
14
-
15
- - "Write accessibility tests for [app/page]"
16
- - "Generate WCAG 2.2 compliance tests"
17
- - "Create axe-core tests for [framework]"
18
- - "Accessibility tests for keyboard navigation"
19
- - "ARIA and color contrast tests"
20
- - "Pa11y/Lighthouse accessibility audit setup"
21
- - "Screen reader compatibility tests"
22
- - "Accessibility test scripts from NFR analysis"
23
-
24
- ## WCAG 2.2 Levels
25
-
26
- | Level | Description | Typical Use |
27
- |-------|--------------|-------------|
28
- | **A** | Minimum; required for basic accessibility | Legal baseline |
29
- | **AA** | Standard target; addresses major barriers | Most projects |
30
- | **AAA** | Enhanced; highest conformance | Specialized contexts |
31
-
32
- See `references/wcag-tests.md` for test scenarios per success criteria with code examples.
33
-
34
- ## Tools
35
-
36
- | Tool | Purpose |
37
- |------|---------|
38
- | **axe-core** | Programmatic WCAG checks; integrates with Playwright, Cypress, Jest |
39
- | **Pa11y** | CLI + Node API; batch page audits, CI integration |
40
- | **Lighthouse** | Chrome DevTools Protocol; full accessibility audit with scores |
41
-
42
- ## Test Categories
43
-
44
- | Category | Techniques | Tools |
45
- |----------|-------------|-------|
46
- | **ARIA patterns** | Roles, states, properties, live regions | axe-core |
47
- | **Keyboard navigation** | Tab order, focus traps, shortcuts | Playwright/Cypress |
48
- | **Focus management** | Visible focus, focus order, skip links | axe-core, custom |
49
- | **Color contrast** | 4.5:1 (normal), 3:1 (large) | axe-core, Lighthouse |
50
- | **Text alternatives** | Alt text, aria-label, captions | axe-core |
51
- | **Semantic HTML** | Headings, landmarks, lists | axe-core |
52
- | **Form labels** | Labels, error identification, autocomplete | axe-core, custom |
53
- | **Skip links** | Bypass blocks (2.4.1) | axe-core, custom |
54
- | **Responsive text sizing** | 200% resize, reflow | Lighthouse, custom |
55
- | **Screen reader compatibility** | Name, role, value (4.1.2) | axe-core, manual |
56
-
57
- ## Workflow
58
-
59
- 1. **Read NFR analysis** — From qa-nfr-analyst; extract WCAG criteria and target level (A/AA/AAA)
60
- 2. **Map WCAG success criteria** — Align requirements to testable checkpoints (see `references/wcag-tests.md`)
61
- 3. **Generate accessibility test scripts** — Playwright + @axe-core/playwright, Cypress + cypress-axe, Jest + jest-axe
62
- 4. **Configure tools** — axe-core rules, Pa11y config, Lighthouse thresholds
63
- 5. **Run audits** — Execute tests; produce audit reports and WCAG compliance matrix
64
-
65
- ## Integration
66
-
67
- | Framework | Package | Usage |
68
- |-----------|---------|-------|
69
- | **Playwright** | @axe-core/playwright | `await expect(page).toPassAxe()` or `axe.run(page)` |
70
- | **Cypress** | cypress-axe | `cy.injectAxe(); cy.checkA11y()` |
71
- | **Jest** | jest-axe | `expect(container).toHaveNoViolations()` (React Testing Library) |
72
-
73
- See `references/axe-core-patterns.md` for integration patterns and examples.
74
-
75
- ## Output
76
-
77
- - **Accessibility test scripts** — `tests/accessibility/` or `e2e/a11y/` with TS/JS files
78
- - **Audit reports** — JSON/HTML summaries of violations, impact, remediation
79
- - **WCAG compliance matrix** — Mapping of success criteria to pass/fail status
80
-
81
- ## References
82
-
83
- - `references/wcag-tests.md` — WCAG 2.2 test scenarios per success criteria with code examples
84
- - `references/axe-core-patterns.md` — axe-core integration patterns for Playwright, Cypress, Jest
85
- - `references/best-practices.md` — Automated vs manual, screen reader testing, keyboard testing
86
-
87
- ## Scope
88
-
89
- **Can do (autonomous):**
90
- - Generate accessibility test scripts from NFR analysis or WCAG criteria
91
- - Create axe-core/Pa11y/Lighthouse configurations
92
- - Write Playwright, Cypress, or Jest accessibility tests
93
- - Map WCAG 2.2 success criteria to test cases
94
- - Call qa-nfr-analyst for WCAG criteria when needed
95
- - Use qa-diagram-generator for accessibility flow diagrams
96
-
97
- **Cannot do (requires confirmation):**
98
- - Add dependencies not in package.json
99
- - Override project accessibility target level (A/AA/AAA)
100
- - Change WCAG conformance scope without approval
101
-
102
- **Will not do (out of scope):**
103
- - Execute tests (user runs them)
104
- - Perform manual screen reader testing (provide guidance only)
105
- - Implement accessibility fixes in application code
106
-
107
- ## Quality Checklist
108
-
109
- - [ ] Tests cover WCAG 2.2 criteria relevant to the application
110
- - [ ] Target level (A/AA/AAA) specified and rules configured accordingly
111
- - [ ] axe-core rules/tags aligned with WCAG level (wcag2a, wcag2aa, wcag2aaa)
112
- - [ ] Keyboard navigation tests for interactive components
113
- - [ ] Focus visible and focus order verified where applicable
114
- - [ ] File naming follows `*.a11y.spec.ts` or `test_*_accessibility.ts`
115
- - [ ] References to WCAG success criterion IDs where applicable
116
- - [ ] Audit report includes impact, description, and remediation guidance
117
-
118
- ## Troubleshooting
119
-
120
- | Symptom | Likely Cause | Fix |
121
- |---------|--------------|-----|
122
- | axe-core reports no violations but page is inaccessible | Dynamic content not loaded, shadow DOM | Wait for content; use `include` for shadow roots |
123
- | False positives (decorative images) | axe flags alt="" on img | Use `aria-hidden="true"` or `role="presentation"` for decorative |
124
- | Pa11y timeout | Slow page load, SPA | Increase timeout; wait for network idle |
125
- | Lighthouse score inconsistent | Network variance, animations | Run multiple times; use median; disable animations |
126
- | Keyboard test fails (focus not visible) | Custom focus styles missing | Add `:focus-visible` styles; verify in test |
127
- | cypress-axe "injectAxe" fails | Page not ready | Call `cy.injectAxe()` after `cy.visit` and content load |
@@ -1,349 +0,0 @@
1
- # axe-core Integration Patterns
2
-
3
- Integration patterns for axe-core with Playwright, Cypress, and Jest. Use with qa-accessibility-test-writer when generating accessibility tests.
4
-
5
- ---
6
-
7
- ## Playwright + @axe-core/playwright
8
-
9
- ### Installation
10
-
11
- ```bash
12
- npm install -D @axe-core/playwright
13
- ```
14
-
15
- ### Basic Usage
16
-
17
- ```typescript
18
- import { test, expect } from '@playwright/test';
19
- import AxeBuilder from '@axe-core/playwright';
20
-
21
- test('page has no accessibility violations', async ({ page }) => {
22
- await page.goto('/');
23
- const results = await new AxeBuilder({ page }).analyze();
24
-
25
- expect(results.violations).toEqual([]);
26
- });
27
- ```
28
-
29
- ### With WCAG Tags
30
-
31
- ```typescript
32
- test('meets WCAG 2.2 AA', async ({ page }) => {
33
- await page.goto('/dashboard');
34
- const results = await new AxeBuilder({ page })
35
- .withTags(['wcag2a', 'wcag2aa'])
36
- .analyze();
37
-
38
- expect(results.violations).toEqual([]);
39
- });
40
- ```
41
-
42
- ### Scoped to Selector
43
-
44
- ```typescript
45
- test('main content is accessible', async ({ page }) => {
46
- await page.goto('/');
47
- const results = await new AxeBuilder({ page })
48
- .include('main')
49
- .exclude('.ad-banner')
50
- .analyze();
51
-
52
- expect(results.violations).toEqual([]);
53
- });
54
- ```
55
-
56
- ### Disable Specific Rules
57
-
58
- ```typescript
59
- test('page accessible excluding color-contrast', async ({ page }) => {
60
- await page.goto('/');
61
- const results = await new AxeBuilder({ page })
62
- .disableRules(['color-contrast'])
63
- .analyze();
64
-
65
- expect(results.violations).toEqual([]);
66
- });
67
- ```
68
-
69
- ### Shadow DOM
70
-
71
- ```typescript
72
- test('component with shadow DOM', async ({ page }) => {
73
- await page.goto('/web-components');
74
- const results = await new AxeBuilder({ page })
75
- .include(['#app', ['#shadow-host', '#shadow-root']])
76
- .analyze();
77
-
78
- expect(results.violations).toEqual([]);
79
- });
80
- ```
81
-
82
- ### Assert with toPassAxe (if available)
83
-
84
- ```typescript
85
- import { expect } from '@playwright/test';
86
- import { toPassAxe } from 'axe-playwright';
87
-
88
- test.extend({ toPassAxe })('page passes axe', async ({ page, toPassAxe }) => {
89
- await page.goto('/');
90
- await expect(page).toPassAxe();
91
- });
92
- ```
93
-
94
- ---
95
-
96
- ## Cypress + cypress-axe
97
-
98
- ### Installation
99
-
100
- ```bash
101
- npm install -D cypress-axe axe-core
102
- ```
103
-
104
- ### Configuration (cypress/support/e2e.ts)
105
-
106
- ```typescript
107
- import 'cypress-axe';
108
- ```
109
-
110
- ### Basic Usage
111
-
112
- ```typescript
113
- describe('Accessibility', () => {
114
- beforeEach(() => {
115
- cy.visit('/');
116
- cy.injectAxe();
117
- });
118
-
119
- it('has no violations', () => {
120
- cy.checkA11y();
121
- });
122
-
123
- it('main content has no violations', () => {
124
- cy.checkA11y('main');
125
- });
126
- });
127
- ```
128
-
129
- ### With WCAG Tags
130
-
131
- ```typescript
132
- it('meets WCAG 2.2 AA', () => {
133
- cy.checkA11y(null, {
134
- runOnly: {
135
- type: 'tag',
136
- values: ['wcag2a', 'wcag2aa'],
137
- },
138
- });
139
- });
140
- ```
141
-
142
- ### With Specific Rules
143
-
144
- ```typescript
145
- it('checks critical rules only', () => {
146
- cy.checkA11y(null, {
147
- runOnly: {
148
- type: 'rule',
149
- values: ['color-contrast', 'label', 'button-name', 'image-alt'],
150
- },
151
- });
152
- });
153
- ```
154
-
155
- ### Exclude Elements
156
-
157
- ```typescript
158
- it('excludes third-party widget', () => {
159
- cy.checkA11y(null, {
160
- exclude: [['.third-party-widget']],
161
- });
162
- });
163
- ```
164
-
165
- ### Custom Violation Callback
166
-
167
- ```typescript
168
- it('logs violations', () => {
169
- cy.checkA11y(null, null, (violations) => {
170
- violations.forEach((v) => {
171
- cy.task('log', `${v.id}: ${v.help}`);
172
- });
173
- });
174
- });
175
- ```
176
-
177
- ### Wait for Dynamic Content
178
-
179
- ```typescript
180
- it('checks after content loads', () => {
181
- cy.get('[data-cy="dynamic-content"]').should('be.visible');
182
- cy.injectAxe();
183
- cy.checkA11y();
184
- });
185
- ```
186
-
187
- ---
188
-
189
- ## Jest + jest-axe
190
-
191
- ### Installation
192
-
193
- ```bash
194
- npm install -D jest-axe @testing-library/react @testing-library/dom
195
- ```
196
-
197
- ### Basic Usage (React Testing Library)
198
-
199
- ```typescript
200
- import { render, screen } from '@testing-library/react';
201
- import { axe, toHaveNoViolations } from 'jest-axe';
202
- import { Button } from './Button';
203
-
204
- expect.extend(toHaveNoViolations);
205
-
206
- test('Button has no accessibility violations', async () => {
207
- const { container } = render(<Button>Click me</Button>);
208
- const results = await axe(container);
209
- expect(results).toHaveNoViolations();
210
- });
211
- ```
212
-
213
- ### With Options
214
-
215
- ```typescript
216
- test('Button meets WCAG AA', async () => {
217
- const { container } = render(<Button>Click me</Button>);
218
- const results = await axe(container, {
219
- runOnly: {
220
- type: 'tag',
221
- values: ['wcag2a', 'wcag2aa'],
222
- },
223
- });
224
- expect(results).toHaveNoViolations();
225
- });
226
- ```
227
-
228
- ### Scoped to Element
229
-
230
- ```typescript
231
- test('form is accessible', async () => {
232
- const { container } = render(<SignupForm />);
233
- const form = container.querySelector('form');
234
- const results = await axe(form!);
235
- expect(results).toHaveNoViolations();
236
- });
237
- ```
238
-
239
- ### Disable Rules
240
-
241
- ```typescript
242
- test('component without color-contrast check', async () => {
243
- const { container } = render(<Chart />);
244
- const results = await axe(container, {
245
- rules: { 'color-contrast': { enabled: false } },
246
- });
247
- expect(results).toHaveNoViolations();
248
- });
249
- ```
250
-
251
- ---
252
-
253
- ## Pa11y (CLI + Node API)
254
-
255
- ### CLI
256
-
257
- ```bash
258
- npm install -g pa11y
259
-
260
- pa11y https://example.com
261
- pa11y https://example.com --standard WCAG2AA
262
- pa11y https://example.com --include-notices --include-warnings
263
- ```
264
-
265
- ### Node API
266
-
267
- ```typescript
268
- import pa11y from 'pa11y';
269
-
270
- const results = await pa11y('https://example.com', {
271
- standard: 'WCAG2AA',
272
- includeWarnings: true,
273
- runners: ['axe'],
274
- });
275
-
276
- console.log(results.issues);
277
- ```
278
-
279
- ### With Puppeteer (for SPAs)
280
-
281
- ```typescript
282
- import pa11y from 'pa11y';
283
- import puppeteer from 'puppeteer';
284
-
285
- const browser = await puppeteer.launch();
286
- const page = await browser.newPage();
287
- await page.goto('https://example.com', { waitUntil: 'networkidle0' });
288
-
289
- const results = await pa11y(await page.content(), {
290
- standard: 'WCAG2AA',
291
- page,
292
- });
293
-
294
- await browser.close();
295
- ```
296
-
297
- ---
298
-
299
- ## Lighthouse (Chrome DevTools Protocol)
300
-
301
- ### Playwright Integration
302
-
303
- ```typescript
304
- import { test } from '@playwright/test';
305
- import { playAudit } from 'playwright-lighthouse';
306
-
307
- test('Lighthouse accessibility score', async ({ page }) => {
308
- await page.goto('/');
309
- await playAudit({
310
- page,
311
- thresholds: {
312
- performance: 80,
313
- accessibility: 90,
314
- 'best-practices': 80,
315
- seo: 80,
316
- },
317
- port: 9222,
318
- });
319
- });
320
- ```
321
-
322
- ### Lighthouse CLI
323
-
324
- ```bash
325
- npx lighthouse https://example.com --only-categories=accessibility --output=json
326
- ```
327
-
328
- ---
329
-
330
- ## Rule Tags Reference
331
-
332
- | Tag | Description |
333
- |-----|-------------|
334
- | `wcag2a` | WCAG 2.2 Level A |
335
- | `wcag2aa` | WCAG 2.2 Level AA |
336
- | `wcag2aaa` | WCAG 2.2 Level AAA |
337
- | `best-practice` | Best practice recommendations |
338
- | `ACT` | W3C ACT rules |
339
- | `section508` | Section 508 |
340
-
341
- ---
342
-
343
- ## References
344
-
345
- - [axe-core GitHub](https://github.com/dequelabs/axe-core)
346
- - [@axe-core/playwright](https://github.com/dequelabs/axe-core-npm/tree/develop/packages/playwright)
347
- - [cypress-axe](https://github.com/component-driven/cypress-axe)
348
- - [jest-axe](https://github.com/nickcolley/jest-axe)
349
- - [Pa11y](https://pa11y.org/)