/design

Most AI-generated interfaces look the same. /design is the part of Command Code that knows why, and fixes it in your files.

Generated UI has a look

You can recognise it in two seconds without being able to name it. Designers can name it. Asked to label what makes an interface read as machine-made, they land on the same short list, and roughly nine tenths of that recognition signal sits in ten patterns.

the ten tells
01tech gradient
A hero panel filled with a blue-violet to magenta gradient

glossy energy on everything

02generic tech hue
A solid indigo block labelled with the hex value 6366F1#6366F1

indigo because ‘software’

03feature tile grid
Three identical feature tiles side by side

three tiles, equal weight, no priority

04accent rail
Cards with a coloured stripe down the left edge

decoration posing as organization

05unearned blur
Frosted glass panel floating over two coloured blobs

glassmorphism with no depth system

06stat monument
Two oversized statistics dominating the panel10x99%

numbers where the product story belongs

07icon topper
A square icon sitting above each heading

template filler above every heading

08bounce everywhere
A ball bouncing on a floor line in decaying arcs

elastic easing with no purpose

09default type
A generic sans-serif specimen with no scaleAaInterInterInterInter Inter Inter Inter

whatever the distribution ships

10center stack
Every element centred on one axis

no composition decision made

Any one of these is defensible on its own. Their co-occurrence is the AI-generated look. /design smell names the ones on your surface; /design deslop replaces each with a decision that belongs to your product.

Each one is defensible alone. A gradient is not a crime. Centered is sometimes right. What gives the game away is the co-occurrence: the same ten choices, together, on every surface, because each one is the safest available answer.

The model was never missing the capability

It can write any CSS you ask for. Ask for a 1.33 type scale and you get one. Ask for OKLCH and you get OKLCH.

What it lacked was the policy of when. Nothing in the request said which hue this product had earned, or whether this section wanted a grid or a lead. Absent a policy, the model picks the median answer — and the median of every landing page ever written is indigo, centered, three tiles.

Taste turned out to be small

That is the part worth knowing. The policy is low-dimensional. For UI, taste is a finite set of principles applied consistently, plus a short catalogue of common violations. Small enough to write down.

So that is what /design is: twenty-five reference documents encoding the principles, the ten tells to detect, seven work patterns to compose from, nine states every control has to survive, and a bar each mode must clear before it may claim it did anything. A curriculum, not a list of instructions.

Name the job before the pixels

A centered hero with three feature cards is not a layout decision. It is the absence of one.

So before any visual property is touched, the surface's job gets named — one of seven work patterns — and the composition follows from that.

pattern first, pixels second
Monitor

status, alerts, live metrics, priority at a glance

Operate

command bars, canvas, inspectors, direct action

Compare

tables, matrices, ranked lists, stable scan lanes

Configure

grouped settings, forms, safe commit areas

Learn

article flow, walkthrough rhythm, progression

Decide

focused pitch, proof, one dominant action

Explore

search, filters, maps, reversible discovery

Name the job first

Composition follows the work, never habit. This is the chain of thought for layout.

The agent names the surface's job before touching any visual property. A centered hero with three equal cards is allowed when that pattern answers the work. It is not the house style.

Diagnose, then treat

A design pass that guesses is a design pass you have to check. So the work splits: audit modes localize, treatment modes repair, and the handoff between them is a file.

the /design loop
audit
checkupsmellreview

Localize what is wrong. Never edits a file.

report
*.md*.html

Written to .commandcode/design/. Context for the next pass, not a to-do list handed back to you.

treatment
deslopredesignrelayoutrecolor

Reads the reports, then edits real files and verifies the result.

Audit modes localize, treatment modes repair. The report is the diagnostic, the edit is the treatment, and neither ships without the other.

Three rules hold the loop together:

  1. Report modes only report. smell, checkup, and review write their .md and .html artifacts and stop. Fixing is a separate, explicit command, so an audit never edits a file behind your back.
  2. Treatment modes read the reports first. Any mode that changes the interface checks .commandcode/design/ before deciding what to change, applies the relevant findings, and then still runs its own full bar.
  3. Truthful completion. A mode may only claim "added", "fixed", or "changed" when the change is visible in the rendered result. If something was looked at but not altered, it says inspected, not fixed.

