Skip to content

chore: add script to report broken llms.txt links from docs.mapbox.com - #39

Open
mattpodwysocki wants to merge 3 commits into
mainfrom
chore/check-llms-links
Open

chore: add script to report broken llms.txt links from docs.mapbox.com#39
mattpodwysocki wants to merge 3 commits into
mainfrom
chore/check-llms-links

Conversation

@mattpodwysocki

@mattpodwysocki mattpodwysocki commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds scripts/check-llms-links.cjs (npm run check-llms-links) which fetches the root docs.mapbox.com/llms.txt index, discovers every product llms.txt it links to, and checks each URL for a 2xx status
  • Also cross-checks against the curated list in src/utils/docsSearchIndex.ts and flags any entries that have drifted from the live root index (currently: studio-manual/llms.txt vs the root's console-tools/llms.txt)
  • Adds npm run check-llms-links:deep (--deep flag): additionally extracts every docs.mapbox.com sub-link referenced inside each llms.txt (~1,400 URLs today) and checks those too, with bounded concurrency (10 in flight). Our weekly 404 report only surfaces broken sub-links customers have already hit through the MCP server — this proactively catches broken doc pages nobody's found yet.
  • Exits non-zero on any non-2xx response, so it can be run ad hoc or wired into CI/a scheduled job later

Test plan

  • npm run check-llms-links — ran locally, all 25 discovered llms.txt URLs return 200
  • npm run check-llms-links:deep — ran locally, discovered 1,388 unique sub-links, all return 200
  • npm test — 83 tests passing
  • npm run lint and npm run format — passing

🤖 Generated with Claude Code

Discovers every llms.txt exposed via the root index, checks each for
2xx, and flags when docsSearchIndex.ts's curated list has drifted from
the live root index (e.g. studio-manual/llms.txt vs console-tools/llms.txt).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mattpodwysocki
mattpodwysocki requested a review from a team as a code owner August 3, 2026 16:54
mattpodwysocki and others added 2 commits August 3, 2026 13:00
Weekly 404 reports only surface broken sub-links customers already
hit through the MCP server, not ones nobody's found yet. --deep
extracts every docs.mapbox.com link referenced inside each llms.txt
(~1,400 URLs today) and checks it with bounded concurrency, so we can
catch a broken doc page before a customer does.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant