qaa-agent 1.6.2 → 1.6.3

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 (73) hide show
  1. package/.claude/commands/create-test.md +164 -164
  2. package/.claude/commands/qa-audit.md +37 -37
  3. package/.claude/commands/qa-blueprint.md +54 -54
  4. package/.claude/commands/qa-fix.md +36 -36
  5. package/.claude/commands/qa-from-ticket.md +24 -24
  6. package/.claude/commands/qa-gap.md +20 -20
  7. package/.claude/commands/qa-map.md +47 -47
  8. package/.claude/commands/qa-pom.md +36 -36
  9. package/.claude/commands/qa-pr.md +23 -23
  10. package/.claude/commands/qa-pyramid.md +37 -37
  11. package/.claude/commands/qa-report.md +38 -38
  12. package/.claude/commands/qa-research.md +33 -33
  13. package/.claude/commands/qa-start.md +22 -22
  14. package/.claude/commands/qa-testid.md +19 -19
  15. package/.claude/commands/qa-validate.md +42 -42
  16. package/.claude/commands/update-test.md +58 -58
  17. package/.claude/settings.json +20 -20
  18. package/.claude/skills/qa-bug-detective/SKILL.md +122 -122
  19. package/.claude/skills/qa-learner/SKILL.md +150 -150
  20. package/.claude/skills/qa-repo-analyzer/SKILL.md +88 -88
  21. package/.claude/skills/qa-self-validator/SKILL.md +109 -109
  22. package/.claude/skills/qa-template-engine/SKILL.md +113 -113
  23. package/.claude/skills/qa-testid-injector/SKILL.md +93 -93
  24. package/.claude/skills/qa-workflow-documenter/SKILL.md +87 -87
  25. package/.mcp.json +8 -8
  26. package/CHANGELOG.md +71 -71
  27. package/CLAUDE.md +553 -553
  28. package/agents/qa-pipeline-orchestrator.md +1378 -1378
  29. package/agents/qaa-analyzer.md +524 -524
  30. package/agents/qaa-bug-detective.md +446 -446
  31. package/agents/qaa-codebase-mapper.md +935 -935
  32. package/agents/qaa-e2e-runner.md +415 -415
  33. package/agents/qaa-executor.md +651 -651
  34. package/agents/qaa-planner.md +390 -390
  35. package/agents/qaa-project-researcher.md +319 -319
  36. package/agents/qaa-scanner.md +424 -424
  37. package/agents/qaa-testid-injector.md +585 -585
  38. package/agents/qaa-validator.md +452 -452
  39. package/bin/install.cjs +198 -198
  40. package/bin/lib/commands.cjs +709 -709
  41. package/bin/lib/config.cjs +307 -307
  42. package/bin/lib/core.cjs +497 -497
  43. package/bin/lib/frontmatter.cjs +299 -299
  44. package/bin/lib/init.cjs +989 -989
  45. package/bin/lib/milestone.cjs +241 -241
  46. package/bin/lib/model-profiles.cjs +60 -60
  47. package/bin/lib/phase.cjs +911 -911
  48. package/bin/lib/roadmap.cjs +306 -306
  49. package/bin/lib/state.cjs +748 -748
  50. package/bin/lib/template.cjs +222 -222
  51. package/bin/lib/verify.cjs +842 -842
  52. package/bin/qaa-tools.cjs +607 -607
  53. package/docs/COMMANDS.md +341 -341
  54. package/docs/DEMO.md +182 -182
  55. package/docs/TESTING.md +156 -156
  56. package/package.json +41 -41
  57. package/templates/failure-classification.md +391 -391
  58. package/templates/gap-analysis.md +409 -409
  59. package/templates/pr-template.md +48 -48
  60. package/templates/qa-analysis.md +381 -381
  61. package/templates/qa-audit-report.md +465 -465
  62. package/templates/qa-repo-blueprint.md +636 -636
  63. package/templates/scan-manifest.md +312 -312
  64. package/templates/test-inventory.md +582 -582
  65. package/templates/testid-audit-report.md +354 -354
  66. package/templates/validation-report.md +243 -243
  67. package/workflows/qa-analyze.md +296 -296
  68. package/workflows/qa-from-ticket.md +536 -536
  69. package/workflows/qa-gap.md +303 -303
  70. package/workflows/qa-pr.md +389 -389
  71. package/workflows/qa-start.md +1168 -1168
  72. package/workflows/qa-testid.md +356 -356
  73. package/workflows/qa-validate.md +295 -295