The third rule is the one that keeps the other two honest. A pass that cannot point at a visible change does not get to say it made one.

Quick start

Open Command Code in the project you want to work on, then run three commands in order.

# 1. Find out what is actually wrong. Writes a report, changes nothing. /design checkup # 2. Name the generic patterns. Also report-only. /design smell # 3. Fix what the reports found, in real files. /design deslop

Reports land in .commandcode/design/: a markdown file the next mode reads, and an HTML file you open in a browser.

If you would rather not choose, run /design on its own. It checks whether a report already exists, audits first if none does, then applies the most critical fixes in the same pass.

/design # route itself and act /design make this hero stronger # freeform, picks the closest mode /design typeset src/components/Hero.tsx # one mode, one target /design help # full usage guide

Audit modes

These three produce reports and change nothing.

checkup [target]

Fast triage. A vital-sign read rather than a full critique: is this surface safe to keep building on, or is something unsafe to ship?

Six vital signs scored out of ten, totalling 35 out of 60intentionality5/10readability10/10usability5/10responsiveness0/10speed10/10accessibility5/1035 / 60 · WATCH

Every vital is backed by something observed. A vital that could not be verified is marked unverified, never healthy. Critical issues come with a prescription naming what is broken, why it matters, and which mode fixes it.

Writes checkup-report.md and checkup-report.html. Next: finish, recolor, relayout.

smell [target]

A detector for reflex, template, and generated sameness. The score runs backwards, because finding nothing is the perfect result.

Smell scores run backwards: finding zero tells scores ten out of tentells foundscoreverdict010CLEAN1–27–8FAINT3–45–6PRESENT5–63–4STRONG7+0–2FAILUREzero tells is a perfect 10/10, never 0/10

Severity is about clustering, not count. One generic icon card is cleanup. A page built from equal cards, an indigo gradient, a centered hero, and vague copy is an identity failure, and the fix is a new lane rather than a patch.

Writes smell-report.md and smell-report.html. Next: deslop, finish.

review [target]

An honest design read. It walks the primary flow as a story — arrive, promise, act, respond, wait, succeed or fail, resolve — and marks where the story breaks.

Five design lenses scored out of ten, totalling 31 out of 50first impression5/10hierarchy6/10color voice4/10type voice6/10interaction feel10/1031 / 50 · MIDDLE

Scores are not inflated to be polite, and a score is never given without saying what would move it. Most real work lands in the middle.

Writes review-report.md and review-report.html. Next: finish, refine.

What a report looks like

Every audit writes two artifacts into .commandcode/design/, and only those two. No summary file, no extra analysis document.

.commandcode/design/ ├── smell-report.md ← what the next mode reads ├── smell-report.html ← what you open ├── checkup-report.md ├── checkup-report.html ├── review-report.md ├── review-report.html └── brief.md ← only after /design setup

The markdown is the source of truth, because it is structured for the model to apply. It carries the same sections in plain text:

# Smell Report — ORBITAL **Score:** 4/10 · STRONG ## TL;DR Six of the ten tells are present and three cluster in the first viewport. Nothing here could only belong to a satellite-tasking product. ## Heuristic scores | # | Heuristic | Score | Key finding | |---|-------------------|-------|------------------------------| | 1 | tech gradient | 0 | Hero.tsx:12, indigo→magenta | | 2 | generic tech hue | 0 | tokens.css:4, #6366F1 | | 3 | feature tile grid | 0 | Features.tsx:31, three equal | | 4 | accent rail | 1 | absent | ## Priority issues ### P0 — The first viewport belongs to no product Gradient hero, centered stack, three equal tiles. **Fix:** /design relayout, then /design voice.

The HTML is the artifact you open: a designed diagnostic page rather than markdown dropped into a browser. Below is that page reproduced exactly, filled with mock findings from a fictional satellite-tasking product.

smell-report.html
// SMELL

ORBITAL

