Lesson 14 of 14

One system, many surfaces

The same document in Figma, in the CLI and in an agent, and what "could not express" means.

#The idea

The React library is one reading of the file. The same document feeds every other surface, and each one reports what it could not express rather than approximating in silence. This last lesson is a map of those surfaces, and of the one distinction the rest of the docs lean on.

#Targets

A project chooses its targets, and that choice lives beside the document, not in it. React is the baseline code target. Figma is a design target: the foundations become Variables and a DTCG token file, and the components become component sets with variants and bound variables, through a plugin that keeps Milda as the source.

Built

Components export as component sets with variants and bound variables, through the Figma plugin, which is a persistent bridge rather than a one-way dump.proposal 0010

#Clients

The CLI talks to the hosted system: milda ls, milda show Button for the exact contract, milda diff --fail-on major as a CI gate, milda generate for source. The MCP server gives an AI agent the same system: it discovers components, reads contracts and tokens, and can fetch the whole file with get_source, which is also the format it writes when it proposes a change. Both read the one document.

#What “could not express” means

A target is honest about its limits. The Figma export returns a list of what it skipped; the React target reports a constraint no type can say and leaves it to the checker. content is the author's side of the same honesty: code for one target, tagged, skipped by every other reader.

Partly built

Each target reports what it could not express (the Figma target’s skipped list, the React target’s constraint report). A single conformance checker over a document is not built.

#Three readings of one file

You will meet three layers on every language page from here on, and it helps to name them now. The spec (the prelude and the grammar, public and versioned) says what the language means. The surface is what a .milda file can say today, held to the parser by tests. A realization is what one target does with it. The three agree on everything in this tour, and where they do not yet, a page says so with a status rather than letting you find out from the output.

Where to go now
The language explains each part of the model in depth, in the order the tour met them. The reference is for looking a word up. Using a generated library is for the consuming app.

Words in this lesson

  • Code written in one target’s own language, quarantined.
  • How the component is realized on one target, where the targets genuinely differ in behaviour or structure (a listbox on the web, a wheel on iOS).

Open a word for its entry, or read them all in the reference.