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,409 @@
1
+ ---
2
+ template_name: gap-analysis
3
+ version: "1.0"
4
+ artifact_type: gap-analysis
5
+ produces: GAP_ANALYSIS.md
6
+ producer_agent: qa-analyzer
7
+ consumer_agents:
8
+ - qa-planner
9
+ - qa-executor
10
+ required_sections:
11
+ - coverage-map
12
+ - missing-tests
13
+ - broken-tests
14
+ - quality-assessment
15
+ - existing-test-inventory
16
+ - recommendations
17
+ example_domain: shopflow
18
+ ---
19
+
20
+ # GAP_ANALYSIS.md Template
21
+
22
+ **Purpose:** Identifies what tests exist, what is missing, and what is broken in an existing QA repository. Provides a complete picture of test coverage gaps, quality issues, and prioritized improvement actions.
23
+
24
+ **Producer:** `qa-analyzer` (Option 2/3 workflow -- when a QA repo already exists alongside the dev repo)
25
+ **Consumers:** `qa-planner` (uses gaps to prioritize test generation), `qa-executor` (uses missing test specs to write new tests)
26
+
27
+ ---
28
+
29
+ ## Required Sections
30
+
31
+ ### Section 1: Coverage Map
32
+
33
+ **Description:** Matrix showing test coverage across modules/features and test pyramid tiers. Reveals which areas have adequate coverage and which have critical gaps.
34
+
35
+ **Matrix Format:**
36
+
37
+ | Column | Description |
38
+ |--------|-------------|
39
+ | Module/Feature | Business domain area (e.g., Auth, Products, Orders, Payments) |
40
+ | Unit | Count of existing unit tests for this module, or `NONE` |
41
+ | Integration | Count of existing integration tests, or `NONE` |
42
+ | API | Count of existing API tests, or `NONE` |
43
+ | E2E | Count of existing E2E tests, or `NONE` |
44
+ | Coverage | Percentage of recommended tests that exist for this module |
45
+
46
+ **Symbol Key:**
47
+ - Number (e.g., `3`) = tests exist and are counted
48
+ - `NONE` = zero tests exist for this module at this tier -- this is a gap
49
+ - Summary row shows totals per tier
50
+ - Summary column shows per-module coverage percentage
51
+
52
+ ---
53
+
54
+ ### Section 2: Missing Tests
55
+
56
+ **Description:** Prioritized list of test cases that DO NOT exist yet but SHOULD exist based on the codebase analysis. Each entry is a complete test specification ready for implementation.
57
+
58
+ **Per-Entry Fields:**
59
+
60
+ | Field | Type | Required | Description |
61
+ |-------|------|----------|-------------|
62
+ | test_id | string | YES | Following standard convention: `UT-MODULE-NNN`, `API-MODULE-NNN`, `INT-MODULE-NNN`, `E2E-FLOW-NNN` |
63
+ | target | string | YES | What should be tested: file path + function, or HTTP method + endpoint |
64
+ | tier | string | YES | Pyramid level: Unit, Integration, API, or E2E |
65
+ | why_missing | string | YES | What gap this fills (e.g., "No unit tests for payment calculation logic") |
66
+ | priority | string | YES | P0 (blocks release), P1 (should fix), P2 (nice to have) |
67
+ | estimated_effort | string | YES | S (< 1 hour), M (1-4 hours), L (4+ hours) |
68
+
69
+ **Grouping:** Entries are grouped by priority (P0 first, then P1, then P2).
70
+
71
+ ---
72
+
73
+ ### Section 3: Broken Tests
74
+
75
+ **Description:** Tests that EXIST in the repository but FAIL when executed. Each entry identifies the failure, diagnoses the root cause, and estimates fix effort.
76
+
77
+ **Per-Entry Fields:**
78
+
79
+ | Field | Type | Required | Description |
80
+ |-------|------|----------|-------------|
81
+ | test_file | string | YES | Path to the test file |
82
+ | test_name | string | YES | Name of the failing test case |
83
+ | failure_reason | string | YES | Specific error message or assertion failure |
84
+ | root_cause | string | YES | One of: stale selector, outdated assertion, missing fixture, environment dependency, code change, flaky timing |
85
+ | fix_effort | string | YES | S (quick fix), M (moderate rework), L (significant refactor) |
86
+ | fix_priority | string | YES | One of: immediate, next sprint, backlog |
87
+
88
+ ---
89
+
90
+ ### Section 4: Quality Assessment
91
+
92
+ **Description:** Four quality dimensions evaluated across all existing tests to assess the overall health of the test suite beyond just coverage counts.
93
+
94
+ **Dimension 1: Locator Tier Distribution**
95
+
96
+ | Field | Type | Required | Description |
97
+ |-------|------|----------|-------------|
98
+ | tier_1_count | integer | YES | `data-testid` and ARIA role selectors |
99
+ | tier_2_count | integer | YES | Labels, placeholders, text content |
100
+ | tier_3_count | integer | YES | Alt text, title attributes |
101
+ | tier_4_count | integer | YES | CSS selectors, XPath |
102
+ | tier_1_percent | percentage | YES | Tier 1 / total locators * 100 |
103
+ | tier_4_percent | percentage | YES | Tier 4 / total locators * 100 |
104
+
105
+ **Dimension 2: Assertion Quality**
106
+
107
+ | Field | Type | Required | Description |
108
+ |-------|------|----------|-------------|
109
+ | concrete_count | integer | YES | Assertions with specific expected values (toBe, toEqual, toHaveText with value) |
110
+ | vague_count | integer | YES | Assertions without specific values (toBeTruthy, toBeDefined, should('exist')) |
111
+ | concrete_percent | percentage | YES | Concrete / total assertions * 100 |
112
+ | examples_of_bad | list | YES | Up to 5 examples of vague assertions found in the codebase |
113
+
114
+ **Dimension 3: POM Compliance**
115
+
116
+ | Field | Type | Required | Description |
117
+ |-------|------|----------|-------------|
118
+ | total_page_objects | integer | YES | Count of page object files |
119
+ | assertions_in_poms | integer | YES | Count of page objects containing assertions (violation) |
120
+ | extends_base | integer | YES | Count of page objects that extend a shared BasePage |
121
+ | compliance_percent | percentage | YES | Fully compliant POMs / total POMs * 100 |
122
+
123
+ **Dimension 4: Naming Convention**
124
+
125
+ | Field | Type | Required | Description |
126
+ |-------|------|----------|-------------|
127
+ | files_following_convention | integer | YES | Test files named correctly (e.g., `*.e2e.spec.ts`, `*.api.spec.ts`) |
128
+ | files_not_following | integer | YES | Test files with non-standard names |
129
+ | test_ids_correct | integer | YES | Test IDs following `UT-MODULE-NNN` pattern |
130
+ | test_ids_incorrect | integer | YES | Test IDs with incorrect format or missing |
131
+ | naming_percent | percentage | YES | Compliant / total * 100 |
132
+
133
+ ---
134
+
135
+ ### Section 5: Existing Test Inventory
136
+
137
+ **Description:** Comprehensive inventory of what IS covered and working. Establishes the baseline before improvements are applied.
138
+
139
+ **Summary Table Columns:**
140
+
141
+ | Column | Description |
142
+ |--------|-------------|
143
+ | Test File | Path to the test file |
144
+ | Test Count | Number of test cases in the file |
145
+ | Tier | Unit, Integration, API, or E2E |
146
+ | Status | PASS (all tests pass), FAIL (some tests fail), ERROR (file does not execute) |
147
+ | Last Run | Date of the most recent test execution |
148
+
149
+ **Summary Statistics:**
150
+ - Total test files
151
+ - Total test cases
152
+ - Tests by status: PASS / FAIL / ERROR
153
+ - Tests by tier: Unit / Integration / API / E2E
154
+
155
+ ---
156
+
157
+ ### Section 6: Recommendations
158
+
159
+ **Description:** Prioritized action list for improving the test suite, ordered by ROI (impact vs effort). Actions are numbered and can be used directly as a work plan.
160
+
161
+ **Standard Recommendation Order:**
162
+ 1. Fix broken tests first (highest ROI -- these were already written)
163
+ 2. Add missing P0 tests (critical gaps that block release confidence)
164
+ 3. Improve locator quality (migrate Tier 4 selectors to Tier 1)
165
+ 4. Fix POM violations (remove assertions from page objects, add base class)
166
+ 5. Add missing P1 tests (important gaps for regression coverage)
167
+ 6. Address naming convention issues (consistency improvements)
168
+
169
+ **Per-Recommendation Fields:**
170
+
171
+ | Field | Type | Required | Description |
172
+ |-------|------|----------|-------------|
173
+ | action | string | YES | What to do |
174
+ | impact | string | YES | What improves (e.g., "Fixes 3 broken tests, restoring 20% coverage") |
175
+ | effort | string | YES | S/M/L |
176
+ | priority | string | YES | 1 (do first) through 6 (do last) |
177
+
178
+ ---
179
+
180
+ ## Worked Example (ShopFlow E-Commerce API)
181
+
182
+ ### Coverage Map
183
+
184
+ | Module/Feature | Unit | Integration | API | E2E | Coverage |
185
+ |---------------|------|-------------|-----|-----|----------|
186
+ | Auth (login, register, refresh, logout) | 3 | NONE | 2 | 1 | 60% |
187
+ | Products (CRUD, search, categories) | 2 | NONE | 1 | NONE | 25% |
188
+ | Orders (create, status transitions, history) | NONE | NONE | NONE | NONE | 0% |
189
+ | Payments (charge, refund, webhook) | NONE | NONE | NONE | NONE | 0% |
190
+ | Inventory (stock, reservations, alerts) | NONE | NONE | NONE | NONE | 0% |
191
+ | **Totals** | **5** | **0** | **3** | **1** | **--** |
192
+
193
+ **Summary:** 9 tests exist across 6 test files, covering 2 of 5 modules. Orders, Payments, and Inventory have zero test coverage at any tier. No integration tests exist for any module. The existing test suite covers approximately 17% of the recommended test surface.
194
+
195
+ *Note: An additional 6 tests exist in utility files (validators, helpers) bringing the total to 15 tests across the repo.*
196
+
197
+ ### Missing Tests
198
+
199
+ #### P0 -- Must Have (Blocks Release)
200
+
201
+ **UT-ORDER-001: Order state transition validation**
202
+ - **Target:** `src/services/orderService.ts:transitionOrderStatus`
203
+ - **Tier:** Unit
204
+ - **Why missing:** No unit tests exist for the order module. State machine logic (pending -> confirmed -> shipped -> delivered) is critical business logic with no validation.
205
+ - **Priority:** P0
206
+ - **Estimated effort:** M
207
+
208
+ **UT-PAY-001: Payment amount calculation with tax**
209
+ - **Target:** `src/services/paymentService.ts:calculateChargeAmount`
210
+ - **Tier:** Unit
211
+ - **Why missing:** Payment calculation affects revenue. No tests verify correct tax application or rounding behavior.
212
+ - **Priority:** P0
213
+ - **Estimated effort:** S
214
+
215
+ **API-PAY-001: Stripe charge endpoint**
216
+ - **Target:** `POST /api/v1/payments/charge`
217
+ - **Tier:** API
218
+ - **Why missing:** Payment endpoints have zero test coverage. Charge endpoint handles real money and must validate amounts, error responses, and Stripe error handling.
219
+ - **Priority:** P0
220
+ - **Estimated effort:** M
221
+
222
+ **API-PAY-002: Stripe webhook signature verification**
223
+ - **Target:** `POST /api/v1/payments/webhook`
224
+ - **Tier:** API
225
+ - **Why missing:** Webhooks are the only way to confirm payment status. Invalid signature handling and event processing must be tested.
226
+ - **Priority:** P0
227
+ - **Estimated effort:** M
228
+
229
+ **UT-ORDER-002: Order creation with inventory check**
230
+ - **Target:** `src/services/orderService.ts:createOrder`
231
+ - **Tier:** Unit
232
+ - **Why missing:** Order creation must check inventory availability. No tests verify the reservation-before-create flow.
233
+ - **Priority:** P0
234
+ - **Estimated effort:** M
235
+
236
+ #### P1 -- Should Have (Important for Regression)
237
+
238
+ **API-PROD-001: Product search with filters**
239
+ - **Target:** `GET /api/v1/products?category=electronics&sort=price`
240
+ - **Tier:** API
241
+ - **Why missing:** Product search is user-facing. Only basic GET exists in tests; no filter/sort/pagination tests.
242
+ - **Priority:** P1
243
+ - **Estimated effort:** S
244
+
245
+ **INT-INV-001: Inventory reservation during order placement**
246
+ - **Target:** `orderService.createOrder` -> `inventoryService.reserveStock`
247
+ - **Tier:** Integration
248
+ - **Why missing:** No integration tests exist. The order-inventory interaction is a critical cross-service boundary.
249
+ - **Priority:** P1
250
+ - **Estimated effort:** L
251
+
252
+ **API-ORDER-001: Order status transition endpoint**
253
+ - **Target:** `PATCH /api/v1/orders/:id/status`
254
+ - **Tier:** API
255
+ - **Why missing:** Order status changes affect fulfillment workflow. No API tests verify valid/invalid transitions or authorization.
256
+ - **Priority:** P1
257
+ - **Estimated effort:** M
258
+
259
+ #### P2 -- Nice to Have (Completeness)
260
+
261
+ **E2E-CHECKOUT-001: Complete checkout flow**
262
+ - **Target:** Browse -> Add to cart -> Checkout -> Payment -> Confirmation
263
+ - **Tier:** E2E
264
+ - **Why missing:** No E2E test covers the full purchase flow. Only auth E2E exists.
265
+ - **Priority:** P2
266
+ - **Estimated effort:** L
267
+
268
+ **UT-INV-001: Low stock alert threshold calculation**
269
+ - **Target:** `src/services/inventoryService.ts:checkLowStockAlert`
270
+ - **Tier:** Unit
271
+ - **Why missing:** Low stock alerts are a secondary feature. Business logic exists but has no test coverage.
272
+ - **Priority:** P2
273
+ - **Estimated effort:** S
274
+
275
+ ### Broken Tests
276
+
277
+ | # | Test File | Test Name | Failure Reason | Root Cause | Fix Effort | Fix Priority |
278
+ |---|-----------|-----------|----------------|------------|------------|--------------|
279
+ | 1 | `tests/e2e/auth/login.e2e.spec.ts` | "should login with valid credentials" | `Error: locator('.login-btn') not found` | **Stale selector**: Login button was restyled from `className="login-btn"` to `className="btn btn-primary"` in a recent UI update. No `data-testid` on the element. | S | Immediate |
280
+ | 2 | `tests/api/products/products.api.spec.ts` | "should return product list" | `Expected: 10, Received: 15` | **Outdated assertion**: Test was written when seed data had 10 products. New products were added to the seed, but the assertion was not updated to use dynamic expectations. | S | Immediate |
281
+ | 3 | `tests/unit/auth/tokenRefresh.unit.spec.ts` | "should refresh expired token" | `Error: JWT_SECRET is not defined` | **Environment dependency**: Test requires `JWT_SECRET` env var but no `.env.test` file or fallback exists. Works locally for original author but fails in CI and for other developers. | S | Immediate |
282
+
283
+ ### Quality Assessment
284
+
285
+ #### Locator Tier Distribution
286
+
287
+ | Tier | Count | Percentage | Examples |
288
+ |------|-------|------------|----------|
289
+ | Tier 1 (data-testid, ARIA roles) | 6 | 40% | `[data-testid="login-form"]`, `getByRole('button')` |
290
+ | Tier 2 (labels, text) | 0 | 0% | -- |
291
+ | Tier 3 (alt text, title) | 0 | 0% | -- |
292
+ | Tier 4 (CSS selectors, XPath) | 9 | 60% | `.login-btn`, `.product-card`, `#order-table` |
293
+
294
+ **Assessment:** 60% of locators are Tier 4 CSS selectors, making the E2E tests fragile to UI restyling. The broken login test (`locator('.login-btn')`) is a direct consequence of this. Migration to Tier 1 (`data-testid`) selectors is recommended.
295
+
296
+ #### Assertion Quality
297
+
298
+ | Type | Count | Percentage |
299
+ |------|-------|------------|
300
+ | Concrete assertions | 21 | 70% |
301
+ | Vague assertions | 9 | 30% |
302
+
303
+ **Examples of vague assertions found:**
304
+ 1. `expect(response.status).toBeTruthy()` -- in `products.api.spec.ts` line 28 (should be `toBe(200)`)
305
+ 2. `expect(data).toBeDefined()` -- in `auth.unit.spec.ts` line 45 (should check specific properties)
306
+ 3. `cy.get('.result').should('exist')` -- in `login.e2e.spec.ts` line 52 (should check text content)
307
+ 4. `expect(token).not.toBeNull()` -- in `tokenRefresh.unit.spec.ts` line 30 (should verify token format)
308
+ 5. `expect(user).toBeTruthy()` -- in `auth.unit.spec.ts` line 62 (should verify user properties)
309
+
310
+ #### POM Compliance
311
+
312
+ | Check | Result |
313
+ |-------|--------|
314
+ | Total page objects | 4 |
315
+ | One class per page | 4/4 (PASS) |
316
+ | No assertions in POMs | 2/4 (FAIL) -- assertions found in LoginPage.ts and ProductPage.ts |
317
+ | Locators as properties | 3/4 (PASS) -- OrderPage.ts uses inline selectors |
318
+ | Actions return void/page | 4/4 (PASS) |
319
+ | Extends shared base | 2/4 (FAIL) -- LoginPage.ts and OrderPage.ts do not extend BasePage |
320
+ | **Compliance** | **50%** (2 of 4 fully compliant) |
321
+
322
+ **Violations:**
323
+ - `LoginPage.ts` line 34: `expect(this.errorMessage).toBeVisible()` -- assertion in page object
324
+ - `ProductPage.ts` line 48: `expect(this.productList.count()).toBeGreaterThan(0)` -- assertion in page object
325
+
326
+ #### Naming Convention
327
+
328
+ | Check | Compliant | Non-Compliant |
329
+ |-------|-----------|---------------|
330
+ | File names | 4 | 2 |
331
+ | Test IDs | 8 | 4 |
332
+ | **Overall** | **65%** | **35%** |
333
+
334
+ **Issues:**
335
+ - `tests/e2e/login-test.spec.ts` should be `login.e2e.spec.ts` (missing `.e2e.` tier indicator)
336
+ - `tests/api/product-tests.spec.ts` should be `products.api.spec.ts` (wrong naming pattern)
337
+ - Test IDs `T-001`, `T-002`, `T-003`, `T-004` should follow `UT-AUTH-001`, `API-PROD-001` pattern
338
+
339
+ ### Existing Test Inventory
340
+
341
+ **Summary:** 15 tests across 6 files. 12 passing, 3 failing.
342
+
343
+ | Test File | Test Count | Tier | Status | Last Run |
344
+ |-----------|------------|------|--------|----------|
345
+ | `tests/unit/auth/auth.unit.spec.ts` | 3 | Unit | PASS | 2026-03-15 |
346
+ | `tests/unit/auth/tokenRefresh.unit.spec.ts` | 1 | Unit | FAIL | 2026-03-15 |
347
+ | `tests/unit/products/products.unit.spec.ts` | 2 | Unit | PASS | 2026-03-15 |
348
+ | `tests/unit/utils/validators.unit.spec.ts` | 3 | Unit | PASS | 2026-03-15 |
349
+ | `tests/api/products/products.api.spec.ts` | 2 | API | FAIL (1 of 2) | 2026-03-15 |
350
+ | `tests/api/auth/auth.api.spec.ts` | 3 | API | PASS | 2026-03-15 |
351
+ | `tests/e2e/auth/login.e2e.spec.ts` | 1 | E2E | FAIL | 2026-03-15 |
352
+
353
+ **Tier Breakdown:**
354
+ - Unit: 9 tests (60%)
355
+ - Integration: 0 tests (0%)
356
+ - API: 5 tests (33%)
357
+ - E2E: 1 test (7%)
358
+
359
+ ### Recommendations
360
+
361
+ | # | Action | Impact | Effort | Priority |
362
+ |---|--------|--------|--------|----------|
363
+ | 1 | **Fix 3 broken tests** (stale selector, outdated assertion, missing env var) | Restores 3 tests to passing. Increases pass rate from 80% to 100%. All are quick fixes. | S | Do first |
364
+ | 2 | **Add missing P0 tests** (5 tests: order state machine, payment calc, Stripe charge, webhook, order creation) | Covers the 2 most critical uncovered modules (Orders, Payments). Adds 5 tests to the highest-risk areas. | M | Do second |
365
+ | 3 | **Migrate Tier 4 locators to Tier 1** (9 CSS selectors to data-testid) | Eliminates fragile selectors. Prevents future breakage from UI restyling. Requires coordination with testid-injector. | M | Do third |
366
+ | 4 | **Fix POM violations** (remove assertions from LoginPage.ts and ProductPage.ts, add BasePage extension) | Brings POM compliance from 50% to 100%. Improves maintainability and follows standards. | S | Do fourth |
367
+ | 5 | **Add missing P1 tests** (3 tests: product search, inventory integration, order status API) | Fills secondary coverage gaps. Adds integration test coverage (currently 0%). | M | Do fifth |
368
+ | 6 | **Address naming convention issues** (rename 2 files, fix 4 test IDs) | Brings naming compliance from 65% to 100%. Improves discoverability and consistency. | S | Do sixth |
369
+
370
+ ---
371
+
372
+ ## Guidelines
373
+
374
+ **DO:**
375
+ - Be specific about WHICH modules have no coverage -- list them by name, not just "coverage is low"
376
+ - Show the coverage map as a clear matrix so gaps are visually obvious (look for `NONE` entries)
377
+ - Include specific file paths and line numbers for every broken test finding
378
+ - Provide concrete test IDs and targets for missing tests so the executor can implement them directly
379
+ - Count tests accurately -- run the test suite and verify counts match
380
+ - Distinguish between "no tests exist" (missing) and "tests exist but fail" (broken)
381
+
382
+ **DON'T:**
383
+ - Recommend rewriting working tests just for style issues -- fix locators and naming in place
384
+ - Mark all missing tests as P0 -- prioritize genuinely based on business risk (payment > search > alerts)
385
+ - Combine missing and broken tests into one section -- they require different actions (write new vs fix existing)
386
+ - Ignore the quality dimensions -- a test that passes with vague assertions still has a quality problem
387
+ - Skip the existing test inventory -- establishing the baseline is critical context for improvements
388
+ - Assume a module is covered because one test exists -- check the recommended pyramid distribution
389
+
390
+ ---
391
+
392
+ ## Quality Gate
393
+
394
+ Before delivering this artifact, verify:
395
+
396
+ - [ ] Coverage Map includes ALL modules identified in the codebase (not just covered ones)
397
+ - [ ] Every module with `NONE` coverage at any tier has corresponding entries in Missing Tests
398
+ - [ ] Missing Tests are grouped by priority with P0 first, and each has a complete test spec (ID, target, tier, effort)
399
+ - [ ] Broken Tests include specific error messages, root cause analysis, and fix effort estimates
400
+ - [ ] Quality Assessment covers all 4 dimensions: locator tiers, assertion quality, POM compliance, naming convention
401
+ - [ ] Existing Test Inventory matches the actual test file count and status from running the suite
402
+ - [ ] Recommendations are ordered by ROI (fix broken first, then P0 gaps, then quality improvements)
403
+ - [ ] No recommendation suggests rewriting working tests -- only additive or fixative changes
404
+
405
+ ---
406
+
407
+ *Template version: 1.0*
408
+ *Producer: qa-analyzer*
409
+ *Last updated: {date}*
@@ -0,0 +1,48 @@
1
+ ## QA Automation Report
2
+
3
+ ### Analysis Summary
4
+
5
+ - **Architecture:** {architecture_type}
6
+ - **Framework:** {framework}
7
+ - **Risk Areas:** {risk_summary}
8
+
9
+ ### Test Suite
10
+
11
+ | Level | Count |
12
+ |-------|-------|
13
+ | Unit | {unit_count} |
14
+ | Integration | {integration_count} |
15
+ | API | {api_count} |
16
+ | E2E | {e2e_count} |
17
+ | **Total** | **{total_count}** |
18
+
19
+ ### Coverage Metrics
20
+
21
+ - **Modules covered:** {modules_covered}
22
+ - **Estimated coverage:** {coverage_estimate}
23
+
24
+ ### Validation Status
25
+
26
+ - **Result:** {validation_result}
27
+ - **Confidence:** {confidence}
28
+ - **Fix loops used:** {fix_loops_used}
29
+ - **Issues found:** {issues_found}
30
+ - **Issues fixed:** {issues_fixed}
31
+
32
+ ### Generated Files
33
+
34
+ {file_list}
35
+
36
+ ### Reviewer Checklist
37
+
38
+ - [ ] Test IDs are unique across all files
39
+ - [ ] Assertions use concrete values (no toBeTruthy/toBeDefined)
40
+ - [ ] Page objects contain no assertions
41
+ - [ ] No hardcoded credentials or secrets
42
+ - [ ] Locators follow tier hierarchy (data-testid first)
43
+ - [ ] Naming conventions match CLAUDE.md standards
44
+ - [ ] Testing pyramid distribution is reasonable for this project
45
+
46
+ ---
47
+
48
+ Generated by QAA (QA Automation Agent)