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.
Files changed (78) hide show
  1. package/.mcp.json +8 -8
  2. package/CHANGELOG.md +93 -71
  3. package/CLAUDE.md +553 -553
  4. package/agents/qa-pipeline-orchestrator.md +1378 -1378
  5. package/agents/qaa-analyzer.md +539 -524
  6. package/agents/qaa-bug-detective.md +479 -446
  7. package/agents/qaa-codebase-mapper.md +935 -935
  8. package/agents/qaa-discovery.md +384 -0
  9. package/agents/qaa-e2e-runner.md +416 -415
  10. package/agents/qaa-executor.md +651 -651
  11. package/agents/qaa-planner.md +405 -390
  12. package/agents/qaa-project-researcher.md +319 -319
  13. package/agents/qaa-scanner.md +424 -424
  14. package/agents/qaa-testid-injector.md +643 -585
  15. package/agents/qaa-validator.md +490 -452
  16. package/bin/install.cjs +200 -198
  17. package/bin/lib/commands.cjs +709 -709
  18. package/bin/lib/config.cjs +307 -307
  19. package/bin/lib/core.cjs +497 -497
  20. package/bin/lib/frontmatter.cjs +299 -299
  21. package/bin/lib/init.cjs +989 -989
  22. package/bin/lib/milestone.cjs +241 -241
  23. package/bin/lib/model-profiles.cjs +60 -60
  24. package/bin/lib/phase.cjs +911 -911
  25. package/bin/lib/roadmap.cjs +306 -306
  26. package/bin/lib/state.cjs +748 -748
  27. package/bin/lib/template.cjs +222 -222
  28. package/bin/lib/verify.cjs +842 -842
  29. package/bin/qaa-tools.cjs +607 -607
  30. package/commands/qa-audit.md +119 -0
  31. package/commands/qa-create-test.md +288 -0
  32. package/commands/qa-fix.md +147 -0
  33. package/commands/qa-map.md +137 -0
  34. package/{.claude/commands → commands}/qa-pr.md +23 -23
  35. package/{.claude/commands → commands}/qa-start.md +22 -22
  36. package/{.claude/commands → commands}/qa-testid.md +19 -19
  37. package/docs/COMMANDS.md +341 -341
  38. package/docs/DEMO.md +182 -182
  39. package/docs/TESTING.md +156 -156
  40. package/package.json +6 -7
  41. package/{.claude/settings.json → settings.json} +1 -2
  42. package/templates/failure-classification.md +391 -391
  43. package/templates/gap-analysis.md +409 -409
  44. package/templates/pr-template.md +48 -48
  45. package/templates/qa-analysis.md +381 -381
  46. package/templates/qa-audit-report.md +465 -465
  47. package/templates/qa-repo-blueprint.md +636 -636
  48. package/templates/scan-manifest.md +312 -312
  49. package/templates/test-inventory.md +582 -582
  50. package/templates/testid-audit-report.md +354 -354
  51. package/templates/validation-report.md +243 -243
  52. package/workflows/qa-analyze.md +296 -296
  53. package/workflows/qa-from-ticket.md +536 -536
  54. package/workflows/qa-gap.md +309 -303
  55. package/workflows/qa-pr.md +389 -389
  56. package/workflows/qa-start.md +1192 -1168
  57. package/workflows/qa-testid.md +384 -356
  58. package/workflows/qa-validate.md +299 -295
  59. package/.claude/commands/create-test.md +0 -164
  60. package/.claude/commands/qa-audit.md +0 -37
  61. package/.claude/commands/qa-blueprint.md +0 -54
  62. package/.claude/commands/qa-fix.md +0 -36
  63. package/.claude/commands/qa-from-ticket.md +0 -24
  64. package/.claude/commands/qa-gap.md +0 -20
  65. package/.claude/commands/qa-map.md +0 -47
  66. package/.claude/commands/qa-pom.md +0 -36
  67. package/.claude/commands/qa-pyramid.md +0 -37
  68. package/.claude/commands/qa-report.md +0 -38
  69. package/.claude/commands/qa-research.md +0 -33
  70. package/.claude/commands/qa-validate.md +0 -42
  71. package/.claude/commands/update-test.md +0 -58
  72. package/.claude/skills/qa-learner/SKILL.md +0 -150
  73. /package/{.claude/skills → skills}/qa-bug-detective/SKILL.md +0 -0
  74. /package/{.claude/skills → skills}/qa-repo-analyzer/SKILL.md +0 -0
  75. /package/{.claude/skills → skills}/qa-self-validator/SKILL.md +0 -0
  76. /package/{.claude/skills → skills}/qa-template-engine/SKILL.md +0 -0
  77. /package/{.claude/skills → skills}/qa-testid-injector/SKILL.md +0 -0
  78. /package/{.claude/skills → skills}/qa-workflow-documenter/SKILL.md +0 -0
