KloradDocs

For agents

How a coding agent should read these docs and work with the SDK.

These docs are written to be read by people and by coding agents. If you are an agent:

  • Fetch /llms.txt for an index of every page, or /llms-full.txt for all of them as one Markdown file.
  • Every code sample on this site is a file that compiles against the current packages. Copy from the samples rather than inventing calls.

Rules the SDK holds you to

  • Change world state only through a Scene. A renderer or a component that needs to change the world calls back to app code, which calls the scene.
  • @klorad/api/world imports nothing but itself: no React, no three.js, no DOM, no Node APIs. Code that needs those belongs in a binding, a renderer or Integration.
  • Give every shadow and twin a binding, and give a binding only to a shadow or a twin.
  • Order comes from observedAt. Never use arrival time as the state of the world.
  • A Behaviour cannot request an Action. Model follow up work as a new request that the Entitlement checks again.
  • Validate outside data with a schema at the source boundary; keep vendor credentials on the server.

Where the truth is

The type declarations in node_modules/@klorad/<name>/dist/*.d.ts are the reference: they are complete, readable and match the installed version, while the JavaScript next to them is minified. When this site and the declarations disagree, the declarations win; tell your contact at Prieston so the page is fixed.

Something wrong or unclear? Tell your contact at Prieston Technologies.