Skip to content

Commit 528b5da

Browse files
dingsdaxclaudestephanie-anderson
authored
docs(sdk-ai-tools): Add Warden page, AGENTS.md template, and expand skills docs (#16799)
## Describe your PR Builds out the AI tools section for SDK developers — previously most pages were stubs or sparse lists — and establishes normative requirements for AI tooling in the standards. - templates/agents-md-template.mdx — Was a TBD placeholder. Now a full page: what belongs in AGENTS.md, writing tips, real SDK examples, a reference to the sentry-skills:agents-md skill, and a copy-ready template - ai-tools/skills/index.mdx — Expanded from a sparse list of links into a full page: dotagents quick-setup guide, security warning, command reference, contributing guidance - ai-tools/code-review/index.mdx — Added Warden section: how it works, why it matters for SDK development, setup pointer - ai-tools/index.mdx — Turned into a real landing page with an orientation table and a pointer to standards for requirement levels - standards/repository-docs.mdx (v1.1.0) — New AI Skills SpecSection: SDK repos SHOULD have dotagents configured and use rules files for fixed conventions - standards/review-ci.mdx (v1.1.0) — New Warden SpecSection: SDK repos SHOULD have Warden in CI ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): - [ ] Other deadline: - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Stephanie Anderson <stephanie.anderson@sentry.io>
1 parent 438efeb commit 528b5da

6 files changed

Lines changed: 211 additions & 20 deletions

File tree

develop-docs/sdk/getting-started/ai-tools/code-review/index.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,33 @@ https://cursor.com/bugbot
3737
BugBot suggestions should be treated as recommendations, not blocking requirements — accuracy is still evolving and false positives can occur.
3838

3939

40+
## Warden
41+
42+
[Warden](https://warden.sentry.dev/) runs AI-powered skills against code changes — locally before you push, or automatically on pull requests in CI.
43+
44+
### How It Works
45+
46+
On every run, Warden:
47+
48+
1. **Detects changes** — identifies modified files, hunks, or directories
49+
2. **Matches triggers** — compares changes against each skill's activation rules
50+
3. **Executes skills** — runs the matching AI prompts (via Claude) on the relevant code
51+
4. **Reports findings** — delivers results with severity, location, and optional fix suggestions
52+
53+
### Why Use It for SDK Development
54+
55+
SDK repos have consistency requirements that are hard to enforce through code review alone. Warden helps by:
56+
57+
- **Running checks consistently** — SDK-specific conventions, security, and API design run on every PR, not only when a reviewer notices something.
58+
- **Catching issues before human review** — findings surface early, so review time is spent on logic and design.
59+
- **Using Claude's reasoning, not syntax rules** — detects nuanced issues (broken API contracts, spec violations) that linters can't express.
60+
- **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.
61+
62+
### Setup
63+
64+
See the [Warden guide](https://warden.sentry.dev/guide) for installation, local usage, and CI integration via the Warden GitHub Action. For a reference example, see [sentry-python's `warden.toml`](https://github.com/getsentry/sentry-python/blob/master/warden.toml).
65+
66+
4067
## Tips for New Engineers
4168

4269
- **Don't ignore AI reviews, but don't blindly follow them either.** Read the suggestions, apply what makes sense, and dismiss false positives.
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
---
22
title: AI Tools
3-
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.
3+
description: AI tools available for SDK development at Sentry — how they layer together and when to use each.
44
sidebar_order: 6
55
---
66

7+
This section covers the AI tools available to SDK engineers, how they layer together, and when to reach for each.
8+
79
<PageGrid />
10+
11+
## When to Use Each Tool
12+
13+
| Tool | What It Is | When to Reach For It |
14+
|---|---|---|
15+
| **[AGENTS.md](/sdk/getting-started/templates/agents-md-template/)** | Always-loaded repo instructions | Every SDK repo — sets the baseline for all AI contributions |
16+
| **[Skills](/sdk/getting-started/ai-tools/skills/)** | Portable AI playbooks | Encode repeated workflows once, run them consistently |
17+
| **[dotagents](/sdk/getting-started/ai-tools/skills/#dotagents)** | Skills package manager | Share and version-lock skills across the team |
18+
| **[AI Code Review](/sdk/getting-started/ai-tools/code-review/)** | AI-powered PR feedback | Every PR — surfaces issues before human review |
19+
| Rules files | Workflow-specific instructions | Fixed conventions that vary by task or directory |
20+
21+
Requirement levels (MUST/SHOULD) are defined in [Repository and Documentation Standards](/sdk/getting-started/standards/repository-docs) and [Review and CI Standards](/sdk/getting-started/standards/review-ci).

develop-docs/sdk/getting-started/ai-tools/skills/index.mdx

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,69 @@ description: Learn which skills to use, and when, to boost quality, consistency,
44
sidebar_order: 2
55
---
66

7-
## Skills Package Manager (dotagents)
7+
Agent skills teach AI coding agents how to perform specific workflows. Encode a workflow once in a skill and the agent loads it on demand. Skills live in a `skills/` directory inside your agent's config folder (e.g., `.claude/skills/`, `.cursor/skills/`) and follow the [Agent Skills open format](https://agentskills.io/specification).
88

9-
A package manager for .agents directories that enables you to declare agent skill dependencies in `agents.toml`, lock versions for reproducibility, and allow every tool on your team to reliably discover skills from a unified location.
9+
## Using Skills Safely
1010

11-
https://github.com/getsentry/dotagents
11+
<Alert level="warning" title="Skills are a potential attack vector">
1212

13+
Skills can inject packages or hide malicious instructions in HTML comments. Only install skills from [`getsentry/skills`](https://github.com/getsentry/skills), [`getsentry/sdk-skills`](https://github.com/getsentry/sdk-skills), or your own repo. Do not use auto-discovery from [skills.sh](https://skills.sh/) or similar.
1314

14-
## Skills
15+
</Alert>
1516

16-
### Sentry Skills
17+
## dotagents
1718

18-
Agent skills for Sentry employees, following the Agent Skills open format.
19+
[dotagents](https://github.com/getsentry/dotagents) is a package manager for `.agents` directories. Declare skill dependencies in `agents.toml`, lock exact versions in `agents.lock`, and dotagents symlinks them into wherever your coding agent looks.
1920

20-
https://github.com/getsentry/skills/
21+
Use [dotagents.sentry.dev](https://dotagents.sentry.dev/) as the Sentry distribution hub — it's wired up to `getsentry/skills` and keeps everything in sync. The main `sentry` repository already has dotagents configured; use it to vend skills into SDK repos or manage personal-scope skills.
2122

23+
Commit `agents.toml` and `agents.lock` so every engineer on the team gets the same skills automatically.
2224

23-
### Sentry SDK Skills
25+
| Command | Description |
26+
|---|---|
27+
| `init` | Create `agents.toml` and `.agents/skills/` |
28+
| `add <source>` | Add a skill dependency |
29+
| `remove <name>` | Remove a skill |
30+
| `install` | Install all skills from `agents.toml` |
31+
| `update [name]` | Update skills to latest versions |
32+
| `list` | Show installed skills and their status |
33+
| `sync` | Reconcile symlinks and verify state |
2434

25-
Agent skills for managing feature development across Sentry SDKs, following the Agent Skills open format.
35+
## Available Skills
2636

27-
https://github.com/getsentry/sdk-skills/
37+
### Sentry Skills
2838

39+
Agent skills for Sentry employees, covering general workflows like committing, opening PRs, code review, finding bugs, and security review.
2940

30-
### Sentry Reproduction Skill (repro)
41+
https://github.com/getsentry/skills
3142

32-
This skill enables agents and developers to quickly generate, store, and share minimal reproduction environments for issues affecting Sentry SDKs and integrations. It automates the creation of reproducible test cases in isolated sandboxes, streamlining bug reporting, verification, and collaborative debugging across the Sentry ecosystem. This skill improves issue turnaround and makes it easier to validate fixes or demonstrate regressions in a consistent environment.
43+
### Sentry SDK Skills
3344

34-
https://github.com/getsentry/repro
45+
Agent skills for managing feature development across Sentry SDKs — cross-SDK rollouts, Linear project setup, daily standups, and more.
46+
47+
https://github.com/getsentry/sdk-skills
48+
49+
### Sentry Reproduction Skill
3550

51+
Generates minimal reproduction environments for SDK issues — reproducible test cases in isolated sandboxes for bug reporting, verification, and collaborative debugging.
52+
53+
https://github.com/getsentry/repro
3654

3755
### Obra's Superpowers
3856

39-
An agentic skills framework that provides structured software development workflows for AI coding agents. It includes composable skills that automatically trigger at appropriate moments — covering brainstorming, implementation planning, test-driven development, subagent-driven parallel execution, code review, and systematic debugging. Rather than letting agents jump straight into writing code, Superpowers enforces disciplined processes that improve quality and maintain alignment with approved designs.
57+
Structured software development workflows for AI agents: brainstorming, implementation planning, TDD, parallel execution, code review, and systematic debugging.
4058

4159
https://github.com/obra/superpowers
60+
61+
## Contributing a Skill
62+
63+
If you find yourself explaining the same workflow to an agent repeatedly, formalize it as a skill. Skills follow the [Agent Skills specification](https://agentskills.io/specification):
64+
65+
```text
66+
skill-name/
67+
SKILL.md # YAML frontmatter (name, description) + markdown instructions
68+
```
69+
70+
Add new skills to [`getsentry/skills`](https://github.com/getsentry/skills) (for general Sentry workflows) or [`getsentry/sdk-skills`](https://github.com/getsentry/sdk-skills) (for SDK-specific workflows) rather than a personal repo, so the whole team benefits.
71+
72+
For guidance on writing effective skills, see [Skill Synthesis](https://cra.mr/skill-synthesis) — using your own codebase's history, past failures, and real patterns as source material produces significantly better results than generic guidance.

develop-docs/sdk/getting-started/standards/repository-docs.mdx

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
---
22
title: Repository and Documentation
33
spec_id: sdk/getting-started/standards/repository-docs
4-
spec_version: 1.0.0
4+
spec_version: 1.1.0
55
spec_status: candidate
66
spec_platforms:
77
- all
88
spec_changelog:
9+
- version: 1.1.0
10+
date: 2026-03-06
11+
summary: Add AI Skills SHOULD requirement (dotagents + rules files)
912
- version: 1.0.0
1013
date: 2026-02-19
1114
summary: Initial Repository and Documentation standard
@@ -154,6 +157,33 @@ AI context files (AGENTS.md, `.cursorrules`, `.github/copilot-instructions.md`,
154157

155158
---
156159

160+
<SpecSection id="ai-skills" status="candidate" since="1.1.0">
161+
162+
## AI Skills
163+
164+
#### Rule
165+
166+
SDK repos **SHOULD** have dotagents configured with skills from [`getsentry/skills`](https://github.com/getsentry/skills) and [`getsentry/sdk-skills`](https://github.com/getsentry/sdk-skills). Commit `agents.toml` and `agents.lock` so every engineer on the team gets the same skills automatically.
167+
168+
Rules files (e.g. `.claude/rules/`, `.cursor/rules/`) **SHOULD** be used for fixed workflow conventions that apply to a specific task or directory.
169+
170+
#### Enforcement
171+
172+
- `agents.toml` / `agents.lock` presence in repo
173+
- Human review
174+
175+
#### Suggested skill(s)
176+
177+
- [`sentry-skills:agents-md`](https://github.com/getsentry/skills#available-skills)
178+
179+
#### Per-SDK override
180+
181+
<StatusBadge type="yes" /> Which skills are active and which rules files exist are SDK-specific.
182+
183+
</SpecSection>
184+
185+
---
186+
157187
## Changelog
158188

159189
<SpecChangelog />

develop-docs/sdk/getting-started/standards/review-ci.mdx

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
---
22
title: Review and CI
33
spec_id: sdk/getting-started/standards/review-ci
4-
spec_version: 1.0.0
4+
spec_version: 1.1.0
55
spec_status: candidate
66
spec_platforms:
77
- all
88
spec_changelog:
9+
- version: 1.1.0
10+
date: 2026-03-06
11+
summary: Add Warden SHOULD requirement
912
- version: 1.0.0
1013
date: 2026-02-19
1114
summary: Initial Review and CI standard
@@ -171,6 +174,31 @@ See also: [Setting up release infrastructure playbook](/sdk/getting-started/play
171174

172175
---
173176

177+
<SpecSection id="warden" status="candidate" since="1.1.0">
178+
179+
## Warden
180+
181+
#### Rule
182+
183+
SDK repos **SHOULD** have [Warden](https://warden.sentry.dev/) configured in CI via the Warden GitHub Action. Warden runs AI-powered skills against PR diffs to enforce SDK-specific conventions that static linters cannot express.
184+
185+
#### Enforcement
186+
187+
- GitHub Actions (Warden GitHub Action)
188+
- Human review for follow-up on findings
189+
190+
#### Suggested skill(s)
191+
192+
- [`sentry-skills:warden-lint-judge`](https://github.com/getsentry/skills#available-skills) — converts findings into permanent lint rules.
193+
194+
#### Per-SDK override
195+
196+
<StatusBadge type="yes" /> Which Warden skills are active varies per SDK.
197+
198+
</SpecSection>
199+
200+
---
201+
174202
## Changelog
175203

176204
<SpecChangelog />
Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,71 @@
11
---
22
title: AGENTS.md
33
sidebar_order: 10
4+
description: Boilerplate AGENTS.md template for Sentry SDK repositories. Teaches AI coding agents about your project's commands, conventions, and standards.
45
---
56

6-
<CopyableCard title="AGENTS.md">
7+
`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.
78

8-
TBD
9+
## What Belongs in AGENTS.md
910

10-
</CopyableCard>
11+
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:
12+
13+
- **Commands** — exact invocations for test, lint, format, and build. Especially non-obvious ones like tox environments, specific flags, or required env setup.
14+
- **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").
15+
- **Changelog and commit format** — agents will guess the wrong format without explicit instruction.
16+
- **Links to specs and standards** — the SDK spec, platform docs, and cross-SDK alignment references the agent can't find on its own.
17+
18+
**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.
19+
20+
**Write instructions positively.** "Always update `CHANGELOG.md` under `## Unreleased`" works better than "don't forget the changelog." Agents struggle with negations.
21+
22+
**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.
23+
24+
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.
25+
26+
## Good Examples in SDK Repositories
27+
28+
Check if the repository already has one before starting from scratch. The following repos have well-structured examples worth referencing:
29+
30+
- [`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
31+
- [`getsentry/sentry-javascript`](https://github.com/getsentry/sentry-javascript/blob/master/AGENTS.md) — monorepo setup, clear commands table, package manager conventions
32+
- [`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
33+
- [`getsentry/sentry-react-native`](https://github.com/getsentry/sentry-react-native/blob/main/AGENTS.md) — agent responsibilities section, quick reference command table
34+
- [`getsentry/sentry-cli`](https://github.com/getsentry/sentry-cli/blob/master/AGENTS.md) — clear language/architecture overview for a multi-language project
35+
- [`getsentry/sentry-python`](https://github.com/getsentry/sentry-python/blob/master/AGENTS.md) — focused tox workflow: how to test, lint, and type-check correctly
36+
37+
## Template
38+
39+
Use the [`sentry-skills:agents-md`](https://github.com/getsentry/skills/blob/main/plugins/sentry-skills/skills/agents-md/SKILL.md) skill to generate initial content from your codebase — it follows the structure below and pulls in real conventions from your repo.
40+
41+
Remove sections that don't apply and replace all `[placeholder]` values with real content.
42+
43+
```markdown
44+
# Agent Instructions
45+
46+
[SDK name] SDK for Sentry — error monitoring and performance tracing for [language/platform].
47+
48+
## Commands
49+
50+
| Task | Command |
51+
|------|---------|
52+
| Install | `[install command]` |
53+
| Test (all) | `[test command]` |
54+
| Test (single) | `[single test command]` |
55+
| Lint | `[lint command]` |
56+
| Format | `[format command]` |
57+
| Build | `[build command]` |
58+
| Type check | `[type check command]` |
59+
60+
## Conventions
61+
62+
- Always update `CHANGELOG.md` for user-facing changes — add an entry under `## Unreleased`
63+
- Commit format: `type(scope): description` — e.g. `fix(transport): handle connection timeout`
64+
- [Any non-obvious constraint specific to this repo]
65+
66+
## References
67+
68+
- SDK spec: https://develop.sentry.dev/sdk/
69+
- Platform docs: https://docs.sentry.io/platforms/[platform]/
70+
- Cross-SDK standards: https://develop.sentry.dev/sdk/getting-started/
71+
```

0 commit comments

Comments
 (0)