-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs(sdk-ai-tools): Add Warden page, AGENTS.md template, and expand skills docs #16799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2021a21
docs(sdk-ai-tools): Add Warden page, AGENTS.md template, and expand s…
dingsdax f998caa
Merge branch 'master' into docs/update-sdk-ai-tools
stephanie-anderson 31b93d8
docs(sdk): move Warden content into AI Code Review page
dingsdax 1f6e07e
docs(sdk-ai-tools): Move requirement levels to standards, simplify ai…
dingsdax 35a06fb
docs(sdk-ai-tools): Reference agents-md skill on AGENTS.md template page
dingsdax c8f2033
Merge branch 'master' into docs/update-sdk-ai-tools
dingsdax a58faf8
fix(sdk-ai-tools): Fix broken sentry-react-native AGENTS.md link
dingsdax 276bc80
Merge branch 'master' into docs/update-sdk-ai-tools
dingsdax f8a6b84
ref(sdk-ai-tools): Remove dead code and stale Quick Setup instructions
dingsdax 63f21ad
docs(sdk-ai-tools): Link to sentry-python warden.toml as reference ex…
dingsdax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,19 @@ | ||
| --- | ||
| title: AI Tools | ||
| description: Explore recommended AI tools and agentic skills for SDK development. Learn which automations and workflows to use, and when, to boost quality, consistency, and productivity across all Sentry SDKs. | ||
| description: AI tools available for SDK development at Sentry — how they layer together and when to use each. | ||
| sidebar_order: 6 | ||
| --- | ||
|
|
||
| This section covers the AI tools available to SDK engineers, how they layer together, and when to reach for each. | ||
|
|
||
| <PageGrid /> | ||
|
|
||
| ## When to Use Each Tool | ||
|
|
||
| | Tool | What It Is | Scope | When to Use | Expectation | | ||
| |---|---|---|---|---| | ||
| | **[AGENTS.md](/sdk/getting-started/templates/agents-md-template/)** | Always-loaded repo instructions | Whole repo | Every SDK repo | <StatusBadge type="required" /> | | ||
| | **[Skills](/sdk/getting-started/ai-tools/skills/)** | Portable AI playbooks | Cross-repo | Repeated workflows | <StatusBadge type="recommended" /> | | ||
| | **[dotagents](/sdk/getting-started/ai-tools/skills/#dotagents)** | Skills package manager | Team/repo | Sharing skills | <StatusBadge type="recommended" /> | | ||
| | **[Warden](/sdk/getting-started/ai-tools/warden/)** | AI-powered code review | Per PR/CI | Enforcing standards | <StatusBadge type="encouraged" /> | | ||
| | Rules files | Workflow-specific instructions | Per task | Fixed conventions | <StatusBadge type="recommended" /> | | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
develop-docs/sdk/getting-started/ai-tools/warden/index.mdx
|
dingsdax marked this conversation as resolved.
Outdated
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| title: Warden | ||
| description: AI-powered code review tool that runs configurable skills against code changes, locally or in CI. | ||
| sidebar_order: 4 | ||
| --- | ||
|
|
||
| [Warden](https://warden.sentry.dev/) runs AI-powered skills against code changes — locally before you push, or automatically on pull requests in CI. | ||
|
|
||
| ## How It Works | ||
|
|
||
| On every run, Warden: | ||
|
|
||
| 1. **Detects changes** — identifies modified files, hunks, or directories | ||
| 2. **Matches triggers** — compares changes against each skill's activation rules | ||
| 3. **Executes skills** — runs the matching AI prompts (via Claude) on the relevant code | ||
| 4. **Reports findings** — delivers results with severity, location, and optional fix suggestions | ||
|
|
||
| ## Why Use It for SDK Development | ||
|
|
||
| SDK repos have consistency requirements that are hard to enforce through code review alone. Warden helps by: | ||
|
|
||
| - **Running checks consistently** — SDK-specific conventions, security, and API design run on every PR, not only when a reviewer notices something. | ||
| - **Catching issues before human review** — findings surface early, so review time is spent on logic and design. | ||
| - **Using Claude's reasoning, not syntax rules** — detects nuanced issues (broken API contracts, spec violations) that linters can't express. | ||
| - **Turning findings into permanent rules** — the `warden-lint-judge` Claude Code skill can propose lint rules from findings so the same issue can never recur. | ||
|
|
||
| ## Setup | ||
|
dingsdax marked this conversation as resolved.
Outdated
|
||
|
|
||
| See the [Warden guide](https://warden.sentry.dev/guide) for installation, local usage, and CI integration via the Warden GitHub Action. | ||
65 changes: 62 additions & 3 deletions
65
develop-docs/sdk/getting-started/templates/agents-md-template.mdx
|
dingsdax marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,69 @@ | ||
| --- | ||
| title: AGENTS.md | ||
| sidebar_order: 10 | ||
| description: Boilerplate AGENTS.md template for Sentry SDK repositories. Teaches AI coding agents about your project's commands, conventions, and standards. | ||
| --- | ||
|
|
||
| <CopyableCard title="AGENTS.md"> | ||
| `AGENTS.md` is a Markdown file at the root of your repository that AI coding agents load automatically at the start of every session. Claude Code reads `CLAUDE.md` — symlink it to `AGENTS.md` so there's one source of truth. | ||
|
|
||
| TBD | ||
| ## What Belongs in AGENTS.md | ||
|
|
||
| </CopyableCard> | ||
| Keep it focused on what the agent **cannot easily discover by reading the code**. Generic instructions ("follow existing patterns", "write clean code") add noise without helping. What agents consistently get wrong without explicit guidance: | ||
|
|
||
| - **Commands** — exact invocations for test, lint, format, and build. Especially non-obvious ones like tox environments, specific flags, or required env setup. | ||
| - **Non-obvious conventions** — things that look wrong but are intentional, or constraints that aren't visible in the code (e.g. "all migrations must be backward-compatible, we run blue-green deploys"). | ||
| - **Changelog and commit format** — agents will guess the wrong format without explicit instruction. | ||
| - **Links to specs and standards** — the SDK spec, platform docs, and cross-SDK alignment references the agent can't find on its own. | ||
|
|
||
| **Keep it short.** Every line costs reasoning tokens. Prefer automated enforcement (linters, type checkers, CI) over written rules — tooling catches mistakes reliably; instructions don't always. | ||
|
|
||
| **Write instructions positively.** "Always update `CHANGELOG.md` under `## Unreleased`" works better than "don't forget the changelog." Agents struggle with negations. | ||
|
|
||
| **Iterate from observed failures.** Add an instruction when you see the agent make a specific mistake, not preemptively. Over time this produces a lean file of rules that actually matter for your repo. | ||
|
|
||
| Task-specific workflows (PR format, commit style, changelog) belong in rules files — see [AI Agent Skills](/sdk/getting-started/ai-tools/skills/) for how to set them up alongside skills. | ||
|
|
||
| ## Good Examples in SDK Repositories | ||
|
|
||
| Check if the repository already has one before starting from scratch. The following repos have well-structured examples worth referencing: | ||
|
|
||
| - [`getsentry/sentry-cocoa`](https://github.com/getsentry/sentry-cocoa/blob/master/AGENTS.md) — written explicitly for LLM agents: tables over prose, nested `AGENTS.md` per subdirectory for scoped context | ||
| - [`getsentry/sentry-javascript`](https://github.com/getsentry/sentry-javascript/blob/master/AGENTS.md) — monorepo setup, clear commands table, package manager conventions | ||
| - [`getsentry/sentry-dotnet`](https://github.com/getsentry/sentry-dotnet/blob/master/AGENTS.md) — build system detail, solution filter table showing which filter to use when | ||
| - [`getsentry/sentry-react-native`](https://github.com/getsentry/sentry-react-native/blob/master/AGENTS.md) — agent responsibilities section, quick reference command table | ||
| - [`getsentry/sentry-cli`](https://github.com/getsentry/sentry-cli/blob/master/AGENTS.md) — clear language/architecture overview for a multi-language project | ||
| - [`getsentry/sentry-python`](https://github.com/getsentry/sentry-python/blob/master/AGENTS.md) — focused tox workflow: how to test, lint, and type-check correctly | ||
|
|
||
| ## Template | ||
|
|
||
| Remove sections that don't apply and replace all `[placeholder]` values with real content. | ||
|
|
||
| ```markdown | ||
| # Agent Instructions | ||
|
|
||
| [SDK name] SDK for Sentry — error monitoring and performance tracing for [language/platform]. | ||
|
|
||
| ## Commands | ||
|
|
||
| | Task | Command | | ||
| |------|---------| | ||
| | Install | `[install command]` | | ||
| | Test (all) | `[test command]` | | ||
| | Test (single) | `[single test command]` | | ||
| | Lint | `[lint command]` | | ||
| | Format | `[format command]` | | ||
| | Build | `[build command]` | | ||
| | Type check | `[type check command]` | | ||
|
|
||
| ## Conventions | ||
|
|
||
| - Always update `CHANGELOG.md` for user-facing changes — add an entry under `## Unreleased` | ||
| - Commit format: `type(scope): description` — e.g. `fix(transport): handle connection timeout` | ||
| - [Any non-obvious constraint specific to this repo] | ||
|
|
||
| ## References | ||
|
|
||
| - SDK spec: https://develop.sentry.dev/sdk/ | ||
| - Platform docs: https://docs.sentry.io/platforms/[platform]/ | ||
| - Cross-SDK standards: https://develop.sentry.dev/sdk/getting-started/ | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.