[codex] Add focused manual LLM files#1297
Conversation
Generate focused language overview and JavaScript interop LLM files from the manual MDX sources. Reference the new files from the generated LLM indexes and cover the generator behavior with focused tests.
Generate focused build system and getting started LLM files from the manual MDX sources. Exclude the generated LLM index from the getting started slice and reference the new files from the generated LLM indexes.
Remove direct versioned manual and React links from the machine-readable LLM text indexes while keeping those links on the generated human-readable LLM pages.
Remove current/default explanatory wording from generated LLM text indexes and human LLM pages while keeping the versioned file sections on the human pages.
Wait on nav containers, target links by selector and text, and scroll links into view before clicking so the mobile secondary navigation test is less sensitive to route-transition and sticky-nav timing.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 853785f20a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - [Complete documentation](https://rescript-lang.org/llms/manual/llm-full.txt): The complete ReScript documentation including all examples and additional content | ||
| - [Abridged documentation](https://rescript-lang.org/llms/manual/llm-small.txt): A minimal ReScript documentation file with the essential content for quick reference |
There was a problem hiding this comment.
Restore version-scoped links in manual versioned llms.txt
The manual text template now hardcodes unversioned URLs (/llms/manual/llm-*.txt), and copyCurrentFilesToVersion reuses this same template for /llms/manual/v12/llms.txt and /llms/manual/v13/llms.txt. That means a client entering through a versioned index will be directed back to the moving “current” files instead of the pinned version files, so once current advances (e.g. to v13), /llms/manual/v12/llms.txt no longer resolves to v12 content.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
We should probably just drop the files for specific versions to keep things simple.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 853785f20a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Stop generating version-specific LLM text files for the manual and React docs, remove versioned links from the human LLM pages, and cover stale version cleanup in the generator tests.
Cloudflare deploymentDeployement ID: 9584de23-7049-488d-8e43-f19f4c23c9cd ⛅️ wrangler 4.85.0 ✨ Uploading _redirects |
Context
The generated LLM indexes were getting noisy with broad/version-specific entries. This PR adds focused manual slices so LLM clients can fetch smaller topic-specific docs, while keeping the root, manual, and React LLM entry points concise.
Summary
/llms/manual/language-overview/llm.txt/llms/manual/javascript-interop/llm.txt/llms/manual/build-system/llm.txt/llms/manual/getting-started/llm.txtReview follow-up
llms.txtindexes by dropping versioned LLM output generation instead of maintaining pinned version index files.Validation
Local:
yarn build:resyarn build:scriptsnode --test apps/docs/scripts/__tests__/generate-llms.test.mjsyarn build:generate-llmsnode scripts/test-hrefs.mjsyarn ci:formatgit diff --checkyarn workspace @rescript-lang/docs cypress run --browser electron --config baseUrl=https://codex-llm-manual-sections.rescript-lang.pages.dev,retries=0GitHub checks on
965c6e9e:FormatSite_ChecksVitestVisual_RegressionDeployE2E Tests