Skip to content

feat(LLMs): Added llms.txt and SKILL.md for better LLMs friendliness#17762

Draft
sfanahata wants to merge 3 commits into
masterfrom
feat/llms-txt-and-root-skill
Draft

feat(LLMs): Added llms.txt and SKILL.md for better LLMs friendliness#17762
sfanahata wants to merge 3 commits into
masterfrom
feat/llms-txt-and-root-skill

Conversation

@sfanahata
Copy link
Copy Markdown
Contributor

@sfanahata sfanahata commented May 13, 2026

DESCRIBE YOUR PR

  • Added new script (generate-llms-txt.mjs) to generate an llms.txt file that will be available publicly on the docs site.
  • Created an new SKILL.md file that references our sentry-for-ai repo and our skills.sentry.dev site, and points to our AGENTS.md and other skill pages within the repo.

Preview: https://sentry-docs-git-feat-llms-txt-and-root-skill.sentry.dev/llms.txt

Why?
This will help LLMs have better guidance navigating our docs, as well as finding the appropriate skills and references for configuration. It will also help LLMs get the proper instructions on how to stay up to date with the latest about how Sentry works, including new features. It also directly points to https://skills.sentry.dev and the sentry-for-ai repo.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

Shannon Anahata added 2 commits May 13, 2026 16:31
… that will be available publicly on the docs site. Create an new SKILL.md file that references our sentry-for-ai repo and our skills.sentry.dev site, and points to our AGENTS.md and other skill pages within the repo.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Error Error May 13, 2026 11:51pm
sentry-docs Ready Ready Preview, Comment May 13, 2026 11:51pm

Request Review

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

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 and found 2 potential issues.

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 66baa53. Configure here.

'Error: public/doctree.json not found. Run `pnpm generate-doctree` first.'
);
process.exit(1);
}
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.

Developer docs build crashes on missing doctree file

High Severity

The script hardcodes reading public/doctree.json, but developer-docs builds (build:developer-docs, vercel:build:developer-docs) produce public/doctree-dev.json instead. Since those builds invoke pnpm build — which now includes pnpm generate-llms-txt — the script will fail to find doctree.json, hit process.exit(1), and break the entire developer-docs build pipeline. The sibling script generate-md-exports.mjs correctly checks process.env.NEXT_PUBLIC_DEVELOPER_DOCS to select the right filename.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 66baa53. Configure here.


## Platforms

${buildPlatformsSection(platformsNode)}
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.

Unguarded platformsNode crashes on undefined access

Medium Severity

topLevelSections.find(c => c.slug === 'platforms') can return undefined (e.g. if the platforms node lacks a title and is filtered out by isVisible). Passing undefined to buildPlatformsSection causes getVisibleChildren to throw a TypeError on node.children. The equivalent function in generate-md-exports.mjs includes a null guard (if (!platformsNode) return ''), but this script does not.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 66baa53. Configure here.

@sfanahata sfanahata requested a review from sergical May 13, 2026 23:44
// --- Main ---

async function main() {
const doctreePath = path.join(ROOT, 'public', 'doctree.json');
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.

Bug: The script generate-llms-txt.mjs hardcodes the path to doctree.json and does not respect the NEXT_PUBLIC_DEVELOPER_DOCS environment variable, causing the developer docs build to fail.
Severity: HIGH

Suggested Fix

Update generate-llms-txt.mjs to dynamically determine the filename based on the NEXT_PUBLIC_DEVELOPER_DOCS environment variable. If the variable is set, the script should use doctree-dev.json; otherwise, it should use doctree.json.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: scripts/generate-llms-txt.mjs#L105

Potential issue: The script `generate-llms-txt.mjs` hardcodes the path to
`doctree.json`. However, when the `NEXT_PUBLIC_DEVELOPER_DOCS` environment variable is
set, the build process generates `doctree-dev.json`. Because the developer docs build
script sets this environment variable and then runs `generate-llms-txt.mjs`, the script
fails to find the `doctree.json` file, causing the developer docs build to fail.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

@sfanahata i think this is valid

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