Agent-First Design: designing for the person who asks and the agent that acts. The second half of Agent-First Development, which is about software agents can use, not agents writing code.
Preview, on npmViolet
A design token engine.
One tree holds every theme.
Violet keeps your brands, products, light and dark themes and platforms on one tree. Each one stores only what it changes and inherits the rest, so a value you change once reaches everything below it.
-
Base13 tokens
-
Atlas3 changes
-
Atlas dark8 changes
-
Atlas touch4 changes
-
-
Ledger4 changes
-
What that saves 32 values written, 64 in use.
- One source
- A theme holds its differences, not a copy. There are no files to keep in step.
- Rules on the tree
- Contrast, spacing and size rules check every change, yours or an agent's.
- Nine outputs
- CSS, Tailwind, Swift, Kotlin and five more, all written from the same tree.
Store the difference.
Inherit the rest.
A design system is rarely one theme. It is a brand, several products, light and dark, touch and pointer. Violet keeps all of them on one tree. Each node holds only what it changes, and everything else comes from the node above.
-
Inherit
Say nothing. The value comes from the parent and follows it when it changes.
-
Override
The same token with a different value, from this node down.
-
Add
A new token, for this node and everything below it.
-
Subtract
Take a token away where it doesn't belong. No hover colour on touch.
-
Reset
Drop a local change and follow the parent again.
-
Copy
Borrow a value from another branch, and keep following it.
Change it once.
Watch where it lands.
Try itPick a node, then change one of its values. Every node below follows, unless it has its own.
- Loading the tree…
- Alfred works on the tree the way you do: one command at a time, checked by the same rules. Ask him for something and his calls appear here.
- Nothing yet
“A theme is a difference, not a copy.”
Copy a theme and you maintain two. Store the difference and there is still one.
Rules the tree keeps.
Whoever makes the change.
Set a rule at the root and every node below answers to it. A designer picking a colour and an agent rewriting a theme get the same check, and the same plain message when it fails.
Checking the tree…
Six kinds of rule: contrast, range, scale, pattern, a list of allowed values and a required reference.
One tree.
Nine outputs.
Pick a node. Violet resolves the tree down to it and writes the values the way each platform expects them.
Two nodes,
side by side.
Before a review, see what actually differs: which tokens, and where each value was set.
Where the tree
goes to work.
-
In your repo
Keep each node as a DTCG file beside your code. No database and no service to run.
violet --from ./tokens -
In the terminal
Export a theme, compare up to four nodes, or run any command by name.
violet export css atlas-dark -
In CI
Check the tokens on every pull request and release them on a tag.
violet cicd setup -
In the browser
Apply a theme as custom properties and switch it at runtime. It follows the system's light, dark and high-contrast settings.
violet-runtime -
In an agent
Every command but
validateanddoctoris an MCP tool, with the same inputs and results as the terminal.violet-mcp
Start with the command line.
It reads Style Dictionary and DTCG JSON, so an existing set of tokens can become the root of a tree.
npm install --save-dev @lushly-dev/violet-cli@preview
Preview. Version 0.3.0-preview.0 is on npm under the
preview tag: the engine, the command layer, the command line, the MCP
server and the web runtime. The web editor and the Figma plugin are not released
yet.