DESIGN.md
This file
DESIGN.md
name: Myr web description: Four shells on warm paper, three of them ruled. What state a change is in, whose move it is, and what to do next. colors: paper: "#f8f7f4" paper-dark: "#0a0a0a" ink: "oklch(0.2417 0.0298 269.8827)" ink-dark: "oklch(0.9702 0 0)" surface: "oklch(0.9251 0.0071 88.645)" surface-dark: "oklch(0.2178 0 0)" surface-2: "oklch(0.91 0.0071 88.645)" surface-2-dark: "oklch(0.245 0 0)" card: "oklch(1 0 0)" card-dark: "oklch(0.1822 0 0)" popover: "oklch(1 0 0)" popover-dark: "oklch(0.1822 0 0)" primary: "oklch(0.56 0.0309 154.9039)" primary-dark: "oklch(0.6333 0.0309 154.9039)" secondary: "oklch(0.8596 0.0291 119.9919)" secondary-dark: "oklch(0.2178 0 0)" accent: "oklch(0.8242 0.0221 136.6092)" accent-dark: "oklch(0.3709 0.0248 153.9823)" muted: "oklch(0.5 0.0234 264.3637)" muted-dark: "oklch(0.7058 0 0)" rule: "oklch(0.87 0.0071 88.645)" rule-dark: "oklch(0.285 0 0)" rule-strong: "oklch(0.2417 0.0298 269.8827)" rule-strong-dark: "oklch(0.9702 0 0)" input: "oklch(0.6 0.0234 264.3637)" input-dark: "oklch(0.52 0 0)" skeleton: "oklch(0.82 0.0071 88.645)" skeleton-dark: "oklch(0.36 0 0)" landed: "oklch(0.46 0.11 155)" landed-dark: "oklch(0.78 0.13 155)" checking: "oklch(0.47 0.1 238)" checking-dark: "oklch(0.76 0.11 238)" waiting: "oklch(0.46 0.1 120)" waiting-dark: "oklch(0.82 0.12 120)" refused: "oklch(0.49 0.1743 26.1433)" refused-dark: "oklch(0.68 0.2078 25.3313)" sealed: "oklch(0.46 0.13 305)" sealed-dark: "oklch(0.76 0.11 305)" syntax-string: "oklch(0.42 0.035 200)" syntax-string-dark: "oklch(0.8 0.035 200)" syntax-constant: "oklch(0.42 0.035 340)" syntax-constant-dark: "oklch(0.82 0.035 340)" syntax-comment: "oklch(0.42 0.012 258)" diff-add-sign: "oklch(0.51 0.09 195)" diff-add-sign-dark: "oklch(0.74 0.08 195)" diff-del-sign: "oklch(0.51 0.12 345)" diff-del-sign-dark: "oklch(0.72 0.1 345)" typography: display: fontFamily: "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif" fontSize: "clamp(2.5rem, 1.25rem + 3.5vw, 4.75rem)" fontWeight: 500 lineHeight: "1.02" letterSpacing: "-0.035em" lede: fontFamily: "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif" fontSize: "1.1875rem" fontWeight: 400 lineHeight: "1.75rem" headline: fontFamily: "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif" fontSize: "1.5rem" fontWeight: 600 lineHeight: "2rem" letterSpacing: "-0.015em" title: fontFamily: "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif" fontSize: "1.1875rem" fontWeight: 600 lineHeight: "1.6rem" letterSpacing: "-0.01em" want: fontFamily: "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif" fontSize: "1rem" fontWeight: 500 lineHeight: "1.5rem" body: fontFamily: "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif" fontSize: "1rem" fontWeight: 400 lineHeight: "1.55rem" ui: fontFamily: "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif" fontSize: "0.875rem" fontWeight: 400 lineHeight: "1.3rem" label: fontFamily: "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif" fontSize: "0.8125rem" fontWeight: 500 lineHeight: "1.15rem" mono: fontFamily: "IBM Plex Mono, ui-monospace, monospace" fontSize: "0.8125rem" fontWeight: 400 lineHeight: "1.25rem" fontFeature: ""calt" 0, "liga" 0" terminal: fontFamily: "IBM Plex Mono, ui-monospace, monospace" fontSize: "0.8125rem" fontWeight: 400 lineHeight: "1.5rem" code: fontFamily: "IBM Plex Mono, ui-monospace, monospace" fontSize: "0.8125rem" fontWeight: 400 lineHeight: "20px" fontFeature: ""calt" 0, "liga" 0" footer-wordmark: fontFamily: "IBM Plex Sans, ui-sans-serif, system-ui, sans-serif" fontWeight: 600 letterSpacing: "-0.04em" lineHeight: "0.9" fontSize: "12.131cqi" rounded: none: "0px" sm: "1px" md: "2px" spacing: hairline: "1px" row-y: "10px" gutter-phone: "16px" gutter-tablet: "20px" gutter-site: "2rem" gutter-project: "1.75rem" region: "32px" container-site: "110rem" container-figure: "76rem" frame-inset: "1.5rem" frame-gap: "1rem" container-project: "100rem" container-focus: "25rem" column-about: "21.25rem" column-tree: "17.5rem" column-docs-nav: "15rem" column-docs-toc: "13.75rem" column-filters: "15rem" measure: "72ch" measure-page: "56rem" measure-lede: "40rem" top-bar: "3.5rem" toolbar: "2.5rem" tabs: "2.75rem" row-phone: "88px" components: top-bar: backgroundColor: "{colors.paper}" textColor: "{colors.ink}" typography: "{typography.ui}" height: "56px" project-header: backgroundColor: "{colors.paper}" textColor: "{colors.ink}" typography: "{typography.headline}" project-tab: textColor: "{colors.muted}" typography: "{typography.ui}" height: "44px" project-tab-current: textColor: "{colors.ink}" typography: "{typography.ui}" height: "44px" card: backgroundColor: "{colors.card}" textColor: "{colors.ink}" rounded: "{rounded.md}" padding: "16px" footer-wordmark: textColor: "{colors.ink}" typography: "{typography.footer-wordmark}" toolbar: backgroundColor: "{colors.paper}" textColor: "{colors.ink}" typography: "{typography.ui}" height: "40px" row: textColor: "{colors.ink}" typography: "{typography.want}" padding: "10px 0" height: "64px" row-hover: backgroundColor: "{colors.surface}" textColor: "{colors.ink}" typography: "{typography.want}" height: "64px" row-group-header: backgroundColor: "{colors.paper}" textColor: "{colors.ink}" typography: "{typography.ui}" height: "32px" command-line: backgroundColor: "{colors.surface}" textColor: "{colors.ink}" typography: "{typography.terminal}" rounded: "{rounded.none}" padding: "4px 4px 4px 12px" copy-action: textColor: "{colors.ink}" rounded: "{rounded.none}" size: "32px" kbd: backgroundColor: "{colors.paper}" textColor: "{colors.ink}" typography: "{typography.label}" rounded: "{rounded.md}" padding: "0 4px" refusal-headline: textColor: "{colors.refused}" typography: "{typography.terminal}" padding: "8px 0" held-back-line: textColor: "{colors.sealed}" typography: "{typography.terminal}" fact-label: textColor: "{colors.muted}" typography: "{typography.label}" stage-cell: textColor: "{colors.ink}" typography: "{typography.label}" padding: "6px 8px" button-primary: backgroundColor: "{colors.primary}" textColor: "{colors.card}" rounded: "{rounded.none}" height: "32px" button-ghost: textColor: "{colors.ink}" rounded: "{rounded.none}" height: "28px" input: backgroundColor: "{colors.paper}" textColor: "{colors.ink}" typography: "{typography.ui}" rounded: "{rounded.none}" height: "32px" decision-choice: backgroundColor: "{colors.primary}" textColor: "{colors.card}" rounded: "{rounded.none}" height: "36px" padding: "0 16px" decision-choice-default: backgroundColor: "{colors.paper}" textColor: "{colors.ink}" rounded: "{rounded.none}" height: "36px" padding: "0 16px" decision-choice-phone: backgroundColor: "{colors.primary}" textColor: "{colors.card}" rounded: "{rounded.none}" height: "44px"
Design System: the web
The web's look, for anyone adding or changing a page. Tokens live in apps/web/src/styles.css. The pieces every page shares (the top bar, the footer, the project header, the row, the status line, the family fan, the fact blocks, the copy action, refusals, credit, posture, outcomes, stages, the command line, marks, times, people, empty and pending states) live in apps/web/src/features/shared/. A page uses them rather than drawing its own. Pierre's code drawing is configured once, in apps/web/src/features/code/pierre.ts. Words follow GLOSSARY.md and PRODUCT.md.
The rules here are ADR 0041 (four shells, Overview first, no logomark, a plain sans), ADR 0042 (the theme preference), ADR 0043 (fork browsing) and the maintainer's overrides of 2026-10-12 (IBM Plex, the sage garden palette, the repeat button icon, the footer's wordmark, no fingernails, no eyebrows). Where the code has not caught up yet, this file is the target and apps/web/test/design-rules.test.tsx holds what it can.
Overview
Creative North Star: "Four shells on warm paper"
The web serves four jobs, and each gets its own frame: a site that explains the platform and lists its projects, a project with one header and its tabs, a docs site, and a focused card for signing in. All four share the top bar's contents, so moving between them never reads as a different app. Three of them are ruled: two hairlines run down the container's edges the page's full height, the top bar is a box between them under a small gap, and every rule inside runs rail to rail, so the page reads as one sheet pinned to the bench, like the music box's own ruler. A project is full-bleed: its code and diffs want the whole window. Every screen still answers three questions in this order: what state is it in, whose move is it, and what to do next. The answer to the last one is a control on the page, never a command to copy: the terminal has its own surface, the CLI.
The pages are for operating, with one page that persuades: the landing at /, which draws the platform as a music box whose cylinder only its own press can pin, and leads to the open asks. Density is set by a maintainer clearing the inbox on a phone and a contributor reading a refusal beside a terminal: two-line rows (64 px), 14 px metadata, a 13 px floor. Colour means state, and always sits beside a word and a mark, so a page read in grayscale, by a screen reader or in a terminal says the same thing. In a list the colour sits on the mark and the word stays ink. The one colour that is not a state is the sage primary: the page's main action and the focus ring.
Rejected on purpose: the dashboard look (stat tiles, big numbers over small labels, a blue link colour, pill badges, avatar stacks, coloured file icons), its glossy cousin (dark glass, blur, glows, gradients), and the terminal costume (green on black, monospace for everything). Rejected too: a logomark of any kind (crest, gate, doorway); a display serif; a coloured strip on the edge of a card; an eyebrow over a headline; a filled pill or tinted square that carries a state without its word; shadows and glows; outline: none; text at 12 px and greys under 4.5:1; avatars and activity sparklines; a command box that ellipsises; a column of code blocks; and spinners and shimmer in content. Monospace appears only where the text is what a terminal prints or takes: commands, refusal transcripts, trailers, SHAs, paths, ids, env keys and code.
Key Characteristics:
- Four shells (site, project, docs, focus), each named by its route, with no global rail and no generic right rail. The site, the docs and a focused page are ruled (the rails); a project is full-bleed.
- A project has one header and eight tabs, and opens on Overview.
- State is a mark, then a word, then a colour; red belongs to refusals, violet to sealed things, green to what is on main, olive to waiting, blue to checking. In a row the colour is the mark's; the word is ink, except Refused and Landed.
- A page names no CLI command. What a person does on the web is a control: a maintainer's choices, claiming and releasing an ask, posting in a discussion, reading a failed lane's log, importing a repo, the theme preference, and signing in or out. A command box shows only the install line and
git clone(apps/web/test/no-cli-commands.test.ts). - Light and dark follow the system setting, or its opposite by the reader's choice on
/settings(ADR 0042). - Motion carries state, never decoration: transitions of 120 to 200 ms, the landing's stamp, and the landing's music box, whose every move is a step of an answer through the gate.
Colors
The maintainer's "sage garden": warm paper, navy ink, a sage primary, soft sage fills, and five state roles that never appear as decoration. Its values sit on the web's own token names, so no component changed its classes. Every state role measures at least 5:1 against paper, the field surface and the pressed surface, in both schemes; body ink measures 15.3:1 in light and 18.2:1 in dark. apps/web/test/tokens.test.ts holds every pair, and holds the tokens to the pasted palette (a token taken unchanged equals the pasted value; a nudged one differs from it in lightness alone).
No orange, amber or brown anywhere, state roles included: no colour above chroma 0.02 has a hue from 40 to 100 (tokens.test.ts, "spends no orange, amber or brown"). Under chroma 0.02 a hue reads as grey, so the warm paper (hue 91, chroma 0.004) is not orange.
How the palette maps
| Pasted | Web token | Note |
|---|---|---|
background | --background (paper) | As hex, #f8f7f4 and #0a0a0a: the theme-color metas and the manifest repeat it |
foreground | --foreground (ink), --rule-strong | |
muted | --surface (field surface) | shadcn's bg-muted still resolves to the surface |
border | --rule (hairline) | Nudged 0.9251 to 0.87 in light: pasted, it equalled the surface, so a surface box's hairline vanished; now 1.19:1 on the surface and 1.38:1 on paper (1.21:1 and 1.38:1 in dark, as pasted) |
muted-foreground | --muted | Nudged 0.551 to 0.5 in light, for 4.5:1 on the surfaces |
card, popover | --card, --popover | White in light, 0.1822 in dark |
primary, ring | --primary, --ring | Nudged 0.6333 to 0.56 in light, so white on it measures 4.58:1 |
secondary, accent | --secondary, --accent | Soft sage fills for a secondary button and a menu's highlighted item |
destructive | --refused (and --destructive, its alias) | Nudged 0.5624 to 0.49 in light and 0.6368 to 0.68 in dark, for 5:1 on the pressed surface |
Not taken from the paste: --spacing (it rescales every utility), --font-serif (no serif), its shadows (the web is flat), its sidebar and chart colours (no page draws a sidebar or a chart), and its 0.35rem radius (shapes stay square: the overrides moved colour and type into scope, not shape). New steps in the palette's own hues: --surface-2, --input, --skeleton.
Primary
- Navy Ink (
--foreground): text, page titles, the current tab's underline, links (links are ink, never blue). - Sage Primary (
--primary,--ring): the page's one main action (a primary button, a maintainer's non-default choice, a checked box) and the 2 px focus outline. Low in chroma (0.031), so it never reads as landed green (chroma 0.11); it is never a state and never decoration. The focus ring measures 4.3:1 on paper and 3.7:1 on the surface in light, 5.8:1 and 5.1:1 in dark.
State roles
- Landed Green (
--landed, hue 155): the change is on main. The landing's stamp and lead word, passed stages, a decision whose choice took effect. - Checking Blue (
--checking, hue 238): the gate is running a stage now, and the viewer's own selection (text selection and selected code lines, a tint of it over the paper). It sits 30° from the ink's blue cast (hue 270), so code drawn in ink never reads as a running stage. - Waiting Olive (
--waiting, hue 120): passed or paused, waiting on a person or another ask; a decision that expires within the day; the mark of a retryable refusal. It left the ochre band (hue 70) for olive, 35° from landed and far from checking and sealed. Waiting is never shown in the refused colour. - Refused Red (
--refused, hue 26): a refusal, its headline and each refusal's tag. shadcn'sdestructivemaps here, so nothing destructive may be red unless it is a refusal. - Sealed Violet (
--sealed, hue 305): held-back checks, layers and sealed evidence; theHeld-back:trailer, a posture that keeps something sealed, the ledger's layer and area headings, a sensitive env item's mark.
Code and diffs
- Syntax (
--syntax-*): one low-chroma theme drawn from the tokens and handed to Pierre as a CSS-variable theme. Keywords, functions and parameters are ink; strings lean grey-teal (hue 200) and constants grey-plum (hue 340, moved from olive 110, where waiting now lives); each at chroma 0.035 and at least 30° from every state hue; comments and punctuation are a step darker than muted in light and muted in dark. Each keeps 4.5:1 on the paper. - Diff tints (
--diff-add-*,--diff-del-*): additions teal, deletions rose, a family apart from landed green and refused red. The sign colour draws the+and-, the bars and a changed line's number (held to 4.5:1); a line's tint is that colour mixed into the paper (12% in light, 20% in dark, as Pierre mixes it); emphasis marks the changed words. The file tree's status letters use the same family (A teal, D rose, M and R muted).
Neutral
- Warm Paper (
--background): the ground of every page. Hex, because the twotheme-colormetas and the web app manifest repeat it fromfeatures/shared/theme.ts, and a test holds them equal. - Card White (
--card): the ground of a card, a plain bordered surface one step lighter than the paper in light (in dark, one step lighter than the paper and darker than the field surface). - Field Surface (
--surface): command lines, a hovered row, the current stage cell, a segmented control's current segment. - Pressed Surface (
--surface-2): one step past the field surface, for a selected thing under the pointer only. It measures 1.22:1 against paper in both schemes and every state role keeps at least 5:1 on it (the floor is refused at 5.12:1 in dark). Never a third step, never a zone. - Popover (
--popover): the one raised layer's ground (dialogs, sheets, menus, popovers, tooltips): white in light, 0.1822 in dark. - Muted Grey (
--muted, astext-muted-foreground): labels, metadata lines, stages not reached or not needed, the$of a command line,Assisted-bylines. At least 4.6:1 on every ground. - Hairline (
--rule): every border and rule, and the underline of links in running text. At least 1.15:1 on paper and on the field surface in both schemes, so a surface box's border shows. - Control Border (
--input): a form control's border at 3:1 on paper and on the surface (3.7:1 and 3.2:1 in light, 3.6:1 and 3.2:1 in dark). - Skeleton Stroke (
--skeleton): the outlined bars of a placeholder row or fact (1.6:1 in light, 1.8:1 in dark), with no fill. - Strong Rule (
--rule-strong, ink): the 2 px underline of the current tab or filter.
Named Rules
The Rubric Rule. Red belongs to refusals. A destructive button, a transport failure or a deletion in a diff is never red.
The Word First Rule. No state is carried by colour alone: every coloured mark has a word beside it or in its row ("passed", "now", "refused", "not yet", "not needed"; "Waiting", "Landed", "Checking").
The Mark Carries Rule. In a row the colour belongs to the mark; the state word is ink at 500, except Refused (red) and Landed (green), so a list of waiting asks is not an olive stripe and the one actionable word, "Open to take", has the same weight as its neighbours. The status line and the state badge keep the coloured word: there it is said once, beside its sentence. (ADR 0039; its inspector width went with the inspector, this rule stays.)
The No Fingernail Rule. A card, row or panel is a plain bordered surface. No coloured strip, bar, notch or tab on any edge or corner, no border-l-4-style accent and no state-coloured top rule: the refusal block lost its red top rule for this. State lives in a word and a mark.
The No Score Rule. No colour, size or ordering ever ranks a person. Handles are links in ink; a record is never shown as a number.
Typography
UI Font: IBM Plex Sans (variable, 100 to 700), from @fontsource-variable/ibm-plex-sans
Mono Font: IBM Plex Mono at 400, 500 and 600, from @fontsource/ibm-plex-mono, with contextual alternates and ligatures off (=> stays =>)
Both load from fontsource as latin and latin-ext only, declared in styles.css with fontsource's own unicode ranges (a page fetches the latin file alone unless it sets an accented letter). The two latin files (the variable sans and mono 400) are preloaded from the root route. No serif anywhere, and no serif token.
Fallbacks that move nothing. Until a face arrives (font-display: swap), text is drawn in a local face scaled to its metrics: Arial (or Liberation Sans, Arimo) for Plex Sans, Courier New (or Liberation Mono, Cousine) for Plex Mono. Measured in headless Chromium on 2026-10-12, with canvas measureText over a 240-character English sample at 1000 px against Liberation Sans and Liberation Mono:
| Face | Width over fallback (size-adjust) | Ascent | Descent | ascent-override | descent-override |
|---|---|---|---|---|---|
| IBM Plex Sans | 100.41% | 1.025 em | 0.275 em | 102.08% | 27.39% |
| IBM Plex Mono | 99.98% | 1.025 em | 0.275 em | 102.52% | 27.5% |
Each override is the face's metric over its size-adjust; the line gap is 0. The same method gave Public Sans's old 103.89%, so the numbers are comparable.
Character: Plex Sans is a grotesque with a typewriter's honesty: engineered, plain, and as readable at 14 px in a dense row as at a headline. Plex Mono is its sibling, so a command in a sentence sits on the same rhythm.
Hierarchy
A fixed rem scale, ratio about 1.15 to 1.2; product type does not float with the viewport (the footer's wordmark and the landing's display headline are the two exceptions). Numbers that can change (counts, times, line numbers, +n −m) are tabular. Nothing is set below 13 px; apps/web/test/type-floor.test.ts refuses the old 12 px and 11 px sizes and any arbitrary size.
- Display (
text-display, 500, clamp(2.5rem, 1.25rem + 3.5vw, 4.75rem), line 1.02, -0.035em, balanced): the landing's headline alone, its two sentences one line each fromtablet. Set at 500, not 600, so Plex's plain letterforms carry it at 76 px without going heavy. It scales with the viewport between 40 and 76 px, the one text besides the footer's wordmark that does. - Lede (
text-lede, 400, 1.1875rem/1.75rem, muted): the landing's line under its headline, held to--measure-lede(40rem) and centred;mainin it is mono at the lede's own size. - Headline (
text-headline, 600, 1.5rem/2rem, -0.015em, balanced): one page title, or a project's name in its header, and the landing's section heads. - Title (
text-title, 600, 1.1875rem/1.6rem, -0.01em): a long ask's title, a region head, the answer's outcome hero, a README's headings. - Want (
text-want, 1rem/1.5rem): a row's first line at 500, and a want or brief in prose at 400. - Body (
text-body, 400, 1rem/1.55rem): prose, held to the measure. - UI (
text-ui, 400, 0.875rem/1.3rem; 500 for state words): row metadata, the top bar, tabs, values, buttons, toolbar controls. The most used size. - Label (
text-label, 500, 0.8125rem/1.15rem, sentence case, muted): fact block heads, field labels, group header counts, a consequence line under a choice. It follows what it labels or sits beside it, never above a heading as a kicker. - Mono (
text-mono, Plex Mono 400, 0.8125rem/1.25rem inline): ids, SHAs, paths, env keys. In transcripts it takesleading-terminal(1.5rem), and refusal transcripts hold to 96ch; in code and diffs it takesleading-code(20 px), Pierre's line. - Footer wordmark (600, -0.04em, line height 0.9, upper case): see the footer below.
Form fields are 16 px below 640 px (so a phone does not zoom on focus) and 14 px from there.
Named Rules
The Code Is Mono Rule. Monospace means "this is what git or a terminal prints or takes". Prose, labels, buttons, headings and commit bodies are never mono.
The Thirteen Floor Rule. The smallest text on any page is 13 px, and it is a label or mono, never a sentence a reader must act on.
The Headline First Rule. No small, upper-case or tracked line above an h1, h2 or h3. The headline comes first; a label, if one is needed, follows it as ordinary text. No component or class is named eyebrow, kicker or overline (design-rules.test.tsx).
Layout
Shells
Every route names exactly one shell in its staticData (shell: "site" | "project" | "docs" | "focus"), and the root draws the matching frame. The widths are tokens in styles.css (@theme static), never literals; design-rules.test.tsx holds this file's spacing values equal to them.
| Shell | Routes | Container | Header | Side columns |
|---|---|---|---|---|
site | /, /explore, /asks, /inbox, /settings, /people/:handle, /install, /privacy, /terms | centred, ruled, --container-site (1760 px), --gutter-site (32 px) | framed top bar | only the filters on /asks (--column-filters, 240 px), left of the list |
project | /:owner/:project/** | fluid to --container-project (1600 px), --gutter-project (28 px) | full-bleed top bar, then the page header | only the about column on Overview (--column-about, 340 px) and the file tree on Code (--column-tree, 280 px) |
docs | /docs/** | centred, ruled, --container-site (1760 px) | the site's top bar | nav tree --column-docs-nav (240 px), parted from the article by a rule its full height; the article at --measure (72ch) with "on this page" (--column-docs-toc, 220 px) beside it, hugging it, the rest of the frame paper |
focus | sign-in, MCP consent, new project | a centred, ruled card, --container-focus (400 px) | the wordmark only, in the framed bar | none |
A shell sets its gutter once, on its frame, and every bar and page inside it reads it: 16 px on a phone, 20 px from tablet, and from shell (1120 px) --gutter-site in the site, the docs and a focused page, or --gutter-project in a project.
Rails. The site, the docs and a focused page are ruled: from tablet, the container stands --frame-inset (24 px) in from the viewport and carries a hairline down each edge, the page's full height (RAILS in app-shell.tsx), and the top bar is a box between them, --frame-gap (16 px) under the viewport's top, with a hairline over and under it. Everything inside (the frame, a section's rule, the footer's rule) runs rail to rail, and the gutter sits inside the rails, so content stands 32 px in from them. Below tablet the rails and the gap go: the bar keeps its rule underneath, and the page takes the phone's 16 px gutter. The top bar's height stays --top-bar, borders included, so what sticks under it reads --stick-bar unchanged, and when the bar sticks it sits flush at the top. The platform's sign-in pages are not ruled: at the card's width, rails and a boxed bar read as boxes in boxes, so they draw one centred column, the wordmark (linking the web's home) over the card and what leads elsewhere under it, the card a bordered surface from tablet and the page itself on a phone. The platform's own clients (the web and the CLI, told by their client ids) are asked no consent there; any other client's name, address and grant are said above the form, the grant behind a disclosure. A project has no rails.
From columns (1100 px, --breakpoint-columns) a side column stands beside its main column; below it, every side column stacks under its main column. From nav (900 px, --breakpoint-nav) the top bar shows its links; below it they fold into a menu. Phone width (360 px) is a first-class layout: nothing scrolls sideways.
The four rules (ADR 0041):
- No global left rail. The project list moves to Explore and the account menu; a project's navigation is its tabs.
- No generic right rail. A side column exists only where it holds facts about what is on screen (a project's about column, a doc's headings), 220 to 340 px wide, and stacks under 1100 px. The asks board's filters are the one column that is not facts: they narrow the list beside them, and stand above it under 1100 px.
- No CLI command on a page. The install line on the landing and Install, and
git clonein the Clone popover, are the only command boxes. Never a column of code blocks. - Prose stops at 72 to 80ch. Lists and tables run to the container; prose, a README and a doc's article stop at
--measure(72ch). A project page's head, facts, toolbar and document body stop at--measure-page(56rem), so its prose and the table beside it share one edge.
Inside a page
- Top bar, sticky (below).
- Page header: on a project, the project header and its tabs, sticky under the top bar; elsewhere the page's title and one line under it, not sticky. A page's facts follow its head inside the page; the only column beside a page is the about column on Overview or the file tree on Code (or, in the docs, the nav tree and "on this page").
- Toolbar, 40 px, sticky under the header on list and code pages.
- Content: rows under sticky group headers, a document of regions 32 px apart, cards in a grid where a page lists projects, or code.
Spacing, on a 4 px base (4, 8, 12, 16, 24, 32): rows 10 px top and bottom, group headers 32 px, fact blocks 12 px apart inside with a hairline between, 24 px under a page head, 32 px between regions. More space above a heading than below it.
Long commands break between words (a URL longer than the line breaks anywhere), paths, SHAs and trailers wrap anywhere, and code scrolls sideways inside its own box, never wrapping.
Elevation & Depth
Flat. No shadows on the page; depth is hairlines, the card's white and the field surface. Overlays (dialogs, sheets, menus, popovers, tooltips) are the only raised layers, on the popover colour with a hairline ring and no soft shadow. Sheets slide in 200 ms; nothing else moves on the z axis.
Shapes
Square. The radius is 2 px (--radius: 0.125rem), and shadcn's base-lyra components square most corners. Borders are one-pixel hairlines; the current tab's 2 px ink underline is the one heavy line, and no edge of a card carries a colour. An empty state's border is dashed (an unfilled field), and so is the rule that parts disclosed agents from credit. Marks are lucide icons at 16 px (14 px in dense places), stroke 1.75, one family.
No logomark. The wordmark is the product's name set in the UI sans. Where a file must stand for the site (the favicon, apple-touch-icon.png, the manifest's icons), it is the repeat button emoji (U+1F501) drawn as text in public/icons/icon.svg, plain: in the reader's own emoji font and colours, filling the square, with no ground of its own. The rasters are that one drawing, rendered in headless Chromium at 1024 px on a transparent ground and downscaled with Lanczos: 512 and 192 for the manifest, 180 for iOS, and 16, 32 and 48 in favicon.ico. Since the emoji fills the square, the manifest offers no maskable icon. apps/web/test/icons.test.ts holds the text, the bare ground and the sizes.
The unfurl's card. public/og.png (1200 × 630) is the repeat button emoji, in Noto Color Emoji, beside the domain in capitals, in IBM Plex Sans at weight 600, on the dark paper (#0a0a0a), rendered in headless Chromium. The root's head names it as og:image at prod's absolute URL, with twitter:card set to summary_large_image, so every page unfurls with it; apps/web/test/head.test.ts holds the metas and icons.test.ts the size.
Components
Top bar
- Character: the same contents in every shell: the wordmark (linking
/), Explore, Asks, Docs, Install, search, Keys (a keyboard icon that opens the keys dialog, the?key's pointer twin) and the account (handle and inbox count, or Sign in). Framed in the site and docs shells (a box between the rails: a hairline under it, and fromtableta hairline over it under a 16 px gap), full-bleed in the project shell; the focus shell shows the wordmark alone in the same box. - Current item: ink at 500 with
aria-current="page"; the others muted. Never a coloured bar. - Below 900 px: the links and Keys fold into a menu (a sheet), the wordmark and the account stay.
Footer
- Where: the site and docs shells; the project and focus shells have none.
- Shape: a hairline above, rail to rail, a row of plain links (Docs, Install, Settings, Privacy, Terms), then the brand's domain in upper case as a watermark: one line of display text in the UI sans, read from
@repo/brand(Brand.domain), upper-cased with CSS, never typed (brand:checkfails on the name outsidepackages/brand). It is drawn in the ink at a tenth of its strength (text-foreground/10), centred, and sized with container query units to fill the content's width exactly, at 600 with -0.04em tracking and a 0.9 line, standing whole on the page's bottom edge (the 0.9 line leaves 0.075em under the baseline, and nothing else), so the page ends in the name. It is the one type that scales with its box. No mark beside it. The size (12.131cqi) is the width over the line's measured width per em, noted infooter.tsx; measure again if the domain changes.
Project header and tabs
- Header: the name (
owner / project, the owner muted, both in the UI sans at Headline size), the posture (PostureBadge), the description (the README's first sentence), a facts row in UI type, muted (open asks, last landing, latest tag, licence if known, deciders), and three actions at the right: Watch (a popover: what already follows the project, this page and its events, and a link to the events), Clone (a popover: thegit cloneURL), Contribute (a popover: take an ask, start a discussion, read the policy). It never changes between tabs. - Tabs: Overview · Code · Asks · Landings · Discussions · Policy · Visibility, each a text tab with its count in label type; the current one ink at 500 with a 2 px ink underline (the one current-tab style of the whole web), the rest muted. The header and tabs stick under the top bar together; on a phone the tabs scroll sideways inside their own strip.
- Overview (the default tab): open asks, recent landings and the README in the main column (its headings a level down, so the project's name stays the page's one h1); the about column (
--column-about) with clone, how a change lands (the seven stages), who decides, a visibility summary and languages. - Code: under the header, the code bar: a Files/History toggle, the revision picker (
main, tags, and answers in claim forks, ADR 0043), the HEAD commit, Go to file and Clone; then the file tree in--column-treebeside every page of the tab. The history is git's first-parent log with the platform's landing record on each commit that has one, filtered to Landings, Answers, Ask openings or Every commit (Landings by default on main); the Landings tab opens that history of main filtered to its landings, and a commit's page sits under it. - Visibility: posture, layers, held-back checks, the environment (once "Env shape") and the ledger, one tab.
Cards
- Shape: a plain bordered surface:
--cardground, a hairline border all round, the 2 px radius, 16 px padding, no shadow. Nothing on one edge (the No Fingernail Rule). Used where a page lists things that are each a small document (Explore's projects, Install's channels) or holds one figure (the landing's music box), never for a list of rows.
Row (Row, AskRow) and row group (RowGroup)
- Character: one anatomy for every list (asks, decisions, landings, commits, refs, forks, credits, rounds, history).
- Shape: 64 px (one-line rows 40 px), two lines: a 20 px mark column, the mark in its state's colour; line 1 the want or subject at 16 px 500, one line, ellipsised, the link (never the id); line 2 metadata at 14 px muted, parted by
·(kind, territory and id in mono, claimant, "round 2" once a round exists); at the right the state word in ink at 500 (red for Refused, green for Landed, as the Mark Carries Rule says) over its time; then the row's action. The time slot is filled on every row, 13 px tabular muted: the last push, else the last round, else the ask's opening. On a phone the state word leads line 2 and the right column hides, and the want may take two lines (about 88 px). - States: hover is the surface at half strength; focus is the 2 px sage outline inside the row; never a coloured edge. A click on the want navigates. An ask's standing is read in this order: held for newcomers first ("Held for newcomers"), then open to take, then "Not open to you" only for a viewer the policy refuses with no reserve on the ask. One ask has one state word on every page.
- Group header: 32 px, sticky under the toolbar, paper fill, a hairline below: the group's name at 600 as a link, its facts (a project's posture, once per group, never per row), its counts at the end in label type ("7 open · 6 to take").
- Data: every
data-*a list carries sits on the row's<li>(data-ask,data-takeable,data-project,data-decision,data-soon,data-entry,data-fork), anddata-list-keyon its link forjandk.
The asks board (/asks)
- Shape: the page's title and its one line, then one strip, then the filters in
--column-filterson the left and the list running to the container on the right. Under 1100 px the filters stand above the list, their three groups side by side fromtablet. - Filters: a
navlandmark ("Filter the asks") of three groups, Kind, State (who may take it: any, open to take, held for newcomers or for people) and Project, each a list of links with its count, the current one on the field surface at 600 witharia-current="page". Every filter is an address (/asks?kind=fix&take=open), each link keeps the other filters, and "Reset filters" shows once one is set. Sticky under the top bar from 1100 px. - List: rows in a
RowGroupper project, sticky under the top bar; a migrate family is its parent row with the family fan, its children listed under it. - Open asks only: the board lists the asks still open, as the
frontPagecontract gives them, so it has no filter to show landed asks. Listing those needs a read of landed asks across every project, which no contract gives yet.
Copy action (CopyAction) and command line (CommandLine)
- Copy action: a 32 px ghost button beside a value, named for what it copies ("Copy Head"), its text always in the DOM (
<code class="sr-only">), never only a clipboard payload. After a copy it shows a check and says "Copied" for 2 s in a polite live region. - Command line: a field-surface box with a hairline border that hugs its command; a muted
$that selection skips; the command in mono at terminal leading, broken only between words, each wrapped line hanging 6ch; a ghost Copy button. A command is always shown whole; it never ellipsises, and a screen shows it once.
Status line (StatusLine) and state badge (StateBadge)
- Status line: one sentence: the mark, the lead word in its role at 600, the rest in ink, then whose move in muted. "Open to take", "Claimed by tamsin, no answer pushed yet · tamsin's move", "Checking at the checks stage · the platform's move", "Refused at Shape: OutOfScope", "Waiting on decision dec-000001 · a maintainer's move", "Landed as 9b1c3e5". A refusal's lead and tag come from
headline, never a paraphrase.data-toneanddata-markcarry it. - State badge: the one way a state shows as a word: its mark, then its word in the role, at the size of its line. No pill, no fill, no box.
data-mark(anddata-postureon a posture's label) carry it.
Marks (marks.tsx)
Lucide, one family, the mark aria-hidden and its word beside it: check (landed, passed), a filled dot (checking, now), hourglass (waiting, an expiry), octagon X (refused, final), turn-back arrow in olive (a retryable refusal), hollow circle (open, not yet), dashed circle (claimed), dash (not needed), lock (sealed), shield (a decision's default), an ink X (a failure that is not a refusal). Same mark, same meaning, on every page.
The family fan (FamilyStrip, FamilyTree)
- Character: a split ask's siblings, side by side; never a ladder, never a sentence of ids.
- Row form: the parent row's third line: one node per child, its mark and its short name in mono, joined by a hairline bus, an arrow to the delete child's node, "n of N landed" at the right, and a toggle that lists the children as indented rows. On a phone the strip shows marks only.
- Vertical form: at the top of a member's page: the parent, the children on a left bus, then the delete child, the member being read at 600 on the surface.
Outcome (OutcomeView), stage strip (StageStrip) and refusal (RefusalView)
- Outcome: an answer's status line at Title size, the stamp on Landed; a refusal adds
RefusalViewbelow.data-outcomeanddata-statecarry it. - Rounds: every push the gate checked is a round, numbered from 1; on an answer with more than one round the first region is Rounds: one 40 px
Rowper round, the round read in the address (?head=). - Waiting: under the strip, the one sentence a contributor needs, from the typed state ("Nothing for you to run. A maintainer has until Thu 14:00."). Never a spinner.
- Landed: told as a sentence before it is shown as a hash: one
StatusLineat Title size, then the credit trailers under "Credit", then the held-back lines, then "The landing commit". - Stage strip: seven ruled cells in cost order (Parse, Shape, Merge, Cheap, Checks, Held-back, Maintainer), each a mark, its label and a 13 px state word: passed, now, refused, not yet, not needed. The current cell is on the surface with
aria-current="step". - Refusal: a hairline above and below (no coloured top rule), then
headline(refusals)in mono red with an octagon mark, then one row per refusal parted by hairlines: itsexplainlines verbatim. A retryable refusal's mark is the olive turn-back arrow.data-refusalanddata-retryablecarry it. The web never rewords a refusal.
Credit trailers (CreditTrailers, CompactCredit) and held-back lines
- Credit: a "Credit" label over one mono line per trailer,
Role: handle, inCreditRole's order (Asked-byfirst), handles linked; below a dashed rule, "Agents used, disclosed and not credit" and the mutedAssisted-by:lines. The compact form reads "Asked by ines-v · answered by bram" and never names an agent. - Held back: one sealed-violet mono line with a lock per area, each root shortened with the whole in
titleand on copy. The area and its count, never a check's name.
Posture badge (PostureBadge)
The platform's own label, never rewritten, through the state badge: a lock and the word in sealed violet for postures that keep something sealed, an open lock in ink for Open, muted for Source available. Said once per page: in the project header, in a list's group heading, or on an Explore card; never per row. data-posture carries the literal.
Decisions, the inbox and the finish
- Inbox (
/inbox, once Home and Today, which redirect to it with their query kept): the reader's handle and record, how many decisions wait as one sentence for a decider, then sections under sticky headers: the decisions (Due today, Later), every open one, each decided in its row; Your claims, each answer's stage strip under its row; Asks you may take; and what happened lately in the projects the reader decides for (Newcomers to welcome, Landed without a decision).?project=narrows it to one project. A personal page: never kept at the edge. - Choices: one tap each, no confirm. Primary buttons, the default the outline button with "default" beside its name; 36 px in a row from 640 px, 44 px in a two-column grid on a phone. Under each, a 13 px muted consequence line written from what the platform does. After a choice the record replaces the buttons, landed green only for a choice that took effect.
- Finish: the changed files in the tree column with status letters,
+n −mand a local read mark; the diff with sticky file headers and "Mark read"; the want, verdict and choices. A maintainer who finishes it with commits of their own does so from the CLI; the page has no control for it.
Code browser (the Code tab)
- Code bar: one row under the project's header, not sticky, wrapping on a narrow screen: Files | History (a segmented control marking the view, nothing on the refs list), the revision picker (a field-bordered button reading "At main", "At v1.2.0" or "At handle/ask", with no branch mark or heading, since a tag and a fork are revisions, not branches; its list reads the refs only when it opens: main, the tags, then "Answers in claim forks", each fork as its ask in mono over its claimant and the claim's state in a word; its field finds a tag or an answer; a fork's entry opens the same page in that fork at its address,
@<handle>/<ask>, shown ashandle/askwith the fork mark; no repo is named), the revision's head commit (short SHA and subject linking the commit, then author and age; from 640 px), Go to file (t, a dialog over the paths at the revision, a match in the file's own name first) and Clone (a popover: the clone command, and the checkout of a tag or a commit, quoted when it is not one plain word; none for a fork, whose commits come with a claim). Belowcolumns, a Files button at its start opens the tree, or a commit's changed files, as a sheet. Its reads are the route's (routes/$owner/$project/-code-bar.tsx); the bar itself, infeatures/code/, reads nothing. Inside a fork every link that pins a commit (raw, the permalink, a log row, a commit's parent and files, why one step back) pins it inside the fork,@<handle>/<ask>:<sha>, so a fork's page is a permalink. - Tree:
@pierre/treesin--column-tree: Plex Sans 14 px, monochrome icons, single-child folders flattened, the current path expanded and in view; on a commit, every changed file with its status letter and+n −m. - File: a sticky file header (the path as a trail, folders muted and the file name in ink; "N lines · size · language"; Code | Why; Raw, Permalink, Copy), then the code at Pierre's metrics in its own box. The server sends plain numbered text at the same metrics, so the highlighting lands in place.
- Why: a mode of the file view: consecutive lines from one landing under a band that reads ask and answer first, SHA second.
- Commits and a commit: rows under sticky day headers; a commit's subject as Title, its status line, the body as prose, then the diff (Unified | Split from 48 rem).
- Missing path: a soft landing on the nearest folder, with the refusal's own text above it.
The docs
- Tree: every page under Guides then Reference, from
@repo/agent-kit's entries; the page being read ink at 500 witharia-current="page". - Article: the breadcrumb (Docs, its part, the page), the title at Headline, the summary at Want 400, then the page's Markdown, all held to
--measure. - On this page (
--column-docs-toc): the article'sh2s as in-page links, each to the id its heading carries, then Copy as Markdown (the page's whole Markdown) and View as .md (the page's.mdserver route), both outline buttons. Sticky beside the article fromcolumns; under it below. - Commands (Reference): every command as its synopsis (
myr <words> <positional> [--flag]), what it does, and whether it only reads, fromcommandDocs.
Visibility, policy and refs
- Ledger: the head sentence carries the facts; layers as rows (name in sealed-violet mono, readers, writers, disclosure, reason), sealed areas with root and admission, history newest first. No path, check name or file name.
- Environment: items as definition rows, sensitive first: the key in mono, the sealed lock and "sensitive", "set by ines-v" or "not set", type, required, proxy hosts. Never a value.
- Policy: maintainers by path, vouching one line per vouch, limits in tabular figures, agents, one line per layer; how to change it, in words.
- Refs: main ("moves only by a landing"), tags, and forks with their claim's state word.
Empty, pending and error states
- Empty (
EmptyState): a dashed hairline block: one sentence saying what is empty, then a link onward. - Pending: the shell and header stay; after 300 ms main shows its title over rows of skeleton (outlined bars, no shimmer).
- Not found: the trail up to what exists, a title saying what was asked for ("No such ask"),
RefusalViewverbatim, then one or two onward links. - Unreachable: "The platform did not answer.", "Try again in a minute; nothing was changed. Git and the CLI reach it directly." and Reload. Never red.
Buttons and fields
- Shape: square, UI type (14 px, 500).
- Primary: white on the sage primary (4.58:1), 32 px; hover lightens the fill. One per screen.
- Secondary: ink on the soft sage
--secondary. - Ghost: no fill until hover, then the surface; Copy and lesser actions.
- Outline: paper with a control border; the default choice.
- Fields: a 3:1 control border on paper, 32 px (36 px and 16 px text on a phone).
- Focus: the global 2 px sage outline (
--ring), 2 px out, on every control; inside a row, inside the row's box.
Navigation and keys
- Links: every link between pages is the router's (
AppLink), preloading on hover or focus; the page being read isaria-current="page". Links in running text are ink, underlined in the hairline colour, ink on hover. A skip link to#mainis the first tab stop. - Keys:
?opens the keys dialog with "Single-key shortcuts: On / Off";j/kmove through a list's rows, Enter opens;J/Kmove between files;topens Go to file andymakes the address a permalink on a Code tab page; Escape closes a sheet. No key acts in a field. Every key has a pointer twin.
Owners and imports
- Names: a project is named in full wherever a page names it,
<owner>/<name>; the owner is never dropped. A field that holds the namespace is labelled "Owner". - Words: "Import a repo" is the page at
/importand every link to it; "Imported from" heads an import's source fact. The glossary's avoided words for an import (mirror, fork of the source, sync) stay banned.
Explore
- Where:
/explore, in the site shell: one page for every reader, which the edge keeps (branchPage). It lists projects;/askslists asks. - Shape: the title and one line under it (how many public projects, and a link to every open ask), then two groups, each an h2 with a line under it and a grid of cards (one column on a phone, two from
tablet, three fromcolumns): Taking answers now (projects with an open ask) and Other projects. Each group puts the latest landing first, a project not yet landed last, and a tie by name. When no project has an open ask, the first group says so as an empty state. - Card: the full name (the owner muted, the name at 600) linking the project, its posture (
PostureBadge), its description, then under a hairline its open asks ("3 open asks", or "No open asks"), its landings ("12 landings", left out when the project has not landed or its record was not read) and when it last landed, as a day ("Last landed Oct 12, 2026"), never a span: a page the edge keeps would go stale saying "5 min ago". The description is the first paragraph of the README on main as plain text, at most 160 characters (ProjectDescription), shown at most two lines. The count of landings is the project's record's, read with the README and kept beside it until the next landing. No stars, follows, scores or activity sparklines.
The landing
- Where:
/, in the site shell (ADR 0041 amends ADR 0030's bare page). A reader who carries a session is sent to/inbox. - Hero: centred between the rails: the headline at Display, its two sentences one line each, the lede under it at Lede in muted, held to
--measure-lede; then the page's one primary action (the open asks), a size up (44 px), over the install command; then Fig 1, the music box, held to--container-figure(76rem) and centred, so the drawing keeps its detail in the wide frame (features/landing/music-box): an isometric drawing in inline SVG, in the page's own inks, of a cylinder music box under an open glass lid with the gate along its front. The cylinder ismain; the glass is everything public, a frosted panel a layer; the lit comb tooth that plays sour is an ask, its section of the comb the territory; a clip on the ruler is the claim; a strip of pins is an answer, carried along a rail under seven bridges, one per stage, cheapest first. A first answer is refused at the shape stage and drops into that stage's tray with a printed slip; a second passes every stage, the held-back stage's sealed box ringing one bell, and the press, the only thing that writes the cylinder, turns it over onto the cylinder while a paper tape prints its credit. The card is a plain card with Fig 1 and a title in its top corners, the hint and a live readout in its bottom corners, and a legend under it that names each part by its word inGLOSSARY.md. State colours appear only on a stage's flag, the held-back bell, the stray pin the shape stage refused, and the landed pin and tooth, each beside the readout's word. The server draws the still picture (the refused answer in its tray, the second landed); in the browser one loop plays the story from a pure model of time (model.ts), stops off screen, and underprefers-reduced-motionmoves only when a click or a key asks it to, straight to the next moment. The camera and solids are ported from the anatomy skill's kit (music-box/iso.ts, with its MIT notice). - Below: the seven stages in words, one column each, with a refused and a landed output beneath them, the four words, landings as they happen, and every way in (linking
/install), each a section under a rule that runs rail to rail, its head at Headline, rather than a card. Its evidence is real output, set in mono as a terminal prints it. "Landing now" lists the latest landings and refused answers across public projects, the latest first and at most six, fromrecentLandings, the platform's one bounded read of them (at most 20, kept in D1 as they happen, never a replay of a project's events). Each row is a mark, the project over the ask's want (a landing with no ask shows its short SHA), linking the landed commit or the refused ask, and when. A refusal names its tag and its area, never a held-back check's name, a suite, a lane, a path or a log.
Install
- Where:
/install, in the site shell; the old/agentsis a 301 to it, and/agents.md,/llms.txtand/llms-full.txtkeep answering. - Shape: the title and one line under it, then one card per way in, two across from
columnsand stacked below: the CLI (the install script, npm, signing in), the MCP server (Claude Code, Cursor, VS Code and stdio as tabs, every panel in the HTML), skills, text for agents (llms.txt,llms-full.txt, Markdown byAccept), git over HTTPS with the CLI as its credential helper (no SSH keys), the web (signing in), and the pi extension, planned, on a dashed border with no command. Each card says who it is for after its title, never above it. - Source: every card, snippet and link is
installChannelsin@repo/agent-kit(apps/web/test/agents.test.tsx); the page draws no command of its own. The command synopsis lives at Docs › Commands, and the endpoints and the policy's default limits at Docs › Limits and endpoints, which the text card links. The web card's sign-in link returns the reader to/install, as the top bar's does.
Theme preference
Light and dark follow the system by default. On /settings (Appearance) a reader may choose "Same as system" or "Opposite of system", each shown with what it resolves to now ("Light", "Dark") and following the system as it turns. There is no "always light" or "always dark". It lives in localStorage (theme.preference), never a cookie (a cookie would take every page out of the edge cache), and is not synced to the account (ADR 0042).
- The script: one inline script in the head (
THEME_SCRIPTinfeatures/shared/theme.ts, no imports, under 640 bytes) resolves the theme asresolveThemedoes and setsdata-theme="light"or"dark"on<html>before first paint, puts atheme-colormeta of its own, in that theme's paper, first in the head (the two the page renders, one per scheme, sit in a noscript, the fallback without the script), and runs again when the system's scheme changes or another tab writes the choice. The web sets no Content-Security-Policy on its pages; one that is added listsTHEME_SCRIPT_SOURCE, the script's hash, whichapps/web/test/theme.test.tsholds to its text. - The stylesheet: the
darkvariant readsdata-theme, and theprefers-color-schememedia query stands in only where no attribute is set (the script never ran). The dark palette is written once, under the variant, so nothing sets a colour by the system's scheme alone, anddata-theme="light"on a dark system draws the light palette.color-schemefollows the resolved theme, and Pierre's shadow roots inherit it.apps/web/test/tokens.test.tsexpands the variant with Tailwind and measures both palettes as drawn under the attribute. - The control: two radios in a fieldset, each a plain bordered row with the choice, then the theme it gives, muted, at the right. The server cannot see the system, so it names no theme until the page is up.
The platform's own pages
Sign-in (with the MCP consent), sign-up, the Google handle page, the code, add-email and reset pages, the problem page and the platform's / load nothing (no script, no web font), so they carry the sage garden palette as hex literals in their inline style, copied from apps/web/src/styles.css for both schemes: paper, card, ink, surface, muted, rule, the 3:1 control border, primary with its on-primary text, refused only for a refusal, and waiting for the marked "Warning" line in the loopback case; color-scheme: light dark. Their faces are named as the web's are, IBM Plex Sans then the system sans at 16 px and IBM Plex Mono then the system mono, so Plex shows only where the reader has it installed. This is the one place the type is not the web's, kept by design and awaiting the maintainer's sign-off: loading Plex would mean a font-src in the pages' policy and about 60 KB of font inlined in every page the Worker sends. Every page but / is the focus shell: the rails at the card's width (25rem) from 640 px, the wordmark as text from @repo/brand in the framed bar, then one card with a hairline border and a 2 px radius, no edge accent, no navigation and no eyebrow, its h1 first. The consent names the client, its publisher when known, and the host that receives access; on sign-in and sign-up it also lists what the client may do as the person, and says it never sees the password. The platform's / keeps a plain document frame.
shadcn
shadcn 4.21.2, style base-lyra on Base UI, in src/components/ui/ (generated, restyled to the tokens). The pages use its button, badge, table, textarea, tooltip, dialog and sheet, select, combobox, popover and skeleton. Overlays load after hydration in their own chunk.
Do's and Don'ts
Do:
- Do name exactly one shell per route, and read every width from its token (
max-w-site,w-(--column-about),max-w-(--measure),max-w-(--measure-page)). - Do draw rows, status lines, the fan, refusals, credit, held-back lines, posture, outcomes and stages with the shared components; change the component, not a page's copy of it.
- Do give every action a control on the page, and never a CLI command to copy.
- Do carry every state as a mark, then a word, then a colour, and key tests and styles on the
data-*attribute that names it. - Do link between pages with
AppLink, and read a list's rows in its loader so they arrive in the HTML. - Do keep text at 4.5:1, controls and borders at 3:1, every control reachable and visibly focused by keyboard, and nothing below 13 px.
- Do set the footer's wordmark from
Brand.domain, upper-cased by CSS, one line across the full width of the site and docs shells. - Do check every page at 1440, 1100 and 390 px in both schemes, and at 360 px with no horizontal scroll.
- Do honour
prefers-reduced-motion: every animation and transition drops to an instant change.
Don't:
- Don't add a global left rail, a generic right rail, or a side column that is not facts about what is on screen.
- Don't put a coloured strip, bar, notch or tab on any edge or corner of a card, row or panel: no
border-l-4-style accent, no state-coloured top rule. A card is a plain bordered surface (design-rules.test.tsxrefuses a thick edge in a state or primary colour). - Don't set an eyebrow: no small, upper-case or tracked kicker line above an h1, h2 or h3, and no component or class named eyebrow, kicker or overline.
- Don't type the brand's name or domain anywhere but
packages/brand; the footer readsBrand.domain. - Don't add a logomark; the only icon file is the repeat button emoji drawn as text.
- Don't use orange, amber or brown anywhere, or a serif.
- Don't put stat tiles, a big number over a small label, pill badges, tinted state squares, avatar stacks, sparklines or coloured file icons on any page.
- Don't colour a row's state word (Refused and Landed apart), say a posture twice on one page, or ellipsise a command.
- Don't reword a refusal or compute your own explanation of one; render
explainandheadline. - Don't show a score, a rank, a count of a person's landings or credits, or a leaderboard.
- Don't use red for anything but a refusal, violet for anything but sealed things, green for anything but on main, the sage primary for a state, or colour without a word; a diff uses its own teal and rose.
- Don't use monospace for prose, labels, buttons, headings or commit bodies.
- Don't show an env value, or the placeholder an answer sees, anywhere.
- Don't add a form for something git or the CLI does (claim, push, check, land, env set), a light/dark toggle beyond the two-way preference, a cookie for any preference, or a second component kit.
- Don't put on screen the words review, approve, PR, pull request, issue (for an ask), merge (for a landing), lease, reputation, queue, dashboard or trending. Inbox and Explore are page names now (ADR 0041). A stage keeps its name, Merge included.
- Don't use shimmer, spinners in content, page-load choreography or toasts as the only feedback.