| name | visual |
| description | A decision-gate design skill that forces AI agents to justify every design choice through functional reasoning before visual execution โ producing distinctive, purposeful interfaces instead of aesthetic theater. |
| license | MIT |
HOW THE AGENT USES THIS FILE
This is the single source of truth before any design output. Execution order is mandatory:
1. LAYER 0 โ Detect intent, ask smart questions (max 3), write session-intent.md
2. LAYER 1 โ Lock product strategy from session file
3. LAYER 2 โ Apply UX laws to every layout decision
4. LAYER 3 โ Ground visual direction in brand strategy
5. LAYER 4 โ Execute visuals with discipline
6. LAYER 5 โ Enforce design system tokens
7. LAYER 6 โ Self-audit before delivering anything
8. POST โ Update CHANGELOG at bottom of this file
โ Never skip a layer. Never design before session-intent.md is written.
LAYER 0 โ INTENT DETECTION & SMART QUESTIONING
Before asking anything, understand what you already know.
Never ask a question whose answer is already implicit in the request.
0.1 โ Classify the Request Mode
Read the user's message and assign exactly one mode. The mode controls which questions matter.
| Mode | Trigger Words | What They Actually Need |
|---|
| BUILD | create, build, make, design, implement, generate | A deliverable. Output, not advice. |
| FIX | fix, improve, update, broken, bad, wrong, ugly, generic | Targeted correction. They have something existing. |
| EXPLORE | ideas, options, thinking about, what if, inspiration, direction | Paths, not execution. Show possibilities. |
| REVIEW | review, feedback, thoughts on, critique, rate, assess | Honest signal, not validation. |
| SYSTEM | design system, tokens, components, guidelines, library, primitives | Infrastructure, not a single screen. |
The mode is the first thing written into session-intent.md.
0.2 โ Inventory What Is Already Known
Before forming questions, check what the request already resolves. Do not ask about things you can infer.
RESOLVED (do not ask โ infer or decide autonomously):
[ ] Deliverable type โ if named ("a landing page", "a card component")
[ ] Stack โ if stated ("in React", "pure HTML/CSS")
[ ] Audience โ if described ("for developers", "B2B SaaS buyers")
[ ] Tone โ if implied ("luxury watch brand" โ refined, "kids app" โ playful)
[ ] Hard constraints โ if stated ("mobile only", "no JS", "dark mode required")
POTENTIALLY OPEN (ask only if blocking AND not inferable):
[ ] Primary user goal โ what action/decision the interface must drive
[ ] Success metric โ how we know the design worked
[ ] Existing brand โ do assets exist (logo, colors, fonts) or starting fresh?
[ ] Content โ do they have copy/imagery or is that also needed?
[ ] Scope โ quick prototype vs. production-ready?
[ ] What "done" looks like โ especially critical for FIX and REVIEW modes
Rule: If you can make a reasonable default decision, make it and state it. Never ask permission for aesthetic choices. Ask only when the answer would materially change what you build.
0.3 โ Select Questions (Maximum 3, All at Once)
From the open list, select only questions whose answers would change the output significantly. Ask all at once โ never across multiple turns.
Hard rules:
- Max 3 questions per session
- Always ask if primary user goal is unclear (blocks everything downstream)
- Always ask if existing brand assets exist (changes the entire visual direction)
- Never ask about things that can be inferred
- Never ask permission for aesthetic choices โ decide and state them
- Offer 2โ4 concrete options per question โ don't make the user think from scratch
Mode-specific question banks:
BUILD โ typical questions:
Before I start, three quick things:
1. What's the primary action you want users to take?
โ Sign up / Book a call / Buy now / Explore content / Something else
2. Existing brand assets?
โ Have logo + colors already / Starting completely fresh / Rough direction only
3. Who is this for? (one sentence describing the target user)
FIX โ typical questions:
To fix this effectively:
1. What specifically feels wrong?
โ Too generic / Poor hierarchy / Wrong tone / Too cluttered / Doesn't match brand
2. Can you share the current file or code?
3. What does "fixed" look like โ what's the bar you're aiming for?
EXPLORE โ typical questions:
To point you in the right direction:
1. What's the context? (product type, industry, rough audience)
2. Any hard constraints I should design around?
โ Budget / Tech stack / Timeline / Brand restrictions
3. What have you already ruled out? (saves showing ideas already rejected)
REVIEW โ typical questions:
To give you useful signal rather than validation:
1. What are you most uncertain about in this design?
2. Who is the intended user and what should they do on arrival?
3. Is there a specific decision you're trying to make based on this review?
SYSTEM โ typical questions:
To build the right infrastructure:
1. What product or products will this system serve?
2. What's the team size and tech stack consuming these tokens?
3. Does a partial system already exist, or starting from zero?
0.4 โ Write session-intent.md Before Any Design Work
Location: /home/claude/session-intent.md
Timing: Written immediately after classifying mode โ before asking questions or doing any work.
Lifecycle: Updated as user answers arrive. Overwritten at the start of each new session.
Template:
# Session Intent
**Date:** YYYY-MM-DD
**Mode:** [BUILD | FIX | EXPLORE | REVIEW | SYSTEM]
---
## Raw Request
[Exact quote or close paraphrase of what the user said]
## Inferred Intent
[One sentence: what they actually need, not just what they said]
---
## What We Already Know
| Field | Value | Source |
|---|---|---|
| Deliverable | e.g. Landing page | Stated |
| Stack | e.g. React / HTML only | Stated / Inferred |
| Audience | e.g. First-time SaaS buyers | Inferred from product type |
| Tone | e.g. Professional but approachable | Inferred from brand |
| Constraints | e.g. Mobile-first, no animations | Stated |
| Brand Assets | e.g. Starting fresh / Has existing logo | TBD / Stated |
---
## Questions Asked โ Answers Received
1. Q: [question text]
A: [fill when received]
2. Q: [question text]
A: [fill when received]
3. Q: [question text]
A: [fill when received]
---
## Resolved Intent
*(Fill after all answers received โ this is the contract for all subsequent layers)*
- **Primary goal:** [what the interface must achieve]
- **Success metric:** [how we know it worked]
- **User arrival state:** [emotional state + context on arrival]
- **First user win:** [what they feel in <10 seconds]
- **Most important element:** [the one thing with highest visual weight]
- **Aesthetic direction:** [one committed tone โ not a list]
- **Unforgettable moment:** [the one thing they'll remember]
---
## Agent Decisions (stated, not asked)
*(Choices the agent made autonomously โ user can override any of these)*
- [decision]: [rationale]
---
## Do Not Do
*(Explicit constraints or anti-patterns flagged by user)*
- [constraint]
โ STOP: Do not proceed to Layer 1 until "Resolved Intent" is fully filled in.
0.5 โ State Assumptions Before Starting Work
After questions are answered, confirm the shared contract:
Here's what I'm working with:
โ Goal: [primary action/outcome]
โ User: [who they are and their arrival state]
โ Tone: [committed aesthetic direction โ one specific thing]
โ Stack: [technology]
โ The one thing they'll remember: [peak moment]
Starting now โ let me know if any of these should shift.
If the user corrects anything here, update session-intent.md before proceeding.
LAYER 1 โ PRODUCT STRATEGY & VISION
"Strategic design activities are what AI cannot replace. They require understanding business context, user psychology, and the gap between the two."
โ Nielsen Norman Group, 2025
Core Principle
Design exists to serve a business outcome AND a user outcome simultaneously. The product vision is stated before any interface decision is made.
Gate Questions (all must be answerable from session-intent.md)
- What decision or action does this interface exist to support?
- What is the single measurable success metric?
- What is the user's emotional state on arrival?
- What is the user's first win โ achievable in under 10 seconds?
- What is the one element with the highest visual weight? It must align with question 1.
Failure Modes
- Designing visuals before answering these questions
- Treating "premium aesthetic" as a product goal
- Confusing stakeholder approval with user success
LAYER 2 โ UX PRINCIPLES
"If users ever have to stop and think, clarity is missing."
The 8 Laws โ Every Layout Decision Must Pass at Least One
| Law | Principle | Applied Check |
|---|
| Jakob's Law | Match existing mental models. Deviate only for measurable delight. | Does this pattern feel familiar to the target user? |
| Fitts's Law | Size and proximity determine usability. Mobile: primary actions in thumb zone. | Is the primary CTA large enough and reachable one-handed? |
| Hick's Law | Every additional option increases decision time. Reduce to minimum at conversion points. | How many choices exist at the most important moment? |
| Miller's Law | Working memory holds 7ยฑ2 items. Chunk, group, cluster deliberately. | Are related elements grouped by logic, not decoration? |
| Peak-End Rule | Users judge by peak moment + final moment โ not the average. | What is the peak? What is the end? Both intentionally designed? |
| Progressive Disclosure | Show only what's needed now. Reveal depth on demand. | Does anything appear before the user needs it? |
| Tesler's Law | Complexity cannot be destroyed โ only moved. Move it to the system. | Who bears the irreducible complexity here? |
| Postel's Law | Accept imperfect input. Return results based on intent, not exact match. | Do forms forgive reasonable user errors gracefully? |
Layout Gate Questions
- Is there an unambiguous visual hierarchy? (One dominant element per screen.)
- Can a user complete the primary task without reading instructions?
- Does the design genuinely pass on mobile โ not just render on it?
- Does every group of elements exist because of proximity logic?
Failure Modes
- Inconsistent button styles for similar actions
- Forms asking for unnecessary information upfront
- Animations delaying first meaningful interaction
- Navigation requiring more than 3 clicks to primary content
- Error states that blame users instead of guiding them
LAYER 3 โ BRAND STRATEGY & POSITIONING
"Great brands stand for something motivating and stand out in a way that makes them memorable."
โ Design Bridge & Partners, 2025
Brand Foundation Stack (in priority order)
- Purpose โ Why does this exist beyond revenue?
- Values โ What principles guide hard decisions?
- Positioning โ What unique space does it hold in the user's mind?
- Voice โ How does it speak? (Confident / Empathetic / Rebellious / Precise)
- Visual Identity โ The expression of 1โ4. Never designed before 1โ4 are defined.
Positioning Gate (answer all three in one sentence each)
- Who do we serve?
- What specific value do we provide?
- Why can no one else provide it the same way?
If you cannot answer all three, positioning is unresolved. Do not design visual identity yet.
Voice Rules
- Voice is constant. Tone shifts per context. (Urgent in errors. Warm in onboarding.)
- Authenticity > aspiration. Users detect performative values immediately.
- Every copy choice โ button labels, error messages, empty states โ is a brand touchpoint.
- "Premium," "innovative," "trusted" are outcomes, not values.
Visual Identity Constraints
- Logo: recognizable at 16px favicon size
- Color: 1 dominant + 1 accent + 1 neutral. Each additional requires justification.
- Typography: display font carries emotion, body font disappears. Never reuse the same pairing across different brand contexts.
- Motion: signals modernity only when it serves the brand character.
Failure Modes
- Designing a logo before defining brand purpose
- Applying the same visual system to brands with different audiences
- Following visual trends without asking if they fit the positioning
LAYER 4 โ VISUAL DESIGN EXECUTION
"Align typography to a grid, establish clear hierarchy, use color strategically, be consistent."
โ Nielsen Norman Group
The 5 Visual Principles โ Non-Negotiable
Scale โ Size communicates importance. Primary action = largest. Tertiary = smallest. Enforced, not assumed.
Hierarchy โ One dominant element per screen. If two compete, remove the weaker one or demote it.
Balance โ Asymmetry is valid but intentional. Optical centering (visual weight) > mathematical centering.
Contrast โ WCAG AA floor: 4.5:1 (normal text), 3:1 (large text). Design in grayscale first. If hierarchy is unclear without color, color will not fix it.
Gestalt โ Use proximity, similarity, continuity, and closure deliberately. Don't let them work against you accidentally.
Typography Rules
- Never use Inter, Roboto, Arial, Space Grotesk, or system fonts as a default
- Display font: carries emotional tone, specific to this context
- Body font: so readable it disappears
- Type scale: display โ heading โ subheading โ body โ caption โ label
- Tokens: define size, weight, line-height, letter-spacing as a system โ not per-element
Color Rules
- Separate brand colors (identity) from functional colors (errors, success, data)
- Semantic token naming:
color-text-error not red-700
- Never use color as the only accessibility signal
- Dark mode: semantic tokens only, so theme changes propagate from one source
Motion Rules
- CSS-only first. Add JS libraries only when CSS cannot achieve the effect.
- One orchestrated entrance > ten scattered micro-interactions
- Animation serves comprehension OR delight โ never fills time
- LCP < 2s. Jank is a brand liability.
The Removal Test (apply to every element before shipping)
"If I remove this, does the interface fail to solve its primary goal?"
- Yes โ Essential. Keep it.
- No โ Decoration. Remove it, or justify it in one sentence tied to user psychology.
LAYER 5 โ DESIGN SYSTEM & TOKENS
"Design tokens are the single source of truth for values that bridge design and code."
Token Architecture (Three Tiers)
Global Tokens (raw values)
โโโ --blue-500: #3b82f6
โโโ --space-4: 1rem
Alias Tokens (semantic meaning)
โโโ --color-primary: var(--blue-500)
โโโ --color-text-error: var(--red-600)
โโโ --spacing-default: var(--space-4)
Component Tokens (specific usage)
โโโ --button-background: var(--color-primary)
โโโ --input-border-focus: var(--color-primary)
Naming Convention
Format: category-property-variant-state
Examples: color-text-primary, color-background-surface, font-size-display, space-4
State suffixes: -hover, -pressed, -disabled, -focus
Never hard-code values in components. Always reference a token.
Minimum Token Sets Required
Typography
font-family-display / font-family-body
font-size-{xs|sm|md|lg|xl|2xl|3xl|display}
font-weight-{regular|medium|semibold|bold}
line-height-{tight|normal|relaxed}
letter-spacing-{tight|normal|wide}
Color
color-brand-primary / color-brand-accent
color-neutral-{100โ900}
color-text-{primary|secondary|tertiary|disabled|inverse}
color-background-{surface|elevated|sunken|overlay}
color-border-{default|focus|error}
color-feedback-{error|warning|success|info}
Spacing (4px base unit)
space-{1|2|3|4|5|6|8|10|12|16|20|24}
Component Documentation Standard
- Purpose โ what problem it solves
- Usage rules โ when to use AND when not to
- Accessibility โ keyboard behavior, ARIA roles, contrast
- States โ default, hover, focus, pressed, disabled, error
- Code example
Failure Modes
- Hard-coding hex values in component CSS
- Naming tokens by value (
red-600) instead of purpose (color-error)
- Component library without "when NOT to use" documentation
- Building the system for current scale instead of projected scale
LAYER 6 โ SCOPE CONTROL & SELF-AUDIT
Scope Rule (Enforced Before Writing Code)
Commit to exactly one of each:
- One motion/animation technique
- One typographic feature (variable font, ink trap, unusual pairing)
- One layout technique (asymmetry, bento grid, cinematic overlap)
- One unforgettable moment
Attempting all techniques simultaneously produces none of them well.
Stack Rule
Minimum stack that delivers the vision. Not React + GSAP + Lenis + WebGL by default.
Performance Standards
- LCP < 2s (hard floor)
- No animation blocking first meaningful paint
- No font loading causing layout shift
- Mobile-first always
Accessibility Standards (Non-Negotiable)
- WCAG AA on all text
- Keyboard navigation for all interactive elements
- Focus states visible and on-brand
- Color is never the only signal
- Screen reader labels on all icons and images
Pre-Delivery Self-Audit (Fix Any "No" Before Delivering)
- Does the most important element have the highest visual weight?
- Can a user complete the primary goal in under 10 seconds without instructions?
- Does every animation serve comprehension or delight โ not fill time?
- Has the removal test been applied to every element?
- Does the design look like it was made for a different project? (If yes โ fix it.)
- Does implementation complexity match the aesthetic vision?
ANTI-PATTERN BLACKLIST
Permanently banned. If you reach for any of these, stop and choose differently.
| Banned Pattern | Why |
|---|
| Glassmorphism cards on dark backgrounds | Default "AI design" โ instantly identifiable as generic |
| Purple-to-blue gradients on white | Overused to invisibility |
| Inter, Space Grotesk, Roboto, Arial as hero typeface | Signals no typographic thought |
| GSAP + WebGL + haptics + audio UI combined | Complexity theater โ nothing executes well |
| Decorative section dividers | Apply the removal test. They never pass. |
| "Premium," "innovative," "trusted" as brand values | Outcomes, not values. Describe every brand equally. |
| Animations delaying first meaningful interaction | Performance and trust are the same thing |
| Color as the only accessibility signal | Fails 8% of adult men with color vision deficiency |
| Abstract aesthetic labels without visual description | "Industrial luxury" tells the agent nothing. Describe what the user sees in 3 seconds. |
SESSION FILE PROTOCOL
session-intent.md โ Temporary, Per-Session
- Location:
/home/claude/session-intent.md
- Created: Layer 0 Step 0.4 โ before any questions or work
- Updated: As answers arrive and agent decisions are made
- Overwritten: At the start of every new session
- Purpose: Live context for all layers in the current session
guidelines.md โ Permanent Master (this file)
- Location:
/home/claude/guidelines.md
- Updated: After every session, in the CHANGELOG below
- What to record: Effective question patterns, wasted questions, new anti-patterns, user overrides that reveal a wrong default assumption
- Rule: Never delete sections. Mark deprecated content with
[DEPRECATED โ reason].
When to Update This File
Update after a session if any of the following occurred:
- A question pattern that consistently produced useful answers โ add to 0.3 examples
- A question that wasted a turn โ add to 0.3 "never ask" rules
- A new design anti-pattern emerged โ add to blacklist
- A default the user always overrides โ convert to a question in 0.3
- A layer skipped because it didn't apply โ note the context and condition
QUICK REFERENCE CHECKLIST
SESSION SETUP
[ ] Mode classified (BUILD / FIX / EXPLORE / REVIEW / SYSTEM)
[ ] session-intent.md written
[ ] Max 3 questions asked โ all at once
[ ] Resolved intent confirmed with user
[ ] Assumptions stated before work begins
STRATEGY (Layer 1)
[ ] Primary user goal defined
[ ] First user win named (achievable <10s)
[ ] Success metric identified
BRAND (Layer 3)
[ ] Purpose, values, positioning defined
[ ] Voice consistent with brand character
[ ] Visual identity serves positioning, not the reverse
UX (Layer 2)
[ ] One dominant element per screen โ hierarchy enforced
[ ] Primary action has highest visual weight
[ ] Mobile validated, not assumed
[ ] WCAG AA, keyboard nav, focus states confirmed
DESIGN SYSTEM (Layer 5)
[ ] All values via tokens โ none hard-coded
[ ] Semantic naming followed
[ ] Component states documented
EXECUTION (Layer 6)
[ ] One motion technique committed to
[ ] One typographic feature committed to
[ ] One unforgettable moment identified
[ ] Removal test applied to every element
[ ] Minimum viable stack confirmed
[ ] LCP < 2s planned
[ ] No blacklisted pattern used
SELF-AUDIT
[ ] Design looks made for THIS project
[ ] Every element passed removal test
[ ] Implementation complexity matches aesthetic vision
[ ] session-intent.md up to date
[ ] guidelines.md changelog updated
CHANGELOG
| Version | Date | Change | Reason |
|---|
| 1.0 | 2025 | Initial aesthetic vocabulary system | First generation โ label-based approach |
| 2.0 | 2025 | Replaced labels with decision gates (Layers 1โ6) | Labels produced generic output every time |
| 3.0 | 2025-03-27 | Added Layer 0: intent detection, mode classification, smart questioning (max 3, all at once), mode-specific question banks, session-intent.md protocol, assumption statement pattern, master changelog protocol | Agent was designing without understanding user need; skipping problem clarity entirely; asking too many questions across multiple turns |
This file is a living document. Update it when new research contradicts current guidance, or when a session reveals a pattern worth capturing. Every changelog entry represents a failure mode that was caught and prevented from repeating.