COMMANDCODE REPORT
2026-07-27
// OVERALL
4
/ 10
STRONG
// TL;DR

Six of the ten tells are present and three of them cluster in the first viewport: an indigo gradient hero, three equal feature tiles, and a centered stack. Nothing on this page could only belong to a satellite-tasking product.

Structural, not cosmetic. Fix the composition reflex first, then the palette. A recolor alone will not move this score.

// HEURISTIC SCORES
#HEURISTICSCOREKEY FINDING
1tech gradient0Hero.tsx:12, indigo to magenta on the hero panel
2generic tech hue0tokens.css:4, --brand is #6366F1
3feature tile grid0Features.tsx:31, three tiles, equal weight
4accent rail1absent
5unearned blur0Nav.tsx:8, backdrop-blur with no elevation system
6stat monument0Stats.tsx:5, "10x / 99%" above the product story
7icon topper1absent
8bounce everywhere0motion.ts:22, cubic-bezier overshoot on all enters
9default type1Inter, but scaled and deliberate
10center stack0page.tsx, every section centered on one axis

Ten rows, one per odor. 1 = absent, 0 = detected. Four absent, six detected: 4/10.

// COGNITIVE LOAD / RISK
IDENTITY FAILURE
  • PASSContrast and focus rings hold throughout.
  • PASSType is scaled deliberately, so Inter reads as chosen.
  • WATCHMotion is everywhere but says nothing about state.
  • FAILThe direction is guessable from the industry alone.
// NEXT MODES
/deslop/relayout/recolor
// WHAT'S WORKING

Type scale

A real 1.33 ratio with weight contrast at every step.

Focus path

Every control is reachable and the ring is visible.

Copy

Buttons name their action instead of saying Continue.

// PRIORITY ISSUES
P0

The first viewport belongs to no product

Gradient hero, centered stack, three equal tiles. Swap the logo and headline and this page fits any B2B SaaS. The orbit schedule, the actual artifact of the domain, appears below the fold as a screenshot.

FIX: /design relayout, then /design voice. Lead with the schedule as the proof object.
P1

The palette is the category default

--brand is #6366F1 and the hero gradient runs indigo to magenta. Nothing ties the hue to satellite tasking.

FIX: /design recolor. Pick a hue with a domain reason and commit to one strategy.
P2

Motion decorates rather than explains

Every section enter uses the same overshoot curve. No motion marks a state change, and prefers-reduced-motion is unhandled.

FIX: /design motion. Keep motion that reveals state, strip the rest, honour reduced motion.
Generated with CommandCode - 2026-07-27
A replica of the artifact /design smell writes, filled with mock findings. The real one lands in .commandcode/design/ as a self-contained file: no build step, no dependency on your app. The markdown twin next to it is what the following mode reads.

checkup and review write the same shape and differ only in what they score.

checkup-report.html
// CHECKUP

ORBITAL

COMMANDCODE REPORT
2026-07-27
// OVERALL
35
/ 60
WATCH
// TL;DR

Readable and fast, but responsiveness is critical and accessibility is thin. The pass rate is carried by desktop; the phone experience breaks on the primary task.

Do not ship. Fix the responsive break and the focus path first, then reassess.

// HEURISTIC SCORES
#HEURISTICSCOREKEY FINDING
1intentionality5Looks assembled from defaults more than chosen
2readability10Measure, contrast, and scale all hold
3usability5Primary task completes, but takes two extra steps
4responsiveness0Form inputs at 14px trigger iOS Safari zoom
5speed10No visible shift or jank on load
6accessibility5Focus visible, but the table is not keyboard operable

Six vitals. Healthy = 10, watch = 5, critical = 0. Total 35/60.

// COGNITIVE LOAD / RISK
MODERATE RISK
  • PASSLoads and responds without hesitation or layout shift.
  • PASSBody text is comfortable in both themes.
  • WATCHThe primary task works but is longer than it needs to be.
  • FAILThe schedule table cannot be operated from the keyboard.
// NEXT MODES
/responsive/interaction/relayout
// WHAT'S WORKING

Load behaviour

No cumulative shift; media is sized before paint.

Theme parity

