UI/UX Reference

This page holds the facts of UI/UX work. Read it to look one fact up. The story, the routes and the map are on UI/UX. The agents, hooks and files are on Agent Harness.

What counts as user-visible work

A change is user-visible when a person will read, see or decide from its result. The language, the layer and the file extension do not matter. The canon is rules/ux/user-visible-dod.md.

In scope Examples

A screen or its parts

A component, style, layout, icon or animation.

A string a person can read

An error message, toast, banner, empty-state text, status label, button label, validation text, notification, confirmation, or operator-facing CLI output. A Java, Go or Rust handler that writes the string is still in scope.

A failure or degraded path that reaches a person

A 4xx or 5xx body, a maintenance reply, a retry notice, a timeout, a partial result, a permission denial.

A payload field added to be displayed

The wire between the two sides is part of the surface.

A flow

A new step or route, a changed default, a changed order.

Out of scope: machine-to-machine payloads that no human reads, and log lines written for grep. A log line shown in a UI panel is in scope again. So is an error string forwarded verbatim to a screen. If the case is ambiguous, treat it as in scope.

The paths: glob on the rule file is a floor, not the boundary. A change in a file that the glob does not match is in scope when a person will see its result.

Where the work goes

The first question is whether the work needs new data, a new API field, logic or a new flow.

Work Route Notes

A critique of an existing screen

ft-ui-ux-design, Mode: review

Read-only.

A redesign, a new screen or a new flow, as a design pass

ft-ui-ux-design, Mode: design

Writes a UX spec. Writes no production code. Direction options go to you.

A presentation-only build of ONE unit on an existing screen: restyle, polish, an accessibility or motion pass

ft-ui-ux-design, Mode: change

Size: within about 400 lines or 10 files.

A larger build, a redesign build, or a UI change that needs new data or a new flow

/ft-dev with the approved UX spec

ft-developer splits the build into units and calls the agent itself.

A bug whose root cause is purely presentational

bugfix-agent sends ft-ui-ux-design, Mode: change

A MAJOR or CRITICAL bug runs through /ft-fix.

A small change with no design choice: wording, a path, a one-line config

bugfix-agent as MINOR, or the stack coding agent when the change is purely mechanical

A full pipeline for this costs a design pass for nothing. A small addition that follows an existing pattern goes to /ft-dev as simple-addition: see Quality Pipelines, Choosing the entry point.

Source: the routing paragraph of deploy/templates/claude-md/main-rules.md, agents/ft-developer.md and agents/bugfix-agent.md.

The agent ft-ui-ux-design

The agent runs on opus with a one-hour cache. The brief names the mode (Mode: design | change | review), the repository and paths, the app URL and route, and what done means. If the brief names no mode, the agent infers the mode and says which mode it took.

Only Mode: and Size: are read by a script in an installed harness. price-gate.py checks Size: (see The unit size cap). The other lines are free text for the agent. Do not set a model: the agent definition runs it on opus. No installer installs delegation-gate.py. If you install it by hand, its schema also requires a writes: line for this agent.

Callers:

  • ft-developer: Stage 3 for a design, Stage 6 for presentation units.

  • bugfix-agent: a purely presentational root cause.

  • The main loop: a UI-only change.

  • /ft-ux-audit: a lane of the audit, in review mode.

The agent is not for business logic, data or API changes. Those go to the stack coding agent. The agent never reviews its own diff. The verifier lens does.

The three modes

Mode What it does What it produces

design

Drives the existing surface and runs impeccable critique as a baseline. For a restyle or redesign it also runs the taste inspector as a before pass. It reads the analogous screens of the product. Shapes states and flows. Plans the motion. Takes a direction from the taste skill only where the baseline leaves room.

A UX spec at the path in the brief, else <journal dir>/ux-spec.md. No production code. A product-taste choice goes to you as two or three options in a NEEDS_USER status. Each option says what it costs and what it changes.

change

Edits templates, markup, styles, tokens, component view code, display copy and its internationalization (i18n) keys, motion, accessibility attributes and their tests. Runs the test and lint commands of the repository until they are green.

Edited files and component tests for every changed state. A browser check with before and after screenshots.

review

Takes the same baseline as design.

Findings in order of severity. Each finding has a file:line, the broken DoD item or canon rule, and the smallest fix. If nothing is real, the agent says so.

As a lane of /ft-ux-audit, review mode reads a Lens: line and an Output dir: line from the brief. The lens replaces the owner list of canon skills. The agent writes only into the output directory and its scratch directory, and it changes nothing in the repository.

The spec of design mode lists the screens and routes, and the state matrix per element, with copy for every failure and empty state. It maps each event to a rendered state and its words. It names the existing screen for control placement, the tokens, the motion (property, duration, easing, reduced motion), the files that change and the component tests.

