BuilderOS

ux-architecture

Designs how a feature works and looks: flows, every state of each step, components, accessibility, then rendered versions the person picks and a design kit. Use when a feature needs flows, screens or states, a look chosen, or design options.
phase 4 · Shape## DESIGN COMPLETE
Reached from commands
/builder-os:bos-shape

At a glance

Mode. Standalone designs the supplied feature or flow from the available product context and the existing design system. In the lifecycle it runs inside phase 4 for spec-writing and writes the initiative's SPEC.md → Design. Both per operating modes. Read the section of UX methods behind steps 3 to 7, and Drawing the Flow for step 4.

  1. 1Read the feature inputs
  2. 2Map the current structure
  3. 3Place the feature
  4. 4Design the flows
  5. 5Cover the states
  6. 6Inventory the components
  7. 7State the accessibility floor
  8. 8Deliver the design

The skill

The structural half of phase 4: placement, flows, states, components and the accessibility floor, decided before a pixel is chosen. The look comes next, in the direction mode: rendered versions that differ in structure, chosen by the person in rounds, then the kit and tokens; follow design direction, with its own marker, inside phase 4 or alone.

Mode. Standalone designs the supplied feature or flow from the available product context and the existing design system. In the lifecycle it runs inside phase 4 for spec-writing and writes the initiative's SPEC.md → Design. Both per operating modes. Read the section of UX methods behind steps 3 to 7, and Drawing the Flow for step 4.

Procedure

  1. Read the feature inputs. Standalone uses the supplied feature, goal and constraints. The lifecycle reads BRIEF.md → Bet: its primary user action is the flow this skill designs. Done when the primary action is stated in one line.
  2. Map the current structure: navigation, the area this touches, existing components; without repo.read, ask and mark the inventory unverified. Done when the touched area and its components are listed.
  3. Place the feature where the user expects it, or name the cost of the easy spot, with current and proposed structure side by side. Done when what moves is named.
  4. Design the flows. Every entry point, the steps (user action, system response), decision points, both exits, reversibility; a multi-step flow states its abandonment exit (discard, draft or resume). On a new product (product track) one flow is the first day: from the first visit to the first useful outcome, with the empty screens a new account meets filled by sample data, a guided first action or an import, and the step that counts as activated named for the spec's **Activation:** (gate 4.17). Then draw each flow under its table as a Mermaid flowchart (entries, steps, decisions with labeled exits, success and abandonment), in the same words, per drawing the flow; the person reads and edits the drawing in the page bos.mjs flows writes, the build reads the table (gate 4.20). Done when every flow has its entries, steps and exits, drawn and tabled, and a new product has its first day.
  5. Cover the states: empty (with the action that fills it), loading, partial, error, success, permission. The permission state follows the existing auth, tenancy and permission contract, inspected first; where it cannot be read, the assumption is labeled unverified. Error copy names what failed and the next action, where disclosure is permitted. Strings live where the product's languages can be added (PRODUCT.md → Markets): each language's copy, dates, numbers and currency, and the longest translation tested on the narrowest screen. Done when every step of every flow has its six states. 5b. Design the messages (gate 4.21). Every email, notification, chat or text message the product sends outside its screens, found from the flows (a sign-up sends a welcome, an export emails a file, a failed payment warns): what triggers it, who gets it, the channel, its real text in the voice, how to stop it, and a preview a person opens, an HTML file per email or a mock of the chat bubble in design/messages/, per UX methods. For an agent that talks on a channel, the messages are the product: each turn type the spec's ## Agent behavior names gets its row. Done when every message has its row and its preview, or **Messages:** none with the reason.
  6. Inventory the components: exists, extend (naming what else it affects), new (with its justification). Done when every component in the flows has one of the three.
  7. State the accessibility floor: the keyboard path with tab order for the primary flow, the contrast target as a ratio, focus behavior on open, close, error and completion. Done when all three are written.
  8. Deliver the design to the requested destination. In the lifecycle write SPEC.md → Design per the design template, headings and labels exact, then hand the primary flow to ux-architecture (direction) and the flow list to the spec; gate 4.9 also needs the visual direction. Done when SPEC.md → Design holds the flows, states, messages, inventory and floor.

Watch for

DoInstead of
Keep the actual auth contract, including a deliberate concealed-resource 404Replacing it with an access message that reveals the resource
The existing pattern firstFour new components for one feature
Supplied context and the requested destination for a standalone requestCreating initiative state for it

