qaa-agent 1.9.2 → 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 +206 -179
- package/CLAUDE.md +718 -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 +790 -655
- package/agents/qaa-codebase-mapper.md +50 -1
- package/agents/qaa-discovery.md +421 -384
- package/agents/qaa-e2e-runner.md +715 -577
- package/agents/qaa-executor.md +947 -830
- package/agents/qaa-planner.md +14 -1
- package/agents/qaa-project-researcher.md +533 -400
- 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 +5 -2
- 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/agents/qaa-scanner.md
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
<purpose>
|
|
2
2
|
Scan a developer repository to produce a comprehensive SCAN_MANIFEST.md. Reads the repo's file tree, package manifests, configuration files, and source code to detect framework, language, runtime, and all testable surfaces. This agent is spawned by the orchestrator as the first stage of the QA automation pipeline. It accepts a DEV repo path and an output path from the orchestrator prompt, scans the target repository, and writes a structured manifest that downstream agents (qa-analyzer, qa-testid-injector) consume without needing to re-read the source repository.
|
|
3
3
|
</purpose>
|
|
4
|
+
<framework_registry>
|
|
5
|
+
|
|
6
|
+
## Framework Registry — Source of Truth for Detection
|
|
7
|
+
|
|
8
|
+
Before performing any framework detection, read the **Framework Registry** at `frameworks/`. Each file (`frameworks/<name>.json`) contains the authoritative metadata for a supported framework: detection patterns, file extensions, conventions.
|
|
9
|
+
|
|
10
|
+
**Detection algorithm:**
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
1. List all framework files: ls frameworks/*.json
|
|
14
|
+
2. For each framework file, check:
|
|
15
|
+
a. manifest_files exist in repo (e.g., package.json)
|
|
16
|
+
b. manifest_grep matches content of manifest (e.g., "@playwright/test")
|
|
17
|
+
c. config_files exist in repo (e.g., playwright.config.ts)
|
|
18
|
+
d. file_patterns find at least one matching file
|
|
19
|
+
3. Score each framework: HIGH if manifest+config+files match; MEDIUM if 2 of 3; LOW otherwise
|
|
20
|
+
4. Return the highest-scored framework as detected_framework
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**If no framework matches:** detected_framework = null. Pipeline checkpoints for user input.
|
|
24
|
+
|
|
25
|
+
**If multiple match (mono-repo or layered testing):** return all matches with their scores. Downstream agents may need to know about both (e.g., Vitest for unit + Playwright for E2E).
|
|
26
|
+
|
|
27
|
+
The hardcoded examples and lists below are illustrative. **The registry is authoritative** — when in doubt, trust `frameworks/*.json`.
|
|
28
|
+
|
|
29
|
+
</framework_registry>
|
|
30
|
+
|
|
31
|
+
|
|
4
32
|
|
|
5
33
|
<required_reading>
|
|
6
34
|
Read these files BEFORE any scanning operation. Do NOT skip.
|
|
@@ -79,7 +107,23 @@ Detect the technology stack of the target repository using a depth-first priorit
|
|
|
79
107
|
Scan the source directory and count file extensions. Use this framework-to-file-pattern mapping:
|
|
80
108
|
|
|
81
109
|
| Stack | Primary Extensions | Identifying Patterns |
|
|
82
|
-
|
|
110
|
+
|------
|
|
111
|
+
|
|
112
|
+
<critical_directive priority="MANDATORY">
|
|
113
|
+
|
|
114
|
+
## ⚠ MANDATORY: Execute Your Bash Checklist Before Returning
|
|
115
|
+
|
|
116
|
+
Before you return control to the parent (orchestrator) agent, you **MUST** execute the `<bash_checklist>` defined at the bottom of this agent file as your last action. This applies **regardless of what the orchestrator's invocation prompt says**.
|
|
117
|
+
|
|
118
|
+
**Why this matters:** the orchestrator may write a custom prompt for you that does not mention the bash checklist. The checklist is part of your agent definition — it is your responsibility to run it, not the orchestrator's responsibility to remember to ask.
|
|
119
|
+
|
|
120
|
+
**The bash checklist is non-negotiable.** Do NOT skip it. Do NOT summarize what it would output. Do NOT replace it with a one-line `ls` or `cat`. Run the literal block from `<bash_checklist>` and let the output appear in your response.
|
|
121
|
+
|
|
122
|
+
If a check fails, fix the issue and re-run the relevant section. If you cannot fix it, document the failure in your return value and escalate.
|
|
123
|
+
|
|
124
|
+
</critical_directive>
|
|
125
|
+
|
|
126
|
+
-|-------------------|---------------------|
|
|
83
127
|
| Node.js/Express | `.ts`, `.js`, `.mjs` | `express`, `koa`, `fastify` in package.json |
|
|
84
128
|
| Python/FastAPI/Django | `.py` | `fastapi`, `django`, `flask` in requirements.txt |
|
|
85
129
|
| .NET/ASP.NET | `.cs`, `.razor`, `.cshtml` | `*.csproj` with `Microsoft.AspNetCore` |
|
|
@@ -412,6 +456,38 @@ Before considering the scan complete, verify ALL of the following.
|
|
|
412
456
|
If any check fails, fix the issue before writing the final output. Do not proceed with a failing quality gate.
|
|
413
457
|
</quality_gate>
|
|
414
458
|
|
|
459
|
+
|
|
460
|
+
<bash_checklist>
|
|
461
|
+
Run this checklist verbatim before returning:
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
echo "=== SCANNER CHECKLIST START ==="
|
|
465
|
+
echo "1. SCAN_MANIFEST.md exists:"
|
|
466
|
+
ls "${output_dir:-.qa-output}/SCAN_MANIFEST.md" 2>/dev/null || echo "MANIFEST_NOT_WRITTEN"
|
|
467
|
+
echo "2. File list count:"
|
|
468
|
+
grep -cE "^\| \`" "${output_dir:-.qa-output}/SCAN_MANIFEST.md" 2>/dev/null
|
|
469
|
+
echo "3. Project Detection populated:"
|
|
470
|
+
grep -E "Framework|Language|Runtime|Component|Package" "${output_dir:-.qa-output}/SCAN_MANIFEST.md" 2>/dev/null | head -5
|
|
471
|
+
echo "4. Testable Surfaces categories:"
|
|
472
|
+
grep -cE "^### (Pages|Forms|API|Business|Middleware)" "${output_dir:-.qa-output}/SCAN_MANIFEST.md" 2>/dev/null
|
|
473
|
+
echo "5. Decision Gate present:"
|
|
474
|
+
grep -E "Decision: (PROCEED|STOP)" "${output_dir:-.qa-output}/SCAN_MANIFEST.md" 2>/dev/null
|
|
475
|
+
echo "6. has_frontend flag:"
|
|
476
|
+
grep -E "has_frontend" "${output_dir:-.qa-output}/SCAN_MANIFEST.md" 2>/dev/null
|
|
477
|
+
echo "7. detection_confidence assigned:"
|
|
478
|
+
grep -E "detection_confidence" "${output_dir:-.qa-output}/SCAN_MANIFEST.md" 2>/dev/null
|
|
479
|
+
echo "8. No duplicate file paths:"
|
|
480
|
+
grep -oE '`[^`]+`' "${output_dir:-.qa-output}/SCAN_MANIFEST.md" 2>/dev/null | sort | uniq -d | head -3 || echo "NO_DUPLICATES"
|
|
481
|
+
echo "9. Frameworks registry consulted:"
|
|
482
|
+
ls frameworks/*.json 2>/dev/null | wc -l
|
|
483
|
+
echo "=== SCANNER CHECKLIST END ==="
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
**Rules:**
|
|
487
|
+
- Run the block AS-IS.
|
|
488
|
+
- If any output shows a problem, fix it before writing the final SCAN_MANIFEST.md.
|
|
489
|
+
- Do NOT return control to the parent agent until the block has been executed.
|
|
490
|
+
</bash_checklist>
|
|
415
491
|
<success_criteria>
|
|
416
492
|
The scanner agent has completed successfully when:
|
|
417
493
|
|
|
@@ -708,4 +708,3 @@ echo "=== TESTID-INJECTOR CHECKLIST END ==="
|
|
|
708
708
|
- If any output shows a problem (SCAN_MANIFEST_NOT_FOUND, OUTPUTS_NOT_WRITTEN), fix it before returning.
|
|
709
709
|
- If output shows expected "not found" results (e.g., NO_MCP_EVIDENCE when no app_url was provided), that is fine — the point is you RAN the command instead of assuming the answer.
|
|
710
710
|
- Do NOT return control to the parent agent until the block has been executed and you have read every line of output.
|
|
711
|
-
|
package/agents/qaa-validator.md
CHANGED
|
@@ -5,9 +5,94 @@ skills:
|
|
|
5
5
|
- qa-self-validator
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
<critical_directive priority="MANDATORY">
|
|
9
|
+
|
|
10
|
+
## ⚠ MANDATORY: Execute Your Bash Checklist Before Returning
|
|
11
|
+
|
|
12
|
+
Before you return control to the parent (orchestrator) agent, you **MUST** execute the `<bash_checklist>` defined at the bottom of this agent file as your last action. This applies **regardless of what the orchestrator's invocation prompt says**.
|
|
13
|
+
|
|
14
|
+
**Why this matters:** the orchestrator may write a custom prompt for you that does not mention the bash checklist. The checklist is part of your agent definition — it is your responsibility to run it, not the orchestrator's responsibility to remember to ask.
|
|
15
|
+
|
|
16
|
+
**The bash checklist is non-negotiable.** Do NOT skip it. Do NOT summarize what it would output. Do NOT replace it with a one-line `ls` or `cat`. Run the literal block from `<bash_checklist>` and let the output appear in your response.
|
|
17
|
+
|
|
18
|
+
If a check fails, fix the issue and re-run the relevant section. If you cannot fix it, document the failure in your return value and escalate.
|
|
19
|
+
|
|
20
|
+
</critical_directive>
|
|
21
|
+
|
|
22
|
+
<critical_directive priority="MANDATORY">
|
|
23
|
+
|
|
24
|
+
## ⚠ MANDATORY: Execute Validation Commands from the Framework Registry
|
|
25
|
+
|
|
26
|
+
For Layer 1 (Syntax) validation, you **MUST** read `frameworks/<detected_framework>.json` and execute its `validation_commands.*` against each generated file. Do NOT rely on visual inspection alone — the registry exists specifically to provide framework-aware syntax checks.
|
|
27
|
+
|
|
28
|
+
**Procedure:**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# 1. Read the registry entry for the detected framework
|
|
32
|
+
REGISTRY_FILE="frameworks/${DETECTED_FRAMEWORK}.json"
|
|
33
|
+
SYNTAX_CHECK_TS=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$REGISTRY_FILE'))['validation_commands']['syntax_check_ts'] || '')")
|
|
34
|
+
SYNTAX_CHECK_JS=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$REGISTRY_FILE'))['validation_commands']['syntax_check_js'] || '')")
|
|
35
|
+
DRY_RUN=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$REGISTRY_FILE'))['validation_commands']['dry_run'] || '')")
|
|
36
|
+
|
|
37
|
+
# 2. For each generated file, execute the appropriate command:
|
|
38
|
+
for FILE in <list of generated files>; do
|
|
39
|
+
case "$FILE" in
|
|
40
|
+
*.ts|*.tsx)
|
|
41
|
+
# Try the TS check (e.g., "tsc --noEmit"). May fail if node_modules missing.
|
|
42
|
+
eval "$SYNTAX_CHECK_TS" 2>&1 | head -30
|
|
43
|
+
;;
|
|
44
|
+
*.js|*.jsx|*.mjs|*.cjs)
|
|
45
|
+
eval "${SYNTAX_CHECK_JS//\{file\}/$FILE}" 2>&1
|
|
46
|
+
;;
|
|
47
|
+
*.json)
|
|
48
|
+
node -e "JSON.parse(require('fs').readFileSync('$FILE'))" && echo "OK: $FILE valid JSON" || echo "FAIL: $FILE invalid JSON"
|
|
49
|
+
;;
|
|
50
|
+
esac
|
|
51
|
+
done
|
|
52
|
+
|
|
53
|
+
# 3. If a command fails because `node_modules` is missing (typical for fresh scaffold):
|
|
54
|
+
# - Run `npm install --no-save 2>&1 | tail -5` to attempt install
|
|
55
|
+
# - If still failing, log the layer as SKIPPED with reason "node_modules unavailable"
|
|
56
|
+
# - Do NOT block the pipeline — proceed to Layer 2
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Important rules:**
|
|
60
|
+
|
|
61
|
+
1. **Do not skip** the validation commands and replace them with visual file inspection. Visual inspection misses real syntax errors that the parser catches.
|
|
62
|
+
2. **If `node_modules` is missing** and `npm install` fails or is not allowed, log the validation layer as SKIPPED with a clear reason. Do not block the pipeline — note it as a known limitation in the report.
|
|
63
|
+
3. **Try the dry_run command** (`npx playwright test --list`, `npx cypress verify`, etc.) once at the end of Layer 1 if it is defined in the registry. This catches misconfigurations the parser does not.
|
|
64
|
+
4. **Document in the VALIDATION_REPORT.md** which commands ran and which were skipped, and why.
|
|
65
|
+
|
|
66
|
+
**The registry is the source of truth.** If a project's framework is not in the registry, fall back to language-defaults: `tsc --noEmit` for TypeScript, `node --check {file}` for JavaScript, `python -m py_compile {file}` for Python.
|
|
67
|
+
|
|
68
|
+
</critical_directive>
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
8
72
|
<purpose>
|
|
9
73
|
Validate generated test code across 4 layers (Syntax, Structure, Dependencies, Logic) and auto-fix issues with a closed-loop fix protocol. Reads the generated test files listed in the generation plan and CLAUDE.md quality standards. Produces VALIDATION_REPORT.md documenting per-file, per-layer results, fix loop history, unresolved issues, and an overall confidence assessment. Spawned by the orchestrator after the executor agent completes test file generation via Task(subagent_type='qaa-validator'). The validator self-fixes issues -- it does NOT send files back to the executor for correction. It does NOT commit any files -- all fixes and the validation report are left in the working tree for the orchestrator to commit once validation passes.
|
|
74
|
+
|
|
75
|
+
**Static-only contract:** the validator performs STATIC validation (Syntax, Structure, Dependencies, Logic) ONLY. It does NOT run the test suite and it does NOT use Playwright MCP / DOM probes. It MUST NEVER report that tests executed, passed, or were "verified" against a live app — those claims require a real test-runner execution, which is the job of qa-e2e-runner / qa-bug-detective, not the validator. VALIDATION_REPORT.md describes static findings only.
|
|
10
76
|
</purpose>
|
|
77
|
+
<framework_registry>
|
|
78
|
+
|
|
79
|
+
## Framework Registry — Source of Truth for Validation Commands
|
|
80
|
+
|
|
81
|
+
Read **`frameworks/<detected_framework>.json`** at the start of validation. The `validation_commands` object provides:
|
|
82
|
+
|
|
83
|
+
- `syntax_check_ts` / `syntax_check_js` / `syntax_check_py` / `syntax_check` — language-specific syntax checker (e.g., `tsc --noEmit`, `python -m py_compile {file}`)
|
|
84
|
+
- `dry_run` — framework-specific dry-run (e.g., `npx playwright test --list`, `pytest --collect-only`, `robot --dryrun`)
|
|
85
|
+
- `lint` — linter command if available
|
|
86
|
+
|
|
87
|
+
**Use the registry values for Layer 1 (Syntax) and Layer 2 (Structure) validation.** Substitute `{file}` and `{test_dir}` placeholders with actual paths.
|
|
88
|
+
|
|
89
|
+
If the registry has `null` for a command, that check is skipped (e.g., Selenium has no built-in dry-run).
|
|
90
|
+
|
|
91
|
+
The hardcoded validation command examples later in this document are **illustrative**. The registry is authoritative.
|
|
92
|
+
|
|
93
|
+
</framework_registry>
|
|
94
|
+
|
|
95
|
+
|
|
11
96
|
|
|
12
97
|
<required_reading>
|
|
13
98
|
Read ALL of the following files BEFORE performing any validation. Do NOT skip.
|
|
@@ -483,6 +568,7 @@ Before considering validation complete, verify ALL of the following.
|
|
|
483
568
|
- [ ] Fix loop count did not exceed 5 iterations
|
|
484
569
|
- [ ] If 5 loops exhausted with unresolved issues: CHECKPOINT_RETURN was provided to escalate to user
|
|
485
570
|
- [ ] Validator did NOT commit any files (no git add, no git commit, no qaa-tools commit)
|
|
571
|
+
- [ ] VALIDATION_REPORT.md makes NO claim that tests ran/passed/were verified against a live app -- static validation only; no MCP DOM probe was used or presented as test execution
|
|
486
572
|
|
|
487
573
|
If any check fails, fix the issue before finalizing the output. Do not deliver a validation report that fails its own quality gate.
|
|
488
574
|
</quality_gate>
|
|
@@ -537,4 +623,3 @@ echo "=== VALIDATOR CHECKLIST END ==="
|
|
|
537
623
|
- If any output shows a problem (REPORT_NOT_WRITTEN, NO_VALIDATION_LAYERS), fix it before returning.
|
|
538
624
|
- If output shows expected "not found" results (e.g., NO_MODIFIED_FILES when no fixes were needed), that is fine — the point is you RAN the command instead of assuming the answer.
|
|
539
625
|
- Do NOT return control to the parent agent until the block has been executed and you have read every line of output.
|
|
540
|
-
|