Limits of change mode

  • The zone is the presentation layer. A change that needs new data, a new API field, business rules, routing logic or state management is a SCOPE_BREACH. The report names what the coding agent must add.

  • The approved spec or the brief is the direction. The agent invents nothing new.

  • The agent keeps the stack and the dependencies. It never migrates a framework or a styling library.

  • Spacing comes from the spacing scale only.

  • The unit cap is about 400 changed lines or 10 files. See The unit size cap.

  • The agent never starts the app. If no URL exists, it adds a launch request to the report.

The agent edits in small steps, in this order: type, color and tokens; frame and spacing; states; then the replacement of stock components.

The browser check

In change mode the agent drives the route with agent-browser. It opens the route, takes an interactive snapshot, exercises each state and takes a screenshot of the failure state. It checks that the console is clean. It compares the result with the recorded before state at the product widths and themes. It never uses the Chrome-extension browser tools, because they drive your own browser.

Before it reports, the agent runs review-animations on a motion diff. It also runs impeccable audit and polish on its own diff. This self-review is not independent review.

The report

The report has named fields: Status (OK, NEEDS_USER, SCOPE_BREACH or BLOCKED), Mode, Routing, Spec, Files, Tests, Verification, Deviations and Bounds. It ends with a ## HANDOFF block. On NEEDS_USER you choose one of the options in the report. On SCOPE_BREACH the report names the work that a coding agent must add. On BLOCKED the report carries the question.

The unit size cap

price-gate.py checks a Mode: change dispatch from the main loop with its ux_change check. The brief needs a Size: line with the files and the changed lines, for example Size: files 6 · lines ~240. A dispatch from ft-developer or bugfix-agent is checked by the pricing checks for producers instead.

Item Value

Target of the canon

About 400 changed lines or 10 files.

Denied when

The Size: line is missing, or it declares more than 500 lines or 12 files and does not say atomic.

Atomic form

The denial text asks for atomic: <why>. The code checks only the word atomic.

A line with no numbers

Passes. The check reads no numbers from it, for example Size: small.

Knobs

FT_UNIT_MAX_LINES (500) and FT_UNIT_MAX_FILES (12).

Reason

A unit far above the target grows its context without limit. That build belongs to /ft-dev.

The check applies only to Mode: change. A Mode: design or Mode: review dispatch passes.

Measured case: one change unit of 133 files and about 8000 lines ran to 564K tokens of context and cost $80 (evidence §73 in deploy/evals/dispatch-economy-evidence.md).

Design canon routing

The canon is rules/ux/design-skill-routing.md. The agent routes by the property in play. It does not route by the words of the task. The agent states the routing before work, as Routing: <property> → <owner>. It states no <property> for each property that the code rules out.

Property Owner Skills

Motion, transitions, animation

Motion canon

emil-design-eng (rules), animate (build), review-animations (check a diff), find-animation-opportunities, improve-animations, animation-vocabulary

Gestures: drag, swipe, sheets, springs, momentum, interruptible transitions

Apple canon

apple-design

States, accessibility, layout, UX copy, edge cases, i18n

Structure and QA canon

impeccable: shape, harden, polish, audit, critique, distill

Visual direction for a new screen or a restyle

Direction

design-taste-frontend. Greenfield and marketing surfaces use its page run. An existing enterprise design system uses only its app-screen run with --keep palette,type.

Restyle of an existing surface

Audit first

impeccable critique, then distill. The product design system is the direction. The taste inspector (inspect.mjs --app) adds a before and after when the whole surface is in scope.

A whole new screen or flow, a redesign, or a UI-only change to an existing screen

The UI/UX agent

ft-ui-ux-design

Charts, dashboards, KPI tiles

Data display canon

dataviz

The module or interface behind the UI

Design canon

codebase-design, design-an-interface

Throwaway exploration before you commit

Prototype

playground, gsd-sketch, prototype

Driving the running app

Browser canon

agent-browser. gstack serves only the surfaces that agent-browser lacks. Playwright owns committed *.spec.ts suites and is the fallback.

Exploratory QA of a whole flow

QA

qa, agent-browser skills get dogfood

Anything else

None

find-skills, then state what you picked and why.

The agent rules a property out with a grep of the code it will touch. These patterns count as evidence:

Property Pattern in the code

Motion

transition, animation, @keyframes, transform, spring, ease

Gesture physics

drag, swipe, pan, pointer, touchmove, sheet, momentum

Direction

A route or screen that did not exist before.

Loading impeccable alone is not routing. It owns states, accessibility and copy. It does not own motion, gestures or direction.

