Skip to content

docs(ENG-58853): generate our own llms.txt and llms-pages.md index from docs.json - #659

Open
raj-dubey1 wants to merge 12 commits into
mainfrom
docs/ENG-58853-llms-txt
Open

raj-dubey1 wants to merge 12 commits into
mainfrom
docs/ENG-58853-llms-txt

Conversation

@raj-dubey1

@raj-dubey1 raj-dubey1 commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Update (4 Dec, f6cf824e): agents are no longer pointed at llms-full.txt. Arun's LLM review (3 Dec) found it too big to read: 13.7 MB, about 3 million tokens. llms.txt no longer lists it under Optional, and the llms-pages.md intro no longer names it. No generated file mentions it now. Mintlify still generates it, and the guard against a committed root copy and the deployed-corpus check stay as they are. node --test scripts/llms/generate-llms.test.mjs: 18/18 pass, exit 0. The updated test fails against the previous generator. --check: exit 0.

Also 2d2a4f8d: the corpus check no longer flakes on a fresh preview. On f6cf824e it got a 404 for llms-full.txt one second after the preview started serving the new llms.txt. A minute later the same URL returned 200 (13.7 MB), and a re-run passed. When it waits for a preview, check-full-corpus.mjs now retries llms-full.txt every 20 s until its deadline. A production run still fails on the first non-200. Checked against a local server: 404 then 200 passes (exit 0), and the old script fails the same case (exit 1). Always 404 with no wait exits 1 at once; always 404 while waiting exits 1 at the deadline. The real preview passes (exit 0). Tests: 18/18.

