qaa-agent 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.claude/commands/create-test.md +40 -0
  2. package/.claude/commands/qa-analyze.md +60 -0
  3. package/.claude/commands/qa-audit.md +37 -0
  4. package/.claude/commands/qa-blueprint.md +54 -0
  5. package/.claude/commands/qa-fix.md +36 -0
  6. package/.claude/commands/qa-from-ticket.md +88 -0
  7. package/.claude/commands/qa-gap.md +54 -0
  8. package/.claude/commands/qa-pom.md +36 -0
  9. package/.claude/commands/qa-pyramid.md +37 -0
  10. package/.claude/commands/qa-report.md +38 -0
  11. package/.claude/commands/qa-start.md +33 -0
  12. package/.claude/commands/qa-testid.md +54 -0
  13. package/.claude/commands/qa-validate.md +54 -0
  14. package/.claude/commands/update-test.md +58 -0
  15. package/.claude/settings.json +19 -0
  16. package/.claude/skills/qa-bug-detective/SKILL.md +122 -0
  17. package/.claude/skills/qa-repo-analyzer/SKILL.md +88 -0
  18. package/.claude/skills/qa-self-validator/SKILL.md +109 -0
  19. package/.claude/skills/qa-template-engine/SKILL.md +113 -0
  20. package/.claude/skills/qa-testid-injector/SKILL.md +93 -0
  21. package/.claude/skills/qa-workflow-documenter/SKILL.md +87 -0
  22. package/CLAUDE.md +543 -0
  23. package/README.md +418 -0
  24. package/agents/qa-pipeline-orchestrator.md +1217 -0
  25. package/agents/qaa-analyzer.md +508 -0
  26. package/agents/qaa-bug-detective.md +444 -0
  27. package/agents/qaa-executor.md +618 -0
  28. package/agents/qaa-planner.md +374 -0
  29. package/agents/qaa-scanner.md +422 -0
  30. package/agents/qaa-testid-injector.md +583 -0
  31. package/agents/qaa-validator.md +450 -0
  32. package/bin/install.cjs +176 -0
  33. package/bin/lib/commands.cjs +709 -0
  34. package/bin/lib/config.cjs +307 -0
  35. package/bin/lib/core.cjs +497 -0
  36. package/bin/lib/frontmatter.cjs +299 -0
  37. package/bin/lib/init.cjs +989 -0
  38. package/bin/lib/milestone.cjs +241 -0
  39. package/bin/lib/model-profiles.cjs +60 -0
  40. package/bin/lib/phase.cjs +911 -0
  41. package/bin/lib/roadmap.cjs +306 -0
  42. package/bin/lib/state.cjs +748 -0
  43. package/bin/lib/template.cjs +222 -0
  44. package/bin/lib/verify.cjs +842 -0
  45. package/bin/qaa-tools.cjs +607 -0
  46. package/package.json +34 -0
  47. package/templates/failure-classification.md +391 -0
  48. package/templates/gap-analysis.md +409 -0
  49. package/templates/pr-template.md +48 -0
  50. package/templates/qa-analysis.md +381 -0
  51. package/templates/qa-audit-report.md +465 -0
  52. package/templates/qa-repo-blueprint.md +636 -0
  53. package/templates/scan-manifest.md +312 -0
  54. package/templates/test-inventory.md +582 -0
  55. package/templates/testid-audit-report.md +354 -0
  56. package/templates/validation-report.md +243 -0
