# For AI agents

grani ships its own reference for coding agents: `node_modules/grani/llms.txt`, written from the
version you installed. It is a map small enough to read whole, and beside it a page per component
(its API and a whole example) and a chapter per set of patterns, so an agent picks components and
follows their contracts without reading the sources.

Add one line to the file your agent reads, `AGENTS.md`, `CLAUDE.md` or your editor's rules:

```text
This project uses grani for its interface. Before writing UI, read
node_modules/grani/llms.txt: pick components from its catalog and
follow their contracts.
```

For a chat without your project, the site has the same texts:

- [llms.txt](https://grani.arseni.work/llms.txt): the map, with the catalog, the tasks and the guides
- [llms-full.txt](https://grani.arseni.work/llms-full.txt): everything in one file
- a component's or a guide's page as Markdown: its address plus `.md`, such as
  [data-table.md](https://grani.arseni.work/components/data-table.md)
- a chapter of the patterns alone, such as [filling-in.md](https://grani.arseni.work/patterns/filling-in.md)

To check that your own screens keep the patterns, `grani/test` gives your Playwright suite five
checks: focus on open, focus back on close, focus on the field to fix, a late search answer dropped,
rows kept while a refresh loads. A failure names the pattern and the file of
`node_modules/grani/llms/patterns/` that explains it. The checks, with an example, are in
`node_modules/grani/llms/patterns/tests.md`.

Each component's page has Copy page beside its title: it copies the page as Markdown, and its menu
opens the page in Claude or ChatGPT.
