qaa-agent 1.6.3 → 1.7.1

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 (42) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/agents/qaa-analyzer.md +16 -1
  3. package/agents/qaa-bug-detective.md +33 -0
  4. package/agents/qaa-discovery.md +384 -0
  5. package/agents/qaa-e2e-runner.md +7 -6
  6. package/agents/qaa-planner.md +16 -1
  7. package/agents/qaa-testid-injector.md +60 -2
  8. package/agents/qaa-validator.md +38 -0
  9. package/bin/install.cjs +25 -13
  10. package/commands/qa-audit.md +119 -0
  11. package/commands/qa-create-test.md +288 -0
  12. package/commands/qa-fix.md +395 -0
  13. package/commands/qa-map.md +137 -0
  14. package/package.json +40 -41
  15. package/{.claude/settings.json → settings.json} +19 -20
  16. package/{.claude/skills → skills}/qa-bug-detective/SKILL.md +122 -122
  17. package/{.claude/skills → skills}/qa-repo-analyzer/SKILL.md +88 -88
  18. package/{.claude/skills → skills}/qa-self-validator/SKILL.md +109 -109
  19. package/{.claude/skills → skills}/qa-template-engine/SKILL.md +113 -113
  20. package/{.claude/skills → skills}/qa-testid-injector/SKILL.md +93 -93
  21. package/{.claude/skills → skills}/qa-workflow-documenter/SKILL.md +87 -87
  22. package/workflows/qa-gap.md +7 -1
  23. package/workflows/qa-start.md +25 -1
  24. package/workflows/qa-testid.md +29 -1
  25. package/workflows/qa-validate.md +5 -1
  26. package/.claude/commands/create-test.md +0 -164
  27. package/.claude/commands/qa-audit.md +0 -37
  28. package/.claude/commands/qa-blueprint.md +0 -54
  29. package/.claude/commands/qa-fix.md +0 -36
  30. package/.claude/commands/qa-from-ticket.md +0 -24
  31. package/.claude/commands/qa-gap.md +0 -20
  32. package/.claude/commands/qa-map.md +0 -47
  33. package/.claude/commands/qa-pom.md +0 -36
  34. package/.claude/commands/qa-pyramid.md +0 -37
  35. package/.claude/commands/qa-report.md +0 -38
  36. package/.claude/commands/qa-research.md +0 -33
  37. package/.claude/commands/qa-validate.md +0 -42
  38. package/.claude/commands/update-test.md +0 -58
  39. package/.claude/skills/qa-learner/SKILL.md +0 -150
  40. /package/{.claude/commands → commands}/qa-pr.md +0 -0
  41. /package/{.claude/commands → commands}/qa-start.md +0 -0
  42. /package/{.claude/commands → commands}/qa-testid.md +0 -0