@@ -0,0 +1,40 @@
1
+ # Create Automated Tests
2
+
3
+ Generate production-ready test files with POM pattern for a specific feature or module. Reads existing QA_ANALYSIS.md and TEST_INVENTORY.md if available.
4
+
5
+ ## Usage
6
+
7
+ /create-test <feature-name> [--dev-repo <path>]
8
+
9
+ - feature-name: which feature to test (e.g., "login", "checkout", "user API")
10
+ - --dev-repo: path to developer repository (default: current directory)
11
+
12
+ ## What It Produces
13
+
14
+ - Test spec files (unit, API, E2E as appropriate for the feature)
15
+ - Page Object Model files (for E2E tests)
16
+ - Fixture files (test data)
17
+
18
+ ## Instructions
19
+
20
+ 1. Read `CLAUDE.md` -- POM rules, locator tiers, assertion rules, naming conventions, quality gates.
21
+ 2. Read existing analysis artifacts if available:
22
+ - `.qa-output/QA_ANALYSIS.md` -- architecture context
23
+ - `.qa-output/TEST_INVENTORY.md` -- pre-defined test cases for this feature
24
+ 3. Invoke executor agent:
25
+
26
+ Task(
27
+ prompt="
28
+ <objective>Generate test files for the specified feature following CLAUDE.md standards</objective>
29
+ <execution_context>@agents/qaa-executor.md</execution_context>
30
+ <files_to_read>
31
+ - CLAUDE.md
32
+ </files_to_read>
33
+ <parameters>
34
+ user_input: $ARGUMENTS
35
+ mode: feature-test
36
+ </parameters>
37
+ "
38
+ )
39
+
40
+ $ARGUMENTS
@@ -0,0 +1,60 @@
1
+ # QA Repository Analysis
2
+
3
+ Analysis-only mode. Scans a repository, detects framework and stack, and produces QA assessment documents. No test generation. No PR creation.
4
+
5
+ ## Usage
6
+
7
+ /qa-analyze [--dev-repo <path>] [--qa-repo <path>]
8
+
9
+ - No arguments: analyzes current directory
10
+ - --dev-repo: explicit path to developer repository
11
+ - --qa-repo: path to existing QA repository (produces gap analysis instead of blueprint)
12
+
13
+ ## What It Produces
14
+
15
+ - SCAN_MANIFEST.md -- file tree, framework detection, testable surfaces
16
+ - QA_ANALYSIS.md -- architecture overview, risk assessment, testing pyramid
17
+ - TEST_INVENTORY.md -- prioritized test cases with IDs and explicit outcomes
18
+ - QA_REPO_BLUEPRINT.md (if no QA repo) or GAP_ANALYSIS.md (if QA repo provided)
19
+
20
+ ## Instructions
21
+
22
+ 1. Read `CLAUDE.md` -- all QA standards.
23
+ 2. Initialize pipeline context:
24
+ ```bash
25
+ node bin/qaa-tools.cjs init qa-start [user arguments]
26
+ ```
27
+ 3. Invoke scanner agent:
28
+
29
+ Task(
30
+ prompt="
31
+ <objective>Scan repository and produce SCAN_MANIFEST.md</objective>
32
+ <execution_context>@agents/qaa-scanner.md</execution_context>
33
+ <files_to_read>
34
+ - CLAUDE.md
35
+ </files_to_read>
36
+ <parameters>
37
+ user_input: $ARGUMENTS
38
+ </parameters>
39
+ "
40
+ )
41
+
42
+ 4. Invoke analyzer agent:
43
+
44
+ Task(
45
+ prompt="
46
+ <objective>Analyze repository and produce QA_ANALYSIS.md, TEST_INVENTORY.md, and blueprint or gap analysis</objective>
47
+ <execution_context>@agents/qaa-analyzer.md</execution_context>
48
+ <files_to_read>
49
+ - CLAUDE.md
50
+ - .qa-output/SCAN_MANIFEST.md
51
+ </files_to_read>
52
+ <parameters>
53
+ user_input: $ARGUMENTS
54
+ </parameters>
55
+ "
56
+ )
57
+
58
+ 5. Present results to user. No git operations. No test generation.
59
+
60
+ $ARGUMENTS
@@ -0,0 +1,37 @@
1
+ # Full QA Audit
2
+
3
+ Comprehensive quality audit of a test suite against CLAUDE.md standards. Scores across 6 dimensions: Locator Quality (20%), Assertion Specificity (20%), POM Compliance (15%), Test Coverage (20%), Naming Convention (15%), Test Data Management (10%).
4
+
5
+ ## Usage
6
+
7
+ /qa-audit <path-to-tests> [--dev-repo <path>]
8
+
9
+ - path-to-tests: directory containing test files to audit
10
+ - --dev-repo: path to developer repository (for coverage cross-reference)
11
+
12
+ ## What It Produces
13
+
14
+ - QA_AUDIT_REPORT.md -- 6-dimension scoring, critical issues list, prioritized recommendations with effort estimates
15
+
16
+ ## Instructions
17
+
18
+ 1. Read `CLAUDE.md` -- quality gates, locator tiers, assertion rules, POM rules, naming conventions.
19
+ 2. Invoke validator agent in audit mode:
20
+
21
+ Task(
22
+ prompt="
23
+ <objective>Audit test suite quality and produce QA_AUDIT_REPORT.md with 6-dimension scoring</objective>
24
+ <execution_context>@agents/qaa-validator.md</execution_context>
25
+ <files_to_read>
26
+ - CLAUDE.md
27
+ </files_to_read>
28
+ <parameters>
29
+ user_input: $ARGUMENTS
30
+ mode: audit
31
+ </parameters>
32
+ "
33
+ )
34
+
35
+ 3. Present results with overall score and prioritized recommendations.
36
+
37
+ $ARGUMENTS
@@ -0,0 +1,54 @@
1
+ # QA Repository Blueprint
2
+
3
+ Generate a complete QA repository structure blueprint for a project that has no existing QA repo. Includes recommended stack, folder structure, config files, CI/CD pipeline, and definition of done.
4
+
5
+ ## Usage
6
+
7
+ /qa-blueprint [--dev-repo <path>]
8
+
9
+ - No arguments: analyzes current directory
10
+ - --dev-repo: explicit path to developer repository
11
+
12
+ ## What It Produces
13
+
14
+ - SCAN_MANIFEST.md -- dev repo scan with framework detection
15
+ - QA_REPO_BLUEPRINT.md -- folder structure, recommended stack, config files, CI/CD strategy
16
+
17
+ ## Instructions
18
+
19
+ 1. Read `CLAUDE.md` -- repo structure, naming conventions, testing pyramid.
20
+ 2. Invoke scanner agent:
21
+
22
+ Task(
23
+ prompt="
24
+ <objective>Scan developer repository and produce SCAN_MANIFEST.md</objective>
25
+ <execution_context>@agents/qaa-scanner.md</execution_context>
26
+ <files_to_read>
27
+ - CLAUDE.md
28
+ </files_to_read>
29
+ <parameters>
30
+ user_input: $ARGUMENTS
31
+ </parameters>
32
+ "
33
+ )
34
+
35
+ 3. Invoke analyzer agent in full mode (blueprint):
36
+
37
+ Task(
38
+ prompt="
39
+ <objective>Produce QA_REPO_BLUEPRINT.md with complete repository structure</objective>
40
+ <execution_context>@agents/qaa-analyzer.md</execution_context>
41
+ <files_to_read>
42
+ - CLAUDE.md
43
+ - .qa-output/SCAN_MANIFEST.md
44
+ </files_to_read>
45
+ <parameters>
46
+ user_input: $ARGUMENTS
47
+ mode: full
48
+ </parameters>
49
+ "
50
+ )
51
+
52
+ 4. Present blueprint to user. No git operations.
53
+
54
+ $ARGUMENTS
@@ -0,0 +1,36 @@
1
+ # Fix Broken Tests
2
+
3
+ Diagnose and fix broken test files. Classifies each failure as APPLICATION BUG, TEST CODE ERROR, ENVIRONMENT ISSUE, or INCONCLUSIVE. Auto-fixes only TEST CODE ERRORS. Never touches application code -- only reports APP BUGs for developer attention.
4
+
5
+ ## Usage
6
+
7
+ /qa-fix <path-to-tests> [error output]
8
+
9
+ - path-to-tests: directory or specific test files with failures
10
+ - error output: paste test runner output (optional -- agent will run tests if not provided)
11
+
12
+ ## What It Produces
13
+
14
+ - FAILURE_CLASSIFICATION_REPORT.md -- per-failure classification with evidence, confidence, and auto-fix log
15
+
16
+ ## Instructions
17
+
18
+ 1. Read `CLAUDE.md` -- classification rules, locator tiers, assertion quality.
19
+ 2. Invoke bug-detective agent:
20
+
21
+ Task(
22
+ prompt="
23
+ <objective>Run tests, classify failures, and auto-fix TEST CODE ERRORS</objective>
24
+ <execution_context>@agents/qaa-bug-detective.md</execution_context>
25
+ <files_to_read>
26
+ - CLAUDE.md
27
+ </files_to_read>
28
+ <parameters>
29
+ user_input: $ARGUMENTS
30
+ </parameters>
31
+ "
32
+ )
33
+
34
+ 3. Present results. APPLICATION BUGs are reported for developer action, not auto-fixed.
35
+
36
+ $ARGUMENTS
@@ -0,0 +1,88 @@
1
+ # Create Tests from Ticket
2
+
3
+ Generate test cases and executable test files from a ticket (Jira, Linear, GitHub Issue, or plain text user story). Combines the ticket's acceptance criteria with actual source code analysis to produce targeted, concrete tests.
4
+
5
+ ## Usage
6
+
7
+ /qa-from-ticket <ticket-source> [--dev-repo <path>]
8
+
9
+ - ticket-source: one of:
10
+ - URL to Jira/Linear/GitHub issue (e.g., https://linear.app/team/PROJ-123)
11
+ - Plain text user story or acceptance criteria
12
+ - File path to a .md or .txt with ticket details
13
+ - --dev-repo: path to developer repository (default: current directory)
14
+
15
+ ## What It Produces
16
+
17
+ - TEST_CASES_FROM_TICKET.md -- test cases derived from acceptance criteria
18
+ - Test spec files (unit, API, E2E as appropriate)
19
+ - Page Object Model files (for E2E tests if needed)
20
+ - Fixture files (test data)
21
+ - Traceability matrix: which test covers which acceptance criterion
22
+
23
+ ## Instructions
24
+
25
+ 1. Read `CLAUDE.md` -- all QA standards.
26
+
27
+ 2. Parse the ticket source:
28
+
29
+ **If URL:** Fetch the ticket content using WebFetch or gh CLI (for GitHub issues).
30
+ ```bash
31
+ # GitHub Issues
32
+ gh issue view <number> --json title,body,labels,assignees
33
+
34
+ # For other URLs, use WebFetch to read the page
35
+ ```
36
+
37
+ **If plain text:** Use the text directly as the ticket content.
38
+
39
+ **If file path:** Read the file content.
40
+
41
+ 3. Extract from the ticket:
42
+ - **Title/Summary**: what the feature or bug is about
43
+ - **Acceptance Criteria**: the specific conditions that must be met (look for "AC:", "Given/When/Then", checkboxes, numbered criteria)
44
+ - **User Story**: "As a [role] I want [action] so that [benefit]"
45
+ - **Edge Cases**: any mentioned edge cases, error states, or constraints
46
+ - **Priority**: ticket priority if available (maps to test priority P0/P1/P2)
47
+
48
+ 4. Read the dev repo source code related to the ticket:
49
+ - Search for files matching keywords from the ticket title
50
+ - Read routes, controllers, services, models related to the feature
51
+ - Identify the actual implementation (or lack of it if the feature is not built yet)
52
+
53
+ 5. Generate test cases that map 1:1 to acceptance criteria:
54
+ - Each acceptance criterion becomes at least one test case
55
+ - Add negative tests for each criterion (what should NOT happen)
56
+ - Add edge case tests if mentioned in the ticket
57
+ - Every test case follows CLAUDE.md rules: unique ID, concrete inputs, explicit expected outcome
58
+
59
+ 6. Write TEST_CASES_FROM_TICKET.md with:
60
+ ```markdown
61
+ # Test Cases from Ticket: [TICKET-ID] [Title]
62
+
63
+ ## Source
64
+ - Ticket: [URL or "manual input"]
65
+ - Date: [YYYY-MM-DD]
66
+
67
+ ## Acceptance Criteria Mapping
68
+
69
+ | AC # | Criterion | Test ID(s) | Status |
70
+ |------|-----------|------------|--------|
71
+ | AC-1 | [criterion text] | UT-XXX-001, E2E-XXX-001 | Covered |
72
+ | AC-2 | [criterion text] | API-XXX-001 | Covered |
73
+
74
+ ## Test Cases
75
+ [test cases following CLAUDE.md format]
76
+ ```
77
+
78
+ 7. Generate executable test files using the qa-template-engine skill.
79
+
80
+ 8. Validate generated tests using the qa-self-validator skill.
81
+
82
+ 9. Present summary:
83
+ - How many acceptance criteria found
84
+ - How many test cases generated (by pyramid level)
85
+ - Traceability: every AC is covered
86
+ - Any ACs that could not be tested (and why)
87
+
88
+ $ARGUMENTS
@@ -0,0 +1,54 @@
1
+ # QA Gap Analysis
2
+
3
+ Compare a developer repository against its QA repository to identify coverage gaps. Requires both repo paths. Produces a detailed gap report showing missing tests, broken tests, and quality assessment.
4
+
5
+ ## Usage
6
+
7
+ /qa-gap --dev-repo <path> --qa-repo <path>
8
+
9
+ - --dev-repo: path to the developer repository (required)
10
+ - --qa-repo: path to the existing QA repository (required)
11
+
12
+ ## What It Produces
13
+
14
+ - SCAN_MANIFEST.md -- scan of both repositories
15
+ - GAP_ANALYSIS.md -- coverage map, missing tests with IDs, broken tests, quality assessment
16
+
17
+ ## Instructions
18
+
19
+ 1. Read `CLAUDE.md` -- testing pyramid, test spec rules, quality gates.
20
+ 2. Invoke scanner agent to scan both repositories:
21
+
22
+ Task(
23
+ prompt="
24
+ <objective>Scan both developer and QA repositories and produce SCAN_MANIFEST.md</objective>
25
+ <execution_context>@agents/qaa-scanner.md</execution_context>
26
+ <files_to_read>
27
+ - CLAUDE.md
28
+ </files_to_read>
29
+ <parameters>
30
+ user_input: $ARGUMENTS
31
+ </parameters>
32
+ "
33
+ )
34
+
35
+ 3. Invoke analyzer agent in gap mode:
36
+
37
+ Task(
38
+ prompt="
39
+ <objective>Produce GAP_ANALYSIS.md comparing dev repo against QA repo</objective>
40
+ <execution_context>@agents/qaa-analyzer.md</execution_context>
41
+ <files_to_read>
42
+ - CLAUDE.md
43
+ - .qa-output/SCAN_MANIFEST.md
44
+ </files_to_read>
45
+ <parameters>
46
+ user_input: $ARGUMENTS
47
+ mode: gap
48
+ </parameters>
49
+ "
50
+ )
51
+
52
+ 4. Present results. No test generation. No git operations.
53
+
54
+ $ARGUMENTS
@@ -0,0 +1,36 @@
1
+ # Generate Page Object Models
2
+
3
+ Create or update Page Object Model files following CLAUDE.md POM rules. Checks for existing BasePage before creating one. Generates feature-specific POMs with Tier 1 locators, no assertions, and fluent action chaining.
4
+
5
+ ## Usage
6
+
7
+ /qa-pom <path-to-pages> [--framework <name>]
8
+
9
+ - path-to-pages: directory containing page/view source files or URLs to model
10
+ - --framework: override framework auto-detection (playwright, cypress, selenium)
11
+
12
+ ## What It Produces
13
+
14
+ - BasePage file (if not already present)
15
+ - Feature-specific POM files following `[PageName]Page.[ext]` naming convention
16
+
17
+ ## Instructions
18
+
19
+ 1. Read `CLAUDE.md` -- POM rules, locator tier hierarchy, naming conventions.
20
+ 2. Invoke executor agent in POM-only mode:
21
+
22
+ Task(
23
+ prompt="
24
+ <objective>Generate Page Object Models following CLAUDE.md POM rules</objective>
25
+ <execution_context>@agents/qaa-executor.md</execution_context>
26
+ <files_to_read>
27
+ - CLAUDE.md
28
+ </files_to_read>
29
+ <parameters>
30
+ user_input: $ARGUMENTS
31
+ mode: pom-only
32
+ </parameters>
33
+ "
34
+ )
35
+
36
+ $ARGUMENTS
@@ -0,0 +1,37 @@
1
+ # Testing Pyramid Analysis
2
+
3
+ Analyze a project's test distribution against the ideal testing pyramid from CLAUDE.md. Compares actual percentages to targets and produces an action plan to reach the recommended distribution.
4
+
5
+ ## Usage
6
+
7
+ /qa-pyramid <path-to-tests> [--dev-repo <path>]
8
+
9
+ - path-to-tests: directory containing test files
10
+ - --dev-repo: path to developer repository (for architecture-aware target adjustment)
11
+
12
+ ## What It Produces
13
+
14
+ - PYRAMID_ANALYSIS.md -- current vs target distribution, gap table, prioritized action plan
15
+
16
+ ## Instructions
17
+
18
+ 1. Read `CLAUDE.md` -- testing pyramid target percentages.
19
+ 2. Invoke analyzer agent for pyramid analysis:
20
+
21
+ Task(
22
+ prompt="
23
+ <objective>Produce PYRAMID_ANALYSIS.md comparing actual test distribution to target pyramid</objective>
24
+ <execution_context>@agents/qaa-analyzer.md</execution_context>
25
+ <files_to_read>
26
+ - CLAUDE.md
27
+ </files_to_read>
28
+ <parameters>
29
+ user_input: $ARGUMENTS
30
+ mode: pyramid-analysis
31
+ </parameters>
32
+ "
33
+ )
34
+
35
+ 3. Present analysis with action plan to user.
36
+
37
+ $ARGUMENTS
@@ -0,0 +1,38 @@
1
+ # QA Status Report
2
+
3
+ Generate a summary report of current QA status for a project. Adapts detail level to audience: team (file-level details), management (high-level metrics), or client (coverage summary).
4
+
5
+ ## Usage
6
+
7
+ /qa-report <path-to-tests> [--dev-repo <path>] [--audience <team|management|client>]
8
+
9
+ - path-to-tests: directory containing test files
10
+ - --dev-repo: path to developer repository (for coverage calculation)
11
+ - --audience: report detail level (default: team)
12
+
13
+ ## What It Produces
14
+
15
+ - QA_STATUS_REPORT.md -- metrics, testing pyramid distribution, risk areas, recommendations
16
+
17
+ ## Instructions
18
+
19
+ 1. Read `CLAUDE.md` -- testing pyramid targets, quality gates.
20
+ 2. Invoke analyzer agent for status reporting:
21
+
22
+ Task(
23
+ prompt="
24
+ <objective>Produce QA_STATUS_REPORT.md with current test suite metrics and coverage</objective>
25
+ <execution_context>@agents/qaa-analyzer.md</execution_context>
26
+ <files_to_read>
27
+ - CLAUDE.md
28
+ </files_to_read>
29
+ <parameters>
30
+ user_input: $ARGUMENTS
31
+ mode: status-report
32
+ </parameters>
33
+ "
34
+ )
35
+
36
+ 3. Present report to user.
37
+
38
+ $ARGUMENTS
@@ -0,0 +1,33 @@
1
+ # QA Automation -- Full Pipeline
2
+
3
+ Run the complete QA automation pipeline. Analyzes a repository, generates a standards-compliant test suite, validates it, and delivers everything as a draft PR.
4
+
5
+ ## Usage
6
+
7
+ /qa-start [--dev-repo <path>] [--qa-repo <path>] [--auto]
8
+
9
+ - No arguments: uses current directory as dev repo (Option 1)
10
+ - --dev-repo: explicit path to developer repository
11
+ - --qa-repo: path to existing QA repository (triggers Option 2 or 3)
12
+ - --auto: enable auto-advance mode (no pauses at safe checkpoints)
13
+
14
+ ## Instructions
15
+
16
+ 1. Read `CLAUDE.md` -- all QA standards that govern the pipeline.
17
+ 2. Read `agents/qa-pipeline-orchestrator.md` -- the pipeline controller.
18
+ 3. Invoke the orchestrator:
19
+
20
+ Task(
21
+ prompt="
22
+ <objective>Run complete QA automation pipeline</objective>
23
+ <execution_context>@agents/qa-pipeline-orchestrator.md</execution_context>
24
+ <files_to_read>
25
+ - CLAUDE.md
26
+ </files_to_read>
27
+ <parameters>
28
+ user_input: $ARGUMENTS
29
+ </parameters>
30
+ "
31
+ )
32
+
33
+ $ARGUMENTS
@@ -0,0 +1,54 @@
1
+ # Inject Test IDs
2
+
3
+ Scan frontend source code, audit missing data-testid attributes, and inject them following the naming convention in CLAUDE.md. Creates a separate branch for the changes.
4
+
5
+ ## Usage
6
+
7
+ /qa-testid <path-to-frontend-source>
8
+
9
+ - path-to-frontend-source: directory containing React/Vue/Angular/HTML components
10
+
11
+ ## What It Produces
12
+
13
+ - TESTID_AUDIT_REPORT.md -- coverage score, missing elements, proposed values by priority
14
+ - Modified source files with data-testid attributes injected
15
+
16
+ ## Instructions
17
+
18
+ 1. Read `CLAUDE.md` -- data-testid Convention section for naming rules.
19
+ 2. Initialize context:
20
+ ```bash
21
+ node bin/qaa-tools.cjs init qa-start --dev-repo [user path]
22
+ ```
23
+ 3. Invoke scanner to identify component files:
24
+
25
+ Task(
26
+ prompt="
27
+ <objective>Scan repository to identify frontend component files</objective>
28
+ <execution_context>@agents/qaa-scanner.md</execution_context>
29
+ <files_to_read>
30
+ - CLAUDE.md
31
+ </files_to_read>
32
+ <parameters>
33
+ user_input: $ARGUMENTS
34
+ </parameters>
35
+ "
36
+ )
37
+
38
+ 4. Invoke testid-injector agent:
39
+
40
+ Task(
41
+ prompt="
42
+ <objective>Audit missing data-testid attributes and inject following naming convention</objective>
43
+ <execution_context>@agents/qaa-testid-injector.md</execution_context>
44
+ <files_to_read>
45
+ - CLAUDE.md
46
+ - .qa-output/SCAN_MANIFEST.md
47
+ </files_to_read>
48
+ <parameters>
49
+ user_input: $ARGUMENTS
50
+ </parameters>
51
+ "
52
+ )
53
+
54
+ $ARGUMENTS
@@ -0,0 +1,54 @@
1
+ # QA Test Validation
2
+
3
+ Validate existing test files against CLAUDE.md standards. Runs 4-layer validation (syntax, structure, dependencies, logic) and classifies any failures found.
4
+
5
+ ## Usage
6
+
7
+ /qa-validate <path-to-tests> [--framework <name>]
8
+
9
+ - path-to-tests: directory or specific test files to validate
10
+ - --framework: override framework auto-detection (playwright, cypress, jest, etc.)
11
+
12
+ ## What It Produces
13
+
14
+ - VALIDATION_REPORT.md -- pass/fail per file per validation layer, confidence level
15
+ - FAILURE_CLASSIFICATION_REPORT.md -- if failures found, classifies as APP BUG / TEST ERROR / ENV ISSUE / INCONCLUSIVE
16
+
17
+ ## Instructions
18
+
19
+ 1. Read `CLAUDE.md` -- quality gates, locator tiers, assertion rules.
20
+ 2. Invoke validator agent:
21
+
22
+ Task(
23
+ prompt="
24
+ <objective>Validate test files with 4-layer validation and produce VALIDATION_REPORT.md</objective>
25
+ <execution_context>@agents/qaa-validator.md</execution_context>
26
+ <files_to_read>
27
+ - CLAUDE.md
28
+ </files_to_read>
29
+ <parameters>
30
+ user_input: $ARGUMENTS
31
+ mode: validation
32
+ </parameters>
33
+ "
34
+ )
35
+
36
+ 3. If failures detected, invoke bug-detective agent:
37
+
38
+ Task(
39
+ prompt="
40
+ <objective>Classify test failures and auto-fix TEST CODE ERRORS</objective>
41
+ <execution_context>@agents/qaa-bug-detective.md</execution_context>
42
+ <files_to_read>
43
+ - CLAUDE.md
44
+ - .qa-output/VALIDATION_REPORT.md
45
+ </files_to_read>
46
+ <parameters>
47
+ user_input: $ARGUMENTS
48
+ </parameters>
49
+ "
50
+ )
51
+
52
+ 4. Present results. No git operations.
53
+
54
+ $ARGUMENTS
@@ -0,0 +1,58 @@
1
+ # Update and Improve Existing Tests
2
+
3
+ Audit existing test files and apply targeted improvements. NEVER deletes or rewrites working tests without user approval. Surgical: add, fix, improve -- never replace.
4
+
5
+ ## Usage
6
+
7
+ /update-test <path-to-tests> [--scope fix|improve|add|full]
8
+
9
+ - path-to-tests: directory or specific test files to improve
10
+ - --scope: what to do (default: full)
11
+ - fix: repair broken tests only
12
+ - improve: upgrade locators, assertions, POM structure
13
+ - add: add missing test cases without modifying existing
14
+ - full: audit everything, then improve with approval
15
+
16
+ ## What It Produces
17
+
18
+ - QA_AUDIT_REPORT.md -- current quality assessment
19
+ - Improved test files (after user approval of audit findings)
20
+
21
+ ## Instructions
22
+
23
+ 1. Read `CLAUDE.md` -- quality gates, locator tiers, assertion rules, POM rules.
24
+ 2. Invoke validator agent in audit mode first:
25
+
26
+ Task(
27
+ prompt="
28
+ <objective>Audit existing test quality and produce QA_AUDIT_REPORT.md</objective>
29
+ <execution_context>@agents/qaa-validator.md</execution_context>
30
+ <files_to_read>
31
+ - CLAUDE.md
32
+ </files_to_read>
33
+ <parameters>
34
+ user_input: $ARGUMENTS
35
+ mode: audit
36
+ </parameters>
37
+ "
38
+ )
39
+
40
+ 3. Present audit results and wait for user approval.
41
+ 4. Invoke executor agent to apply approved improvements:
42
+
43
+ Task(
44
+ prompt="
45
+ <objective>Apply approved improvements to existing tests without deleting working tests</objective>
46
+ <execution_context>@agents/qaa-executor.md</execution_context>
47
+ <files_to_read>
48
+ - CLAUDE.md
49
+ - .qa-output/QA_AUDIT_REPORT.md
50
+ </files_to_read>
51
+ <parameters>
52
+ user_input: $ARGUMENTS
53
+ mode: update
54
+ </parameters>
55
+ "
56
+ )
57
+
58
+ $ARGUMENTS