Skip to main content

Using AI assistants

Coding assistants don't know this library. Left alone they invent props, reach for a raw <div> instead of a component, or copy patterns from a different design system.

One file fixes that. Find your tool below — each one is the complete setup.

Copilot reads .github/copilot-instructions.md automatically, for everyone on the repository — no per-developer setup.

mkdir -p .github
cp node_modules/@takeoff-ui/react-spar/agents/AGENTS.template.md \
.github/copilot-instructions.md

Commit it. That's the whole setup.

Copilot's agent mode also reads AGENTS.md at the repository root, so if you already have one you can point at it instead of duplicating the content. Inline completions read neither — they only see the open file.

Check it worked: open Copilot Chat and ask it to "add a primary button that shows a loading spinner". You should get Button from @takeoff-ui/react-spar with a loading prop — not a hand-rolled <button>.

note

Requires 0.4.0 or newer. If the agents/ directory isn't in your node_modules, you're on an older version — upgrade, or copy from the template on GitHub.

Already have that file? Don't overwrite it — paste the Rules and Components sections from the template into what you have.

Giving it the full API

The file you just copied is an index: every component, what it's for, and the house rules. It deliberately doesn't include full prop tables — that would be too large to keep in context.

When an assistant needs the complete API for a component, point it at the Markdown docs. Every page is available by appending .md to its URL:

URLUse it for
/docs/components/<name>.mdOne component. Start here — smallest payload.
/llms-full.txtThe entire library, in one file.
/llms.txtAn index of every page, for tools that crawl.

These include guidance the API tables alone don't carry: when to reach for a component, and which neighbouring component to use instead when it isn't the right fit.