← designauthority.seanyong.xyz
Triage is the app-agnostic, paper-and-ink UI design authority: one token source of truth, one component runtime, one enforceable lint gate. Square corners, hairline rules, ink-on-paper surfaces, two themes (light/dark), two densities, a 35-component contract matrix, and a binding interaction standard. Dependency-free: plain CSS tokens, a small behaviour layer that degrades without JS, and generated artifacts.
| ask | expected | got | resolved to | |
|---|---|---|---|---|
| pass | a primary button | RESOLVED | RESOLVED | component/btn |
| pass | an icon-only button | RESOLVED | RESOLVED | component/iconbtn |
| pass | a switch | RESOLVED | RESOLVED | component/px-sw |
| pass | a menu item | RESOLVED | RESOLVED | component/menu-item |
| pass | a nav item | RESOLVED | RESOLVED | component/nav-item |
| pass | a chip | RESOLVED | RESOLVED | component/chip |
| pass | a data table | RESOLVED | RESOLVED | component/tbl |
| pass | a version timeline | RESOLVED | RESOLVED | component/tl |
| pass | a bulk action bar | RESOLVED | RESOLVED | component/bulkbar |
| pass | a save bar | RESOLVED | RESOLVED | component/savebar |
| pass | a flash message | RESOLVED | RESOLVED | component/msg |
| pass | a banner | RESOLVED | RESOLVED | component/msg |
| pass | a tint banner | RESOLVED | RESOLVED | component/msg |
| pass | a solid banner | RESOLVED | RESOLVED | component/msg |
| pass | an informational banner | RESOLVED | RESOLVED | component/msg |
| pass | the design philosophy | RESOLVED | RESOLVED | guideline/philosophy |
| pass | the logo and brand mark | RESOLVED | RESOLVED | guideline/brand |
| pass | dark mode | RESOLVED | RESOLVED | guideline/platform |
| pass | the icon set | RESOLVED | RESOLVED | guideline/icons |
| pass | accessibility | RESOLVED | RESOLVED | guideline/accessibility |
| pass | the voice and copy rules | RESOLVED | RESOLVED | guideline/voice |
| pass | localisation and i18n | RESOLVED | RESOLVED | guideline/localisation |
| pass | a checkbox | RESOLVED | RESOLVED | component/check |
| pass | a progress bar | RESOLVED | RESOLVED | component/progress |
| pass | a chat bubble | RESOLVED | RESOLVED | component/bubble |
| pass | a proposal card | RESOLVED | RESOLVED | component/proposal |
| pass | a keycap | RESOLVED | RESOLVED | component/kbd |
| pass | a toast notification | RESOLVED | RESOLVED | component/toast2 |
| pass | a status badge | RESOLVED | RESOLVED | component/badge |
| pass | an empty state | RESOLVED | RESOLVED | component/empty |
| pass | a dialog | RESOLVED | RESOLVED | component/dlg |
| pass | a tooltip | RESOLVED | RESOLVED | component/tip |
| pass | a loading spinner | RESOLVED | RESOLVED | component/spinner |
| pass | tabs | RESOLVED | RESOLVED | component/tabs |
| pass | breadcrumbs | RESOLVED | RESOLVED | component/crumbs |
| pass | a radio group | RESOLVED | RESOLVED | component/radio |
| pass | a range slider | RESOLVED | RESOLVED | component/slider |
| pass | an autocomplete | RESOLVED | RESOLVED | component/cb |
| pass | a date picker | RESOLVED | RESOLVED | component/dp |
| pass | an accordion | RESOLVED | RESOLVED | component/acc |
| pass | a user avatar | RESOLVED | RESOLVED | component/avatar-sq |
| pass | a file dropzone | RESOLVED | RESOLVED | component/drop |
| pass | a notifications panel | RESOLVED | RESOLVED | component/notif |
| pass | a command palette | RESOLVED | RESOLVED | component/cmd |
| pass | numbered pagination | RESOLVED | RESOLVED | component/pager-num |
| pass | a diff view | RESOLVED | RESOLVED | component/diff |
| pass | a bottom sheet | RESOLVED | RESOLVED | component/sheet-end |
| pass | 404 page | RESOLVED | RESOLVED | component/page-state |
| pass | not found page | RESOLVED | RESOLVED | component/page-state |
| pass | a dashboard page | RESOLVED | RESOLVED | pattern/dashboard |
| pass | a settings page | RESOLVED | RESOLVED | pattern/settings |
| pass | the colour tokens | RESOLVED | RESOLVED | token-set/colour |
| pass | the color tokens | RESOLVED | RESOLVED | token-set/colour |
| pass | a dialogue | RESOLVED | RESOLVED | component/dlg |
| pass | the spacing scale | RESOLVED | RESOLVED | token-set/spacing |
| pass | rounded corners on the cards | CONFLICT | CONFLICT | prohibit/off-radius |
| pass | make all the buttons rounded | CONFLICT | CONFLICT | prohibit/off-radius |
| pass | a carousel | UNDEFINED | UNDEFINED | |
| pass | show the result of a form submit | COMPOSE | COMPOSE | recipe/feedback-redirect |
| pass | announce an action without navigation | COMPOSE | COMPOSE | recipe/feedback-inplace |
| pass | delete a record safely | COMPOSE | COMPOSE | recipe/entity-delete-armed |
| pass | confirm account removal | COMPOSE | COMPOSE | recipe/high-stakes-confirm |
| pass | enable or disable an entity | COMPOSE | COMPOSE | recipe/entity-toggle |
| pass | show the state of an item | COMPOSE | COMPOSE | recipe/status-with-text |
| pass | nothing to show yet | COMPOSE | COMPOSE | recipe/empty-with-cta |
| pass | select rows and act on them | COMPOSE | COMPOSE | recipe/bulk-actions |
| pass | save an editor document | COMPOSE | COMPOSE | recipe/editor-savebar |
| pass | per-row actions | COMPOSE | COMPOSE | recipe/row-actions |
| pass | screen header for a view | COMPOSE | COMPOSE | recipe/page-head |
| pass | a dialog for a small task | COMPOSE | COMPOSE | recipe/dialog-task |
| pass | a long list with pages | COMPOSE | COMPOSE | recipe/paginated-list |
| pass | copy a value to the clipboard | COMPOSE | COMPOSE | recipe/copy-value |
| pass | filter a table | COMPOSE | COMPOSE | recipe/filter-row |
| pass | assign a reviewer | COMPOSE | COMPOSE | recipe/assign-picker |
| pass | track a long running job | COMPOSE | COMPOSE | recipe/job-progress |
Ink-on-paper colour through tokens only: surfaces, text tiers, tints and line roles, one accent, a status trio (ok/warn/err) with tint and solid variants. Every token ships light and dark; compact density lives in token extensions. Raw colour values are lint errors (TDS002).
Typography is tokenised: family tokens, a single base-size (16) that the rem ladder divides by, and an fs-* design scale. Font stacks derive from family tokens; off-system fonts are lint errors (TDS008).
Spacing has a curated preferred scale (2/4/8/12/16/24/32/48) and semantic roles (page/card/field/control) emitted as --space-*; primitives consume roles by intent. Off-scale spacing is a lint warning (TDS005); fixed chrome widths live in misc.layout.
Motion is tokenised (dur-*/ease-*); off-token durations are flagged (TDS006). The system ships prefers-reduced-motion handling (spinner slows, reveal transitions collapse) instead of ignoring the user setting.
Elevation is reserved for layers that float (menus, dialogs, sheets, toasts); in-flow surfaces use hairline lines and paper tints instead of shadows. Tokenised shadow values only.
A categorical series palette derived from Okabe–Ito and contrast-adjusted, with pairwise colour-vision-deficiency separation checked. Charts consume series tokens like everything else.
Media queries in source use {bp-*} placeholders resolved from the misc.breakpoint tokens (phone/desk/wide; phone-up variants). Phone mode also swaps chrome (drawer nav, sticky bars).
The interaction standard is binding for every screen: armed two-step deletes, confirm() only for one-way actions, show-the-reverse for reversible mutations, the three-channel feedback standard (banner/toast/empty state), save bars for editors, copy rules, and an exceptions register for deliberate deviations.
Two sanctioned ways to adopt: the global path (four lines: tokens.css, base.css, optional patterns.css, components.js) styles the whole page; the scoped path wraps a region in .triage and loads scoped.css so host content is never restyled. Pair the scoped bundle with reset.css for parity; without it the host owns root sizing.
Button — from base.css. Documented states: default, hover, active, focus-visible, disabled, busy (guardApply). A11y: Use a real <button> or <a>; never a clickable div.
class .btn
· default
· hover
· active
· focus-visible
· disabled
· busy (guardApply)
Icon button — from base.css. Documented states: default, hover, active, focus-visible. A11y: aria-label is mandatory (the glyph is aria-hidden).
class .iconbtn
· default
· hover
· active
· focus-visible
Switch — from base.css. Documented states: checked, unchecked, disabled, focus-visible. A11y: The visible label wraps a real checkbox; hidden twin carries the off value.
class .px-sw
· checked
· unchecked
· disabled
· focus-visible
Menu item — from base.css. Documented states: default, hover, danger, armed, focus-visible. A11y: Destructive items use .arm-del with data-arm-label naming the object.
class .menu-item
· default
· hover
· danger
· armed
· focus-visible
Nav item — from base.css. Documented states: default, hover, active(selected), focus-visible. A11y: aria-current="page" on the active item.
class .nav-item
· default
· hover
· active(selected)
· focus-visible
Chip — from base.css. Documented states: default, hover, active(selected), focus-visible. A11y: Counts live in .n; the whole chip is the target (not just the label).
class .chip
· default
· hover
· active(selected)
· focus-visible
Index row — from patterns.css. Documented states: default, hover, active, focus-visible. A11y: 54px minimum height; one row = one destination.
class .index-row
· default
· hover
· active
· focus-visible
Table — from base.css. Documented states: default, row hover, selected, reflowed (mcards). A11y: th scope where the header is meaningful; row checkbox needs aria-label.
class .tbl
· default
· row hover
· selected
· reflowed (mcards)
Bulk bar — from base.css. Documented states: hidden, shown with selection. A11y: role=region with aria-label; count is text, not colour.
class .bulkbar
· hidden
· shown with selection
Save bar — from base.css. Documented states: sticky, keyboard-lifted (JS transform). A11y: Lifts above the mobile keyboard via keyboard-fit.js (transform), not a class toggle.
class .savebar
· sticky
· keyboard-lifted (JS transform)
Flash message — from base.css. Documented states: ok, warn, err. A11y: role=status (or role=alert for errors) on the rendered banner. Documented variants: paper (default) and ink surfaces; tint and solid styles; informational, success, warning and error kinds.
class .msg
· ok
· warn
· err
Toast — from base.css. Documented states: ok, warn, err, auto-dismiss. A11y: #toasts is aria-live=polite; one toast at a time.
class .toast2
· ok
· warn
· err
· auto-dismiss
Badge — from base.css. Documented states: neutral, ok, warn, err, acc, solid. A11y: Uppercase micro-label; never the only signal — pair with text that says the same thing.
class .badge
· neutral
· ok
· warn
· err
· acc
· solid
Empty state — from base.css. Documented states: default. A11y: h4 + one-line reason + at most one action; never a bare blank area.
class .empty
· default
Dialog (native) — from base.css. Documented states: open (showModal), backdrop, wide variant. A11y: Native <dialog> + showModal(): top layer, inert background, Escape, focus restore — do not hand-roll a focus trap.
class .dlg
· open (showModal)
· backdrop
· wide variant
Tooltip — from base.css. Documented states: hover, focus-visible. A11y: Decorative tips only; essential text must be in the DOM. Pair with aria-describedby for screen readers.
class .tip
· hover
· focus-visible
Spinner — from base.css. Documented states: spinning, reduced-motion (slowed). A11y: Indeterminate progress: keep the action label honest ('Queued…'), and slow to 1s under prefers-reduced-motion.
class .spinner
· spinning
· reduced-motion (slowed)
Field error — from base.css. Documented states: message, aria-invalid input. A11y: Focusable summary at the top + inline message per field, linked with aria-describedby; aria-invalid=true on the control (W3C ARIA21).
class .field-err
· message
· aria-invalid input
Tabs — from base.css. Documented states: selected, hover, focus-visible, overflow-scroll. A11y: tablist/tab/tabpanel roles wired by components.js with roving tabindex and Arrow/Home/End.
class .tabs
· selected
· hover
· focus-visible
· overflow-scroll
Breadcrumbs — from base.css. Documented states: default, current. A11y: nav[aria-label=Breadcrumb] wraps an ordered list; plain text + separators.
class .crumbs
· default
· current
Radio — from base.css. Documented states: checked, unchecked, focus-visible, disabled. A11y: Native input inside the label; group with fieldset/radiogroup and a shared name.
class .radio
· checked
· unchecked
· focus-visible
· disabled
Slider — from base.css. Documented states: default, focus-visible, disabled. A11y: aria-label on the range; the readout mirrors the value; keyboard steps come from the native input.
class .slider
· default
· focus-visible
· disabled
Combobox — from base.css. Documented states: closed, open, filtered, selected, multi-chips. A11y: aria-activedescendant listbox: focus stays in the input; options are filtered in place.
class .cb
· closed
· open
· filtered
· selected
· multi-chips
Date picker — from base.css. Documented states: open, today, selected, out-of-month, disabled-day, roving-focus (one tabbable cell). A11y: ISO value on the input; month/weekday names and full-date day labels via Intl (locale-aware).
class .dp
· open
· today
· selected
· out-of-month
· disabled-day
· roving-focus (one tabbable cell)
Accordion — from base.css. Documented states: closed, open, focus-visible. A11y: Native details/summary — keyboard and find-in-page work for free; group with the details name attribute for exclusivity.
class .acc
· closed
· open
· focus-visible
Avatar — from base.css. Documented states: initials, image, ink, group. A11y: Decorative avatars are aria-hidden; meaningful ones need alt/label. Groups carry an aria-label with the count.
class .avatar-sq
· initials
· image
· ink
· group
Image — from base.css. Documented states: 16:9, 4:3, 1:1, contain, caption. A11y: alt is mandatory (TDS014); the frame reserves space so loading never shifts layout.
class .img
· 16:9
· 4:3
· 1:1
· contain
· caption
Upload / dropzone — from base.css. Documented states: idle, dragover, focus-visible, file-list. A11y: role=button + Enter/Space; announces files with name and size; removal is a labelled button.
class .drop
· idle
· dragover
· focus-visible
· file-list
Notifications — from base.css. Documented states: unread, read, empty, mark-all. A11y: The summary's accessible name carries the unread count; unread uses background + a dot, never colour alone.
class .notif
· unread
· read
· empty
· mark-all
Command palette — from base.css. Documented states: closed, open, filtered, active-item, empty. A11y: Native dialog; Arrow/Enter/Escape inside, cmd/ctrl+K opens; items are buttons with listbox roles.
class .cmd
· closed
· open
· filtered
· active-item
· empty
Full-page state — from base.css. Documented states: 404, 500, 403, offline, maintenance. A11y: One h2 per page state; the code is secondary; actions are the only focusable elements.
class .page-state
· 404
· 500
· 403
· offline
· maintenance
Numbered pagination — from base.css. Documented states: first, middle, current, gap, disabled. A11y: aria-current marks the active page; range labels on prev/next; page-size select is labelled.
class .pager-num
· first
· middle
· current
· gap
· disabled
Timeline — from base.css. Documented states: default, status-dots. A11y: Ordered list; dots are decorative (the text carries the meaning).
class .tl
· default
· status-dots
Diff — from base.css. Documented states: context, added, removed, empty. A11y: role=table with labelled columns; +/- expressed as background tints plus repeated line numbers.
class .diff
· context
· added
· removed
· empty
Sheet dialog — from base.css. Documented states: side, bottom. A11y: Same native-dialog contract as .dlg (top layer, Escape, focus restore); data-dlg-static still blocks backdrop close.
class .sheet-end
· side
· bottom
Provenance record — from base.css. Documented states: default, explanation folded/expanded (<details>). A11y: The eight required fields stay visible without expanding the transcript.
class .prov
· default
· explanation folded/expanded (<details>)
Select (native) — from base.css. Documented states: default, focus, disabled. A11y: Native single-select for small fixed option sets; the .select class is for explicit citation and is styled identically to the bare element.
class .select
· default
· focus
· disabled
Status first, attention second: system strip, hero metrics, stacked feed, filings and activity.
Two-column detail: plain/HTML body and queue controls left, sticky metadata and audit right.
Task sections with a sticky side nav, scoped setting-row forms and per-card save bars.
The rule/flow builder: nodes, connectors with insert points, smart condition rows and live summary.
Dry-run report: draft controls, per-stage decision trail, proposed actions and a plain-English verdict.
The learning loop: step rail, evidence folds, model cards and promotion prerequisites.
Two small page patterns: the phone overflow index and blind-label review.
Four levels of conformance — static (shipped), behavioural (partial), rendered and product (proposed) — with the traceability contract: every conformance claim cites its rule id, implementation location and evidence; a lint score is a gate, never evidence. Coverage is declared per component.
Triage is a paper-and-ink interface language for tools that do real work on real data: one light paper (#fafafa), one ink layer, one accent, square geometry, and every machine action auditable. Depth is not faked with blur or gradient; only things that genuinely float cast shadows. Black ink is a material, not a theme; colour always means meaning, never decoration. Enforced by tokens and the spec, not just words.
One source of truth: Triage themes from tokens/tokens.json (W3C DTCG) and the core stylesheets carry no :root, so a re-theme is one JSON edit plus a rebuild. Two token tiers (semantic aliases over the raw palette — products prefer the alias column). The mark is a 24x24 ink square with an accent chip on the leading edge; lockups, favicon and templates ship in brand/. Never theme by overriding components.
One token file, four platform modes: dark theme, Windows High Contrast (forced-colors), RTL and print - all handled from the token layer and logical properties, no second stylesheet, no per-component overrides. In the dark theme surfaces rise instead of casting shadows.
A transferable icon system - 174 glyphs, one spec. The registry is the Lucide set (ISC licence) normalised to the Triage drawing spec: 24x24 grid, fill:none, stroke:currentColor, stroke-width 1.7, round caps and joins. Ship it as a sprite (icons/sprite.svg), individual SVGs (icons/svg/*.svg), or a registry (icons/icons.json); original mail-triage names survive as aliases.
WCAG 2.2 scorecard against the source audit: focus visible, focus not obscured, non-text contrast, target size, contrast, animation, forced colours, resize and reflow pass; focus appearance partial. The ring is global - :focus-visible is never removed anywhere; inputs add a border and ring. Reduced motion is honoured.
Sentence case for buttons, links and menu items (uppercase micro-labels are CSS). Verbs are Enable/Disable for entity state. Announce every mutation in past tense, naming the object. Three flash kinds only - ok, warn, err; info is retired. Name the object in destructive labels. Empty states: title + one-line reason + at most one action. One-way actions keep a native confirm().
RTL is mechanics; i18n is content. The system ships the mechanics - logical properties (TDS013), auto-mirroring chips/drawers/tooltips and core/i18n.js for locale, messages and formats. Content rules: whole-message placeholders (never concatenate sentences), counts through plural(), store ISO and display via Intl, room for extra width (German ~35%), bidi hygiene with <bdi> for embedded identifiers.
A real checkbox wrapped in label.check; forms post a hidden twin (value 0) so a missing key cannot silently mean off. Grouped checkboxes live in a fieldset with a legend.
class .check
A 7px square status dot; neutral by default, with ok / warn / err variants paired with text (never colour alone).
class .dot
A monospace keycap with a 2px base edge, for keyboard hints such as shortcuts.
class .kbd
An ink panel carrying one number and its label - the dashboard hero metric.
class .stat
A two-column metadata grid (label -> value) for detail panes and sidebars.
class .kv
A 6px progress bar with an inline variant (.progress-inline) for rows and tasks; pair with text so state never relies on the bar alone.
class .progress
An animated shimmer placeholder shown while content loads.
class .skeleton
An ink terminal panel for logs and streamed output; rows colour by kind (green / amber / red / dim / time).
class .logpanel
Audit trail rows - the flat list of machine and human actions with time, actor and detail columns; the provenance surface for accountable actions.
class .audit-list
A chat message turn (max-width 75%); user and model turns differ by surface, not by colour alone.
class .bubble
The message input card at the foot of a chat: input, send, and any attachments.
class .composer
The one visual contract for every AI action that needs review: proposal text, evidence and review actions.
class .proposal
The absolute popover anchored to a trigger; shadows mark it as floating.
class .menu-pop
The fixed backdrop behind drawers, sheets and dialogs.
class .scrim
The persistent phone tab bar, with view transitions between tabs.
class .bottom-nav
The slim fixed side panel (46px) for persistent auxiliary tools; opens on demand.
class .dock
The tablet and phone chrome header (menu, title, theme and density toggles, status); hidden on desktop where the sidebar carries the brand.
class .topbar
The title row at the top of a page: title, description and actions.
class .page-head
The inline segmented selector for mutually exclusive views.
class .seg
The two-step, in-place destructive control: the first click arms, the second confirms. No dialog; native confirm() stays reserved for irreversible actions.
class .arm-del
The page skeleton: sidebar, main column and content frame (.app / .side / .main), with the shell contract on /components/navigation.
class .app
Deleting an entity listed in the UI is a two-step, in-place action with auto-disarm; no confirm() dialogs for these.
Irreversible, security-relevant, or multi-item actions keep a native confirm() whose sentence names the object and consequence.
Status and meaning are carried by text or icon as well as colour; charts must survive greyscale and colour-blindness.
One element, one token and one job per level: page title → section heading → card heading → body → meta. Don't skip levels.
Use the shared cp() helper / .copy element; the helper owns fallback and confirmation labelling.
Uses a pre-Triage (mail-triage era) class, id or global instead of the renamed vocabulary.
fix: Rename via /RENAME-MAP.md (or run: python3 tools/assemble_from_pack.py --apply-map <files>).
A colour literal appears where a token exists (palette match = error) or that is not in the palette (off-system colour = warning).
fix: Use var(--token) (prefer semantic aliases: --surface-*, --text-*, --status-*) or add the colour to tokens.json.
A non-zero border-radius (CSS property or JS style key).
fix: Remove the radius, or fork the system deliberately by changing the token and deleting the global rule.
outline:none / outline:0 without a visible focus replacement in the same rule.
fix: Keep the global ring, or provide :focus-visible with a 2px+ ring or a compensating box-shadow/border change.
Margin/padding/gap/inset px values outside the normalised spacing scale.
fix: Snap to the nearest scale value or extend the scale in tokens.json deliberately.
Transition/animation duration not in the motion token set.
fix: Use a motion duration token value (100/120/150/180/200/240/250/280/400ms).
z-index outside the documented ladder.
fix: Use a ladder value or extend misc.zindex in tokens.json.
font-family declaration not using Geist / Geist Mono (or inherit).
fix: Use the system stacks (or var(--mono)), or change the token in tokens.json for a deliberate rebrand.
A project stylesheet redefines a Triage custom property (--bg, --acc, --surface-* …).
fix: Edit tokens/tokens.json and regenerate, or use a distinct non-system variable name for local values.
A class used in markup that core.css / patterns.css do not define (opt-in, may be a project class).
fix: Use a system class, or allowlist the project class in .triagerc.json.
A defined token pair fails WCAG contrast (4.5:1 text / 3:1 non-text).
fix: Adjust the token value(s) so the pair meets the threshold, or extend .triagerc.json contrastPairs for intentional exceptions.
A product stylesheet consumes a primitive token directly where a semantic alias exists.
fix: Use the alias (e.g. var(--surface-card) instead of var(--card)). Definitions inside tokens.css are exempt.
Physical direction property (margin-left, left:, text-align:left …) instead of logical properties.
fix: Use margin-inline-start/end, padding-inline-*, border-inline-*, inset-inline-*, text-align:start/end.
<img> without an alt attribute.
fix: Add alt with a description, or alt="" when the image is decorative.
Interactive element with no accessible name (empty button/link, no aria-label), or a positive tabindex.
fix: Add text or aria-label; never use tabindex > 0.
Label-role class (.badge, .nav-label, .cmd-group) set below the comfortable label target (13px at the 16px root).
fix: Use the system token (--fs-badge / --fs-nav-label) or set the label role to 13px+ (0.8125rem+).
Item deletes are armed and two-step: the control arms first (label names the object), the second activation deletes; Escape and outside click disarm.
fix: Use .arm-del with data-arm-label; disarm on Escape/outside click/details close.
One-way / high-stakes actions use confirm() naming the object; reversible mutations instead show their reverse ('Shown as deleted · Undo').
fix: confirm() for irreversible; a visible reverse action for reversible mutations.
Feedback uses the three sanctioned channels only: banner (persistent page/section state), toast (transient confirmation), empty state (structural absence) — plus in-flight treatments for long actions.
fix: Map each message to banner / toast / empty state; use the in-flight pattern for queued work.
Editors and settings keep a sticky save bar with explicit unsaved-changes state; save bars apply per card in settings patterns.
fix: Add .savebar with its unsaved/dirty state; scope per card where sections save independently.
Raw colour literals (hex/rgb/hsl) outside the token layer — colour arrives only via tokens (lint TDS002).
signals: hex colour, raw hex, rgb(, hsl(, hard-coded colour
Removing focus outlines without replacement — :focus-visible affordances are mandatory (lint TDS004).
signals: outline none, remove focus ring, focus removed
Overriding token values downstream (the token layer is the only place values change; lint TDS009).
signals: override token, redefine variable, patch css variable
Fonts outside the system stack — family tokens own typefaces (lint TDS008).
signals: custom font, webfont, google font, font import
Non-zero corner radius — the system is squarely squared; radius stays 0 (lint TDS003).
signals: rounded, rounded corners, rounded card, corner radius, border radius, border-radius, pill shape
Interactive controls without accessible names — icon-only means aria-label, never a bare glyph (lint TDS015).
signals: unlabeled, icon only, no aria label, mystery icon
Every component degrades to its plain markup; the behaviour layer (components.js) is additive. Without JS, interactive widgets show their static forms (tabs stack, menus remain details/summary, file inputs remain native).
scope: javascript, no-js, degradation
Drop Triage into an existing product without restyling it: wrap the region in .triage and load core/scoped.css (rules live in @scope(.triage) under @layer triage.components). Font-faces and keyframes stay global. Without core/reset.css the host owns root sizing and typography.
scope: integration, scoped, adoption, host page
The system honours prefers-reduced-motion: spinners slow to the slow duration and reveal transitions collapse. Motion tokens stay the single source for durations either way.
scope: motion, accessibility, reduced motion
Actions that are irreversible, security-relevant, or affect more than the clicked item keep a native confirm() whose sentence names the object and the consequence (INTERACTION.md, one-way set). Arming cannot carry the consequence; this is the sanctioned stop, and never a substitute for the armed pattern on ordinary entity deletes.
scope: danger, high stakes, confirm, one-way, irreversible
After a server round-trip / redirect, announce the outcome with a .msg banner at the top of the content.
· redirect flows only; in-place actions use the toast host
· kinds exactly ok|warn|err
· past tense and name the object
JS/fetch actions announce via toast() from the shared host; one toast at a time.
· host it once per page (toasts aria-live)
· no page-local toast markup, no query-param toasts
Deleting a listed entity (rule, flow, classifier, template, chat, record) is a two-step armed action; never a confirm() dialog.
· first activation arms, second deletes
· auto-disarm 4s / Escape / outside click
· announce the result afterwards
Irreversible, security-relevant, or multi-item actions confirm with a sentence naming the object and consequence.
· native confirm() on the form; sentence names object + consequence
· the listed set plus reason-bearing reject/decline decisions
· when the rationale must be recorded, pair the confirm with a required, labelled textarea (native control); the reason surfaces in the history (component/tl)
Every boolean enable/disable of an entity uses .px-sw; verbs are Enable/Disable; the route announces the new state.
· verbs Enable / Disable only (never Pause/Resume or On/Off)
· auto-submit announces
State of an item is shown with a compact label/cell plus text (or icon); colour alone is prohibited.
· pair colour with text or an icon
· one status treatment per row cell
Any list or card with nothing to show gets title + one line of reason + at most one CTA.
· never a bare blank area or a bare 'failed'
· specific reason + one recovery action
Batch operations on selected rows appear in .bulkbar only with a selection; triggers in .tactions.
· appears only with a selection
· announce the count/result afterwards
Editors (forms that configure something) end in .savebar with primary Save plus Cancel; Cancel is the way out.
· Server-side validation renders at the top of the form and receives focus
· settings cards keep scoped partial saves
Record actions appear on hover/focus with .ra-inline for the key few and a details.menu for the rest; touch shows the menu.
· sentence case; destructive item is menu-item danger arm-del
· every .rowacts ships both variants
Page title + one-line description + actions; hierarchy levels are not skipped.
· don't shrink a page title to fit a long subject; let it wrap
· section headings and card headings mark different scopes
Popups/modals are built on the native dialog element (.dlg), with static-backdrop when closing must be deliberate.
· autofocus the first meaningful control
· Esc/backdrop behavior deliberate
Long result sets page with the numbered pager plus page-size control; phone view trims chrome.
·
Copy-to-clipboard goes through cp()/.copy so fallback and labelling stay consistent.
· never call navigator.clipboard from page code
Narrow a list with a row of chips above the table; chips are selection tokens, not status badges.
· chips mark selection, badges mark status — do not conflate
· active filters stay visible with a clear affordance
A labelled single-select (native select) beside one assign action; the outcome announces the new assignee by name.
· native select for small fixed sets; component/cb only when the set is large or needs filtering
· the control is always labelled and the submit announces the new value by name
· if the assign is handled in place (fetch), the outcome uses recipe/feedback-inplace instead of the redirect banner
· degrades without JS
Compose the progress bar with a state badge, a scanned/total readout and text for queued/running/stalled/failed/done; failures name the reason and offer retry; updates arrive by JSON polling.
· state is always text + colour (recipe/status-with-text)
· queued and done are labelled states too (same text+colour treatment; a completed bar is not left unlabelled)
· stalled is detected by the count not advancing and shown as a text label
· failed names the reason and offers a retry action
· aria-valuenow updates on the bar; state changes are announced via an aria-live region on the status line (or the shared toast host)
· poll JSON; no page reloads
A ready-to-send brief for coding agents building on this pack. Source: authorities/triage/AGENT-PROMPT.md
# Implementing with the Triage authority — a prompt for coding agents
You are building an interface with the **Triage design authority** (`packs/triage`,
v0.13.0-rc1) — the app-agnostic, paper-and-ink UI system with one token source, one
component runtime, and one enforceable lint gate. This prompt is for *consuming*
the authority in a product build. (Working *inside* the triage repository itself
is governed by its own `AGENTS.md`.)
Paste everything below into the agent's context before it writes UI.
---
## The brief
Build the requested screens using the Triage design authority at `packs/triage`.
Do not invent visual decisions the authority already records, and do not silently
skip ones it does not.
## How to work (the consumption protocol)
1. **Resolve before you design.** For every element you need, ask the authority
first and follow its answer:
```
python3 tools/da.py --pack packs/triage resolve "a primary button" --json
python3 tools/da.py --pack packs/triage resolve "a settings page" --json
```
Outcomes:
- `RESOLVED` → build exactly what the cited record defines (states, class,
a11y notes included).
- `CONFLICT` (e.g. asking for rounded corners) → do **not** build it as asked;
use the sanctioned alternative the answer names.
- `FALLBACK` → build the documented fallback variant.
- `UNDEFINED` → build in the system's character, then follow step 3.
2. **Load the system the sanctioned way** (global path):
```html
<link rel="stylesheet" href="tokens/tokens.css">
<link rel="stylesheet" href="core/base.css">
<link rel="stylesheet" href="core/patterns.css"> <!-- if you use page patterns -->
<script src="core/components.js" defer></script>
```
Or the scoped path (`.triage` wrapper + `core/scoped.css` + `core/reset.css`)
when embedding into a host page — see `guideline/consumption`.
3. **Mark what is not covered.** When the authority is silent (`UNDEFINED`),
build the closest in-character thing, mark the spot in the DOM, and file a
gap record. Never present improvisation as canon.
4. **Verify before you claim done.** Render the result and check it: the
verifier inspects the artifact, not your summary. Run the pack's golden set
and any project verification before reporting.
## House rules that must survive your build
- **Tokens only.** No raw hex/rgb/hsl, no off-scale spacing, no ad-hoc
durations. Values change in `tokens/tokens.json` and nowhere else
(TDS002 / TDS005 / TDS006 / TDS009).
- **Squarely squared.** Corner radius stays 0; any rounded request is a
`CONFLICT` (TDS003 / `prohibit/off-radius`).
- **Focus always visible.** Never remove focus outlines; `:focus-visible`
affordances are mandatory (TDS004).
- **System fonts only** (TDS008) and **every control has an accessible name** —
icon-only means `aria-label` (TDS015, TDS014 for images).
- **Destructive actions are never one-click.** Armed two-step delete, or
`confirm()` for one-way actions (INT001 / INT002).
- **Feedback uses the three sanctioned channels** — banner / toast / empty
state — nothing ad hoc (INT003).
- **Editors keep a save bar** with explicit unsaved state (INT004).
- **Degrade without JS.** Every component must work as plain markup; the
behaviour layer is additive (`fallback/no-js`).
## What good output looks like
- Components instantiated with their documented classes and states (check each
`component/*` record for the exact `class`, `states`, `verify` selectors and
`a11y` notes).
- Layouts composed from the sanctioned patterns (`pattern/dashboard`,
`pattern/viewer`, `pattern/settings`, …) rather than invented shells.
- A short build note listing: every ask you resolved (with outcome), every
improvisation you marked, every gap you filed.
## Quick reference (most-used records)
| Need | Resolves to |
|---|---|
| button / cta | `component/btn` |
| switch / toggle | `component/px-sw` |
| table | `component/tbl` |
| dialog / modal | `component/dlg` (native dialog) |
| toast / flash | `component/toast2` / `component/msg` |
| empty state | `component/empty` |
| date picker / combobox | `component/dp` / `component/cb` |
| command palette | `component/cmd` |
| dashboard / settings / detail page | `pattern/*` |
| colour / spacing / type tokens | `token-set/*` |
The full catalogue: `packs/triage/artifacts.json` (51 records), the enforceable
rules: `packs/triage/rules.json` (TDS001–TDS015 + INT001–INT004), the
conformance questions: `packs/triage/golden.json` (36 cases, all passing).