argusqa-os 9.6.6 → 9.7.4
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/README.md +394 -384
- package/glama.json +2 -2
- package/package.json +77 -71
- package/src/adapters/browser.js +11 -3
- package/src/cli/chrome-launcher.js +175 -0
- package/src/cli/doctor.js +133 -0
- package/src/cli/pr-validate.js +25 -6
- package/src/mcp-server.js +27 -9
- package/src/orchestration/orchestrator.js +9 -7
- package/src/orchestration/report-processor.js +33 -1
- package/src/orchestration/watch-mode.js +20 -0
- package/src/utils/a11y-deep-analyzer.js +1 -1
- package/src/utils/contract-validator.js +27 -2
- package/src/utils/design-fidelity-analyzer.js +1 -1
- package/src/utils/flow-runner.js +16 -2
- package/src/utils/font-analyzer.js +1 -1
- package/src/utils/form-analyzer.js +1 -1
- package/src/utils/har-recorder.js +1 -1
- package/src/utils/issues-analyzer.js +12 -19
- package/src/utils/mcp-parsers.js +20 -0
- package/src/utils/motion-analyzer.js +1 -1
- package/src/utils/noise-filter.js +159 -0
- package/src/utils/pdf-exporter.js +146 -0
- package/src/utils/pr-diff-analyzer.js +11 -2
- package/src/utils/root-cause-linker.js +175 -0
- package/src/utils/screen-recorder.js +250 -0
- package/src/utils/security-analyzer.js +132 -1
- package/src/utils/theme-analyzer.js +1 -1
- package/src/utils/visual-diff-analyzer.js +1 -1
- package/src/utils/web-vitals-analyzer.js +1 -1
package/README.md
CHANGED
|
@@ -1,384 +1,394 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
# Argus — AI-Powered Automated QA
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/argusqa-os)
|
|
6
|
-
[](https://glama.ai/mcp/servers/ironclawdevs27/Argus)
|
|
7
|
-
[](LICENSE)
|
|
9
|
-
|
|
10
|
-
**Argus catches the bugs your test suite misses — visual regressions, API loops, CSS drift, console noise, accessibility failures, and more — and delivers rich reports to Slack (or a local HTML dashboard).**
|
|
11
|
-
|
|
12
|
-
[Quick Start](#quick-start) · [Features](#what-argus-catches) · [Setup](#full-setup) · [MCP Tools](#mcp-tools) · [CLI Commands](#cli-commands) · [Troubleshooting](#troubleshooting) · [Full Reference](REFERENCE.md)
|
|
13
|
-
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Quick Start
|
|
19
|
-
|
|
20
|
-
> **No install required.** `npx` auto-downloads Argus on first run.
|
|
21
|
-
|
|
22
|
-
**Step 1 — Add to `.mcp.json`** in your project root:
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"mcpServers": {
|
|
27
|
-
"chrome-devtools": { "command": "npx", "args": ["-y", "chrome-devtools-mcp@latest"] },
|
|
28
|
-
"argus": { "command": "npx", "args": ["-y", "argusqa-os"] }
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Or via Claude Code CLI:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
claude mcp add chrome-devtools -- npx -y chrome-devtools-mcp@latest
|
|
37
|
-
claude mcp add argus -- npx -y argusqa-os
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Step 2 — Start Chrome with remote debugging:**
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
# macOS
|
|
44
|
-
open -a "Google Chrome" --args --remote-debugging-port=9222 --headless=new
|
|
45
|
-
|
|
46
|
-
# Windows (PowerShell)
|
|
47
|
-
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --headless=new --no-sandbox --disable-gpu --user-data-dir="$env:TEMP\chrome-argus"
|
|
48
|
-
|
|
49
|
-
# Linux
|
|
50
|
-
google-chrome --remote-debugging-port=9222 --headless=new --no-sandbox
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**Step 3 — Run an audit:**
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
Run argus_audit on http://localhost:3000
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Argus scans your app and either posts findings to Slack or opens a local `report.html`. That's it.
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## What Argus Catches
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
| Category | What it detects |
|
|
68
|
-
|---|---|
|
|
69
|
-
| **JavaScript** | Uncaught exceptions, unhandled promise rejections, `console.error` on critical routes |
|
|
70
|
-
| **Network & API** | HTTP 5xx, 401/403 auth failures, duplicate API calls (infinite loops), 4xx errors, broken links |
|
|
71
|
-
| **Performance** | LCP > 2500ms, CLS > 0.1, TTFB > 800ms, slow APIs > 1s/3s, payloads > 500KB/2MB, JS bundles > 500KB |
|
|
72
|
-
| **Accessibility** | axe-core (80+ WCAG rules), color-blind simulation, missing ARIA, keyboard focus, heading hierarchy |
|
|
73
|
-
| **SEO** | Missing meta description, OG tags, canonical, viewport, h1 |
|
|
74
|
-
| **Security** | Auth tokens in localStorage/URL, `eval()`, missing CSP/X-Frame-Options, CSP violations |
|
|
75
|
-
| **CSS** | Cascade overrides, component style leaks, unused rules, React inline style conflicts |
|
|
76
|
-
| **Content** | `null`/`undefined` as visible text, lorem ipsum, broken images, empty data lists |
|
|
77
|
-
| **Responsive** | Horizontal overflow at 375px/768px, touch targets < 44×44px |
|
|
78
|
-
| **Memory** | Detached DOM nodes via V8 heap snapshot, heap growth across navigation |
|
|
79
|
-
| **Visual** | Pixel-level screenshot regression via pixelmatch (≥0.1% warning, ≥5% critical) |
|
|
80
|
-
| **Figma** | Design-to-implementation fidelity — 13 property types (color, spacing, typography, shadows, etc.) |
|
|
81
|
-
| **Forms** | Missing `required`, `autocomplete`, `aria-describedby`; unlabelled inputs |
|
|
82
|
-
| **Fonts** | FOIT, FOUT, missing fallbacks, slow loads > 1s, suboptimal formats |
|
|
83
|
-
| **Motion** | `prefers-reduced-motion` violations, `autoplay` without pause controls |
|
|
84
|
-
| **Network baseline** | New requests, missing requests, status-code regressions vs saved HAR baseline |
|
|
85
|
-
| **Environment diff** | Dev vs staging — screenshot diff, DOM changes, console/network regressions |
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
npm run
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
#
|
|
218
|
-
npm run
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
npm run
|
|
222
|
-
#
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
**
|
|
226
|
-
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
|
269
|
-
|
|
270
|
-
| `
|
|
271
|
-
| `
|
|
272
|
-
| `
|
|
273
|
-
| `
|
|
274
|
-
| `
|
|
275
|
-
| `
|
|
276
|
-
| `
|
|
277
|
-
| `
|
|
278
|
-
| `
|
|
279
|
-
| `
|
|
280
|
-
| `
|
|
281
|
-
| `
|
|
282
|
-
| `
|
|
283
|
-
| `
|
|
284
|
-
| `
|
|
285
|
-
| `
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
**
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
**
|
|
311
|
-
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
|
337
|
-
|
|
338
|
-
|
|
|
339
|
-
|
|
|
340
|
-
|
|
341
|
-
---
|
|
342
|
-
|
|
343
|
-
##
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# Argus — AI-Powered Automated QA
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/argusqa-os)
|
|
6
|
+
[](https://glama.ai/mcp/servers/ironclawdevs27/Argus)
|
|
7
|
+
[](test-harness/)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
**Argus catches the bugs your test suite misses — visual regressions, API loops, CSS drift, console noise, accessibility failures, and more — and delivers rich reports to Slack (or a local HTML dashboard).**
|
|
11
|
+
|
|
12
|
+
[Quick Start](#quick-start) · [Features](#what-argus-catches) · [Setup](#full-setup) · [MCP Tools](#mcp-tools) · [CLI Commands](#cli-commands) · [Troubleshooting](#troubleshooting) · [Full Reference](REFERENCE.md)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
> **No install required.** `npx` auto-downloads Argus on first run.
|
|
21
|
+
|
|
22
|
+
**Step 1 — Add to `.mcp.json`** in your project root:
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"mcpServers": {
|
|
27
|
+
"chrome-devtools": { "command": "npx", "args": ["-y", "chrome-devtools-mcp@latest"] },
|
|
28
|
+
"argus": { "command": "npx", "args": ["-y", "argusqa-os"] }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or via Claude Code CLI:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
claude mcp add chrome-devtools -- npx -y chrome-devtools-mcp@latest
|
|
37
|
+
claude mcp add argus -- npx -y argusqa-os
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Step 2 — Start Chrome with remote debugging:**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# macOS
|
|
44
|
+
open -a "Google Chrome" --args --remote-debugging-port=9222 --headless=new
|
|
45
|
+
|
|
46
|
+
# Windows (PowerShell)
|
|
47
|
+
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --headless=new --no-sandbox --disable-gpu --user-data-dir="$env:TEMP\chrome-argus"
|
|
48
|
+
|
|
49
|
+
# Linux
|
|
50
|
+
google-chrome --remote-debugging-port=9222 --headless=new --no-sandbox
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Step 3 — Run an audit:**
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Run argus_audit on http://localhost:3000
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Argus scans your app and either posts findings to Slack or opens a local `report.html`. That's it.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## What Argus Catches
|
|
64
|
+
|
|
65
|
+
32 analysis engines, 140 distinct issue types, zero test-file maintenance:
|
|
66
|
+
|
|
67
|
+
| Category | What it detects |
|
|
68
|
+
|---|---|
|
|
69
|
+
| **JavaScript** | Uncaught exceptions, unhandled promise rejections, `console.error` on critical routes |
|
|
70
|
+
| **Network & API** | HTTP 5xx, 401/403 auth failures, duplicate API calls (infinite loops), 4xx errors, broken links |
|
|
71
|
+
| **Performance** | LCP > 2500ms, CLS > 0.1, TTFB > 800ms, slow APIs > 1s/3s, payloads > 500KB/2MB, JS bundles > 500KB |
|
|
72
|
+
| **Accessibility** | axe-core (80+ WCAG rules), color-blind simulation, missing ARIA, keyboard focus, heading hierarchy |
|
|
73
|
+
| **SEO** | Missing meta description, OG tags, canonical, viewport, h1 |
|
|
74
|
+
| **Security** | Auth tokens in localStorage/URL, `eval()`, missing CSP/X-Frame-Options, CSP violations, missing SRI on external scripts, source map exposure, open redirects, npm CVEs |
|
|
75
|
+
| **CSS** | Cascade overrides, component style leaks, unused rules, React inline style conflicts |
|
|
76
|
+
| **Content** | `null`/`undefined` as visible text, lorem ipsum, broken images, empty data lists |
|
|
77
|
+
| **Responsive** | Horizontal overflow at 375px/768px, touch targets < 44×44px |
|
|
78
|
+
| **Memory** | Detached DOM nodes via V8 heap snapshot, heap growth across navigation |
|
|
79
|
+
| **Visual** | Pixel-level screenshot regression via pixelmatch (≥0.1% warning, ≥5% critical) |
|
|
80
|
+
| **Figma** | Design-to-implementation fidelity — 13 property types (color, spacing, typography, shadows, etc.) |
|
|
81
|
+
| **Forms** | Missing `required`, `autocomplete`, `aria-describedby`; unlabelled inputs |
|
|
82
|
+
| **Fonts** | FOIT, FOUT, missing fallbacks, slow loads > 1s, suboptimal formats |
|
|
83
|
+
| **Motion** | `prefers-reduced-motion` violations, `autoplay` without pause controls |
|
|
84
|
+
| **Network baseline** | New requests, missing requests, status-code regressions vs saved HAR baseline |
|
|
85
|
+
| **Environment diff** | Dev vs staging — screenshot diff, DOM changes, console/network regressions |
|
|
86
|
+
|
|
87
|
+
And every finding is post-processed with:
|
|
88
|
+
|
|
89
|
+
| Post-processor | What it adds |
|
|
90
|
+
|---|---|
|
|
91
|
+
| **Intelligent baseline filtering** | Findings that flip-flop across runs are tagged `noisy` and downgraded to info — pure cross-run heuristics, no API calls (`ARGUS_NOISE_FILTER=0` to disable) |
|
|
92
|
+
| **Root cause linking** | New findings are annotated with the recent git commits and files most likely to have caused them (`ARGUS_ROOT_CAUSE=0` to disable) |
|
|
93
|
+
|
|
94
|
+
> All findings are classified as `critical` / `warning` / `info` and routed to the right Slack channel — or surfaced in the local HTML report. For per-finding severity tables and detection methods, see [REFERENCE.md](REFERENCE.md).
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## MCP Tools
|
|
99
|
+
|
|
100
|
+
Ask Claude (or any MCP client) — no terminal required:
|
|
101
|
+
|
|
102
|
+
| Tool | Description |
|
|
103
|
+
|---|---|
|
|
104
|
+
| `argus_audit` | Fast pass — JS, network, accessibility, SEO, security, CSS, content |
|
|
105
|
+
| `argus_audit_full` | Deep pass — adds Lighthouse, responsive checks, memory leak detection, hover-state bugs |
|
|
106
|
+
| `argus_compare` | Diff dev vs staging — screenshots, findings delta, environment regressions |
|
|
107
|
+
| `argus_get_context` | Capture everything broken on the open tab for Claude to diagnose |
|
|
108
|
+
| `argus_watch_snapshot` | Snapshot the open tab without navigating (preserves auth/form state) |
|
|
109
|
+
| `argus_last_report` | Return last JSON report without re-running |
|
|
110
|
+
| `argus_design_audit` | Figma URL → 13 design-token finding types (color, spacing, typography, shadows, etc.) |
|
|
111
|
+
| `argus_visual_diff` | Screenshot baseline comparison. Pass `updateBaseline: true` to reset. |
|
|
112
|
+
| `argus_pr_validate` | Fetch GitHub PR diff → map changed files to affected routes → targeted audit → `{ blocked, findings }` |
|
|
113
|
+
|
|
114
|
+
**Example prompts:**
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Run argus_audit on http://localhost:3000/checkout
|
|
118
|
+
Run argus_audit_full on http://localhost:3000/dashboard
|
|
119
|
+
Run argus_compare
|
|
120
|
+
Run argus_get_context
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Full Setup
|
|
126
|
+
|
|
127
|
+
### Prerequisites
|
|
128
|
+
|
|
129
|
+
| Requirement | Version |
|
|
130
|
+
|---|---|
|
|
131
|
+
| Node.js | v20.19+ |
|
|
132
|
+
| Chrome | Stable (desktop or headless) |
|
|
133
|
+
| Claude Code | Latest (`npm install -g @anthropic-ai/claude-code`) |
|
|
134
|
+
| Slack workspace | **Optional** — omit for local `report.html` mode |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### Option A — MCP Server *(recommended for Claude Code users)*
|
|
139
|
+
|
|
140
|
+
No local install needed. Use the [Quick Start](#quick-start) above, then add your target URL:
|
|
141
|
+
|
|
142
|
+
```env
|
|
143
|
+
# .env in your project root
|
|
144
|
+
TARGET_DEV_URL=http://localhost:3000
|
|
145
|
+
TARGET_STAGING_URL=https://staging.example.com # optional — enables argus_compare
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Optional — Slack notifications:**
|
|
149
|
+
|
|
150
|
+
1. [api.slack.com/apps](https://api.slack.com/apps) → Create New App → name it **BugBot**
|
|
151
|
+
2. OAuth & Permissions → Bot Token Scopes: `chat:write`, `files:write`, `files:read`
|
|
152
|
+
3. Install to workspace → copy the `xoxb-...` token
|
|
153
|
+
4. Create channels `#bugs-critical`, `#bugs-warnings`, `#bugs-digest` and run `/invite @BugBot` in each
|
|
154
|
+
|
|
155
|
+
```env
|
|
156
|
+
SLACK_BOT_TOKEN=xoxb-...
|
|
157
|
+
SLACK_CHANNEL_CRITICAL=C0000000000
|
|
158
|
+
SLACK_CHANNEL_WARNINGS=C0000000001
|
|
159
|
+
SLACK_CHANNEL_DIGEST=C0000000002
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
> Without Slack: Argus auto-generates `reports/report.html` and opens it in your browser — zero extra config.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Option B — npm Package (CI / dev dependency)
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npm install --save-dev argusqa-os
|
|
170
|
+
npx argus init # interactive wizard — detects framework, discovers routes, writes .env
|
|
171
|
+
npm run crawl # run after Chrome is started
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### Option C — Clone the Repository (contributors / full source)
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
git clone https://github.com/ironclawdevs27/Argus.git
|
|
180
|
+
cd Argus
|
|
181
|
+
npm install
|
|
182
|
+
npm run init # interactive setup wizard
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Manual setup (skip the wizard):**
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
cp .env.example .env
|
|
189
|
+
# Fill in TARGET_DEV_URL and optional Slack tokens
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Then configure your routes in [src/config/targets.js](src/config/targets.js):
|
|
193
|
+
|
|
194
|
+
```js
|
|
195
|
+
export const routes = [
|
|
196
|
+
{ path: '/', name: 'Home', critical: true, waitFor: 'main' },
|
|
197
|
+
{ path: '/login', name: 'Login', critical: true, waitFor: 'form' },
|
|
198
|
+
{ path: '/dashboard', name: 'Dashboard', critical: true, waitFor: '[data-testid="dashboard"]' },
|
|
199
|
+
{ path: '/settings', name: 'Settings', critical: false, waitFor: null },
|
|
200
|
+
];
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
- `critical: true` — errors on this route go to `#bugs-critical`
|
|
204
|
+
- `waitFor` — CSS selector Argus waits for before capturing (signals page-ready)
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## CLI Commands
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
npm run chrome # Launch Chrome with --remote-debugging-port=9222 (auto-detects binary)
|
|
212
|
+
npm run doctor # Pre-flight check: Chrome reachable, .mcp.json valid, .env has TARGET_DEV_URL
|
|
213
|
+
npm run crawl # Batch audit of all configured routes
|
|
214
|
+
npm run compare # Dev vs staging diff (CSS-only if no staging URL)
|
|
215
|
+
npm run watch # Passive monitor — polls open Chrome tab every 1s
|
|
216
|
+
npm run report:html # Generate reports/report.html from last JSON audit
|
|
217
|
+
npm run report:pdf # Export HTML report to A4 PDF (requires: npm install puppeteer)
|
|
218
|
+
npm run server # Start Slack slash-command server (port 3001)
|
|
219
|
+
npm run init # Interactive setup wizard
|
|
220
|
+
npm run test:unit # 61 unit tests — no Chrome required
|
|
221
|
+
npm run test:harness # 142-block correctness harness — requires Chrome
|
|
222
|
+
npm run test:harness:log # same, but tees full output to harness-results.txt
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Watch mode** — live monitoring as you develop:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
# Terminal 1: start your app
|
|
229
|
+
npm run dev
|
|
230
|
+
|
|
231
|
+
# Terminal 2: start Argus watcher
|
|
232
|
+
npm run watch
|
|
233
|
+
# Ctrl+C → stops monitor and writes reports/report.html
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Slack slash command** (on-demand from any channel):
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
/argus-retest https://staging.example.com/checkout
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
To expose the server via tunnel: `cloudflared tunnel --url http://localhost:3001` (free, no account required). Set the resulting URL as the Request URL in Slack App → Slash Commands.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## GitHub Actions CI
|
|
247
|
+
|
|
248
|
+
Add to your repo's secrets (Settings → Secrets → Actions):
|
|
249
|
+
|
|
250
|
+
| Secret | Required | Value |
|
|
251
|
+
|---|---|---|
|
|
252
|
+
| `TARGET_STAGING_URL` | Yes | Your staging base URL |
|
|
253
|
+
| `SLACK_BOT_TOKEN` | No | `xoxb-...` token (omit for HTML-only mode) |
|
|
254
|
+
| `SLACK_CHANNEL_CRITICAL` | No* | Channel ID (needed when Slack is configured) |
|
|
255
|
+
| `SLACK_CHANNEL_WARNINGS` | No* | Channel ID |
|
|
256
|
+
| `SLACK_CHANNEL_DIGEST` | No* | Channel ID |
|
|
257
|
+
| `GITHUB_TOKEN` | No | Auto-injected by Actions for PR comments + Check Runs |
|
|
258
|
+
|
|
259
|
+
The included [workflow](.github/workflows/argus.yml) runs on push to `main`, daily at 6 AM UTC, and on manual trigger. If critical issues are found, the pipeline fails.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Environment Variables
|
|
264
|
+
|
|
265
|
+
<details>
|
|
266
|
+
<summary>Full reference (click to expand)</summary>
|
|
267
|
+
|
|
268
|
+
| Variable | Default | Description |
|
|
269
|
+
|---|---|---|
|
|
270
|
+
| `TARGET_DEV_URL` | — | **Required.** Base URL of your dev environment |
|
|
271
|
+
| `TARGET_STAGING_URL` | — | Staging URL — enables `argus_compare`; omit for CSS-only mode |
|
|
272
|
+
| `SLACK_BOT_TOKEN` | — | `xoxb-...` token. Omit for local `report.html` mode |
|
|
273
|
+
| `SLACK_SIGNING_SECRET` | — | For `/argus-retest` slash command verification |
|
|
274
|
+
| `SLACK_CHANNEL_CRITICAL` | — | Channel ID for critical bugs |
|
|
275
|
+
| `SLACK_CHANNEL_WARNINGS` | — | Channel ID for warnings |
|
|
276
|
+
| `SLACK_CHANNEL_DIGEST` | — | Channel ID for info / daily digest |
|
|
277
|
+
| `PORT` | `3001` | Slack slash-command server port |
|
|
278
|
+
| `REPORT_OUTPUT_DIR` | `./reports` | Where to write JSON reports |
|
|
279
|
+
| `ARGUS_CONCURRENCY` | `1` | Parallel MCP clients for route crawling |
|
|
280
|
+
| `ARGUS_LOG_LEVEL` | `info` | `trace` / `debug` / `info` / `warn` / `error` |
|
|
281
|
+
| `ARGUS_LOG_PRETTY` | — | Set `1` for human-readable logs in dev |
|
|
282
|
+
| `ARGUS_RETRY_ATTEMPTS` | `3` | Max retries for `navigate`/`fill` MCP calls |
|
|
283
|
+
| `ARGUS_WATCH_INTERVAL_MS` | `1000` | Watch mode poll interval (ms) |
|
|
284
|
+
| `ARGUS_WATCH_UI_PORT` | `3002` | Watch mode web dashboard port |
|
|
285
|
+
| `ARGUS_SOURCE_DIR` | — | App source path — enables env-var / feature-flag / dead-route analysis |
|
|
286
|
+
| `ARGUS_ENV_FILE` | — | Path to app `.env` for codebase cross-reference |
|
|
287
|
+
| `SCREENSHOT_DIFF_THRESHOLD` | `0.5` | Pixel diff % threshold for environment comparison |
|
|
288
|
+
| `GITHUB_TOKEN` | — | For PR comments + Check Runs |
|
|
289
|
+
| `GITHUB_REPOSITORY` | — | `owner/repo` format |
|
|
290
|
+
| `GITHUB_PR_NUMBER` | — | Auto-injected by Actions from PR context |
|
|
291
|
+
| `ARGUS_CRITICAL_THRESHOLD` | `1` | New criticals before blocking merge (0 = never block) |
|
|
292
|
+
| `ARGUS_DIFF_IMAGE_URL` | — | Visual diff image URL to embed in PR comment |
|
|
293
|
+
| `OTEL_EXPORTER_OTLP_ENDPOINT` | — | OTLP collector for Jaeger / Grafana Tempo |
|
|
294
|
+
| `FIGMA_API_TOKEN` | — | Required for `argus_design_audit` |
|
|
295
|
+
| `FONT_SLOW_MS` | `1000` | Slow web font load threshold (ms) |
|
|
296
|
+
| `A11Y_CONTRAST_AA` | `4.5` | WCAG AA min contrast ratio for CVD simulation |
|
|
297
|
+
|
|
298
|
+
</details>
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Troubleshooting
|
|
303
|
+
|
|
304
|
+
**Chrome DevTools MCP not connecting**
|
|
305
|
+
```bash
|
|
306
|
+
claude mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
|
|
307
|
+
# Restart Claude Code after adding
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Slack messages not posting**
|
|
311
|
+
- Token must start with `xoxb-` (not `xoxp-`, `xoxe-`, or `xapp-`)
|
|
312
|
+
- Run `/invite @BugBot` in each channel
|
|
313
|
+
- Required scopes: `chat:write`, `files:write`, `files:read`
|
|
314
|
+
|
|
315
|
+
**Screenshots are blank**
|
|
316
|
+
- Page hasn't settled — increase `pageSettleMs` in `src/config/targets.js` or add a `waitFor` selector for the route
|
|
317
|
+
|
|
318
|
+
**`/argus-retest` returns "dispatch_failed"**
|
|
319
|
+
- Tunnel URL changed — update the Request URL in Slack App → Slash Commands and reinstall
|
|
320
|
+
|
|
321
|
+
**CSS analysis returns empty results**
|
|
322
|
+
- Page may be behind auth — ensure you're logged in on the Chrome instance Argus is controlling
|
|
323
|
+
|
|
324
|
+
**CI pipeline fails immediately**
|
|
325
|
+
- Chrome may not start fast enough — increase `sleep 3` to `sleep 5` in [.github/workflows/argus.yml](.github/workflows/argus.yml)
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## How Argus Differs From Playwright / Cypress
|
|
330
|
+
|
|
331
|
+
Argus is a **complementary layer**, not a replacement for unit or E2E tests:
|
|
332
|
+
|
|
333
|
+
| | Playwright / Cypress | Argus |
|
|
334
|
+
|---|---|---|
|
|
335
|
+
| **Purpose** | Test your logic and API contracts | Catch what the user actually sees |
|
|
336
|
+
| **What it catches** | Regressions in behavior | CSS drift, visual regressions, API loops, console noise, perf budgets |
|
|
337
|
+
| **When it runs** | In your test suite | Continuously, on the live running app |
|
|
338
|
+
| **Setup** | Write test files | Configure routes in `targets.js` |
|
|
339
|
+
| **Output** | Pass / fail | Structured Slack reports with screenshots |
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Known Limitations
|
|
344
|
+
|
|
345
|
+
All 688 harness assertions pass (`688/688`) — there are currently no known MCP- or Chrome-layer restrictions. Soft assertions (Lighthouse, performance traces) still require non-headless Chrome and are skipped in headless CI.
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## Project Structure
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
src/
|
|
353
|
+
argus.js — single-page audit entry point
|
|
354
|
+
mcp-server.js — 9 MCP tools exposed to Claude / any MCP client
|
|
355
|
+
orchestration/ — crawl loop, Slack/GitHub dispatch, env comparison, watch mode
|
|
356
|
+
utils/ — 32 analysis engines (accessibility, security, performance, PDF, recording, etc.)
|
|
357
|
+
adapters/browser.js — CdpBrowserAdapter — wraps all chrome-devtools-mcp calls
|
|
358
|
+
config/targets.js — routes, thresholds, auth steps
|
|
359
|
+
cli/
|
|
360
|
+
init.js — argus init interactive setup wizard
|
|
361
|
+
chrome-launcher.js — npm run chrome / argus-chrome — launches Chrome with correct flags
|
|
362
|
+
doctor.js — npm run doctor / argus-doctor — pre-flight checks
|
|
363
|
+
pr-validate.js — headless CI entry point for GitHub Actions
|
|
364
|
+
test-harness/ — 142-block correctness harness, 688 hard assertions, 62 fixture pages
|
|
365
|
+
test/unit/ — 61 Vitest unit tests (no Chrome required)
|
|
366
|
+
landing/ — Product landing page (React 19 + Vite + Tailwind)
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Full source map → [CLAUDE.md](CLAUDE.md) · MCP/DSL reference → [SKILL.md](SKILL.md)
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## Contributing
|
|
374
|
+
|
|
375
|
+
1. Fork the repo and create a branch
|
|
376
|
+
2. `npm run test:unit` — verify without Chrome (61 tests)
|
|
377
|
+
3. `npm run test:harness` — full integration coverage (requires Chrome on port 9222)
|
|
378
|
+
4. Open a PR — Argus audits itself via the CI workflow
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## License
|
|
383
|
+
|
|
384
|
+
MIT © [ironclawdevs27](https://github.com/ironclawdevs27)
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
<div align="center">
|
|
389
|
+
|
|
390
|
+
*Argus Panoptes — the all-seeing giant of Greek mythology who never slept.*
|
|
391
|
+
|
|
392
|
+
[argus-qa.com](https://argus-qa.com) · [npm](https://www.npmjs.com/package/argusqa-os) · [MCP Registry](https://glama.ai/mcp/servers/ironclawdevs27/Argus)
|
|
393
|
+
|
|
394
|
+
</div>
|