qaa-agent 1.6.2 → 1.7.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.
- package/.mcp.json +8 -8
- package/CHANGELOG.md +93 -71
- package/CLAUDE.md +553 -553
- package/agents/qa-pipeline-orchestrator.md +1378 -1378
- package/agents/qaa-analyzer.md +539 -524
- package/agents/qaa-bug-detective.md +479 -446
- package/agents/qaa-codebase-mapper.md +935 -935
- package/agents/qaa-discovery.md +384 -0
- package/agents/qaa-e2e-runner.md +416 -415
- package/agents/qaa-executor.md +651 -651
- package/agents/qaa-planner.md +405 -390
- package/agents/qaa-project-researcher.md +319 -319
- package/agents/qaa-scanner.md +424 -424
- package/agents/qaa-testid-injector.md +643 -585
- package/agents/qaa-validator.md +490 -452
- package/bin/install.cjs +200 -198
- package/bin/lib/commands.cjs +709 -709
- package/bin/lib/config.cjs +307 -307
- package/bin/lib/core.cjs +497 -497
- package/bin/lib/frontmatter.cjs +299 -299
- package/bin/lib/init.cjs +989 -989
- package/bin/lib/milestone.cjs +241 -241
- package/bin/lib/model-profiles.cjs +60 -60
- package/bin/lib/phase.cjs +911 -911
- package/bin/lib/roadmap.cjs +306 -306
- package/bin/lib/state.cjs +748 -748
- package/bin/lib/template.cjs +222 -222
- package/bin/lib/verify.cjs +842 -842
- package/bin/qaa-tools.cjs +607 -607
- package/commands/qa-audit.md +119 -0
- package/commands/qa-create-test.md +288 -0
- package/commands/qa-fix.md +147 -0
- package/commands/qa-map.md +137 -0
- package/{.claude/commands → commands}/qa-pr.md +23 -23
- package/{.claude/commands → commands}/qa-start.md +22 -22
- package/{.claude/commands → commands}/qa-testid.md +19 -19
- package/docs/COMMANDS.md +341 -341
- package/docs/DEMO.md +182 -182
- package/docs/TESTING.md +156 -156
- package/package.json +6 -7
- package/{.claude/settings.json → settings.json} +1 -2
- package/templates/failure-classification.md +391 -391
- package/templates/gap-analysis.md +409 -409
- package/templates/pr-template.md +48 -48
- package/templates/qa-analysis.md +381 -381
- package/templates/qa-audit-report.md +465 -465
- package/templates/qa-repo-blueprint.md +636 -636
- package/templates/scan-manifest.md +312 -312
- package/templates/test-inventory.md +582 -582
- package/templates/testid-audit-report.md +354 -354
- package/templates/validation-report.md +243 -243
- package/workflows/qa-analyze.md +296 -296
- package/workflows/qa-from-ticket.md +536 -536
- package/workflows/qa-gap.md +309 -303
- package/workflows/qa-pr.md +389 -389
- package/workflows/qa-start.md +1192 -1168
- package/workflows/qa-testid.md +384 -356
- package/workflows/qa-validate.md +299 -295
- package/.claude/commands/create-test.md +0 -164
- package/.claude/commands/qa-audit.md +0 -37
- package/.claude/commands/qa-blueprint.md +0 -54
- package/.claude/commands/qa-fix.md +0 -36
- package/.claude/commands/qa-from-ticket.md +0 -24
- package/.claude/commands/qa-gap.md +0 -20
- package/.claude/commands/qa-map.md +0 -47
- package/.claude/commands/qa-pom.md +0 -36
- package/.claude/commands/qa-pyramid.md +0 -37
- package/.claude/commands/qa-report.md +0 -38
- package/.claude/commands/qa-research.md +0 -33
- package/.claude/commands/qa-validate.md +0 -42
- package/.claude/commands/update-test.md +0 -58
- package/.claude/skills/qa-learner/SKILL.md +0 -150
- /package/{.claude/skills → skills}/qa-bug-detective/SKILL.md +0 -0
- /package/{.claude/skills → skills}/qa-repo-analyzer/SKILL.md +0 -0
- /package/{.claude/skills → skills}/qa-self-validator/SKILL.md +0 -0
- /package/{.claude/skills → skills}/qa-template-engine/SKILL.md +0 -0
- /package/{.claude/skills → skills}/qa-testid-injector/SKILL.md +0 -0
- /package/{.claude/skills → skills}/qa-workflow-documenter/SKILL.md +0 -0
package/workflows/qa-gap.md
CHANGED
|
@@ -1,303 +1,309 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Compare a developer repository against a QA repository to identify coverage gaps, broken tests, quality issues, and missing test cases. Scans both repositories, performs gap analysis, and produces a comprehensive GAP_ANALYSIS.md with coverage maps, missing test inventories, broken test diagnostics, and quality assessments. Both --dev-repo and --qa-repo paths are required. Use this workflow when a QA repo already exists but may have incomplete coverage or quality issues.
|
|
3
|
-
</purpose>
|
|
4
|
-
|
|
5
|
-
<required_reading>
|
|
6
|
-
- `CLAUDE.md` -- QA automation standards, pipeline stages, module boundaries, verification commands, quality gates
|
|
7
|
-
- `agents/qaa-scanner.md` -- Scanner agent definition (scans both dev and QA repos)
|
|
8
|
-
- `agents/qaa-analyzer.md` -- Analyzer agent definition (gap mode produces GAP_ANALYSIS.md)
|
|
9
|
-
- `templates/scan-manifest.md` -- SCAN_MANIFEST.md format contract
|
|
10
|
-
- `templates/gap-analysis.md` -- GAP_ANALYSIS.md format contract
|
|
11
|
-
- `templates/qa-analysis.md` -- QA_ANALYSIS.md format contract
|
|
12
|
-
- `templates/test-inventory.md` -- TEST_INVENTORY.md format contract
|
|
13
|
-
</required_reading>
|
|
14
|
-
|
|
15
|
-
<process>
|
|
16
|
-
|
|
17
|
-
<step name="parse_arguments">
|
|
18
|
-
## Step 1: Parse Arguments
|
|
19
|
-
|
|
20
|
-
Parse `$ARGUMENTS` for both repository paths. Both are required for gap analysis.
|
|
21
|
-
|
|
22
|
-
**Supported arguments:**
|
|
23
|
-
- `--dev-repo <path>` -- Path to the developer repository (required)
|
|
24
|
-
- `--qa-repo <path>` -- Path to the existing QA test repository (required)
|
|
25
|
-
|
|
26
|
-
**Parsing logic:**
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
DEV_REPO=""
|
|
30
|
-
QA_REPO=""
|
|
31
|
-
|
|
32
|
-
# Parse --dev-repo and --qa-repo from $ARGUMENTS
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**Validation:**
|
|
36
|
-
|
|
37
|
-
If `--dev-repo` is missing or empty:
|
|
38
|
-
```
|
|
39
|
-
Error: --dev-repo is required for gap analysis.
|
|
40
|
-
Usage: /qa-gap --dev-repo <path> --qa-repo <path>
|
|
41
|
-
```
|
|
42
|
-
STOP.
|
|
43
|
-
|
|
44
|
-
If `--qa-repo` is missing or empty:
|
|
45
|
-
```
|
|
46
|
-
Error: --qa-repo is required for gap analysis.
|
|
47
|
-
Usage: /qa-gap --dev-repo <path> --qa-repo <path>
|
|
48
|
-
|
|
49
|
-
To analyze a dev repo without an existing QA repo, use /qa-analyze instead.
|
|
50
|
-
```
|
|
51
|
-
STOP.
|
|
52
|
-
|
|
53
|
-
If `--dev-repo` path does not exist:
|
|
54
|
-
```
|
|
55
|
-
Error: Dev repo path does not exist: {path}
|
|
56
|
-
```
|
|
57
|
-
STOP.
|
|
58
|
-
|
|
59
|
-
If `--qa-repo` path does not exist:
|
|
60
|
-
```
|
|
61
|
-
Error: QA repo path does not exist: {path}
|
|
62
|
-
```
|
|
63
|
-
STOP.
|
|
64
|
-
</step>
|
|
65
|
-
|
|
66
|
-
<step name="setup_output">
|
|
67
|
-
## Step 2: Setup Output Directory
|
|
68
|
-
|
|
69
|
-
Create the output directory and print the gap analysis banner.
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
OUTPUT_DIR=".qa-output"
|
|
73
|
-
mkdir -p "${OUTPUT_DIR}"
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Print banner:**
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
=== QA Gap Analysis ===
|
|
80
|
-
Dev Repo: {DEV_REPO}
|
|
81
|
-
QA Repo: {QA_REPO}
|
|
82
|
-
Output: {OUTPUT_DIR}
|
|
83
|
-
========================
|
|
84
|
-
```
|
|
85
|
-
</step>
|
|
86
|
-
|
|
87
|
-
<step name="scan_both_repos">
|
|
88
|
-
## Step 3: Spawn Scanner Agent on Both Repos
|
|
89
|
-
|
|
90
|
-
Spawn the scanner agent to scan both the developer and QA repositories, producing a combined SCAN_MANIFEST.md.
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
Task(
|
|
94
|
-
prompt="
|
|
95
|
-
<objective>Scan both developer and QA repositories and produce SCAN_MANIFEST.md with combined file trees</objective>
|
|
96
|
-
<execution_context>@agents/qaa-scanner.md</execution_context>
|
|
97
|
-
<files_to_read>
|
|
98
|
-
- CLAUDE.md
|
|
99
|
-
</files_to_read>
|
|
100
|
-
<parameters>
|
|
101
|
-
dev_repo_path: {DEV_REPO}
|
|
102
|
-
qa_repo_path: {QA_REPO}
|
|
103
|
-
output_path: {OUTPUT_DIR}/SCAN_MANIFEST.md
|
|
104
|
-
</parameters>
|
|
105
|
-
"
|
|
106
|
-
)
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
**Handle scanner return:**
|
|
110
|
-
|
|
111
|
-
- If scanner returns `decision: STOP` -- print the stop reason and STOP.
|
|
112
|
-
- If scanner returns `decision: PROCEED` -- continue.
|
|
113
|
-
- Extract `has_frontend` for summary reporting.
|
|
114
|
-
|
|
115
|
-
**Verify SCAN_MANIFEST.md exists:**
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
[ -f "${OUTPUT_DIR}/SCAN_MANIFEST.md" ] && echo "FOUND" || echo "MISSING"
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
If missing, print error and STOP.
|
|
122
|
-
</step>
|
|
123
|
-
|
|
124
|
-
<step name="run_gap_analysis">
|
|
125
|
-
## Step 4: Spawn Analyzer Agent in Gap Mode
|
|
126
|
-
|
|
127
|
-
Spawn the analyzer agent in gap analysis mode to compare dev repo testable surfaces against QA repo test coverage.
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
Task(
|
|
131
|
-
prompt="
|
|
132
|
-
<objective>Perform gap analysis comparing dev repo testable surfaces against QA repo test coverage. Produce QA_ANALYSIS.md, TEST_INVENTORY.md, and GAP_ANALYSIS.md.</objective>
|
|
133
|
-
<execution_context>@agents/qaa-analyzer.md</execution_context>
|
|
134
|
-
<files_to_read>
|
|
135
|
-
- {OUTPUT_DIR}/SCAN_MANIFEST.md
|
|
136
|
-
- CLAUDE.md
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
**
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
|
300
|
-
|
|
301
|
-
|
|
|
302
|
-
|
|
|
303
|
-
|
|
1
|
+
<purpose>
|
|
2
|
+
Compare a developer repository against a QA repository to identify coverage gaps, broken tests, quality issues, and missing test cases. Scans both repositories, performs gap analysis, and produces a comprehensive GAP_ANALYSIS.md with coverage maps, missing test inventories, broken test diagnostics, and quality assessments. Both --dev-repo and --qa-repo paths are required. Use this workflow when a QA repo already exists but may have incomplete coverage or quality issues.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
- `CLAUDE.md` -- QA automation standards, pipeline stages, module boundaries, verification commands, quality gates
|
|
7
|
+
- `agents/qaa-scanner.md` -- Scanner agent definition (scans both dev and QA repos)
|
|
8
|
+
- `agents/qaa-analyzer.md` -- Analyzer agent definition (gap mode produces GAP_ANALYSIS.md)
|
|
9
|
+
- `templates/scan-manifest.md` -- SCAN_MANIFEST.md format contract
|
|
10
|
+
- `templates/gap-analysis.md` -- GAP_ANALYSIS.md format contract
|
|
11
|
+
- `templates/qa-analysis.md` -- QA_ANALYSIS.md format contract
|
|
12
|
+
- `templates/test-inventory.md` -- TEST_INVENTORY.md format contract
|
|
13
|
+
</required_reading>
|
|
14
|
+
|
|
15
|
+
<process>
|
|
16
|
+
|
|
17
|
+
<step name="parse_arguments">
|
|
18
|
+
## Step 1: Parse Arguments
|
|
19
|
+
|
|
20
|
+
Parse `$ARGUMENTS` for both repository paths. Both are required for gap analysis.
|
|
21
|
+
|
|
22
|
+
**Supported arguments:**
|
|
23
|
+
- `--dev-repo <path>` -- Path to the developer repository (required)
|
|
24
|
+
- `--qa-repo <path>` -- Path to the existing QA test repository (required)
|
|
25
|
+
|
|
26
|
+
**Parsing logic:**
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
DEV_REPO=""
|
|
30
|
+
QA_REPO=""
|
|
31
|
+
|
|
32
|
+
# Parse --dev-repo and --qa-repo from $ARGUMENTS
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Validation:**
|
|
36
|
+
|
|
37
|
+
If `--dev-repo` is missing or empty:
|
|
38
|
+
```
|
|
39
|
+
Error: --dev-repo is required for gap analysis.
|
|
40
|
+
Usage: /qa-gap --dev-repo <path> --qa-repo <path>
|
|
41
|
+
```
|
|
42
|
+
STOP.
|
|
43
|
+
|
|
44
|
+
If `--qa-repo` is missing or empty:
|
|
45
|
+
```
|
|
46
|
+
Error: --qa-repo is required for gap analysis.
|
|
47
|
+
Usage: /qa-gap --dev-repo <path> --qa-repo <path>
|
|
48
|
+
|
|
49
|
+
To analyze a dev repo without an existing QA repo, use /qa-analyze instead.
|
|
50
|
+
```
|
|
51
|
+
STOP.
|
|
52
|
+
|
|
53
|
+
If `--dev-repo` path does not exist:
|
|
54
|
+
```
|
|
55
|
+
Error: Dev repo path does not exist: {path}
|
|
56
|
+
```
|
|
57
|
+
STOP.
|
|
58
|
+
|
|
59
|
+
If `--qa-repo` path does not exist:
|
|
60
|
+
```
|
|
61
|
+
Error: QA repo path does not exist: {path}
|
|
62
|
+
```
|
|
63
|
+
STOP.
|
|
64
|
+
</step>
|
|
65
|
+
|
|
66
|
+
<step name="setup_output">
|
|
67
|
+
## Step 2: Setup Output Directory
|
|
68
|
+
|
|
69
|
+
Create the output directory and print the gap analysis banner.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
OUTPUT_DIR=".qa-output"
|
|
73
|
+
mkdir -p "${OUTPUT_DIR}"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Print banner:**
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
=== QA Gap Analysis ===
|
|
80
|
+
Dev Repo: {DEV_REPO}
|
|
81
|
+
QA Repo: {QA_REPO}
|
|
82
|
+
Output: {OUTPUT_DIR}
|
|
83
|
+
========================
|
|
84
|
+
```
|
|
85
|
+
</step>
|
|
86
|
+
|
|
87
|
+
<step name="scan_both_repos">
|
|
88
|
+
## Step 3: Spawn Scanner Agent on Both Repos
|
|
89
|
+
|
|
90
|
+
Spawn the scanner agent to scan both the developer and QA repositories, producing a combined SCAN_MANIFEST.md.
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
Task(
|
|
94
|
+
prompt="
|
|
95
|
+
<objective>Scan both developer and QA repositories and produce SCAN_MANIFEST.md with combined file trees</objective>
|
|
96
|
+
<execution_context>@agents/qaa-scanner.md</execution_context>
|
|
97
|
+
<files_to_read>
|
|
98
|
+
- CLAUDE.md
|
|
99
|
+
</files_to_read>
|
|
100
|
+
<parameters>
|
|
101
|
+
dev_repo_path: {DEV_REPO}
|
|
102
|
+
qa_repo_path: {QA_REPO}
|
|
103
|
+
output_path: {OUTPUT_DIR}/SCAN_MANIFEST.md
|
|
104
|
+
</parameters>
|
|
105
|
+
"
|
|
106
|
+
)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Handle scanner return:**
|
|
110
|
+
|
|
111
|
+
- If scanner returns `decision: STOP` -- print the stop reason and STOP.
|
|
112
|
+
- If scanner returns `decision: PROCEED` -- continue.
|
|
113
|
+
- Extract `has_frontend` for summary reporting.
|
|
114
|
+
|
|
115
|
+
**Verify SCAN_MANIFEST.md exists:**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
[ -f "${OUTPUT_DIR}/SCAN_MANIFEST.md" ] && echo "FOUND" || echo "MISSING"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
If missing, print error and STOP.
|
|
122
|
+
</step>
|
|
123
|
+
|
|
124
|
+
<step name="run_gap_analysis">
|
|
125
|
+
## Step 4: Spawn Analyzer Agent in Gap Mode
|
|
126
|
+
|
|
127
|
+
Spawn the analyzer agent in gap analysis mode to compare dev repo testable surfaces against QA repo test coverage.
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
Task(
|
|
131
|
+
prompt="
|
|
132
|
+
<objective>Perform gap analysis comparing dev repo testable surfaces against QA repo test coverage. Use codebase map for deep context and locator registry for frontend coverage assessment. Produce QA_ANALYSIS.md, TEST_INVENTORY.md, and GAP_ANALYSIS.md.</objective>
|
|
133
|
+
<execution_context>@agents/qaa-analyzer.md</execution_context>
|
|
134
|
+
<files_to_read>
|
|
135
|
+
- {OUTPUT_DIR}/SCAN_MANIFEST.md
|
|
136
|
+
- CLAUDE.md
|
|
137
|
+
- .qa-output/locators/LOCATOR_REGISTRY.md (if exists -- locator coverage for risk assessment)
|
|
138
|
+
- .qa-output/codebase/RISK_MAP.md (if exists -- business-critical paths for risk assessment)
|
|
139
|
+
- .qa-output/codebase/CRITICAL_PATHS.md (if exists -- user flows for E2E scope)
|
|
140
|
+
- .qa-output/codebase/TEST_ASSESSMENT.md (if exists -- existing test quality)
|
|
141
|
+
- .qa-output/codebase/COVERAGE_GAPS.md (if exists -- uncovered modules)
|
|
142
|
+
</files_to_read>
|
|
143
|
+
<parameters>
|
|
144
|
+
workflow_option: 2
|
|
145
|
+
qa_analysis_path: {OUTPUT_DIR}/QA_ANALYSIS.md
|
|
146
|
+
test_inventory_path: {OUTPUT_DIR}/TEST_INVENTORY.md
|
|
147
|
+
gap_analysis_path: {OUTPUT_DIR}/GAP_ANALYSIS.md
|
|
148
|
+
dev_repo_path: {DEV_REPO}
|
|
149
|
+
qa_repo_path: {QA_REPO}
|
|
150
|
+
codebase_map_dir: .qa-output/codebase
|
|
151
|
+
</parameters>
|
|
152
|
+
"
|
|
153
|
+
)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Handle analyzer return:**
|
|
157
|
+
|
|
158
|
+
Extract from the analyzer's return values:
|
|
159
|
+
- `total_test_count` -- total test cases in inventory
|
|
160
|
+
- `pyramid_breakdown` -- unit/integration/api/e2e counts
|
|
161
|
+
- `risk_count` -- high/medium/low risk counts
|
|
162
|
+
|
|
163
|
+
**Verify artifacts exist:**
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
[ -f "${OUTPUT_DIR}/QA_ANALYSIS.md" ] && echo "FOUND: QA_ANALYSIS.md" || echo "MISSING: QA_ANALYSIS.md"
|
|
167
|
+
[ -f "${OUTPUT_DIR}/TEST_INVENTORY.md" ] && echo "FOUND: TEST_INVENTORY.md" || echo "MISSING: TEST_INVENTORY.md"
|
|
168
|
+
[ -f "${OUTPUT_DIR}/GAP_ANALYSIS.md" ] && echo "FOUND: GAP_ANALYSIS.md" || echo "MISSING: GAP_ANALYSIS.md"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
If any artifact is missing, print error with the specific missing file and STOP.
|
|
172
|
+
</step>
|
|
173
|
+
|
|
174
|
+
<step name="extract_gap_metrics">
|
|
175
|
+
## Step 5: Extract Gap Metrics
|
|
176
|
+
|
|
177
|
+
Read the GAP_ANALYSIS.md to extract metrics for the summary.
|
|
178
|
+
|
|
179
|
+
**Metrics to extract:**
|
|
180
|
+
|
|
181
|
+
1. **Coverage map:**
|
|
182
|
+
- Total modules in dev repo
|
|
183
|
+
- Modules with test coverage in QA repo
|
|
184
|
+
- Modules without any test coverage
|
|
185
|
+
- Coverage percentage: `(covered_modules / total_modules) * 100`
|
|
186
|
+
|
|
187
|
+
2. **Missing tests:**
|
|
188
|
+
- Count of missing test cases by priority (P0, P1, P2)
|
|
189
|
+
- Count of missing test cases by pyramid level (unit, integration, API, E2E)
|
|
190
|
+
- Each missing test has an ID following naming convention
|
|
191
|
+
|
|
192
|
+
3. **Broken tests:**
|
|
193
|
+
- Count of existing tests that are broken (fail, import errors, outdated selectors)
|
|
194
|
+
- Each broken test has a failure reason documented
|
|
195
|
+
|
|
196
|
+
4. **Quality assessment:**
|
|
197
|
+
- Locator tier distribution (what percentage of locators are Tier 1, 2, 3, 4)
|
|
198
|
+
- Assertion quality rating (concrete vs vague assertions)
|
|
199
|
+
- POM compliance (does existing QA repo follow POM rules)
|
|
200
|
+
|
|
201
|
+
5. **Recommendations priority:**
|
|
202
|
+
- Fix broken tests first (highest priority)
|
|
203
|
+
- Add P0 missing tests
|
|
204
|
+
- Add P1 missing tests
|
|
205
|
+
- Standardize existing tests to CLAUDE.md standards
|
|
206
|
+
- Add P2 missing tests (lowest priority)
|
|
207
|
+
</step>
|
|
208
|
+
|
|
209
|
+
<step name="print_summary">
|
|
210
|
+
## Step 6: Print Gap Analysis Summary
|
|
211
|
+
|
|
212
|
+
Print a comprehensive human-readable summary.
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
=== Gap Analysis Complete ===
|
|
216
|
+
|
|
217
|
+
Coverage Overview:
|
|
218
|
+
Dev Repo Modules: {total_modules}
|
|
219
|
+
Modules with Coverage: {covered_modules}
|
|
220
|
+
Modules without Tests: {uncovered_modules}
|
|
221
|
+
Coverage Rate: {coverage_percent}%
|
|
222
|
+
|
|
223
|
+
Missing Tests:
|
|
224
|
+
P0 (blocks release): {p0_missing}
|
|
225
|
+
P1 (should fix): {p1_missing}
|
|
226
|
+
P2 (nice to have): {p2_missing}
|
|
227
|
+
--------------------------
|
|
228
|
+
Total Missing: {total_missing}
|
|
229
|
+
|
|
230
|
+
By Pyramid Level:
|
|
231
|
+
Unit: {unit_missing}
|
|
232
|
+
Integration: {integration_missing}
|
|
233
|
+
API: {api_missing}
|
|
234
|
+
E2E: {e2e_missing}
|
|
235
|
+
|
|
236
|
+
Broken Tests:
|
|
237
|
+
Total Broken: {broken_count}
|
|
238
|
+
|
|
239
|
+
Quality Assessment:
|
|
240
|
+
Locator Quality:
|
|
241
|
+
Tier 1 (data-testid, ARIA): {tier1_percent}%
|
|
242
|
+
Tier 2 (labels, text): {tier2_percent}%
|
|
243
|
+
Tier 3 (alt, title): {tier3_percent}%
|
|
244
|
+
Tier 4 (CSS, XPath): {tier4_percent}%
|
|
245
|
+
Assertion Quality: {concrete_percent}% concrete assertions
|
|
246
|
+
POM Compliance: {pom_compliant}/{pom_total} files compliant
|
|
247
|
+
|
|
248
|
+
Recommended Action Order:
|
|
249
|
+
1. Fix {broken_count} broken tests
|
|
250
|
+
2. Add {p0_missing} P0 missing tests
|
|
251
|
+
3. Add {p1_missing} P1 missing tests
|
|
252
|
+
4. Standardize existing tests
|
|
253
|
+
5. Add {p2_missing} P2 missing tests
|
|
254
|
+
|
|
255
|
+
Artifacts Produced:
|
|
256
|
+
- {OUTPUT_DIR}/SCAN_MANIFEST.md
|
|
257
|
+
- {OUTPUT_DIR}/QA_ANALYSIS.md
|
|
258
|
+
- {OUTPUT_DIR}/TEST_INVENTORY.md
|
|
259
|
+
- {OUTPUT_DIR}/GAP_ANALYSIS.md
|
|
260
|
+
|
|
261
|
+
No test files generated. No git operations performed.
|
|
262
|
+
To generate missing tests, run the full pipeline with:
|
|
263
|
+
/qa-start --dev-repo {DEV_REPO} --qa-repo {QA_REPO}
|
|
264
|
+
=============================
|
|
265
|
+
```
|
|
266
|
+
</step>
|
|
267
|
+
|
|
268
|
+
</process>
|
|
269
|
+
|
|
270
|
+
<output>
|
|
271
|
+
This workflow compares dev and QA repos to identify coverage gaps.
|
|
272
|
+
|
|
273
|
+
**Artifacts produced:**
|
|
274
|
+
|
|
275
|
+
| Artifact | When Produced | Description |
|
|
276
|
+
|----------|---------------|-------------|
|
|
277
|
+
| SCAN_MANIFEST.md | Always | Combined scan of both repos with file trees and framework detection |
|
|
278
|
+
| QA_ANALYSIS.md | Always | Architecture overview, risks, test targets, testing pyramid for the dev repo |
|
|
279
|
+
| TEST_INVENTORY.md | Always | Complete test case inventory for what SHOULD exist |
|
|
280
|
+
| GAP_ANALYSIS.md | Always | Coverage map, missing tests, broken tests, quality assessment, recommendations |
|
|
281
|
+
|
|
282
|
+
**GAP_ANALYSIS.md sections (per templates/gap-analysis.md):**
|
|
283
|
+
|
|
284
|
+
1. **Coverage Map** -- Every module from SCAN_MANIFEST.md with covered/uncovered status
|
|
285
|
+
2. **Missing Tests** -- Test cases that should exist but do not, with IDs and priorities
|
|
286
|
+
3. **Broken Tests** -- Existing tests that fail, with failure reasons and file paths
|
|
287
|
+
4. **Quality Assessment** -- Locator tier distribution, assertion quality rating, POM compliance
|
|
288
|
+
5. **Recommendations** -- Prioritized action list: fix broken first, then add P0, then P1
|
|
289
|
+
|
|
290
|
+
**No side effects:**
|
|
291
|
+
- No git branches created
|
|
292
|
+
- No git commits made
|
|
293
|
+
- No PRs created
|
|
294
|
+
- No test files generated
|
|
295
|
+
- No source files modified
|
|
296
|
+
</output>
|
|
297
|
+
|
|
298
|
+
<error_handling>
|
|
299
|
+
| Error | Cause | Action |
|
|
300
|
+
|-------|-------|--------|
|
|
301
|
+
| --dev-repo missing | Required argument not provided | Print usage with suggestion to use /qa-analyze for dev-only, STOP |
|
|
302
|
+
| --qa-repo missing | Required argument not provided | Print usage with suggestion to use /qa-analyze for dev-only, STOP |
|
|
303
|
+
| Dev repo path does not exist | Invalid path | Print error with path, STOP |
|
|
304
|
+
| QA repo path does not exist | Invalid path | Print error with path, STOP |
|
|
305
|
+
| Scanner returns STOP | No testable surfaces | Print scanner's reason, STOP |
|
|
306
|
+
| SCAN_MANIFEST.md missing | Scanner failed | Print error, STOP |
|
|
307
|
+
| GAP_ANALYSIS.md missing | Analyzer failed | Print error, STOP |
|
|
308
|
+
| Framework detection LOW confidence | Ambiguous stack | Scanner checkpoints for user confirmation |
|
|
309
|
+
</error_handling>
|