Book a callGitHub224

Reference03/09

The files it writes

Updated · Suggest a change

OpenDesigner writes your design system into your own project as plain files. DESIGN.md and PRODUCT.md go at the root, and everything else goes in an opendesigner/ folder. The token files there are the source of truth, and every other file is made from them.

your-project/
1DESIGN.md your rules in plain words
1PRODUCT.md what it is, who it is for, where it runs
opendesigner/
2tokens/ 11 DTCG files, the source of truth
primitives.tokens.json semantic.tokens.json semantic.color.light.tokens.json semantic.color.dark.tokens.json semantic.density.spacious.tokens.json semantic.density.comfortable.tokens.json semantic.density.compact.tokens.json motion.standard.tokens.json motion.reduced.tokens.json opendesigner.resolver.json opendesigner.meta.json
3build/ the exports, rewritten by every build
css/tokens.css tailwind/theme.css figma/variables.json · figma/import/ paper/tokens.json · tokens.light.css · tokens.dark.css swift/DesignTokens.swift compose/DesignTokens.kt dtcg/ artifact/project/ brand/index.html · brand/assets/
3overview.html the whole system on one page
3preview.html · preview/ every token; seven filled templates
4decisions.md every decision, how it was set and why
4standards.md · standards-state.json
4state.json where you left off
4PROTOCOL.md the steps and checks every session follows
  • 1
    At the root. For people and AI tools. Commit both.
  • 2
    The source of truth. DTCG 2025.10 tokens. Every other file is made from these.
  • 3
    Made from the tokens. Exports and pages. Every build rewrites them, so don't edit them by hand.
  • 4
    The record. Append-only decisions, the locked standards, the project protocol, and the state a later session continues from.
  • +
    Only when you ask. RATIONALE.md, feedback.md, RULES.md, references/, research/ and the private journey/ log, which stays out of git.
Everything OpenDesigner writes, as one sketch and build leaves it: two files at the root, the tokens as the source of truth, the exports and pages made from them, and the record of how each value was set.

A web-only sketch and build writes 50 files with no errors, and each extra platform adds its own export (51 with iOS).

At the root of your project

  • DESIGN.md: your design rules in plain words, for people and AI tools. It refreshes after every decision, and each section shows its zoom level.
  • PRODUCT.md: what the product is, who it's for and where it runs, so later sessions don't have to guess.

The tokens

opendesigner/tokens/ holds 11 files in the open DTCG 2025.10 format: your palette and scales, the roles built on them, and a file for each color, density and motion mode. See Design tokens and DTCG.

For developers
  • primitives.tokens.json: the raw palette and scales;
  • semantic.tokens.json: roles that don't change by mode;
  • semantic.color.light.tokens.json and semantic.color.dark.tokens.json;
  • three density files: spacious, comfortable and compact;
  • motion.standard.tokens.json and motion.reduced.tokens.json;
  • opendesigner.resolver.json, which ties the modes together;
  • a small metadata file.

The exports

Every build rewrites the files in opendesigner/build/, so don't edit them by hand. The code files follow the platforms you chose, and engine.py export --format all writes every one.

Change the decision

Record it with set, then build. Every export changes together, and the log says why.

$ engine.py set dials.roundness 60 --why "softer corners for a friendlier feel"
$ engine.py build
Rewritten together
css/tokens.css
  --ds-radius-control: var(--ds-radius-8);
swift/DesignTokens.swift
  public static let radiusControl: CGFloat = 8
compose/DesignTokens.kt
  val radiusControl = 8.dp
decisions.md
  ## D-0009 · dials.roundness = 60

Edit an export by hand

The next build rewrites it from the tokens. Swift, Compose and Tailwind never changed, and the log knows nothing.

opendesigner/build/css/tokens.css
- --ds-radius-control: var(--ds-radius-6);
+ --ds-radius-control: 8px;   typed in by hand
After the next build
$ engine.py build
css/tokens.css
  --ds-radius-control: var(--ds-radius-6);   back to the tokens
swift/DesignTokens.swift
  radiusControl: CGFloat = 6   never changed
decisions.md
  (no entry)
