Agent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
JavaScript agent-skillsai-agentsanti-slopclaude-codecodexcursordesign-systemfrontendlanding-pageui-designweb-design
Simplify project structure: Remove legacy SKILL.md and promote SKILL_v2.md to primary SKILL.md
Leonxlnx28aad20e8968
diff --git a/README.md b/README.mdindex 131a007..bb8f696 100644--- a/README.md+++ b/README.md@@ -6,7 +6,7 @@ A skill for AI coding agents to build high-end, premium frontend interfaces. The## How It Works-This repository contains the **High-Agency Frontend Skill** (`SKILL_v2.md`), which serves as a hardcore prompt and rulebook for LLM-based coding agents (like Claude, Cursor, v0, etc.).+This repository contains the **High-Agency Frontend Skill** (`SKILL.md`), which serves as a hardcore prompt and rulebook for LLM-based coding agents (like Claude, Cursor, v0, etc.).Instead of just telling the AI "don't make it look bad," this skill establishes a deterministic engineering framework:- **Strict Component Architecture:** Prevents "God Components" by enforcing modular React trees and strict Layout vs. UI Primitive separation.@@ -51,7 +51,7 @@ git clone https://github.com/Leonxlnx/taste-skill.git "$HOME\.agent\skills\tasteSimply point your agent to the skill file and configure your dials:-> "Read `.agent/skills/taste-skill/SKILL_v2.md`. Set VISUAL_DENSITY to 8 and MOTION_INTENSITY to 5. Build a data-heavy Fintech Dashboard."+> "Read `.agent/skills/taste-skill/SKILL.md`. Set VISUAL_DENSITY to 8 and MOTION_INTENSITY to 5. Build a data-heavy Fintech Dashboard."---diff --git a/SKILL.md b/SKILL.mdindex 51b389c..a113d52 100644--- a/SKILL.md+++ b/SKILL.md@@ -1,225 +1,88 @@----name: anti-slop-frontend-description: Creative Technologist & Senior Frontend Engineer skill. Architect digital artifacts that transcend utility — interfaces that feel like physical objects, avant-garde magazines, or precision instruments. Enforces strict anti-patterns, advanced kinetic techniques, and contextual aesthetic modes to eradicate "AI Slop" from every output.+name: high-agency-frontend+description: Senior UI/UX Engineer. Architect digital interfaces overriding default LLM biases. Enforces metric-based rules, strict component architecture, CSS hardware acceleration, and balanced design engineering.----# Anti-Slop Frontend Skill--## Mission-Build interfaces that feel like **physical objects**, avant-garde magazines, or precision instruments.-**PRIME DIRECTIVE**: Eliminate all generic patterns. If the output resembles a standard template, a Dribbble clone, or a default component library, it is a **failure**.-------## 1. THE ANTI-PATTERNS (STRICTLY FORBIDDEN)--Before writing a single line of CSS, internalize these forbidden patterns.--### Visual Syntax Errors--| ❌ Forbidden | ✅ Alternative |-|---|---|-| Purple-to-blue tech gradient | Muted editorial tones, grain overlays, or hard geometric color blocks |-| Neon / outer glow box-shadows | Hard-edged retro shadows, colored shadows matching bg hue, or no shadow at all |-| Glassmorphism everywhere | Solid opacity layers, dithering patterns, or tactile texture instead of blur |-| Pure black alpha shadows | Colored shadows (e.g., deep navy on blue bg) or flat neo-brutalist borders |-| Perfect center alignment | Asymmetric layouts; indent unexpectedly; left-anchor with intentional offset |--### Component Clichés--| ❌ Forbidden | ✅ Alternative |-|---|---|-| 3-column rounded bento grid | Broken grids, masonry layouts, or overlapping sections |-| Rocket / shield / lock icons | Abstract geometry, technical crosshairs, or raw typographic marks |-| Pill badges (fully rounded) | Square flags, technical labels, 1px bracket borders `[ label ]` |-| White card + gray border + drop shadow | Negative margins, spacing-defined sections, invisible boundaries |-------## 2. THE CREATIVE ENGINE (ADVANCED TECHNIQUES)--### Kinetic Typography — Make Text Liquid--- **Velocity Skew**: Text reacts to scroll speed using `transform: skewX()` tied to scroll delta.-- **Infinite Marquee**: Looping bands of oversized type create momentum and rhythm.- ```css- /* Marquee base pattern */- @keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }- .marquee-inner { animation: marquee 12s linear infinite; white-space: nowrap; }- ```-- **Mix-Blend-Mode Text**: Text color flips as it passes over images.- ```css- .kinetic-heading { mix-blend-mode: difference; color: white; }- ```-- **Masked Typography**: Text acts as a window revealing video/gradient underneath via `background-clip: text`.--### Immersive Scrolling — Control Time--- **Parallax Stacking**: Sections don't scroll past — they **stack like cards** using `position: sticky; top: 0`.-- **Horizontal-Vertical Hybrid**: Vertical scroll triggers horizontal gallery movement.- - Use `IntersectionObserver` to switch scroll axis on a pinned container.-- **Sticky Pinning**: Lock a visual element (image / 3D canvas) while narrative text scrolls over it.- ```css- .pinned-visual { position: sticky; top: 10vh; height: 80vh; }- .scroll-narrative { position: relative; z-index: 10; }- ```--### Micro-Interactions — The Tactile Feel--- **Magnetic Elements**: Buttons physically pull toward the cursor.- ```js- el.addEventListener('mousemove', e => {- const { left, top, width, height } = el.getBoundingClientRect();- const x = (e.clientX - left - width / 2) * 0.3;- const y = (e.clientY - top - height / 2) * 0.3;- el.style.transform = `translate(${x}px, ${y}px)`;- });- el.addEventListener('mouseleave', () => el.style.transform = '');- ```-- **Cursor Displacement**: Cursor acts as a spotlight, lens, or distortion field.- ```css- .cursor-glow {- position: fixed; pointer-events: none;- width: 300px; height: 300px;- background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);- transform: translate(-50%, -50%);- mix-blend-mode: screen;- }- ```-- **Dithering & Grain**: Replace smooth gradients with CSS noise for "Lo-Fi High-Tech" texture.- ```css- /* SVG noise filter approach */- .grain-overlay::after {- content: '';- position: absolute; inset: 0;- background-image: url("data:image/svg+xml,..."); /* base64 noise SVG */- opacity: 0.04;- pointer-events: none;- }- ```-------## 3. CONTEXTUAL MODES — THE VIBE CHECK--**Select EXACTLY ONE mode per project. Do not mix randomly.**--### MODE A — THE "EDITORIAL"-*For: Content sites, portfolios, blogs, magazines*--> The web page is a printed fashion magazine that has come alive.--- **Typography**: Massive serif headers (Playfair Display, Cormorant Garamond). Text overlaps images.-- **Layout**: Asymmetric. Text floats over imagery. Whitespace is aggressive.-- **Palette**: Off-white `#F5F0E8` + Deep ink black `#0D0B08` + One clash color (Acid Green `#BFFF00` or International Orange `#FF4500`)-- **Key Tech**: Smooth parallax, text reveal animations (clip-path), mix-blend-mode overlaps-- **Font Stack**: `'Cormorant Garamond', 'Playfair Display', Georgia, serif`--### MODE B — THE "PRECISION INSTRUMENT"-*For: Dashboards, tools, data products, developer utilities*--> The interface is a physical tool — a Braun calculator or a Teenage Engineering synthesizer.--- **Typography**: Monospace mandatory for data. Small uppercase labels. Stark scale contrast.-- **Layout**: 1px rule lines dividing sections. Crosshairs. Coordinate numbers as decorative elements.-- **Palette**: Muted greys, dust, clay, sage. High-contrast strokes. Film look — no pure black.- - Background: `#F4F1EC` | Stroke: `#2A2A2A` | Accent: `#D4603A` (rust)-- **Key Tech**: Snap transitions, slot-machine number animations, dense info without clutter-- **Font Stack**: `'JetBrains Mono', 'IBM Plex Mono', monospace`--### MODE C — THE "INSTALLATION"-*For: Landing pages, experiences, portfolios, brand statements*--> The browser is a canvas for art. Physics governs the layout.--- **Typography**: Fluid sizing (`clamp()`). Brutalist grotesque or mono. Abstract over literal.-- **Layout**: Full-viewport. Organic blobs, brutalist raw HTML, or fluid simulations.-- **Palette**: Monochrome or dark mode with subtle noise. One controlled color surprise.- - Background: `#080808` | Foreground: `#F0F0F0` | Noise opacity: 3-5%-- **Key Tech**: WebGL-style distortion (CSS filters + SVG), cursor trails, fluid typography-- **Font Stack**: `'Space Grotesk', 'DM Mono', sans-serif`-------## 4. VISUAL SYSTEM — SOPHISTICATED CHAOS--### Typography Scale-```css-/* The Extremes — use both ends, nothing in between */-.headline { font-size: clamp(4rem, 12vw, 10rem); line-height: 0.9; letter-spacing: -0.03em; }-.subheadline { font-size: clamp(1.5rem, 3vw, 2.5rem); }-.label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; }-.body { font-size: 1rem; line-height: 1.7; max-width: 60ch; }-```--### Layout Principles-- **Neo-Brutalism**: Raw borders (`border: 1px solid`), visible grid lines (`outline`), unstyled HTML purposefully exposed.-- **Overlap**: Titles sit on top of photos. Buttons straddle borders. Use `margin-top: -2rem` aggressively.-- **Whitespace**: 40% of viewport can be empty to frame a single element. Emptiness is a design choice.-- **Grid**: Avoid 12-column. Use `grid-template-columns: 3fr 1fr` or asymmetric definitions.--### Motion System-```css-/* Spring physics — no linear animations */-* { transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); } /* spring overshoot */--/* Stagger cascade — reveal line by line */-.reveal-line {- opacity: 0; transform: translateY(1.2em);- animation: reveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;-}-@keyframes reveal { to { opacity: 1; transform: translateY(0); } }-```-------## 5. EXECUTION SCENARIOS--### Scenario: Login Form-- ❌ **AI Flop**: Centered card, blue button, shadow.-- ✅ **Anti-Slop Solution**: Split screen. Left = shifting noise curtain. Right = Technical UI — inputs defined only by 1px bottom borders. Submit = magnetic text label that follows cursor. Strictly monospace.--### Scenario: Portfolio-- ❌ **AI Flop**: Hero image + 3 text columns.-- ✅ **Anti-Slop Solution**: User's name as an infinite vertical marquee loop. Projects as parallax-stacked images that reveal on scroll. Cursor uses `mix-blend-mode: difference`, inverting colors as it moves.--### Scenario: Dashboard-- ❌ **AI Flop**: Sidebar, white cards, drop shadows.-- ✅ **Anti-Slop Solution**: Blueprint rule lines (1px grid). No shadows. Grainy off-white bg. Data updates trigger slot-machine number shuffle. Looks like a financial terminal.-------## 6. QUALITY ASSURANCE CHECKLIST--Before outputting any code, verify:--- [ ] **Safe?** — Does the creativity break usability on mobile? If yes, simplify mobile while keeping desktop wild.-- [ ] **Not Boring?** — Is there a "Standard Card" or a Tailwind-blue button? If yes, kill it.-- [ ] **Not Slop?** — Does it look like a template? If yes, restart.-- [ ] **Is it Art?** — Does it feel like a designed object? If yes, ship it.-------## 7. FORBIDDEN COMBINATIONS (QUICK REFERENCE)--```-purple → blue gradient ❌-rounded pill badge ❌-white card + gray border ❌-centered hero with subtext ❌-rocket/shield icon ❌-glassmorphism as default ❌-linear animation timing ❌-12-column bento grid ❌-pure black shadow ❌-centered everything ❌-```-------## 8. RESOURCE REFERENCES--- **Fonts**: [Google Fonts — Cormorant Garamond](https://fonts.google.com/specimen/Cormorant+Garamond), [JetBrains Mono](https://fonts.google.com/specimen/JetBrains+Mono), [Space Grotesk](https://fonts.google.com/specimen/Space+Grotesk)-- **Inspiration (study, don't clone)**: Refinery29, Are.na, Cargo Collective, Virgil Abloh's work-- **CSS Tricks**: `mix-blend-mode`, `clip-path`, `scroll-timeline`, `@starting-style`-- **Examples**: See `examples/` directory in this skill for implementation patterns.+# High-Agency Frontend Skill++## 1. DEFAULT ARCHITECTURE & CONVENTIONS+Unless the user explicitly specifies a different stack, adhere to these structural constraints to maintain consistency:++* **Framework & Interactivity:** React or Next.js. Default to Server Components (`RSC`). Use Client Components (`"use client"`) strictly at the leaf level. **Never** use arbitrary Vanilla JS DOM manipulation (e.g., `document.querySelector`, `el.addEventListener`). Use `useRef` and `useEffect` for DOM events, or prefer `framer-motion` for complex physical animations. `useEffect` cleanup functions are mandatory to prevent Virtual DOM conflicts and memory leaks.+* **Component Architecture:** Compose modular trees, avoiding monolithic "god components". Organize intuitively:+ * Layout/Sections: `/components/sections/*` (e.g. `TableSection`)+ * UI Primitives / Complex Compounds: `/components/ui/*` (e.g. `DataTable`, `ActionMenu`)+* **State Management:** Use local `useState`/`useReducer` for isolated UI. Use global state (Zustand/Context) to avoid painful prop-drilling in deep component trees (e.g., an audio player controlled from distant child components).+* **Styling Policy:** Use Tailwind CSS (v3/v4) for 90% of styling (layout, colors, spacing). Use raw CSS (or CSS Modules) ONLY for complex `@keyframes`, `clamp()` typography, and pseudo-element grain filters where inline Tailwind strings become unreadable or impossible.+* **Responsiveness & Spacing:**+ * Standardize breakpoints (`sm`, `md`, `lg`, `xl`).+ * Contain page layouts using `max-w-7xl mx-auto`.+ * Adhere strictly to a 4px baseline grid (e.g., standardizing on Tailwind's `gap-4`, `p-8` scales).+* **Icons:** Phosphor Icons or Radix UI Icons. **Mandatory:** Standardize `strokeWidth` globally (e.g., exclusively use `1.5` or `2.0`).++## 2. SKILL CONFIGURATION (Quantitative Dials)+The user may provide these values (1-10). They dictate your CSS output metrics and layout choices.++### [ DESIGN_VARIANCE: 6 ]+Controls symmetry and layout offsets.+* **1-3 (Predictable):** Flexbox `justify-center`, strict 12-column symmetrical grids, equal paddings.+* **4-7 (Offset):** Use `margin-top: -2rem` overlapping, varied image aspect ratios (e.g., 4:3 next to 16:9), left-aligned headers over center-aligned data.+* **8-10 (Asymmetric):** Masonry layouts, CSS Grid with fractional units (e.g., `grid-template-columns: 2fr 1fr 1fr`), massive empty zones (`padding-left: 20vw`).+* **⚠️ MOBILE OVERRIDE:** For levels 4-10, any asymmetric layout above `md:` MUST aggressively fall back to a strict, single-column layout (`w-full`, `px-4`, `py-8`) on viewports `< 768px` to prevent horizontal scrolling and layout breakage.++### [ MOTION_INTENSITY: 5 ]+Controls animation complexity *working within the pre-defined project dependencies*.+* **1-3 (Static):** No automatic animations. CSS `:hover` and `:active` states only.+* **4-7 (Fluid CSS):** Use `transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`. Use `animation-delay` cascades for load-ins. Focus strictly on `transform` and `opacity`. **Caution:** Apply `will-change: transform` dynamically only to deeply animating elements (and remove it post-animation) rather than applying it globally, to conserve GPU memory.+* **8-10 (Advanced Choreography):** Complex scroll-triggered reveals or parallax. **⚠️ REACT RENDER OVERRIDE:** If using `useEffect` or `useRef` for external animation libraries (GSAP, Framer), you MUST return a strict cleanup function (e.g., `ctx.revert()`, observer disconnects) to prevent catastrophic memory leaks.++### [ VISUAL_DENSITY: 4 ]+Controls spacing tokens and typography tracking.+* **1-3 (Editorial):** `py-24` or `py-32` section padding. `tracking-tighter` on massive display headers.+* **4-7 (Standard Application):** `py-12` section padding.+* **8-10 (Data-Heavy HUD):** `py-2` to `py-4`. 1px rule lines (`border-b border-gray-200`). Use Monospace (`font-mono`) strictly for numerical data and technical labels.++## 3. DESIGN ENGINEERING DIRECTIVES (Bias Correction)+LLMs have statistical biases toward specific UI cliché patterns. Proactively construct premium interfaces using these engineered rules:++**Rule 1: Deterministic Typography**+* **Display/Headlines:** Default to `text-4xl md:text-6xl tracking-tighter leading-none` unless the specific layout or brand context explicitly demands otherwise. Pair a distinct display weight with a highly legible body weight.+* **Body/Paragraphs:** Default to `text-base text-gray-600 leading-relaxed max-w-[65ch]`.+* **Contextual Focus:** Modern B2B tools excel with clean Sans-Serifs (`Inter`, `Geist`). Do not force Serif fonts unless the context explicitly demands an editorial or luxury aesthetic.++**Rule 2: Color Calibration**+* **Constraint:** Limit to a maximum of **1 Accent Color**. Keep accent saturation below 80% to maintain a premium feel.+* **Neutrals:** Stick strictly to the standard neutral scales (e.g., Tailwind `gray-50` to `gray-900` or `zinc`).+* **Gradients:** The generic 2023 purple-to-blue linear background gradient is BANNED. You MAY use gradients functionally: extremely subtle `radial-gradient` backgrounds for depth (opacity < 15%), or modern, soft mesh-gradients for premium SaaS aesthetics.++**Rule 3: Materiality, Shadows, and "Anti-Card Overuse"**+* **Constraint:** Standard `box-shadow: rgba(0,0,0,0.1)` is outdated. Do not habitually wrap every section in a bordered card.+* **Execution:** Use cards ONLY when elevation communicates hierarchy and grouping CANNOT be achieved via spacing and alignment alone. When a shadow is used, tint it to the background hue (e.g., `shadow-[0_8px_30px_rgba(14,30,37,0.12)]`), or use crisp `1px solid var(--border-color)` lines.++**Rule 4: Interactive UI States**+* **Mandatory Generation:** LLMs naturally generate "static" successful states. You MUST implement full interaction cycles:+ * **Loading:** Skeletal loaders matching layout sizes (avoid generic circular spinners).+ * **Empty States:** Beautifully composed empty states indicating how to populate data.+ * **Error States:** Clear, inline error reporting (e.g., forms).+ * **Tactile Feedback:** On `:active`, use `-translate-y-[1px]` or `scale-[0.98]` to simulate a physical push indicating success/action.++**Rule 5: Data & Form Patterns**+* **Forms:** Label MUST sit above input. Helper text is optional but should exist in markup. Error text below input. Use a standard `gap-2` for input blocks.++## 4. CREATIVE PROACTIVITY (Anti-Slop Implementation)+To actively combat generic AI designs, systematically implement these high-end coding concepts as your baseline:+* **"Liquid Glass" Refraction:** When glassmorphism is needed, go beyond `backdrop-blur`. Add a 1px inner border (`border-white/10`) and a subtle inner shadow (`shadow-[inset_0_1px_0_rgba(255,255,255,0.1)]`) to simulate physical edge refraction.+* **Magnetic Micro-physics (If MOTION_INTENSITY > 5):** Implement buttons that pull slightly toward the mouse cursor using Framer Motion (mapping mouse coordinates to `useTransform` X/Y offsets), snapping back softly on `onMouseLeave`.+* **Staggered Orchestration:** Do not mount lists or grids instantly. Use `staggerChildren` (Framer) or CSS cascade (`animation-delay: calc(var(--index) * 100ms)`) to create sequential waterfall reveals.++## 5. PERFORMANCE GUARDRAILS+* **DOM Cost:** Apply grain/noise filters exclusively to fixed, pointer-event-none pseudo-elements (e.g., `fixed inset-0 z-50 pointer-events-none`) and NEVER to scrolling containers to prevent continuous GPU repaints and mobile performance degradation.+* **Hardware Acceleration:** Never animate `top`, `left`, `width`, or `height`. Animate exclusively via `transform` and `opacity`.++## 6. PRE-FLIGHT CHECK+Evaluate your code against this matrix before output:+- [ ] Is global state used appropriately to avoid deep prop-drilling rather than arbitrarily?+- [ ] Is mobile layout collapse (`w-full`, `px-4`, `max-w-7xl mx-auto`) guaranteed for high-variance designs?+- [ ] Do `useEffect` animations contain strict cleanup functions?+- [ ] Are empty, loading, and error states provided?+- [ ] Are cards omitted in favor of spacing where possible?diff --git a/SKILL_v2.md b/SKILL_v2.mddeleted file mode 100644index a113d52..0000000--- a/SKILL_v2.md+++ /dev/null@@ -1,88 +0,0 @@-----name: high-agency-frontend-description: Senior UI/UX Engineer. Architect digital interfaces overriding default LLM biases. Enforces metric-based rules, strict component architecture, CSS hardware acceleration, and balanced design engineering.------# High-Agency Frontend Skill--## 1. DEFAULT ARCHITECTURE & CONVENTIONS-Unless the user explicitly specifies a different stack, adhere to these structural constraints to maintain consistency:--* **Framework & Interactivity:** React or Next.js. Default to Server Components (`RSC`). Use Client Components (`"use client"`) strictly at the leaf level. **Never** use arbitrary Vanilla JS DOM manipulation (e.g., `document.querySelector`, `el.addEventListener`). Use `useRef` and `useEffect` for DOM events, or prefer `framer-motion` for complex physical animations. `useEffect` cleanup functions are mandatory to prevent Virtual DOM conflicts and memory leaks.-* **Component Architecture:** Compose modular trees, avoiding monolithic "god components". Organize intuitively:- * Layout/Sections: `/components/sections/*` (e.g. `TableSection`)- * UI Primitives / Complex Compounds: `/components/ui/*` (e.g. `DataTable`, `ActionMenu`)-* **State Management:** Use local `useState`/`useReducer` for isolated UI. Use global state (Zustand/Context) to avoid painful prop-drilling in deep component trees (e.g., an audio player controlled from distant child components).-* **Styling Policy:** Use Tailwind CSS (v3/v4) for 90% of styling (layout, colors, spacing). Use raw CSS (or CSS Modules) ONLY for complex `@keyframes`, `clamp()` typography, and pseudo-element grain filters where inline Tailwind strings become unreadable or impossible.-* **Responsiveness & Spacing:**- * Standardize breakpoints (`sm`, `md`, `lg`, `xl`).- * Contain page layouts using `max-w-7xl mx-auto`.- * Adhere strictly to a 4px baseline grid (e.g., standardizing on Tailwind's `gap-4`, `p-8` scales).-* **Icons:** Phosphor Icons or Radix UI Icons. **Mandatory:** Standardize `strokeWidth` globally (e.g., exclusively use `1.5` or `2.0`).--## 2. SKILL CONFIGURATION (Quantitative Dials)-The user may provide these values (1-10). They dictate your CSS output metrics and layout choices.--### [ DESIGN_VARIANCE: 6 ]-Controls symmetry and layout offsets.-* **1-3 (Predictable):** Flexbox `justify-center`, strict 12-column symmetrical grids, equal paddings.-* **4-7 (Offset):** Use `margin-top: -2rem` overlapping, varied image aspect ratios (e.g., 4:3 next to 16:9), left-aligned headers over center-aligned data.-* **8-10 (Asymmetric):** Masonry layouts, CSS Grid with fractional units (e.g., `grid-template-columns: 2fr 1fr 1fr`), massive empty zones (`padding-left: 20vw`).-* **⚠️ MOBILE OVERRIDE:** For levels 4-10, any asymmetric layout above `md:` MUST aggressively fall back to a strict, single-column layout (`w-full`, `px-4`, `py-8`) on viewports `< 768px` to prevent horizontal scrolling and layout breakage.--### [ MOTION_INTENSITY: 5 ]-Controls animation complexity *working within the pre-defined project dependencies*.-* **1-3 (Static):** No automatic animations. CSS `:hover` and `:active` states only.-* **4-7 (Fluid CSS):** Use `transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`. Use `animation-delay` cascades for load-ins. Focus strictly on `transform` and `opacity`. **Caution:** Apply `will-change: transform` dynamically only to deeply animating elements (and remove it post-animation) rather than applying it globally, to conserve GPU memory.-* **8-10 (Advanced Choreography):** Complex scroll-triggered reveals or parallax. **⚠️ REACT RENDER OVERRIDE:** If using `useEffect` or `useRef` for external animation libraries (GSAP, Framer), you MUST return a strict cleanup function (e.g., `ctx.revert()`, observer disconnects) to prevent catastrophic memory leaks.--### [ VISUAL_DENSITY: 4 ]-Controls spacing tokens and typography tracking.-* **1-3 (Editorial):** `py-24` or `py-32` section padding. `tracking-tighter` on massive display headers.-* **4-7 (Standard Application):** `py-12` section padding.-* **8-10 (Data-Heavy HUD):** `py-2` to `py-4`. 1px rule lines (`border-b border-gray-200`). Use Monospace (`font-mono`) strictly for numerical data and technical labels.--## 3. DESIGN ENGINEERING DIRECTIVES (Bias Correction)-LLMs have statistical biases toward specific UI cliché patterns. Proactively construct premium interfaces using these engineered rules:--**Rule 1: Deterministic Typography**-* **Display/Headlines:** Default to `text-4xl md:text-6xl tracking-tighter leading-none` unless the specific layout or brand context explicitly demands otherwise. Pair a distinct display weight with a highly legible body weight.-* **Body/Paragraphs:** Default to `text-base text-gray-600 leading-relaxed max-w-[65ch]`.-* **Contextual Focus:** Modern B2B tools excel with clean Sans-Serifs (`Inter`, `Geist`). Do not force Serif fonts unless the context explicitly demands an editorial or luxury aesthetic.--**Rule 2: Color Calibration**-* **Constraint:** Limit to a maximum of **1 Accent Color**. Keep accent saturation below 80% to maintain a premium feel.-* **Neutrals:** Stick strictly to the standard neutral scales (e.g., Tailwind `gray-50` to `gray-900` or `zinc`).-* **Gradients:** The generic 2023 purple-to-blue linear background gradient is BANNED. You MAY use gradients functionally: extremely subtle `radial-gradient` backgrounds for depth (opacity < 15%), or modern, soft mesh-gradients for premium SaaS aesthetics.--**Rule 3: Materiality, Shadows, and "Anti-Card Overuse"**-* **Constraint:** Standard `box-shadow: rgba(0,0,0,0.1)` is outdated. Do not habitually wrap every section in a bordered card.-* **Execution:** Use cards ONLY when elevation communicates hierarchy and grouping CANNOT be achieved via spacing and alignment alone. When a shadow is used, tint it to the background hue (e.g., `shadow-[0_8px_30px_rgba(14,30,37,0.12)]`), or use crisp `1px solid var(--border-color)` lines.--**Rule 4: Interactive UI States**-* **Mandatory Generation:** LLMs naturally generate "static" successful states. You MUST implement full interaction cycles:- * **Loading:** Skeletal loaders matching layout sizes (avoid generic circular spinners).- * **Empty States:** Beautifully composed empty states indicating how to populate data.- * **Error States:** Clear, inline error reporting (e.g., forms).- * **Tactile Feedback:** On `:active`, use `-translate-y-[1px]` or `scale-[0.98]` to simulate a physical push indicating success/action.--**Rule 5: Data & Form Patterns**-* **Forms:** Label MUST sit above input. Helper text is optional but should exist in markup. Error text below input. Use a standard `gap-2` for input blocks.--## 4. CREATIVE PROACTIVITY (Anti-Slop Implementation)-To actively combat generic AI designs, systematically implement these high-end coding concepts as your baseline:-* **"Liquid Glass" Refraction:** When glassmorphism is needed, go beyond `backdrop-blur`. Add a 1px inner border (`border-white/10`) and a subtle inner shadow (`shadow-[inset_0_1px_0_rgba(255,255,255,0.1)]`) to simulate physical edge refraction.-* **Magnetic Micro-physics (If MOTION_INTENSITY > 5):** Implement buttons that pull slightly toward the mouse cursor using Framer Motion (mapping mouse coordinates to `useTransform` X/Y offsets), snapping back softly on `onMouseLeave`.-* **Staggered Orchestration:** Do not mount lists or grids instantly. Use `staggerChildren` (Framer) or CSS cascade (`animation-delay: calc(var(--index) * 100ms)`) to create sequential waterfall reveals.--## 5. PERFORMANCE GUARDRAILS-* **DOM Cost:** Apply grain/noise filters exclusively to fixed, pointer-event-none pseudo-elements (e.g., `fixed inset-0 z-50 pointer-events-none`) and NEVER to scrolling containers to prevent continuous GPU repaints and mobile performance degradation.-* **Hardware Acceleration:** Never animate `top`, `left`, `width`, or `height`. Animate exclusively via `transform` and `opacity`.--## 6. PRE-FLIGHT CHECK-Evaluate your code against this matrix before output:-- [ ] Is global state used appropriately to avoid deep prop-drilling rather than arbitrarily?-- [ ] Is mobile layout collapse (`w-full`, `px-4`, `max-w-7xl mx-auto`) guaranteed for high-variance designs?-- [ ] Do `useEffect` animations contain strict cleanup functions?-- [ ] Are empty, loading, and error states provided?-- [ ] Are cards omitted in favor of spacing where possible?