Skip to content

Add an example or template

Each library item is one folder in examples/library/<slug>/. The card, the detail page, the thumbnail and the “Open in editor” link all come from that folder.

  1. Build the project with the CLI as docs/agent-authoring.md describes: npm run build:cli, then create and small apply batches into examples/library/<slug>/project.json. Save each batch in ops/, and use the title as the project name.
  2. Apply the suggestedOps the diagnostics give, until validate --fail-on warning exits 0.
  3. Render with render --out, look at the drawings, and copy the best one to drawings/overview.png.
  4. Write meta.json with slug, kind (template or example), title, description, level, tags, learn, order and thumbnail.
  5. Run npm run docs:check and npm test, then npm run docs:build.

The app bundles the project, so /open?template=<slug> works as soon as the app is rebuilt.