Skip to content

docs: documentation audit — fix gaps between code and docs#724

Closed
cursor[bot] wants to merge 1 commit intomainfrom
cursor/sentry-cli-documentation-audit-35db
Closed

docs: documentation audit — fix gaps between code and docs#724
cursor[bot] wants to merge 1 commit intomainfrom
cursor/sentry-cli-documentation-audit-35db

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor bot commented Apr 13, 2026

Documentation Audit

Full cross-reference of the Sentry CLI implementation against all documentation surfaces (README, docs site, DEVELOPMENT.md, contributing.md). The detailed audit report is in DOCUMENTATION_AUDIT.md.

Changes

README.md

  • Added 4 missing commands to the commands table: release, repo, team, trial
  • Updated event description from "View event details" → "List and view event details" (event list exists)
  • Added yarn to package manager install examples
  • Added Node.js ≥22 requirement note for npm users

DEVELOPMENT.md

  • Fixed OAuth scopes: added missing team:write scope

docs/src/content/docs/self-hosted.md

  • Fixed OAuth scopes: added missing team:write to the token creation instructions

docs/src/content/docs/configuration.md

  • Added 5 undocumented environment variables: SENTRY_FORCE_ENV_TOKEN, SENTRY_OUTPUT_FORMAT, SENTRY_MAX_PAGINATION_PAGES, SENTRY_INIT, SENTRY_CLI_NO_AUTO_REPAIR (first 4)

docs/src/content/docs/contributing.md

  • Updated project structure from 5 command directories to all 15+ that actually exist

docs/src/content/docs/agentic-usage.md

  • Added Cursor as a supported agent alongside Claude Code
  • Replaced generic npx skills add with actual Claude Code plugin install commands
  • Added section on automatic skill installation via sentry cli setup
  • Added "Other Agents" section matching plugins/README.md

docs/src/content/docs/getting-started.mdx

  • Added installer options table documenting --no-modify-path, --no-completions, SENTRY_INSTALL_DIR, SENTRY_INIT
  • Added supported platforms list (macOS, Linux, Windows x64)

DOCUMENTATION_AUDIT.md (new)

  • Full structured gap report with sections A–J covering: undocumented commands, undocumented flags, missing examples, stale descriptions, skill generator mappings, installation gaps, undocumented env vars, auth/self-hosted gaps, plugin/skills gaps, and README/DEVELOPMENT drift
  • Prioritized top 5 most impactful fixes
Open in Web View Automation 

- Add missing commands to README table (release, repo, team, trial)
- Add yarn to README package manager examples
- Add Node.js >=22 note for npm users
- Fix OAuth scope lists: add missing team:write in DEVELOPMENT.md and self-hosted.md
- Add undocumented env vars to configuration.md (SENTRY_FORCE_ENV_TOKEN, SENTRY_OUTPUT_FORMAT, SENTRY_MAX_PAGINATION_PAGES, SENTRY_INIT)
- Update contributing.md project structure to reflect all 15+ command directories
- Add Cursor support to agentic-usage.md alongside Claude Code
- Document installer flags and SENTRY_INIT in getting-started.mdx
- Add DOCUMENTATION_AUDIT.md with full gap report

Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

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).


Bug Fixes 🐛

Upgrade

  • Detect npm install method from node_modules path by BYK in #723
  • Add shell option on Windows for .cmd package managers by BYK in #722

Other

  • (dashboard) Remove overly restrictive dataset-display cross-validation by BYK in #720
  • (init) Remove JSON minification that breaks edit-based codemods by betegon in #719
  • (issue) Support share issue URLs by BYK in #718

Documentation 📚

  • Documentation audit — fix gaps between code and docs by cursor[bot] in #724

Internal Changes 🔧

  • Regenerate skill files by github-actions[bot] in ca16b2ff

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1.8.1

QR code for preview link

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

Built to branch gh-pages at 2026-04-13 12:14 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

Codecov Results 📊

134 passed | Total: 134 | 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 1601 uncovered lines.
❌ Project coverage is 95.29%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    95.30%    95.29%    -0.01%
==========================================
  Files          232       232         —
  Lines        33993     33992        -1
  Branches         0         0         —
==========================================
+ Hits         32395     32391        -4
- Misses        1598      1601        +3
- Partials         0         0         —

Generated by Codecov Action

@BYK
Copy link
Copy Markdown
Member

BYK commented Apr 13, 2026

Superseded by #739, which addresses the same gaps with auto-generation infrastructure instead of manual fixes.

@BYK BYK closed this Apr 13, 2026
BYK added a commit that referenced this pull request Apr 13, 2026
## Summary

Eliminates documentation drift by auto-generating content from source
code. Replaces #724 with a structural fix instead of manual patching.

- **configuration.md**: Env var reference now generated from
`src/lib/env-registry.ts` using the existing fragment pattern. Adds 6
previously undocumented env vars.
- **contributing.md**: Project structure tree generated from Stricli
route tree via `GENERATED:START/END` markers (was listing 5 command
dirs, now correctly shows 15+).
- **DEVELOPMENT.md & self-hosted.md**: OAuth scopes generated from
exported `OAUTH_SCOPES` array (fixes missing `team:write`).
- **README.md**: Removed driftable commands table, replaced with pointer
to docs site.

## Why

PR #724 identified real documentation gaps (missing commands in README,
missing `team:write` in OAuth scopes, 6 undocumented env vars, stale
project structure). But manually fixing them leaves the same drift
problem — the docs will go stale again next time someone adds a command,
env var, or OAuth scope.

This PR instead makes the documentation self-updating:

| Surface | Source of Truth | Generation |
|---------|----------------|-----------|
| Env var reference | `src/lib/env-registry.ts` | Full-page (fragment
pattern, gitignored) |
| Project structure | Route tree introspection | Marker injection in
committed file |
| OAuth scopes | `OAUTH_SCOPES` export from `oauth.ts` | Marker
injection in committed files |
| README commands | Removed | N/A (points to docs site) |

## New infrastructure

- **`src/lib/env-registry.ts`** — Centralized env var metadata catalog
(23 entries). Doc-generation data source only, no runtime changes.
- **`script/generate-docs-sections.ts`** — Marker-based injection for
committed files (`GENERATED:START/END` named markers). Supports
`--check` for CI.
- **`generate-command-docs.ts`** extended to also produce
`configuration.md` from registry + fragment.
- CI `check:docs-sections` validates markers aren't stale. Auto-commits
regenerated files on non-fork PRs.

All generators run as part of `bun run generate:docs` (already in `dev`,
`build`, `typecheck`, `test` chains).

Closes #724
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