@@ -0,0 +1,395 @@
1
+ # QA Fix & Validate
2
+
3
+ Validate, diagnose, and fix test files — all in one command. Runs 4-layer static validation (syntax, structure, dependencies, logic), classifies failures, and auto-fixes TEST CODE ERRORS. Uses Playwright MCP to reproduce E2E failures and verify locators against the live app when available. Never touches application code.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /qa-fix [<test-files-or-directory>] [options]
9
+ ```
10
+
11
+ ### Options
12
+
13
+ - `<test-files-or-directory>` — one or more test file paths or a directory (auto-detects if omitted)
14
+ - `--check` — **final check mode**: full quality verification against company preferences, codebase conventions, and execution
15
+ - `--validate-only` — run 4-layer static validation only, no test execution or classification
16
+ - `--classify` — run tests and classify failures, but do NOT auto-fix
17
+ - `--run --app-url <url>` — also execute E2E tests against live app after static validation
18
+ - `--app-url <url>` — URL of running application (auto-detects if not provided)
19
+ - `[error output]` — paste test runner output directly (skips running tests, classifies the pasted output)
20
+
21
+ ### Mode Detection
22
+
23
+ ```
24
+ if --check:
25
+ MODE = "check" → full quality check + execution + QA_CHECK_REPORT.md
26
+ elif --validate-only:
27
+ MODE = "validate" → 4-layer static validation + VALIDATION_REPORT.md
28
+ elif --classify:
29
+ MODE = "classify" → run tests + classify failures (no auto-fix)
30
+ else:
31
+ MODE = "fix" → run tests + classify + auto-fix TEST CODE ERRORS (default)
32
+ ```
33
+
34
+ ## What It Produces
35
+
36
+ | Mode | Artifacts |
37
+ |------|-----------|
38
+ | check | QA_CHECK_REPORT.md (full quality verification with pass/fail per test file) |
39
+ | check --ticket | QA_CHECK_REPORT.md + UAT_VERIFICATION.md (step-by-step screenshots vs ticket acceptance criteria) |
40
+ | validate | VALIDATION_REPORT.md (syntax, structure, dependencies, logic per file) |
41
+ | classify | FAILURE_CLASSIFICATION_REPORT.md (per-failure evidence, no fixes) |
42
+ | fix | FAILURE_CLASSIFICATION_REPORT.md + auto-fixed test files |
43
+
44
+ ## Instructions
45
+
46
+ ### Step 1: Detect Mode and Test Directory
47
+
48
+ Parse `$ARGUMENTS` for mode flags and test directory path.
49
+
50
+ If no test directory provided, auto-detect:
51
+ - Check for `tests/`, `cypress/`, `__tests__/`, `e2e/`, `spec/` directories
52
+ - Check test config files for `testDir` setting
53
+
54
+ Print banner:
55
+ ```
56
+ === QA Fix & Validate ===
57
+ Mode: {validate | classify | fix}
58
+ Test Directory: {path}
59
+ App URL: {url or "auto-detect"}
60
+ ==========================
61
+ ```
62
+
63
+ ---
64
+
65
+ ### CHECK MODE (`--check`) — Final Quality Verification
66
+
67
+ Full quality check for specific test files. Reads ALL context sources, verifies every aspect of the tests, runs them, and produces a pass/fail report. Use this as a final gate before delivering tests.
68
+
69
+ **Accepts specific files:**
70
+ ```
71
+ /qa-fix --check tests/e2e/login.e2e.spec.ts tests/e2e/checkout.e2e.spec.ts
72
+ /qa-fix --check tests/unit/auth.unit.spec.ts
73
+ /qa-fix --check tests/e2e/ --app-url http://localhost:3000
74
+ ```
75
+
76
+ **Step 1: Read ALL context sources**
77
+
78
+ Read every available context source — this is not optional, all must be read:
79
+
80
+ 1. **CLAUDE.md** — QA standards, POM rules, locator tiers, assertion rules, naming conventions, quality gates
81
+ 2. **~/.claude/qaa/MY_PREFERENCES.md** — company/user preferences that OVERRIDE CLAUDE.md rules
82
+ 3. **Codebase map** (`.qa-output/codebase/`):
83
+ - `CODE_PATTERNS.md` — naming conventions, import style, file organization (are tests matching the project's style?)
84
+ - `API_CONTRACTS.md` — real API shapes (are API test payloads correct?)
85
+ - `TEST_SURFACE.md` — function signatures (are test targets real?)
86
+ - `TESTABILITY.md` — mock boundaries (are mocks set up correctly?)
87
+ 4. **Locator Registry** (`.qa-output/locators/`) — real locators from the app (are POM locators accurate?)
88
+ 5. **Existing test patterns** — read 2-3 existing test files in the same repo to understand current conventions (describe block style, import patterns, assertion patterns, fixture usage)
89
+
90
+ If codebase map is missing, STOP and tell the user to run `/qa-map` first.
91
+
92
+ **Step 2: Verify each test file across 7 dimensions**
93
+
94
+ For EACH selected test file, check:
95
+
96
+ | # | Dimension | What to check | Source |
97
+ |---|-----------|---------------|--------|
98
+ | 1 | **Naming** | File name, test IDs, describe/it names follow conventions | CLAUDE.md + CODE_PATTERNS.md + MY_PREFERENCES.md |
99
+ | 2 | **Structure** | Correct directory, imports resolve, follows repo patterns | CODE_PATTERNS.md + existing tests in repo |
100
+ | 3 | **Locators** | POM locators match registry, Tier 1 preferred, no stale selectors | LOCATOR_REGISTRY.md |
101
+ | 4 | **Assertions** | Concrete values (no toBeTruthy alone), match API contracts | CLAUDE.md + API_CONTRACTS.md |
102
+ | 5 | **POM compliance** | No assertions in POMs, locators as properties, extends BasePage | CLAUDE.md |
103
+ | 6 | **Code quality** | No redundant code, no dead code, no hardcoded credentials, no copy-paste | Code review |
104
+ | 7 | **Company conventions** | Matches all rules in MY_PREFERENCES.md | MY_PREFERENCES.md |
105
+
106
+ **Step 3: Run the tests**
107
+
108
+ Execute the selected test files:
109
+
110
+ ```bash
111
+ # Detect test runner from project config
112
+ npx playwright test {files} --reporter=json 2>&1 # if Playwright
113
+ npx cypress run --spec {files} 2>&1 # if Cypress
114
+ npx jest {files} --json 2>&1 # if Jest
115
+ npx vitest run {files} --reporter=json 2>&1 # if Vitest
116
+ ```
117
+
118
+ If E2E tests and app URL available, also verify with Playwright MCP:
119
+ - Navigate to each page referenced in the tests
120
+ - `browser_snapshot()` to verify elements exist in DOM
121
+ - Cross-reference locators against real page
122
+
123
+ **Step 4: Fix issues found**
124
+
125
+ For each issue found:
126
+ - **AUTO-FIX** (HIGH confidence): naming, imports, locator mismatches, missing await, Tier 4→Tier 1 upgrade when registry has the value
127
+ - **FLAG for review** (MEDIUM/LOW): logic changes, assertion value changes, structural refactors
128
+ - Re-run tests after fixes (max 5 loops)
129
+
130
+ **Step 5: Produce QA_CHECK_REPORT.md**
131
+
132
+ ```markdown
133
+ # QA Check Report
134
+
135
+ ## Summary
136
+
137
+ | Metric | Value |
138
+ |--------|-------|
139
+ | Files checked | {N} |
140
+ | Dimensions checked | 7 |
141
+ | Issues found | {N} |
142
+ | Auto-fixed | {N} |
143
+ | Flagged for review | {N} |
144
+ | Tests passed | {N}/{total} |
145
+ | Overall | PASS / PASS WITH WARNINGS / FAIL |
146
+
147
+ ## Per-File Results
148
+
149
+ ### {file_path}
150
+
151
+ | Dimension | Status | Details |
152
+ |-----------|--------|---------|
153
+ | Naming | PASS/FAIL | {specific details} |
154
+ | Structure | PASS/FAIL | {specific details} |
155
+ | Locators | PASS/FAIL | {specific details} |
156
+ | Assertions | PASS/FAIL | {specific details} |
157
+ | POM compliance | PASS/FAIL | {specific details} |
158
+ | Code quality | PASS/FAIL | {specific details} |
159
+ | Company conventions | PASS/FAIL | {specific details} |
160
+
161
+ **Test execution:** PASS / FAIL ({error if failed})
162
+ **Fixes applied:** {list of auto-fixes}
163
+ **Flagged for review:** {list of items needing human review}
164
+
165
+ [... repeat per file ...]
166
+
167
+ ## Flagged Items (Needs Human Review)
168
+
169
+ | File | Dimension | Issue | Suggested Fix |
170
+ |------|-----------|-------|---------------|
171
+ | ... | ... | ... | ... |
172
+ ```
173
+
174
+ Write to `.qa-output/QA_CHECK_REPORT.md`.
175
+
176
+ Present results to user with clear PASS/FAIL per file and overall status.
177
+
178
+ **Step 6 (optional): Ticket Verification (`--ticket <source>`)**
179
+
180
+ If `--ticket` flag is provided, perform UAT verification — walk through the test flow step-by-step in the browser, take screenshots at each step, and compare against the ticket's acceptance criteria.
181
+
182
+ **Usage:**
183
+ ```
184
+ /qa-fix --check --ticket #123 tests/e2e/login.e2e.spec.ts --app-url http://localhost:3000
185
+ /qa-fix --check --ticket https://company.atlassian.net/browse/PROJ-456 tests/e2e/checkout.e2e.spec.ts
186
+ /qa-fix --check --ticket "User logs in, sees dashboard with welcome message, clicks profile" tests/e2e/login.e2e.spec.ts
187
+ ```
188
+
189
+ **Requires:** `--app-url` or auto-detected running app. Cannot do ticket verification without a live app.
190
+
191
+ **Step 6a: Fetch and parse the ticket**
192
+
193
+ Same ticket parsing as `/qa-create-test` from-ticket mode:
194
+ - GitHub Issue: `gh issue view` → extract title, body, ACs
195
+ - Jira/Linear URL: `WebFetch` → extract content
196
+ - Plain text: use directly as acceptance criteria
197
+ - File path: read file content
198
+
199
+ Extract:
200
+ - Acceptance criteria (AC-1, AC-2, ...)
201
+ - Expected user flow (step-by-step)
202
+ - Expected outcomes per step
203
+
204
+ **Step 6b: Walk through the flow with Playwright MCP**
205
+
206
+ For each E2E test file being checked, replay the user journey manually in the browser step-by-step:
207
+
208
+ ```
209
+ For each step in the ticket's user flow:
210
+
211
+ 1. Execute the action described in the step:
212
+ - Navigate: mcp__playwright__browser_navigate({ url: "{page}" })
213
+ - Fill form: mcp__playwright__browser_fill_form({ ... })
214
+ - Click: mcp__playwright__browser_click({ element: "..." })
215
+ - Wait: mcp__playwright__browser_wait_for({ text: "..." })
216
+
217
+ 2. Take screenshot AFTER the action:
218
+ mcp__playwright__browser_take_screenshot()
219
+ → Save to .qa-output/uat-screenshots/{test-name}-step-{N}.png
220
+
221
+ 3. Take accessibility snapshot to read page state:
222
+ mcp__playwright__browser_snapshot()
223
+
224
+ 4. Record what the page shows:
225
+ - URL after action
226
+ - Visible text/headings
227
+ - Form state
228
+ - Error messages (if any)
229
+ - Elements visible/hidden
230
+ ```
231
+
232
+ **Step 6c: Compare actual vs ticket**
233
+
234
+ For each acceptance criterion from the ticket:
235
+
236
+ | AC | Expected (from ticket) | Actual (from browser) | Screenshot | Verdict |
237
+ |----|----------------------|---------------------|------------|---------|
238
+ | AC-1 | User sees login form | Login form visible with email/password fields | step-1.png | MATCH |
239
+ | AC-2 | After login, redirect to dashboard | Redirected to /dashboard, "Welcome" visible | step-3.png | MATCH |
240
+ | AC-3 | Error message for wrong password | "Invalid credentials" alert shown | step-5.png | MATCH |
241
+ | AC-4 | Remember me keeps session | Session persists after browser close | step-7.png | MISMATCH — session expired |
242
+
243
+ Verdicts:
244
+ - **MATCH** — actual behavior matches what the ticket describes
245
+ - **MISMATCH** — actual behavior differs from ticket (could be app bug OR test not covering this AC)
246
+ - **NOT TESTED** — ticket has an AC but no test step covers it
247
+ - **EXTRA** — test covers something not in the ticket (informational, not a failure)
248
+
249
+ **Step 6d: Produce UAT_VERIFICATION.md**
250
+
251
+ ```markdown
252
+ # UAT Verification Report
253
+
254
+ ## Ticket Info
255
+
256
+ | Field | Value |
257
+ |-------|-------|
258
+ | Source | {ticket URL or text} |
259
+ | Title | {ticket title} |
260
+ | ACs extracted | {count} |
261
+ | Test files verified | {count} |
262
+
263
+ ## Step-by-Step Walkthrough
264
+
265
+ ### Step 1: {action description}
266
+ - **Action:** Navigate to /login
267
+ - **Screenshot:** [step-1.png](.qa-output/uat-screenshots/{test}-step-1.png)
268
+ - **Page state:** Login form visible, email and password fields empty, "Log in" button enabled
269
+ - **Matches AC:** AC-1 ✓
270
+
271
+ ### Step 2: {action description}
272
+ - **Action:** Fill email "test@example.com", password "SecureP@ss123!"
273
+ - **Screenshot:** [step-2.png]
274
+ - **Page state:** Fields filled, button still enabled
275
+ - **Matches AC:** (intermediate step, no AC)
276
+
277
+ [... repeat per step ...]
278
+
279
+ ## AC Coverage Matrix
280
+
281
+ | AC | Description | Tested | Verdict | Evidence |
282
+ |----|-------------|--------|---------|----------|
283
+ | AC-1 | Login form visible | Yes | MATCH | step-1.png |
284
+ | AC-2 | Redirect to dashboard | Yes | MATCH | step-3.png |
285
+ | AC-3 | Error on wrong password | Yes | MATCH | step-5.png |
286
+ | AC-4 | Remember me session | No | NOT TESTED | — |
287
+
288
+ ## Summary
289
+
290
+ | Metric | Value |
291
+ |--------|-------|
292
+ | ACs from ticket | {N} |
293
+ | ACs matched | {N} |
294
+ | ACs mismatched | {N} |
295
+ | ACs not tested | {N} |
296
+ | Screenshots captured | {N} |
297
+ | Overall | PASS / PARTIAL / FAIL |
298
+ ```
299
+
300
+ Write to `.qa-output/UAT_VERIFICATION.md`.
301
+
302
+ If any AC is MISMATCH or NOT TESTED, present to user with recommendation:
303
+ - MISMATCH → "AC-4 says X but the app does Y — either the app has a bug or the test needs updating"
304
+ - NOT TESTED → "AC-4 is not covered by any test step — consider adding a test case"
305
+
306
+ ---
307
+
308
+ ### VALIDATE MODE (`--validate-only`)
309
+
310
+ 1. Read `CLAUDE.md` — quality gates, locator tiers, assertion rules.
311
+ 2. Execute static validation workflow:
312
+
313
+ Follow the workflow defined in `@workflows/qa-validate.md` end-to-end.
314
+ Preserve all workflow gates (fix loops, layer checks).
315
+
316
+ The validator runs 4 layers per file:
317
+ 1. **Syntax** — code compiles without errors
318
+ 2. **Structure** — naming, folders, POM compliance
319
+ 3. **Dependencies** — all imports resolve
320
+ 4. **Logic** — concrete assertions, Tier 1-2 locators, no assertions in POMs
321
+
322
+ **Optional Layer 5 (if Playwright MCP connected + app URL available):**
323
+ - Navigate to each page referenced in E2E tests via `mcp__playwright__browser_navigate`
324
+ - Take accessibility snapshot via `mcp__playwright__browser_snapshot`
325
+ - Cross-reference test locators against real DOM elements
326
+ - Flag locators that don't match, auto-fix mismatches
327
+
328
+ Max 3 fix loop iterations. Produces VALIDATION_REPORT.md.
329
+
330
+ If `--run` flag is also present and E2E test files exist, invoke E2E runner after static validation:
331
+
332
+ Task(
333
+ prompt="
334
+ <objective>Run E2E tests against live application, capture real locators, fix mismatches, loop until pass</objective>
335
+ <execution_context>@agents/qaa-e2e-runner.md</execution_context>
336
+ <files_to_read>
337
+ - CLAUDE.md
338
+ - {E2E test files from validated directory}
339
+ - {POM files from validated directory}
340
+ </files_to_read>
341
+ <parameters>
342
+ app_url: {from --app-url flag or auto-detect}
343
+ output_dir: .qa-output
344
+ </parameters>
345
+ "
346
+ )
347
+
348
+ ---
349
+
350
+ ### CLASSIFY MODE (`--classify`)
351
+
352
+ Same as fix mode below but skip Step 4 (auto-fix). Only classify and report.
353
+
354
+ ---
355
+
356
+ ### FIX MODE (default)
357
+
358
+ 1. Read `CLAUDE.md` — classification rules, locator tiers, assertion quality.
359
+ 2. Invoke bug-detective agent:
360
+
361
+ Task(
362
+ prompt="
363
+ <objective>Run tests, classify failures, and auto-fix TEST CODE ERRORS. Use Playwright MCP to reproduce E2E failures in the browser when available — navigate to failing pages, snapshot DOM, reproduce actions, and screenshot failure state for evidence.</objective>
364
+ <execution_context>@agents/qaa-bug-detective.md</execution_context>
365
+ <files_to_read>
366
+ - CLAUDE.md
367
+ </files_to_read>
368
+ <parameters>
369
+ user_input: $ARGUMENTS
370
+ app_url: {auto-detect from test config baseURL, or ask user}
371
+ </parameters>
372
+ "
373
+ )
374
+
375
+ **Classification categories:**
376
+ - **APPLICATION BUG** — error in production code → Report only, NEVER auto-fix
377
+ - **TEST CODE ERROR** — error in test code → Auto-fix if HIGH confidence
378
+ - **ENVIRONMENT ISSUE** — missing env, connection refused → Report with resolution steps
379
+ - **INCONCLUSIVE** — ambiguous → Report what's known, ask for more info
380
+
381
+ **Auto-fix rules:**
382
+ - Only TEST CODE ERROR at HIGH confidence
383
+ - Allowed fixes: import paths, selectors, assertion values, config, missing await, fixture paths
384
+ - Every fix verified by re-running the specific test
385
+ - Never modify application code (src/, app/, lib/)
386
+
387
+ **Browser reproduction (when Playwright MCP connected):**
388
+ - Navigate to failing page → snapshot DOM → reproduce action → screenshot
389
+ - Element not in DOM → TEST CODE ERROR (HIGH confidence)
390
+ - Element exists, wrong behavior → APPLICATION BUG
391
+ - Page doesn't load → ENVIRONMENT ISSUE
392
+
393
+ 3. Present results. APPLICATION BUGs are reported for developer action, not auto-fixed.
394
+
395
+ $ARGUMENTS
@@ -0,0 +1,137 @@
1
+ # QA Codebase Map & Analysis
2
+
3
+ Deep-scan a codebase for QA-relevant information, produce a complete analysis, and generate test inventory. Runs codebase mapping (4 parallel agents) followed by full repository analysis. One command to fully understand a codebase before writing tests.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /qa-map [options]
9
+ ```
10
+
11
+ ### Options
12
+
13
+ - No arguments — runs full map + analysis on current directory
14
+ - `--focus <area>` — run a single map area only, skip analysis (testability, risk, patterns, existing-tests)
15
+ - `--dev-repo <path>` — explicit path to developer repository
16
+ - `--qa-repo <path>` — path to existing QA repository (produces gap analysis instead of blueprint)
17
+ - `--skip-map` — skip codebase mapping, only run analysis (lighter, faster)
18
+
19
+ ## What It Produces
20
+
21
+ ### Stage 1: Codebase Map (4 parallel agents)
22
+
23
+ | Focus Area | Documents Produced |
24
+ |------------|-------------------|
25
+ | **testability** | TESTABILITY.md + TEST_SURFACE.md — what's testable, entry points, mocking needs |
26
+ | **risk** | RISK_MAP.md + CRITICAL_PATHS.md — business-critical paths, error handling gaps |
27
+ | **patterns** | CODE_PATTERNS.md + API_CONTRACTS.md — naming conventions, API shapes, auth patterns |
28
+ | **existing-tests** | TEST_ASSESSMENT.md + COVERAGE_GAPS.md — existing test quality, what's missing |
29
+
30
+ All documents written to `.qa-output/codebase/`.
31
+
32
+ ### Stage 2: Repository Analysis
33
+
34
+ | Document | Description |
35
+ |----------|-------------|
36
+ | SCAN_MANIFEST.md | File tree, framework detection, testable surfaces |
37
+ | QA_ANALYSIS.md | Architecture overview, risk assessment, top 10 unit targets, testing pyramid |
38
+ | TEST_INVENTORY.md | Every test case with ID, target, inputs, expected outcome, priority |
39
+ | QA_REPO_BLUEPRINT.md | If no QA repo — full repo structure, configs, CI/CD strategy |
40
+ | GAP_ANALYSIS.md | If QA repo provided — coverage map, missing tests, broken tests, quality assessment |
41
+
42
+ ## Instructions
43
+
44
+ 1. Read `CLAUDE.md` — QA standards.
45
+
46
+ 2. Create output directories:
47
+ ```bash
48
+ mkdir -p .qa-output/codebase
49
+ ```
50
+
51
+ 3. **Stage 1: Codebase Mapping**
52
+
53
+ If `--skip-map` was NOT passed and `--focus` was NOT specified, spawn 4 agents in parallel (one per focus area):
54
+
55
+ ```
56
+ Agent(
57
+ prompt="Analyze this codebase for QA purposes. Focus area: testability. Write TESTABILITY.md and TEST_SURFACE.md to .qa-output/codebase/. Follow your agent definition process.",
58
+ subagent_type="general-purpose",
59
+ execution_context="@agents/qaa-codebase-mapper.md"
60
+ )
61
+
62
+ Agent(
63
+ prompt="Analyze this codebase for QA purposes. Focus area: risk. Write RISK_MAP.md and CRITICAL_PATHS.md to .qa-output/codebase/. Follow your agent definition process.",
64
+ subagent_type="general-purpose",
65
+ execution_context="@agents/qaa-codebase-mapper.md"
66
+ )
67
+
68
+ Agent(
69
+ prompt="Analyze this codebase for QA purposes. Focus area: patterns. Write CODE_PATTERNS.md and API_CONTRACTS.md to .qa-output/codebase/. Follow your agent definition process.",
70
+ subagent_type="general-purpose",
71
+ execution_context="@agents/qaa-codebase-mapper.md"
72
+ )
73
+
74
+ Agent(
75
+ prompt="Analyze this codebase for QA purposes. Focus area: existing-tests. Write TEST_ASSESSMENT.md and COVERAGE_GAPS.md to .qa-output/codebase/. Follow your agent definition process.",
76
+ subagent_type="general-purpose",
77
+ execution_context="@agents/qaa-codebase-mapper.md"
78
+ )
79
+ ```
80
+
81
+ If `--focus <area>` was provided, spawn only that one agent and STOP after it completes (skip Stage 2).
82
+
83
+ If `--skip-map` was passed, skip Stage 1 entirely and go to Stage 2.
84
+
85
+ 4. When all map agents complete, print summary of documents produced.
86
+
87
+ 5. **Stage 2: Repository Analysis**
88
+
89
+ Initialize pipeline context:
90
+ ```bash
91
+ node bin/qaa-tools.cjs init qa-start 2>/dev/null || true
92
+ ```
93
+
94
+ Invoke scanner agent:
95
+
96
+ Task(
97
+ prompt="
98
+ <objective>Scan repository and produce SCAN_MANIFEST.md</objective>
99
+ <execution_context>@agents/qaa-scanner.md</execution_context>
100
+ <files_to_read>
101
+ - CLAUDE.md
102
+ </files_to_read>
103
+ <parameters>
104
+ user_input: $ARGUMENTS
105
+ </parameters>
106
+ "
107
+ )
108
+
109
+ Invoke analyzer agent:
110
+
111
+ Task(
112
+ prompt="
113
+ <objective>Analyze repository and produce QA_ANALYSIS.md, TEST_INVENTORY.md, and blueprint or gap analysis. Use codebase map documents from .qa-output/codebase/ if they exist for deeper, more accurate analysis.</objective>
114
+ <execution_context>@agents/qaa-analyzer.md</execution_context>
115
+ <files_to_read>
116
+ - CLAUDE.md
117
+ - .qa-output/SCAN_MANIFEST.md
118
+ - .qa-output/codebase/TESTABILITY.md (if exists)
119
+ - .qa-output/codebase/RISK_MAP.md (if exists)
120
+ - .qa-output/codebase/CODE_PATTERNS.md (if exists)
121
+ - .qa-output/codebase/TEST_ASSESSMENT.md (if exists)
122
+ - .qa-output/codebase/TEST_SURFACE.md (if exists)
123
+ - .qa-output/codebase/CRITICAL_PATHS.md (if exists)
124
+ - .qa-output/codebase/API_CONTRACTS.md (if exists)
125
+ - .qa-output/codebase/COVERAGE_GAPS.md (if exists)
126
+ </files_to_read>
127
+ <parameters>
128
+ user_input: $ARGUMENTS
129
+ </parameters>
130
+ "
131
+ )
132
+
133
+ 6. Print final summary: all documents produced across both stages.
134
+ No git operations. No test generation.
135
+ Suggest `/qa-create-test` to generate tests from the analysis.
136
+
137
+ $ARGUMENTS
package/package.json CHANGED
@@ -1,41 +1,40 @@
1
- {
2
- "name": "qaa-agent",
3
- "version": "1.6.3",
4
- "description": "QA Automation Agent for Claude Code — multi-agent pipeline that analyzes repos, generates tests, validates, and creates PRs",
5
- "bin": {
6
- "qaa-agent": "./bin/install.cjs"
7
- },
8
- "keywords": [
9
- "qa",
10
- "automation",
11
- "testing",
12
- "claude-code",
13
- "playwright",
14
- "jest",
15
- "pytest",
16
- "ai-agent"
17
- ],
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/Backhaus7997/qaa-agent.git"
21
- },
22
- "author": "Backhaus7997",
23
- "license": "MIT",
24
- "dependencies": {
25
- "@playwright/mcp": "latest"
26
- },
27
- "files": [
28
- "bin/",
29
- "agents/",
30
- "workflows/",
31
- "templates/",
32
- "docs/",
33
- ".claude/commands/",
34
- ".claude/skills/",
35
- ".claude/settings.json",
36
- ".mcp.json",
37
- "CLAUDE.md",
38
- "CHANGELOG.md",
39
- "README.md"
40
- ]
41
- }
1
+ {
2
+ "name": "qaa-agent",
3
+ "version": "1.7.1",
4
+ "description": "QA Automation Agent for Claude Code — multi-agent pipeline that analyzes repos, generates tests, validates, and creates PRs",
5
+ "bin": {
6
+ "qaa-agent": "./bin/install.cjs"
7
+ },
8
+ "keywords": [
9
+ "qa",
10
+ "automation",
11
+ "testing",
12
+ "claude-code",
13
+ "playwright",
14
+ "jest",
15
+ "pytest",
16
+ "ai-agent"
17
+ ],
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/capmation/qaa-testing.git"
21
+ },
22
+ "author": "Backhaus7997",
23
+ "license": "MIT",
24
+ "dependencies": {
25
+ "@playwright/mcp": "latest"
26
+ },
27
+ "files": [
28
+ "bin/",
29
+ "agents/",
30
+ "workflows/",
31
+ "templates/",
32
+ "docs/",
33
+ "commands/",
34
+ "skills/",
35
+ "settings.json",
36
+ ".mcp.json",
37
+ "CLAUDE.md",
38
+ "CHANGELOG.md"
39
+ ]
40
+ }
@@ -1,20 +1,19 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(*)",
5
- "Read",
6
- "Write",
7
- "Edit",
8
- "Glob",
9
- "Grep",
10
- "Agent",
11
- "WebFetch",
12
- "WebSearch",
13
- "NotebookEdit",
14
- "mcp__playwright__*"
15
- ]
16
- },
17
- "env": {
18
- "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
19
- }
20
- }
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(*)",
5
+ "Read",
6
+ "Write",
7
+ "Edit",
8
+ "Glob",
9
+ "Grep",
10
+ "Agent",
11
+ "WebFetch",
12
+ "WebSearch",
13
+ "NotebookEdit"
14
+ ]
15
+ },
16
+ "env": {
17
+ "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
18
+ }
19
+ }