Skip to content

[codex] Add focused manual LLM files#1297

Merged
jderochervlk merged 6 commits into
masterfrom
codex/llm-manual-sections
May 10, 2026
Merged

[codex] Add focused manual LLM files#1297
jderochervlk merged 6 commits into
masterfrom
codex/llm-manual-sections

Conversation

@jderochervlk
Copy link
Copy Markdown
Collaborator

@jderochervlk jderochervlk commented May 9, 2026

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

  • Generate focused manual section files:
    • /llms/manual/language-overview/llm.txt
    • /llms/manual/javascript-interop/llm.txt
    • /llms/manual/build-system/llm.txt
    • /llms/manual/getting-started/llm.txt
  • Reference the focused manual files from the generated LLM indexes.
  • Remove current/default explanatory wording from generated LLM file lists and human-readable LLM pages.
  • Stop generating version-specific manual and React LLM text outputs, and clean stale versioned output directories.
  • Stabilize the navigation e2e helper by waiting on nav containers, targeting links by selector/text, and scrolling links into view before clicking.
  • Add generator coverage for focused section files, stale version cleanup, reduced index links, and simplified wording.

Review follow-up

  • Addresses the review comments about versioned manual/React llms.txt indexes by dropping versioned LLM output generation instead of maintaining pinned version index files.

Validation

Local:

  • yarn build:res
  • yarn build:scripts
  • node --test apps/docs/scripts/__tests__/generate-llms.test.mjs
  • yarn build:generate-llms
  • node scripts/test-hrefs.mjs
  • yarn ci:format
  • git diff --check
  • yarn workspace @rescript-lang/docs cypress run --browser electron --config baseUrl=https://codex-llm-manual-sections.rescript-lang.pages.dev,retries=0

GitHub checks on 965c6e9e:

  • Format
  • Site_Checks
  • Vitest
  • Visual_Regression
  • Deploy
  • E2E Tests

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.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +8 to +9
- [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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We should probably just drop the files for specific versions to keep things simple.

Comment thread apps/docs/public/llms/react/template.txt
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread apps/docs/public/llms/manual/template.txt
Comment thread apps/docs/public/llms/react/template.txt
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.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Cloudflare deployment

Deployement ID: 9584de23-7049-488d-8e43-f19f4c23c9cd
Deployment Environment: preview

⛅️ wrangler 4.85.0
───────────────────
✨ Compiled Worker successfully
Uploading... (7566/8052)
Uploading... (7728/8052)
Uploading... (7890/8052)
Uploading... (8052/8052)
✨ Success! Uploaded 486 files (7566 already uploaded) (5.89 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://9584de23.rescript-lang.pages.dev
✨ Deployment alias URL: https://codex-llm-manual-sections.rescript-lang.pages.dev

@jderochervlk jderochervlk merged commit ae93a06 into master May 10, 2026
7 checks passed
@jderochervlk jderochervlk deleted the codex/llm-manual-sections branch May 10, 2026 17:43
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.

2 participants