Skip to content

feat: expose llms.txt#865

Merged
avivkeller merged 2 commits into
nodejs:mainfrom
araujogui:feat/llms-txt
Jun 19, 2026
Merged

feat: expose llms.txt#865
avivkeller merged 2 commits into
nodejs:mainfrom
araujogui:feat/llms-txt

Conversation

@araujogui

Copy link
Copy Markdown
Member

Expose the llms.txt file generated by doc-kit

@araujogui araujogui requested a review from a team as a code owner February 27, 2026 12:47
Comment thread src/constants/fileSymlinks.json Outdated

@ovflowd ovflowd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think our Makefile on upstream Node.js is using the llms.txt generator?

@flakey5 flakey5 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, I wanna wait on nodejs/node#62027 to get merged first though in case there's any blockers/whatever

Copilot AI review requested due to automatic review settings June 17, 2026 23:48
@cursor

cursor Bot commented Jun 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Small, parallel change to existing static symlink and R2 routing; no auth or sensitive data paths.

Overview
Exposes doc-kit’s llms.txt at /llms.txt, mirroring how /node-config-schema.json is served from the latest Node release docs in R2.

Routing: HEAD/GET on /llms.txt go through r2Middleware, and getR2Path maps that path to the llms.txt object key (resolved via static file symlinks).

Release symlink: fileSymlinks.json gains an llms.txt entry, and addStaticFileSymlinksToCache treats it like the config schema—skipped during directory-cache injection, then rewritten each release to nodejs/release/<latest>/docs/llms.txt.

Reviewed by Cursor Bugbot for commit cf8a68f. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI 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.

Pull request overview

Exposes the llms.txt file (generated by doc-kit) via the Cloudflare Worker by routing requests to R2 and adding a versioned symlink that tracks the latest Node release.

Changes:

  • Adds /llms.txt GET/HEAD routes handled by R2Middleware.
  • Maps /llms.txt to an R2 object via fileSymlinks.json and getR2Path() handling.
  • Updates the symlink-cache generation script to treat llms.txt like other root-level dynamic symlinks.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/routes/index.ts Adds GET/HEAD routes for /llms.txt so the worker serves it from R2.
src/middleware/r2Middleware.ts Extends R2 path mapping logic to allow /llms.txt to resolve to the symlink key.
src/constants/fileSymlinks.json Adds a root symlink entry for llms.txt pointing at the latest release docs path.
scripts/utils/addSymlinksToDirectoryCache.mjs Ensures llms.txt is treated as a dynamic root-level file symlink and rewritten to the latest release during cache generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/utils/addSymlinksToDirectoryCache.mjs
Comment thread src/routes/index.ts
Comment thread scripts/utils/addSymlinksToDirectoryCache.mjs
Signed-off-by: Aviv Keller <me@aviv.sh>
@avivkeller avivkeller enabled auto-merge (squash) June 19, 2026 21:51

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cf8a68f. Configure here.

Comment thread src/routes/index.ts
@avivkeller avivkeller merged commit ff0429e into nodejs:main Jun 19, 2026
6 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.

6 participants