More in UX methods.

Capabilities

CapabilityUsed forFloor if absent
repo.readExisting components, navigation and flowsAsk the person to describe them; mark the inventory as unverified
docs.searchDesign system documentation, prior flow decisionsAsk
analytics.replayWhere users actually stall in the current flowDesign from structure rather than observation, and say so
diagram.renderLaying a flow out on a canvas the person edits in a workshopThe page bos.mjs flows writes; without commands, the Mermaid block in SPEC.md → Design, which renders wherever Markdown does
files.read / files.writeSupplied context, requested design and lifecycle artifactsInline design needs no file write; lifecycle writes require it

No data capability is required. The visual layer is always covered: ux-architecture (direction) renders versions as files on any host, and uses a design toolchain where one resolved.

Output Contract

## DESIGN COMPLETE with the flow list and a diagram per flow (the first day on a new product), the state matrix, the messages with their previews, the component inventory and the accessibility floor. Lifecycle output is the initiative's SPEC.md → Design per the design template.

References

Read only when a step needs them, so they cost no context until then.

Design Directionreferences/design-direction.md

The structure mode of ux-architecture decides what the interface is: placement, flows, states. This mode decides what it looks like, and has the person choose it by seeing it. A look chosen by whoever writes the first component is a decision nobody made; a look chosen from one mock-up had nothing to compare against. So: several real versions side by side, a choice, then the system the build applies.

Mode. Standalone produces the versions and the comparison for the supplied screen or product, in the requested destination. In the lifecycle it runs inside phase 4 after ux-architecture has written the flows, writes SPEC.md → Design → ## Visual direction, and gate 4.9 checks it; the kit is chosen after system-design (stack) has settled the interface layer. Both per operating modes. Read the direction method for the axes of difference, the version file rules, the kit card and the token list.

The clickable prototype comes first (phase 4, spec-writing step 5.2, before any version): one self-contained file, .builderos/initiatives/{initiative}/design/prototype.html, that walks the primary flow screen by screen with links between steps, the voice's real words, the empty and error screens, and no visual decisions yet. It answers whether the concept lands with a person from the ICP; the versions answer how it looks. Build it per the direction method. Done when the person can click from the first screen to the outcome of the primary action.

Procedure

  1. Read the inputs. PRODUCT.md voice adjectives and their counter-examples, the ICP and where they work, the primary flow in SPEC.md → Design, and the existing design system: TECH.md → Design system first, then the tokens and kit in the code. Done when you can say whether a design system exists and which screen the person will see most.
  2. Decide what is open. No interface (an API, a job, a CLI with no new output): write **Visual direction:** not applicable, {reason} and stop. An existing design system: the style is inherited and the composition of the new screens is open, so at least two layout versions inside the system. A new product, or a restyle the person asked for: the style is open, so at least three visual directions. Lite mode takes two either way. Change track: one version, or **Visual direction:** inherited, {reason} when no screen changes its composition. Done when the number and kind of versions is set.
  3. Study real references before drawing anything: three to five screens of the same kind (a list, a report, an inbox) from products the ICP already uses or admires, saved to design/refs/ with one line each on what it does well (hierarchy, density, a detail of craft). A version grounded in screens that work for these users beats one grounded in the generator's habits. Done when the references are saved under **References:**, each with its line.
  4. Diverge on structure. Each version takes one named axis (layout model, information hierarchy, primary affordance or density), stated in one line and traced to the voice adjectives: "calm, for operators who keep it open all day" is a direction; "blue version" is a palette. On a new product each direction pairs its structure with a tone. Each version also names, in the Avoids column, the generic default it steers away from (the method lists the usual ones). Render the same screen in every version, the primary-flow step the person sees most, with realistic domain content labelled as sample content, so density problems show. Done when no two versions share an axis and each names its avoided default.
  5. Show them where they will live. When the product exists and runs, mount the versions inside the real page (its header, navigation, data and density) behind a ?variant= switch on a throwaway branch, and record the route per version. Otherwise write .builderos/initiatives/{initiative}/design/{letter}-v{n}.html, self-contained (inline styles; a real typeface where the direction has type personality, embedded as a web font with a system fallback), one per version, with the surrounding chrome sketched in. Use ui.render where it resolved. Present each with what it optimizes, what it gives up and which user it fits. Done when the person can open every version.
  6. Converge in rounds. Ask which version per pressure-testing, recommending one tied to the voice and the ICP. The person picks one or combines named parts ("A's layout with C's palette"), which becomes a new file {letter}-v{n+1}.html, so every round stays comparable. After three rounds with no choice, recommend fixing the strongest and listing what is still unsettled as later polish. Done when the person named the version, recorded as **Chosen by:**.
  7. Choose the design kit once system-design (stack) has decided the interface layer. An inherited system is named and the step ends. Otherwise a kit card per the method: two to four options (the existing kit, a headless component library, a full opinionated kit, platform-native components, custom), each with fit to the frontend, built-in accessibility, theming against the chosen direction, licence, and the cost of leaving it later. A new product's kit is an ADR. Done when the person chose the kit.
  8. Extract the system. The version files are a reference; the build implements with the kit's components. From the chosen version write the tokens (colour roles with contrast ratios, type scale, spacing scale, radius, elevation, motion) and the composition rules (grid, density, where primary actions sit). In the code the tokens live in one file and a token check in the guardrail rejects raw values outside it (gate 5.10); components apply the interface details. Done when every value the chosen version uses is a named token.
  9. Record in SPEC.md → Design → ## Visual direction per the design template, and add the choice to the spec's ## What we chose summary. A new look reaches TECH.md → Design system at ship (gate 6.9), so the next feature inherits it. Done when gate 4.9 passes on the file.