Dark mode is a designed second theme, not inverted.

Empty states

Each one says what belongs there and how to start.

// PRIORITY ISSUES
P0

Form fields trigger iOS Safari zoom

Every input, select, and textarea in the tasking form is 14px. On focus, iOS Safari zooms the viewport, horizontal scroll appears, and the user has to pinch back before typing.

FIX: /design responsive. Raise form controls to at least 1rem under 640px. Never suppress it with maximum-scale.
P1

The schedule table is mouse-only

Rows expand on click via a div handler with no tabindex, role, or key handling. A keyboard user can reach the page but not the data.

FIX: /design interaction. Wire the full keyboard path and give rows a real role.
Generated with CommandCode - 2026-07-27
Same shape, different instrument: six vitals out of 60, each backed by something observed. A vital that could not be verified is marked unverified rather than healthy.
review-report.html
// REVIEW

ORBITAL

COMMANDCODE REPORT
2026-07-27
// OVERALL
31
/ 50
MIDDLE
// TL;DR

Competent and unmemorable. Interaction feel is genuinely strong; colour and first impression are where the surface loses. The primary flow holds until the wait state, which explains nothing.

Focused interventions, not a rebuild. Colour voice and first impression carry the most available points.

// HEURISTIC SCORES
#HEURISTICSCOREKEY FINDING
1first impression5No point of view; category is not visible on arrival
2hierarchy6Second and third levels compete below the fold
3color voice4Colour carries no mood and no state meaning
4type voice6Readable and scaled, but the register is anonymous
5interaction feel10States, feedback, and recovery are complete

Five lenses, ten points each. Total 31/50.

// COGNITIVE LOAD / RISK
MIXED
  • PASSEvery control has its full life, including recovery.
  • PASSUndo is offered where the action is reversible.
  • WATCHHierarchy flattens once the fold is passed.
  • FAILNothing about the arrival is memorable two seconds later.
// NEXT MODES
/finish/refine/voice
// WHAT'S WORKING

Recovery

Failed passes offer a retry with the reason attached.

Feedback

Every submit resolves visibly, success or failure.

Density

The operator view holds real data without crowding.

// PRIORITY ISSUES
P0

The wait state explains nothing

Tasking a pass takes eleven seconds. The interface shows a spinner with "Loading..." for all of it. The user cannot tell whether the request reached the satellite.

FIX: /design finish. Name the actual work, show progress where it is measurable.
P1

Colour carries no state meaning

Success, warning, and error all resolve to the same brand indigo with different opacity. Status is only distinguishable by reading the label.

FIX: /design recolor. Give state colours real roles and check them under all three colourblind filters.
Generated with CommandCode - 2026-07-27
Five lenses out of 50, with the primary flow walked as a story. Scores are not inflated to be polite, and no score is given without saying what would move it.

Fix mode

deslop [target]

The treatment that follows the diagnosis. It reads all three reports — generating any that are missing — and replaces every generic tell with a decision that belongs to this product.

Deslop fixes in ripple order, structure before colour before decoration1compositioncenter stack, tiles2colorgradient, tech hue3typedefault family4depthblur, stat monument5motionbounce6decorationicon topper

Order matters: a new palette on a broken layout is still broken. A smell counts as fixed only when the old pattern is gone from the surface, the replacement is specific rather than a different default, and no new smell appeared in its place.

Next: checkup, finish.

System modes

typeset [target]

Builds or repairs a type system across body copy, headings, labels, buttons, form text, metadata, and empty, error, and loading copy.

Three type levels: hook, bridge and detail, each a clear step apartHookheadingBridge line1.3× stepDetail copy sits at the base size andruns 60 to 76 characters per line.measure: 60–76chthree levels per block. not two, not four

Not a font-size tweak: changing only the hero headline does not count unless you asked for exactly that. If the font changes, it verifies the font actually loads rather than trusting a name in a style value.

Next: responsive, recolor.

recolor [target]

Builds or repairs a color system in OKLCH, then applies it to real components.

Sixty thirty ten split above the named colour roles a system must define60 narrator30 support10every role gets applied to real UIcanvassurfacetextborderprimaryfocussuccesswarningerror

