FacetDocs

For agents

The language was measured against real agent sessions. These habits keep both tokens and round trips low.

The cheapest loop

  1. Kit first, once per file. Colors, type presets and every repeated shape as parts. Later calls send only nodes.
  2. Build whole screens in one call. A list of nodes builds several top-level layers at once.
  3. Read the reply, not a screenshot. Warnings and expect misses name the layer and the fix. Ask for --preview when you need to see the result, not after every call.
  4. **Read back with source, change with --sync.** Never rebuild from scratch to change a value.

Budget

TaskTypical cost
A kit for an app600 to 1,000 tokens, once
A phone screen using the kit600 to 1,000 tokens
Reading a screen back (source)1,500 to 2,000 tokens
A component set with states and behavior800 to 1,500 tokens

When something goes wrong

Reply saysDo
INPUT_IGNORED with a suggestionfix the key it names
"x" is not a key, a kit preset or part, or a componentcheck facet kit and facet components
NOT_APPLIED: width "fill" needs an auto-layout parentput the layer in a row or column, or give a number
LAYOUT_OVERFLOWlet the frame hug, make it larger, or say "overflow": "hidden" if the clipping is meant
EXPECT_FAILEDchange the layout until the expectation holds
Outcome unknown after a long buildthe host may still be working: wait, then find before retrying

Machine-readable documentation

  • llms.txt lists every page with a one-line summary.
  • llms-full.txt is all of it in one file, examples included.
  • facet guide prints the whole reference; facet guide reference prints it as JSON.

MCP

facet mcp serves the same tools over MCP on stdio, acting on the design in front in Facet (and opening Facet if it is not running); facet --doc f.facet mcp serves one file instead. Connect your AI sets it up in each app.