# Using LLMs

URL: https://docs.domainruntime.dev/docs/introduction/using-llms
Status: Guide
Reviewed: 2026-09-22



## The docs, as Markdown [#the-docs-as-markdown]

| URL                                | Contains                                |
| ---------------------------------- | --------------------------------------- |
| [`/llms.txt`](/llms.txt)           | an index of every page, with its status |
| [`/llms-full.txt`](/llms-full.txt) | every page, in one file                 |
| `<any page>.md`                    | one page, e.g. `/docs/data/actions.md`  |

Start with the rules below, and add single pages when your agent works on something specific.

## Rules for your agent [#rules-for-your-agent]

Save this as `AGENTS.md` (Codex, Cursor and others) or `CLAUDE.md` (Claude Code) at the root of your project:

```md title="AGENTS.md"
# DomainRuntime project

- The backend is src/domain.ts, one chain: domain("x").withSchema({ entities, links, rooms }).withActions({...}).
- Writes happen only inside actions: defineAction({ input, output, execute({ input, runtime }) }).
  Never write from the browser; there is no client transaction.
- Zod input/output are the contract. Do not declare duplicate TypeScript types.
- One transaction per runtime.tx (today: db.transact). An action is not a transaction:
  put writes that must happen together in one tx.
- Never check-then-create for uniqueness: declare the attribute .unique() and write with lookup().
- Let the caller choose the id of anything an action creates, so a retry is harmless.
- Today every action is callable by any signed-in user (action scopes are in development): check the caller at the top of execute.
- Permission rules: data.ref('link.attr') returns a list, compare with `in`. On create, use data, not newData.
- Long-running work is an action whose execute is marked "use workflow"; every side effect goes in a "use step" function.
- Entities are prefixed with their domain (orders_order); action ids are <domain>.<action>.
- Pages are marked Verified, Guide or Planned. Do not use a Planned API; check
  https://docs.domainruntime.dev/docs/reference/status.md
```

## Check that it worked [#check-that-it-worked]

Ask your agent: &#x2A;"How do I change data in DomainRuntime from a React page?"* A correct answer calls an action and does not mention a client-side transaction.

## Describe your business in `DOMAIN.md` [#describe-your-business-in-domainmd]

Put a `DOMAIN.md` next to your code that says, in plain words, what the entities mean, which operations exist and who performs them. An agent that reads it names actions after business operations (`orders.place`) instead of generic ones (`orders.update`).
