Agent-First Design / Violet

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 npm

Violet

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.

One treeFive themes
  • 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.
Fig. 01The idea

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.

  1. Inherit

    Say nothing. The value comes from the parent and follows it when it changes.

  2. Override

    The same token with a different value, from this node down.

  3. Add

    A new token, for this node and everything below it.

  4. Subtract

    Take a token away where it doesn't belong. No hover colour on touch.

  5. Reset

    Drop a local change and follow the parent again.

  6. Copy

    Borrow a value from another branch, and keep following it.

Fig. 02The tree

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.

Five nodes, one source
  • Loading the tree…
Ask Alfred An agent, using the same commands
  1. 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.
Commands run
  1. Nothing yet
Fig. 03In one line

“A theme is a difference, not a copy.”

Copy a theme and you maintain two. Store the difference and there is still one.

Fig. 04The rules

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.

Live from the tree above

Checking the tree…

    Six kinds of rule: contrast, range, scale, pattern, a list of allowed values and a required reference.

    Fig. 05The output

    One tree.
    Nine outputs.

    Pick a node. Violet resolves the tree down to it and writes the values the way each platform expects them.

    Node
    Format
    Fig. 06The review

    Two nodes,
    side by side.

    Before a review, see what actually differs: which tokens, and where each value was set.

    Fig. 07The work

    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 validate and doctor is 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

    Status

    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.