Everything in opendesigner/build/ is made from the tokens and rewritten by every build. Record the decision instead, and CSS, Swift and Compose move together with a reason in the log.
In build/What it is
css/tokens.cssCSS variables you can use in any web project
tailwind/theme.cssA Tailwind CSS v4 theme, so utility classes use your tokens
figma/Figma variables: one import file per collection and mode in figma/import/, and variables.json for Tokens Studio
paper/Tokens for the Paper design tool, in light and dark
swift/DesignTokens.swiftThe same values for iOS apps
compose/DesignTokens.ktThe same values for Android apps built with Jetpack Compose
dtcg/One DTCG resolver file for token tools that take a single entry point
artifact/project/The system as files for a Claude Design System artifact: tokens, a brand book, a cover and a button preview
brand/index.htmlA brand and press page you can host as it is, with your logo and icon files in brand/assets/

See Export for how to use each one.

Pages you open in a browser

  • opendesigner/overview.html: your whole system on one page, including what is still missing. It works offline and loads nothing from the web.
  • opendesigner/preview.html: every token on one page.
  • opendesigner/preview/: seven visual templates, such as the palette and the type scale, filled with your own values.
For developers

The seven templates are palette, type scale, spacing ruler, radius, elevation, motion and component sheet. The option gallery is filled per question with engine.py show, and the taste poll is built by taste.py build into opendesigner/preview/taste-poll/.

The record

  • opendesigner/decisions.md: every decision, how it was set and why. It's append-only, so a later session doesn't quietly undo a choice.
  • opendesigner/standards.md: the house and project standards this project follows, locked, with their sources.
  • opendesigner/state.json: where you left off, so you or another AI tool can continue later.
  • opendesigner/standards-state.json: a copy of each standard as this system follows it. Keep it next to state.json.
  • opendesigner/PROTOCOL.md: how work runs in this project: six steps, each ending at a gate where you say yes, and the checks every round runs. It's written once; edit it to fit. Its Now line says which step you're on, what waits for you and what comes next. The engine keeps that one line current, and engine.py status prints it.

See Decisions, DESIGN.md and the overview page.

Written by the skill, or only when you ask

  • opendesigner/RATIONALE.md: one page for the team on what was chosen, why, and what is still open, written by the skill from a template.
  • A short note in your AGENTS.md, and a CLAUDE.md that imports it, added only after you say yes. You're asked once, and a no is remembered. The note tells later AI agents to read DESIGN.md and RULES.md first, use the tokens, and run engine.py review before every draft and commit.
  • opendesigner/feedback.md, written only if you report something with engine.py feedback.
  • opendesigner/RULES.md, written when you give a note on the work. A note you give twice becomes a rule that later sessions follow.
  • opendesigner/research/, written only if you say yes to research: the findings with their sources, the positioning and the direction board. It also holds stakeholders.json (who has a say, and what each person said, with their name or role on it), interviews.md (at most five questions per role, to send) and summary.html, one page to share with your team. PRODUCT.md links to that page.
  • opendesigner/references/, written only when you share a reference with the extract skill: the measurements taken from it.
  • opendesigner/journey/, written only if you said yes to the private log.

What to commit

Commit DESIGN.md, PRODUCT.md and the opendesigner/ folder, so your team and your next AI session work from the same rules. The private log in opendesigner/journey/ stays out of git.

You can commit the exports so your apps import them directly, or rebuild them with engine.py build whenever you need them.

How the files relate

From your answers to a checked system
01 · YouYour answersUp to five questions, one per message. Later, zoom in only where you care.
02 · Recordedopendesigner/state.jsonEvery answer with how it was set: chosen, assumed or delegated.
03 · The engineengine.py buildColor ramps, type and spacing scales, contrast checks. Errors block the build.
04 · Tokensopendesigner/tokens/11 DTCG files. The source of truth for everything else.
05 · Made from themExports and DESIGN.mdbuild/css, tailwind, figma, paper, swift, compose, dtcg, artifact · overview.html
06 · Laterengine.py reviewFinds hard-coded values in your code and names the token to use instead.
Answers are recorded in state.json, the engine turns them into tokens, and every export and DESIGN.md is made from the tokens. Review closes the loop when code drifts from them.

The decision log records why each value is what it is.

To change anything, record a decision with engine.py set, then run engine.py build. See Engine commands.