Update (4 Dec, 5a251d93), after Aditya's 11:25 review. I checked each point first; the claim table is in the PR comment. These pushes dismissed both approvals, and Ketan's "regenerate against final main" needed a push anyway. Main is still df5c5650, so the files are generated against it.

  • Keeping main in sync: a regenerate PR (Aditya's option a, minus the direct commit). generate-llms --check exits 2 when the files are only out of date and 1 on a structural error. llms-check on PRs fails only on structural errors and warns on stale files. New llms-regenerate.yml (push to main, or run by hand) regenerates and opens or updates one PR from docs/llms-regenerate for a person to merge; it never commits to main. Before merge, a repo admin must turn on "Allow GitHub Actions to create and approve pull requests" (Settings > Actions). I can't read that setting. Docs authors and fork PRs no longer need Node. CONTRIBUTING.md explains the warning and the error.
  • A nav page hidden by a redirect is now an error, unless llms.config.json redirectedNavAllowed lists it (a stale entry there is an error too). The one live case is fixed: the /ui-kit/react-native/property-changes -> upgrading-from-v4 redirect is removed. That 670-line page is in the nav and linked three times from upgrading-from-v4, and live it 308s back to that page.
  • Older-version counts use filter(isPage), so redirected and url:-only entries are no longer counted (React v6: 67 -> 64).
  • llms.config.json Agent Skills note checked against @cometchat/skills 5.2.0 (npm latest). The CLI connects the MCP server for the agents that support it, and --no-mcp skips it. The note now says that. Aditya's source, agent-skills.mdx:337, is itself out of date against 5.2.0 (it names cometchat-docs and four agents; 5.2.0 writes cometchat for eight, two more if installed, prints steps for Replit, and skips Aider). That is a separate follow-up.
  • Duplicate lines. The second llms-pages.md link (the "Older versions (legacy)" section) is gone; the Optional line already says it links older versions. Kept on purpose: Push and AI Moderation are listed under their products and again under "Platform essentials", the cross-product list from platformTopics, with their own labels.
  • Gates at 5a251d93:
    • node --test scripts/llms/generate-llms.test.mjs: 16 passed, exit 0. With the generator change reverted, 1 fails (exit 1).
    • generate-llms.mjs --check: exit 0.
    • The check step run locally: clean exit 0, stale exit 0 with the warning, the property-changes redirect put back exit 1.
    • docs-linkcheck --base df5c5650 .: PASS.
    • mint broken-links: only the pre-existing sdk/android/v4/ai-chatbots-overview.mdx -> /ai-chatbots/overview, the same on main.

Why

Mintlify generates /docs/llms.txt from every page in the repo. Today it is 88 KB and 709 lines, but it links only 210 of the 1,703 current-version pages directly. 273 of its 483 links point to old-version or unlisted pages, mostly under "Other". Its llms-full.txt is 13.7 MB. As a result, an agent needs 4 fetches to get from cometchat.com/llms.txt to a setup guide. Mintlify's docs say a llms.txt or llms-full.txt at the project root overrides the generated file of the same name (mintlify.com/docs/ai/llmstxt).

Ticket: ENG-58853 (also fixes ENG-39369, where iOS Calls pages are missing from llms.txt)

What changed

  • scripts/llms/generate-llms.mjs (Node 18+, no dependencies) reads docs.json and page front matter, and writes two files to the repo root:

    • llms.txt (129 lines, 18 KB): an H1, then Start here (agent skills, CLI, MCP, migrate, Lovable, design system), then one line per product section. Each line links that section's llms index as .md, or its overview page where there is no index. An Optional section links llms-pages.md, Mintlify's llms-full.txt, llms-index and the OpenAPI specs.
    • llms-pages.mdx (361 KB), served as /docs/llms-pages.md: every current-version navigation page with its description, grouped as in the navigation, with older and beta versions listed at the end. (Was llms-full.txt until Ketan's review; see "Review round 3" below.)
    • llms-full.txt is not committed: Mintlify keeps generating its full-text corpus there.
  • --check fails when the output is out of date, an llms index links a missing or redirected page, an llms-*.mdx index is not wired into llms.txt or listed in llms-index, or an index's version no longer matches the current version. .github/workflows/llms-check.yml runs the tests and --check on every PR. /scripts is added to .mintignore.

  • llms-index.mdx: absolute .md links, the llms-full corpus pointer removed, the Android SDK v5 link fixed, and iOS UI Kit v6 (beta) and the CLI added.

  • Routing: this removes 4 stale redirects in docs.json that are older than the pages now at their paths. Live readers are currently sent away from these navigation pages:

    • sdk/flutter/group-kick-member (currently lands on the docs home page)
    • sdk/flutter/login-listeners
    • sdk/flutter/resources-overview
    • rest-api/messages/mark-message-as-interacted

    It also repoints 4 index links to the pages actually served.

  • Coverage now in llms.txt / llms-full.txt that no index had before: UI Kit Builder, the Unreal and Ionic (Legacy) SDKs, Card Builder, On-Premise, Home and AI-Driven Development.

Evidence

  • node --test scripts/llms/generate-llms.test.mjs: 7/7 pass, exit 0.
  • node scripts/llms/generate-llms.mjs --check: exit 0. Two deliberate breakages (editing a page title, and making iOS v6 the default) each exit 1.
  • Live URL check: every URL in the generated files was fetched live. 1,674 return 200. The other 4 are the stale redirects this PR removes, and they still redirect until it merges.
  • mint broken-links: reports 1 broken link, in sdk/android/v4/ai-chatbots-overview.mdx. That file is not touched by this PR and the link was already broken.
  • Local preview: mint dev served the root llms.txt and llms-full.txt byte for byte.

For the reviewer

  • Decide whether our page index replaces llms-full.txt: decided in review, Mintlify's corpus stays and the index is llms-pages.md.
  • A docs owner should approve the 4 redirect removals, because they change live routing.
  • Note that --check is strict: any PR that changes a page title, description or the navigation must also commit the regenerated files (node scripts/llms/generate-llms.mjs).

Second commit: the rest of the PDF review (e585c48)

The review of docs/llms.txt attached in Slack (2 Dec 2026) asked for more than the first commit did. Now also:

  • Summary line: names every product (chat, calling, AI agents, moderation, notifications, campaigns).
  • Intro: tells agents to fetch only the index for their platform and its current version.
  • Start here: gives the install command, npx @cometchat/skills add, which installs the skills and connects the Docs MCP server (per agent-skills.mdx).
  • Platform essentials: a new section with key concepts, users and auth, REST auth, webhooks, push, moderation, the Chat REST API, rate limits and the network allowlist, plus the 6 OpenAPI specs with full URLs.
  • Older versions (legacy): (removed in f15f5b3e: it repeated the Optional llms-pages.md link) one line pointing to the older-version list at the end of llms-pages.md. It doesn't link Mintlify's /_llms/ files, because nobody has confirmed they keep being generated once a custom llms.txt exists.
  • Descriptions:
    • The Platform and Widget Builder index lines now describe their sections; before, they used the first page's description.
    • Descriptions in llms.txt are capped at 200 characters.
    • fundamentals/overview and the 39 current-version pages whose front matter said only "<Title> — CometChat documentation." now have real descriptions. That is 34 Vue UI Kit pages, plus Emojis, Gfycat, JS webhooks, iOS rate limits and Custom Bots.

Not in this repo: the first hop, cometchat.com/llms.txt, is on the marketing site. I've asked for it to point at /docs/llms.txt as the agent entry point.

Evidence for this commit:

  • node --test scripts/llms/generate-llms.test.mjs: 8/8 pass, exit 0. One new test covers the summary, the start-here note, the section override, the platform topics and their labels, the description cap and the older-versions line.
  • generate-llms.mjs --check: exit 0.
  • All 84 URLs in the new llms.txt return 200 live.
  • llms.txt is now 18 KB. That's above the review's 10–15 KB estimate because it also covers UI Kit Builder, Bring Your Own Agent, On-Premise and Card Builder.

Review round 3: keep Mintlify's llms-full.txt, publish the index separately (ada76da, 74653fb)

Ketan's review: preserve the full page content at llms-full.txt and publish the expanded index separately.

  • Root llms-full.txt deleted, so Mintlify serves its full-text corpus again (page bodies and code of every page).
  • The index is llms-pages.mdx, an unlisted page like llms-index.mdx, served as Markdown at /docs/llms-pages.md. My first try was llms-pages.txt, but the preview returned 404 for it: Mintlify serves .txt files only on Enterprise plans (create/files). llms.txt and llms-full.txt are special names.
  • llms.txt links llms-pages.md (every page, and older versions) and llms-index. (It also linked Mintlify's llms-full.txt until f6cf824e, which removed it.)
  • Guards, so this can't regress:
    • generate-llms.mjs --check fails if llms-full.txt or llms-full.md is committed at the root, or if a title or description would put { } < into the MDX page.
    • scripts/llms/check-full-corpus.mjs checks the served llms-full.txt: at least 5 MB, and 6 sample lines from real page bodies (Next.js setup, iOS calls setup, JS and Android send-message code, the Chat REST API and the Mastra agent). --check fails if a sample line is edited off its page.
    • The new workflow llms-full-corpus.yml runs it on the PR's Mintlify preview, after waiting until the preview serves this commit's llms.txt. It also runs daily against production.

Evidence (head 74653fb):

  • node --test scripts/llms/generate-llms.test.mjs: 14/14 pass, exit 0 (new tests: root llms-full guard, sample checks, MDX guard, checkCorpus, checker CLI exit 0 on a corpus and 1 on an index).
  • node scripts/llms/generate-llms.mjs --check: exit 0. With a root llms-full.txt touched: exit 1, error names the override.
  • check-full-corpus.mjs on production: 13,705,865 bytes, 0 problems, exit 0. On our old index file: 7 problems, exit 1.
  • Preview (cometchat-22654f5b-docs-eng-58853-llms-txt.mintlify.site):
    • /llms-full.txt is Mintlify's corpus: 13,744,126 bytes, all 6 samples present, 0 problems.
    • /llms.txt is byte-identical to the committed file.
    • /llms-pages.md returns 200 text/markdown, and all 1,709 links match the committed file.
  • CI on 74653fb: llms ✅, corpus ✅ (it ran against the preview), Mintlify Deployment ✅.
  • All 85 URLs in llms.txt return 200 live. llms-pages.md was checked on the preview, since it is only on production after merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XbguTtbbFDbCMhFp4XRZfm

…s.json

Mintlify generates /docs/llms.txt from every page in the repo: 88 KB,
with only 210 of 1,703 current-version pages linked directly and 273 of
its 483 links old-version or unlisted. A llms.txt or llms-full.txt at the
project root overrides the generated file (mintlify.com/docs/ai/llmstxt).

- scripts/llms/generate-llms.mjs builds a root llms.txt ("Start here",
  then one line per product section, linking its index as .md) and
  llms-full.txt (every current-version page with its description) from
  docs.json and page front matter. --check fails on stale output,
  dead or redirected index links, unwired indexes, version mismatch.
- CI workflow runs the tests and --check on PRs; /scripts in .mintignore.
- llms-index.mdx: absolute .md links, no llms-full pointer, Android SDK
  link fixed, iOS UI Kit v6 (beta) and the CLI added.
- Remove 4 stale redirects that hid navigation pages (sdk/flutter
  group-kick-member, login-listeners, resources-overview;
  rest-api/messages/mark-message-as-interacted); repoint 4 index links
  to the pages actually served.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTtbbFDbCMhFp4XRZfm
@mintlify

mintlify Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cometchat 🟢 Ready View Preview Dec 4, 2026, 1:06 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

Follows the PDF review of docs/llms.txt (2 Dec 2026):
- Summary line names every product (chat, calling, AI agents, moderation,
  notifications, campaigns), not only chat and calling.
- Intro tells agents to fetch only their platform's current-version index.
- "Start here" gives the install command: `npx @cometchat/skills add`
  installs the skills and connects the Docs MCP server.
- New "Platform essentials" section: key concepts, users and auth, REST
  auth, webhooks, push, moderation, Chat REST API, rate limits, network
  allowlist, and the OpenAPI specs with full URLs.
- New "Older versions (legacy)" line pointing to the older-version list
  in llms-full.txt.
- Platform and Widget Builder index lines get descriptions of the section
  (config sectionAbout); llms.txt descriptions capped at 200 characters.
- Real descriptions for fundamentals/overview and the 39 current-version
  pages whose front matter only said "<Title> — CometChat documentation."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTtbbFDbCMhFp4XRZfm
…hts and all widget platforms

- Start here: `npx @cometchat/skills add` installs for Claude Code by
  default (agent-skills.mdx:67); say so and give `--ide <agent>` /
  `--ide all`, so other agents don't install skills where they never look.
- Summary line now includes Insights, a top-level product.
- Widget Builder line lists all six platforms in docs.json (HTML,
  WordPress, Shopify, Squarespace, Wix, Webflow).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTtbbFDbCMhFp4XRZfm

@ketanyekale ketanyekale 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.

Please preserve the page bodies and examples at /docs/llms-full.txt. The existing endpoint lets agents retrieve the corpus in one request. scripts/llms/generate-llms.mjs:292 onward replaces it with titles, descriptions and links. Publish the expanded index at a separate path and add a regression check for representative page content in the full corpus.

…e index as llms-pages.txt

Review: a root llms-full.txt replaced Mintlify's full-text corpus (13.7 MB of page bodies and
code) with our 0.4 MB page index. Removed it so Mintlify serves the corpus again, and moved the
expanded index to llms-pages.txt. llms.txt links both.

- generate-llms.mjs writes llms.txt + llms-pages.txt; --check fails if llms-full.txt or
  llms-full.md is committed at the root, and if a fullCorpus sample line left its page
- check-full-corpus.mjs checks the served llms-full.txt (size + 6 sample lines from real pages)
- llms-full-corpus.yml runs it on the PR's Mintlify preview and daily against production

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTtbbFDbCMhFp4XRZfm
…s not serve llms-pages.txt

Checked on the preview: /llms-pages.txt returned 404. Mintlify serves .txt files only on
Enterprise plans (create/files#supported-file-types); llms.txt and llms-full.txt are special
names. The index is now an unlisted MDX page, llms-pages.mdx, served as Markdown at
/llms-pages.md like the product indexes and llms-index. llms.txt links it there.

- the generator writes it with front matter (Mintlify adds the H1 and description to the .md)
- --check fails if a title or description would put { } or < into the page (breaks MDX)
- it is not treated as a product index

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTtbbFDbCMhFp4XRZfm

@ketanyekale ketanyekale 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.

The full-corpus fix is verified and all 14 tests passed. Please preserve the four existing redirects or document the intended destination for each and obtain docs-owner confirmation for the routing changes. They affect /sdk/flutter/group-kick-member, /sdk/flutter/login-listeners, /sdk/flutter/resources-overview and /rest-api/messages/mark-message-as-interacted. Coordinate the overlapping docs.json edit with #639. If #636 lands first, regenerate both indexes on the new base; the combined tree needed 42 additional links.

ketanyekale
ketanyekale previously approved these changes Dec 4, 2026

@ketanyekale ketanyekale 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.

Reviewed against the six-page LLM discovery PDF. All 20 current product indexes are linked directly as Markdown, the agent tools and platform essentials are discoverable, and the directory no longer recommends loading the full corpus. I also verified the four routing changes independently against production and preview: the Flutter group, login and resources URLs and the REST interacted-message URL each serve their intended page on preview. This resolves my previous routing objection. The marketing root entry and CLI link are a separate follow-up. Please regenerate the indexes on the combined base if the dashboard navigation lands first.

@raj-dubey1

Copy link
Copy Markdown
Contributor Author

@ketanyekale the branch is synced with main (01002bd, 0 commits behind). I regenerated both indexes on the new base and nothing changed: generate-llms.mjs --check finds 0 errors, the generator tests pass 14/14, and check-full-corpus.mjs finds 0 problems.

The four redirects. I'm keeping them removed, and here is where each path ends up. Each source path is a live page in the navigation, with the same file as on main. The redirect was hiding that page, and in one case it sent readers to a page that doesn't exist:

Path Old redirect Where it lands on the live site today After this PR
/sdk/flutter/group-kick-member /sdk/flutter/group-kick-ban-members, a page that doesn't exist the docs home page (404 fallback) its own page, "Ban/Kick Member From A Group"
/sdk/flutter/login-listeners /sdk/flutter/authentication-overview#login-listener that anchor its own page, "Login Listeners"
/sdk/flutter/resources-overview /calls/flutter/overview the Calls Flutter overview, a different product the Flutter SDK "Resources" page
/rest-api/messages/mark-message-as-interacted /rest-api/messages the REST Messages index its own reference page, PATCH /messages/{id}/interacted

@jitvarpatil (CODEOWNERS for /sdk/) and @siva-cometchat (CODEOWNERS for /rest-api/), please confirm these routing changes.

Coordination with #639 / #636. A test merge shows #639 and this PR conflict in docs.json. Since this PR generates the index from the navigation, it should merge last, after #642 → #641 → #657 → #639. Once those are in, I'll merge main into this branch, resolve docs.json and regenerate both indexes on the final base. #636 is still open; if it lands first, I'll regenerate on that base the same way.

@raj-dubey1 raj-dubey1 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Mechanical verdict: approve (round 1, head 01002bdc). Posted as a comment; approval is left to a human.

No blocking issues: 4 minor findings introduced by this PR, none blocks. Round 1, whole review.

The generated files are current, every link resolves, the four redirect removals are safe, and the full-text corpus is still served. The four findings are about contributor process, CI robustness, an undocumented policy and how ungrouped pages are laid out in the index.

Introduced by this PR

  1. F1 minor .github/workflows/llms-check.yml:5. The check is strict byte-for-byte. Any PR that changes a page title, description or the nav, and any merge to main that does so, forces other open PRs to regenerate llms-pages.mdx (361 KB). That also makes merge conflicts in the two generated files likely between concurrent docs PRs. Nothing in CONTRIBUTING.md, README.md or the PR template mentions it (the only instruction is a comment in the workflow and the error text), and community contributors can open fork PRs. Fix: add a short CONTRIBUTING.md section ("if the llms check fails, run node scripts/llms/generate-llms.mjs and commit llms.txt and llms-pages.mdx; on a conflict in those files, re-run the generator, do not merge by hand") and a PR-template checkbox.

  2. F2 minor .github/workflows/llms-full-corpus.yml:40. The preview URL is built from the branch name (lowercase, / to -). It works for this branch (preview serves 200). For a fork PR, which has no preview, or a branch with other characters (the convention allows release/v4.0.0), the job polls for 20 minutes and then fails. The Mintlify slug rule for other characters is unverified. Fix: skip the job when the head repo is not this repo, and take the preview URL from the Mintlify deployment status or comment, or treat "no preview found" as skipped.

  3. F3 minor scripts/llms/generate-llms.mjs:84. hidden is tracked in collectSections but never read. Mintlify's own llms files exclude hidden pages (mintlify.com/docs/ai/llmstxt). This PR publishes hidden sections on purpose for Home (agent skills, MCP, On-Premise, Card Builder, AI-Driven Development), which the ticket asks for. It also publishes the hidden AI Agents > Custom Bots tab (docs.json:6368, llms.txt:70), which nobody asked for. Fix: remove the dead variable and state the policy in llms.config.json, or add an include list, and ask the docs owner about Custom Bots.

  4. F4 minor scripts/llms/generate-llms.mjs:328. When a page has no group after a grouped run, the loop pushes only a blank line, and a blank line does not end a Markdown heading section. So the ungrouped page reads as part of the previous #### group. Example: llms-pages.mdx:333 lists React "Troubleshooting" under "#### Migration Guide" (:327). It happens 28 times (also :431, :521, ...). Fix: emit a neutral heading such as "#### Other pages" when the group becomes empty, or list ungrouped pages before the first group.

Pre-existing / not touched by this PR (never blocking; suggest a ticket)

  • F5 minor rest-api/roles/update.mdx:3: the description says "Update a user's role assignment" for PUT /roles/{role}, which updates a role. It is now copied into llms-pages.mdx.
  • F6 minor rest-api/management-apis/settings/maps-settings.mdx:3: "Configure map provider keys" for POST /apps/{appId}/settings, the generic app-settings endpoint.
  • F7 nit rest-api/management-apis/settings/unmaps-settings.mdx:3: "Manages unmapped settings behavior" does not say what DELETE /apps/{appId}/settings does.
  • minor Several current-version pages still have placeholder descriptions such as "Overview of Extensions in CometChat." (llms-pages.mdx:34, :91, :2127, :2128, ...). They now appear in the agent entry point. The PR fixed the "<Title> — CometChat documentation." pattern only.
  • nit insights.mdx description ("reorganized in a modern landing layout") reads like internal wording and is now in llms.txt:96.
  • minor mint broken-links reports sdk/android/v4/ai-chatbots-overview.mdx -> /ai-chatbots/overview. The file is not in this PR (out of scope in the ticket).
  • nit /ui-kit/react-native/property-changes is in the nav and redirects (generator warning; out of scope in the ticket).

What was checked and holds

  • The 4 removed redirects: each source is a real navigation page with an .mdx at head. Each redirect was added (March/April 2026) when the page was deleted, and the page came back later (May and September 2026), so the redirects are older than the pages. group-kick-member redirected to /sdk/flutter/group-kick-ban-members, which exists only under v4. resources-overview sent readers to the Calls Flutter overview. No repo page depends on the old targets.
  • check-full-corpus.mjs: preview exit 0 (13,744,230 bytes, 6 samples), production exit 0 (13,705,865 bytes). The preview serves the repo llms.txt byte for byte and llms-pages.md as text/markdown. llms-full.txt is not committed.
  • Mintlify docs confirm a custom file overrides the generated one of the same name.
  • 85 of 85 llms.txt URLs and 42 sampled llms-pages URLs return 200. llms-pages.md is not on production until merge.
  • The 40 front-matter descriptions were read against their pages and are accurate. llms-index.mdx links are valid, and the version choices match docs.json defaults. /scripts did not exist on base, so ignoring it hides nothing served.
  • The workflows use contents: read, no secrets, and pass the branch name through env.

Gates

  • python3 -I -c "import json;json.load(open('docs.json'))" -> exit 0
  • node --test scripts/llms/generate-llms.test.mjs -> exit 0 (14/14)
  • node scripts/llms/generate-llms.mjs --check -> exit 0 (1,709 links, 0 errors)
  • mint broken-links -> exit 1, the 1 pre-existing link above (same on base)
  • docs-linkcheck --base df5c5650 --port 3971 . -> exit 0 (PASS)
  • check-full-corpus.mjs against the preview and against production -> exit 0 and exit 0
  • review-ledger.py gate (round 1 completeness contract) -> exit 0; status -> approve

Scope: round 1, head 01002bd, all 55 files. llms.txt was read in full. llms-pages.mdx (generated) was also read line by line, all 2,797 lines; 1,709 of 1,709 links point to real pages that are not redirect sources.

…ssing previews

- llms-pages.mdx: a page outside any group that follows a group now gets an
  "Other pages" heading; 28 pages (Troubleshooting and the like) were listed
  under the group above them.
- llms.config.json hiddenSections: each hidden docs.json section is "include"
  or "exclude". The generator used to record hidden and never read it; now an
  unlisted or stale hidden section fails the check. All 5 stay included, so
  llms.txt is unchanged.
- llms-full-corpus.yml: skip fork PRs (Mintlify builds no preview for them),
  take the preview URL from Mintlify's GitHub deployment of the head commit
  instead of guessing it from the branch name, and skip with a warning when
  there is no preview or it failed, instead of polling 20 minutes and failing.
- CONTRIBUTING.md: what to do when the llms check fails.

Tests: 16/16 (2 new; both fail on the previous generator).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTvmgXRuAZGjBjcjyxd
@raj-dubey1

Copy link
Copy Markdown
Contributor Author

Pushed 1818691:

  • Page index grouping: a page outside any group that comes after a group now gets an "Other pages" heading. Before, 28 pages (for example React's Troubleshooting) were listed under the group above them.
  • Hidden sections: scripts/llms/llms.config.json → hiddenSections marks each hidden docs.json section include or exclude. The generator used to record hidden and never read it. Now the check fails if a hidden section isn't listed, or if a listed one is no longer hidden. All 5 current hidden sections stay included, so llms.txt doesn't change. When docs(ENG-58026): lead the docs with Agent Skills, then MCP, then CLI; Build with AI on every SDK and UI Kit page; skill.md for agents #639 and docs(ENG-58738): add a unified Deployment section covering Shared Cloud, Dedicated Cloud, In Your Cloud and On-Premise #655 merge, AI-Driven Development and On-Premise stop being hidden, so their two lines come out of hiddenSections when this branch is regenerated on top of them.
  • llms-full corpus workflow:
    • Skips PRs from forks, which have no Mintlify preview.
    • Reads the preview URL from Mintlify's GitHub deployment of the head commit, instead of building it from the branch name.
    • When there is no preview, or the preview failed, it skips with a warning instead of polling for 20 minutes and failing. The nightly run still checks production.
  • CONTRIBUTING.md: what to do when the llms check fails (regenerate, then commit both files).

Checks:

  • Tests pass 16/16. The 2 new tests fail on the previous generator.
  • --check exits 0.
  • actionlint exits 0.
  • The deployment lookup was dry-run on this branch's preview, and the corpus check against it exits 0.
  • docs-linkcheck passes.
  • mint broken-links reports only the one link that is also broken on main (sdk/android/v4/ai-chatbots-overview.mdx).

@raj-dubey1

Copy link
Copy Markdown
Contributor Author

@adityagokula2210 @ketanyekale ready for re-review at 1818691.

Known — please don't review these here:

ketanyekale
ketanyekale previously approved these changes Dec 4, 2026

@ketanyekale ketanyekale 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.

The focused generator suite passes all 16 tests, including hidden-section policy and ungrouped pages. Regeneration is clean and the production corpus passes six content probes. The workflow now skips forks and discovers the preview by commit. Keeping Custom Bots included preserves the existing public AI Agents index. Please regenerate both indexes against final main before merge.

@adityagokula2210 adityagokula2210 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve, with two things to settle before merge. Reviewed at 18186915.

  • The generator and the committed llms.txt / llms-pages.mdx look right.
  • The four redirect removals are right: each redirect predates the page now served at its path. sdk/flutter/login-listeners serves the Authentication page live today.
  • The workflow is read-only and skips fork PRs for the corpus job.

Before merge:

  1. Keeping main in sync.

    • llms-check runs only on pull_request and fails unless the committed files match the generator's output byte for byte.
    • Nothing regenerates or checks them on main. Two PRs that each regenerate against their own base both pass, and after both merge the next unrelated PR fails for a change it didn't make.
    • Fork PRs (amitthacker-maker has several open) would need Node locally.

    Pick one and note it in the description:

    • (a) A push to main job that regenerates and commits the files, with the PR check limited to structural errors.
    • (b) Keep the strict check, run it on main too, and tell docs authors before merge.
  2. A nav page hidden by a redirect only warns (generate-llms.mjs:219).

    • That's the bug this PR fixes in four places, and the next one would pass CI.
    • One is live now: ui-kit/react-native/property-changes is in nav (docs.json:1169) but redirected to upgrading-from-v4 (:7119-7120), so "Property Changes" opens the wrong page.
    • Make this an error with an allowlist in llms.config.json, and remove that redirect, or drop the nav entry.

Nits

  • The title says "llms.txt and llms-full.txt", but the PR deliberately doesn't generate llms-full.txt. The description also still says "117 lines" (the file is 134) and "end of llms-full.txt".
  • llms.config.json:11: the installer connects the Docs MCP server only for Claude Code, Cursor, Codex and Gemini (agent-skills.mdx:337), not for every --ide.
  • llms.txt:
    • llms-pages.md is linked twice (:127, :131).
    • notifications/push-overview and moderation/overview appear twice each.
  • generate-llms.mjs:356: o.pages.length counts redirected and url:-only entries. o.pages.filter(isPage).length matches the rest of the generator.

…pages; drop duplicate line

- generate-llms: a nav page that docs.json also redirects is now an error
  (readers never see it), unless llms.config.json redirectedNavAllowed lists
  it; a stale allowlist entry is an error too. Tests cover both, and fail
  with the old generator.
- docs.json: remove /ui-kit/react-native/property-changes ->
  upgrading-from-v4. The 670-line Property Changes page is in the nav and
  linked three times from upgrading-from-v4; live it 308s back to that page.
- Older-version counts use filter(isPage), like the rest of the generator
  (they counted redirected and url-only entries: React v6 67 -> 64).
- llms.config.json: @cometchat/skills 5.2.0 connects the MCP server only for
  agents that support it; drop olderVersions, whose line repeated the
  Optional llms-pages.md link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTvmgXRuAZGjBjcjyxd
- generate-llms --check now exits 2 when the files are only out of date
  and 1 on a structural error (tests cover both, and that an error wins).
- llms-check (PRs) fails only on structural errors and warns on stale
  files, so two PRs that each regenerate, or a fork PR without Node, no
  longer break the next unrelated PR.
- New llms-regenerate (push to main, manual): regenerates and opens or
  updates one PR from docs/llms-regenerate for a person to merge. It never
  commits to main. Needs "Allow GitHub Actions to create and approve pull
  requests" in the repo's Actions settings.
- CONTRIBUTING: what a warning and an error mean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTvmgXRuAZGjBjcjyxd
@raj-dubey1 raj-dubey1 changed the title docs(ENG-58853): generate our own llms.txt and llms-full.txt from docs.json docs(ENG-58853): generate our own llms.txt and llms-pages.md index from docs.json Dec 4, 2026
@raj-dubey1

Copy link
Copy Markdown
Contributor Author

@adityagokula2210 @ketanyekale, thanks. I checked each point before changing anything. The fixes are in f15f5b3e and 5a251d93. The pushes dismissed both approvals; Ketan's "regenerate against final main" needed a push anyway, and main is still df5c5650.

# Claim Proof Verdict Action
1 Nothing keeps main in sync; two regenerating PRs both pass, then an unrelated PR fails; forks need Node llms-check.yml ran only on pull_request; --check failed on any byte difference Correct Raj chose: PRs fail only on structural errors and warn on stale files (--check now exits 2 for stale, 1 for errors). New llms-regenerate.yml (push to main) opens or updates one PR from docs/llms-regenerate; it never commits to main. Needs a repo admin to turn on "Allow GitHub Actions to create and approve pull requests". I can't read that setting (403)
2 A nav page hidden by a redirect only warns; property-changes is live and wrong generate-llms.mjs:219 pushed a warning. curl -sI …/ui-kit/react-native/property-changes: 308 to upgrading-from-v4. The page is 670 lines, distinct, and linked from upgrading-from-v4.mdx:14,193,200 Correct Now an error unless listed in redirectedNavAllowed. The redirect is removed. Tests cover the error, the allowlist and a stale entry, and fail with the old generator
N1 Title and description mention llms-full.txt / 117 lines Title and description Correct Title is now "…llms.txt and llms-pages.md index…". The file is 130 lines now (one duplicate line dropped)
N2 llms.config.json:11: MCP isn't connected for every --ide @cometchat/skills 5.2.0 (npm latest), bin/cometchat-skills.mjs:906-919: written for Claude Code, Cursor, Gemini, Codex, Copilot, Kiro, Antigravity, Continue; Windsurf and Cline only if installed; Replit prints steps; Aider unsupported Correct, but the source is out of date Note now says "for the agents that support it (--no-mcp to skip)". agent-skills.mdx:337 (4 agents, cometchat-docs) is out of date against 5.2.0 (the server is cometchat). That's a separate follow-up, not in this PR
N3 llms-pages.md linked twice llms.txt:127,131 Correct The "Older versions (legacy)" line is removed; the Optional line already covers older versions
N4 push-overview and moderation/overview twice llms.txt:76,83 vs :113,114, from platformTopics in config Correct, but intended Kept: "Platform essentials" is the cross-product list, with its own labels
N5 :356 counts redirected and url:-only entries Regenerated both ways: React v6 67 vs 64, v4 111 vs 108, RN v4 83 vs 81 Correct o.pages.filter(isPage).length

Gates at 5a251d93:

  • node --test scripts/llms/generate-llms.test.mjs: 16 passed, exit 0. With the generator change reverted, 1 fails (exit 1).
  • generate-llms.mjs --check: exit 0.
  • The check step run locally: clean exit 0; stale exit 0 with a warning; the property-changes redirect put back exit 1.
  • docs-linkcheck: PASS.
  • mint broken-links: only the pre-existing sdk/android/v4/ai-chatbots-overview.mdx link, the same on main.
  • CI: llms, corpus, link-rot and branch-name all pass.

The nav interleaves a group's own pages with its subgroups, and standalone
pages with groups, so following it page by page repeated headings: up to
four "Other pages" in a section (JavaScript SDK v4), three
"Features › Extensions" in Platform. Each group's pages are now gathered,
in nav order, under its first appearance; standalone pages after a group go
under one "Other pages" at the end of the section. Pages before the first
group stay first. Same 1,710 links; no section repeats a heading. Two new
tests; both fail with the old generator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTvmgXRuAZGjBjcjyxd
@raj-dubey1

Copy link
Copy Markdown
Contributor Author

ddd4448d: one heading per group in llms-pages.mdx. Following the nav page by page repeated headings: up to four "Other pages" in a section (JavaScript, React Native, iOS and Android SDK v4/v5) and three "Features › Extensions" in Platform. Each group's pages are now gathered, in nav order, under its first heading. Standalone pages after a group go under one "Other pages" at the end of the section, and pages before the first group stay first. The file keeps the same 1,710 links, and no section repeats a heading.

Evidence:

  • Generator tests: 18 passed, exit 0. With the generator change reverted, the two new tests fail (exit 1).
  • --check: exit 0.
  • docs-linkcheck: PASS.
  • CI llms, corpus, link-rot and Mintlify Deployment: pass.

llms.txt no longer lists llms-full.txt under Optional, and the llms-pages
intro no longer mentions it. At over 10 MB (about 3 million tokens) it is
too big for an agent to read, and the per-product indexes already do the
job (Arun's LLM review, 3 Dec). Mintlify still generates the file; the
check that a committed root llms-full.txt is an error and the deployed
corpus check are unchanged. The unused fullCorpus.description is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTvmgXRuAZGjBjcjyxd
The corpus check on f6cf824 failed with a 404 for llms-full.txt one
second after the preview started serving the new llms.txt; a minute later
the same URL returned 200 with the full 13.7 MB corpus. When the check is
waiting for a deployment (--wait-for), it now retries llms-full.txt every
20 s until the same deadline. A production run still fails on the first
non-200.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTvmgXRuAZGjBjcjyxd

@ketanyekale ketanyekale 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.

Verified all 18 tests and the served preview corpus. The new retry handles a transient preview 404 with a bounded wait while production checks still fail immediately. The generated index matches the preview and no longer directs agents to the full corpus; the corpus itself remains available. Regenerate both indexes against final main before merge. The repo reports can_approve_pull_request_reviews=false, so automatic drift-repair PR creation needs admin authorization or a manual regeneration PR process.

This branch was successfully deployed

1 active (outdated) deployment
staging — f6cf824e Deployed Dec 4, 2026 by mintlify[bot]
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.

3 participants