From 242d589c905df5ec32681a131090bf62d6695711 Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Wed, 18 Mar 2026 10:26:13 +0100 Subject: [PATCH 1/2] docs(sdk): Rewrite Repository and Documentation spec for readability Replace rigid Rule/Enforcement/Per-SDK override template with natural prose. Merge AGENTS.md, CONTRIBUTING.md, and PR template into one section. Merge AI context maintenance and AI skills into one section. Add links to dotagents repo and docs. Remove enforcement boilerplate and StatusBadge components. Promote spec status to stable. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../standards/repository-docs.mdx | 151 ++++-------------- 1 file changed, 27 insertions(+), 124 deletions(-) diff --git a/develop-docs/sdk/getting-started/standards/repository-docs.mdx b/develop-docs/sdk/getting-started/standards/repository-docs.mdx index ce522380330af..0b4f6754122c9 100644 --- a/develop-docs/sdk/getting-started/standards/repository-docs.mdx +++ b/develop-docs/sdk/getting-started/standards/repository-docs.mdx @@ -2,7 +2,7 @@ title: Repository and Documentation spec_id: sdk/getting-started/standards/repository-docs spec_version: 1.1.0 -spec_status: candidate +spec_status: stable spec_platforms: - all spec_changelog: @@ -19,45 +19,26 @@ sidebar_order: 5 - +These standards define what every SDK repository should contain beyond the code itself — the files that help humans and AI tools understand, contribute to, and maintain the project. -## AGENTS.md + -#### Rule +## Required repository files -Every SDK repo **MUST** have `AGENTS.md` covering: +### AGENTS.md + +Every SDK repo **MUST** have an `AGENTS.md` covering: - Architecture overview - Testing conventions - Build instructions - Contribution expectations -- Commit attribution convention ([AI attribution](/sdk/getting-started/standards/code-submission#ai-attribution)) -- SDK-specific standard overrides - updated in same PR as architectural changes - -#### Enforcement - -- CI file existence check -- Human review for staleness - -#### Suggested skill(s) - -- [`sentry-skills:agents-md`](https://github.com/getsentry/skills#available-skills) - -#### Per-SDK override - - Content is SDK-specific. Requirement is universal. +- [Commit attribution convention](/sdk/getting-started/standards/code-submission#ai-attribution) +- SDK-specific standard overrides — updated in the same PR as architectural changes - - ---- - - +### CONTRIBUTING.md -## CONTRIBUTING.md - -#### Rule - -Every SDK repo **MUST** have `CONTRIBUTING.md` covering: +Every SDK repo **MUST** have a `CONTRIBUTING.md` covering: - Setup instructions - Development workflow @@ -65,120 +46,42 @@ Every SDK repo **MUST** have `CONTRIBUTING.md` covering: - Discussion-first policy - AI tools section -#### Enforcement - -- CI file existence check -- AGENTS.md for update checking -- Content quality is human-reviewed +### PR template -#### Per-SDK override - - Setup/workflow are SDK-specific. Quality bar and AI -sections use shared template. +Every SDK repo **MUST** have a GitHub PR template with description structure guidance and a linked-issue reminder. Keep it minimal — provide guidance rather than enforcing rigid structure with mandatory sections. --- - - -## PR Template - -#### Rule - -Every SDK repo **MUST** have a GitHub PR template with description structure guidance and linked-issue reminder. The template **SHOULD** be minimal, providing guidance rather than enforcing rigid structure with mandatory sections. + -#### Enforcement +## Documentation ships with code -- File existence +User-facing changes need corresponding docs: -#### Suggested skill(s) +- **New feature**: docs PR to [sentry-docs](https://github.com/getsentry/sentry-docs/) +- **Behavior change**: docs update +- **Deprecation**: migration guide (see [breaking changes and deprecations](/sdk/getting-started/standards/api-architecture#breaking-and-deprecation)) +- **New config option**: docs entry -- [`sentry-skills:create-pr`](https://github.com/getsentry/skills#available-skills) - -#### Per-SDK override - - Wording varies. Linked-issue prompt is universal. +The SDK PR should link to the docs PR. Neither merges without the other being at least approved. --- - - -## Documentation-with-Code - -#### Rule - -User-facing changes **REQUIRE** corresponding docs: - -- **New feature**: Docs PR to [sentry-docs](https://github.com/getsentry/sentry-docs/) -- **Behavior change**: Docs update, -- **Deprecation** Migration guide ([Deprecation lifecycle](/sdk/getting-started/standards/api-architecture#deprecation-lifecycle)) -- **New config option**: Docs entry - -SDK PR links to docs PR. Neither merges without the other being at least approved. - -#### Enforcement - -- AGENTS.md instruction -- Human review - -#### Per-SDK override - - - - - ---- - - - -## AI Context File Maintenance - -#### Rule - -AI context files (AGENTS.md, `.cursorrules`, `.github/copilot-instructions.md`, CLAUDE.md) **MUST** be maintained as living documentation: updated with architectural changes, reviewed quarterly, periodically tested by having an AI tool attempt a contribution. - -#### Enforcement - -- Human review -- Quarterly review reminder - -#### Suggested skill(s) - -- [`sentry-skills:agents-md`](https://github.com/getsentry/skills#available-skills) - -#### Per-SDK override - - Which files exist varies. AGENTS.md is required ([AGENTS.md required](#agentsmd)); others recommended. - - - ---- - - - -## AI Skills - -#### Rule - -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. - -Rules files (e.g. `.claude/rules/`, `.cursor/rules/`) **SHOULD** be used for fixed workflow conventions that apply to a specific task or directory. - -#### Enforcement + -- `agents.toml` / `agents.lock` presence in repo -- Human review +## AI context files -#### Suggested skill(s) +AI context files — `AGENTS.md`, `.cursorrules`, `.github/copilot-instructions.md`, `CLAUDE.md` — are living documentation. Keep them up to date with architectural changes, review them quarterly, and periodically test them by having an AI tool attempt a contribution. -- [`sentry-skills:agents-md`](https://github.com/getsentry/skills#available-skills) +`AGENTS.md` is [required](#repo-files). The others are recommended. -#### Per-SDK override +SDK repos **SHOULD** also have [dotagents](https://github.com/getsentry/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. See the [dotagents documentation](https://docs.sentry.io/ai/dotagents/) for setup instructions. - Which skills are active and which rules files exist are SDK-specific. +Rules files (e.g., `.claude/rules/`, `.cursor/rules/`) **SHOULD** be used for fixed workflow conventions that apply to a specific task or directory. From c5fe65d01454bbaf1e6c632312ebee500f255dce Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Wed, 18 Mar 2026 11:06:35 +0100 Subject: [PATCH 2/2] docs(sdk): Fix anchor references to repository-docs Update playbook links to match new section IDs after spec rewrite. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../playbooks/setup/setting-up-new-sdk-repo.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/develop-docs/sdk/getting-started/playbooks/setup/setting-up-new-sdk-repo.mdx b/develop-docs/sdk/getting-started/playbooks/setup/setting-up-new-sdk-repo.mdx index 2cdcd3e6aa61b..af669c1b91cdb 100644 --- a/develop-docs/sdk/getting-started/playbooks/setup/setting-up-new-sdk-repo.mdx +++ b/develop-docs/sdk/getting-started/playbooks/setup/setting-up-new-sdk-repo.mdx @@ -49,9 +49,9 @@ You **MUST** set up a `CODEOWNERS` file with team members to automatically reque You **MUST** create the following files: -- `AGENTS.md` ([AGENTS.md](/sdk/getting-started/standards/repository-docs#agents-md)) — Use the [AGENTS.md template](/sdk/getting-started/templates/agents-md-template). You **SHOULD** use the [`sentry-skills:agents-md`](https://github.com/getsentry/skills#available-skills) skill to generate initial content. -- `CONTRIBUTING.md` ([CONTRIBUTING.md](/sdk/getting-started/standards/repository-docs#contributing-md)) — Use the [CONTRIBUTING.md template](/sdk/getting-started/templates/contributing-md-template), customized for this SDK. -- `.github/PULL_REQUEST_TEMPLATE.md` ([PR template](/sdk/getting-started/standards/repository-docs#pr-template)) — Use the [PR template](/sdk/getting-started/templates/pr-template). +- `AGENTS.md` ([AGENTS.md](/sdk/getting-started/standards/repository-docs#repo-files)) — Use the [AGENTS.md template](/sdk/getting-started/templates/agents-md-template). You **SHOULD** use the [`sentry-skills:agents-md`](https://github.com/getsentry/skills#available-skills) skill to generate initial content. +- `CONTRIBUTING.md` ([CONTRIBUTING.md](/sdk/getting-started/standards/repository-docs#repo-files)) — Use the [CONTRIBUTING.md template](/sdk/getting-started/templates/contributing-md-template), customized for this SDK. +- `.github/PULL_REQUEST_TEMPLATE.md` ([PR template](/sdk/getting-started/standards/repository-docs#repo-files)) — Use the [PR template](/sdk/getting-started/templates/pr-template). - `CHANGELOG.md` or equivalent - `LICENSE` file @@ -69,7 +69,7 @@ You **MUST** configure: #### 4. AI context files -You **MUST** create AI context files ([AI context file maintenance](/sdk/getting-started/standards/repository-docs#ai-context-maintenance)): +You **MUST** create AI context files ([AI context file maintenance](/sdk/getting-started/standards/repository-docs#ai-context)): - `AGENTS.md` — required You **SHOULD** create: @@ -105,10 +105,10 @@ If the tool cannot do this, the documentation needs work. ## Referenced Standards -- [AGENTS.md](/sdk/getting-started/standards/repository-docs#agents-md) — AI context file requirements -- [CONTRIBUTING.md](/sdk/getting-started/standards/repository-docs#contributing-md) — contributor guidelines -- [PR template](/sdk/getting-started/standards/repository-docs#pr-template) — pull request template structure -- [AI context file maintenance](/sdk/getting-started/standards/repository-docs#ai-context-maintenance) — maintaining AI-readable documentation +- [AGENTS.md](/sdk/getting-started/standards/repository-docs#repo-files) — AI context file requirements +- [CONTRIBUTING.md](/sdk/getting-started/standards/repository-docs#repo-files) — contributor guidelines +- [PR template](/sdk/getting-started/standards/repository-docs#repo-files) — pull request template structure +- [AI context file maintenance](/sdk/getting-started/standards/repository-docs#ai-context) — maintaining AI-readable documentation - [Required reviewers](/sdk/getting-started/standards/review-ci#required-reviewers) — review approval requirements - [Required CI checks baseline](/sdk/getting-started/standards/review-ci#required-ci-checks) — minimum CI pipeline requirements - [Commit message format](/sdk/getting-started/standards/code-submission#commit-message-format) — conventional commit format