Passing npm run build and tsc --noEmit only proves your TypeScript syntax compiled. When an AI coding agent builds a frontend feature, the bugs that actually break production happen at runtime in the browser, in the CSS cascade, and in exposed API routes.
To give both human developers and coding agents (Claude Code, Cursor, Windsurf, Copilot) a deterministic verification loop, I built three open-source TypeScript CLI and MCP tools that run locally in seconds.
Step 1: Catch Runtime Browser Failures Across 3 Viewports with ghost-qa
When you run:
npx -y ghost-qa test http://localhost:3000
ghost-qa (https://github.com/avivgerz-hue/ghost-qa) launches headless Playwright against your live dev server (localhost:3000 or localhost:5173), crawls your routes across Desktop (1440x900), Tablet (768x1024), and Mobile (375x812), and inspects 8 runtime traps:
-
Console & Uncaught Page Exceptions: Hydration mismatches, undefined property reads, and runtime crashes that never show up in
tsc. -
Failed Network & API Requests: Silent
4xx/5xxfetches, CORS failures, and broken asset URLs. -
Layout & Spatial Collisions: Horizontal mobile overflow, overlapping sibling elements, clipped text, and interactive buttons smaller than the
44x44pxtouch target minimum. - Accessibility & Keyboard Tab-Order: Missing accessible names, broken ARIA roles, and dead focus traps.
- Performance & Core Web Vitals: DOM bloat, render-blocking assets, and slow page timings.
- Link Integrity: Dead internal routes and broken anchors.
- SEO & Social Graph Completeness: Missing canonical tags, titles, or OpenGraph metadata.
- Dark / Light Theme Parity: Unstyled elements when toggling color schemes.
It outputs a QA Health Score (0–100, A+ to F) plus a self-contained interactive report.html with viewport screenshots and a ghost_qa_compare baseline diff tool.
Step 2: Audit 72 UI & CSS Design Craft Rules with unslop
Even when a page renders without crashing, AI agents default to recognizable "AI UI slop": low-contrast gray text on dark cards, 5 competing font sizes in one card, arbitrary spacing values, and generic purple-to-blue gradients.
When you run:
npx -y unslop-mcp audit .
unslop (https://github.com/avivgerz-hue/unslop) statically analyzes your JSX/TSX, HTML, Vue, Svelte, CSS, and Tailwind files across 72 rules and 7 design pillars:
- Color & Atmospheric Polarity: Computes true WCAG 2.1 AA/AAA and APCA perceptual contrast math across your foreground/background token pairs.
-
Typography & Scannable Hierarchy: Flags competing font scales, missing line-length caps (
max-w-prose), and uncalibrated tracking. - Layout & Spatial Architecture: Enforces consistent grid rhythm and spacing tokens.
-
Surface & Elevation, Copy, Motion & Token Architecture: Replaces generic AI defaults with 10 curated studio design archetypes (
swiss-editorial,linear-precision,anthropic-warm-editorial,neo-brutalist, and more) and generates a prioritizedUNSLOP-REPORT.mdrefactor blueprint.
Step 3: Scan 92 Security & Agent-Poisoning Rules with vibe-shield
Finally, before pushing your branch:
npx -y @vibefoundry/vibe-shield@latest scan .
vibe-shield (https://github.com/avivgerz-hue/vibe-shield) runs 92 static security rules (80 application code rules + 12 MCP/Agent Skill poisoning rules) mapped to OWASP Top 10:2025 and CWE:
- Catches
SUPABASE_SERVICE_ROLE_KEYand private secrets imported into"use client"bundles. - Flags unauthenticated Next.js API routes, Server Actions, and Stripe checkout endpoints.
- Detects SQL migrations that enable RLS with permissive
USING (true)policies. - Audits third-party
SKILL.md,.cursorrules, and.mcp.jsonfiles for hidden Unicode prompt injection and credential exfiltration.
Connect All Three to Your Coding Agent in One Command
Each tool includes an init command (npx -y @vibefoundry/vibe-shield@latest init, npx -y ghost-qa init, npx -y unslop-mcp init) that automatically wires up MCP configs and SKILL.md rules for Claude Code, Cursor, Windsurf, Copilot, Cline, Roo, OpenCode, and Zed:
- vibe-shield: https://github.com/avivgerz-hue/vibe-shield
- ghost-qa: https://github.com/avivgerz-hue/ghost-qa
- unslop: https://github.com/avivgerz-hue/unslop
Give them a run on your current project—and if they catch something useful, a star on GitHub is hugely appreciated!
Top comments (1)
The gap between
tsc --noEmitand what breaks production is real: type checking can't see a hydration mismatch, a silently failing fetch, or an element that only overflows at 375px. Running headless Playwright across fixed desktop/tablet/mobile viewports and checking console exceptions, failed requests, and spatial collisions catches the class of bugs a build never will, and treating these as deterministic gates in CI keeps an agent-generated UI from slipping through on visuals alone. The touch-target and ARIA/tab-order traps are worth keeping in the set too; AI-generated interfaces frequently ship usable-looking layouts that fail keyboard or screen-reader use. The same loop applies to Electron renderers: automated sweeps over window resizes and device-scale factors surface overflow and runtime renderer errors that compile-time checks miss.