Skip to content

docs: fix documentation gaps and embed skill files at build time#606

Merged
BYK merged 1 commit intomainfrom
cursor/sentry-cli-docs-gaps-a5b1
Mar 30, 2026
Merged

docs: fix documentation gaps and embed skill files at build time#606
BYK merged 1 commit intomainfrom
cursor/sentry-cli-docs-gaps-a5b1

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor bot commented Mar 30, 2026

Summary

Fix genuine documentation gaps not covered by the auto-generation infrastructure in #569, and eliminate the CLI → GitHub → CLI roundtrip for skill file installation.

Documentation fixes

  • Add SENTRY_AUTH_TOKEN and SENTRY_TOKEN to configuration.md — primary CI/CD auth variables were missing from the env vars reference
  • Add SENTRY_INSTALL_DIR and SENTRY_NO_CACHE to configuration.md — undocumented env vars
  • Add project:admin to OAuth scopes in DEVELOPMENT.md and self-hosted.md — code requests 8 scopes but docs listed only 7; self-hosted users creating API tokens with the documented scopes would get permission errors
  • Expand README commands table from 6 to 14 entries
  • Add missing examples for auth logout, auth refresh, auth token, project create, project delete, cli setup
  • Fix config.dbcli.db in auth credential storage docs
  • Fix SENTRY_AUTH_TOKEN priority label — was incorrectly marked "legacy"; it is the primary env var
  • Align curl install flags (-fsS) between README and docs site

Embed skill files at build time

Previously, sentry cli setup fetched skill files from GitHub at runtime — fetching content that was generated from the CLI's own source code. This was a roundtrip: the CLI generates skill files from Stricli introspection, they live in the repo, and then the CLI fetches them back from GitHub by URL, using a hardcoded REFERENCE_FILES array that required codegen to keep in sync.

Now:

  • generate-skill.ts produces src/generated/skill-content.ts that inlines all skill file contents (~47KB) as a Map<string, string>
  • agent-skills.ts imports the embedded content and writes it directly to ~/.claude/skills/ — no network fetch, no URL construction, no version-pinning logic
  • REFERENCE_FILES array, getSkillUrl(), fetchSingleFile(), fetchAllSkillFiles(), fetchSkillContent() — all removed
  • generate:skill is chained before build/dev/typecheck/test in package.json (like generate:sdk)
  • check-skill.ts verifies skill-content.ts stays in sync with generated markdown files

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (telemetry) Add seer.outcome span tag for Seer command metrics by BYK in #609
  • (upgrade) Show changelog summary during CLI upgrade by BYK in #594

Bug Fixes 🐛

Upgrade

  • Prevent spinner freeze during delta patch application by BYK in #608
  • Indent changelog, add emoji to heading, hide empty sections by BYK in #604

Other

  • (dashboard) Reject MRI queries with actionable tracemetrics guidance by BYK in #601
  • (skill) Avoid unnecessary auth, reinforce auto-detection, fix field examples by BYK in #599
  • 2 bug fixes — subcommand crash, negative span depth, pagination JSON parse by cursor in #607

Documentation 📚

  • (skill) Document dashboard widget constraints and deprecated datasets by BYK in #605
  • Fix documentation gaps and embed skill files at build time by cursor[bot] in #606

Internal Changes 🔧

  • Regenerate skill files and command docs by github-actions[bot] in 664362ca

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/pr-preview/pr-606/

Built to branch gh-pages at 2026-03-30 17:59 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

Codecov Results 📊

129 passed | Total: 129 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 1275 uncovered lines.
❌ Project coverage is 95.73%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    95.74%    95.73%    -0.01%
==========================================
  Files          203       204        +1
  Lines        29936     29876       -60
  Branches         0         0         —
==========================================
+ Hits         28661     28601       -60
- Misses        1275      1275         —
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK force-pushed the cursor/sentry-cli-docs-gaps-a5b1 branch from 457d0d4 to bcaf09d Compare March 30, 2026 16:31
@BYK BYK changed the title docs: fix documentation gaps found in comprehensive audit docs: fix documentation gaps and auto-sync REFERENCE_FILES Mar 30, 2026
@BYK BYK force-pushed the cursor/sentry-cli-docs-gaps-a5b1 branch from bcaf09d to 6656366 Compare March 30, 2026 17:13
@BYK BYK changed the title docs: fix documentation gaps and auto-sync REFERENCE_FILES docs: fix documentation gaps and embed skill files at build time Mar 30, 2026
@BYK BYK marked this pull request as ready for review March 30, 2026 17:28
@BYK BYK force-pushed the cursor/sentry-cli-docs-gaps-a5b1 branch 3 times, most recently from 106505c to 9316180 Compare March 30, 2026 17:52
Copy link
Copy Markdown
Contributor Author

@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 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@BYK
Copy link
Copy Markdown
Member

BYK commented Mar 30, 2026

Fixed the Bugbot finding: removed skill-content.ts from check-skill.ts staleness comparison since it's gitignored. The markdown files and index.json are the committed artifacts checked for freshness — if they're in sync, skill-content.ts will also be correct since the generator produces both in the same run.

Fix genuine documentation gaps not covered by auto-generation (#569):
- Add SENTRY_AUTH_TOKEN/SENTRY_TOKEN to configuration.md
- Add SENTRY_INSTALL_DIR/SENTRY_NO_CACHE to configuration.md
- Add project:admin scope to DEVELOPMENT.md and self-hosted.md
- Expand README commands table from 6 to 14 entries
- Fix credential storage path (config.db -> cli.db) in auth docs
- Fix SENTRY_AUTH_TOKEN priority label (was marked legacy, is primary)
- Add missing examples for auth logout/refresh/token, project
  create/delete, cli setup
- Align curl install flags (-fsS) between README and docs site

Embed skill files at build time instead of fetching from GitHub:
- generate-skill.ts now produces src/generated/skill-content.ts that
  inlines all skill file contents as a Map<string, string>
- agent-skills.ts imports the embedded content and writes it directly
  to ~/.claude/skills/ — no network fetch, no URL construction, no
  REFERENCE_FILES array, no version-pinning logic
- check-skill.ts verifies skill-content.ts stays in sync
- generate:skill chained before build/dev/typecheck in package.json

This eliminates the CLI -> GitHub -> CLI roundtrip where skill files
generated from the source code were fetched back from GitHub at runtime.
@BYK BYK force-pushed the cursor/sentry-cli-docs-gaps-a5b1 branch from 9316180 to 4c4b734 Compare March 30, 2026 17:59
@BYK BYK merged commit e97249f into main Mar 30, 2026
23 checks passed
@BYK BYK deleted the cursor/sentry-cli-docs-gaps-a5b1 branch March 30, 2026 18:21
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