FacetDocs

The loop

Most work is four steps, and each is one call.

  1. Build what you mean: facet --doc f.facet build @screen.json --preview s.png.
  2. Look at the preview and read every warning. Warnings name the layer and the fix.
  3. Read back what is there, in the language: facet --doc f.facet source Screen.
  4. Change it in place: edit the JSON, then build @screen.json --sync. Layers keep their ids, instances stay linked, and the change is one undo step.
$ facet source Hello
{"font":"Inter 15/22","column":["Evening practice",{"text":"Twelve days in a row","color":"#6F6879"}],"gap":4,"padding":20,"fill":"#FFFFFF","name":"Hello","width":260,"at":[0,0],"cornerRadius":14}

source prints the shortest form that builds the layer again. Containers come back as {"row": [...]}, plain texts as strings, kit colors and text styles by name. It costs about a ninth of the tokens tree --full does, so reading before a change is cheap.

When a layer looks wrong, tree NODE shows each layer's size and place, inspect NODE every property of one, and shot NODE -o x.png --scale 2 a close look.

Small changes

For one or two values, modify is shorter than a sync:

facet --doc f.facet modify Hello '{"fill": "@paper", "font": "Inter 16/24"}'
facet --doc f.facet modify Hello '{"$nodes": {"Evening practice": {"text": "Morning practice"}}}'

Undo

Each call is one undo step, whatever it changed: facet --doc f.facet undo.