docs: add llms.txt support for AI agents - #17
Open
ksamirdev wants to merge 1 commit into
Open
Conversation
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
|
@ksamirdev is attempting to deploy a commit to the Raphael Salaja Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 readnode_modules/calligraph/llms-full.txtdirectly, 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
<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.mddocumented atransitionprop that no longer exists. Replaced that section with the variants and theanimationpresets that do.AGENTS.mddescribed a single-file package withcomputeLCSinindex.tsx. Rewritten for the current layout (one renderer per variant,reconcile.ts,shared.ts), plus commands and a short checklist.Notes
pnpm lint,pnpm typecheckandpnpm buildall pass.staggerhas no effect onvariant="text"-text.tsxaccepts the prop but never applies a delay, unlikenumber.tsxandslots.tsx. Happy to fix it in a separate PR if it was meant to work.