agentleFS
iScale-BuildersiScale-Builders/ui-kit-for-builders/.github/copilot-instructions.md

ui-kit-for-builders

Copilot instructions0 starsChanged 4 months agoMITView on GitHub

An iScaleLabs community kit. Home: https://www.iscalelabs.com/iscalexchange About this file. This kit ships the same rules under every filename AI coding tools look for, so it works with whichever one you use: AGENTS.md (Codex, Cursor, and most tools), CLAUDE.md (Claude), GEMINI.md (Gemini CLI), .github/copilot-instructions.md (GitHub Copilot), .windsurf/rules/ui-kit-for-builders.md (Windsurf). This copy is .github/copilot-instructions.md. All copies are identical — edit one, regenerate the rest. Whichever tool opened this repo: these are your instructions. The person you're helping already ships real software with AI…

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

17 rules. About 0 are common, 11 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Respect a system that already works: If the repo has tokens and a DESIGN.md, read them and build inside them.

    line 36
  2. Distinctive:

    Decide, don't survey: Don't ask them to choose between design options you can resolve with the rules below.

    line 39
  3. Very specific:

    Not a UI task? Don't restyle: If you're only editing a component's render path anyway and it has no loading/empty/error state, add them.

    line 42
  4. Distinctive:

    Report like a peer: No design lectures. When a UI turn ends, say what changed, which tokens you touched, which states you covered, which …

    line 45
  5. Distinctive:

    Never claim a visual check you did not perform.

    line 48
  6. Very specific:

    Precedence first: If the repo already has a token block (a @theme / :root / .dark block, a tailwind.config theme, shadcn's CSS variables) …

    line 56
  7. Distinctive:

    Never replace a working theme on a one-screen task.

    line 60
  8. Very specific:

    Where it lives: Write tokens where this repo already reads them: Tailwind v4 → @theme + :root / .dark in app/globals.css (or …

    line 63
  9. Very specific:

    Document the decisions in a comment block at the top of that file and in a one-page DESIGN.md at the repo root (create it from …

    line 69
  10. Distinctive:

    Every element uses one of those four.

    line 108
  11. Distinctive:

    If it looks like a starter, it is a starter.

    line 135
  12. Distinctive:

    Run this yourself on every screen you build or materially change (small fixes: only the items touching the component you changed).

    line 182
  13. Distinctive:

    If it is, these rules hold:

    line 261
  14. Distinctive:

    Use what the repo already uses.

    line 307
  15. Very specific:

    Never ship three.js examples/ media (textures, models, audio) — the code is MIT.

    line 339
  16. Distinctive:

    Prefer spring/lerp for visual motion.

    line 342
  17. Distinctive:

    Run before you say done. No self-assigned score — a model grading its own work "94, pass" is fiction.

    line 377

≈ “Common” is an estimate: at least 1 in 5 of the 3,950 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

UI Kit for Builders — by iScaleLabs

An iScaleLabs community kit. Home: https://www.iscalelabs.com/iscalexchange

About this file. This kit ships the same rules under every filename AI coding tools look for, so it works with whichever one you use: AGENTS.md (Codex, Cursor, and most tools), CLAUDE.md (Claude), GEMINI.md (Gemini CLI), .github/copilot-instructions.md (GitHub Copilot), .windsurf/rules/ui-kit-for-builders.md (Windsurf). This copy is .github/copilot-instructions.md. All copies are identical — edit one, regenerate the rest. Whichever tool opened this repo: these are your instructions.

0. Read This First — Who You're Working With, and Your Job

The person you're helping already ships real software with AI tools. They read code, they know their stack (typically Next.js / React / Tailwind / shadcn), and they've noticed what every builder notices: AI-generated UI converges on the same starter look — not for lack of taste, but because nobody handed the model a design system, so it reached for defaults.

You are that assistant — Claude, Codex, Cursor, Gemini, Copilot, Windsurf, or another. Your job in this repo, every turn, on every task that touches UI: raise the floor. A new screen, a one-line fix, a refactor — all of it leaves the interface more deliberate than you found it. Design isn't a polish pass at the end; it happens in the first component you write.

Standing rules:

  • Never ship defaults. Untouched shadcn neutral, Tailwind's default type sizes as hierarchy, browser focus styles removed, no empty state — none of that leaves your hands.
  • Raise the floor in proportion to the change. A one-line copy fix gets the matching state / contrast / focus fix on the touched component only. A new screen or a redesign gets the full §3 pass. Never turn a small task into a repo-wide restyle.
  • Respect a system that already works. If the repo has tokens and a DESIGN.md, read them and build inside them. Never replace a working theme on a one-screen task. (Details in §1.)
  • Decide, don't survey. Don't ask them to choose between design options you can resolve with the rules below. Decide, do it, say what you did in one line. If they push back — or say "it's fine" — their taste wins.
  • Not a UI task? Don't restyle. If you're only editing a component's render path anyway and it has no loading/empty/error state, add them; otherwise leave the UI alone and say so.
  • Report like a peer. No design lectures. When a UI turn ends, say what changed, which tokens you touched, which states you covered, which checks you actually ran — and which you couldn't (no browser, no deploy access). Never claim a visual check you did not perform.

Everything below is addressed to you.


1. Design System First — Tokens Before Components

Precedence first. If the repo already has a token block (a @theme / :root / .dark block, a tailwind.config theme, shadcn's CSS variables) and a DESIGN.md, read them and build inside them — stop here. Create tokens and DESIGN.md only when both are missing, and do it before the first component. Never replace a working theme on a one-screen task; if the existing system is genuinely bad, say so in one line and offer a separate theming pass.

Where it lives. Write tokens where this repo already reads them: Tailwind v4 → @theme + :root / .dark in app/globals.css (or src/index.css), which is where shadcn keeps its variables (current shadcn emits OKLCH variables under @theme inline — extend those, don't add a parallel set); Tailwind v3 → tailwind.config theme.extend + CSS variables. Detect the file that already defines --background / --primary before adding anything. Document the decisions in a comment block at the top of that file and in a one-page DESIGN.md at the repo root (create it from DESIGN.template.md, shipped with this kit; fill it with real decisions, not the template's examples). DESIGN.md wins over your instincts.

Type scale. One family for UI (Geist, Inter, or a variable font the builder owns), optionally a second display face for marketing. Sizes from a fixed scale — app: 12 / 14 / 15 / 16 / 20 / 24 / 32 / 40; marketing: 14 / 16 / 20 / 28 / 40 / 56 / 72. Body 15–16px in apps, 17–18px in marketing — always a step on the scale, never text-[15px]. Line-height 1.5 body, 1.1–1.2 display. Two weights in use, not five (400/500 or 400/600). Display headlines get -0.01em to -0.02em letter-spacing. Hierarchy comes from the scale plus weight plus color — never from "make it a bit bigger." (Geist/Inter is the right font; Geist/Inter at Tailwind's default sizes and weights with no scale is the starter smell — the scale is what makes the difference.)

Spacing rhythm. 4px grid, 8px increments, major steps 16 / 24 / 32 / 48 / 64 / 96. Same padding across all cards; same gap across all grids; section spacing from the major steps. p-[13px] and mt-[7px] don't exist here.

Palette — one gray scale + one accent scale, that's the system. Use 12-step scales (Radix Colors is the reference shape). Gray: steps 1–2 page/surface, 3–5 hover/selected, 6–8 borders, 11–12 text (12 primary, 11 muted). Accent: 9–10 solid on the one primary action only, 11 for accent text. Semantic success / warning / danger scales: muted, meaning only, never decoration. Don't invent extra role tokens beyond these steps, and don't emit "five hexes" — map the steps onto the variables the repo already reads (shadcn's --background, --foreground, --primary, --muted, --border … — Radix hex values don't drop in unmapped; assign step → variable deliberately). Charts and data viz get their own small ordered palette (4–6 steps of one hue, or a documented categorical set) — not the accent, not ad-hoc hex. Dark mode is designed, not inverted: layered surfaces (page → surface → raised), a slightly desaturated accent, borders and inner highlights instead of drop shadows.

Radius scale. Pick one base (6px is a good app default, 10–12px reads softer) and derive: sm = base − 2, md = base, lg = base + 4, full. Every element uses one of those four. Buttons and inputs share the same radius. Nested radii: inner = outer − padding.

Shadow scale. Three steps (sm / md / lg), low opacity (4–12%), tinted toward the background hue, never pure black. Elevation means something — popovers and dialogs float; cards mostly don't (use a border).

Motion language. Durations 120ms (micro: hover, press) · 200ms (default: reveal, dismiss) · 320ms (large surfaces: sheets, page). Easing: cubic-bezier(0.2, 0.8, 0.2, 1) for things arriving, faster ease-in for things leaving, springs (stiffness 300–500, damping 30–40) for things the user drags or that need weight. Never linear for UI motion (things arriving, leaving, moving) — spinners, progress bars, and skeleton shimmer are the exception and stay linear. Under prefers-reduced-motion: reduce, transforms and auto-motion turn off; opacity fades may stay.

Primitives locked. Button (primary / secondary / ghost / destructive × sm / md / lg), input + label + help/error text, select, checkbox/switch, card, badge, dialog, sheet, dropdown/menu, tooltip, toast, table row, tabs, empty state, skeleton. Variants via class-variance-authority. Once locked, no one-off styling: a new look is a new variant on the primitive, not a className on a page.


2. The Banned List — Smell → Fix

If it looks like a starter, it is a starter. Every row below is a thing you don't ship, with what you do instead.

#SmellFix
1Default shadcn — untouched neutral palette, default radius, default font weightTheme it before the first screen: font, radius, palette, shadows in globals.css. Add one signature component (usually the primary button) that repeats everywhere.
2Gradient hero (purple → blue), gradient text, gradient buttonsSolid surfaces, typographic hero. If a gradient exists at all it's one subtle radial/mesh at ≤15% opacity behind content, never on text.
3Three identical feature cards with emoji or generic iconsGroup into 3 outcomes; lead with the outcome; show a real screenshot, metric, or quote. Icons from one set, one stroke, muted color.
4Glass blobs / glassmorphism on everythingGlass is for at most one floating surface over imagery or a canvas. App chrome is solid.
5Centered-everythingLeft-align text blocks, forms, and tables. Center only short hero headlines and empty states.
6Feature-dumping — every feature is a sectionThree outcomes, three sections. Every section = headline + one sentence + proof.
7Three equally weighted CTAsOne primary action per screen — the only saturated button. Everything else is secondary, ghost, or a text link. On long marketing pages the same primary may repeat at the bottom; that's still one action.
8More than one hero effect (video + particles + typewriter + spotlight)One. Delete the rest. If the page then feels empty, fix typography and whitespace, not effects.
9Linear or rigid animation; everything animates at onceEase-out or spring; stagger lists 40–80ms; durations from the scale.
10Placeholder content that ships — Lorem, "Jane D., CEO", stock avatars, "Powerful features for your needs"Real copy from the product's real value. If content isn't ready, use an unmistakable stand-in ([customer quote]) marked TODO.
11Bloated hero image or videoWebP/AVIF, hero ≤200KB, explicit width/height; mark the above-the-fold image high priority with your framework's current API (Next.js: priority / preload depending on version, or fetchPriority="high"), lazy below.
12One-off styles — hand-typed hex (text-[#f3c7a2]), themeable values typed inline, inline style={{}} for static valuesAnything repeated or themeable (color, radius, shadow, spacing steps, type sizes) is a token — never hand-typed hex. A genuinely one-off layout value may use an arbitrary utility (min-h-[60svh]); inline style only for values computed at runtime. Variants via cva.
13Missing states — a data view with no loading, empty, or error stateEvery data surface ships all three. Skeletons shaped like the content; empty states with a headline, one line, and the primary action; errors that say what happened and what to do.
14Grey on grey — muted text on muted surfaces, low-contrast borders as the only separatorBody text ≥ 4.5:1, large text and UI components ≥ 3:1. Don't rely on color alone.
15Focus rings removed (outline-none and nothing else)A visible focus-visible style on every interactive element — use what your shadcn version emits (currently focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:border-ring); don't hand-roll a second focus style, and never remove it.
16Icon-only buttons with no namearia-label plus a tooltip.
17Hover-only interactions; tiny touch targetsTap and keyboard equivalents. Targets ≥ 24×24 CSS px with clear space (WCAG 2.2 AA); ≥ 44×44 for primary actions and touch-first surfaces. Dense rows keep their height — grow the hit area, not the row.
18Mobile as afterthought — headline pushed below the fold, horizontal scrollDesign 375px first. Headline + primary action visible without scrolling; min-h-[60svh], not h-screen.
19Headings chosen for size, not outlineOne h1 per page, h2 for sections; visual size from classes.
20Same <title> and description on every pageUnique title, description, and Open Graph per route.
21Raw data tables — no density, no alignment, no hover, no sort affordanceRight-align numbers (tabular-nums), sticky header, row hover, sortable columns marked, consistent date/number formats.
22Modal for everything; toast for everythingInline validation for forms, sheets for secondary flows, dialogs for confirm/destructive and for genuinely focused tasks (command palette, share, quick create). Toasts for outcomes, not for every click.
23Dark mode by inversionA designed dark palette: layered surfaces, desaturated accent, borders over shadows.
24"Dashboard of identical cards" — no hierarchyOne primary area (the metric or action that matters), supporting areas smaller. Vary size; don't tile.
25AI-slop copy — "Revolutionize", "Seamless", "Unlock the power of"Specific nouns and verbs, real numbers, the product's own vocabulary.
26Spectacular hero, generic page below itExtend the language — the hero's palette, type, and materials continue into cards, buttons, and transitions — or drop the hero.
27Canvas or animated field used as wallpaper behind a normal pageIntegrate it (content lives in the scene, or the scene reacts to content) or remove it.
28The right symbol in the wrong 3D language — a detailed real-world object rebuilt as chunky procedural geometryChoose subject and rendering language together. Abstract the form (silhouette, ribbon, glyph) or move to a product-fidelity workflow.
29Two post-processing stacks; three/webgpu with EffectComposer; both motion and framer-motion installedOne render path, one post stack, one animation package.
30Ambient drift as "the effect"Drift is texture. The show is one named moment: organized motion at scale, or a single crafted object with a signature move.
31Performance theater — green Lighthouse, janky feelProfile on mid-range hardware; measure INP; throttle listeners; no state updates in frame loops.
32Console errors, hydration warnings, missing keys, new build warningsZero errors and no new warnings from your change (pre-existing browserslist/edge notices aren't yours to chase). Fix them in the same turn.
33"Done" without checking what you can actually reachVerify what you can reach — build output, dev server, the rendered screen if you have a browser tool, the deployed URL if you have access. Close every report with Not verified by me: <live URL / 375px / contrast / …> so nothing is claimed that wasn't checked. Build success isn't shipped success, and an unverified claim is worse than a stated gap.
34Control overload — dozens of buttons, inputs, and selects on one screen, tabs for everything, every option visible at onceProgressive disclosure. Show the primary path; put advanced options behind a "More", a sheet, or a second step. A screen has one job; a wizard has one job per step. If a page needs 40 controls, it's three pages.
35System/browser default font stack (Segoe UI, Roboto, Arial, system-ui) as "the font"Choose the UI face deliberately (Geist / Inter / a font the builder owns) and load it properly. The stack is a fallback, never the design.
36Card inside card inside card; thin borders as the only structure; every element boxedCards aren't layout. Use spacing, alignment, and headings to group; one level of surface, borders only where two surfaces meet.
37Hand-typed hex everywhere; 12–15 colors in one file; traffic-light good/warn/bad on everythingOne gray scale + one accent scale (§1). Semantic colors muted and only when they carry meaning. Every color is a token.

3. The UX Floor — Per Screen

Run this yourself on every screen you build or materially change (small fixes: only the items touching the component you changed). Don't ask the builder to run it. Fix what fails, then report. Items marked ◉ need eyes on a rendered screen or a measurement — if you have no browser/screenshot/Lighthouse tool, build so they can't fail (tokens, semantic HTML, no fixed widths, ≤4 nav items that wrap, contrast from the scale) and list them under "Not verified by me". Never claim a ◉ check you did not run.

  • Purpose. You can state the screen's job in one sentence, and that job is unmistakable on the screen. When the job has a dominant action (most screens), it's the one saturated element; editors, dashboards, and comparison views may have no single button — then hierarchy carries it.
  • ◉ Hierarchy — squint test. Blur your eyes: headline and primary action still dominate. At most three visible levels (primary / secondary / tertiary) — by size, weight, and color, not by decoration.
  • Layout. One container width; left edges align; related items sit closer than unrelated ones; spacing from the rhythm; no orphan controls.
  • ◉ Mobile. Checked at 375px, 768px, and desktop. No horizontal scroll. Hero content above the fold. Touch targets ≥ 44px. Nothing hover-only.
  • States. Every state that can actually occur on that surface — no fake ones: initial loading (skeleton shaped like the content when the wait is > 300ms; a small inline spinner for quick actions), empty (designed: headline + one line + primary action), recoverable error (what happened + what to do + retry), success feedback, disabled with a reason.
  • Forms. Visible label (placeholder is not a label), help text where a field needs it, validation inline on blur/submit with the message under the field and aria-describedby, input preserved on error, first field focused in dialogs (preventScroll), Enter submits, Escape closes.
  • Keyboard. Tab reaches every interactive in visual order; focus ring visible; dialogs trap and return focus; Escape closes overlays; skip link on long pages.
  • ◉ Contrast. WCAG AA — 4.5:1 body, 3:1 large text and UI components. Color is never the only signal.
  • Motion. prefers-reduced-motion honored; nothing flashes; nothing auto-playing is required to understand the page.
  • Text. Real copy. Sentence case for UI. tabular-nums on numbers in tables. Consistent date and number formats.
  • Semantics + meta. Landmarks (header/nav/main/footer), one h1, lang on <html>, alt text on images, unique <title> + description + Open Graph + canonical per route.
  • ◉ Clean console. No errors, no hydration warnings, no missing keys, no 404 assets. next build / vite build has zero warnings.
  • ◉ Performance. LCP < 2.5s, INP < 200ms, CLS < 0.1. Heavy libraries (charts, maps, 3D, editors) behind dynamic import. Fonts subset, preloaded, display: swap. Images sized and lazy below the fold.

4. Motion + Effects Doctrine

One memorable moment. A product (or a major surface) gets one thing a visitor could describe in a sentence — a great hero, a signature transition, a single interaction that feels physical. Everything else is quiet and consistent. Restraint is the tiebreaker after that moment exists, not a reason to skip it.

Micro-interactions — a small default, then only what DESIGN.md names. The default floor is CSS-only and cheap: focus-visible ring on everything; 120–200ms background/opacity change on hover for buttons, links, and rows; press feedback on buttons only (scale 0.98 or a shade shift); overlays fade in (dialog fade + scale 0.96 → 1 is fine). That's it unless DESIGN.md names more. Skeleton shimmer, toast slide-in, list stagger (40–80ms), layout animation on reorder — add them where the product's moment calls for them, scoped to those surfaces, never globally (no press-scale on text inputs, no stagger on a settings form). Do not add motion to a repo for the default floor. Arriving things ease-out; leaving things ease-in and shorter; grabbed things spring.

Page transitions are optional: ≤ 200ms, opacity + ≤ 8px translate, never a full-screen wipe in an app. Scroll-driven motion belongs to marketing pages, not apps: opacity + small translate, once, ease-out; never hijack scroll.

When 3D or an immersive effect is warranted — and when it isn't

Warranted when: the product is spatial (a 3D model, a configurator, a scene); a marketing hero needs a brand moment; the visitor is meant to explore. Not warranted: dashboards, forms, settings, tables, auth, most SaaS screens — a canvas there is noise. If you're unsure, it isn't warranted.

If it is, these rules hold:

  • Text is DOM. Headline, copy, and the primary action are HTML that paints before any canvas. Never body copy in 3D. Never a canvas-only page.
  • DOM-first, lazy canvas. Client-only mount (dynamic(..., { ssr: false }) or React.lazy + Suspense); load after first paint, on idle, or on first interaction; split three / R3F / drei into their own chunk; never a static modulepreload of the 3D chunk.
  • Declare the moment before you code it. Two proven paths: spectacle — organized motion at scale (thousands of elements in structured lanes, answering the cursor); or craft — one hero object with a named, engineered signature move and materials doing real work. Ambient drift alone is texture, not the show.
  • Lighting first, then material, then grounding. Environment + key + rim. One material-quality centerpiece. Contact shadow or reflection plane — nothing floats in a black void. Glass needs something behind it to refract.
  • Motion is perceptible and responsive. At least one continuous motion you can see (≈15–45°/s or an equivalent drift) plus one input-responsive motion (cursor lean, hover, scroll). Cursor influence damped, 5–10%. No linear tumbling. No teleports — damp everything.
  • Post-processing one effect at a time: bloom → depth of field → subtle chromatic aberration. Stop when it looks expensive, not when it looks like a filter. Two or three effects, tops.
  • Typography as scene. Large, light-weight display type; mix-blend-mode: difference when it crosses the canvas; text contrast against the canvas meets AA (add a scrim if needed).
  • Mobile ladder. Fewer particles, no post, dpr capped at 1.5, simpler materials, DOM text instead of 3D text; the hero still visible without scrolling. Touch equivalents for hover.
  • Reduced motion and failure. Under reduced motion: no parallax, no auto camera, no particle sim — but a static composition that still looks designed. On WebGL failure or context loss: a poster fallback, not a blank.
  • Extend the language. The scene's palette, type, and materials continue below the fold. A 3D hero on a generic page is worse than no 3D hero.
  • Budgets. 60fps on a mid-range laptop, 30+ on a mid-range phone; LCP / INP / CLS unchanged from §3; canvas has an accessible name; every interaction has a keyboard path.
  • The screenshot test. It has to look good frozen. If the only wow is motion, it isn't there yet.
  • The one-sentence test. "It has this glass form that leans toward your cursor and the type is huge" passes. "It's a site with some 3D" fails.

5. The Stack — and When to Use What

Use what the repo already uses; the doctrine above is framework-agnostic. When you're choosing, or the repo is React-shaped, these are the defaults.

LayerDefaultThe rule that keeps it from looking default
FrameworkNext.js (App Router) — or Vite + React for a pure SPAServer-render what can be; next/font for fonts; next/image for images.
StylingTailwind CSS v4Tokens in @theme / CSS variables. Utilities compose tokens; they don't invent values.
Componentsshadcn/uiAlways themed — font, radius, palette, shadows set in globals.css before the first screen; you own the copied code, so extend it. Never leave the neutral defaults.
Color tokensRadix Colors (12-step scales, dark pairs)Map steps to roles (§1). One accent scale, one gray scale, semantic scales muted.
Size / shape tokensOpen Props (spacing, radius, shadow, easing) — optionalUse it when the repo has no scale; otherwise define your own with the same shape.
Motionmotion (formerly framer-motion)One package — never both motion and framer-motion. Springs, AnimatePresence, layout.
IconsLucideOne set, one size per context (16 inline / 20 buttons / 24 nav), one stroke width. Never mix icon families.
FontsGeist or Inter (variable, self-hosted via next/font); optional display face for marketingTwo weights. Subset. display: swap.
AccentsMagic UI — pick 1–2 components, ever, for the memorable momentA page full of animated accents is the new starter look. (Origin UI redirected to coss ui, AGPL-3.0 as of 2026-08-17 — check the license before copying into a closed-source app.)
FormsReact Hook Form + ZodValidation is not optional; messages inline (§3).
TablesTanStack Table (headless) on shadcn table primitives — optionalDensity, alignment, sort affordance from §2 #21.
ToastsSonner (what shadcn wires)Outcomes only.
Smooth scrollLenis — marketing pages only, never in appsOnly when scroll-driven effects are the design.
3Dthree.js + React Three Fiber + drei + @react-three/postprocessingSee the license and pin caveats below.
Model pipelineglTF-Transform (gltf-transform optimize), self-hosted pinned Draco/Meshopt/KTX2 decodersHero model < 2 MB after compression; never unversioned decoder CDNs.
DeployWhatever the repo usesOpen the live URL and check the change before saying done.

3D caveats that bite:

  • three has no semver — pin the revision, upgrade deliberately with the migration guide, and re-check peer ranges (postprocessing has an upper bound on three).
  • Two post stacks, never mixed: WebGL → @react-three/postprocessing (underlying postprocessing is Zlib, not MIT — keep its notice); WebGPU (three/webgpu) → the TSL node post stack only.
  • drei Environment presets fetch HDRIs from a CDN at runtime — self-host license-checked HDRIs in production.
  • Never ship three.js examples/ media (textures, models, audio) — the code is MIT; the media isn't licensed for you.
  • Fonts used in 3D text carry the font's license, not three's.
  • Prefer spring/lerp for visual motion; physics engines are for collisions.

Not for this kit: Bootstrap and template packs (you'll fight the look forever), "awesome-ui" dumps (uncurated, unlicensed, unmaintained), Spline as a production pipeline, Create React App, raw three.js in a React repo.


6. Build Recipe — Your Working Order

For a new product or a redesign, in this order. Don't skip a step because it feels slow; each one prevents a rewrite of the next.

  1. Discovery. Who uses this, what's the one job of this surface, what's the primary action, what data is real. Write it in DESIGN.md (or the PR note) in three lines.
  2. Structure. Route/section map before visuals. Every screen answers one question. Navigation is minimal. Footer is for secondary actions.
  3. Design system. §1, in globals.css + DESIGN.md. Theme shadcn. Lock the primitives.
  4. Content. Headline, one sentence, primary action first — if they don't land, no effect saves them. Real copy, real screenshots, real data.
  5. Effects and motion. One memorable moment (§4). Micro-interactions on everything. Then stop.
  6. Performance. Images, fonts, dynamic imports, budgets (§3).
  7. Verification. §3 checklist + §7 self-review, then the live URL.

For a small task (one component, one fix): read DESIGN.md → build with the locked primitives → cover states → run §3 on the screen you touched → report in ≤ 5 lines.


7. Self-Review Before "Done"

Run before you say done. No self-assigned score — a model grading its own work "94, pass" is fiction. Instead, verify concretely and report honestly:

  1. The 3-second test (◉ if you can see the screen; otherwise reason from the markup): what is this, and what do I do next? If either takes more than three seconds, fix hierarchy or copy.
  2. The squint test (◉): headline and primary action dominate when blurred.
  3. "Does this look like a starter?" — re-read §2's table and name every row that still applies, or write "none". Starter smells at a glance: neutral shadcn palette with default radius · Inter/Geist at Tailwind's default sizes and weights with no scale · three identical cards · a gradient hero · emoji icons · everything centered · one flat surface color · no hover states · no empty state · generic copy · dropdown chevrons and badges everywhere · a card grid with no hierarchy. Any row still applying → not done; fix it, then re-check that row only (no endless loop).
  4. The one-sentence test (marketing / hero surfaces): a visitor can describe the memorable thing in one concrete sentence.
  5. The screenshot test (◉): it looks designed frozen.
  6. The verification checklist: §3 items on every screen you touched; build clean with no new warnings; console clean; viewports you actually viewed; contrast from the scale; reduced motion; keyboard; meta; and the live URL if you can reach it. Before a public launch, run the full Front-End-Checklist (see REPOS.md) once.

Report shape: Changed: … · Tokens touched: … · States covered: … · §2 rows still failing: none / #n … · Verified by me: build, console, 375/768/desktop, live URL … · Not verified by me: … (whatever you could not run — say it plainly). When comparing to a reference design, list concrete differences[] (layout, spacing, type, color, hierarchy) with one exact change each — still no score.


8. /ui-review — Paste-Ready Prompt

The builder can paste this into any AI tool with a screenshot or URL of their worst screen. If they type /ui-review here, run it on what they point at.

Review this UI as a senior product designer who ships code. Input: the
attached screenshot / URL / component path.

Judge it against these standards, in this order: (1) one clear primary action
and hierarchy that survives the squint test; (2) a real design system — type
scale, 8px spacing rhythm, one gray scale + one accent, radius and shadow
scales, motion language — visible in the result; (3) states (loading,
empty, error), forms (labels, inline validation, focus), keyboard and focus
rings, WCAG AA contrast, mobile at 375px, reduced motion; (4) starter smells:
default shadcn, gradient hero, emoji feature cards, glass blobs, centered
everything, feature dumping, control overload (dozens of controls / tabs for
everything, no progressive disclosure), system default font stack, cards
inside cards with borders as the only structure, hand-typed hex and a dozen
colors, placeholder copy, one-off styles, more than one hero effect, linear
animation, missing states.

Output, and nothing else:
1. Verdict in one line: ship / revise / rework — and the single reason. No
   numeric score. If you cannot see the screen (text-only input), say so and
   judge only what the markup/CSS shows.
2. Top 5 fixes, ranked by visual impact. For each: the smell, why it hurts
   (one line), and the EXACT change. If you can read the repository, name the
   file path and the class/tokens/JSX to replace and what to replace them
   with, or a ready-to-paste snippet. If you only have a screenshot or URL,
   give precise visual and token changes (values, sizes, colors, spacing) and
   do not invent file paths or implementation details. Prefer changes to
   tokens and primitives over per-page patches. Smallest set of high-impact
   changes; do not propose a rewrite.
3. If there is no design system yet, fix #1 is: create it (globals.css tokens
   + DESIGN.md), and give the actual token values you'd set.
4. Three lines of what's already working, so it stays that way.
Do not add sections, effects, or copy the product didn't ask for.

9. Glossary — Use These Words Consistently

  • Hierarchy — what the eye sees first, second, third. Made with size, weight, color, and spacing; not with decoration.
  • Rhythm — spacing that repeats on a grid (8px steps) so the page feels composed rather than placed.
  • Contrast — the difference between text and its background (measured, AA = 4.5:1 body / 3:1 large + UI); also the difference between primary and everything else.
  • Affordance — a control looks like what it does: buttons look pressable, links look followable, draggable things look draggable.
  • Primary action — the one thing this screen exists for; the only saturated button.
  • Token — a named design value (--color-accent-9, --radius-md, --space-6) that components use instead of raw numbers.
  • Primitive — a locked, reusable component (button, input, card) with variants; pages compose primitives, they don't restyle them.
  • Variant — a named look for a primitive (ghost, destructive, sm), defined once with cva.
  • Surface / elevation — a layered background (page → surface → raised) and how far it visually floats (border, then shadow).
  • Density — how much fits per screen; consistent per product (Linear-tight or Notion-comfortable), never mixed within one view.
  • Whitespace / alignment / proximity — deliberate emptiness that groups; edges line up; related things sit closer than unrelated things.
  • The fold — what's visible before scrolling; on mobile, headline + primary action live above it.
  • Squint test — blur your eyes; hierarchy should survive.
  • Empty state — what a data view shows with no data: headline, one line, primary action. Designed, not blank.
  • Skeleton — a loading placeholder shaped like the content it replaces.
  • Focus ring — the visible outline on the keyboard-focused element. Never removed, only styled.
  • Reduced motion — the OS setting prefers-reduced-motion; when set, transforms and auto-motion stop, fades may stay.
  • Micro-interaction — small feedback on hover / press / focus / load; the floor, not the moment.
  • Memorable (signature) moment — the one thing a visitor could describe in a sentence; there is one per product.
  • Grounding — a contact shadow or reflection that gives a 3D object weight.
  • Scrim — a translucent layer behind text so it stays readable over an image or canvas.
  • Progressive enhancement — real HTML first; effects layer on top and degrade to a designed fallback.
  • Starter smell — any tell that the UI is an untouched template.
  • LCP / INP / CLS — largest paint time, interaction latency, layout shift: the three performance numbers that matter (2.5s / 200ms / 0.1).
  • Sentence case / tabular numbers — "Save changes", not "Save Changes"; tabular-nums so digits align in columns.

UI Kit for Builders © 2026 iScaleLabs · MIT License · Feedback and what you built with it: https://www.iscalelabs.com/iscalexchange

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.