Watch for

DoInstead of
Versions that differ in structure, same screen, same contentThree palettes of one layout
References studied first, and the default each version avoids namedThe look an unprompted generator gives every product
Mount them in the real page when the product existsJudging each on a blank page, where every version looks fine
A new numbered file per roundOverwriting what the person was comparing
Tokens and rules, built with the kit, enforced by a checkShipping the chosen HTML as the first component, or the framework's default palette
Inherit the system and vary the layout, for a featureRestyling an existing product by accident

Capabilities

CapabilityUsed forFloor if absent
ui.renderShowing each version where the person already is: a host preview, an artifact, a design-tool frame, a screenshotSelf-contained HTML files and their paths; always available with files.write
repo.readThe existing design system: tokens, components, the installed kitAsk; mark the inheritance unverified
web.searchThe candidate kits' licence, maintenance and accessibility claimsState them as unverified with the page to check
files.read / files.writePRODUCT.md voice, SPEC.md → Design, the version filesText wireframes, only for a standalone answer kept in chat

Output Contract

## DIRECTION CHOSEN with the references, the versions shown with their files or routes and avoided defaults, the choice and who made it, the kit and its alternatives, and the tokens.

Design Templatereferences/design-template.md

The lifecycle output contract for SPEC.md → Design in the active initiative's folder, .builderos/initiatives/{initiative}/. Gate 4.5 reads its accessibility floor, gate 4.9 its visual direction, gate 4.10 its domain model, gate 4.20 the diagrams of its flows and lifecycles and gate 4.21 its messages; keep the headings and bold labels exactly. Standalone output follows the requested format and destination, adapting this template only where useful and omitting lifecycle gate claims.

markdown
# Design: {feature}

## Placement
**Today:** {current structure}
**Proposed:** {new structure}
**Moves:** {what is reorganized, and why}

## Flows
### {flow name}
**Entry points:** {all of them}
| Step | User action | System response | Branches |

```mermaid
flowchart TD
  {entry([Entry]) --> step[User action] --> decision{Branch?} --> exit([Success]); the same steps and words as the table, per UX methods → Drawing the Flow}
```

**Abandonment:** {what happens to partial work}
**Reversible:** {which steps, how}

