Skip to content

docs: add llms.txt support for AI agents - #17

Open
ksamirdev wants to merge 1 commit into
raphaelsalaja:mainfrom
ksamirdev:agents-support
Open

docs: add llms.txt support for AI agents#17
ksamirdev wants to merge 1 commit into
raphaelsalaja:mainfrom
ksamirdev:agents-support

Conversation

@ksamirdev

Copy link
Copy Markdown

What this does

Makes the docs readable by AI assistants and coding agents, using the llms.txt convention. Right now an agent has to scrape the site or guess the API from the README.

What changed

Two docs files in the package

  • packages/calligraph/llms.txt - short index: what Calligraph is, install, prop names, links.
  • packages/calligraph/llms-full.txt - the full API: every prop with its default, all three variants, runnable examples, constraints, common mistakes.

Both are added to files, so they ship on npm. An agent working in someone's project can read node_modules/calligraph/llms-full.txt directly, with no network call.

The site serves them

  • /llms.txt
  • /llms-full.txt
  • /index.md (same content, markdown content-type)

The routes read the two files at build time and are fully static, so the docs can never drift from the package.

Small additions

  • An "AI & agents" section on the home page listing the URLs, using the existing table styles.
  • <link rel="alternate" type="text/markdown" href="/index.md"> so agents can find the markdown from the page itself.

Docs fixes found along the way

  • README.md documented a transition prop that no longer exists. Replaced that section with the variants and the animation presets that do.
  • AGENTS.md described a single-file package with computeLCS in index.tsx. Rewritten for the current layout (one renderer per variant, reconcile.ts, shared.ts), plus commands and a short checklist.

Notes

  • No source changes. Docs, one page section, one meta tag.
  • pnpm lint, pnpm typecheck and pnpm build all pass.
  • Changeset included (patch), since the package contents change.
  • One thing I documented as-is rather than fixing: stagger has no effect on variant="text" - text.tsx accepts the prop but never applies a delay, unlike number.tsx and slots.tsx. Happy to fix it in a separate PR if it was meant to work.

Adds plain-markdown docs so LLMs and coding agents can read the API
without scraping the site, following the llms.txt convention.

- packages/calligraph/llms.txt: short index (what it is, install, prop names, links)
- packages/calligraph/llms-full.txt: full docs (every prop with defaults, all three
  variants, runnable examples, constraints, common mistakes)
- Both files ship in the npm package, so agents can read them from node_modules
- Site serves them at /llms.txt, /llms-full.txt and /index.md, read at build time
- Home page gets an "AI & agents" section listing the URLs
- link rel="alternate" type="text/markdown" points at /index.md
- AGENTS.md rewritten: the old version described a single-file package and
  internals that have since moved
- README: replaced the "Custom transitions" example, since the transition prop
  no longer exists, with the variants and animation presets that do
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

@ksamirdev is attempting to deploy a commit to the Raphael Salaja Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant