Design Systems Token Vitals

Auditing what Discourse, the open source platform the community runs on, actually does in code, so a visual overhaul lands everywhere at once

SKILL.md

design-token-vitalsGrades a front end’s design token layer, reports what it cannot prove, and ranks the fixes into a next move.

Company
Raptive
Role
Staff Product Designer
Duration
Q3-Q4 2026
Scope
Token audit, semantic contract, and migration roadmap for Raptive Community
Platform
Raptive Community, a Discourse app built on Rails and Ember
Team
Sole designer, partnered with Product Management and Platform Engineering

Three results, one for each goal.

479See what we haveToken decisions, each traced to its files
4 namesFind why consistency breaksFor one white, and one button pulls 26 tokens
Buttons firstMigrate safelyAn order from measured use: 8.7% of all token use

Not a consistency problem. A visibility problem: nobody could say which components a design change would reach until it shipped.

The platform’s code dates from 2013, before design tokens existed. Values had drifted across the platform, Raptive’s plugins and two style systems. Then a rebrand was scheduled, and it had to land everywhere at once.

Three goals:

  1. See what we have. Which tokens are real decisions, which are copies, and which nothing uses.
  2. Find why consistency breaks. Why some components ignore a changed value.
  3. Migrate safely. Which components move first, and why that order.
01

A scanner reads the real code and grades what it finds.

It follows every Sass and CSS import, separates Raptive’s code from the platform’s, merges duplicate definitions into one entry per decision and traces each to its files. It is open source: Design Token Vitals.

479Token decisionsOne entry per decision, duplicates merged
105Components that use tokensAcross 354 component and style files
36.7%Of all uses, from five tokensConcentrated, so an order is possible
189Hard-coded colors26 match a token exactly; 163 have none
02Vital · Single source

White appears 76 times across 20 files, under four names. The brand purple too.

Renaming one leaves the others untouched. The values match; whether they mean the same thing is a person’s call, so the scanner flags them and never merges them.

#ffffff76 occurrences across 20 files
  • --background-inverse
  • --google
  • --mobile-background
  • --mobile-secondary
#6B64FF
  • --brand-primary
  • --icon-brand-primary
  • --mobile-primary-blue
  • --raptive-primary-blue
03Vital · Tier integrity

The button pulls 26 tokens, 74 times, from more than one file.

Some read the named layer, some skip to the raw color, some read a mobile override. Of 369 rules that paint a button, 12 say enough to draw it. That is why “change the button color” was never a one-line job.

Twelve highest-confidence button records, each rendered from its own CSS rule with its selector, geometry, tokens, and source file and line
The twelve rules that say enough to draw a button. No two agree on fill, corner or type.
04

87 components, ranked by the share of screens each one changes.

Desktop and mobile count as one screen. The button leads in code, at 8.7% of all token use, but appears on 22% of screens. The top navigation reaches 88%.

Atoms

Foundational controls and visual primitives.

  • Button22%
  • Form field16%
  • Validation message16%
  • Avatar9%
  • Badge9%
  • Search field9%
  • Select / picker9%
  • Selection control9%
Molecules

Small functional groups built from atoms.

  • Filter controls34%
  • Reaction bar19%
  • Author row16%
  • Action group13%
  • Feed tabs13%
  • Profile tabs9%
  • Data visualization6%
  • Metric card6%
Organisms

Reusable interface regions and complex modules.

  • Top navigation88%
  • Bottom nav30%
  • Composer16%
  • Activity list13%
  • Post card13%
  • Sidebar11%
  • Admin navigation9%
  • Review nav9%
A detail from the platform audit board showing ten member-facing surfaces (Feed, Latest, For you, Categories, Community hot, Community latest, Topic, Tags, Search and Groups), each captured at desktop and mobile, annotated with the components it uses, and with those components isolated beneath it
Ten of the 32 surfaces, each at both screen sizes, marked up with the components it uses.
05

Eight vitals. Four say “no evidence yet” instead of inventing a score.

A hatched track is a reading not taken, never a zero.

  • Naming coherenceFour naming styles are in use where there should be one.fail
  • Tier integritySome components skip the named token and use the raw value underneath.attention
  • Coverage14 of 19 token groups were checked. Five were never measured.attention
  • Single sourceThe same value answers to several different names.attention
  • Leakage26 hard-coded colors match a token exactly; 163 more have no token at all.blocked
  • Mode completenessThe built light and dark themes have never been checked.blocked
  • OrphansWhich tokens nothing uses is still unknown.blocked
  • EnforcementNothing in the build stops a hard-coded value getting in.blocked
06

One set of decisions, built natively in React and in the platform. Every format is generated from it.

CSS variables, Sass and Figma JSON all come from the one contract, so the two builds cannot drift again. The combined library is drafted: 909 tokens in 14 groups, not yet in production.

Button / Primary
  background        action.primary
  foreground        text.on-action
  height            size.control.medium
  padding-inline    space.md
  radius            radius.control
  focus-ring        focus
  states            default · hover · pressed
                    focus · disabled · loading

A rebrand with an order, not a guess.

GoalBeforeAfter
See what we haveSearch 21 files, guess what a change reaches, ship and find out.105 components ranked, with the file and line of every use.
Find why consistency breaksA change reaches some components and not others, found in QA or after launch.Components read one named layer, so a change spreads for one reason instead of four.
Migrate safelyAn order set by whoever asks loudest.Buttons, type, spacing, color, then modes and accessibility, in measured order.

Proven

  • 26 hard-coded colors that match a token and 163 that do not, each found at its file and line
  • DM Sans and 17 brand colors confirmed from the real files, not from a spec
  • A migration order based on measured use rather than on preference

Still open

  • The built light and dark themes have not been checked yet
  • Nothing in the build stops a hard-coded value getting in
  • Whether those 163 values actually mean the same thing still needs a person to decide
  • 70 tokens are still unsorted
  • Whether this makes teams faster is unmeasured; the starting point is being recorded during rollout

None of this is specific to Raptive. The scanner reads any Sass and CSS front end, and the order needs no tool: measure the code, rank by evidence, write down what is unproven.

SKILL.md

design-token-vitalsGrades a front end’s design token layer, reports what it cannot prove, and ranks the fixes into a next move.