@@ -1,243 +1,243 @@
1
- ---
2
- template_name: validation-report
3
- version: "1.0"
4
- artifact_type: validation
5
- produces: VALIDATION_REPORT.md
6
- producer_agent: qa-validator
7
- consumer_agents:
8
- - qa-bug-detective
9
- - human-reviewer
10
- required_sections:
11
- - summary
12
- - file-details
13
- - unresolved-issues
14
- - fix-loop-log
15
- - confidence-level
16
- example_domain: shopflow
17
- ---
18
-
19
- # VALIDATION_REPORT.md Template
20
-
21
- **Purpose:** Documents the results of 4-layer validation (Syntax, Structure, Dependencies, Logic) applied to generated test code. Tracks what was found, what was auto-fixed, what remains unresolved, and the overall confidence that the test suite is ready for delivery.
22
-
23
- **Producer:** qa-validator (runs after test code generation, before delivery)
24
- **Consumers:** qa-bug-detective (uses validation results to focus failure investigation), human-reviewer (reviews overall quality and unresolved issues)
25
-
26
- ---
27
-
28
- ## Required Sections
29
-
30
- ### Section 1: Summary
31
-
32
- **Description:** High-level overview of validation results across all 4 layers, aggregated across all validated files.
33
-
34
- **Fields:**
35
-
36
- | Field | Type | Required | Description |
37
- |-------|------|----------|-------------|
38
- | Layer | enum | YES | Syntax, Structure, Dependencies, or Logic |
39
- | Status | enum | YES | PASS or FAIL (final status after fix loops) |
40
- | Issues Found | integer | YES | Total issues discovered in this layer |
41
- | Issues Fixed | integer | YES | Issues auto-fixed during fix loops |
42
-
43
- Additional summary fields:
44
- - Total files validated
45
- - Total issues found (across all layers)
46
- - Total issues fixed
47
- - Fix loops used (1, 2, or 3)
48
- - Overall status (PASS / PASS WITH WARNINGS / FAIL)
49
-
50
- ---
51
-
52
- ### Section 2: File Details
53
-
54
- **Description:** Per-file breakdown showing every validation layer's result. Each validated file gets its own subsection with a table showing all 4 layers.
55
-
56
- **Fields per file:**
57
-
58
- | Field | Type | Required | Description |
59
- |-------|------|----------|-------------|
60
- | Filename | path | YES | Full relative path to the validated file |
61
- | Layer | enum | YES | Syntax, Structure, Dependencies, or Logic |
62
- | Status | enum | YES | PASS or FAIL |
63
- | Details | text | YES | What passed, what failed, specific error messages. Never just "PASS" or "FAIL" without context. |
64
-
65
- **Rule:** Report EVERY layer for EVERY file, even if all layers pass. A file with all PASS still shows 4 rows in its table.
66
-
67
- ---
68
-
69
- ### Section 3: Unresolved Issues
70
-
71
- **Description:** Issues that could NOT be auto-fixed after the maximum 3 fix loops. Each unresolved issue gets detailed documentation to help human reviewers understand what went wrong and what to do about it.
72
-
73
- **Fields per unresolved issue:**
74
-
75
- | Field | Type | Required | Description |
76
- |-------|------|----------|-------------|
77
- | File | path | YES | Path to the affected file |
78
- | Layer | enum | YES | Which validation layer detected the issue |
79
- | Issue Description | text | YES | What the issue is, in specific terms |
80
- | Attempted Fix | text | YES | What auto-fix was tried (or "No fix attempted" if issue type is not auto-fixable) |
81
- | Why It Failed | text | YES | Why the auto-fix did not resolve the issue |
82
- | Suggested Resolution | text | YES | What a human should do to resolve this |
83
-
84
- If there are no unresolved issues, this section states: **"None -- all issues resolved within fix loops."**
85
-
86
- ---
87
-
88
- ### Section 4: Fix Loop Log
89
-
90
- **Description:** Chronological record of each fix loop iteration showing progressive issue resolution. Essential for debugging validation failures and understanding the auto-fix progression.
91
-
92
- **Fields per loop:**
93
-
94
- | Field | Type | Required | Description |
95
- |-------|------|----------|-------------|
96
- | Loop Number | integer | YES | 1, 2, or 3 |
97
- | Issues Found | integer | YES | How many issues were detected in this loop |
98
- | Issues Description | text | YES | What specific issues were found |
99
- | Fixes Applied | text | YES | What fixes were applied |
100
- | Verification Result | text | YES | Did the fixes resolve the issues? What remains? |
101
-
102
- ---
103
-
104
- ### Section 5: Confidence Level
105
-
106
- **Description:** Overall confidence assessment that the validated test code is ready for delivery. Based on quantitative criteria, not subjective judgment.
107
-
108
- **Confidence Criteria Table:**
109
-
110
- | Level | All Layers PASS | Unresolved Issues | Fix Loops Used | Description |
111
- |-------|----------------|-------------------|----------------|-------------|
112
- | HIGH | Yes | 0 | 0-1 | All validations pass with minimal or no fixes needed. Code is ready for delivery. |
113
- | MEDIUM | Yes (after fixes) | 0-2 minor | 2-3 | All layers eventually pass, but required multiple fix rounds. Minor issues may exist. |
114
- | LOW | No (any FAIL) | Any critical | 3 (max) | At least one layer still fails, or critical issues remain unresolved. Human review required before delivery. |
115
-
116
- **Confidence statement format:** `[LEVEL]: [one-sentence reasoning referencing specific metrics from the summary]`
117
-
118
- ---
119
-
120
- ## Worked Example (ShopFlow E-Commerce API)
121
-
122
- Below is a complete, filled VALIDATION_REPORT.md for ShopFlow test code validation.
123
-
124
- ---
125
-
126
- # Validation Report
127
-
128
- **Generated:** 2026-03-18T14:30:00Z
129
- **Validator:** qa-validator v1.0
130
- **Target:** shopflow-qa-tests (4 files)
131
-
132
- ## Summary
133
-
134
- | Layer | Status | Issues Found | Issues Fixed |
135
- |-------|--------|-------------|-------------|
136
- | Syntax | PASS | 0 | 0 |
137
- | Structure | PASS | 1 | 1 |
138
- | Dependencies | PASS | 0 | 0 |
139
- | Logic | PASS | 2 | 2 |
140
-
141
- - **Total files validated:** 4
142
- - **Total issues found:** 3
143
- - **Total issues fixed:** 3
144
- - **Fix loops used:** 2
145
- - **Overall status:** PASS
146
-
147
- ## File Details
148
-
149
- ### tests/unit/priceCalculator.unit.spec.ts
150
-
151
- | Layer | Status | Details |
152
- |-------|--------|---------|
153
- | Syntax | PASS | TypeScript compilation clean (`tsc --noEmit` exit 0). No ESLint errors. |
154
- | Structure | PASS | Correct directory placement (`tests/unit/`). Naming follows convention (`*.unit.spec.ts`). Contains 4 test functions in 2 describe blocks. No hardcoded credentials. |
155
- | Dependencies | PASS | All imports resolve: `priceCalculator` found at `src/utils/priceCalculator.ts`. No external packages needed beyond `@playwright/test`. |
156
- | Logic | PASS | All 4 tests have concrete assertions (`toBe(89.97)`, `toBe(215.52)`). Happy path tests use `toBe`/`toEqual`. No vague assertions (no `toBeTruthy()` or `toBeDefined()`). Each test has at least one assertion. |
157
-
158
- ### tests/api/orders.api.spec.ts
159
-
160
- | Layer | Status | Details |
161
- |-------|--------|---------|
162
- | Syntax | PASS | TypeScript compilation clean. No ESLint errors. |
163
- | Structure | PASS | **Fixed in Loop 1.** Originally placed in `tests/e2e/` directory. Moved to `tests/api/` per naming convention (file is `*.api.spec.ts`, must be in `tests/api/`). After fix: correct placement, naming compliant. |
164
- | Dependencies | PASS | All imports resolve. `auth-data` fixture found at `fixtures/auth-data.ts`. API client uses `request` from `@playwright/test`. |
165
- | Logic | PASS | **Fixed in Loop 1.** Original test at line 34 had vague assertion: `expect(response.status).toBeTruthy()`. Fixed to: `expect(response.status).toBe(201)`. All 6 tests now have concrete assertions with specific values. |
166
-
167
- ### pages/auth/LoginPage.ts
168
-
169
- | Layer | Status | Details |
170
- |-------|--------|---------|
171
- | Syntax | PASS | TypeScript compilation clean. No ESLint errors. |
172
- | Structure | PASS | Correct directory placement (`pages/auth/`). Naming follows convention (`*Page.ts`). Extends BasePage. No assertions in page object (verified: 0 `expect()` calls). |
173
- | Dependencies | PASS | All imports resolve. `BasePage` found at `pages/base/BasePage.ts`. Playwright `Page` and `Locator` types imported correctly. |
174
- | Logic | PASS | All locators use Tier 1 selectors (`getByTestId`, `getByRole`). Actions return `void` or navigation promises. State query methods (`getErrorMessage()`, `isSubmitEnabled()`) return data without asserting. |
175
-
176
- ### tests/e2e/smoke/checkout.e2e.spec.ts
177
-
178
- | Layer | Status | Details |
179
- |-------|--------|---------|
180
- | Syntax | PASS | TypeScript compilation clean. No ESLint errors. |
181
- | Structure | PASS | Correct directory placement (`tests/e2e/smoke/`). Naming follows convention (`*.e2e.spec.ts`). Contains 3 test functions. No hardcoded credentials (uses `process.env` for test user). |
182
- | Dependencies | PASS | All imports resolve. Page objects (`CartPage`, `CheckoutPage`, `LoginPage`) found at expected paths. Fixtures import resolves. |
183
- | Logic | PASS | **Fixed in Loop 2.** Missing `await` on `page.click('[data-testid="checkout-submit-btn"]')` at line 45. Added `await` keyword. After fix: all async operations properly awaited. All assertions concrete (`toHaveText('Order confirmed')`, `toBeVisible()`). |
184
-
185
- ## Unresolved Issues
186
-
187
- None -- all issues resolved within 2 fix loops.
188
-
189
- ## Fix Loop Log
190
-
191
- ### Loop 1
192
-
193
- - **Issues found:** 2
194
- 1. `tests/api/orders.api.spec.ts` placed in wrong directory (`tests/e2e/` instead of `tests/api/`)
195
- 2. `tests/api/orders.api.spec.ts:34` has vague assertion: `expect(response.status).toBeTruthy()`
196
- - **Fixes applied:**
197
- 1. Moved file from `tests/e2e/orders.api.spec.ts` to `tests/api/orders.api.spec.ts`
198
- 2. Changed assertion to `expect(response.status).toBe(201)` (verified against API spec: POST /orders returns 201)
199
- - **Verification result:** Both fixes verified. Structure layer now PASS. Logic layer still has 1 remaining issue found in re-validation.
200
-
201
- ### Loop 2
202
-
203
- - **Issues found:** 1
204
- 1. `tests/e2e/smoke/checkout.e2e.spec.ts:45` missing `await` on `page.click()` call
205
- - **Fixes applied:**
206
- 1. Added `await` keyword: `await page.click('[data-testid="checkout-submit-btn"]')`
207
- - **Verification result:** Fix verified. All 4 layers PASS across all 4 files. No remaining issues.
208
-
209
- ## Confidence Level
210
-
211
- **HIGH:** All 4 validation layers pass across all 4 files. 3 issues were found and all 3 were auto-fixed within 2 fix loops. No unresolved issues. No guesses were made in fixes -- each fix was verified against project standards (directory convention, API spec, async requirements).
212
-
213
- ---
214
-
215
- ## Guidelines
216
-
217
- **DO:**
218
- - Report EVERY layer for EVERY file, even if all layers pass -- omitting passing layers makes it impossible to confirm they were actually checked
219
- - Include the specific error message or code snippet in file details, not just "FAIL" -- reviewers need to understand what failed
220
- - Show the before/after in fix loop entries -- what was the original issue and what was the fix
221
- - Run verification AFTER each fix loop to confirm fixes work -- do not assume a fix resolves the issue
222
- - Include timestamps and validator version in the report header for traceability
223
-
224
- **DON'T:**
225
- - Mark confidence HIGH if any fix was a guess or unverified -- confidence requires verified fixes
226
- - Skip the fix loop log even if all layers pass on first check -- report "Loop 1: 0 issues found" to prove validation ran
227
- - Combine multiple files into a single file details entry -- each file gets its own subsection
228
- - Report Logic as PASS when assertions use `toBeTruthy()`, `toBeDefined()`, or `.should('exist')` without a concrete value -- these are vague assertions per CLAUDE.md standards
229
- - Auto-fix more than 3 loops -- after 3 loops, document unresolved issues and deliver with LOW confidence
230
-
231
- ---
232
-
233
- ## Quality Gate
234
-
235
- Before delivering a VALIDATION_REPORT.md, verify:
236
-
237
- - [ ] All 5 required sections are present (Summary, File Details, Unresolved Issues, Fix Loop Log, Confidence Level)
238
- - [ ] Summary table shows all 4 layers (Syntax, Structure, Dependencies, Logic) with counts
239
- - [ ] Every validated file has its own File Details subsection with all 4 layers reported
240
- - [ ] Unresolved Issues section is present (either with issues or "None" statement)
241
- - [ ] Fix Loop Log documents every loop iteration with issues found, fixes applied, and verification result
242
- - [ ] Confidence Level includes the criteria table and a specific confidence statement with reasoning
243
- - [ ] No file details entry says just "PASS" or "FAIL" without explanatory details
1
+ ---
2
+ template_name: validation-report
3
+ version: "1.0"
4
+ artifact_type: validation
5
+ produces: VALIDATION_REPORT.md
6
+ producer_agent: qa-validator
7
+ consumer_agents:
8
+ - qa-bug-detective
9
+ - human-reviewer
10
+ required_sections:
11
+ - summary
12
+ - file-details
13
+ - unresolved-issues
14
+ - fix-loop-log
15
+ - confidence-level
16
+ example_domain: shopflow
17
+ ---
18
+
19
+ # VALIDATION_REPORT.md Template
20
+
21
+ **Purpose:** Documents the results of 4-layer validation (Syntax, Structure, Dependencies, Logic) applied to generated test code. Tracks what was found, what was auto-fixed, what remains unresolved, and the overall confidence that the test suite is ready for delivery.
22
+
23
+ **Producer:** qa-validator (runs after test code generation, before delivery)
24
+ **Consumers:** qa-bug-detective (uses validation results to focus failure investigation), human-reviewer (reviews overall quality and unresolved issues)
25
+
26
+ ---
27
+
28
+ ## Required Sections
29
+
30
+ ### Section 1: Summary
31
+
32
+ **Description:** High-level overview of validation results across all 4 layers, aggregated across all validated files.
33
+
34
+ **Fields:**
35
+
36
+ | Field | Type | Required | Description |
37
+ |-------|------|----------|-------------|
38
+ | Layer | enum | YES | Syntax, Structure, Dependencies, or Logic |
39
+ | Status | enum | YES | PASS or FAIL (final status after fix loops) |
40
+ | Issues Found | integer | YES | Total issues discovered in this layer |
41
+ | Issues Fixed | integer | YES | Issues auto-fixed during fix loops |
42
+
43
+ Additional summary fields:
44
+ - Total files validated
45
+ - Total issues found (across all layers)
46
+ - Total issues fixed
47
+ - Fix loops used (1, 2, or 3)
48
+ - Overall status (PASS / PASS WITH WARNINGS / FAIL)
49
+
50
+ ---
51
+
52
+ ### Section 2: File Details
53
+
54
+ **Description:** Per-file breakdown showing every validation layer's result. Each validated file gets its own subsection with a table showing all 4 layers.
55
+
56
+ **Fields per file:**
57
+
58
+ | Field | Type | Required | Description |
59
+ |-------|------|----------|-------------|
60
+ | Filename | path | YES | Full relative path to the validated file |
61
+ | Layer | enum | YES | Syntax, Structure, Dependencies, or Logic |
62
+ | Status | enum | YES | PASS or FAIL |
63
+ | Details | text | YES | What passed, what failed, specific error messages. Never just "PASS" or "FAIL" without context. |
64
+
65
+ **Rule:** Report EVERY layer for EVERY file, even if all layers pass. A file with all PASS still shows 4 rows in its table.
66
+
67
+ ---
68
+
69
+ ### Section 3: Unresolved Issues
70
+
71
+ **Description:** Issues that could NOT be auto-fixed after the maximum 3 fix loops. Each unresolved issue gets detailed documentation to help human reviewers understand what went wrong and what to do about it.
72
+
73
+ **Fields per unresolved issue:**
74
+
75
+ | Field | Type | Required | Description |
76
+ |-------|------|----------|-------------|
77
+ | File | path | YES | Path to the affected file |
78
+ | Layer | enum | YES | Which validation layer detected the issue |
79
+ | Issue Description | text | YES | What the issue is, in specific terms |
80
+ | Attempted Fix | text | YES | What auto-fix was tried (or "No fix attempted" if issue type is not auto-fixable) |
81
+ | Why It Failed | text | YES | Why the auto-fix did not resolve the issue |
82
+ | Suggested Resolution | text | YES | What a human should do to resolve this |
83
+
84
+ If there are no unresolved issues, this section states: **"None -- all issues resolved within fix loops."**
85
+
86
+ ---
87
+
88
+ ### Section 4: Fix Loop Log
89
+
90
+ **Description:** Chronological record of each fix loop iteration showing progressive issue resolution. Essential for debugging validation failures and understanding the auto-fix progression.
91
+
92
+ **Fields per loop:**
93
+
94
+ | Field | Type | Required | Description |
95
+ |-------|------|----------|-------------|
96
+ | Loop Number | integer | YES | 1, 2, or 3 |
97
+ | Issues Found | integer | YES | How many issues were detected in this loop |
98
+ | Issues Description | text | YES | What specific issues were found |
99
+ | Fixes Applied | text | YES | What fixes were applied |
100
+ | Verification Result | text | YES | Did the fixes resolve the issues? What remains? |
101
+
102
+ ---
103
+
104
+ ### Section 5: Confidence Level
105
+
106
+ **Description:** Overall confidence assessment that the validated test code is ready for delivery. Based on quantitative criteria, not subjective judgment.
107
+
108
+ **Confidence Criteria Table:**
109
+
110
+ | Level | All Layers PASS | Unresolved Issues | Fix Loops Used | Description |
111
+ |-------|----------------|-------------------|----------------|-------------|
112
+ | HIGH | Yes | 0 | 0-1 | All validations pass with minimal or no fixes needed. Code is ready for delivery. |
113
+ | MEDIUM | Yes (after fixes) | 0-2 minor | 2-3 | All layers eventually pass, but required multiple fix rounds. Minor issues may exist. |
114
+ | LOW | No (any FAIL) | Any critical | 3 (max) | At least one layer still fails, or critical issues remain unresolved. Human review required before delivery. |
115
+
116
+ **Confidence statement format:** `[LEVEL]: [one-sentence reasoning referencing specific metrics from the summary]`
117
+
118
+ ---
119
+
120
+ ## Worked Example (ShopFlow E-Commerce API)
121
+
122
+ Below is a complete, filled VALIDATION_REPORT.md for ShopFlow test code validation.
123
+
124
+ ---
125
+
126
+ # Validation Report
127
+
128
+ **Generated:** 2026-03-18T14:30:00Z
129
+ **Validator:** qa-validator v1.0
130
+ **Target:** shopflow-qa-tests (4 files)
131
+
132
+ ## Summary
133
+
134
+ | Layer | Status | Issues Found | Issues Fixed |
135
+ |-------|--------|-------------|-------------|
136
+ | Syntax | PASS | 0 | 0 |
137
+ | Structure | PASS | 1 | 1 |
138
+ | Dependencies | PASS | 0 | 0 |
139
+ | Logic | PASS | 2 | 2 |
140
+
141
+ - **Total files validated:** 4
142
+ - **Total issues found:** 3
143
+ - **Total issues fixed:** 3
144
+ - **Fix loops used:** 2
145
+ - **Overall status:** PASS
146
+
147
+ ## File Details
148
+
149
+ ### tests/unit/priceCalculator.unit.spec.ts
150
+
151
+ | Layer | Status | Details |
152
+ |-------|--------|---------|
153
+ | Syntax | PASS | TypeScript compilation clean (`tsc --noEmit` exit 0). No ESLint errors. |
154
+ | Structure | PASS | Correct directory placement (`tests/unit/`). Naming follows convention (`*.unit.spec.ts`). Contains 4 test functions in 2 describe blocks. No hardcoded credentials. |
155
+ | Dependencies | PASS | All imports resolve: `priceCalculator` found at `src/utils/priceCalculator.ts`. No external packages needed beyond `@playwright/test`. |
156
+ | Logic | PASS | All 4 tests have concrete assertions (`toBe(89.97)`, `toBe(215.52)`). Happy path tests use `toBe`/`toEqual`. No vague assertions (no `toBeTruthy()` or `toBeDefined()`). Each test has at least one assertion. |
157
+
158
+ ### tests/api/orders.api.spec.ts
159
+
160
+ | Layer | Status | Details |
161
+ |-------|--------|---------|
162
+ | Syntax | PASS | TypeScript compilation clean. No ESLint errors. |
163
+ | Structure | PASS | **Fixed in Loop 1.** Originally placed in `tests/e2e/` directory. Moved to `tests/api/` per naming convention (file is `*.api.spec.ts`, must be in `tests/api/`). After fix: correct placement, naming compliant. |
164
+ | Dependencies | PASS | All imports resolve. `auth-data` fixture found at `fixtures/auth-data.ts`. API client uses `request` from `@playwright/test`. |
165
+ | Logic | PASS | **Fixed in Loop 1.** Original test at line 34 had vague assertion: `expect(response.status).toBeTruthy()`. Fixed to: `expect(response.status).toBe(201)`. All 6 tests now have concrete assertions with specific values. |
166
+
167
+ ### pages/auth/LoginPage.ts
168
+
169
+ | Layer | Status | Details |
170
+ |-------|--------|---------|
171
+ | Syntax | PASS | TypeScript compilation clean. No ESLint errors. |
172
+ | Structure | PASS | Correct directory placement (`pages/auth/`). Naming follows convention (`*Page.ts`). Extends BasePage. No assertions in page object (verified: 0 `expect()` calls). |
173
+ | Dependencies | PASS | All imports resolve. `BasePage` found at `pages/base/BasePage.ts`. Playwright `Page` and `Locator` types imported correctly. |
174
+ | Logic | PASS | All locators use Tier 1 selectors (`getByTestId`, `getByRole`). Actions return `void` or navigation promises. State query methods (`getErrorMessage()`, `isSubmitEnabled()`) return data without asserting. |
175
+
176
+ ### tests/e2e/smoke/checkout.e2e.spec.ts
177
+
178
+ | Layer | Status | Details |
179
+ |-------|--------|---------|
180
+ | Syntax | PASS | TypeScript compilation clean. No ESLint errors. |
181
+ | Structure | PASS | Correct directory placement (`tests/e2e/smoke/`). Naming follows convention (`*.e2e.spec.ts`). Contains 3 test functions. No hardcoded credentials (uses `process.env` for test user). |
182
+ | Dependencies | PASS | All imports resolve. Page objects (`CartPage`, `CheckoutPage`, `LoginPage`) found at expected paths. Fixtures import resolves. |
183
+ | Logic | PASS | **Fixed in Loop 2.** Missing `await` on `page.click('[data-testid="checkout-submit-btn"]')` at line 45. Added `await` keyword. After fix: all async operations properly awaited. All assertions concrete (`toHaveText('Order confirmed')`, `toBeVisible()`). |
184
+
185
+ ## Unresolved Issues
186
+
187
+ None -- all issues resolved within 2 fix loops.
188
+
189
+ ## Fix Loop Log
190
+
191
+ ### Loop 1
192
+
193
+ - **Issues found:** 2
194
+ 1. `tests/api/orders.api.spec.ts` placed in wrong directory (`tests/e2e/` instead of `tests/api/`)
195
+ 2. `tests/api/orders.api.spec.ts:34` has vague assertion: `expect(response.status).toBeTruthy()`
196
+ - **Fixes applied:**
197
+ 1. Moved file from `tests/e2e/orders.api.spec.ts` to `tests/api/orders.api.spec.ts`
198
+ 2. Changed assertion to `expect(response.status).toBe(201)` (verified against API spec: POST /orders returns 201)
199
+ - **Verification result:** Both fixes verified. Structure layer now PASS. Logic layer still has 1 remaining issue found in re-validation.
200
+
201
+ ### Loop 2
202
+
203
+ - **Issues found:** 1
204
+ 1. `tests/e2e/smoke/checkout.e2e.spec.ts:45` missing `await` on `page.click()` call
205
+ - **Fixes applied:**
206
+ 1. Added `await` keyword: `await page.click('[data-testid="checkout-submit-btn"]')`
207
+ - **Verification result:** Fix verified. All 4 layers PASS across all 4 files. No remaining issues.
208
+
209
+ ## Confidence Level
210
+
211
+ **HIGH:** All 4 validation layers pass across all 4 files. 3 issues were found and all 3 were auto-fixed within 2 fix loops. No unresolved issues. No guesses were made in fixes -- each fix was verified against project standards (directory convention, API spec, async requirements).
212
+
213
+ ---
214
+
215
+ ## Guidelines
216
+
217
+ **DO:**
218
+ - Report EVERY layer for EVERY file, even if all layers pass -- omitting passing layers makes it impossible to confirm they were actually checked
219
+ - Include the specific error message or code snippet in file details, not just "FAIL" -- reviewers need to understand what failed
220
+ - Show the before/after in fix loop entries -- what was the original issue and what was the fix
221
+ - Run verification AFTER each fix loop to confirm fixes work -- do not assume a fix resolves the issue
222
+ - Include timestamps and validator version in the report header for traceability
223
+
224
+ **DON'T:**
225
+ - Mark confidence HIGH if any fix was a guess or unverified -- confidence requires verified fixes
226
+ - Skip the fix loop log even if all layers pass on first check -- report "Loop 1: 0 issues found" to prove validation ran
227
+ - Combine multiple files into a single file details entry -- each file gets its own subsection
228
+ - Report Logic as PASS when assertions use `toBeTruthy()`, `toBeDefined()`, or `.should('exist')` without a concrete value -- these are vague assertions per CLAUDE.md standards
229
+ - Auto-fix more than 3 loops -- after 3 loops, document unresolved issues and deliver with LOW confidence
230
+
231
+ ---
232
+
233
+ ## Quality Gate
234
+
235
+ Before delivering a VALIDATION_REPORT.md, verify:
236
+
237
+ - [ ] All 5 required sections are present (Summary, File Details, Unresolved Issues, Fix Loop Log, Confidence Level)
238
+ - [ ] Summary table shows all 4 layers (Syntax, Structure, Dependencies, Logic) with counts
239
+ - [ ] Every validated file has its own File Details subsection with all 4 layers reported
240
+ - [ ] Unresolved Issues section is present (either with issues or "None" statement)
241
+ - [ ] Fix Loop Log documents every loop iteration with issues found, fixes applied, and verification result
242
+ - [ ] Confidence Level includes the criteria table and a specific confidence statement with reasoning
243
+ - [ ] No file details entry says just "PASS" or "FAIL" without explanatory details