Skip to content

Ship a generated single-file API reference for LLM agents - #143

Merged
noisyneuron merged 5 commits into
mainfrom
sukanya/generate-llm-docs
Sep 17, 2026
Merged

noisyneuron merged 5 commits into
mainfrom
sukanya/generate-llm-docs

Conversation

@noisyneuron

@noisyneuron noisyneuron commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

The SDK now publishes llms-full.txt, a single-file reference of the public API written for LLM agents rather than people. It's generated from the TypeScript types and TSDoc on every build and checked for drift alongside the existing docs, so it can't fall out of step with the code. The name follows the llms.txt convention so agents and tooling know what it is, and it ships as a loose file in the npm package, like the README, so consumers can read it straight from node_modules without it touching their bundle.

Test plan

  1. Run npm run build. Observe that llms-full.txt is written to the repo root and the console reports its member and type counts and size.
  2. Run npm pack --dry-run. Observe that llms-full.txt is listed in the tarball contents.
  3. Change any TSDoc summary under src/ and run npm run check without rebuilding. Observe that the docs check fails and names llms-full.txt as out of date.

noisyneuron and others added 4 commits September 17, 2026 10:39
Emits a single-page reference from the TypeDoc model, sized for LLM
consumption. Organisation is derived rather than configured: types are grouped
by the module that declares them, and FeltController's members by the
controller they are inherited from, so a new type or method is placed without
anyone maintaining a taxonomy.

The generator asserts that every FeltController member and every exported type
is emitted exactly once, and fails the build otherwise.

Property comments that only restate the property name are dropped, and short
object shapes are kept on one line; together those account for most of the
difference between readable output and something several times larger.

Pass --examples to include each method's first @example.

Co-authored-by: Cursor <cursoragent@cursor.com>
… build and check

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@noisyneuron
noisyneuron force-pushed the sukanya/generate-llm-docs branch from bc14d8f to 392d6ee Compare September 17, 2026 14:40
@noisyneuron
noisyneuron marked this pull request as ready for review September 17, 2026 19:09

@sullvn sullvn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Looks good

@noisyneuron
noisyneuron merged commit 52a14ac into main Sep 17, 2026
3 checks passed
@noisyneuron
noisyneuron deleted the sukanya/generate-llm-docs branch September 17, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants