Labsco
ironclawdevs27 logo

Argus

β˜… 5

from ironclawdevs27

AI-powered QA harness that catches JS errors, accessibility failures, visual regressions, and security issues via Chrome DevTools MCP β€” no test scripts required.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup
<div align="center">

Argus β€” AI-Powered Automated QA

npm MCP Server Harness License: MIT

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).

Quick Start Β· Features Β· Setup Β· MCP Tools Β· CLI Commands Β· Troubleshooting Β· Full Reference

</div>

What Argus Catches

32 analysis engines, 149 distinct issue types, zero test-file maintenance:

CategoryWhat it detects
JavaScriptUncaught exceptions, unhandled promise rejections, console.error on critical routes
Network & APIHTTP 5xx, 401/403 auth failures, duplicate API calls (infinite loops), 4xx errors, broken links
PerformanceLCP > 2500ms, CLS > 0.1, TTFB > 800ms, slow APIs > 1s/3s, payloads > 500KB/2MB, JS bundles > 500KB
Accessibilityaxe-core (80+ WCAG rules), color-blind simulation, missing ARIA, keyboard focus, heading hierarchy
SEOMissing meta description, OG tags, canonical, viewport, h1
SecurityAuth tokens in localStorage/URL, eval(), missing CSP/X-Frame-Options, CSP violations, missing SRI on external scripts, source map exposure, open redirects, npm CVEs
CSSCascade overrides, component style leaks, unused rules, React inline style conflicts
Contentnull/undefined as visible text, lorem ipsum, broken images, empty data lists
ResponsiveHorizontal overflow at 375px/768px, touch targets < 44Γ—44px
MemoryDetached DOM nodes via V8 heap snapshot, heap growth across navigation
VisualPixel-level screenshot regression via pixelmatch (β‰₯0.1% warning, β‰₯5% critical)
FigmaDesign-to-implementation fidelity β€” 13 property types (color, spacing, typography, shadows, etc.)
FormsMissing required, autocomplete, aria-describedby; unlabelled inputs
FontsFOIT, FOUT, missing fallbacks, slow loads > 1s, suboptimal formats
Motionprefers-reduced-motion violations, autoplay without pause controls
Network baselineNew requests, missing requests, status-code regressions vs saved HAR baseline
Environment diffDev vs staging β€” screenshot diff, DOM changes, console/network regressions

And every finding is post-processed with:

Post-processorWhat it adds
Intelligent baseline filteringFindings 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)
Root cause linkingNew findings are annotated with the recent git commits and files most likely to have caused them (ARGUS_ROOT_CAUSE=0 to disable)

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.


Confidentiality β€” Aegis Egress Boundary

Default ON. Argus audits your app for secrets and vulnerabilities β€” so its findings are exactly the data you least want leaving your machine. Aegis redacts them at every external boundary before they cross.

A finding sent to an external sink β€” an MCP tool response (which lands in the calling agent's context window and transits to that agent's model provider), a Slack message, a GitHub PR comment + its ::error annotations, the hosted/CI HTML report, or CI logs β€” is reduced to a need-to-know projection: a sensitive finding crosses as its type + route + severity + a πŸ”’ marker, and never its raw payload (message, evidence, request/response bodies, headers, cookies, stack). URLs are projected with the query string stripped (tokens hide there). A benign finding keeps its message β€” but that message is still scrubbed for any accidentally-embedded secret or PII.

PrincipleBehavior
Local fidelity preservedThe on-disk JSON report and the locally-opened HTML keep 100% detail β€” redaction only removes detail on the way out
Fail-closedOn any classifier error or unknown finding shape, Aegis redacts more, never less
Deny-by-defaultOnly an explicit allowlist of safe fields ever crosses; a new field leaks nothing until deliberately allowlisted
5-layer detectionCategory rules βˆͺ 13 secret regexes βˆͺ statistical rarity (entropy / token-efficiency) βˆͺ 7 Luhn-validated PII rules βˆͺ context boosting
Opt-outARGUS_REDACT_SENSITIVE=0 β†’ output is byte-identical to pre-Aegis

This implements the OWASP LLM02:2025 β€” Sensitive Information Disclosure mitigations (data minimization, redaction, deny-by-default egress filtering) at Argus's own boundaries. An optional, local-only re-hydration vault (ARGUS_REDACT_VAULT=1) can mint reversible, information-free tokens for diff-stable artifacts β€” re-inflate locally with npm run report:rehydrate. Full behavior change is documented in CHANGELOG.md.


MCP Tools

Ask Claude (or any MCP client) β€” no terminal required:

ToolDescription
argus_auditFast pass β€” JS, network, accessibility, SEO, security, CSS, content
argus_audit_fullDeep pass β€” adds Lighthouse, responsive checks, memory leak detection, hover-state bugs
argus_compareDiff dev vs staging β€” screenshots, findings delta, environment regressions
argus_get_contextCapture everything broken on the open tab for Claude to diagnose
argus_watch_snapshotSnapshot the open tab without navigating (preserves auth/form state)
argus_last_reportReturn last JSON report without re-running
argus_design_auditFigma URL β†’ 13 design-token finding types (color, spacing, typography, shadows, etc.)
argus_visual_diffScreenshot baseline comparison. Pass updateBaseline: true to reset.
argus_pr_validateFetch GitHub PR diff β†’ map changed files to affected routes β†’ targeted audit β†’ baseline-aware block decision (blocks on findings the PR introduces) + idempotent PR comment + Check Run β†’ { blocked, findings, baseline, reporting }

Every tool response is projected through the Aegis egress boundary before it reaches the agent, and carries an optional redaction rider ({ redacted, total }) when sensitive detail was withheld.

Example prompts:

Run argus_audit on http://localhost:3000/checkout
Run argus_audit_full on http://localhost:3000/dashboard
Run argus_compare
Run argus_get_context

CLI Commands

npm run chrome         # Launch Chrome with --remote-debugging-port=9222 (auto-detects binary)
npm run doctor         # Pre-flight check: Chrome reachable, .mcp.json valid, .env has TARGET_DEV_URL
npm run crawl          # Batch audit of all configured routes
npm run compare        # Dev vs staging diff (CSS-only if no staging URL)
npm run watch          # Passive monitor β€” polls open Chrome tab every 1s
npm run report:html    # Generate reports/report.html from last JSON audit
npm run report:pdf     # Export HTML report to A4 PDF (requires: npm install puppeteer)
npm run server         # Start Slack slash-command server (port 3001)
npm run init           # Interactive setup wizard
npm run test:unit          # 495 unit tests β€” no Chrome required
npm run test:harness       # 168-block correctness harness β€” requires Chrome
npm run test:harness:log   # same, but tees full output to harness-results.txt
npm run test:coverage      # merged unit + harness coverage gate (requires Chrome)

Watch mode β€” live monitoring as you develop:

# Terminal 1: start your app
npm run dev

# Terminal 2: start Argus watcher
npm run watch
# Ctrl+C β†’ stops monitor and writes reports/report.html

Slack slash command (on-demand from any channel):

/argus-retest https://staging.example.com/checkout

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.


GitHub Actions CI

Add to your repo's secrets (Settings β†’ Secrets β†’ Actions):

SecretRequiredValue
TARGET_STAGING_URLYesYour staging base URL
SLACK_BOT_TOKENNoxoxb-... token (omit for HTML-only mode)
SLACK_CHANNEL_CRITICALNo*Channel ID (needed when Slack is configured)
SLACK_CHANNEL_WARNINGSNo*Channel ID
SLACK_CHANNEL_DIGESTNo*Channel ID
GITHUB_TOKENNoAuto-injected by Actions for PR comments + Check Runs

The included workflow runs on push to main, daily at 6 AM UTC, and on manual trigger. If critical issues are found, the pipeline fails.


Environment Variables

