| name | technical-docs |
| description | Write and review technical documentation for Sentry SDK docs. Use when creating, editing, or reviewing documentation pages, especially MDX files in docs/platforms/. |
Technical Documentation Writing
Core Principles
1. Lead with "Why", Then "How"
Every section must answer: Why would a developer need this?
Bad:
## Server Actions
Use `captureException` in Server Actions to report errors.
Good:
## Server Actions
Server Actions that return error states to the client catch errors before Sentry sees them.
Report these manually so you don't lose visibility.
2. Structure by User Intent, Not API Surface
Organize around what developers are trying to do, not around API methods.
Bad structure (API-centric):
- captureException
- captureMessage
- withScope
Good structure (intent-centric):
- Errors that need manual capture (and why)
- Adding context to errors
- Troubleshooting missing errors
3. Avoid Redundant Examples
If the same pattern appears in multiple sections, consolidate it.
Ask yourself: "Am I showing the same code pattern again? If yes, reference the earlier example instead."
Bad:
## Error Boundaries
Sentry.captureException(error);
## Server Actions
Sentry.captureException(error);
## API Routes
Sentry.captureException(error);
Good:
## Where Manual Capture is Needed
These Next.js patterns catch errors before Sentry sees them:
- Error boundaries (error.tsx files)
- Server Actions returning error states
- API routes with custom error responses
[Single example with explanation of the pattern]
4. Be Precise About When/Why