Skip to content

chore: add llms.txt generation for LLM-friendly docs#39

Merged
faluciano merged 1 commit into
mainfrom
chore/llms-txt
Mar 2, 2026
Merged

chore: add llms.txt generation for LLM-friendly docs#39
faluciano merged 1 commit into
mainfrom
chore/llms-txt

Conversation

@faluciano
Copy link
Copy Markdown
Owner

Summary

Add llms.txt standard support to the GitHub Pages documentation site, making couch-kit discoverable and consumable by LLM agents.

What's included

  • scripts/generate-llms-txt.ts — Bun script that generates both files at build time, reading package versions dynamically from packages/*/package.json
  • static/robots.txt — Allows all crawlers, points sitemap to llms.txt
  • Updated .github/workflows/docs.yml — Runs generation after TypeDoc and copies static files before deploy
  • Added docs:llms script to root package.json

Generated output

File Size Purpose
llms.txt ~2.3 KB (34 lines) Concise index with links to API sections
llms-full.txt ~30.7 KB (989 lines) Complete TypeScript type signatures for all 5 packages

The full file includes 11 sections covering all packages (core, client, host, cli, devtools) with complete type signatures, usage examples, and an "Instructions for LLM Agents" section following the Stripe pattern.

After merge, files will be accessible at:

  • https://faluciano.github.io/react-native-couch-kit/llms.txt
  • https://faluciano.github.io/react-native-couch-kit/llms-full.txt
  • https://faluciano.github.io/react-native-couch-kit/robots.txt

No changeset needed

This is a workflow/config-only change — no package source code was modified.

Generate llms.txt and llms-full.txt at docs build time following the
llmstxt.org standard. The concise index links to API sections while
the full file contains complete TypeScript type signatures for all 5
packages with an LLM agent instructions section.

- Add scripts/generate-llms-txt.ts (reads versions from package.json)
- Add static/robots.txt pointing sitemap to llms.txt
- Update docs workflow to run generation + copy static files
- Add docs:llms script to package.json
@faluciano faluciano merged commit 987b109 into main Mar 2, 2026
7 checks passed
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