Not an accent swap. Every role has to appear on real UI — navigation, page header, body, controls, cards, forms, states, and at least one edge case. Neutrals get a trace of the brand hue; chroma is clamped at the lightness extremes; the palette is checked under deuteranopia, protanopia, and tritanopia.

Next: responsive, motion.

motion [target]

Creates a page-wide motion system first, then tunes what already exists.

The six moments a motion system has to coverarrivalsection entersfeedbackpress, hover, focusoverlaymenu, drawer, dialogwaitingload, progressoutcomesuccess, errorreducedprefers-reduced-motiontransform + opacity · ease out · exits at ~70%

Tuning easing values only counts as a motion pass when a complete system is already there. If nothing meaningful moves after the pass, the mode failed.

Next: interaction, responsive.

interaction [target]

Adds missing behavior rather than hover polish.

Nine states every interactive element has to be designed inidlehoveractivefocusedloadingemptyerrordisabledoverflowhit area ≥ 44×44 · state 1 alone is a sketch

If an interaction cannot be triggered anywhere in the current UI, the mode either wires a visible trigger or says plainly that the state is implemented but not reachable. Undo is preferred over confirm wherever the action is recoverable.

Next: motion, setup.

Compose modes

relayout [target]

Changes structure, not spacing.

Before: three equal cards. After: one lead panel with supporting blocksBEFOREequal weight, nothing leadsAFTERone focal point leadsspacing changes can support a relayout.They cannot be the whole relayout.

At least one visible structural change is required: a new focal point, a changed hero, a reordered sequence, a different relationship between text and proof object, moved navigation, or a transformed grid. If none can be justified, the right command is finish.

Next: responsive, interaction.

responsive [target]

Recomposes the interface across contexts.

The same surface recomposed at phone, tablet and desktop widths3757681440adapt the interface, never amputate the feature

Not a max-width tweak. If the desktop composition merely shrinks, the pass failed. It covers input mode, thumb reach, safe areas, text direction, table strategy, and the sub-16px form fields that silently trigger iOS Safari zoom.

Next: interaction, setup.

Build modes

redesign [target]

A full visual transformation of an existing surface, handled as a system rather than a hero makeover.

stays
  • goals
  • task logic
  • content priority
  • a11y bar
  • core flow
changes
  • composition
  • color roles
  • type hierarchy
  • components
  • depth + edges
  • states
  • responsive

If the old design is still recognizable after swapping colors and font sizes, the redesign failed.

Next: checkup, review.

tokenize [target]

Pulls proven repetition into reusable tokens and components, then migrates real usage.

Repeated identical elements collapse into one reusable component<Button variant />same intent, same job, seen enough times to prove it

Naming is by meaning, not value. A list of suggested token names is not a tokenize pass — at least one real usage has to move over, with the old behavior verified afterwards.

Next: redesign, responsive.

setup

Reads the repository and writes the project's design context so every later command is more specific.

Setup reads the repository and writes a design brief filerepobrief.mdname · category · registerwork patterns · palette · typeconstraints · what to refuseoptional everywhere else. Modes work fine without it.

brief.md is optional everywhere else. Modes work without it and never block on a missing file.

Next: tokenize, redesign.

Ship modes

finish [target]

The pre-ship pass. Use the interface like a real person — click, tab, wait, fail, resize, submit, delete, undo, come back — then remove the friction you found.

The states finish walks before a surface can shipemptyloadingerrorsuccessfocusdisabledoverflowfinish is often subtractioninspected ≠ fixed. Claim only what is visible.

Finish is often subtraction, and it is where truthful completion bites hardest: every claim is checked against the diff and the visible result before it is made.

Next: typeset, recolor.

refine [target]

Changes the character of a design. The diagnosis picks the move.

The diagnosis picks the refine moveflat and safepushloud and tiringsettleclutteredstripbreaks on real dataproofno path to valueactivateworks, but no joytextureone hover effect is not a character change

Opposing moves are not combined unless the surface has separate zones that need separate treatment. One hover effect or one copy edit is not a refinement.

