qai-cli 3.0.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.
@@ -0,0 +1,129 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>qai - Demo Site</title>
7
+ <link rel="stylesheet" href="./style.css" />
8
+ </head>
9
+ <body>
10
+ <nav class="navbar">
11
+ <div class="nav-brand">QA Demo</div>
12
+ <ul class="nav-links">
13
+ <li><a href="#features">Features</a></li>
14
+ <li><a href="#pricing">Pricing</a></li>
15
+ <li><a href="/broken-link">Resources</a></li>
16
+ <!-- BUG: Broken link -->
17
+ <li><a href="#contact">Contact</a></li>
18
+ </ul>
19
+ <button class="nav-toggle" aria-label="Toggle menu">☰</button>
20
+ </nav>
21
+
22
+ <header class="hero">
23
+ <img
24
+ src="./hero-image.png"
25
+ class="hero-image"
26
+ /><!-- BUG: Missing alt text, image doesn't exist -->
27
+ <h1>Welcome to the Demo Site</h1>
28
+ <p>This site contains intentional bugs for QA testing purposes.</p>
29
+ <button class="cta-button" id="cta-btn">Get Started</button>
30
+ </header>
31
+
32
+ <main>
33
+ <section id="features" class="features">
34
+ <h2>Features</h2>
35
+ <div class="feature-grid">
36
+ <div class="feature-card">
37
+ <h3>Fast Performance</h3>
38
+ <p>Lightning quick response times for all your needs.</p>
39
+ </div>
40
+ <div class="feature-card">
41
+ <h3>Secure by Default</h3>
42
+ <p>Enterprise-grade security built into every layer.</p>
43
+ </div>
44
+ <div class="feature-card">
45
+ <h3>Easy Integration</h3>
46
+ <p>Connect with your existing tools in minutes.</p>
47
+ </div>
48
+ <div class="feature-card no-overflow-hidden">
49
+ <!-- BUG: This card overflows on mobile -->
50
+ <h3>24/7 Support Available Around the Clock Every Day</h3>
51
+ <p>
52
+ Our dedicated team is here to help you succeed with personalized assistance whenever
53
+ you need it most.
54
+ </p>
55
+ </div>
56
+ </div>
57
+ </section>
58
+
59
+ <section id="pricing" class="pricing">
60
+ <h2>Pricing</h2>
61
+ <div class="pricing-grid">
62
+ <div class="price-card">
63
+ <h3>Starter</h3>
64
+ <p class="price">$9/mo</p>
65
+ <ul>
66
+ <li>5 projects</li>
67
+ <li>Basic support</li>
68
+ <li>1GB storage</li>
69
+ </ul>
70
+ <button class="buy-btn">Choose Plan</button>
71
+ </div>
72
+ <div class="price-card featured">
73
+ <h3>Pro</h3>
74
+ <p class="price">$29/mo</p>
75
+ <ul>
76
+ <li>Unlimited projects</li>
77
+ <li>Priority support</li>
78
+ <li>100GB storage</li>
79
+ </ul>
80
+ <button class="buy-btn">Choose Plan</button>
81
+ </div>
82
+ <div class="price-card">
83
+ <h3>Enterprise</h3>
84
+ <p class="price">Custom</p>
85
+ <ul>
86
+ <li>Everything in Pro</li>
87
+ <li>Dedicated account manager</li>
88
+ <li>Custom integrations</li>
89
+ </ul>
90
+ <button class="buy-btn" disabled>Contact Sales</button
91
+ ><!-- BUG: Button disabled but no visual indication why -->
92
+ </div>
93
+ </div>
94
+ </section>
95
+
96
+ <section id="contact" class="contact">
97
+ <h2>Contact Us</h2>
98
+ <form id="contact-form" class="contact-form">
99
+ <div class="form-group">
100
+ <label for="name">Name</label>
101
+ <input type="text" id="name" name="name" /><!-- BUG: No required attribute -->
102
+ </div>
103
+ <div class="form-group">
104
+ <label for="email">Email</label>
105
+ <input type="text" id="email" name="email" /><!-- BUG: Should be type="email" -->
106
+ </div>
107
+ <div class="form-group">
108
+ <label for="message">Message</label>
109
+ <textarea id="message" name="message" rows="4"></textarea>
110
+ </div>
111
+ <button type="submit" class="submit-btn" id="submit-btn">Send Message</button>
112
+ <p id="form-status" class="form-status"></p>
113
+ </form>
114
+ </section>
115
+ </main>
116
+
117
+ <footer class="footer">
118
+ <p>
119
+ © 2026 QA Demo Site. This site contains <a href="./BUGS.md">intentional bugs</a> for
120
+ testing.
121
+ </p>
122
+ <p style="color: #666; font-size: 12px">
123
+ Part of the <a href="https://github.com/tyler-james-bridges/qaie">qai</a> project.
124
+ </p>
125
+ </footer>
126
+
127
+ <script src="./app.js"></script>
128
+ </body>
129
+ </html>
package/docs/style.css ADDED
@@ -0,0 +1,315 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ body {
8
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
9
+ line-height: 1.6;
10
+ color: #333;
11
+ }
12
+
13
+ /* Navbar */
14
+ .navbar {
15
+ display: flex;
16
+ justify-content: space-between;
17
+ align-items: center;
18
+ padding: 1rem 2rem;
19
+ background: #1a1a2e;
20
+ color: white;
21
+ position: sticky;
22
+ top: 0;
23
+ z-index: 100;
24
+ }
25
+
26
+ .nav-brand {
27
+ font-size: 1.5rem;
28
+ font-weight: bold;
29
+ }
30
+
31
+ .nav-links {
32
+ display: flex;
33
+ list-style: none;
34
+ gap: 2rem;
35
+ }
36
+
37
+ .nav-links a {
38
+ color: white;
39
+ text-decoration: none;
40
+ transition: color 0.3s;
41
+ }
42
+
43
+ .nav-links a:hover {
44
+ color: #00d4ff;
45
+ }
46
+
47
+ .nav-toggle {
48
+ display: none;
49
+ background: none;
50
+ border: none;
51
+ color: white;
52
+ font-size: 1.5rem;
53
+ cursor: pointer;
54
+ }
55
+
56
+ /* Hero */
57
+ .hero {
58
+ text-align: center;
59
+ padding: 4rem 2rem;
60
+ background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
61
+ color: white;
62
+ }
63
+
64
+ .hero-image {
65
+ max-width: 300px;
66
+ margin-bottom: 2rem;
67
+ }
68
+
69
+ .hero h1 {
70
+ font-size: 2.5rem;
71
+ margin-bottom: 1rem;
72
+ }
73
+
74
+ .hero p {
75
+ font-size: 1.2rem;
76
+ margin-bottom: 2rem;
77
+ opacity: 0.9;
78
+ }
79
+
80
+ .cta-button {
81
+ padding: 1rem 2rem;
82
+ font-size: 1.1rem;
83
+ background: #00d4ff;
84
+ color: #1a1a2e;
85
+ border: none;
86
+ border-radius: 5px;
87
+ cursor: pointer;
88
+ transition:
89
+ transform 0.3s,
90
+ box-shadow 0.3s;
91
+ }
92
+
93
+ .cta-button:hover {
94
+ transform: translateY(-2px);
95
+ box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
96
+ }
97
+
98
+ /* Features */
99
+ .features {
100
+ padding: 4rem 2rem;
101
+ background: #f8f9fa;
102
+ }
103
+
104
+ .features h2 {
105
+ text-align: center;
106
+ margin-bottom: 3rem;
107
+ font-size: 2rem;
108
+ }
109
+
110
+ .feature-grid {
111
+ display: grid;
112
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
113
+ gap: 2rem;
114
+ max-width: 1200px;
115
+ margin: 0 auto;
116
+ }
117
+
118
+ .feature-card {
119
+ background: white;
120
+ padding: 2rem;
121
+ border-radius: 10px;
122
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
123
+ overflow: hidden;
124
+ }
125
+
126
+ /* BUG: This class removes overflow hidden, causing text to spill out on mobile */
127
+ .feature-card.no-overflow-hidden {
128
+ overflow: visible;
129
+ min-width: 350px; /* BUG: Forces minimum width causing horizontal scroll on mobile */
130
+ }
131
+
132
+ .feature-card h3 {
133
+ margin-bottom: 1rem;
134
+ color: #1a1a2e;
135
+ }
136
+
137
+ /* Pricing */
138
+ .pricing {
139
+ padding: 4rem 2rem;
140
+ }
141
+
142
+ .pricing h2 {
143
+ text-align: center;
144
+ margin-bottom: 3rem;
145
+ font-size: 2rem;
146
+ }
147
+
148
+ .pricing-grid {
149
+ display: grid;
150
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
151
+ gap: 2rem;
152
+ max-width: 1000px;
153
+ margin: 0 auto;
154
+ }
155
+
156
+ .price-card {
157
+ background: white;
158
+ padding: 2rem;
159
+ border-radius: 10px;
160
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
161
+ text-align: center;
162
+ }
163
+
164
+ .price-card.featured {
165
+ border: 2px solid #00d4ff;
166
+ transform: scale(1.05);
167
+ }
168
+
169
+ .price-card h3 {
170
+ margin-bottom: 1rem;
171
+ }
172
+
173
+ .price-card .price {
174
+ font-size: 2.5rem;
175
+ font-weight: bold;
176
+ color: #1a1a2e;
177
+ margin-bottom: 1.5rem;
178
+ }
179
+
180
+ .price-card ul {
181
+ list-style: none;
182
+ margin-bottom: 2rem;
183
+ }
184
+
185
+ .price-card li {
186
+ padding: 0.5rem 0;
187
+ border-bottom: 1px solid #eee;
188
+ }
189
+
190
+ .buy-btn {
191
+ width: 100%;
192
+ padding: 1rem;
193
+ background: #1a1a2e;
194
+ color: white;
195
+ border: none;
196
+ border-radius: 5px;
197
+ cursor: pointer;
198
+ transition: background 0.3s;
199
+ }
200
+
201
+ .buy-btn:hover:not(:disabled) {
202
+ background: #16213e;
203
+ }
204
+
205
+ .buy-btn:disabled {
206
+ opacity: 0.5;
207
+ cursor: not-allowed;
208
+ }
209
+
210
+ /* Contact */
211
+ .contact {
212
+ padding: 4rem 2rem;
213
+ background: #f8f9fa;
214
+ }
215
+
216
+ .contact h2 {
217
+ text-align: center;
218
+ margin-bottom: 3rem;
219
+ font-size: 2rem;
220
+ }
221
+
222
+ .contact-form {
223
+ max-width: 500px;
224
+ margin: 0 auto;
225
+ }
226
+
227
+ .form-group {
228
+ margin-bottom: 1.5rem;
229
+ }
230
+
231
+ .form-group label {
232
+ display: block;
233
+ margin-bottom: 0.5rem;
234
+ font-weight: 500;
235
+ }
236
+
237
+ .form-group input,
238
+ .form-group textarea {
239
+ width: 100%;
240
+ padding: 0.75rem;
241
+ border: 1px solid #ddd;
242
+ border-radius: 5px;
243
+ font-size: 1rem;
244
+ }
245
+
246
+ .form-group input:focus,
247
+ .form-group textarea:focus {
248
+ outline: none;
249
+ border-color: #00d4ff;
250
+ }
251
+
252
+ .submit-btn {
253
+ width: 100%;
254
+ padding: 1rem;
255
+ background: #00d4ff;
256
+ color: #1a1a2e;
257
+ border: none;
258
+ border-radius: 5px;
259
+ font-size: 1.1rem;
260
+ font-weight: 600;
261
+ cursor: pointer;
262
+ transition: background 0.3s;
263
+ }
264
+
265
+ .submit-btn:hover {
266
+ background: #00b8e6;
267
+ }
268
+
269
+ .form-status {
270
+ margin-top: 1rem;
271
+ text-align: center;
272
+ font-weight: 500;
273
+ }
274
+
275
+ .form-status.success {
276
+ color: #28a745;
277
+ }
278
+
279
+ .form-status.error {
280
+ color: #dc3545;
281
+ }
282
+
283
+ /* Footer */
284
+ .footer {
285
+ text-align: center;
286
+ padding: 2rem;
287
+ background: #1a1a2e;
288
+ color: white;
289
+ }
290
+
291
+ .footer a {
292
+ color: #00d4ff;
293
+ }
294
+
295
+ /* Mobile Responsive */
296
+ @media (max-width: 768px) {
297
+ .nav-links {
298
+ display: none; /* BUG: No mobile menu implementation - links just disappear */
299
+ }
300
+
301
+ .nav-toggle {
302
+ display: block;
303
+ }
304
+
305
+ .hero h1 {
306
+ font-size: 1.8rem;
307
+ }
308
+
309
+ .price-card.featured {
310
+ transform: none;
311
+ }
312
+ }
313
+
314
+ /* BUG: Missing focus styles for accessibility */
315
+ /* button:focus, a:focus, input:focus, textarea:focus { outline: 2px solid #00d4ff; } */
@@ -0,0 +1,22 @@
1
+ # Example: Playwright + AI QA running against localhost
2
+ #
3
+ # Copy this to your repo: .github/workflows/playwright-qa.yml
4
+ #
5
+ # Use this if your Playwright tests run against a local dev server
6
+ # (The AI QA analysis will be skipped since there's no public URL)
7
+
8
+ name: Playwright Tests
9
+
10
+ on:
11
+ pull_request:
12
+ branches: [main, master]
13
+ push:
14
+ branches: [main, master]
15
+
16
+ jobs:
17
+ test:
18
+ uses: tyler-james-bridges/qaie/.github/workflows/playwright-qa.yml@main
19
+ with:
20
+ # No preview_url - tests will run against localhost (as configured in playwright.config)
21
+ # AI QA will be skipped, but Playwright results will still be posted to PR
22
+ working_directory: '.'
@@ -0,0 +1,40 @@
1
+ # Example: Playwright + AI QA with Vercel Preview
2
+ #
3
+ # Copy this to your repo: .github/workflows/playwright-qa.yml
4
+ #
5
+ # Prerequisites:
6
+ # 1. Your repo has Playwright tests
7
+ # 2. Your repo deploys to Vercel
8
+ # 3. Add ANTHROPIC_API_KEY to repo secrets
9
+
10
+ name: Playwright + AI QA
11
+
12
+ on:
13
+ pull_request:
14
+ branches: [main, master]
15
+
16
+ jobs:
17
+ wait-for-preview:
18
+ name: Wait for Preview
19
+ runs-on: ubuntu-latest
20
+ outputs:
21
+ url: ${{ steps.vercel.outputs.url }}
22
+ steps:
23
+ - name: Wait for Vercel Preview
24
+ id: vercel
25
+ uses: patrickedqvist/wait-for-vercel-preview@v1.3.2
26
+ with:
27
+ token: ${{ secrets.GITHUB_TOKEN }}
28
+ max_timeout: 300
29
+ check_interval: 10
30
+
31
+ test:
32
+ name: Test
33
+ needs: wait-for-preview
34
+ uses: tyler-james-bridges/qaie/.github/workflows/playwright-qa.yml@main
35
+ with:
36
+ preview_url: ${{ needs.wait-for-preview.outputs.url }}
37
+ # working_directory: '.' # Uncomment if playwright.config is in a subdirectory
38
+ # test_command: 'npm test' # Uncomment to customize test command
39
+ secrets:
40
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
package/package.json ADDED
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "qai-cli",
3
+ "version": "3.0.0",
4
+ "description": "AI-powered QA engineer. Code review, testing, and bug detection from your terminal.",
5
+ "main": "src/analyze.js",
6
+ "types": "src/types.d.ts",
7
+ "bin": {
8
+ "qai": "src/index.js"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "require": "./src/analyze.js",
13
+ "import": "./src/analyze.js",
14
+ "types": "./src/types.d.ts"
15
+ },
16
+ "./cli": "./src/index.js"
17
+ },
18
+ "keywords": [
19
+ "qa",
20
+ "testing",
21
+ "playwright",
22
+ "claude",
23
+ "openai",
24
+ "gpt",
25
+ "gemini",
26
+ "ai",
27
+ "automation",
28
+ "github-actions",
29
+ "code-review",
30
+ "bug-detection",
31
+ "qai",
32
+ "qaie"
33
+ ],
34
+ "author": "Tyler James Bridges",
35
+ "license": "MIT",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/tyler-james-bridges/qaie"
39
+ },
40
+ "bugs": {
41
+ "url": "https://github.com/tyler-james-bridges/qaie/issues"
42
+ },
43
+ "homepage": "https://github.com/tyler-james-bridges/qaie",
44
+ "engines": {
45
+ "node": ">=20.0.0",
46
+ "npm": ">=10.0.0"
47
+ },
48
+ "scripts": {
49
+ "start": "node src/index.js",
50
+ "lint": "eslint scripts/ src/",
51
+ "lint:fix": "eslint scripts/ src/ --fix",
52
+ "test": "node --test scripts/**/*.test.js",
53
+ "test:watch": "node --test --watch scripts/**/*.test.js",
54
+ "install:browsers": "playwright install chromium",
55
+ "visual:compare": "node scripts/visual-regression.cjs compare",
56
+ "visual:update-baseline": "node scripts/visual-regression.cjs update-baseline"
57
+ },
58
+ "dependencies": {
59
+ "@anthropic-ai/sdk": "^0.74.0",
60
+ "@google/generative-ai": "^0.24.1",
61
+ "openai": "^6.21.0",
62
+ "pixelmatch": "^7.1.0",
63
+ "playwright": "^1.58.2",
64
+ "pngjs": "^7.0.0"
65
+ },
66
+ "peerDependencies": {
67
+ "@playwright/test": ">=1.40.0"
68
+ },
69
+ "peerDependenciesMeta": {
70
+ "playwright": {
71
+ "optional": true
72
+ },
73
+ "@playwright/test": {
74
+ "optional": true
75
+ }
76
+ },
77
+ "devDependencies": {
78
+ "eslint": "^8.56.0",
79
+ "eslint-config-prettier": "^9.1.0",
80
+ "eslint-plugin-prettier": "^5.1.3",
81
+ "prettier": "^3.2.5"
82
+ }
83
+ }
@@ -0,0 +1,30 @@
1
+ ============================================================
2
+ AI QA Engineer
3
+ ============================================================
4
+ URL: https://ack-onchain.dev/agent/2741/606
5
+ Viewports: desktop, mobile
6
+ Focus: all
7
+ ============================================================
8
+ Using provider: anthropic
9
+
10
+ [1/3] Capturing page data...
11
+ Navigating to https://ack-onchain.dev/agent/2741/606...
12
+ Page title: ACK - Agent Consensus Kudos
13
+ Capturing desktop (1920x1080)...
14
+ Capturing mobile (375x667)...
15
+ Captured 2 screenshots
16
+ Console errors: 0
17
+ Network errors: 0
18
+
19
+ [2/3] Analyzing with AI...
20
+
21
+ [3/3] Generating report...
22
+ Saved: qa-report.md
23
+
24
+ ============================================================
25
+ QA Report Summary
26
+ ============================================================
27
+ Score: 95/100
28
+ Bugs found: 0
29
+ Duration: 9.0s
30
+ ============================================================
@@ -0,0 +1,35 @@
1
+ ============================================================
2
+ AI QA Engineer
3
+ ============================================================
4
+ URL: https://ack-onchain.dev/kudos
5
+ Viewports: desktop, mobile
6
+ Focus: all
7
+ ============================================================
8
+ Using provider: anthropic
9
+
10
+ [1/3] Capturing page data...
11
+ Navigating to https://ack-onchain.dev/kudos...
12
+ Page title: Give Kudos | ACK Protocol
13
+ Capturing desktop (1920x1080)...
14
+ Capturing mobile (375x667)...
15
+ Captured 2 screenshots
16
+ Console errors: 0
17
+ Network errors: 4
18
+
19
+ [2/3] Analyzing with AI...
20
+
21
+ [3/3] Generating report...
22
+ Saved: qa-report.md
23
+
24
+ ============================================================
25
+ QA Report Summary
26
+ ============================================================
27
+ Score: 75/100
28
+ Bugs found: 1
29
+
30
+ - Critical: 0
31
+ - High: 0
32
+ - Medium: 1
33
+ - Low: 0
34
+ Duration: 11.4s
35
+ ============================================================