qaa-agent 1.9.1 → 1.9.5
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 +43 -22
- package/CLAUDE.md +170 -9
- package/README.md +384 -357
- package/VERSION +1 -0
- package/agents/qa-pipeline-orchestrator.md +336 -22
- package/agents/qaa-analyzer.md +0 -1
- package/agents/qaa-bug-detective.md +163 -4
- package/agents/qaa-codebase-mapper.md +50 -1
- package/agents/qaa-discovery.md +421 -384
- package/agents/qaa-e2e-runner.md +163 -1
- package/agents/qaa-executor.md +142 -1
- package/agents/qaa-planner.md +14 -1
- package/agents/qaa-project-researcher.md +194 -0
- package/agents/qaa-scanner.md +77 -1
- package/agents/qaa-testid-injector.md +0 -1
- package/agents/qaa-validator.md +86 -1
- package/bin/install.cjs +375 -253
- package/bin/lib/context7-cache.cjs +299 -0
- package/bin/lib/intent-detector.cjs +488 -0
- package/commands/qa-audit.md +255 -126
- package/commands/qa-create-test.md +666 -365
- package/commands/qa-fix.md +684 -513
- package/commands/qa-map.md +283 -139
- package/commands/qa-pr.md +63 -0
- package/commands/qa-research.md +181 -157
- package/commands/qa-start.md +62 -6
- package/commands/qa-test-report.md +219 -219
- 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 +7 -3
- 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 +819 -33
- package/workflows/qa-testid.md +50 -2
- package/workflows/qa-validate.md +50 -2
package/commands/qa-audit.md
CHANGED
|
@@ -1,126 +1,255 @@
|
|
|
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: First Tool Call
|
|
7
|
+
|
|
8
|
+
Before any other tool use, you **MUST** run the intent detector as your **FIRST** tool call. Do NOT explore the repo, do NOT analyze the prompt independently, do NOT make assumptions about what the user wants. Run this first:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
RESOLVED=$(node ~/.claude/qaa/bin/lib/intent-detector.cjs --resolve "$ARGUMENTS" --aliases '{"app_url":"app-url"}')
|
|
12
|
+
echo "$RESOLVED" | node -e "const j=JSON.parse(require('fs').readFileSync(0,'utf8')); console.log(j.banner)"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Pass `$ARGUMENTS` LITERALLY** — do NOT mentally translate NL to flag form. The detector handles NL parsing. If you pre-translate, the detector reports `source: flag` for everything and bypasses the confirmation checkpoint.
|
|
16
|
+
|
|
17
|
+
### After the banner appears
|
|
18
|
+
|
|
19
|
+
1. Determine `ALL_FROM_FLAGS`:
|
|
20
|
+
```bash
|
|
21
|
+
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')")
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
2. If **`IS_AUTO=false` AND `ALL_FROM_FLAGS=false`** (some values came from NL or defaults), **PAUSE and ask the user**:
|
|
25
|
+
```
|
|
26
|
+
The values above were resolved from natural language and/or defaults.
|
|
27
|
+
Do you want to continue with these inputs? (yes/no)
|
|
28
|
+
```
|
|
29
|
+
Wait for explicit user confirmation before proceeding.
|
|
30
|
+
|
|
31
|
+
3. If `IS_AUTO=true` OR `ALL_FROM_FLAGS=true`, proceed without pause.
|
|
32
|
+
|
|
33
|
+
### DO NOT
|
|
34
|
+
|
|
35
|
+
- Show a custom-format banner — use the exact output from `intent-detector.cjs`
|
|
36
|
+
- Skip the detector and parse NL in your own head
|
|
37
|
+
- Decide mode (from-aut, from-ticket, etc.) before the detector runs
|
|
38
|
+
- Make tool calls (Bash, Read, Glob) before the detector runs
|
|
39
|
+
|
|
40
|
+
### Mode detection happens AFTER the detector
|
|
41
|
+
|
|
42
|
+
Use the resolved values from `RESOLVED` (URLs, framework, paths) to determine mode. The detector's `intent.suggested_mode` already provides a heuristic.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## Usage
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
/qa-audit <path-to-tests> [options]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Options
|
|
52
|
+
|
|
53
|
+
- `<path-to-tests>` — directory containing test files to audit
|
|
54
|
+
- `--dev-repo <path>` — path to developer repository (for coverage cross-reference)
|
|
55
|
+
- `--app-url <url>` — URL of running application for locator verification via Playwright MCP
|
|
56
|
+
- `--pyramid` — pyramid analysis only: compare actual vs target distribution with action plan
|
|
57
|
+
- `--report [team|management|client]` — generate status report adapted to audience (default: team)
|
|
58
|
+
|
|
59
|
+
### Mode Detection
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
if --pyramid:
|
|
63
|
+
MODE = "pyramid" → PYRAMID_ANALYSIS.md
|
|
64
|
+
elif --report:
|
|
65
|
+
MODE = "report" → QA_STATUS_REPORT.md (adapted to audience)
|
|
66
|
+
else:
|
|
67
|
+
MODE = "audit" → QA_AUDIT_REPORT.md (full 6-dimension audit, default)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## What It Produces
|
|
71
|
+
|
|
72
|
+
| Mode | Artifact | Description |
|
|
73
|
+
|------|----------|-------------|
|
|
74
|
+
| audit | QA_AUDIT_REPORT.md | 6-dimension scoring, critical issues, recommendations with effort estimates |
|
|
75
|
+
| pyramid | PYRAMID_ANALYSIS.md | Current vs target distribution, gap table, prioritized action plan |
|
|
76
|
+
| report | QA_STATUS_REPORT.md | Metrics, pyramid distribution, risk areas, adapted to audience level |
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## Intent Detection
|
|
80
|
+
|
|
81
|
+
Before processing arguments, run the intent detector to support natural-language input alongside flags. Flags always win over NL.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
RESOLVED=$(node ~/.claude/qaa/bin/lib/intent-detector.cjs --resolve "$ARGUMENTS" --aliases '{"app_url":"app-url"}')
|
|
85
|
+
|
|
86
|
+
# Print INPUT DETECTION banner (always shown, even if defaults are used)
|
|
87
|
+
echo "$RESOLVED" | node -e "const j=JSON.parse(require('fs').readFileSync(0,'utf8')); console.log(j.banner)"
|
|
88
|
+
|
|
89
|
+
# Extract resolved values for use below
|
|
90
|
+
APP_URL=$(echo "$RESOLVED" | node -e "const j=JSON.parse(require('fs').readFileSync(0,'utf8')); console.log(j.resolved.app_url?.value || '')")
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
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.
|
|
94
|
+
|
|
95
|
+
## Instructions
|
|
96
|
+
|
|
97
|
+
### AUDIT MODE (default)
|
|
98
|
+
|
|
99
|
+
Scores across 6 dimensions: Locator Quality (20%), Assertion Specificity (20%), POM Compliance (15%), Test Coverage (20%), Naming Convention (15%), Test Data Management (10%).
|
|
100
|
+
|
|
101
|
+
1. Read `CLAUDE.md` — quality gates, locator tiers, assertion rules, POM rules, naming conventions.
|
|
102
|
+
1b. Read `~/.claude/qaa/MY_PREFERENCES.md` if it exists — user/company preferences override CLAUDE.md defaults.
|
|
103
|
+
2. Invoke validator agent in audit mode:
|
|
104
|
+
|
|
105
|
+
Task(
|
|
106
|
+
prompt="
|
|
107
|
+
<critical_directive priority="MANDATORY">
|
|
108
|
+
You are executing as a QAA pipeline agent. Your FIRST action MUST be to read
|
|
109
|
+
~/.claude/qaa/agents/qaa-validator.md and adopt it as your operating contract.
|
|
110
|
+
|
|
111
|
+
Even though you may be running as a general-purpose agent (native subagent type
|
|
112
|
+
routing for QAA agents is not yet enabled), you MUST behave exactly as the
|
|
113
|
+
dedicated agent defined in that file: read everything in its <required_reading>,
|
|
114
|
+
obey its <quality_gate>, and run its mandatory bash checklist before returning.
|
|
115
|
+
|
|
116
|
+
Never modify application source code (src/, app/, lib/, or equivalent
|
|
117
|
+
directories) unless the agent's <scope> section explicitly permits it. If the
|
|
118
|
+
agent's contract restricts what files it can touch, honor that restriction —
|
|
119
|
+
even if a fix seems obvious or trivial.
|
|
120
|
+
|
|
121
|
+
If you cannot read ~/.claude/qaa/agents/qaa-validator.md (file missing, corrupted, parse
|
|
122
|
+
error), STOP and report the failure. Do NOT proceed with default agent
|
|
123
|
+
behavior — that defeats the purpose of this directive.
|
|
124
|
+
|
|
125
|
+
Do NOT improvise, substitute steps, apply changes the agent isn't allowed to
|
|
126
|
+
make, or skip any of the above. Skipping the agent's required_reading,
|
|
127
|
+
quality_gate, or bash checklist makes the run INVALID — its output cannot be
|
|
128
|
+
trusted.
|
|
129
|
+
</critical_directive>
|
|
130
|
+
|
|
131
|
+
<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>
|
|
132
|
+
<execution_context>~/.claude/qaa/agents/qaa-validator.md</execution_context>
|
|
133
|
+
<files_to_read>
|
|
134
|
+
- CLAUDE.md
|
|
135
|
+
- ~/.claude/qaa/MY_PREFERENCES.md (if exists)
|
|
136
|
+
- .qa-output/locators/LOCATOR_REGISTRY.md (if exists)
|
|
137
|
+
</files_to_read>
|
|
138
|
+
<parameters>
|
|
139
|
+
user_input: $ARGUMENTS
|
|
140
|
+
mode: audit
|
|
141
|
+
app_url: {auto-detect from test config baseURL, or ask user}
|
|
142
|
+
</parameters>
|
|
143
|
+
"
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
3. Present results with overall score and prioritized recommendations.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### PYRAMID MODE (`--pyramid`)
|
|
151
|
+
|
|
152
|
+
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.
|
|
153
|
+
|
|
154
|
+
1. Read `CLAUDE.md` — testing pyramid target percentages.
|
|
155
|
+
1b. Read `~/.claude/qaa/MY_PREFERENCES.md` if it exists — user/company preferences override CLAUDE.md defaults.
|
|
156
|
+
2. Invoke analyzer agent for pyramid analysis:
|
|
157
|
+
|
|
158
|
+
Task(
|
|
159
|
+
prompt="
|
|
160
|
+
<critical_directive priority="MANDATORY">
|
|
161
|
+
You are executing as a QAA pipeline agent. Your FIRST action MUST be to read
|
|
162
|
+
~/.claude/qaa/agents/qaa-analyzer.md and adopt it as your operating contract.
|
|
163
|
+
|
|
164
|
+
Even though you may be running as a general-purpose agent (native subagent type
|
|
165
|
+
routing for QAA agents is not yet enabled), you MUST behave exactly as the
|
|
166
|
+
dedicated agent defined in that file: read everything in its <required_reading>,
|
|
167
|
+
obey its <quality_gate>, and run its mandatory bash checklist before returning.
|
|
168
|
+
|
|
169
|
+
Never modify application source code (src/, app/, lib/, or equivalent
|
|
170
|
+
directories) unless the agent's <scope> section explicitly permits it. If the
|
|
171
|
+
agent's contract restricts what files it can touch, honor that restriction —
|
|
172
|
+
even if a fix seems obvious or trivial.
|
|
173
|
+
|
|
174
|
+
If you cannot read ~/.claude/qaa/agents/qaa-analyzer.md (file missing, corrupted, parse
|
|
175
|
+
error), STOP and report the failure. Do NOT proceed with default agent
|
|
176
|
+
behavior — that defeats the purpose of this directive.
|
|
177
|
+
|
|
178
|
+
Do NOT improvise, substitute steps, apply changes the agent isn't allowed to
|
|
179
|
+
make, or skip any of the above. Skipping the agent's required_reading,
|
|
180
|
+
quality_gate, or bash checklist makes the run INVALID — its output cannot be
|
|
181
|
+
trusted.
|
|
182
|
+
</critical_directive>
|
|
183
|
+
|
|
184
|
+
<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>
|
|
185
|
+
<execution_context>~/.claude/qaa/agents/qaa-analyzer.md</execution_context>
|
|
186
|
+
<files_to_read>
|
|
187
|
+
- CLAUDE.md
|
|
188
|
+
- ~/.claude/qaa/MY_PREFERENCES.md (if exists)
|
|
189
|
+
</files_to_read>
|
|
190
|
+
<parameters>
|
|
191
|
+
user_input: $ARGUMENTS
|
|
192
|
+
mode: pyramid-analysis
|
|
193
|
+
</parameters>
|
|
194
|
+
"
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
3. Present analysis with gap table and action plan.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
### REPORT MODE (`--report`)
|
|
202
|
+
|
|
203
|
+
Generate a summary report of current QA status. Adapts detail level to audience.
|
|
204
|
+
|
|
205
|
+
**Audience levels:**
|
|
206
|
+
- `team` (default) — file-level details, specific locator/assertion issues, technical recommendations
|
|
207
|
+
- `management` — high-level metrics, risk areas, coverage percentages, trend indicators
|
|
208
|
+
- `client` — coverage summary, confidence level, test pass rates, risk mitigation status
|
|
209
|
+
|
|
210
|
+
1. Read `CLAUDE.md` — testing pyramid targets, quality gates.
|
|
211
|
+
1b. Read `~/.claude/qaa/MY_PREFERENCES.md` if it exists — user/company preferences override CLAUDE.md defaults.
|
|
212
|
+
2. Invoke analyzer agent for status reporting:
|
|
213
|
+
|
|
214
|
+
Task(
|
|
215
|
+
prompt="
|
|
216
|
+
<critical_directive priority="MANDATORY">
|
|
217
|
+
You are executing as a QAA pipeline agent. Your FIRST action MUST be to read
|
|
218
|
+
~/.claude/qaa/agents/qaa-analyzer.md and adopt it as your operating contract.
|
|
219
|
+
|
|
220
|
+
Even though you may be running as a general-purpose agent (native subagent type
|
|
221
|
+
routing for QAA agents is not yet enabled), you MUST behave exactly as the
|
|
222
|
+
dedicated agent defined in that file: read everything in its <required_reading>,
|
|
223
|
+
obey its <quality_gate>, and run its mandatory bash checklist before returning.
|
|
224
|
+
|
|
225
|
+
Never modify application source code (src/, app/, lib/, or equivalent
|
|
226
|
+
directories) unless the agent's <scope> section explicitly permits it. If the
|
|
227
|
+
agent's contract restricts what files it can touch, honor that restriction —
|
|
228
|
+
even if a fix seems obvious or trivial.
|
|
229
|
+
|
|
230
|
+
If you cannot read ~/.claude/qaa/agents/qaa-analyzer.md (file missing, corrupted, parse
|
|
231
|
+
error), STOP and report the failure. Do NOT proceed with default agent
|
|
232
|
+
behavior — that defeats the purpose of this directive.
|
|
233
|
+
|
|
234
|
+
Do NOT improvise, substitute steps, apply changes the agent isn't allowed to
|
|
235
|
+
make, or skip any of the above. Skipping the agent's required_reading,
|
|
236
|
+
quality_gate, or bash checklist makes the run INVALID — its output cannot be
|
|
237
|
+
trusted.
|
|
238
|
+
</critical_directive>
|
|
239
|
+
|
|
240
|
+
<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>
|
|
241
|
+
<execution_context>~/.claude/qaa/agents/qaa-analyzer.md</execution_context>
|
|
242
|
+
<files_to_read>
|
|
243
|
+
- CLAUDE.md
|
|
244
|
+
- ~/.claude/qaa/MY_PREFERENCES.md (if exists)
|
|
245
|
+
</files_to_read>
|
|
246
|
+
<parameters>
|
|
247
|
+
user_input: $ARGUMENTS
|
|
248
|
+
mode: status-report
|
|
249
|
+
</parameters>
|
|
250
|
+
"
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
3. Present report to user.
|
|
254
|
+
|
|
255
|
+
$ARGUMENTS
|