# Ditherer — Agent Guidelines ## Project Overview Ditherer is a browser-based image/video processing tool. Users load an image, select a dithering algorithm (or other effect), adjust parameters via a control panel, and apply the filter. The app also supports video frame processing, palette extraction, and state export/import via URL. **Stack:** React 19, Vite, TypeScript, Rust/WASM (color space conversions), cmdk + Radix UI for the filter picker. **Quick reference:** `npm run dev` (dev server) · `npm run build` (production build to `build/`) · `npm run test` (Vitest) · `npm run lint` (eslint). --- ## Architecture ### Component Hierarchy (Atomic Design) The UI follows an implicit atomic design pattern: **Tokens** — Design primitives defined in CSS custom properties: - Colors: `--light-gray`, `--gray`, `--beautiful-blue`, `--bg-color` - Layout values are inline (no token system yet) **Atoms** — Leaf control components in `src/components/controls/`. Each renders a single HTML control: - `Range.tsx` — `` with editable value display - `Bool.tsx` — `` - `Enum.tsx` — `` - `Textly.tsx` — `