feat(LLMs): Added llms.txt and SKILL.md for better LLMs friendliness#17762
feat(LLMs): Added llms.txt and SKILL.md for better LLMs friendliness#17762sfanahata wants to merge 3 commits into
Conversation
… 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.
…te with the latest on Sentry.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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); | ||
| } |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 66baa53. Configure here.
|
|
||
| ## Platforms | ||
|
|
||
| ${buildPlatformsSection(platformsNode)} |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 66baa53. Configure here.
| // --- Main --- | ||
|
|
||
| async function main() { | ||
| const doctreePath = path.join(ROOT, 'public', 'doctree.json'); |
There was a problem hiding this comment.
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.


DESCRIBE YOUR PR
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-airepo.IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
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