Concepts
Decisions
Decisions are the tokens your theme defines and the reasons written beside them. Plumber reads them through your own Tailwind and judges values against them.
Write the reason beside the token
Put a /* why: … */ comment directly before a token, and Plumber keeps it with that token. When a value drifts, the tokens Plumber offers come with those reasons, so whoever fixes it can tell which one is meant for the job.
@theme {
/* why: Related items use eight pixels. */
--spacing-related: 8px;
}
How reasons are handled:
- They're optional. A token with no reason still counts, and is listed with no reason.
- One sentence is kept. A long reason is cut to its most relevant sentence, at most 100 characters.
- A reason shared by more than three tokens becomes a reason for the group, and isn't shown against each token. Write reasons that tell a token from the ones beside it.
- Aliases don't inherit. If
--color-primarypoints at--primary, the reason on--primarystays there. Write it where the token is declared.
Where decisions come from
Plumber collects tokens from these sources, in this order. When two define the same token, the later one wins.
- Presets it finds in your project, such as shadcn's, or ones you configure.
- Your Tailwind v4 theme, read through the Tailwind you have installed, with each token's place in your CSS.
- Variables on
:rootorhtmlin your CSS, for any family your config doesn't already cover. decisions.<family>.frominplumber.config.ts: theme selectors such as'theme:--radius-*', CSS file globs, DTCG token JSON (where$descriptionis the reason), or a function that returns the tokens.
In a Tailwind theme, each family has its own namespaces:
| Family | Tokens |
|---|---|
| Spacing | --spacing-* |
| Colour | --color-* |
| Radius | --radius-* |
| Type | --text-*, --font-*, --leading-*, --tracking-* |
| Motion | --duration-*, --ease-*, --animate-* |
| Elevation | --shadow-*, --inset-shadow-*, --drop-shadow-* |
| Z-index | --z-* |
Tokens with other names are sorted into families by their value, their uses and their name. plumber decisions says how each one was read.
See what Plumber read
npx plumber decisions # every token, its value, origin and reason
npx plumber decisions --family spacing # one family
npx plumber decisions --json # the same, for scripts
A token listed with why: (none) has no reason yet.
When your decisions change
Once your project has a ledger, a new token, or a changed value, is an error in plumber check until someone accepts it:
npx plumber accept-decisions
That records the current decisions in the ledger, so that a change to your tokens is reviewed like any other change. Editing only a reason doesn't need it. A token that disappears is a warning; after reviewing the removal, npx plumber ledger --prune clears it.