git:20260807.975fe85 to git:20260807.fac9f85

83 added, 283 removed. Audit A to A.

---
name: interface-design
- description: Design and build production web interfaces with coherent typography, color, layout, states, and motion. Use when creating pages, dashboards, or components.
+ description: Design and implement production web interfaces from product, content, brand, and interaction evidence. Use when creating or redesigning pages, dashboards, workflows, or components.
license: MIT
---
# Interface design
- Build a complete, functional interface with an intentional system. Use the configurable foundations below as starting points, then adapt them to the product, audience, content, and existing brand. Do not expose the author's personal name as the design rationale.
-
- ---
-
- ## Step 1: Ask these 4 questions before touching code
-
- Ask all four in one message. Numbered list per question. Show defaults clearly.
-
- ```
- Before I build this, 4 quick questions:
-
- 1. Foundation — what's the base surface?
- A) Void black (#0a0a0a) — the default. Pure, maximum contrast.
- B) Off-white (#FAFAF7) — warm cream light mode
- C) Warm dark (#110E0B) — dark but brownish, editorial
- D) Cool slate (#0B0F1A) — dark with blue depth
- E) Pure white (#FFFFFF) — clinical, high-structure
-
- 2. Accent — one color that pops against your base:
- [show only the accents that harmonize with the chosen foundation — see table below]
-
- 3. Typography — pick a pair:
- A) Geist + JetBrains Mono — clean, precise, the default
- B) Instrument Serif + Geist Sans — editorial, luxury
- C) Bricolage Grotesque + JetBrains Mono — bold, expressive
- D) DM Sans + DM Mono — neutral, product-grade
- E) Syne + Space Mono — artistic, unconventional
- F) Plus Jakarta Sans + Fira Code — warm, modern
-
- 4. Motion — what level of animation?
- A) Static — no motion, CSS transitions only
- B) Subtle — entrance fades and stagger only
- C) Full — page load orchestration, hover states, scroll triggers
- ```
-
- ---
-
- ## Color System
-
- ### Foundations
-
- | ID | Name | bg | surface | surface-raised | border | border-hover | text | muted | heading |
- |---|---|---|---|---|---|---|---|---|---|
- | A | Void Black | `#0a0a0a` | `#111111` | `#181818` | `#262626` | `#3a3a3a` | `#a3a3a3` | `#6b6b6b` | `#FAFAFA` |
- | B | Off-white | `#FAFAF7` | `#F0EDE8` | `#E8E4DD` | `#D8D4CE` | `#C0BAB2` | `#3C3A37` | `#7A766F` | `#09090B` |
- | C | Warm Dark | `#110E0B` | `#1A1612` | `#221E1A` | `#2E2924` | `#3D3730` | `#B8AFA6` | `#6B6259` | `#FAFAFA` |
- | D | Cool Slate | `#0B0F1A` | `#111827` | `#1F2937` | `#374151` | `#4B5563` | `#9CA3AF` | `#6B7280` | `#FAFAFA` |
- | E | Pure White | `#FFFFFF` | `#F9F9F9` | `#F0F0F0` | `#E4E4E7` | `#D4D4D8` | `#3F3F46` | `#A1A1AA` | `#09090B` |
-
- ### Accents by Foundation Compatibility
-
- | Accent | Hex | Best with | Why |
- |---|---|---|---|
- | Ember Orange | `#FF5E33` | A, C | The signature. Complementary to teal. Warm-dark's natural pair. |
- | Amber Gold | `#E8C547` | A, D | Analogous to orange. Triadic with teal + violet. |
- | Teal Jade | `#14B8A6` | A, B, D | Complement to orange/red. Calm authority. |
- | Electric Blue | `#3B82F6` | A, D | Monochromatic with slate. Trust signal. |
- | Coral Rose | `#F43F5E` | B, E | Warm accent for light modes. Bold on white. |
- | Sage Emerald | `#10B981` | B, C, E | Growth, calm. Works light or warm dark. |
- | Deep Violet | `#8B5CF6` | A, D | Split complement to yellow. Premium, creative. |
- | Sand Nude | `#C4A882` | B, C | Muted, editorial. Warmth without saturation. |
-
- **Rule:** One accent only. It appears on: active states, `::selection`, hover border lifts, icon buttons, and key data points. Nowhere else. The primary CTA is never the accent.
-
- ---
-
- ## Typography Pairings
-
- | ID | Display | Body | Mono | Source |
- |---|---|---|---|---|
- | A | Geist Sans 600–700 | Geist Sans 400 | JetBrains Mono | `@fontsource/geist` |
- | B | Instrument Serif | Geist Sans | JetBrains Mono | Google Fonts |
- | C | Bricolage Grotesque 700 | Bricolage Grotesque 400 | JetBrains Mono | Google Fonts |
- | D | DM Sans 600 | DM Sans 400 | DM Mono | Google Fonts |
- | E | Syne 700–800 | Syne 400 | Space Mono | Google Fonts |
- | F | Plus Jakarta Sans 600 | Plus Jakarta Sans 400 | Fira Code | Google Fonts |
-
- **Typography rules — always apply regardless of pairing:**
- - Display/h1: `letter-spacing: -0.02em; line-height: 1.1`
- - Body: `line-height: 1.7; font-size: 15px`
- - Labels: `font-family: mono; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted)`
- - `webkit-font-smoothing: antialiased` always
- - `font-feature-settings: "ss01" on, "cv01" on` when using Geist
-
- ---
-
- ## Component Contracts
-
- These are non-negotiable. Every component adapts to the chosen foundation and accent but must match these structural patterns.
-
- ### Card
- ```css
- border: 1px solid var(--border);
- background: var(--surface);
- border-radius: 12px;
- padding: 20px 24px;
- transition: border-color 150ms ease;
- &:hover { border-color: var(--border-hover); }
- ```
-
- ### Primary CTA
- ```css
- /* White on dark, black on light. NEVER the accent color. */
- background: var(--heading);
- color: var(--bg);
- border-radius: 8px;
- padding: 10px 18px;
- font-size: 14px;
- font-weight: 500;
- transition: opacity 120ms ease;
- &:hover { opacity: 0.9; }
- ```
-
- ### Secondary CTA
- ```css
- border: 1px solid var(--border-hover);
- color: var(--text);
- border-radius: 8px;
- padding: 10px 18px;
- font-size: 14px;
- background: transparent;
- transition: color 120ms ease, border-color 120ms ease;
- &:hover { color: var(--heading); border-color: var(--text); }
- ```
-
- ### Label / Section header
- ```css
- font-family: var(--font-mono);
- font-size: 11px;
- text-transform: uppercase;
- letter-spacing: 0.12em;
- color: var(--muted);
- margin-bottom: 24px;
- ```
-
- ### Badge / Pill
- ```css
- display: inline-flex; align-items: center; gap: 6px;
- border-radius: 9999px;
- border: 1px solid var(--border-hover);
- padding: 4px 10px;
- font-size: 11px;
- color: var(--text);
- ```
-
- ### Input (underline style)
- ```css
- border: none;
- border-bottom: 1px solid var(--border);
- background: transparent;
- outline: none;
- padding: 8px 0;
- color: var(--heading);
- font-size: 15px;
- transition: border-color 150ms ease;
- &:focus { border-color: var(--heading); }
- ```
+ Build a functional interface whose visual system, information architecture, states, and motion follow from the product's job. Preserve an effective existing system; do not replace it with a personal preset.
- ---
+ ## Establish the design problem
- ## Signature Details (hardcoded, non-negotiable)
+ Recover available context before asking questions:
- These apply regardless of what foundation/accent/font the user chooses:
+ - product, audience, primary task, and success condition;
+ - route or component scope and implementation stack;
+ - existing design tokens, components, assets, typography, and brand rules;
+ - content shape, density, hierarchy, and likely extremes;
+ - supported viewports, input methods, themes, and accessibility requirements;
+ - required states, data dependencies, and destructive or irreversible actions.
- ```css
- /* Selection always uses accent */
- ::selection {
- background: color-mix(in srgb, var(--accent) 25%, transparent);
- }
+ Ask only for unresolved choices that materially change the result. When the user has not chosen a visual direction, propose one or more reasoned directions from the product evidence and proceed with the most defensible option unless the choice is consequential or costly to reverse.
- /* Custom scrollbar */
- ::-webkit-scrollbar { width: 6px; }
- ::-webkit-scrollbar-track { background: transparent; }
- ::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }
+ ## Choose the working mode
- /* Font rendering */
- * { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
- ```
+ - **Extend** — reuse and improve an established system.
+ - **Redesign** — preserve product semantics while changing structure or visual language.
+ - **Greenfield** — create a small system from content and task requirements.
+ - **Explore** — present distinct directions or a design specification before implementation when the brief is intentionally open.
- ---
+ Do not erase existing brand decisions merely because common defaults are present. Do not preserve them merely because they exist; evaluate whether they support the task.
- ## Layout System
+ ## Model the interface job
- - Content max-width: `max-w-2xl` (640px). Wide layouts: `max-w-5xl`
- - Page padding: `px-6 py-12 sm:py-16`
- - Section spacing: `mb-16` minimum, `mb-28` for major breaks
- - Card grid gap: `gap-4`
- - Borders do all layout separation — no box-shadows as dividers
+ Adapt the composition to the surface:
- ---
+ - **Marketing** — make proposition, product evidence, proof, and next action easy to evaluate.
+ - **Dashboard** — prioritize current state, frequent tasks, comparison, scanning, and useful density.
+ - **Form or workflow** — clarify sequence, requirements, validation, recovery, and completion.
+ - **Settings** — expose state and consequence; separate routine changes from dangerous actions.
+ - **Data table or analysis** — support sorting, filtering, comparison, selection, empty results, and overflow.
+ - **Documentation** — support orientation, navigation, readable examples, and long-form rhythm.
+ - **Consumer experience** — fit touch, attention, trust, and emotional tone to the actual context.
- ## Motion Contract
+ These are starting concerns, not layout templates. Let the content determine grouping and component anatomy.
- ### Default entrance
- ```js
- initial={{ opacity: 0, y: 16 }}
- animate={{ opacity: 1, y: 0 }}
- transition={{ duration: 0.4, ease: [0.23, 1, 0.32, 1] }}
- ```
+ ## Build the system
- ### Staggered list
- ```js
- // Parent
- variants={{ visible: { transition: { staggerChildren: 0.08 } } }}
- initial="hidden" whileInView="visible" viewport={{ once: true }}
+ Define or extend tokens only after deciding what roles the interface needs:
- // Child
- variants={{
- hidden: { opacity: 0, y: 16 },
- visible: { opacity: 1, y: 0, transition: { duration: 0.4, ease: [0.23, 1, 0.32, 1] } }
- }}
- ```
+ - surface and text hierarchy;
+ - semantic colors for action, information, success, warning, and danger;
+ - typography roles suited to language, density, and brand;
+ - spacing, measure, grid, and responsive behavior;
+ - radii, borders, shadows, and elevation with explicit component roles;
+ - motion durations and easing tied to state change or spatial continuity;
+ - focus, disabled, selected, loading, and error treatments.
- ### Always include reduced motion fallback
- ```js
- const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
- // If true: skip y transform, keep opacity fade only
- ```
+ Use the existing token format when one exists. For a greenfield system, keep the token set small enough to explain and broad enough to avoid one-off values. Common fonts, colors, or components are acceptable when they fit; novelty is not a goal.
- - **Static**: No Framer Motion. CSS `transition: opacity 200ms ease` only.
- - **Subtle**: Entrances + stagger only. No scroll-triggered parallax.
- - **Full**: Page load orchestration, hover states, `whileInView` on all sections.
+ ### Component contracts
- ---
+ For each material component, specify:
- ## UX Laws Applied
+ 1. semantic purpose and content model;
+ 2. variants that represent real roles rather than cosmetic permutations;
+ 3. interactive states and keyboard behavior;
+ 4. responsive and overflow behavior;
+ 5. accessible name, relationship, status, and focus behavior;
+ 6. loading, empty, error, success, and permission states when relevant.
- | Law | How it's applied |
- |---|---|
- | **Hick's Law** | Max 4 nav items. Max 3 primary CTAs per page. Limit visible choices. |
- | **Fitts's Law** | Primary CTAs min 44px tall. Clickable areas include padding, not just text. |
- | **Miller's Law** | No list exceeds 7 items without grouping. Nav max 5 items. |
- | **Law of Proximity** | Related elements share a container or consistent gap. Unrelated = 2× the gap. |
- | **Aesthetic-Usability Effect** | Polish is not decoration. Visual quality increases perceived usability. |
- | **Jakob's Law** | Familiar patterns for nav, forms, CTAs. Novelty goes in visual treatment, not interaction model. |
- | **Law of Common Region** | Use `border` + `background` to group — not whitespace alone. |
- | **Serial Position Effect** | Most important item is first or last. Never buried in the middle. |
+ Do not force unrelated content into one card schema. Use whitespace, typography, alignment, borders, surfaces, or containment according to the relationship being expressed.
- ---
+ ## Design the content and states together
- ## Logo Sourcing
+ Use real repository content or clearly marked representative fixtures. Test the shortest, longest, empty, loading, error, populated, disabled, permission-limited, and destructive states that the workflow can reach.
- | Type | Source | Display style |
- |---|---|---|
- | Company/tool SVG | `simple-icons` library | `rounded-[3px] bg-white/90 p-0.5` |
- | Org favicon | `https://www.google.com/s2/favicons?domain=DOMAIN&sz=64` | `rounded-[3px] bg-white/90 p-0.5` |
- | Person avatar | `https://github.com/USERNAME.png` | `rounded-full` |
+ Keep interface copy consistent with the product's existing terminology and voice. Name consequential actions and objects. Preserve calibrated uncertainty and domain language. Do not force lowercase labels, fragments, casual voice, benefit-first marketing, author credits, or punctuation bans onto the product.
- Never use placeholder images or random CDN URLs for brand assets.
+ Never invent proof, customer data, operational status, or chart values to make a composition look complete. Use labelled fixture data for development and keep it out of claims.
- ---
+ ## Use assets intentionally
- ## Copy Voice
+ Prefer first-party assets and product evidence. Inspect licenses and repository conventions before adding third-party icons, fonts, or images. Do not fetch personal avatars, favicons, logos, or remote imagery solely to fill space.
- Self-audit every line of copy before output. If it fails any rule, rewrite it.
+ When an asset is unavailable, design a truthful fallback or identify the missing-content requirement in the handoff.
- - Lowercase by default on UI labels, CTAs, taglines
- - Specific over vague: "20 free credits. no card." not "try for free."
- - CTAs follow `verb + object →` format: "start building →", "pick and post"
- - No hedging: never "might", "could potentially", "you may find that"
- - Section headers are fragments: "how it works", "what you get"
- - Feature descriptions: 1–2 sentences max. Ends when the point is made.
- - No summary paragraphs. Copy doesn't recap what was just said.
- - Footer always includes: "built by @[handle]"
- - No em dashes. Use a period or rewrite the sentence.
- - No empty adjectives: powerful, seamless, robust, comprehensive, cutting-edge are banned.
+ ## Add motion only when it helps
- ---
+ Use motion to explain state change, preserve spatial context, acknowledge input, or direct attention. Match amplitude and duration to the consequence and frequency of the interaction.
- ## CSS Variables Output Template
+ - Routine controls should respond promptly and predictably.
+ - Entrances should not delay access to content.
+ - Repeated list and scroll animations should remain calm at scale.
+ - Loading motion must correspond to real system state.
+ - Support `prefers-reduced-motion` without hiding information or completion feedback.
- After the user answers the 4 questions, open every implementation with this block:
+ Do not require a motion library when CSS or the existing stack already handles the behavior.
- ```css
- :root {
- --bg: [foundation bg];
- --surface: [foundation surface];
- --surface-raised: [foundation surface-raised];
- --border: [foundation border];
- --border-hover: [foundation border-hover];
- --text: [foundation text];
- --muted: [foundation muted];
- --heading: [foundation heading];
+ ## Implement within the codebase
- --accent: [accent hex];
- --accent-dim: color-mix(in srgb, var(--accent) 18%, transparent);
+ Follow the project's component, styling, routing, data, and testing conventions. Reuse sound primitives before introducing new dependencies. Keep data and interaction behavior functional; a production implementation is not a static mockup unless the user explicitly asked for one.
- --font-sans: '[body font]', system-ui, sans-serif;
- --font-display: '[display font]', sans-serif;
- --font-mono: '[mono font]', monospace;
+ For large scopes, implement a coherent vertical slice or agree on a staged sequence. State what is complete rather than implying an entire product was built.
- --text-xs: 11px;
- --text-sm: 13px;
- --text-base: 15px;
- --text-lg: 18px;
- --text-h1: clamp(2rem, 4.8vw, 3.1rem);
+ ## Output contract
- --radius-sm: 6px;
- --radius-md: 8px;
- --radius-lg: 12px;
- --radius-xl: 16px;
- --radius-full: 9999px;
- }
- ```
+ Deliver:
- ---
+ 1. implemented code or the explicitly requested design artifact;
+ 2. a short rationale connecting major decisions to product, content, and interaction evidence;
+ 3. the component/state coverage completed;
+ 4. assets, dependencies, or content requirements introduced;
+ 5. verification results at representative viewports and states;
+ 6. known gaps that still affect usability or fidelity.
- ## Definition of Done
+ If exploration was requested, provide genuinely distinct directions with tradeoffs and a recommended choice. Do not vary only palette and font.
- A complete output from this skill:
- - All 4 config questions answered and applied
- - Full working code — functional, not a mockup
- - CSS variables block at the top using the template above
- - Custom scrollbar + `::selection` always present
- - `webkit-font-smoothing: antialiased` present
- - Motion matches chosen level, with `prefers-reduced-motion` fallback
- - Copy follows voice rules — every line self-audited
- - Primary CTA is heading-color (white/black), never the accent
- - Logo assets from correct sources — no placeholder images
+ ## Verify
- If scope is large, ask which section to build first. Never deliver a partial implementation without flagging it.
+ 1. Run relevant build, typecheck, lint, and tests.
+ 2. Render representative desktop, tablet when relevant, and narrow mobile widths.
+ 3. Exercise keyboard navigation, visible focus, pointer and touch targets, dialogs, menus, and destructive actions.
+ 4. Check headings, landmarks, labels, descriptions, live status, contrast, reduced motion, and zoom behavior.
+ 5. Test real content extremes and every meaningful state; inspect clipping, wrapping, scrolling, and sticky behavior.
+ 6. Confirm the primary task remains discoverable and completable without relying on decoration or motion.
+ 7. Compare the result with existing brand and component evidence; explain intentional departures.
+ 8. Remove placeholders, invented claims, unused components, and style rules that have no role.
+ 9. Report what was directly verified and what could not be exercised in the current environment.