frontend
Frontend
This file is a router, not a rulebook. The rules live in four rulesets under references/; your first job is to load the smallest set of files that covers the request, state which you loaded in one sentence, then execute under their guidance. Loading nothing and freestyling produces the generic AI-slop output this skill exists to prevent; loading everything wastes context and creates contradictory instructions.
The bar is not clean-and-correct — it is work a senior designer at Linear, Stripe, or Supabase would ship. Correct-but-flat is a failure, not a finish. Protect the surface as hard as you protect the build: design is a first-class deliverable, not a one-shot decision you lock and walk away from.
Phase 0 — Route (before any UI work)
| Request involves… | Read |
|---|---|
| ANY UI implementation, styling, redesign, mockup, or visual decision | references/design/README.md FIRST. It enforces two mandatory gates — the Design System Gate (a DESIGN.md must exist before any component is written) and the React Dev Tooling Gate (react-grab / react-scan / react-doctor installed by default) — then routes to the taste and brand references below. |
| Writing or modifying frontend code, OR auditing performance / SEO / accessibility / quality | ALSO references/perfection/README.md. Lighthouse 100 in every category, measured on real Playwright Chromium (never the lighthouse CLI), achieved through architecture — never by dropping animations or hiding content. |
| Looking up a concrete style, color palette, font pairing, chart type, landing-page structure, or UX guideline — or generating a project design system from keywords | references/ui-ux-db/README.md. A searchable CSV database with a CLI; a lookup tool, not a posture. Load on demand; design stays the source of truth for taste and the DESIGN.md contract. |
| Design operating-layer work: personas, cognitive accessibility, design critique, design debt, handoff, synthetic user testing, or designpowers-style guidance | references/designpowers/README.md. This is an internal frontend ruleset, not a separate skill. It enriches /frontend routing with design brief, role-reference, accessibility, evidence, and debt language while preserving the design and perfection gates. |
For implementation work, design + perfection load together. A page that hits Lighthouse 100 but looks like AI slop has failed; a page that looks beautiful but ships a 2 MB bundle has failed. Both win or neither does.