### First day
{product track: from the first visit (the link, the sign-up, the invitation) to the first useful outcome, with the empty states a new account meets filled by sample data, a guided first action or an import; the step that counts as activated is the spec's **Activation:** criterion}
**Entry points:** {where a new user arrives from}
| Step | User action | System response | Branches |

```mermaid
flowchart TD
  {the first day, drawn like every flow}
```

## States
| Flow / step | Empty | Loading | Partial | Error | Success | Permission |

**Error copy:** {actual strings, per error case}

## Messages
| Message | Trigger | Recipient | Channel | Text | Opt-out | Preview |
|---------|---------|-----------|---------|------|---------|---------|
| {welcome, reset password, weekly summary, reminder, failed payment} | {the event or schedule that sends it} | {who, by role} | {email / push / in-app / WhatsApp / SMS} | {the subject or first line, real words in the product's voice} | {how to stop it, or "transactional: none needed"} | {design/messages/{name}.html or .md} |

**Languages:** {when PRODUCT.md → Markets has more than one: each message exists in each, and the preview shows the longest}
{or, when the product sends nothing outside its screens: **Messages:** none, {reason}}

## Components
| Component | Exists / Extend / New | Affects | Justification (new only) |

## Accessibility floor
**Keyboard path:** {tab order for the primary flow}
**Contrast:** {ratio for text and meaningful non-text}
**Focus:** on open {} · on close {} · on error {} · on completion {}

## Domain model
### Entities
| Entity | Means | Lifecycle |
|--------|-------|-----------|
| {entity} | {one line, in the product's words} | yes / no |

### Transitions: {entity}
| From | To | Who | Only if | Then |
|------|----|-----|---------|------|
| {state} | {state} | {role} | {guard} | {effect} |

```mermaid
stateDiagram-v2
  {[*] --> first_state; one arrow per row of the table, labeled with who: draft --> sent : author; every state in the table appears here}
```

### Invariants
- {rule that holds whatever happens}

### Data
| Entity | Key fields | Relations | Deleted with |
|--------|-----------|-----------|--------------|

**Rules decided by:** {person, with the round answers or ADR links}
**Prototype:** {design/domain-prototype.html, or "not needed: {reason}"}
{or, when nothing changes state or shape: **Domain model:** not applicable, {reason}}

## Visual direction
**References:** {3 to 5 real screens the ICP knows, saved before the versions: design/refs/{name}.png, each with what it does well}
| Version | Axis and direction | File | Avoids | Verdict |
|---------|--------------------|------|--------|---------|
| A | {axis: what it optimizes} | design/a-v1.html, or the route and branch | {the generic default this version steers away from} | chosen / rejected: {why} / combined into {version} |

**Chosen:** {version and file}
**Chosen by:** {person, from their answer}
**Why:** {voice adjective and ICP fact it serves}
**Design kit:** {kit, or "inherited: {system}"} · **Alternatives:** {kits considered, why not}
**Tokens:**
| Token group | Values |
|-------------|--------|
| Colour roles | {role: value (contrast ratio)} |
| Type | {families, scale, weights} |
| Spacing | {scale} |
| Shape | {radius, borders} |
| Elevation | {shadows or none} |
| Motion | {durations, reduced motion} |

**Composition:** {grid, density, where the primary action sits}
{or, with no interface: **Visual direction:** not applicable, {reason}}
Direction Methodreferences/direction-method.md

The references, the axes, the defaults to steer away from, the file rules, the kit card and the token list behind ux-architecture (direction). Product names are examples of a kind of option, never defaults.

References

Three to five real screens, captured before any version is drawn, saved as design/refs/{product}-{screen}.png in the initiative folder and listed under **References:** with one line each. Pick them for this ICP and this kind of screen: the tools the ICP opens every day, and the best example of the same pattern anywhere (the list, the report, the editor). Each line names what to take from it: the hierarchy, the density, how the primary action sits, a typographic choice, an empty state. A reference is a source of craft, never a template to copy; a version that reads as a clone of one reference has failed the axis.

Defaults to Steer Away From

The look a generator produces unprompted is the same for every product, so it says nothing about this one. Each version names in its Avoids column the default it replaces, and what replaces it:

  • A centred hero with a gradient headline and two buttons, on a page that is a tool, not a landing page
  • Purple-to-blue gradients, glassmorphism, glowing borders
  • One sans-serif at one weight everywhere, with hierarchy done by size alone
  • Cards with identical radius and shadow for every kind of content
  • Emoji or generic line icons as the only visual identity
  • Centred text blocks, equal spacing everywhere, no rhythm between sections
  • Grey placeholder content ("Lorem ipsum", "Item 1") that hides density problems

Axes of Difference

Structural axes first: every version takes a different one of the first four rows. The last two are tone, layered on a structure on a new product, never a version on their own.

Pick one axis per version and say it. Two versions on the same axis at opposite ends make the trade-off visible; three versions on three axes give the widest spread.

AxisOne endOther endWho it tends to fit
DensityCompact tables, many rows on screenSpacious cards, one thing at a timeOperators all day / occasional users
ToneQuiet, neutral, tool-likeExpressive, branded, warmBack-office / consumer or sales-led
HierarchyOne dominant action per screenMany equal entry pointsFirst-time users / experts
Layout modelSidebar navigation + workspaceSingle column, step by stepMulti-object products / linear flows
Colour temperatureCool, low saturationWarm, high contrast accentsTrust and data / energy and action
Type personalityNeutral sans, tightCharacterful serif or rounded sansUtility / editorial or friendly

Tie each version to the voice adjectives in PRODUCT.md. A version that contradicts a counter-example ("calm, not sleepy") is dropped before the user sees it.

Clickable Prototype

What a person from the ICP walks in the real-user session (gate 4.13), before the look, the stack or the architecture cost anything. It tests the concept, so it carries no visual decisions that would draw comments away from it.

  • One file, every screen. design/prototype.html, inline styles only, each step of the primary flow a
    and each action a link to the next step; a hash router of three lines is enough. The first day comes first on a new product.
  • Real words. Labels, empty states, errors and the one message the flow sends, in the voice from PRODUCT.md; sample data labelled as sample, at realistic volume.
  • The hard states. At least the empty screen and one error, reachable by a link, because that is where people stick.
  • Neutral look. System fonts, greys, one accent for the primary action. A person who comments on colour is telling you the concept passed.
  • What it does not do. No backend, no saved state beyond the page, no login. The price is shown where it will be, so the session can record what the person did with it (gate 4.14).

Example, a no-show reminder for a physio clinic: welcome (connect your calendar) → today's list (sample patients, one flagged at risk) → a reminder preview with the WhatsApp text → sent, with the empty list for a day with no bookings and the error for a calendar that refused access.

Version Files

  • In the real app when the product exists and runs: the versions render inside the existing page behind a ?variant= URL parameter, with a small switcher bar (previous, label, next, arrow keys) that never ships to production; the variant code lives on a throwaway branch named for the initiative, and the main branch keeps only the chosen direction, rebuilt properly. The File column records the route (/reports?variant=b) and the branch.
  • As files otherwise. Path: .builderos/initiatives/{initiative}/design/{letter}-v{n}.html, for example a-v1.html, b-v1.html, c-v1.html, then a-v2.html for the first revision of A.
  • Self-contained: one file, inline CSS, no build step, opens from disk in any browser. Type is part of the direction: where the version has type personality, embed a real typeface (a web font linked from a font service, or inlined) with a system stack as the fallback, and name it in the header comment. System fonts are a choice for a quiet, tool-like direction, not the default for all.
  • Same screen in every version, at desktop width, with a narrow-width rendering below it when the ICP uses phones.
  • Realistic content from the domain, with a visible "sample content" label. The empty and error state of that screen, small, under the main rendering, so the direction is judged on its hard states too.
  • A header comment with the axis, the voice adjectives it serves and the date.

Where ui.render resolved, show the same files through it; the files remain the record.

Presenting a Round

markdown
Versions on the main screen of {flow step}; open the files to compare them side by side.

- **A. {name}** (`design/a-v1.html`): {axis and what it optimizes}. Gives up {what}. Fits {who}.
- **B. {name}** (`design/b-v1.html`): …
- **C. {name}** (`design/c-v1.html`): …
➡️ **{X}**: {voice adjective and ICP fact, with tag}.

Answer with a letter, or combine named parts: "A's layout with C's palette".

The Kit Card

Asked after the interface layer is decided.

markdown
❓ **Q{n} · Design kit**: which component library builds this direction?
- **A. {kit}** ({one-line gloss}): fits {frontend} {yes/how}. Accessibility: {what it handles: focus, keyboard, ARIA}. Theming to the chosen tokens: {easy / partial / fights it}. Licence: {licence, tagged or unverified}. Leaving later: {what that takes}.
- **B. …**
➡️ **{X}**: {deciding factor}.

Kinds of option: the kit already installed; a headless library that brings behaviour and accessibility while the look comes from the tokens (Radix, React Aria, Headless UI); a copy-in component collection on a utility CSS framework (shadcn/ui on Tailwind); a full opinionated kit (MUI, Mantine, Chakra); platform-native components (Material, Human Interface); custom components on the tokens alone, which is rarely right for a first version.

Tokens

Extracted from the chosen version into SPEC.md → Design, in a table the build reads:

Token groupWhat to write
Colour rolesbackground, surface, text, muted text, primary, primary text, border, success, warning, danger; each value with its contrast ratio against what it sits on
Typefamilies, scale (sizes and line heights per role), weights
Spacingthe scale (for example 4, 8, 12, 16, 24, 32) and the default gaps
Shaperadius per element kind, border widths
Elevationshadows or the decision not to use them
Motiondurations and the reduced-motion behaviour

Composition rules sit under the table in a few lines: grid and max width, density, where the primary action sits, how many actions a screen may surface.

Interface Detailsreferences/interface-details.md

What separates a product people call well made from one that merely works. The build applies these while writing components (delivery-discipline, step 5), the craft critique checks them (gate 5.12), and the token check in the guardrail enforces the first section on every change (gate 5.10). Numbers are starting points with their source where one exists; a product with a reason to differ records the difference in SPEC.md → Design.

Tokens in the Code

The chosen direction survives only if the code cannot drift from it.

  • One source. Every colour, spacing step, radius, shadow, type size, weight and duration lives in one token file (CSS custom properties, the kit's theme, a theme object). Components read tokens.
  • A check, not a habit. The guardrail fails on raw values outside the token file: a colour literal (hex, rgb, hsl), a utility class from the framework's default palette instead of the project's, a spacing or font size that is not on the scale. A lint rule, a stylelint rule or a search in CI all work; record which under TECH.md → Quality checks as the token check.
  • Exceptions are named. A one-off value goes into the token file with a comment saying where and why, so the next screen can find it.

Every Interactive Element, Every State

  • Default, hover (pointer devices only), pressed, focus-visible, disabled, loading; selected or checked where it applies. A disabled control says why on hover or next to it.
  • Hit area at least 24 by 24 CSS pixels (WCAG 2.2, target size), 44 by 44 on touch.
  • The focus ring comes from the tokens, visible on every background, and appears on keyboard focus, not on mouse click.

Feedback and Speed

  • Every action answers within 100 ms: a pressed state, an optimistic update, a progress indicator. Past 1 s, show progress; past 10 s, move it to the background and notify on completion.
  • A loading indicator appears after a short delay (about 300 ms) and, once shown, stays long enough to read (about 500 ms), so fast responses do not flash.
  • Skeletons and reserved space match the final layout: nothing moves when content arrives.
  • Reversible actions update optimistically and roll back with a message on failure; destructive ones offer undo before confirmation dialogs.
  • Core Web Vitals at the 75th percentile of real visits: largest contentful paint 2.5 s or less, interaction to next paint 200 ms or less, cumulative layout shift 0.1 or less (the "good" thresholds published by web.dev). Gate 5.14 records the measurement.

Forms

  • A visible label on every field; a placeholder is an example, not the label.
  • The right input type, autocomplete and inputmode, so phones show the right keyboard and browsers fill what they know. Paste works in every field, codes and passwords included.
  • Errors sit next to the field, say what to do, and appear on leaving the field or on submit. The form keeps everything typed after an error and focuses the first field in error.
  • Enter submits; the submit button shows progress and ignores a second press while the first is in flight.

Keyboard and Focus

  • Every action reachable by keyboard in visual order.
  • A dialog takes focus when it opens, keeps it inside, returns it on close, and closes on Escape.
  • In a tool people keep open all day, the frequent actions have shortcuts, shown in menus and tooltips.

Content and Layout

  • Numbers in tables use tabular figures and align right; amounts carry their currency, dates follow the locale, recent times read as relative with the exact time on hover.
  • Test every screen with the longest real value (a long company name, an email, a word with no break): it truncates with the full text reachable, or wraps without breaking the layout.
  • Reading text runs 45 to 75 characters per line; headings wrap balanced.
  • Empty states say what goes here and offer the first action. Errors say what happened and what to do next, in the product's voice.

State in the URL

Filters, tabs, sort order, page and the open record live in the URL, so a link, a refresh or the back button returns to the same view.

Motion

  • Durations come from the tokens, usually 100 to 300 ms for interface changes. Motion shows where something went or what changed state.
  • With prefers-reduced-motion, movement becomes a fade or an instant change.

Themes

When the product offers a dark theme, every colour token has a value per theme, contrast is checked in both, and shadows, borders and images are adjusted rather than inverted.

Next to the References

The critic puts each capture beside the reference screens in design/refs/ and names, per reference, where the built screen falls short on the detail that reference was chosen for. "None found" means the built screen holds its own next to the best of its kind.

UX Methodsreferences/ux-methods.md

The tables and reasoning behind each ux-architecture procedure step. Read only the section the current step needs.

Information Architecture

Where the new thing lives, in the structure the user already has in their head.

Three questions, in order:

  1. Where does the user expect this to be? Not where it is convenient to add it. If the answer differs from where it is easy, say so and name the cost of the easy option.
  2. What does it sit beside? A feature placed next to unrelated things inherits their mental model and confuses both.
  3. What has to move? Adding usually means reorganizing. A feature bolted onto a navigation that was full three features ago is how products become unusable one reasonable decision at a time.

Write the current structure and the proposed structure side by side. The diff is the deliverable, not the description.

Flow Design

A flow is the path from intent to outcome. Specify it as ordered steps, each with the decision the user makes and what the system does in response.

ElementRequirement
Entry pointsEvery way in. A flow with one documented entry point and three real ones breaks at the undocumented two
StepsThe user's action and the system's response, per step
Decision pointsWhere the path branches, and what determines the branch
ExitSuccess, abandonment, and what happens to partial work on abandonment
ReversibilityWhich steps can be undone, and how

The abandonment exit is the one that gets skipped. Every multi-step flow needs an answer to "they closed the tab at step 3": discard, save as draft, or resume. Silence here means the implementer picks, usually discard, usually wrong.

Drawing the Flow

Each flow is drawn as well as tabled (gate 4.20). The drawing is where a missing exit or a branch that leads nowhere becomes visible at a glance, to the person accepting the spec as much as to the agent building it. It is written as Mermaid text inside SPEC.md → Design, next to its table: it needs no tool to write, renders on GitHub and in most editors and previews, and changes in a diff like any other line.

flowchart TD
  entry([Report header]) --> report[Weekly report]
  report --> any{Any deals this week?}
  any -->|no| empty[Empty state: import deals]
  any -->|yes| export[Click Export]
  export --> big{Over 10,000 rows?}
  big -->|yes| mail[File emailed when ready]
  big -->|no| done([File downloads])
  export -.->|closes the tab| draft[Export keeps running, link in notifications]
ElementDrawn as
Entry pointa stadium node ([…]), one per entry
User action or system responsea box […], named in the product's words, the same words as the table
Decision pointa diamond {…?}, its exits labeled with the answer
Success exita stadium node at the end
Abandonmenta dotted arrow -.-> to what happens to partial work
Error and emptyboxes off the decision that leads to them, named after their state in ## States

The table and the drawing say the same thing; when they disagree, the table is fixed first, because the spec and the tests read it, and the drawing follows. The person edits the drawing by hand. node scripts/bos.mjs flows writes design/flows.html in the initiative, at no model cost: each flowchart opens on a hand-drawn canvas (Excalidraw, MIT, laid out by its Mermaid importer) where the person drags boxes, adds one, joins two with an arrow, renames by double-click and dashes an abandonment arrow; the page turns the drawing back into the flowchart as they go. A Text tab shows the same Mermaid beside its drawing (Pele, Mermaid to SVG), with parse errors in place; state diagrams are edited there. Libraries load pinned from a CDN; offline the text stays editable. They copy or save their changes, and bos.mjs flows --apply flows-edited.md writes only the edited blocks back into SPEC.md → Design; the agent then brings each table in line with its drawing, reading a few lines rather than the canvas. Open the page with the person when the flows are first drawn and whenever they want to change one. Another canvas (diagram.render: tldraw, FigJam, …) can serve a workshop the same way: what changes there comes back into the Mermaid block and the table, which stay the record.

A lifecycle is drawn the same way, as a stateDiagram-v2 under its transitions table in ## Domain model (domain-model, step 2).

State Coverage

Six states per step. Gate 4.3 enforces two of them; the other four are how a feature stops feeling unfinished.

StateWhat it needs
EmptyWhat a new user sees, and the one action that fills it. An empty state with no action is a dead end
LoadingThe indication, and what happens if it takes longer than expected. A spinner with no timeout is a hang
PartialSome of it worked. What is shown, what is retryable, what was lost
ErrorWhat happened in the user's words, whose problem it is, and the next action. Never a code alone
SuccessConfirmation that is visible without hunting, and the next step
PermissionPreserve the application’s actual authorization contract: sign-in redirect, 401, 403 or a deliberate 404 that conceals resource existence. Design recovery only where disclosure is permitted; do not reveal hidden resources

Error copy is part of the architecture, not a polish task. "Something went wrong" tells a user nothing and generates a support ticket. Name what failed, and what they can do.

Messages

What the product sends when the person is not looking at it is read more often than most screens: the welcome, the password reset, the reminder, the weekly summary, the failed payment, the reply of an agent on WhatsApp. Design each one like a screen.

Find them from the flows. Walk every flow and every transition in the domain model and ask what leaves the product: an email, a push, an in-app notification, a chat message, a text. Scheduled ones (digests, reminders, renewals) come from the business rules, not the flows; check both.

One row each, in SPEC.md → Design → ## Messages: what triggers it, who receives it, the channel, its real text in the voice from PRODUCT.md, how the person stops it (transactional messages say so), and the preview.

Previews a person opens. An email is an HTML file in design/messages/ with the subject, the sender name, the preheader and the body, readable at 390 px and with images off. A chat or text message is the bubble as it will look, with its length within the channel's limit and its buttons or quick replies. A push is its title and line as the lock screen cuts them. Each language in PRODUCT.md → Markets has its version; the preview shows the longest.

Channel rules worth knowing. Business messaging platforms (WhatsApp and similar) require pre-approved templates for messages that open a conversation, and limit free text to a window after the person last wrote: the template text is part of the design and needs approval time in the plan. Email needs an authenticated sender (release-ops (production)) and an unsubscribe link on anything that is not transactional.

Seen as received. In phase 5 each message is sent by the built product to a test inbox or phone and captured (**Messages received:**, gate 5.9), because what a template renders and what a mail client shows differ.

Component Inventory

What this feature needs, split three ways:

CategoryMeaningConsequence
ExistsAlready in the system, used as isFree, and consistent
Exists, needs extensionA new variant, size or state on an existing componentCheap, but it changes every other use of that component. Say so
NewNothing like it existsExpensive. Each one is a maintenance obligation, so justify it

A feature that needs four new components is usually a feature that ignored the system. Look again before accepting that count: the third question is whether the interaction is genuinely new, or whether it is an existing pattern in an unfamiliar arrangement.

Accessibility Floor

Gate 4.5 requires the floor stated, not audited. Three things, specified before building, because retrofitting each one is an order of magnitude more expensive:

ElementThe requirement
Keyboard pathEvery action reachable and completable without a pointer, in a sensible order. Name the tab order for the primary flow
Contrast targetThe standard being held to, stated as a ratio, for text and for meaningful non-text
Focus orderWhere focus goes on open, on close, on error, and on completion. Focus lost to the body element after a dialog closes is the most common failure

Beyond the floor, three more that cost nothing when designed in: every control has an accessible name, state changes are announced rather than only shown, and no information is carried by color alone.

The floor is a floor. A full audit belongs to a dedicated accessibility pass; stating these three prevents the failures that are structural rather than cosmetic.

Interop

The visual layer (typography, spacing, colour, motion, the design kit) belongs to ux-architecture (direction), which renders versions for the user to choose from and writes the tokens into SPEC.md → Design. Where a design-quality toolchain is present it renders through it; where none is, it writes HTML files. This skill keeps information architecture, flows, states, the component inventory and the accessibility floor; the component inventory names components of the kit ux-architecture (direction) settles.

More Common Mistakes

MistakeWhy it failsCorrect
An empty state with no actionA dead end for every new userOne clear action that fills it
One documented entry point, three real onesThe flow breaks at the undocumented twoEnumerate every entry
Accessibility as a later passKeyboard and focus are structural, not cosmeticState the floor before building
Information carried by color aloneInvisible to a meaningful share of usersPair color with text or shape
Placing the feature where it is easy to addThe navigation degrades one reasonable decision at a timePlace it where the user expects it, or name the cost
Designing the happy path onlyPartial and permission states are where the support load comes fromSix states per step
"Something went wrong"Tells the user nothing, generates a ticketName what failed and the next action
No abandonment behaviorThe implementer picks, usually discardSpecify discard, draft or resume
Generated from skills/ux-architecture/SKILL.mdView on GitHub