qaa-agent 1.6.1 → 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,150 +1,150 @@
1
- ---
2
- name: qa-learner
3
- description: "Learns from user corrections and saves persistent QA preferences. Triggers when user expresses frustration about repeated mistakes: 'ya te dije', 'te lo repeti', 'siempre te olvidas', 'otra vez lo mismo', 'I already told you', 'stop doing X', 'always do X', 'never do X', 'remember this'. Saves rules to ~/.claude/qaa/MY_PREFERENCES.md which all QA agents read before generating output."
4
- ---
5
-
6
- # QA Learner — Persistent Preferences from User Corrections
7
-
8
- ## When This Skill Activates
9
-
10
- Trigger on ANY of these patterns (Spanish or English):
11
-
12
- **Frustration / repetition signals:**
13
- - "ya te dije", "ya te lo dije", "te lo repeti", "otra vez", "siempre te olvidas"
14
- - "cuantas veces te tengo que decir", "de nuevo lo mismo", "ya hablamos de esto"
15
- - "I already told you", "I've said this before", "again?", "how many times"
16
- - "stop doing X", "don't do X", "never do X", "always do X"
17
- - "remember this", "don't forget", "from now on", "de ahora en mas"
18
- - "acordate", "no te olvides", "a partir de ahora", "siempre hacelo asi"
19
-
20
- **Explicit preference setting:**
21
- - "I prefer X over Y", "prefiero X", "use X not Y", "usa X no Y"
22
- - "the standard is X", "el estandar es X", "we always use X"
23
-
24
- ## What To Do When Triggered
25
-
26
- ### Step 1: Acknowledge the correction immediately
27
-
28
- Say something like: "Entendido, lo guardo para no repetirlo." or "Got it, saving this preference."
29
-
30
- Do NOT be defensive. Do NOT explain why you made the mistake. Just acknowledge and save.
31
-
32
- ### Step 2: Extract the rule
33
-
34
- From the user's message, extract:
35
- - **What was wrong** (what you did that they're correcting)
36
- - **What's correct** (what they want instead)
37
- - **Category** (language, framework, naming, assertions, locators, format, workflow, other)
38
-
39
- If you're not sure what exactly they want saved, ASK:
40
-
41
- "Quiero guardar esta preferencia para no repetir el error. Lo que entiendo es:
42
- - Regla: [your interpretation]
43
- - Categoria: [category]
44
- Es correcto o lo ajusto?"
45
-
46
- ### Step 3: Read existing preferences
47
-
48
- ```bash
49
- cat ~/.claude/qaa/MY_PREFERENCES.md 2>/dev/null || echo "FILE_NOT_FOUND"
50
- ```
51
-
52
- If FILE_NOT_FOUND, create the file with the header template (see below).
53
-
54
- ### Step 4: Add the new rule
55
-
56
- Append the rule to the correct category section. If the category doesn't exist, create it.
57
-
58
- Format for each rule:
59
- ```
60
- - [RULE] — (added [YYYY-MM-DD], context: "[what triggered this]")
61
- ```
62
-
63
- ### Step 5: Confirm
64
-
65
- Tell the user: "Guardado. Esto aplica para todas las sesiones futuras en esta maquina."
66
-
67
- ## Preferences File Template
68
-
69
- When creating `~/.claude/qaa/MY_PREFERENCES.md` for the first time:
70
-
71
- ```markdown
72
- # My QA Preferences
73
-
74
- Personal preferences for the QA Automation Agent. This file is LOCAL — never committed to any repo.
75
- All QA agents read this file before generating output.
76
-
77
- Last updated: [YYYY-MM-DD]
78
-
79
- ## Language
80
- <!-- Rules about language: English vs Spanish, terminology, tone -->
81
-
82
- ## Framework
83
- <!-- Preferred test frameworks, libraries, tools -->
84
-
85
- ## Naming
86
- <!-- Naming conventions for tests, files, IDs -->
87
-
88
- ## Assertions
89
- <!-- Rules about assertion style and specificity -->
90
-
91
- ## Locators
92
- <!-- Preferred locator strategies for E2E tests -->
93
-
94
- ## Format
95
- <!-- Output format preferences: file structure, comments, organization -->
96
-
97
- ## Workflow
98
- <!-- Process preferences: what to ask, what to skip, how to present results -->
99
-
100
- ## Other
101
- <!-- Anything that doesn't fit above -->
102
- ```
103
-
104
- ## How Other Agents Use This
105
-
106
- Every QA agent (scanner, analyzer, executor, validator, etc.) should check for this file at the start:
107
-
108
- ```
109
- If ~/.claude/qaa/MY_PREFERENCES.md exists:
110
- Read it before generating any output.
111
- Apply all rules found.
112
- If a rule conflicts with CLAUDE.md, the PREFERENCE wins (it's a user override).
113
- ```
114
-
115
- The preference file is the user's personal override layer on top of the project's CLAUDE.md standards.
116
-
117
- ## Examples
118
-
119
- **User says:** "Ya te dije que todo en ingles!"
120
- **Extract:** Language rule — all output in English
121
- **Save:** `## Language\n- All test cases, comments, documentation, and reports must be in ENGLISH — (added 2026-03-24, context: "user corrected language to English")`
122
-
123
- **User says:** "Stop using CSS selectors, use data-testid"
124
- **Extract:** Locator rule — data-testid over CSS
125
- **Save:** `## Locators\n- Never use CSS class selectors (.btn, .form-control). Always use data-testid first — (added 2026-03-24, context: "user corrected locator strategy")`
126
-
127
- **User says:** "Prefiero Playwright, no me pongas Cypress"
128
- **Extract:** Framework rule — Playwright over Cypress
129
- **Save:** `## Framework\n- Use Playwright for all E2E tests. Never suggest or use Cypress — (added 2026-03-24, context: "user prefers Playwright over Cypress")`
130
-
131
- **User says:** "Los test tienen que tener el ID siempre al principio del nombre"
132
- **Extract:** Naming rule — test ID at start of name
133
- **Save:** `## Naming\n- Test ID must appear at the beginning of the test name (e.g., "UT-AUTH-001: should validate email format") — (added 2026-03-24, context: "user wants ID at start of test name")`
134
-
135
- **User says:** "Las branches tienen que ser feature/{ticket}-{description}"
136
- **Extract:** Workflow rule — branch naming convention
137
- **Save:** `## Workflow\n- Branch naming convention: feature/{ticket}-{description} — (added 2026-03-24, context: "user configured branch pattern for /qa-pr")`
138
-
139
- **User says:** "Nuestras ramas siempre empiezan con test/ y el ticket de Jira"
140
- **Extract:** Workflow rule — branch naming convention
141
- **Save:** `## Workflow\n- Branch naming convention: test/{ticket}-{description} — (added 2026-03-24, context: "user specified branch pattern with Jira ticket prefix")`
142
-
143
- ## Important Rules
144
-
145
- 1. **NEVER push MY_PREFERENCES.md to any repo** — it's personal
146
- 2. **If unsure what to save, ASK** — don't guess wrong and save a bad rule
147
- 3. **Rules accumulate** — never delete old rules unless the user explicitly says to
148
- 4. **User preference > CLAUDE.md** — if the user says "use Cypress" but CLAUDE.md says "use Playwright", the user wins
149
- 5. **One rule per line** — keep it scannable
150
- 6. **Include the date and context** — so the user can review later why a rule exists
1
+ ---
2
+ name: qa-learner
3
+ description: "Learns from user corrections and saves persistent QA preferences. Triggers when user expresses frustration about repeated mistakes: 'ya te dije', 'te lo repeti', 'siempre te olvidas', 'otra vez lo mismo', 'I already told you', 'stop doing X', 'always do X', 'never do X', 'remember this'. Saves rules to ~/.claude/qaa/MY_PREFERENCES.md which all QA agents read before generating output."
4
+ ---
5
+
6
+ # QA Learner — Persistent Preferences from User Corrections
7
+
8
+ ## When This Skill Activates
9
+
10
+ Trigger on ANY of these patterns (Spanish or English):
11
+
12
+ **Frustration / repetition signals:**
13
+ - "ya te dije", "ya te lo dije", "te lo repeti", "otra vez", "siempre te olvidas"
14
+ - "cuantas veces te tengo que decir", "de nuevo lo mismo", "ya hablamos de esto"
15
+ - "I already told you", "I've said this before", "again?", "how many times"
16
+ - "stop doing X", "don't do X", "never do X", "always do X"
17
+ - "remember this", "don't forget", "from now on", "de ahora en mas"
18
+ - "acordate", "no te olvides", "a partir de ahora", "siempre hacelo asi"
19
+
20
+ **Explicit preference setting:**
21
+ - "I prefer X over Y", "prefiero X", "use X not Y", "usa X no Y"
22
+ - "the standard is X", "el estandar es X", "we always use X"
23
+
24
+ ## What To Do When Triggered
25
+
26
+ ### Step 1: Acknowledge the correction immediately
27
+
28
+ Say something like: "Entendido, lo guardo para no repetirlo." or "Got it, saving this preference."
29
+
30
+ Do NOT be defensive. Do NOT explain why you made the mistake. Just acknowledge and save.
31
+
32
+ ### Step 2: Extract the rule
33
+
34
+ From the user's message, extract:
35
+ - **What was wrong** (what you did that they're correcting)
36
+ - **What's correct** (what they want instead)
37
+ - **Category** (language, framework, naming, assertions, locators, format, workflow, other)
38
+
39
+ If you're not sure what exactly they want saved, ASK:
40
+
41
+ "Quiero guardar esta preferencia para no repetir el error. Lo que entiendo es:
42
+ - Regla: [your interpretation]
43
+ - Categoria: [category]
44
+ Es correcto o lo ajusto?"
45
+
46
+ ### Step 3: Read existing preferences
47
+
48
+ ```bash
49
+ cat ~/.claude/qaa/MY_PREFERENCES.md 2>/dev/null || echo "FILE_NOT_FOUND"
50
+ ```
51
+
52
+ If FILE_NOT_FOUND, create the file with the header template (see below).
53
+
54
+ ### Step 4: Add the new rule
55
+
56
+ Append the rule to the correct category section. If the category doesn't exist, create it.
57
+
58
+ Format for each rule:
59
+ ```
60
+ - [RULE] — (added [YYYY-MM-DD], context: "[what triggered this]")
61
+ ```
62
+
63
+ ### Step 5: Confirm
64
+
65
+ Tell the user: "Guardado. Esto aplica para todas las sesiones futuras en esta maquina."
66
+
67
+ ## Preferences File Template
68
+
69
+ When creating `~/.claude/qaa/MY_PREFERENCES.md` for the first time:
70
+
71
+ ```markdown
72
+ # My QA Preferences
73
+
74
+ Personal preferences for the QA Automation Agent. This file is LOCAL — never committed to any repo.
75
+ All QA agents read this file before generating output.
76
+
77
+ Last updated: [YYYY-MM-DD]
78
+
79
+ ## Language
80
+ <!-- Rules about language: English vs Spanish, terminology, tone -->
81
+
82
+ ## Framework
83
+ <!-- Preferred test frameworks, libraries, tools -->
84
+
85
+ ## Naming
86
+ <!-- Naming conventions for tests, files, IDs -->
87
+
88
+ ## Assertions
89
+ <!-- Rules about assertion style and specificity -->
90
+
91
+ ## Locators
92
+ <!-- Preferred locator strategies for E2E tests -->
93
+
94
+ ## Format
95
+ <!-- Output format preferences: file structure, comments, organization -->
96
+
97
+ ## Workflow
98
+ <!-- Process preferences: what to ask, what to skip, how to present results -->
99
+
100
+ ## Other
101
+ <!-- Anything that doesn't fit above -->
102
+ ```
103
+
104
+ ## How Other Agents Use This
105
+
106
+ Every QA agent (scanner, analyzer, executor, validator, etc.) should check for this file at the start:
107
+
108
+ ```
109
+ If ~/.claude/qaa/MY_PREFERENCES.md exists:
110
+ Read it before generating any output.
111
+ Apply all rules found.
112
+ If a rule conflicts with CLAUDE.md, the PREFERENCE wins (it's a user override).
113
+ ```
114
+
115
+ The preference file is the user's personal override layer on top of the project's CLAUDE.md standards.
116
+
117
+ ## Examples
118
+
119
+ **User says:** "Ya te dije que todo en ingles!"
120
+ **Extract:** Language rule — all output in English
121
+ **Save:** `## Language\n- All test cases, comments, documentation, and reports must be in ENGLISH — (added 2026-03-24, context: "user corrected language to English")`
122
+
123
+ **User says:** "Stop using CSS selectors, use data-testid"
124
+ **Extract:** Locator rule — data-testid over CSS
125
+ **Save:** `## Locators\n- Never use CSS class selectors (.btn, .form-control). Always use data-testid first — (added 2026-03-24, context: "user corrected locator strategy")`
126
+
127
+ **User says:** "Prefiero Playwright, no me pongas Cypress"
128
+ **Extract:** Framework rule — Playwright over Cypress
129
+ **Save:** `## Framework\n- Use Playwright for all E2E tests. Never suggest or use Cypress — (added 2026-03-24, context: "user prefers Playwright over Cypress")`
130
+
131
+ **User says:** "Los test tienen que tener el ID siempre al principio del nombre"
132
+ **Extract:** Naming rule — test ID at start of name
133
+ **Save:** `## Naming\n- Test ID must appear at the beginning of the test name (e.g., "UT-AUTH-001: should validate email format") — (added 2026-03-24, context: "user wants ID at start of test name")`
134
+
135
+ **User says:** "Las branches tienen que ser feature/{ticket}-{description}"
136
+ **Extract:** Workflow rule — branch naming convention
137
+ **Save:** `## Workflow\n- Branch naming convention: feature/{ticket}-{description} — (added 2026-03-24, context: "user configured branch pattern for /qa-pr")`
138
+
139
+ **User says:** "Nuestras ramas siempre empiezan con test/ y el ticket de Jira"
140
+ **Extract:** Workflow rule — branch naming convention
141
+ **Save:** `## Workflow\n- Branch naming convention: test/{ticket}-{description} — (added 2026-03-24, context: "user specified branch pattern with Jira ticket prefix")`
142
+
143
+ ## Important Rules
144
+
145
+ 1. **NEVER push MY_PREFERENCES.md to any repo** — it's personal
146
+ 2. **If unsure what to save, ASK** — don't guess wrong and save a bad rule
147
+ 3. **Rules accumulate** — never delete old rules unless the user explicitly says to
148
+ 4. **User preference > CLAUDE.md** — if the user says "use Cypress" but CLAUDE.md says "use Playwright", the user wins
149
+ 5. **One rule per line** — keep it scannable
150
+ 6. **Include the date and context** — so the user can review later why a rule exists
@@ -1,88 +1,88 @@
1
- ---
2
- name: qa-repo-analyzer
3
- description: QA Repository Analyzer. Analyzes a dev repository and produces a complete QA baseline package including testability report, test inventory, and repo blueprint. Use when user wants to analyze a repo for testing, assess testability, generate test inventory, create QA baseline, understand test coverage needs, evaluate a codebase for QA, or produce a testing strategy. Triggers on "analyze repo", "testability report", "test inventory", "QA analysis", "QA baseline", "coverage assessment", "what should we test", "testing strategy".
4
- ---
5
-
6
- # QA Repository Analyzer
7
-
8
- ## Purpose
9
-
10
- Analyze a developer repository and produce a complete QA baseline package: Testability Report, Test Inventory (pyramid-based), and QA Repo Blueprint.
11
-
12
- ## Core Rule
13
-
14
- **Every analysis must be specific to the actual codebase — never generic advice. Every test case must have an explicit expected outcome.**
15
-
16
- ## Execution Steps
17
-
18
- ### Step 0: Collect Repo Context
19
-
20
- Scan the repository systematically:
21
- - Folder tree (entry points, structure)
22
- - Package files (dependencies, scripts, framework detection)
23
- - Service/controller files (API surface area)
24
- - Model files (data structures, validation)
25
- - Database layer (ORM, migrations, schemas)
26
- - External integrations (payment, email, storage, queues)
27
- - Existing test coverage (test files, config, CI)
28
- - Configuration (env vars, feature flags)
29
-
30
- ### Step 1: Pre-Analysis — Assumptions & Questions
31
-
32
- Before generating deliverables, list:
33
- - **Assumptions**: What you're inferring from the code (e.g., "Auth uses JWT based on middleware")
34
- - **Questions**: What's ambiguous (e.g., "Is the Stripe integration in production or test mode?")
35
-
36
- Present to user for confirmation before proceeding.
37
-
38
- ### Step 2: Deliverable A — QA_ANALYSIS.md (Testability Report)
39
-
40
- Produce with ALL these sections:
41
- - **Architecture Overview**: System type, language, runtime, entry points table, internal layers
42
- - **External Dependencies**: Table with purpose and risk level (HIGH/MEDIUM/LOW)
43
- - **Risk Assessment**: Prioritized risks with justification
44
- - **Top 10 Unit Test Targets**: Table with module/function, why it's high-priority, complexity assessment
45
- - **API/Contract Test Targets**: Endpoints that need contract testing
46
- - **Recommended Testing Pyramid**: Percentages adjusted to this specific app's architecture
47
-
48
- ### Step 3: Deliverable B — TEST_INVENTORY.md (Test Cases)
49
-
50
- Generate pyramid-based test inventory:
51
-
52
- **Unit Tests** (60-70%): For each target:
53
- - Test ID (UT-MODULE-NNN)
54
- - Target (file path + function)
55
- - What to validate
56
- - Concrete inputs
57
- - Mocks needed
58
- - Explicit expected outcome
59
-
60
- **Integration/Contract Tests** (10-15%): Component interactions, API contracts
61
-
62
- **API Tests** (20-25%): For each endpoint:
63
- - Test ID (API-RESOURCE-NNN)
64
- - Method + endpoint
65
- - Request body/params
66
- - Expected status + response shape
67
-
68
- **E2E Smoke Tests** (3-5%): Max 3-8 critical user paths
69
-
70
- ### Step 4: QA_REPO_BLUEPRINT.md
71
-
72
- If no QA repo exists, generate:
73
- - Suggested repo name and folder structure
74
- - Recommended stack (framework, runner, reporter)
75
- - Config files needed
76
- - Execution scripts (npm scripts, CI commands)
77
- - CI/CD strategy (smoke on PR, regression nightly)
78
- - Definition of Done checklist
79
-
80
- ## Quality Gate
81
-
82
- - [ ] Architecture overview matches actual codebase (not generic)
83
- - [ ] Every test case has explicit expected outcome with concrete values
84
- - [ ] No vague assertions ("works correctly", "returns proper data")
85
- - [ ] Test IDs follow naming convention
86
- - [ ] Priority (P0/P1/P2) assigned to every test case
87
- - [ ] Risks are specific with evidence from the code
88
- - [ ] Testing pyramid percentages are justified for this architecture
1
+ ---
2
+ name: qa-repo-analyzer
3
+ description: QA Repository Analyzer. Analyzes a dev repository and produces a complete QA baseline package including testability report, test inventory, and repo blueprint. Use when user wants to analyze a repo for testing, assess testability, generate test inventory, create QA baseline, understand test coverage needs, evaluate a codebase for QA, or produce a testing strategy. Triggers on "analyze repo", "testability report", "test inventory", "QA analysis", "QA baseline", "coverage assessment", "what should we test", "testing strategy".
4
+ ---
5
+
6
+ # QA Repository Analyzer
7
+
8
+ ## Purpose
9
+
10
+ Analyze a developer repository and produce a complete QA baseline package: Testability Report, Test Inventory (pyramid-based), and QA Repo Blueprint.
11
+
12
+ ## Core Rule
13
+
14
+ **Every analysis must be specific to the actual codebase — never generic advice. Every test case must have an explicit expected outcome.**
15
+
16
+ ## Execution Steps
17
+
18
+ ### Step 0: Collect Repo Context
19
+
20
+ Scan the repository systematically:
21
+ - Folder tree (entry points, structure)
22
+ - Package files (dependencies, scripts, framework detection)
23
+ - Service/controller files (API surface area)
24
+ - Model files (data structures, validation)
25
+ - Database layer (ORM, migrations, schemas)
26
+ - External integrations (payment, email, storage, queues)
27
+ - Existing test coverage (test files, config, CI)
28
+ - Configuration (env vars, feature flags)
29
+
30
+ ### Step 1: Pre-Analysis — Assumptions & Questions
31
+
32
+ Before generating deliverables, list:
33
+ - **Assumptions**: What you're inferring from the code (e.g., "Auth uses JWT based on middleware")
34
+ - **Questions**: What's ambiguous (e.g., "Is the Stripe integration in production or test mode?")
35
+
36
+ Present to user for confirmation before proceeding.
37
+
38
+ ### Step 2: Deliverable A — QA_ANALYSIS.md (Testability Report)
39
+
40
+ Produce with ALL these sections:
41
+ - **Architecture Overview**: System type, language, runtime, entry points table, internal layers
42
+ - **External Dependencies**: Table with purpose and risk level (HIGH/MEDIUM/LOW)
43
+ - **Risk Assessment**: Prioritized risks with justification
44
+ - **Top 10 Unit Test Targets**: Table with module/function, why it's high-priority, complexity assessment
45
+ - **API/Contract Test Targets**: Endpoints that need contract testing
46
+ - **Recommended Testing Pyramid**: Percentages adjusted to this specific app's architecture
47
+
48
+ ### Step 3: Deliverable B — TEST_INVENTORY.md (Test Cases)
49
+
50
+ Generate pyramid-based test inventory:
51
+
52
+ **Unit Tests** (60-70%): For each target:
53
+ - Test ID (UT-MODULE-NNN)
54
+ - Target (file path + function)
55
+ - What to validate
56
+ - Concrete inputs
57
+ - Mocks needed
58
+ - Explicit expected outcome
59
+
60
+ **Integration/Contract Tests** (10-15%): Component interactions, API contracts
61
+
62
+ **API Tests** (20-25%): For each endpoint:
63
+ - Test ID (API-RESOURCE-NNN)
64
+ - Method + endpoint
65
+ - Request body/params
66
+ - Expected status + response shape
67
+
68
+ **E2E Smoke Tests** (3-5%): Max 3-8 critical user paths
69
+
70
+ ### Step 4: QA_REPO_BLUEPRINT.md
71
+
72
+ If no QA repo exists, generate:
73
+ - Suggested repo name and folder structure
74
+ - Recommended stack (framework, runner, reporter)
75
+ - Config files needed
76
+ - Execution scripts (npm scripts, CI commands)
77
+ - CI/CD strategy (smoke on PR, regression nightly)
78
+ - Definition of Done checklist
79
+
80
+ ## Quality Gate
81
+
82
+ - [ ] Architecture overview matches actual codebase (not generic)
83
+ - [ ] Every test case has explicit expected outcome with concrete values
84
+ - [ ] No vague assertions ("works correctly", "returns proper data")
85
+ - [ ] Test IDs follow naming convention
86
+ - [ ] Priority (P0/P1/P2) assigned to every test case
87
+ - [ ] Risks are specific with evidence from the code
88
+ - [ ] Testing pyramid percentages are justified for this architecture