System

new-preset

A complete theme behind one attribute

The new-preset skill adds a theme, not a tint: every lever holds a saved position, and the completeness gate refuses one that is missing or fails AA. Below are the steps, then one real preset traced from its entry to every place it can be picked. The full skill file is on Skills.

The steps

  1. Read two presets
    Open two existing entries in presets.ts before writing one. They are the worked examples of when an override is warranted.
  2. Makes the preset entrySet every lever
    One entry in THEME_PRESETS. The ThemePreset type is the checklist: the action key, the neutral tint, corners, density, type, motion, elevation, weights, icons, tones, faces and the six accents. Each one is a decision, even when it lands on the shipped position.
  3. Makes the taglineWrite the tagline
    One sentence in THEME_TAGLINES on the theme’s character, shown on its specimen page. The gate fails a theme without one.
  4. Place it in the row
    Add the id to HUE_ORDER. Every picker walks the order derived from it, so there is nothing else to wire. Making it the served theme is a separate call for the owner.
  5. Makes the stylesheetGenerate the stylesheet
    The generator writes the preset’s data-brand stylesheet and refreshes the aggregate that imports them all. A face no preset has shipped before needs its font files fetched by hand first.
  6. Pass the gate
    Every action fill is checked against what components draw on it, resting, hover and pressed, in both themes. A failure moves the key or an override. Pinning a gap in SANCTIONED_AA_GAPS needs the owner’s sign-off.
  7. Makes the DESIGN.mdWrite its DESIGN.md
    A generator writes the theme’s own DESIGN.md, and a validator reads it back through the playground’s importer to prove it lands on the same levers.
  8. Look at it
    Pick the theme on the home page and walk a component page, a chart and the chat in light and dark, then its specimen page. The gate proves every token resolves. Only a person can say the look holds together.

Forest, end to end

The forest preset is one entry in website/src/lib/theme/presets.ts. Its action key is dark enough that one key serves both themes, so it declares no separate dark key and moves a single role in dark mode, the up-trend colour. It passes the gate with nothing pinned. presetOverrides turns the entry into tokens for each theme, and the generators write src/tokens/presets/forest.css and website/public/themes/forest/DESIGN.md from it.

1 · Declared oncewritten by hand
2 · Checked and composedbefore every build
3 · Generatednever edited by hand
4 · Where people pick itone data-brand attribute
Forest entryTHEME_PRESETS in website/src/lib/theme/presets.ts
TaglineTHEME_TAGLINES, one sentence
Place in the rowHUE_ORDER, read by every picker
Font filessrc/fonts/presets/, synced by hand
Completeness gatevalidate-theme-presets.mjs · AA in every state
Export checkvalidate-theme-export.mjs
presetOverrideslevers to tokens, light and dark
Stylesheet generatorgenerate-preset-stylesheets.mjs
DESIGN.md generatorgenerate-theme-design-md.mjs
shadcn base itemwebsite/public/r/base.json
forest.csssrc/tokens/presets/ · byte-compared
presets.cssimports every preset stylesheet
Theme DESIGN.mdwebsite/public/themes/forest/
npmrift-ds/tokens/presets/forest.css
StorybookTheme toolbar
Home and headertile row · theme switcher
Playgroundpreset picker
Specimen page/foundations/themes/forest
checked before it shipsat releaseimported whole
Declared once, checked before every build, offered wherever a theme is picked.

By hand or generated

Only the entry is written by hand, and the font files are fetched by hand. A hand edit to the stylesheet fails its byte compare on the next build.

Where each part of Forest comes from
PartComes fromKind
Entry, tagline, place in the row
presets.ts, edited by the agent
By hand
Font files
sync-preset-fonts.mjs, run once for a new face
By hand
forest.css and presets.css
generate-preset-stylesheets.mjs
Generated
shadcn base item
generate-shadcn-registry.mjs
Generated
Theme DESIGN.md
generate-theme-design-md.mjs
Generated
Specimen page
One route per id in the selector order
Generated