package/docs/TESTING.md CHANGED
@@ -1,156 +1,156 @@
1
- # Testing Guide
2
-
3
- How to validate the QA Automation Agent against real repositories.
4
-
5
- ## Test Repos
6
-
7
- Each workflow option requires a different type of repository to test against.
8
-
9
- ### Option 1 — Dev Only (No QA Repo)
10
-
11
- Test the full generation pipeline: scan → codebase-map → analyze → generate → validate → [e2e-run] → deliver.
12
-
13
- | Repo | Stack | Why it's good |
14
- |------|-------|---------------|
15
- | [devdbrandy/restful-ecommerce](https://github.com/devdbrandy/restful-ecommerce) | Node.js, Express | Minimalist e-commerce API. Products, orders, auth. Almost no tests — agent generates everything from scratch. |
16
- | [themodernmonk7/E-commerce-API](https://github.com/themodernmonk7/E-commerce-API) | Express, MongoDB | Full CRUD: auth, products, orders, reviews. No QA repo. Good variety of endpoints. |
17
- | [dinushchathurya/nodejs-ecommerce-api](https://github.com/dinushchathurya/nodejs-ecommerce-api) | Express, MongoDB | Full e-commerce: users, categories, products, orders, images. No tests. |
18
-
19
- **How to test:**
20
- ```bash
21
- git clone https://github.com/devdbrandy/restful-ecommerce.git /tmp/test-option1
22
- cd /tmp/test-option1
23
- # Open Claude Code in this directory, then:
24
- /qa-start --dev-repo .
25
- ```
26
-
27
- **Expected output:**
28
- - SCAN_MANIFEST.md with Node.js/Express detection
29
- - QA_ANALYSIS.md with architecture overview and risk assessment
30
- - TEST_INVENTORY.md with 30+ test cases (pyramid-driven)
31
- - QA_REPO_BLUEPRINT.md (since no QA repo exists)
32
- - Generated test files (unit, API, E2E)
33
- - VALIDATION_REPORT.md
34
- - Draft PR with all artifacts
35
-
36
- ### Option 2 — Dev + Immature QA Repo
37
-
38
- Test the gap analysis and augmentation pipeline.
39
-
40
- | DEV Repo | Stack | QA Repo |
41
- |----------|-------|---------|
42
- | [oozdal/to-do-list-api](https://github.com/oozdal/to-do-list-api) | FastAPI, SQLAlchemy | Create a crude QA repo manually (see below) |
43
- | [KenMwaura1/Fast-Api-example](https://github.com/KenMwaura1/Fast-Api-example) | FastAPI, PostgreSQL, SQLAlchemy | Create a crude QA repo manually (see below) |
44
-
45
- **Creating a crude QA repo for testing:**
46
-
47
- No open-source repos have intentionally bad tests. Create one manually:
48
-
49
- ```bash
50
- mkdir /tmp/test-option2-qa
51
- cd /tmp/test-option2-qa
52
-
53
- # Create a broken test file with hardcoded tokens
54
- cat > tests/test_api.py << 'EOF'
55
- import requests
56
-
57
- # TODO: ask Juan for new token
58
- TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.expired"
59
- BASE_URL = "http://localhost:8000"
60
-
61
- def test_get_todos():
62
- r = requests.get(f"{BASE_URL}/todos", headers={"Authorization": f"Bearer {TOKEN}"})
63
- assert r.status_code # No specific assertion!
64
-
65
- def test_create_todo():
66
- r = requests.post(f"{BASE_URL}/todos", json={"title": "test"})
67
- # No assertion at all
68
- EOF
69
-
70
- # Create a broken Selenium test
71
- cat > old_tests/test_ui.py << 'EOF'
72
- from selenium import webdriver
73
- # This import doesn't work anymore
74
- from selenium.webdriver.common.keys import Keys
75
-
76
- def test_login():
77
- driver = webdriver.Chrome() # Will fail - no ChromeDriver
78
- driver.get("http://localhost:3000/login")
79
- driver.find_element_by_class_name("login-btn").click() # Deprecated API
80
- EOF
81
-
82
- # Create empty postman collection
83
- echo '{"info": {"name": "Todo API"}, "item": []}' > postman/collection.json
84
-
85
- # Bad README
86
- echo "# QA Tests\nSome tests might need updating. Ask the team." > README.md
87
-
88
- git init && git add -A && git commit -m "initial qa setup"
89
- ```
90
-
91
- **How to test:**
92
- ```bash
93
- cd /tmp/test-option2-dev # The FastAPI dev repo
94
- /qa-start --dev-repo . --qa-repo /tmp/test-option2-qa
95
- ```
96
-
97
- **Expected output:**
98
- - Maturity score < 30 → Option 2 detected
99
- - GAP_ANALYSIS.md showing broken tests, missing coverage
100
- - Fixed test files (imports, assertions, configs)
101
- - New test cases added for uncovered features
102
- - VALIDATION_REPORT.md
103
-
104
- ### Option 3 — Dev + Mature QA Repo
105
-
106
- Test the surgical additions pipeline.
107
-
108
- | QA Repo | Stack | Why it's good |
109
- |---------|-------|---------------|
110
- | [OmonUrkinbaev/playwright-qa-automation](https://github.com/OmonUrkinbaev/playwright-qa-automation) | Playwright, TypeScript, POM | Production-style: UI + API tests, POM, data-driven, flaky handling, CI pipelines. |
111
- | [idavidov13/Playwright-Framework](https://github.com/idavidov13/Playwright-Framework) | Playwright, TypeScript, POM | Custom fixtures, API mocking, Zod validation, GitHub Actions + GitLab CI. |
112
- | [nareshnavinash/playwright-TS-pom](https://github.com/nareshnavinash/playwright-TS-pom) | Playwright, TypeScript, POM | GitLab CI, DataDog integration, ESLint, junit + HTML reporting. |
113
-
114
- **How to test:**
115
- ```bash
116
- # Clone the app being tested (the QA repo tests against a demo app)
117
- git clone https://github.com/OmonUrkinbaev/playwright-qa-automation.git /tmp/test-option3-qa
118
-
119
- # You need the DEV repo that the QA repo tests against
120
- # Check the QA repo's README for the target application URL/repo
121
-
122
- /qa-start --dev-repo /tmp/test-option3-dev --qa-repo /tmp/test-option3-qa
123
- ```
124
-
125
- **Expected output:**
126
- - Maturity score > 70 → Option 3 detected
127
- - GAP_ANALYSIS.md showing thin coverage areas only
128
- - Only missing tests added — existing tests untouched
129
- - Existing POM conventions respected
130
- - VALIDATION_REPORT.md
131
-
132
- ## Validation Checklist
133
-
134
- After each test run, verify:
135
-
136
- - [ ] Correct workflow option detected (1, 2, or 3)
137
- - [ ] SCAN_MANIFEST.md has correct framework detection
138
- - [ ] QA_ANALYSIS.md has real architecture info (not generic)
139
- - [ ] TEST_INVENTORY.md has concrete inputs and expected outcomes
140
- - [ ] Generated test files follow CLAUDE.md standards
141
- - [ ] All locators use Tier 1 (data-testid) or Tier 2 (ARIA roles)
142
- - [ ] No assertions use toBeTruthy/toBeDefined
143
- - [ ] POM has no assertions (if E2E tests generated)
144
- - [ ] VALIDATION_REPORT.md shows 4-layer check results
145
- - [ ] Draft PR created with full summary and reviewer checklist
146
- - [ ] No hardcoded credentials in any generated file
147
-
148
- ## Troubleshooting Test Runs
149
-
150
- | Issue | Fix |
151
- |-------|-----|
152
- | `gh: command not found` | Install GitHub CLI: `brew install gh` or `winget install GitHub.cli` |
153
- | `gh auth` error | Run `gh auth login` first |
154
- | Agent detects wrong framework | Check SCAN_MANIFEST.md — may need to adjust scanner detection patterns |
155
- | Maturity score seems wrong | Review the 5 scoring dimensions in init.cjs cmdInitQaStart |
156
- | Tests fail to validate | Check if the test framework is installed in the target repo |
1
+ # Testing Guide
2
+
3
+ How to validate the QA Automation Agent against real repositories.
4
+
5
+ ## Test Repos
6
+
7
+ Each workflow option requires a different type of repository to test against.
8
+
9
+ ### Option 1 — Dev Only (No QA Repo)
10
+
11
+ Test the full generation pipeline: scan → codebase-map → analyze → generate → validate → [e2e-run] → deliver.
12
+
13
+ | Repo | Stack | Why it's good |
14
+ |------|-------|---------------|
15
+ | [devdbrandy/restful-ecommerce](https://github.com/devdbrandy/restful-ecommerce) | Node.js, Express | Minimalist e-commerce API. Products, orders, auth. Almost no tests — agent generates everything from scratch. |
16
+ | [themodernmonk7/E-commerce-API](https://github.com/themodernmonk7/E-commerce-API) | Express, MongoDB | Full CRUD: auth, products, orders, reviews. No QA repo. Good variety of endpoints. |
17
+ | [dinushchathurya/nodejs-ecommerce-api](https://github.com/dinushchathurya/nodejs-ecommerce-api) | Express, MongoDB | Full e-commerce: users, categories, products, orders, images. No tests. |
18
+
19
+ **How to test:**
20
+ ```bash
21
+ git clone https://github.com/devdbrandy/restful-ecommerce.git /tmp/test-option1
22
+ cd /tmp/test-option1
23
+ # Open Claude Code in this directory, then:
24
+ /qa-start --dev-repo .
25
+ ```
26
+
27
+ **Expected output:**
28
+ - SCAN_MANIFEST.md with Node.js/Express detection
29
+ - QA_ANALYSIS.md with architecture overview and risk assessment
30
+ - TEST_INVENTORY.md with 30+ test cases (pyramid-driven)
31
+ - QA_REPO_BLUEPRINT.md (since no QA repo exists)
32
+ - Generated test files (unit, API, E2E)
33
+ - VALIDATION_REPORT.md
34
+ - Draft PR with all artifacts
35
+
36
+ ### Option 2 — Dev + Immature QA Repo
37
+
38
+ Test the gap analysis and augmentation pipeline.
39
+
40
+ | DEV Repo | Stack | QA Repo |
41
+ |----------|-------|---------|
42
+ | [oozdal/to-do-list-api](https://github.com/oozdal/to-do-list-api) | FastAPI, SQLAlchemy | Create a crude QA repo manually (see below) |
43
+ | [KenMwaura1/Fast-Api-example](https://github.com/KenMwaura1/Fast-Api-example) | FastAPI, PostgreSQL, SQLAlchemy | Create a crude QA repo manually (see below) |
44
+
45
+ **Creating a crude QA repo for testing:**
46
+
47
+ No open-source repos have intentionally bad tests. Create one manually:
48
+
49
+ ```bash
50
+ mkdir /tmp/test-option2-qa
51
+ cd /tmp/test-option2-qa
52
+
53
+ # Create a broken test file with hardcoded tokens
54
+ cat > tests/test_api.py << 'EOF'
55
+ import requests
56
+
57
+ # TODO: ask Juan for new token
58
+ TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.expired"
59
+ BASE_URL = "http://localhost:8000"
60
+
61
+ def test_get_todos():
62
+ r = requests.get(f"{BASE_URL}/todos", headers={"Authorization": f"Bearer {TOKEN}"})
63
+ assert r.status_code # No specific assertion!
64
+
65
+ def test_create_todo():
66
+ r = requests.post(f"{BASE_URL}/todos", json={"title": "test"})
67
+ # No assertion at all
68
+ EOF
69
+
70
+ # Create a broken Selenium test
71
+ cat > old_tests/test_ui.py << 'EOF'
72
+ from selenium import webdriver
73
+ # This import doesn't work anymore
74
+ from selenium.webdriver.common.keys import Keys
75
+
76
+ def test_login():
77
+ driver = webdriver.Chrome() # Will fail - no ChromeDriver
78
+ driver.get("http://localhost:3000/login")
79
+ driver.find_element_by_class_name("login-btn").click() # Deprecated API
80
+ EOF
81
+
82
+ # Create empty postman collection
83
+ echo '{"info": {"name": "Todo API"}, "item": []}' > postman/collection.json
84
+
85
+ # Bad README
86
+ echo "# QA Tests\nSome tests might need updating. Ask the team." > README.md
87
+
88
+ git init && git add -A && git commit -m "initial qa setup"
89
+ ```
90
+
91
+ **How to test:**
92
+ ```bash
93
+ cd /tmp/test-option2-dev # The FastAPI dev repo
94
+ /qa-start --dev-repo . --qa-repo /tmp/test-option2-qa
95
+ ```
96
+
97
+ **Expected output:**
98
+ - Maturity score < 30 → Option 2 detected
99
+ - GAP_ANALYSIS.md showing broken tests, missing coverage
100
+ - Fixed test files (imports, assertions, configs)
101
+ - New test cases added for uncovered features
102
+ - VALIDATION_REPORT.md
103
+
104
+ ### Option 3 — Dev + Mature QA Repo
105
+
106
+ Test the surgical additions pipeline.
107
+
108
+ | QA Repo | Stack | Why it's good |
109
+ |---------|-------|---------------|
110
+ | [OmonUrkinbaev/playwright-qa-automation](https://github.com/OmonUrkinbaev/playwright-qa-automation) | Playwright, TypeScript, POM | Production-style: UI + API tests, POM, data-driven, flaky handling, CI pipelines. |
111
+ | [idavidov13/Playwright-Framework](https://github.com/idavidov13/Playwright-Framework) | Playwright, TypeScript, POM | Custom fixtures, API mocking, Zod validation, GitHub Actions + GitLab CI. |
112
+ | [nareshnavinash/playwright-TS-pom](https://github.com/nareshnavinash/playwright-TS-pom) | Playwright, TypeScript, POM | GitLab CI, DataDog integration, ESLint, junit + HTML reporting. |
113
+
114
+ **How to test:**
115
+ ```bash
116
+ # Clone the app being tested (the QA repo tests against a demo app)
117
+ git clone https://github.com/OmonUrkinbaev/playwright-qa-automation.git /tmp/test-option3-qa
118
+
119
+ # You need the DEV repo that the QA repo tests against
120
+ # Check the QA repo's README for the target application URL/repo
121
+
122
+ /qa-start --dev-repo /tmp/test-option3-dev --qa-repo /tmp/test-option3-qa
123
+ ```
124
+
125
+ **Expected output:**
126
+ - Maturity score > 70 → Option 3 detected
127
+ - GAP_ANALYSIS.md showing thin coverage areas only
128
+ - Only missing tests added — existing tests untouched
129
+ - Existing POM conventions respected
130
+ - VALIDATION_REPORT.md
131
+
132
+ ## Validation Checklist
133
+
134
+ After each test run, verify:
135
+
136
+ - [ ] Correct workflow option detected (1, 2, or 3)
137
+ - [ ] SCAN_MANIFEST.md has correct framework detection
138
+ - [ ] QA_ANALYSIS.md has real architecture info (not generic)
139
+ - [ ] TEST_INVENTORY.md has concrete inputs and expected outcomes
140
+ - [ ] Generated test files follow CLAUDE.md standards
141
+ - [ ] All locators use Tier 1 (data-testid) or Tier 2 (ARIA roles)
142
+ - [ ] No assertions use toBeTruthy/toBeDefined
143
+ - [ ] POM has no assertions (if E2E tests generated)
144
+ - [ ] VALIDATION_REPORT.md shows 4-layer check results
145
+ - [ ] Draft PR created with full summary and reviewer checklist
146
+ - [ ] No hardcoded credentials in any generated file
147
+
148
+ ## Troubleshooting Test Runs
149
+
150
+ | Issue | Fix |
151
+ |-------|-----|
152
+ | `gh: command not found` | Install GitHub CLI: `brew install gh` or `winget install GitHub.cli` |
153
+ | `gh auth` error | Run `gh auth login` first |
154
+ | Agent detects wrong framework | Check SCAN_MANIFEST.md — may need to adjust scanner detection patterns |
155
+ | Maturity score seems wrong | Review the 5 scoring dimensions in init.cjs cmdInitQaStart |
156
+ | Tests fail to validate | Check if the test framework is installed in the target repo |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qaa-agent",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "QA Automation Agent for Claude Code — multi-agent pipeline that analyzes repos, generates tests, validates, and creates PRs",
5
5
  "bin": {
6
6
  "qaa-agent": "./bin/install.cjs"
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "repository": {
19
19
  "type": "git",
20
- "url": "https://github.com/Backhaus7997/qaa-agent.git"
20
+ "url": "https://github.com/capmation/qaa-testing.git"
21
21
  },
22
22
  "author": "Backhaus7997",
23
23
  "license": "MIT",
@@ -30,12 +30,11 @@
30
30
  "workflows/",
31
31
  "templates/",
32
32
  "docs/",
33
- ".claude/commands/",
34
- ".claude/skills/",
35
- ".claude/settings.json",
33
+ "commands/",
34
+ "skills/",
35
+ "settings.json",
36
36
  ".mcp.json",
37
37
  "CLAUDE.md",
38
- "CHANGELOG.md",
39
- "README.md"
38
+ "CHANGELOG.md"
40
39
  ]
41
40
  }
@@ -10,8 +10,7 @@
10
10
  "Agent",
11
11
  "WebFetch",
12
12
  "WebSearch",
13
- "NotebookEdit",
14
- "mcp__playwright__*"
13
+ "NotebookEdit"
15
14
  ]
16
15
  },
17
16
  "env": {