diff --git a/.claude/skills/sentry-docs/SKILL.md b/.claude/skills/sentry-docs/SKILL.md new file mode 100644 index 0000000000000..9fa42b1a8f6b1 --- /dev/null +++ b/.claude/skills/sentry-docs/SKILL.md @@ -0,0 +1,202 @@ +--- +name: sentry-docs +description: Search and fetch Sentry documentation. Use when users ask about Sentry SDK setup, configuration, integrations, error monitoring, tracing, session replay, logs, crons, or when developing/contributing to Sentry SDKs. Covers both user-facing docs (docs.sentry.io) and SDK development docs (develop.sentry.dev). +--- + +# Sentry Documentation Search Skill + +This skill enables searching and fetching documentation from Sentry's two documentation sites. + +## Documentation Sites + +### docs.sentry.io (User Documentation) +For developers **using** Sentry in their applications: +- SDK installation and setup +- Framework integrations (Next.js, Django, Laravel, etc.) +- Features: Error monitoring, Tracing, Session Replay, Logs, Crons, Profiling +- Configuration and sampling +- Troubleshooting + +### develop.sentry.dev (SDK Development Documentation) +For developers **building or contributing to** Sentry: +- SDK development guidelines +- Data model (envelopes, event payloads, interfaces) +- Protocol specifications +- Telemetry (logs, metrics, traces) +- Backend/frontend architecture +- Self-hosted Sentry + +## URL Patterns + +### docs.sentry.io +Both sites serve **markdown** when you append `.md` to any URL path. + +``` +# Platform quick start +https://docs.sentry.io/platforms/{platform}.md + +# Framework guide +https://docs.sentry.io/platforms/{platform}/guides/{framework}.md + +# Specific topic within a guide +https://docs.sentry.io/platforms/{platform}/guides/{framework}/{topic}.md + +# Platform integrations (Python-style - integrations under platform) +https://docs.sentry.io/platforms/{platform}/integrations/{integration}.md + +# Features +https://docs.sentry.io/platforms/{platform}/guides/{framework}/tracing.md +https://docs.sentry.io/platforms/{platform}/guides/{framework}/session-replay.md +https://docs.sentry.io/platforms/{platform}/guides/{framework}/logs.md +https://docs.sentry.io/platforms/{platform}/guides/{framework}/configuration.md +https://docs.sentry.io/platforms/{platform}/guides/{framework}/troubleshooting.md +``` + +### develop.sentry.dev +``` +# SDK development +https://develop.sentry.dev/sdk/{topic}.md + +# Data model +https://develop.sentry.dev/sdk/data-model/envelopes.md +https://develop.sentry.dev/sdk/data-model/event-payloads.md +https://develop.sentry.dev/sdk/data-model/event-payloads/{interface}.md + +# Telemetry +https://develop.sentry.dev/sdk/telemetry/logs.md +https://develop.sentry.dev/sdk/telemetry/metrics.md +https://develop.sentry.dev/sdk/telemetry/traces.md +``` + +## Supported Platforms and Frameworks + +### JavaScript/TypeScript +- **Platform**: `javascript` +- **Guides**: `nextjs`, `react`, `vue`, `angular`, `svelte`, `sveltekit`, `remix`, `gatsby`, `astro`, `nuxt`, `solidstart`, `express`, `fastify`, `nestjs`, `koa`, `hapi`, `node`, `bun`, `deno`, `electron`, `capacitor`, `cordova`, `cloudflare` + +### Python +- **Platform**: `python` +- **Integrations** (not guides): `django`, `flask`, `fastapi`, `celery`, `tornado`, `pyramid`, `aiohttp`, `bottle`, `falcon`, `starlette`, `quart`, `litestar`, `chalice`, `aws-lambda`, `gcp-functions`, `logging`, `loguru`, `sqlalchemy`, `redis`, `rq`, `huey`, `dramatiq`, `arq`, `langchain`, `openai`, `anthropic` + +### PHP +- **Platform**: `php` +- **Guides**: `laravel`, `symfony` + +### Ruby +- **Platform**: `ruby` +- **Guides**: `rails`, `sidekiq`, `delayed_job`, `resque`, `rack` + +### Java +- **Platform**: `java` +- **Guides**: `spring`, `spring-boot`, `logback`, `log4j2`, `jul` + +### Go +- **Platform**: `go` +- **Guides**: `echo`, `gin`, `fiber`, `fasthttp`, `http`, `iris`, `negroni`, `logrus`, `slog`, `zerolog` + +### .NET +- **Platform**: `dotnet` +- **Guides**: `aspnetcore`, `aspnet`, `maui`, `wpf`, `winforms`, `blazor-webassembly`, `azure-functions`, `aws-lambda`, `google-cloud-functions`, `serilog`, `nlog`, `log4net` + +### Mobile +- **Android**: `android` (platform), guides: `kotlin` +- **iOS/Apple**: `apple` (platform), guides: `ios`, `macos`, `tvos`, `watchos`, `visionos` +- **React Native**: `react-native` (platform) +- **Flutter**: `dart` (platform), guide: `flutter` +- **Kotlin Multiplatform**: `kotlin` (platform), guide: `multiplatform` + +### Gaming +- **Unity**: `unity` (platform) +- **Unreal**: `unreal` (platform) +- **Godot**: `godot` (platform) + +### Native/Other +- **Native/C++**: `native` (platform) +- **Rust**: `rust` (platform) +- **Elixir**: `elixir` (platform) +- **PowerShell**: `powershell` (platform) + +## How to Use This Skill + +### Step 1: Determine the documentation site + +| User Need | Site | +|-----------|------| +| Setting up Sentry in an app | docs.sentry.io | +| Configuring SDK features | docs.sentry.io | +| Framework-specific integration | docs.sentry.io | +| Troubleshooting SDK issues | docs.sentry.io | +| SDK development/contributing | develop.sentry.dev | +| Protocol/data model specs | develop.sentry.dev | +| Understanding envelope format | develop.sentry.dev | +| Self-hosted Sentry | develop.sentry.dev | + +### Step 2: Construct the URL + +**For user documentation (docs.sentry.io):** +``` +# Basic pattern +https://docs.sentry.io/platforms/{platform}/guides/{framework}/{topic}.md + +# Examples +https://docs.sentry.io/platforms/javascript/guides/nextjs.md +https://docs.sentry.io/platforms/javascript/guides/nextjs/tracing.md +https://docs.sentry.io/platforms/python/integrations/django.md +https://docs.sentry.io/platforms/python/integrations/fastapi.md +``` + +**For SDK development documentation (develop.sentry.dev):** +``` +# Basic pattern +https://develop.sentry.dev/sdk/{section}/{topic}.md + +# Examples +https://develop.sentry.dev/sdk/data-model/envelopes.md +https://develop.sentry.dev/sdk/data-model/event-payloads/span.md +https://develop.sentry.dev/sdk/telemetry/logs.md +``` + +### Step 3: Fetch the documentation + +Use `web_fetch` to retrieve the markdown content: +``` +web_fetch(url="https://docs.sentry.io/platforms/javascript/guides/nextjs.md") +``` + +### Step 4: If URL doesn't work, search first + +If a direct URL returns 404 or unexpected content, use `web_search` to find the correct path: +``` +web_search(query="site:docs.sentry.io nextjs session replay configuration") +``` + +Then fetch the URL from search results. + +## Common Query Patterns + +| User Query | Constructed URL | +|------------|-----------------| +| "How do I set up Sentry in Next.js?" | `https://docs.sentry.io/platforms/javascript/guides/nextjs.md` | +| "Django Sentry integration" | `https://docs.sentry.io/platforms/python/integrations/django.md` | +| "Sentry tracing in FastAPI" | `https://docs.sentry.io/platforms/python/integrations/fastapi.md` then look for tracing section | +| "Session replay React" | `https://docs.sentry.io/platforms/javascript/guides/react/session-replay.md` | +| "Sentry envelope format" | `https://develop.sentry.dev/sdk/data-model/envelopes.md` | +| "Span interface specification" | `https://develop.sentry.dev/sdk/data-model/event-payloads/span.md` | +| "How to contribute to Python SDK" | `https://develop.sentry.dev/sdk/` then search for contribution guidelines | + +## Important Notes + +1. **Python uses "integrations" not "guides"**: Unlike JavaScript which uses `/guides/nextjs`, Python uses `/integrations/django` + +2. **Always add `.md` suffix**: Both sites serve markdown when you append `.md` to the URL + +3. **Search as fallback**: If direct URL construction fails, use web search with `site:docs.sentry.io` or `site:develop.sentry.dev` + +4. **Check for nested topics**: Many features have sub-pages: + - `/tracing/instrumentation/custom-instrumentation.md` + - `/tracing/distributed-tracing.md` + - `/configuration/sampling.md` + +5. **Product features documentation**: For product features (not SDK-specific), check: + - `https://docs.sentry.io/product/{feature}.md` + - Example: `https://docs.sentry.io/product/ai-in-sentry/seer.md` diff --git a/.claude/skills/sentry-docs/data-model.md b/.claude/skills/sentry-docs/data-model.md new file mode 100644 index 0000000000000..51b93e7181e29 --- /dev/null +++ b/.claude/skills/sentry-docs/data-model.md @@ -0,0 +1,54 @@ +# Sentry SDK Data Model Reference + +Quick reference for develop.sentry.dev data model documentation paths. + +## Envelope & Transport +| Topic | URL | +|-------|-----| +| Envelopes | `https://develop.sentry.dev/sdk/data-model/envelopes.md` | +| Envelope Items | `https://develop.sentry.dev/sdk/data-model/envelope-items.md` | + +## Event Payloads +| Interface | URL | +|-----------|-----| +| Event Payloads (overview) | `https://develop.sentry.dev/sdk/data-model/event-payloads.md` | +| Exception Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/exception.md` | +| Message Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/message.md` | +| Stack Trace Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/stacktrace.md` | +| Template Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/template.md` | +| User Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/user.md` | +| Request Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/request.md` | +| Contexts Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/contexts.md` | +| Breadcrumbs Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/breadcrumbs.md` | +| Debug Meta Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/debugmeta.md` | +| SDK Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/sdk.md` | +| Threads Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/threads.md` | + +## Tracing +| Topic | URL | +|-------|-----| +| Span Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/span.md` | +| Transaction Payloads | `https://develop.sentry.dev/sdk/data-model/event-payloads/transaction.md` | + +## Other Data Types +| Topic | URL | +|-------|-----| +| Replay Recordings | `https://develop.sentry.dev/sdk/data-model/event-payloads/replay-recording.md` | +| Lock Reason Interface | `https://develop.sentry.dev/sdk/data-model/event-payloads/lockreason.md` | + +## Telemetry +| Topic | URL | +|-------|-----| +| Logs | `https://develop.sentry.dev/sdk/telemetry/logs.md` | +| Metrics | `https://develop.sentry.dev/sdk/telemetry/metrics.md` | +| Traces | `https://develop.sentry.dev/sdk/telemetry/traces.md` | + +## SDK Development +| Topic | URL | +|-------|-----| +| SDK Overview | `https://develop.sentry.dev/sdk/` | +| SDK Philosophy | `https://develop.sentry.dev/sdk/philosophy.md` | +| Features | `https://develop.sentry.dev/sdk/features.md` | +| Sessions | `https://develop.sentry.dev/sdk/sessions.md` | +| Rate Limiting | `https://develop.sentry.dev/sdk/rate-limiting.md` | +| Client Reports | `https://develop.sentry.dev/sdk/client-reports.md` | diff --git a/.claude/skills/sentry-docs/platforms.md b/.claude/skills/sentry-docs/platforms.md new file mode 100644 index 0000000000000..524678bb10fe8 --- /dev/null +++ b/.claude/skills/sentry-docs/platforms.md @@ -0,0 +1,141 @@ +# Sentry Platform Documentation Reference + +Quick reference for docs.sentry.io platform and framework paths. + +## JavaScript Ecosystem + +| Framework | Quick Start URL | +|-----------|-----------------| +| Next.js | `https://docs.sentry.io/platforms/javascript/guides/nextjs.md` | +| React | `https://docs.sentry.io/platforms/javascript/guides/react.md` | +| Vue | `https://docs.sentry.io/platforms/javascript/guides/vue.md` | +| Angular | `https://docs.sentry.io/platforms/javascript/guides/angular.md` | +| Svelte | `https://docs.sentry.io/platforms/javascript/guides/svelte.md` | +| SvelteKit | `https://docs.sentry.io/platforms/javascript/guides/sveltekit.md` | +| Remix | `https://docs.sentry.io/platforms/javascript/guides/remix.md` | +| Gatsby | `https://docs.sentry.io/platforms/javascript/guides/gatsby.md` | +| Astro | `https://docs.sentry.io/platforms/javascript/guides/astro.md` | +| Nuxt | `https://docs.sentry.io/platforms/javascript/guides/nuxt.md` | +| SolidStart | `https://docs.sentry.io/platforms/javascript/guides/solidstart.md` | +| Express | `https://docs.sentry.io/platforms/javascript/guides/express.md` | +| Fastify | `https://docs.sentry.io/platforms/javascript/guides/fastify.md` | +| NestJS | `https://docs.sentry.io/platforms/javascript/guides/nestjs.md` | +| Koa | `https://docs.sentry.io/platforms/javascript/guides/koa.md` | +| Hapi | `https://docs.sentry.io/platforms/javascript/guides/hapi.md` | +| Node.js | `https://docs.sentry.io/platforms/javascript/guides/node.md` | +| Bun | `https://docs.sentry.io/platforms/javascript/guides/bun.md` | +| Deno | `https://docs.sentry.io/platforms/javascript/guides/deno.md` | +| Electron | `https://docs.sentry.io/platforms/javascript/guides/electron.md` | +| Cloudflare | `https://docs.sentry.io/platforms/javascript/guides/cloudflare.md` | + +## Python Ecosystem + +**Note: Python uses `/integrations/` not `/guides/`** + +| Framework | Quick Start URL | +|-----------|-----------------| +| Django | `https://docs.sentry.io/platforms/python/integrations/django.md` | +| Flask | `https://docs.sentry.io/platforms/python/integrations/flask.md` | +| FastAPI | `https://docs.sentry.io/platforms/python/integrations/fastapi.md` | +| Celery | `https://docs.sentry.io/platforms/python/integrations/celery.md` | +| Starlette | `https://docs.sentry.io/platforms/python/integrations/starlette.md` | +| AIOHTTP | `https://docs.sentry.io/platforms/python/integrations/aiohttp.md` | +| Tornado | `https://docs.sentry.io/platforms/python/integrations/tornado.md` | +| Pyramid | `https://docs.sentry.io/platforms/python/integrations/pyramid.md` | +| Bottle | `https://docs.sentry.io/platforms/python/integrations/bottle.md` | +| Falcon | `https://docs.sentry.io/platforms/python/integrations/falcon.md` | +| Quart | `https://docs.sentry.io/platforms/python/integrations/quart.md` | +| Litestar | `https://docs.sentry.io/platforms/python/integrations/litestar.md` | +| Chalice | `https://docs.sentry.io/platforms/python/integrations/chalice.md` | +| AWS Lambda | `https://docs.sentry.io/platforms/python/integrations/aws-lambda.md` | +| GCP Functions | `https://docs.sentry.io/platforms/python/integrations/gcp-functions.md` | + +### Python AI/ML Integrations +| Integration | URL | +|-------------|-----| +| LangChain | `https://docs.sentry.io/platforms/python/integrations/langchain.md` | +| OpenAI | `https://docs.sentry.io/platforms/python/integrations/openai.md` | +| Anthropic | `https://docs.sentry.io/platforms/python/integrations/anthropic.md` | +| Hugging Face | `https://docs.sentry.io/platforms/python/integrations/huggingface-hub.md` | + +## PHP Ecosystem + +| Framework | Quick Start URL | +|-----------|-----------------| +| Laravel | `https://docs.sentry.io/platforms/php/guides/laravel.md` | +| Symfony | `https://docs.sentry.io/platforms/php/guides/symfony.md` | + +## Ruby Ecosystem + +| Framework | Quick Start URL | +|-----------|-----------------| +| Rails | `https://docs.sentry.io/platforms/ruby/guides/rails.md` | +| Sidekiq | `https://docs.sentry.io/platforms/ruby/guides/sidekiq.md` | +| Rack | `https://docs.sentry.io/platforms/ruby/guides/rack.md` | + +## Java Ecosystem + +| Framework | Quick Start URL | +|-----------|-----------------| +| Spring | `https://docs.sentry.io/platforms/java/guides/spring.md` | +| Spring Boot | `https://docs.sentry.io/platforms/java/guides/spring-boot.md` | +| Logback | `https://docs.sentry.io/platforms/java/guides/logback.md` | +| Log4j2 | `https://docs.sentry.io/platforms/java/guides/log4j2.md` | + +## Go Ecosystem + +| Framework | Quick Start URL | +|-----------|-----------------| +| Echo | `https://docs.sentry.io/platforms/go/guides/echo.md` | +| Gin | `https://docs.sentry.io/platforms/go/guides/gin.md` | +| Fiber | `https://docs.sentry.io/platforms/go/guides/fiber.md` | +| HTTP | `https://docs.sentry.io/platforms/go/guides/http.md` | + +## .NET Ecosystem + +| Framework | Quick Start URL | +|-----------|-----------------| +| ASP.NET Core | `https://docs.sentry.io/platforms/dotnet/guides/aspnetcore.md` | +| ASP.NET | `https://docs.sentry.io/platforms/dotnet/guides/aspnet.md` | +| MAUI | `https://docs.sentry.io/platforms/dotnet/guides/maui.md` | +| WPF | `https://docs.sentry.io/platforms/dotnet/guides/wpf.md` | +| WinForms | `https://docs.sentry.io/platforms/dotnet/guides/winforms.md` | +| Azure Functions | `https://docs.sentry.io/platforms/dotnet/guides/azure-functions.md` | + +## Mobile Platforms + +| Platform | Quick Start URL | +|----------|-----------------| +| Android | `https://docs.sentry.io/platforms/android.md` | +| iOS | `https://docs.sentry.io/platforms/apple/guides/ios.md` | +| React Native | `https://docs.sentry.io/platforms/react-native.md` | +| Flutter | `https://docs.sentry.io/platforms/dart/guides/flutter.md` | +| Kotlin Multiplatform | `https://docs.sentry.io/platforms/kotlin/guides/multiplatform.md` | + +## Gaming Platforms + +| Platform | Quick Start URL | +|----------|-----------------| +| Unity | `https://docs.sentry.io/platforms/unity.md` | +| Unreal | `https://docs.sentry.io/platforms/unreal.md` | +| Godot | `https://docs.sentry.io/platforms/godot.md` | + +## Common Feature Sub-paths + +Append these to any platform/guide URL: + +| Feature | Sub-path | +|---------|----------| +| Tracing | `/tracing.md` | +| Session Replay | `/session-replay.md` | +| Logs | `/logs.md` | +| Profiling | `/profiling.md` | +| Crons | `/crons.md` | +| Configuration | `/configuration.md` | +| Sampling | `/configuration/sampling.md` | +| Troubleshooting | `/troubleshooting.md` | +| Manual Setup | `/manual-setup.md` | +| Custom Instrumentation | `/tracing/instrumentation/custom-instrumentation.md` | +| Distributed Tracing | `/tracing/distributed-tracing.md` | + +Example: `https://docs.sentry.io/platforms/javascript/guides/nextjs/tracing.md` diff --git a/.gitignore b/.gitignore index 91fff44cb7aff..33cde83394ba3 100644 --- a/.gitignore +++ b/.gitignore @@ -108,3 +108,6 @@ public/og-images/* yalc.lock /public/doctree.json /public/doctree-dev.json + +# Generated skill files (source: .claude/skills/) +public/.well-known/skills/*/*.md diff --git a/docs/agentic-usage.mdx b/docs/agentic-usage.mdx new file mode 100644 index 0000000000000..ac4dfee493e34 --- /dev/null +++ b/docs/agentic-usage.mdx @@ -0,0 +1,45 @@ +--- +title: Agentic Usage +sidebar_order: 99 +description: Use AI agents to help implement Sentry in your applications +--- + +Sentry documentation is available as an agent skill, enabling AI coding assistants to help you implement Sentry in your applications. + +## What This Provides + +The `sentry-docs` skill gives AI agents access to: + +- **SDK setup guides** for all supported platforms and frameworks +- **Feature documentation** for tracing, session replay, logs, crons, and more +- **Configuration references** for sampling, filtering, and customization +- **Troubleshooting guides** for common issues + +## Adding the Skill + +If you're using [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or another agent that supports the [Agent Skills Discovery](https://github.com/cloudflare/agent-skills-discovery-rfc) protocol: + +```bash +npx skills add https://docs.sentry.io +``` + +This registers the Sentry documentation skill with your AI agent. + +## Example Use Cases + +Once added, your AI agent can help with: + +- "Set up Sentry error monitoring in my Next.js app" +- "Add distributed tracing to my FastAPI backend" +- "Configure sampling to reduce my Sentry volume" +- "Why aren't my errors showing up in Sentry?" +- "Add session replay to capture user interactions" + +The agent will fetch the relevant documentation and provide implementation guidance specific to your stack. + +## Manual Access + +If your AI tool doesn't support skills discovery, you can still access documentation directly: + +- Append `.md` to any docs URL for markdown: `https://docs.sentry.io/platforms/javascript/guides/nextjs.md` +- Use the [skill files](/.well-known/skills/index.json) as context for your AI assistant diff --git a/docs/contributing/agentic-usage.mdx b/docs/contributing/agentic-usage.mdx new file mode 100644 index 0000000000000..ef4539f709ff8 --- /dev/null +++ b/docs/contributing/agentic-usage.mdx @@ -0,0 +1,56 @@ +--- +title: Agentic Usage +sidebar_order: 50 +noindex: true +--- + +Sentry documentation includes agent skills to help contributors write and review documentation. + +## Available Skills + +### technical-docs + +Guidelines for writing effective technical documentation. Use when creating or editing MDX files in `docs/platforms/`. + +Key principles: +- Lead with "why" before "how" +- Structure by user intent, not API surface +- Avoid redundant examples +- Keep content concise + +### docs-review + +The Sentry documentation style guide. Use when reviewing documentation to ensure it follows Sentry's voice and tone. + +Key points: +- Write like a developer talking to a peer +- Be direct and honest (no marketing fluff) +- Use American English, active voice +- Keep paragraphs short (2-3 sentences) + +## Adding the Skills + +If you're using [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or another agent that supports the [Agent Skills Discovery](https://github.com/cloudflare/agent-skills-discovery-rfc) protocol: + +```bash +npx skills add https://docs.sentry.io +``` + +This registers all Sentry documentation skills with your AI agent. + +## Example Use Cases + +Once added, your AI agent can help with: + +- "Review this documentation for Sentry style" +- "Help me write a guide for the new SDK feature" +- "Does this page follow our documentation principles?" +- "Rewrite this section to be more scannable" + +## Manual Access + +The skill files are available at: + +- [All skills](/.well-known/skills/index.json) +- [technical-docs/SKILL.md](/.well-known/skills/technical-docs/SKILL.md) +- [docs-review/SKILL.md](/.well-known/skills/docs-review/SKILL.md) diff --git a/package.json b/package.json index e9115480a6d72..351844811da85 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "dev": "yarn enforce-redirects && concurrently \"yarn sidecar\" \"node ./src/hotReloadWatcher.mjs\" \"next dev\"", "dev:developer-docs": "yarn enforce-redirects && NEXT_PUBLIC_DEVELOPER_DOCS=1 yarn dev", "build:developer-docs": "yarn enforce-redirects && git submodule init && git submodule update && NEXT_PUBLIC_DEVELOPER_DOCS=1 yarn build", - "build": "yarn enforce-redirects && yarn generate-og-images && yarn generate-doctree && next build && yarn generate-md-exports", + "build": "yarn enforce-redirects && yarn copy-skills && yarn generate-og-images && yarn generate-doctree && next build && yarn generate-md-exports", + "copy-skills": "node scripts/copy-skills.mjs", "generate-md-exports": "node scripts/generate-md-exports.mjs", "generate-og-images": "ts-node scripts/add-og-images.ts", "generate-doctree": "esbuild scripts/generate-doctree.ts --bundle --platform=node --packages=external --outfile=.next/generate-doctree.mjs --format=esm && node .next/generate-doctree.mjs", diff --git a/public/.well-known/skills/index.json b/public/.well-known/skills/index.json new file mode 100644 index 0000000000000..1f5be2e58f3d4 --- /dev/null +++ b/public/.well-known/skills/index.json @@ -0,0 +1,19 @@ +{ + "skills": [ + { + "name": "sentry-docs", + "description": "Search and fetch Sentry documentation. Use when users ask about Sentry SDK setup, configuration, integrations, error monitoring, tracing, session replay, logs, crons, or when developing/contributing to Sentry SDKs.", + "files": ["SKILL.md", "data-model.md", "platforms.md"] + }, + { + "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/.", + "files": ["SKILL.md"] + }, + { + "name": "docs-review", + "description": "Review documentation for Sentry style and voice. Use when reviewing or writing user-facing documentation to ensure it follows the Sentry documentation style guide.", + "files": ["SKILL.md"] + } + ] +} diff --git a/scripts/copy-skills.mjs b/scripts/copy-skills.mjs new file mode 100644 index 0000000000000..735637e1dd0e0 --- /dev/null +++ b/scripts/copy-skills.mjs @@ -0,0 +1,39 @@ +// Copies skill files from .claude/skills/ to public/.well-known/skills/ +// Run as part of build to work around Vercel not supporting symlinks +import {cpSync, mkdirSync} from 'fs'; +import {dirname, join} from 'path'; +import {fileURLToPath} from 'url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const root = join(__dirname, '..'); + +const skills = [ + { + from: '.claude/skills/sentry-docs/SKILL.md', + to: 'public/.well-known/skills/sentry-docs/SKILL.md', + }, + { + from: '.claude/skills/sentry-docs/data-model.md', + to: 'public/.well-known/skills/sentry-docs/data-model.md', + }, + { + from: '.claude/skills/sentry-docs/platforms.md', + to: 'public/.well-known/skills/sentry-docs/platforms.md', + }, + { + from: '.claude/skills/technical-docs/SKILL.md', + to: 'public/.well-known/skills/technical-docs/SKILL.md', + }, + { + from: '.claude/skills/docs-review/SKILL.md', + to: 'public/.well-known/skills/docs-review/SKILL.md', + }, +]; + +for (const {from, to} of skills) { + const dest = join(root, to); + mkdirSync(dirname(dest), {recursive: true}); + cpSync(join(root, from), dest); +} + +console.log('✅ Copied skill files to public/.well-known/skills/'); diff --git a/src/components/sidebar/sidebarNavigation.tsx b/src/components/sidebar/sidebarNavigation.tsx index 88de1485506fc..df55b030dc74a 100644 --- a/src/components/sidebar/sidebarNavigation.tsx +++ b/src/components/sidebar/sidebarNavigation.tsx @@ -48,6 +48,10 @@ const productSidebarItems = [ title: 'Documentation Changelog', root: 'changelog', }, + { + title: 'Agentic Usage', + root: 'agentic-usage', + }, ]; export async function SidebarNavigation({path}: {path: string[]}) {