AI Assistants
Coding assistants know TanStack Query far better than Qora. Left alone, they write TanStack code with Dart syntax: queryFn instead of fetcher, cacheTime instead of gcTime, state.when(...), which does not exist. Two files fix most of it: a short rules file the assistant loads in every session, and the documentation in a format it can read.
1. Add the Qora rules to your project
qora-rules.md is a one-page summary written for assistants. It contains the setup, how to render states, the offline behaviour, mutations and invalidation, and a table of the mistakes assistants make most often, each with the correct Qora form.
Download it to the root of your project:
curl -o qora-rules.md https://qora.meragix.dev/qora-rules.md
Then reference it from the instruction file your assistant reads:
| Assistant | Where |
|---|---|
| Claude Code | Add the line @qora-rules.md to CLAUDE.md |
| Cursor | Save it as .cursor/rules/qora.mdc with the front matter below |
| GitHub Copilot | Append its content to .github/copilot-instructions.md |
Codex and other tools reading AGENTS.md | Append its content to AGENTS.md, or tell AGENTS.md to read qora-rules.md |
For Cursor, the file starts with:
---
description: Qora server-state library rules
globs: "**/*.dart"
alwaysApply: false
---
Re-download the file when you upgrade Qora: it states the version it describes.
2. Point the assistant at the documentation
The documentation is published in formats meant for language models:
| URL | Contents |
|---|---|
/llms.txt | Index of every page, with a one-line description |
/llms-full.txt | The whole English documentation in one file |
/raw/en/<section>/<page>.md | Any single page as Markdown, for example /raw/en/getting-started/quick-start.md |
For a focused task, pass the one or two relevant pages rather than the full file: the assistant follows a short, precise context better than a long one.
3. Check what it wrote
- Run
dart analyze. An invented method or parameter is a compile error, which is the quickest way to catch a TanStack habit. - Look for a
switchonQoraState. Code that checksstate.isLoadingbefore reading data usually drops thepreviousDatakept during refetches and errors. - Test offline. Code generated from other libraries tends to expect a
FailureorInitialwhen the network is off. Qora pauses instead:LoadingwithFetchStatus.paused.
When in doubt, compare with the Quick Start, which runs as is, or ask the assistant to read Coming from TanStack Query, which maps every option.