qaa-agent 1.9.2 → 1.9.6
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/CHANGELOG.md +230 -179
- package/CLAUDE.md +720 -557
- package/README.md +384 -357
- package/VERSION +1 -1
- package/agents/qa-pipeline-orchestrator.md +1739 -1425
- package/agents/qaa-analyzer.md +0 -1
- package/agents/qaa-bug-detective.md +792 -655
- package/agents/qaa-codebase-mapper.md +54 -1
- package/agents/qaa-discovery.md +431 -384
- package/agents/qaa-e2e-runner.md +717 -577
- package/agents/qaa-executor.md +966 -830
- package/agents/qaa-planner.md +14 -1
- package/agents/qaa-project-researcher.md +539 -400
- package/agents/qaa-scanner.md +86 -1
- package/agents/qaa-testid-injector.md +0 -1
- package/agents/qaa-validator.md +86 -1
- package/bin/install.cjs +374 -252
- package/bin/lib/context7-cache.cjs +299 -0
- package/bin/lib/intent-detector.cjs +490 -0
- package/commands/qa-audit.md +269 -126
- package/commands/qa-create-test-ado.md +439 -404
- package/commands/qa-create-test.md +672 -365
- package/commands/qa-fix.md +691 -513
- package/commands/qa-map.md +319 -139
- package/commands/qa-pr.md +63 -0
- package/commands/qa-research.md +212 -157
- package/commands/qa-start.md +62 -6
- package/commands/qa-test-report.md +254 -219
- package/commands/qa-testid.md +31 -0
- package/frameworks/cypress.json +54 -0
- package/frameworks/jest.json +59 -0
- package/frameworks/playwright.json +58 -0
- package/frameworks/pytest.json +59 -0
- package/frameworks/robot-framework.json +54 -0
- package/frameworks/selenium.json +65 -0
- package/frameworks/vitest.json +57 -0
- package/package.json +41 -38
- package/workflows/qa-analyze.md +100 -4
- package/workflows/qa-from-ticket.md +50 -2
- package/workflows/qa-gap.md +50 -2
- package/workflows/qa-start.md +2048 -1405
- package/workflows/qa-testid.md +50 -2
- package/workflows/qa-validate.md +50 -2
package/commands/qa-audit.md
CHANGED
|
@@ -1,126 +1,269 @@
|
|
|
1
|
-
# QA Audit & Report
|
|
2
|
-
|
|
3
|
-
Comprehensive quality audit of a test suite with 6-dimension scoring, testing pyramid analysis, and status reporting. Supports three output modes: full audit, pyramid analysis only, or status report adapted to audience.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
1
|
+
# QA Audit & Report
|
|
2
|
+
|
|
3
|
+
Comprehensive quality audit of a test suite with 6-dimension scoring, testing pyramid analysis, and status reporting. Supports three output modes: full audit, pyramid analysis only, or status report adapted to audience.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## ⚠ MANDATORY: How to Execute This Command
|
|
7
|
+
|
|
8
|
+
Execute these steps IN ORDER. Every step is mandatory. Do NOT improvise,
|
|
9
|
+
reorder, skip, or invent steps.
|
|
10
|
+
|
|
11
|
+
1. FIRST tool call: run the intent detector with `$ARGUMENTS` passed LITERALLY
|
|
12
|
+
(the actual command lives in the "## Intent Detection" section below).
|
|
13
|
+
2. Print the INPUT DETECTION banner (exact output from intent-detector.cjs). Do
|
|
14
|
+
NOT show a custom-format banner.
|
|
15
|
+
3. Determine `ALL_FROM_FLAGS`. If interactive (`IS_AUTO=false`) AND any value
|
|
16
|
+
came from NL/default (`ALL_FROM_FLAGS=false`), PAUSE for yes/no confirmation.
|
|
17
|
+
Do NOT proceed without it.
|
|
18
|
+
```bash
|
|
19
|
+
ALL_FROM_FLAGS=$(echo "$RESOLVED" | node -e "const j=JSON.parse(require('fs').readFileSync(0,'utf8')); const sources=Object.values(j.resolved).map(v=>v.source); console.log(sources.length>0 && sources.every(s=>s==='flag') ? 'true' : 'false')")
|
|
20
|
+
```
|
|
21
|
+
Pause prompt (when applicable):
|
|
22
|
+
```
|
|
23
|
+
The values above were resolved from natural language and/or defaults.
|
|
24
|
+
Do you want to continue with these inputs? (yes/no)
|
|
25
|
+
```
|
|
26
|
+
4. Determine MODE from the resolved values (not from your own NL parsing):
|
|
27
|
+
`--pyramid` → PYRAMID MODE, `--report` → REPORT MODE, otherwise AUDIT MODE.
|
|
28
|
+
5. Read `CLAUDE.md` and `~/.claude/qaa/MY_PREFERENCES.md` (if it exists) before
|
|
29
|
+
invoking any agent.
|
|
30
|
+
6. Execute the mode's flow IN ORDER (see "## Instructions"). Every mode invokes
|
|
31
|
+
its sub-agent via Task() with the `<critical_directive>` block — AUDIT MODE
|
|
32
|
+
spawns the validator; PYRAMID and REPORT MODE spawn the analyzer. Do NOT run
|
|
33
|
+
the audit/analysis inline; always go through the sub-agent. Present results
|
|
34
|
+
only after the agent returns.
|
|
35
|
+
|
|
36
|
+
### DO NOT
|
|
37
|
+
- Skip the INPUT DETECTION banner, or show a custom-format banner
|
|
38
|
+
- Run AskUserQuestion, Bash, Read, or Glob before the intent detector
|
|
39
|
+
- Decide the mode before the detector runs, or from your own NL parsing
|
|
40
|
+
- Run the audit/pyramid/report analysis inline instead of spawning the sub-agent
|
|
41
|
+
- Invent steps not in this command, or reorder the ones that are
|
|
42
|
+
- Assume path, app URL, or any value from a previous command invocation — each
|
|
43
|
+
/qa-audit call is self-contained
|
|
44
|
+
|
|
45
|
+
If you find yourself improvising, presenting results before the agent returns,
|
|
46
|
+
or asking questions out of order — STOP and restart from step 1.
|
|
47
|
+
|
|
48
|
+
### Pass user input literally to the intent detector
|
|
49
|
+
|
|
50
|
+
When you run the intent detector with `$ARGUMENTS`, substitute that placeholder
|
|
51
|
+
with the RAW user input as received, NOT a pre-translated flag string. If you
|
|
52
|
+
pre-translate, the detector reports every value as `source: flag`, sets
|
|
53
|
+
`ALL_FROM_FLAGS=true`, and bypasses the confirmation checkpoint.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
/qa-audit <path-to-tests> [options]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Options
|
|
63
|
+
|
|
64
|
+
- `<path-to-tests>` — directory containing test files to audit
|
|
65
|
+
- `--dev-repo <path>` — path to developer repository (for coverage cross-reference)
|
|
66
|
+
- `--app-url <url>` — URL of running application for locator verification via Playwright MCP
|
|
67
|
+
- `--pyramid` — pyramid analysis only: compare actual vs target distribution with action plan
|
|
68
|
+
- `--report [team|management|client]` — generate status report adapted to audience (default: team)
|
|
69
|
+
|
|
70
|
+
### Mode Detection
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
if --pyramid:
|
|
74
|
+
MODE = "pyramid" → PYRAMID_ANALYSIS.md
|
|
75
|
+
elif --report:
|
|
76
|
+
MODE = "report" → QA_STATUS_REPORT.md (adapted to audience)
|
|
77
|
+
else:
|
|
78
|
+
MODE = "audit" → QA_AUDIT_REPORT.md (full 6-dimension audit, default)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## What It Produces
|
|
82
|
+
|
|
83
|
+
| Mode | Artifact | Description |
|
|
84
|
+
|------|----------|-------------|
|
|
85
|
+
| audit | QA_AUDIT_REPORT.md | 6-dimension scoring, critical issues, recommendations with effort estimates |
|
|
86
|
+
| pyramid | PYRAMID_ANALYSIS.md | Current vs target distribution, gap table, prioritized action plan |
|
|
87
|
+
| report | QA_STATUS_REPORT.md | Metrics, pyramid distribution, risk areas, adapted to audience level |
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## Intent Detection
|
|
91
|
+
|
|
92
|
+
Before processing arguments, run the intent detector to support natural-language input alongside flags. Flags always win over NL.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
RESOLVED=$(node ~/.claude/qaa/bin/lib/intent-detector.cjs --resolve "$ARGUMENTS" --aliases '{"app_url":"app-url","dev_repo":"dev-repo"}')
|
|
96
|
+
|
|
97
|
+
# Print INPUT DETECTION banner (always shown, even if defaults are used)
|
|
98
|
+
echo "$RESOLVED" | node -e "const j=JSON.parse(require('fs').readFileSync(0,'utf8')); console.log(j.banner)"
|
|
99
|
+
|
|
100
|
+
# Extract resolved values for use below
|
|
101
|
+
APP_URL=$(echo "$RESOLVED" | node -e "const j=JSON.parse(require('fs').readFileSync(0,'utf8')); console.log(j.resolved.app_url?.value || '')")
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
If you see values you didn't intend in the banner above (interactive mode), you can press Ctrl-C and re-run with explicit flags.
|
|
105
|
+
|
|
106
|
+
## Instructions
|
|
107
|
+
|
|
108
|
+
### AUDIT MODE (default)
|
|
109
|
+
|
|
110
|
+
Scores across 6 dimensions: Locator Quality (20%), Assertion Specificity (20%), POM Compliance (15%), Test Coverage (20%), Naming Convention (15%), Test Data Management (10%).
|
|
111
|
+
|
|
112
|
+
1. Read `CLAUDE.md` — quality gates, locator tiers, assertion rules, POM rules, naming conventions.
|
|
113
|
+
1b. Read `~/.claude/qaa/MY_PREFERENCES.md` if it exists — user/company preferences override CLAUDE.md defaults.
|
|
114
|
+
2. Invoke validator agent in audit mode:
|
|
115
|
+
|
|
116
|
+
Task(
|
|
117
|
+
subagent_type="qaa-validator",
|
|
118
|
+
prompt="
|
|
119
|
+
<critical_directive priority="MANDATORY">
|
|
120
|
+
You are executing as a QAA pipeline agent. Your FIRST action MUST be to read
|
|
121
|
+
~/.claude/qaa/agents/qaa-validator.md and adopt it as your operating contract.
|
|
122
|
+
|
|
123
|
+
Even though you may be running as a general-purpose agent (native subagent type
|
|
124
|
+
routing for QAA agents is not yet enabled), you MUST behave exactly as the
|
|
125
|
+
dedicated agent defined in that file: read everything in its <required_reading>,
|
|
126
|
+
obey its <quality_gate>, and run its mandatory bash checklist before returning.
|
|
127
|
+
|
|
128
|
+
Never modify application source code (src/, app/, lib/, or equivalent
|
|
129
|
+
directories) unless the agent's <scope> section explicitly permits it. If the
|
|
130
|
+
agent's contract restricts what files it can touch, honor that restriction —
|
|
131
|
+
even if a fix seems obvious or trivial.
|
|
132
|
+
|
|
133
|
+
If you cannot read ~/.claude/qaa/agents/qaa-validator.md (file missing, corrupted, parse
|
|
134
|
+
error), STOP and report the failure. Do NOT proceed with default agent
|
|
135
|
+
behavior — that defeats the purpose of this directive.
|
|
136
|
+
|
|
137
|
+
Do NOT improvise, substitute steps, apply changes the agent isn't allowed to
|
|
138
|
+
make, or skip any of the above. Skipping the agent's required_reading,
|
|
139
|
+
quality_gate, or bash checklist makes the run INVALID — its output cannot be
|
|
140
|
+
trusted.
|
|
141
|
+
</critical_directive>
|
|
142
|
+
|
|
143
|
+
<objective>Audit test suite quality and produce QA_AUDIT_REPORT.md with 6-dimension scoring. If Playwright MCP is connected and an app URL is available, verify E2E test locators against the live DOM via browser_navigate + browser_snapshot. Flag stale locators (Tier 4 CSS/XPath that could be upgraded to Tier 1 data-testid) and locators that no longer match any DOM element.</objective>
|
|
144
|
+
<execution_context>~/.claude/qaa/agents/qaa-validator.md</execution_context>
|
|
145
|
+
<files_to_read>
|
|
146
|
+
- CLAUDE.md
|
|
147
|
+
- ~/.claude/qaa/MY_PREFERENCES.md (if exists)
|
|
148
|
+
- .qa-output/locators/LOCATOR_REGISTRY.md (if exists)
|
|
149
|
+
</files_to_read>
|
|
150
|
+
<parameters>
|
|
151
|
+
user_input: $ARGUMENTS
|
|
152
|
+
mode: audit
|
|
153
|
+
app_url: {auto-detect from test config baseURL, or ask user}
|
|
154
|
+
</parameters>
|
|
155
|
+
"
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
3. Present results with overall score and prioritized recommendations.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### PYRAMID MODE (`--pyramid`)
|
|
163
|
+
|
|
164
|
+
Analyze test distribution against the ideal testing pyramid from CLAUDE.md (Unit 60-70%, Integration 10-15%, API 20-25%, E2E 3-5%). Compares actual percentages to targets and produces an action plan.
|
|
165
|
+
|
|
166
|
+
1. Read `CLAUDE.md` — testing pyramid target percentages.
|
|
167
|
+
1b. Read `~/.claude/qaa/MY_PREFERENCES.md` if it exists — user/company preferences override CLAUDE.md defaults.
|
|
168
|
+
2. Invoke analyzer agent for pyramid analysis:
|
|
169
|
+
|
|
170
|
+
Task(
|
|
171
|
+
subagent_type="qaa-analyzer",
|
|
172
|
+
prompt="
|
|
173
|
+
<critical_directive priority="MANDATORY">
|
|
174
|
+
You are executing as a QAA pipeline agent. Your FIRST action MUST be to read
|
|
175
|
+
~/.claude/qaa/agents/qaa-analyzer.md and adopt it as your operating contract.
|
|
176
|
+
|
|
177
|
+
Even though you may be running as a general-purpose agent (native subagent type
|
|
178
|
+
routing for QAA agents is not yet enabled), you MUST behave exactly as the
|
|
179
|
+
dedicated agent defined in that file: read everything in its <required_reading>,
|
|
180
|
+
obey its <quality_gate>, and run its mandatory bash checklist before returning.
|
|
181
|
+
|
|
182
|
+
Never modify application source code (src/, app/, lib/, or equivalent
|
|
183
|
+
directories) unless the agent's <scope> section explicitly permits it. If the
|
|
184
|
+
agent's contract restricts what files it can touch, honor that restriction —
|
|
185
|
+
even if a fix seems obvious or trivial.
|
|
186
|
+
|
|
187
|
+
If you cannot read ~/.claude/qaa/agents/qaa-analyzer.md (file missing, corrupted, parse
|
|
188
|
+
error), STOP and report the failure. Do NOT proceed with default agent
|
|
189
|
+
behavior — that defeats the purpose of this directive.
|
|
190
|
+
|
|
191
|
+
Do NOT improvise, substitute steps, apply changes the agent isn't allowed to
|
|
192
|
+
make, or skip any of the above. Skipping the agent's required_reading,
|
|
193
|
+
quality_gate, or bash checklist makes the run INVALID — its output cannot be
|
|
194
|
+
trusted.
|
|
195
|
+
</critical_directive>
|
|
196
|
+
|
|
197
|
+
<objective>Produce PYRAMID_ANALYSIS.md comparing actual test distribution to target pyramid. Count tests by type (unit, integration, API, E2E), calculate percentages, compare to CLAUDE.md targets, identify gaps, and produce a prioritized action plan to reach the recommended distribution. Adjust target percentages based on the actual app architecture.</objective>
|
|
198
|
+
<execution_context>~/.claude/qaa/agents/qaa-analyzer.md</execution_context>
|
|
199
|
+
<files_to_read>
|
|
200
|
+
- CLAUDE.md
|
|
201
|
+
- ~/.claude/qaa/MY_PREFERENCES.md (if exists)
|
|
202
|
+
</files_to_read>
|
|
203
|
+
<parameters>
|
|
204
|
+
user_input: $ARGUMENTS
|
|
205
|
+
mode: pyramid-analysis
|
|
206
|
+
</parameters>
|
|
207
|
+
"
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
3. Present analysis with gap table and action plan.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### REPORT MODE (`--report`)
|
|
215
|
+
|
|
216
|
+
Generate a summary report of current QA status. Adapts detail level to audience.
|
|
217
|
+
|
|
218
|
+
**Audience levels:**
|
|
219
|
+
- `team` (default) — file-level details, specific locator/assertion issues, technical recommendations
|
|
220
|
+
- `management` — high-level metrics, risk areas, coverage percentages, trend indicators
|
|
221
|
+
- `client` — coverage summary, confidence level, test pass rates, risk mitigation status
|
|
222
|
+
|
|
223
|
+
1. Read `CLAUDE.md` — testing pyramid targets, quality gates.
|
|
224
|
+
1b. Read `~/.claude/qaa/MY_PREFERENCES.md` if it exists — user/company preferences override CLAUDE.md defaults.
|
|
225
|
+
2. Invoke analyzer agent for status reporting:
|
|
226
|
+
|
|
227
|
+
Task(
|
|
228
|
+
subagent_type="qaa-analyzer",
|
|
229
|
+
prompt="
|
|
230
|
+
<critical_directive priority="MANDATORY">
|
|
231
|
+
You are executing as a QAA pipeline agent. Your FIRST action MUST be to read
|
|
232
|
+
~/.claude/qaa/agents/qaa-analyzer.md and adopt it as your operating contract.
|
|
233
|
+
|
|
234
|
+
Even though you may be running as a general-purpose agent (native subagent type
|
|
235
|
+
routing for QAA agents is not yet enabled), you MUST behave exactly as the
|
|
236
|
+
dedicated agent defined in that file: read everything in its <required_reading>,
|
|
237
|
+
obey its <quality_gate>, and run its mandatory bash checklist before returning.
|
|
238
|
+
|
|
239
|
+
Never modify application source code (src/, app/, lib/, or equivalent
|
|
240
|
+
directories) unless the agent's <scope> section explicitly permits it. If the
|
|
241
|
+
agent's contract restricts what files it can touch, honor that restriction —
|
|
242
|
+
even if a fix seems obvious or trivial.
|
|
243
|
+
|
|
244
|
+
If you cannot read ~/.claude/qaa/agents/qaa-analyzer.md (file missing, corrupted, parse
|
|
245
|
+
error), STOP and report the failure. Do NOT proceed with default agent
|
|
246
|
+
behavior — that defeats the purpose of this directive.
|
|
247
|
+
|
|
248
|
+
Do NOT improvise, substitute steps, apply changes the agent isn't allowed to
|
|
249
|
+
make, or skip any of the above. Skipping the agent's required_reading,
|
|
250
|
+
quality_gate, or bash checklist makes the run INVALID — its output cannot be
|
|
251
|
+
trusted.
|
|
252
|
+
</critical_directive>
|
|
253
|
+
|
|
254
|
+
<objective>Produce QA_STATUS_REPORT.md with current test suite metrics and coverage. Adapt detail level to the specified audience: team (file-level technical details), management (high-level metrics and risks), or client (coverage summary and confidence). Include testing pyramid distribution, pass/fail rates, risk areas, and actionable recommendations appropriate for the audience.</objective>
|
|
255
|
+
<execution_context>~/.claude/qaa/agents/qaa-analyzer.md</execution_context>
|
|
256
|
+
<files_to_read>
|
|
257
|
+
- CLAUDE.md
|
|
258
|
+
- ~/.claude/qaa/MY_PREFERENCES.md (if exists)
|
|
259
|
+
</files_to_read>
|
|
260
|
+
<parameters>
|
|
261
|
+
user_input: $ARGUMENTS
|
|
262
|
+
mode: status-report
|
|
263
|
+
</parameters>
|
|
264
|
+
"
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
3. Present report to user.
|
|
268
|
+
|
|
269
|
+
$ARGUMENTS
|