These skills fire only on an explicit request:

  • The taste set: bolder, quieter, delight, overdrive, colorize, typeset, layout.

  • The impeccable commands live, onboard, init, document and extract.

  • Every image-generation skill.

impeccable animate stays unwired, because the motion canon owns motion.

Precedence

If two canons disagree, the order is fixed. The agent never blends two canons on one property.

  1. The existing design system of the product. In an enterprise UI, conformance is the direction.

  2. The direction that you approved for this change.

  3. The domain owner from the table above.

  4. Taste skills, and only where the earlier steps leave room.

A product-taste question that stays open goes to you. The main loop asks it directly. A sub-agent returns NEEDS_USER.

The escalation ladder

Each rung costs more than the rung below. Use the smallest rung that answers the question.

Rung What it is Cost When

0

The UI Definition of Done, inline.

No extra model call. Minutes.

Every user-visible change.

1

Read the ONE skill that owns the property in play.

One skill file into context.

Before you author that property.

2

An agent-browser drive: open, snapshot, exercise, screenshot, console.

A few thousand tokens per snapshot. About one minute.

Any user-visible change that renders. With nothing to render, the text artifact of the DoD replaces it.

3

A read-only evaluate pass on the finished diff: impeccable audit or critique, review-animations, ponytail-review.

One skill load and one pass over the diff.

A non-trivial slice, a redesign, or authored motion.

4

A verifier agent with the Visual/UX lens, or another sub-agent.

A whole fresh context per agent, and minutes of wall clock.

A new screen or journey, a MAJOR or CRITICAL user-visible fix, or an unsettled finding.

Never run rung 3 or 4 on code that is still moving. Rung 4 is one pass after the code stops. Parallel agents get disjoint lenses. You may skip a rung, and you state the reason.

What the toolkit installs

The installers (deploy/scripts/install.sh and install.ps1) set up part of this set. Each step asks for consent.

Installed by the toolkit How

impeccable plugin

Offered as a workflow plugin (pbakaus/impeccable).

emil-design-eng, animate, review-animations, improve-animations, find-animation-opportunities, animation-vocabulary, apple-design, pick-ui-library

Offered through npx skills add emilkowalski/skill.

design-taste-frontend

Offered through npx skills add Leonxlnx/taste-skill.

agent-browser CLI

Offered through npm i -g agent-browser.

The toolkit does not install dataviz. Neither installer mentions it. If a skill is not installed, the agent reports a named degradation. It does not fall back silently to impeccable. The agent checks the installed set in the session skill listing, not in ~/.claude/skills.

The UI Definition of Done

The canon is rules/ux/user-visible-dod.md. The UI Definition of Done is an inline self-check that takes minutes. It starts no agent and loads no skill. Every user-visible change answers all 18 items before it is reported as done.

  • An item that does not apply gets one word, for example n/a: no motion.

  • An item that you could not verify gets a stated reason.

  • Silence on an item counts as a skipped test.

All 18 items

The rule file is the canon. This table names each item and its question in short form. Other documents cite the core items by name, not by number.

Item Group The question

Reachability

Reachability and core

Is every new message reachable from a real path? Does every path that can fail produce a message?

Consumer contract

Reachability and core

Does every field for display have a consumer, and every rendered field a producer?

The failure view

Reachability and core

What exactly does the person see for each failure?

State truthfulness

Reachability and core

Does the screen match what happened?

Recovery

Reachability and core

Does every error name a next action and a way back?

State matrix

States and content

Is each state rendered, from default to success, or ruled out with a reason?

Copy

States and content

Does the text say what happened and what to do next, in the voice of the product?

Destructive and irreversible actions

States and content

Does the confirmation name the exact target and count?

Keyboard and focus

Access and form

Does the flow work by keyboard, with focus in a sane place?

Contrast and hit targets

Access and form

Is the contrast ratio computed per color pair and theme? Are targets at least 24px, or 44px on touch?

Layout integrity

Access and form

Does the longest realistic string fit at the smallest viewport, in every theme?

Readability

Access and form

Is the text at the base size, in the 45 to 90 character band, with line height of at least 1.4?

Motion floor

Visual system

Are the transition properties exact, durations under 300ms and reduced motion honored?

System conformance

Visual system

Does it use the tokens, components and patterns of the product?

Spacing and alignment

Visual system

Does every gap come from the spacing scale? Do related controls share an edge?

Control placement and order

Visual system

Does the primary action sit where this product already puts it?

Seen, not read

Visual system

Can a person tell what happened before reading the sentence?

Seen in a running browser

Evidence

Did one agent-browser drive show the states, a clean console and the failure state?

The core four