Next: finish, responsive.

voice [target]

For marketing, landing, campaign, portfolio, and editorial surfaces, where the reaction at arrival is the deliverable.

A generic abstract panel replaced by the real object of the domainGENERICabstract panelSPECIFICthe real artifact of the domain: the schedule, thereceipt, the route, the room, the record

The first viewport has to answer what this is, who it is for, and why this one. A supplied name is used exactly as given. If the subject is physical, it ships real imagery: no colored rectangle stands in for the thing itself.

Next: recolor, typeset.

surface [target]

For app UI, dashboards, admin panels, settings, and tools, where trust is earned through consistency.

A dense operator table with status, filters and a keyboard pathdensity is not clutter when the relationships are clear

The bar is an experienced operator opening the screen for the eleventh time that day and moving without hesitation. A pass that changed only color, spacing, or type while product states stay missing is not a surface pass.

Next: responsive, interaction.

Register: voice or surface

Two registers, different permissions.

register
/design voice

landing, campaign, portfolio, product story

The interface is the experience.

  • committed color, typographic risk
  • ambitious motion, art direction
  • the first 1.5 seconds is the deliverable
/design surface

dashboards, admin, settings, tools, app UI

The interface is the instrument.

  • consistency, density, speed
  • real data and every state
  • the 11th visit today, no hesitation
Name the register before designing. The request's own language wins first, then the surface being worked on.

Core rules

Every mode inherits these.

  • Color: OKLCH-first. Pick a commitment level — whisper, statement, conversation, flood — before picking a hue. 60-30-10 split. Never default to indigo.
  • Typography: Body at 60–76ch. Minimum 1.3 ratio between hierarchy steps. Three fonts only when each has a role: display, body, UI.
  • Layout: 1-4-9 rhythm (4px, 16px, 36px). Use gap, never sibling margins. A card inside a card is never right.
  • Motion: Animate transform and opacity. Ease out, never bounce. Exits run at about 70% of entrance duration. prefers-reduced-motion is not optional.
  • Interaction: Nine states per control. Touch targets ≥ 44×44px. Labels are always visible; a placeholder is not a label.
  • Responsive: Base experience first, more structure as space earns it. Never gate functionality behind hover. Adapt the interface, never amputate the feature.
  • Copy: One verb per button. Sentence case. No exclamation points. Errors are recovery paths, not blame.

Blank projects

If no HTML/CSS/JS exists, /design creates index.html with semantic structure, Tailwind, and design tokens, then applies the requested mode to it. Design decisions are recorded in .commandcode/taste.md.

A full pass

# 1. Give the project design context /design setup # 2. Diagnose /design checkup /design smell # 3. Treat what the reports found /design deslop /design relayout /design recolor # 4. Systematize and harden /design tokenize /design surface # 5. Pre-ship /design responsive /design finish

Examples

Audit

/design checkup # Vitals scan across the whole UI /design smell src/components/Hero.tsx # Name the generic tells /design review src/pages/landing.tsx # Scored critique with a walkthrough

Fix and build

/design deslop # Replace every tell with a decision /design redesign src/pages/Home.tsx # Full visual rework, logic untouched /design tokenize src/components/ # Extract proven repetition /design setup # Write brief.md for this project

Systems and composition

/design typeset src/components/Hero.tsx # Scale, hierarchy, measure /design recolor # Rebuild the color system in OKLCH /design relayout src/layouts/Grid.tsx # Change the structure, not the padding /design motion src/components/Button.tsx # Build the motion system /design interaction src/components/Form.tsx # All nine states and real hit areas /design responsive src/pages/Home.tsx # Recompose across six viewport classes

Ship

/design finish # States, overflow, consistency /design refine src/components/Card.tsx # push, settle, strip, proof, texture /design voice src/pages/landing.tsx # Brand character and art direction /design surface src/app/dashboard/ # Density, states, operator flow

Freeform: auto-picks the mode

/design the hero feels generic and weak /design cards look AI-generated, fix them /design make this dashboard feel production-ready /design the type hierarchy is flat and hard to scan