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
- Read two presetsOpen two existing entries in
presets.tsbefore writing one. They are the worked examples of when an override is warranted. - Set every leverOne entry in
THEME_PRESETS. TheThemePresettype 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. - Write the taglineOne sentence in
THEME_TAGLINESon the theme’s character, shown on its specimen page. The gate fails a theme without one. - Place it in the rowAdd 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. - Generate the stylesheetThe 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.
- Pass the gateEvery 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_GAPSneeds the owner’s sign-off. - Write its DESIGN.mdA 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.
- Look at itPick 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.
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.
| Part | Comes from | Kind |
|---|---|---|
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 |