<details> <summary>Full reference (click to expand)</summary>
VariableDefaultDescription
TARGET_DEV_URLβ€”Required. Base URL of your dev environment
TARGET_STAGING_URLβ€”Staging URL β€” enables argus_compare; omit for CSS-only mode
SLACK_BOT_TOKENβ€”xoxb-... token. Omit for local report.html mode
SLACK_SIGNING_SECRETβ€”For /argus-retest slash command verification
SLACK_CHANNEL_CRITICALβ€”Channel ID for critical bugs
SLACK_CHANNEL_WARNINGSβ€”Channel ID for warnings
SLACK_CHANNEL_DIGESTβ€”Channel ID for info / daily digest
PORT3001Slack slash-command server port
REPORT_OUTPUT_DIR./reportsWhere to write JSON reports
ARGUS_CONCURRENCY1Parallel MCP clients for route crawling
ARGUS_LOG_LEVELinfotrace / debug / info / warn / error
ARGUS_LOG_PRETTYβ€”Set 1 for human-readable logs in dev
ARGUS_RETRY_ATTEMPTS3Max retries for navigate/fill MCP calls
ARGUS_WATCH_INTERVAL_MS1000Watch mode poll interval (ms)
ARGUS_WATCH_UI_PORT3002Watch mode web dashboard port
ARGUS_SOURCE_DIRβ€”App source path β€” enables env-var / feature-flag / dead-route analysis and framework-aware PR route mapping (import-graph: a changed component/stylesheet β†’ only the routes that render it)
ARGUS_ENV_FILEβ€”Path to app .env for codebase cross-reference
SCREENSHOT_DIFF_THRESHOLD0.5Pixel diff % threshold for environment comparison
GITHUB_TOKENβ€”For PR comments + Check Runs
GITHUB_REPOSITORYβ€”owner/repo format
GITHUB_PR_NUMBERβ€”Auto-injected by Actions from PR context
ARGUS_CRITICAL_THRESHOLD1New criticals before blocking merge (0 = never block)
ARGUS_DIFF_IMAGE_URLβ€”Visual diff image URL to embed in PR comment
OTEL_EXPORTER_OTLP_ENDPOINTβ€”OTLP collector for Jaeger / Grafana Tempo
FIGMA_API_TOKENβ€”Required for argus_design_audit
FONT_SLOW_MS1000Slow web font load threshold (ms)
A11Y_CONTRAST_AA4.5WCAG AA min contrast ratio for CVD simulation
ARGUS_REDACT_SENSITIVEONAegis egress redaction. 0 disables (byte-identical pre-Aegis output)
ARGUS_REDACT_MODEmaskMatched-span style: mask / label / hash / token / drop
ARGUS_REDACT_HTMLoff local / ON in CI1 redacts the hosted HTML report too
ARGUS_REDACT_VAULTOFF1 (with ARGUS_REDACT_MODE=token) mints reversible AEGIS_<hmac16> tokens into a local 0600 vault; re-inflate with npm run report:rehydrate
</details>

How Argus Differs From Playwright / Cypress

Argus is a complementary layer, not a replacement for unit or E2E tests:

Playwright / CypressArgus
PurposeTest your logic and API contractsCatch what the user actually sees
What it catchesRegressions in behaviorCSS drift, visual regressions, API loops, console noise, perf budgets
When it runsIn your test suiteContinuously, on the live running app
SetupWrite test filesConfigure routes in targets.js
OutputPass / failStructured Slack reports with screenshots

Project Structure

src/
  argus.js              β€” single-page audit entry point
  mcp-server.js         β€” 9 MCP tools exposed to Claude / any MCP client
  orchestration/        β€” crawl loop, Slack/GitHub dispatch, env comparison, watch mode
  utils/                β€” 32 analysis engines (accessibility, security, performance, PDF, recording, etc.)
  adapters/browser.js   β€” CdpBrowserAdapter β€” wraps all chrome-devtools-mcp calls
  config/targets.js     β€” routes, thresholds, auth steps
  cli/
    init.js             β€” argus init interactive setup wizard
    chrome-launcher.js  β€” npm run chrome / argus-chrome β€” launches Chrome with correct flags
    doctor.js           β€” npm run doctor / argus-doctor β€” pre-flight checks
    pr-validate.js      β€” headless CI entry point for GitHub Actions
test-harness/           β€” 168-block correctness harness, 978 hard assertions, 64 fixture pages
test/unit/              β€” 495 Vitest unit tests (no Chrome required)
landing/                β€” Product landing page (React 19 + Vite + Tailwind)

Full source map β†’ CLAUDE.md Β· MCP/DSL reference β†’ SKILL.md