If you check only four items, check these. Other documents cite them by name, not by number.

Core item The question

Consumer contract

Does every field added for display have a named consumer, and every rendered field a producer? Do both sides branch on a code and not on a message text?

The failure view

For each failure, what exactly does the person see: title, body and next action? Nothing internal reaches the screen.

State truthfulness

Does the screen match what happened? Each event maps to a rendered state and its words. A refusal and a crash are different events.

Recovery

Does every error name the next action and a way back? Every loading state has a timeout and a view after it.

These items cross the wire between backend and frontend. A green unit suite, a clean lint and a one-sided review miss them.

Reporting the gate

The report carries one line with its evidence. Every one of the 18 items is either met or n/a with a reason. The count covers the items that apply: with 2 n/a, the line says 16/16.

DoD: 16/16 — 2 n/a (no motion, no new colors); consumer @ <file:line>; failure copy: "<the exact sentence>"; contrast <pair> = <ratio>; screenshots at <paths>

Coding agents put the line in the Verification field. Orchestrators put it in their report.

Verification

The verifier agent runs a Visual/UX lens whenever the outcome is user-visible. The lens is part of the mandatory core. It is not the test executor. It is the only other lens that executes. It drives the app instance that the orchestrator names in a browser. It needs no worktree and runs no tests. The test executor is described in Quality Pipelines Reference, The executor and worktrees. Its model is opus.

The lens works in this order:

  1. Check reachability, consumer contract, the failure view and state truthfulness statically, from the code.

  2. Check that the design gates ran: impeccable:audit, impeccable:polish, impeccable:critique. If they did not run, the verdict is NEEDS_EVIDENCE. If the skill is not installed, the lens declares a degradation and runs the DoD floor.

  3. Drive the running product with agent-browser.

The browser drive covers these attacks:

  • Every state that the design brief or the fix plan names is reachable and rendered.

  • The console shows no new errors.

  • The accessibility tree labels the interactive elements. The changed flow works by keyboard.

  • Motion follows the emil-design-eng canon. A gesture-driven flow also follows apple-design. With prefers-reduced-motion enabled, the lens drives it again.

  • The layout holds at the named breakpoints.

  • The surface conforms to the product design system and not to a generic AI kit.

  • A first-time user can finish the primary journey and one recovery path.

  • The Routing: line holds. A property that the diff shows and the line ruled out is a REFUTED-grade miss.

  • One adjacent screen or flow that the diff could have broken still works.

If the orchestrator names no app instance, the lens returns NEEDS_EVIDENCE with a launch request. It never judges from the screenshots of the author. The author’s captures are claims. The lens’s own drive is the evidence.

If the diff is user-visible only through text and no instance runs, the lens does not stop there. It delivers its findings from the code and scopes the launch request to what needs the browser.

Where UI work enters the pipelines

A design brief is the one-page design that ft-developer drafts and you approve before architecture-led code. The file is SDD.md.

Pipeline step What happens

ft-developer Stage 1

The orchestrator classifies the task as user-visible or not, by outcome and not by file type.

ft-developer Stage 2

Vague motion language from you is resolved with animation-vocabulary before it enters the design brief.

ft-developer Stage 3

impeccable:shape plans states and flows. find-animation-opportunities decides where the feature animates. A new screen, flow, restyle or redesign goes to ft-ui-ux-design, Mode: design. Its spec goes into the design brief. Its direction options go to Stage 5. A new UI library on the table goes through pick-ui-library first.

ft-developer Stage 6

A presentation-only unit goes to ft-ui-ux-design, Mode: change, priced like a coding unit. The UI coding brief names the motion and gesture skills, and the harden and polish passes.

ft-developer Stage 7

impeccable audit always, critique on redesigns, an independent review-animations on motion, and the Visual/UX lens.

ft-developer Stage 9

The final report carries the DoD: line with its artifacts.

bugfix-agent Phase 4

A purely presentational root cause goes to ft-ui-ux-design, Mode: change.

ft-fix

A user-visible fix adds the Visual/UX lens to the core.

For developers

File Role

agents/ft-ui-ux-design.md

The agent.

rules/ux/user-visible-dod.md

The trigger and the 18-item UI Definition of Done. Installed to ~/.claude/rules/ux/.

rules/ux/design-skill-routing.md

The routing table, the escalation ladder and the precedence. Installed to ~/.claude/rules/ux/.

agents/verifier.md

The Visual/UX lens.

deploy/templates/hooks/price-gate.py

The ux_change size check.

deploy/templates/claude-md/main-rules.md

The routing paragraph for the main loop.

Other agents point to the two rule files. They do not copy the rules. If a restatement and the canon disagree, the restatement is the defect.