Skip to content

feat: generate llm docs #565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: generate llm docs #565

wants to merge 1 commit into from

Conversation

ryanbonial
Copy link
Member

@ryanbonial ryanbonial commented Jun 18, 2025

Description

Added a script to generate LLM-friendly documentation files for the SDK. This creates three files in the docs directory:

  1. llms.txt - Configuration for LLM bots with userAgent and include/disallow rules
  2. sdk-summary.txt - Overview of the SDK packages with key exports from core
  3. sdk-react-summary.txt - List of React hooks exported from the React package

The script automatically extracts exports from the core and React packages to keep the documentation up-to-date with the codebase.

What to review

  • The script logic in scripts/generate-llms-docs.mts for extracting exports
  • The format and content of the generated documentation files
  • The postbuild hook added to package.json to run the script after docs are built
  • Verify the parser correctly identifies exports from the index files

Testing

Tested by running the script manually and verifying the generated files contain accurate information about the SDK exports. The script includes error handling and fallbacks if files aren't found.

Fun gif

Copy link

vercel bot commented Jun 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sdk-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 5:31pm
sdk-kitchensink-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 5:31pm

Copy link

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 96% (🎯 95%) 6396 / 6662
🟢 Statements 96% (🎯 95%) 6396 / 6662
🟢 Functions 95.57% (🎯 95%) 324 / 339
🟢 Branches 94.06% (🎯 90%) 1966 / 2090
File CoverageNo changed files found.
Generated in workflow #1771 for commit 18e1cd9 by the Vitest Coverage Report Action

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