$ show pbakaus/impeccable
Impeccable is a design-quality and anti-pattern detection engine for front-end web projects, primarily targeting AI-generated UI. It provides a Rust-based CLI, a WASM browser extension core, and a distributed skill system that plugs into over 20 AI coding assistants (Claude, Cursor, Gemini, etc.). The system runs deterministic detection rules against HTML/CSS to flag common issues like poor contrast, typography problems, layout flaws, and 'AI slop' patterns, and also supports live browser iteration with session management, component review workflows, and comp-vs-build image comparison. All detection logic is implemented as a port of a JavaScript reference, with extensive vector-replay tests to maintain byte-for-byte behavioral parity. Architecturally, the repository is a large Rust workspace with 14+ crates handling distinct concerns: static HTML parsing and CSS cascade (`crates/html`), rule evaluation (`crates/foundation`, `crates/core`), browser automation via CDP (`crates/browser`), live-mode HTTP servers and session management (`crates/live`), and skill packaging/distribution (`crates/skills`, `scripts/`). A Chrome DevTools extension embeds the WASM core for in-page scanning. The project is actively maintained with respect to both the Rust core and the constantly shifting AI-harness integration surface, though that breadth introduces significant drift risk across duplicated skill assets and provider-specific configuration. The codebase demonstrates strong engineering disciplineβclean abstractions, pervasive testing, and careful parity managementβbut the sheer scale and duplication in the skill/plugin tree reduces overall reusability.
The LLM identified 4 files worth highlighting for reuse:
Provides an `Io` struct that abstracts stdin/stdout/stderr, environment variables, and current directory, making CLI components testable without process-global access. Also includes a `process_env()` helper for UTF-8-safe environment collection. This is a clean, cross-cutting utility that can be extracted into any Rust CLI project to improve testability.
Implements a rule-pack extension mechanism that allows downstream crates (e.g., `crates/core`, `crates/detect`) to register additional detection rules without forking the main engine. It defines a clear trait and registry pattern, demonstrating how to decouple rule definitions from execution. Highly reusable for building any rule-based scoring or linting system.
A comprehensive CSS cascade implementation that reproduces css-tree behavior with tolerant parsing, shorthand expansion, and custom-property handling. Includes a generic `SpecifiedStore` for priority-based declaration merging. This module is a self-contained CSS processing library that could be repurposed for tools needing accurate CSS value normalization and cascade resolution.
Provides bounded capture of network responses over Chrome DevTools Protocol, with size limits, BOM-aware text decoding, and support for preserving original bytes. Handles edge cases like repeated URLs and large documents. This is a focused utility for any tool that needs to intercept and analyze network traffic from a headless browser, demonstrating solid async and memory-management patterns.