qa-skills 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -0
- package/bin/cli.js +42 -0
- package/dist/agents/registry.d.ts +5 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/registry.js +101 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/types.d.ts +9 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +2 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/dependencies.d.ts +21 -0
- package/dist/dependencies.d.ts.map +1 -0
- package/dist/dependencies.js +125 -0
- package/dist/dependencies.js.map +1 -0
- package/dist/installer.d.ts +25 -0
- package/dist/installer.d.ts.map +1 -0
- package/dist/installer.js +437 -0
- package/dist/installer.js.map +1 -0
- package/dist/scaffold.d.ts +27 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +182 -0
- package/dist/scaffold.js.map +1 -0
- package/package.json +40 -0
- package/skills/qa-accessibility-test-writer/SKILL.md +127 -0
- package/skills/qa-accessibility-test-writer/references/axe-core-patterns.md +349 -0
- package/skills/qa-accessibility-test-writer/references/best-practices.md +184 -0
- package/skills/qa-accessibility-test-writer/references/wcag-tests.md +331 -0
- package/skills/qa-api-contract-curator/SKILL.md +104 -0
- package/skills/qa-api-contract-curator/references/breaking-changes.md +363 -0
- package/skills/qa-api-contract-curator/references/openapi-structure.md +404 -0
- package/skills/qa-browser-data-collector/SKILL.md +132 -0
- package/skills/qa-browser-data-collector/references/data-collection-checklist.md +91 -0
- package/skills/qa-browser-data-collector/references/playwright-mcp-patterns.md +113 -0
- package/skills/qa-bug-ticket-creator/SKILL.md +148 -0
- package/skills/qa-bug-ticket-creator/references/bug-report-format.md +149 -0
- package/skills/qa-bug-ticket-creator/references/severity-guide.md +81 -0
- package/skills/qa-bug-ticket-creator/templates/bug-ticket-template.md +39 -0
- package/skills/qa-changelog-analyzer/SKILL.md +134 -0
- package/skills/qa-changelog-analyzer/references/git-analysis-patterns.md +138 -0
- package/skills/qa-changelog-analyzer/references/impact-mapping.md +120 -0
- package/skills/qa-clickup-integration/SKILL.md +166 -0
- package/skills/qa-clickup-integration/references/api-patterns.md +102 -0
- package/skills/qa-clickup-integration/references/field-mapping.md +71 -0
- package/skills/qa-codeceptjs-writer/SKILL.md +136 -0
- package/skills/qa-codeceptjs-writer/references/best-practices.md +207 -0
- package/skills/qa-codeceptjs-writer/references/config.md +255 -0
- package/skills/qa-codeceptjs-writer/references/patterns.md +285 -0
- package/skills/qa-coverage-analyzer/SKILL.md +166 -0
- package/skills/qa-coverage-analyzer/references/best-practices.md +142 -0
- package/skills/qa-coverage-analyzer/references/coverage-dimensions.md +155 -0
- package/skills/qa-coverage-analyzer/references/tools.md +204 -0
- package/skills/qa-cypress-writer/SKILL.md +134 -0
- package/skills/qa-cypress-writer/references/assertions.md +121 -0
- package/skills/qa-cypress-writer/references/best-practices.md +82 -0
- package/skills/qa-cypress-writer/references/config.md +121 -0
- package/skills/qa-cypress-writer/references/patterns.md +170 -0
- package/skills/qa-data-factory/SKILL.md +126 -0
- package/skills/qa-data-factory/references/factory-patterns.md +164 -0
- package/skills/qa-data-factory/references/faker-guide.md +131 -0
- package/skills/qa-diagram-generator/SKILL.md +125 -0
- package/skills/qa-diagram-generator/references/c4-model.md +53 -0
- package/skills/qa-diagram-generator/references/charts.md +58 -0
- package/skills/qa-diagram-generator/references/class-diagram.md +85 -0
- package/skills/qa-diagram-generator/references/er-diagram.md +69 -0
- package/skills/qa-diagram-generator/references/flowchart.md +92 -0
- package/skills/qa-diagram-generator/references/from-screenshot.md +45 -0
- package/skills/qa-diagram-generator/references/gantt.md +49 -0
- package/skills/qa-diagram-generator/references/journey.md +50 -0
- package/skills/qa-diagram-generator/references/mindmap.md +75 -0
- package/skills/qa-diagram-generator/references/sequence.md +69 -0
- package/skills/qa-diagram-generator/references/state-diagram.md +56 -0
- package/skills/qa-discovery-interview/SKILL.md +182 -0
- package/skills/qa-discovery-interview/references/completeness-checklist.md +53 -0
- package/skills/qa-discovery-interview/references/conflict-patterns.md +101 -0
- package/skills/qa-discovery-interview/references/qa-categories.md +147 -0
- package/skills/qa-discovery-interview/templates/qa-brief-template.md +168 -0
- package/skills/qa-environment-checker/SKILL.md +142 -0
- package/skills/qa-environment-checker/references/dependency-matrix.md +101 -0
- package/skills/qa-environment-checker/references/health-checks.md +209 -0
- package/skills/qa-environment-checker/templates/env-readiness-template.md +64 -0
- package/skills/qa-flaky-detector/SKILL.md +153 -0
- package/skills/qa-flaky-detector/references/ci-analysis.md +140 -0
- package/skills/qa-flaky-detector/references/flaky-patterns.md +247 -0
- package/skills/qa-github-issues-enhanced/SKILL.md +175 -0
- package/skills/qa-github-issues-enhanced/references/issue-templates.md +425 -0
- package/skills/qa-github-issues-enhanced/references/label-taxonomy.md +130 -0
- package/skills/qa-github-issues-enhanced/references/workflow-patterns.md +188 -0
- package/skills/qa-httpx-writer/SKILL.md +138 -0
- package/skills/qa-httpx-writer/references/assertions.md +195 -0
- package/skills/qa-httpx-writer/references/best-practices.md +140 -0
- package/skills/qa-httpx-writer/references/config.md +212 -0
- package/skills/qa-httpx-writer/references/patterns.md +262 -0
- package/skills/qa-jest-writer/SKILL.md +131 -0
- package/skills/qa-jest-writer/references/assertions.md +125 -0
- package/skills/qa-jest-writer/references/best-practices.md +136 -0
- package/skills/qa-jest-writer/references/config.md +134 -0
- package/skills/qa-jest-writer/references/patterns.md +172 -0
- package/skills/qa-jira-integration/SKILL.md +135 -0
- package/skills/qa-jira-integration/references/api-patterns.md +143 -0
- package/skills/qa-jira-integration/references/field-mapping.md +79 -0
- package/skills/qa-jira-integration/references/xray-integration.md +85 -0
- package/skills/qa-jmeter-writer/SKILL.md +171 -0
- package/skills/qa-jmeter-writer/references/best-practices.md +157 -0
- package/skills/qa-jmeter-writer/references/config.md +204 -0
- package/skills/qa-jmeter-writer/references/patterns.md +242 -0
- package/skills/qa-junit5-writer/SKILL.md +157 -0
- package/skills/qa-junit5-writer/references/assertions.md +118 -0
- package/skills/qa-junit5-writer/references/config.md +97 -0
- package/skills/qa-junit5-writer/references/patterns.md +162 -0
- package/skills/qa-k6-writer/SKILL.md +155 -0
- package/skills/qa-k6-writer/references/best-practices.md +236 -0
- package/skills/qa-k6-writer/references/config.md +219 -0
- package/skills/qa-k6-writer/references/patterns.md +304 -0
- package/skills/qa-linear-integration/SKILL.md +137 -0
- package/skills/qa-linear-integration/references/api-patterns.md +249 -0
- package/skills/qa-linear-integration/references/field-mapping.md +121 -0
- package/skills/qa-locust-writer/SKILL.md +151 -0
- package/skills/qa-locust-writer/references/best-practices.md +126 -0
- package/skills/qa-locust-writer/references/config.md +170 -0
- package/skills/qa-locust-writer/references/patterns.md +235 -0
- package/skills/qa-manual-test-designer/SKILL.md +145 -0
- package/skills/qa-manual-test-designer/references/exploratory-charters.md +138 -0
- package/skills/qa-manual-test-designer/references/personas.md +146 -0
- package/skills/qa-manual-test-designer/templates/exploratory-charter-template.md +47 -0
- package/skills/qa-manual-test-designer/templates/test-case-template.md +31 -0
- package/skills/qa-mobile-test-writer/SKILL.md +144 -0
- package/skills/qa-mobile-test-writer/references/best-practices.md +214 -0
- package/skills/qa-mobile-test-writer/references/config.md +309 -0
- package/skills/qa-mobile-test-writer/references/patterns.md +304 -0
- package/skills/qa-nfr-analyst/SKILL.md +177 -0
- package/skills/qa-nfr-analyst/references/iso-25010-model.md +159 -0
- package/skills/qa-nfr-analyst/references/owasp-wstg-baseline.md +202 -0
- package/skills/qa-nfr-analyst/references/wcag-checklist.md +184 -0
- package/skills/qa-nfr-analyst/templates/owasp-checklist-template.md +89 -0
- package/skills/qa-nfr-analyst/templates/wcag-checklist-template.md +48 -0
- package/skills/qa-orchestrator/SKILL.md +132 -0
- package/skills/qa-orchestrator/references/handoff-chains.md +105 -0
- package/skills/qa-orchestrator/references/pipeline-modes.md +115 -0
- package/skills/qa-orchestrator/references/scheduler-rules.md +84 -0
- package/skills/qa-pact-writer/SKILL.md +133 -0
- package/skills/qa-pact-writer/references/best-practices.md +100 -0
- package/skills/qa-pact-writer/references/config.md +135 -0
- package/skills/qa-pact-writer/references/patterns.md +161 -0
- package/skills/qa-plan-creator/SKILL.md +139 -0
- package/skills/qa-plan-creator/references/introduction-plan.md +43 -0
- package/skills/qa-plan-creator/references/migration-plan.md +44 -0
- package/skills/qa-plan-creator/references/onboarding-plan.md +46 -0
- package/skills/qa-plan-creator/references/performance-plan.md +44 -0
- package/skills/qa-plan-creator/references/regression-plan.md +45 -0
- package/skills/qa-plan-creator/references/release-plan.md +45 -0
- package/skills/qa-plan-creator/references/sprint-plan.md +44 -0
- package/skills/qa-plan-creator/references/test-plan.md +59 -0
- package/skills/qa-plan-creator/references/uat-plan.md +43 -0
- package/skills/qa-plan-creator/templates/checklist-template.md +36 -0
- package/skills/qa-plan-creator/templates/regression-checklist-template.md +49 -0
- package/skills/qa-plan-creator/templates/release-checklist-template.md +46 -0
- package/skills/qa-plan-creator/templates/test-plan-template.md +74 -0
- package/skills/qa-playwright-py-writer/SKILL.md +156 -0
- package/skills/qa-playwright-py-writer/references/best-practices.md +194 -0
- package/skills/qa-playwright-py-writer/references/config.md +195 -0
- package/skills/qa-playwright-py-writer/references/patterns.md +212 -0
- package/skills/qa-playwright-ts-writer/SKILL.md +151 -0
- package/skills/qa-playwright-ts-writer/references/assertions.md +109 -0
- package/skills/qa-playwright-ts-writer/references/best-practices.md +191 -0
- package/skills/qa-playwright-ts-writer/references/config.md +144 -0
- package/skills/qa-playwright-ts-writer/references/patterns.md +171 -0
- package/skills/qa-pytest-writer/SKILL.md +145 -0
- package/skills/qa-pytest-writer/references/assertions.md +149 -0
- package/skills/qa-pytest-writer/references/best-practices.md +97 -0
- package/skills/qa-pytest-writer/references/config.md +176 -0
- package/skills/qa-pytest-writer/references/patterns.md +251 -0
- package/skills/qa-qase-integration/SKILL.md +149 -0
- package/skills/qa-qase-integration/references/api-reference.md +354 -0
- package/skills/qa-qase-integration/references/ci-integration.md +196 -0
- package/skills/qa-qase-integration/references/field-mapping.md +157 -0
- package/skills/qa-requirements-generator/SKILL.md +152 -0
- package/skills/qa-requirements-generator/references/iso-29148-structure.md +153 -0
- package/skills/qa-requirements-generator/references/requirement-patterns.md +278 -0
- package/skills/qa-rest-assured-writer/SKILL.md +137 -0
- package/skills/qa-rest-assured-writer/references/best-practices.md +50 -0
- package/skills/qa-rest-assured-writer/references/config.md +124 -0
- package/skills/qa-rest-assured-writer/references/patterns.md +192 -0
- package/skills/qa-risk-analyzer/SKILL.md +158 -0
- package/skills/qa-risk-analyzer/references/impact-analysis.md +133 -0
- package/skills/qa-risk-analyzer/references/risk-factors.md +123 -0
- package/skills/qa-robot-framework-writer/SKILL.md +147 -0
- package/skills/qa-robot-framework-writer/references/best-practices.md +249 -0
- package/skills/qa-robot-framework-writer/references/config.md +204 -0
- package/skills/qa-robot-framework-writer/references/libraries.md +273 -0
- package/skills/qa-robot-framework-writer/references/patterns.md +216 -0
- package/skills/qa-security-test-writer/SKILL.md +123 -0
- package/skills/qa-security-test-writer/references/best-practices.md +155 -0
- package/skills/qa-security-test-writer/references/owasp-top10.md +331 -0
- package/skills/qa-security-test-writer/references/zap-config.md +258 -0
- package/skills/qa-selenium-java-writer/SKILL.md +143 -0
- package/skills/qa-selenium-java-writer/references/best-practices.md +59 -0
- package/skills/qa-selenium-java-writer/references/config.md +143 -0
- package/skills/qa-selenium-java-writer/references/patterns.md +170 -0
- package/skills/qa-selenium-py-writer/SKILL.md +150 -0
- package/skills/qa-selenium-py-writer/references/best-practices.md +175 -0
- package/skills/qa-selenium-py-writer/references/config.md +224 -0
- package/skills/qa-selenium-py-writer/references/patterns.md +255 -0
- package/skills/qa-shortcut-integration/SKILL.md +143 -0
- package/skills/qa-shortcut-integration/references/api-patterns.md +126 -0
- package/skills/qa-shortcut-integration/references/field-mapping.md +66 -0
- package/skills/qa-spec-auditor/SKILL.md +162 -0
- package/skills/qa-spec-auditor/references/audit-checklist.md +144 -0
- package/skills/qa-spec-auditor/references/drift-patterns.md +207 -0
- package/skills/qa-spec-writer/SKILL.md +143 -0
- package/skills/qa-spec-writer/references/gherkin-guide.md +253 -0
- package/skills/qa-spec-writer/references/specification-patterns.md +274 -0
- package/skills/qa-spring-test-writer/SKILL.md +170 -0
- package/skills/qa-spring-test-writer/references/best-practices.md +57 -0
- package/skills/qa-spring-test-writer/references/config.md +179 -0
- package/skills/qa-spring-test-writer/references/patterns.md +235 -0
- package/skills/qa-supertest-writer/SKILL.md +150 -0
- package/skills/qa-supertest-writer/references/assertions.md +192 -0
- package/skills/qa-supertest-writer/references/best-practices.md +102 -0
- package/skills/qa-supertest-writer/references/config.md +166 -0
- package/skills/qa-supertest-writer/references/patterns.md +242 -0
- package/skills/qa-task-creator/SKILL.md +142 -0
- package/skills/qa-task-creator/references/linking-patterns.md +127 -0
- package/skills/qa-task-creator/references/task-types.md +169 -0
- package/skills/qa-task-creator/templates/task-template.md +24 -0
- package/skills/qa-test-doc-compiler/SKILL.md +114 -0
- package/skills/qa-test-doc-compiler/references/agile-tailoring.md +220 -0
- package/skills/qa-test-doc-compiler/references/iso-29119-3-documents.md +302 -0
- package/skills/qa-test-healer/SKILL.md +101 -0
- package/skills/qa-test-healer/references/diagnosis-patterns.md +142 -0
- package/skills/qa-test-healer/references/fix-strategies.md +177 -0
- package/skills/qa-test-reporter/SKILL.md +130 -0
- package/skills/qa-test-reporter/references/best-practices.md +162 -0
- package/skills/qa-test-reporter/references/iso-29119-reports.md +236 -0
- package/skills/qa-test-reporter/references/report-formats.md +287 -0
- package/skills/qa-test-reviewer/SKILL.md +142 -0
- package/skills/qa-test-reviewer/references/anti-patterns.md +268 -0
- package/skills/qa-test-reviewer/references/review-checklist.md +93 -0
- package/skills/qa-test-strategy/SKILL.md +133 -0
- package/skills/qa-test-strategy/references/entry-exit-criteria.md +176 -0
- package/skills/qa-test-strategy/references/risk-matrix.md +102 -0
- package/skills/qa-test-strategy/references/testing-types.md +143 -0
- package/skills/qa-testcase-from-docs/SKILL.md +161 -0
- package/skills/qa-testcase-from-docs/references/test-case-format.md +196 -0
- package/skills/qa-testcase-from-docs/references/test-design-techniques.md +126 -0
- package/skills/qa-testcase-from-docs/templates/test-case-template.md +31 -0
- package/skills/qa-testcase-from-ui/SKILL.md +109 -0
- package/skills/qa-testcase-from-ui/references/ui-element-patterns.md +126 -0
- package/skills/qa-testcase-from-ui/references/visual-analysis-guide.md +146 -0
- package/skills/qa-testcase-from-ui/templates/test-case-template.md +31 -0
- package/skills/qa-visual-regression-writer/SKILL.md +175 -0
- package/skills/qa-visual-regression-writer/references/best-practices.md +154 -0
- package/skills/qa-visual-regression-writer/references/config.md +220 -0
- package/skills/qa-visual-regression-writer/references/patterns.md +213 -0
- package/skills/qa-vitest-writer/SKILL.md +141 -0
- package/skills/qa-vitest-writer/references/assertions.md +105 -0
- package/skills/qa-vitest-writer/references/best-practices.md +62 -0
- package/skills/qa-vitest-writer/references/config.md +127 -0
- package/skills/qa-vitest-writer/references/patterns.md +141 -0
- package/skills/qa-webdriverio-writer/SKILL.md +145 -0
- package/skills/qa-webdriverio-writer/references/best-practices.md +176 -0
- package/skills/qa-webdriverio-writer/references/config.md +240 -0
- package/skills/qa-webdriverio-writer/references/patterns.md +269 -0
package/dist/scaffold.js
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,EAAE,OAAO,EAAE,aAAa,EAAE;IAC5E,mBAAmB,EAAE,EAAE,IAAI,EAAE,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE;IAC7E,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE;IAClE,sBAAsB,EAAE,EAAE,IAAI,EAAE,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE;IAC3F,mBAAmB,EAAE,EAAE,IAAI,EAAE,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE;IACjF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
|
|
4
|
+
"description": "Interactive CLI installer for QA Skills Ecosystem — install skills into Cursor, Claude Code, Codex, Cline, Copilot, Windsurf, and 5+ more agents",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"qa-skills": "./bin/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"dist/",
|
|
12
|
+
"skills/",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"prebuild": "node scripts/bundle-skills.js",
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"prepare": "npm run build",
|
|
19
|
+
"start": "node bin/cli.js"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"qa", "testing", "automation", "skills",
|
|
23
|
+
"cursor", "copilot", "claude", "windsurf",
|
|
24
|
+
"codex", "cline", "opencode", "gemini",
|
|
25
|
+
"agent-skills"
|
|
26
|
+
],
|
|
27
|
+
"license": "GPL-3.0-only",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@clack/prompts": "^0.11.0",
|
|
30
|
+
"chalk": "^5.3.0",
|
|
31
|
+
"commander": "^13.0.0",
|
|
32
|
+
"fs-extra": "^11.2.0",
|
|
33
|
+
"gray-matter": "^4.0.3"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/fs-extra": "^11.0.0",
|
|
37
|
+
"@types/node": "^22.0.0",
|
|
38
|
+
"typescript": "^5.6.0"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
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 |
|