Skip to content

Commit 849238c

Browse files
docs(sdk): Rewrite Code Submission spec for readability (#17015)
Rewrites the Code Submission standards page to be more human-friendly: - Add intro paragraph explaining the purpose of these standards - Replace rigid Rule/Enforcement/Per-SDK override template with natural prose - Merge PR-related sections (draft mode, description quality, focused PRs) into one cohesive section - Remove username prefix from branch naming convention - Add context explaining why AI attribution matters - Remove enforcement boilerplate and StatusBadge components - Promote spec status to stable, bump to v1.2.0 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 44e9b03 commit 849238c

1 file changed

Lines changed: 45 additions & 152 deletions

File tree

develop-docs/sdk/getting-started/standards/code-submission.mdx

Lines changed: 45 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
---
22
title: Code Submission
33
spec_id: sdk/getting-started/standards/code-submission
4-
spec_version: 1.1.0
5-
spec_status: candidate
4+
spec_version: 1.2.0
5+
spec_status: stable
66
spec_platforms:
77
- all
88
spec_changelog:
9+
- version: 1.2.0
10+
date: 2026-03-18
11+
summary: Remove username prefix from branch naming convention
912
- version: 1.1.0
1013
date: 2026-03-04
1114
summary: Add username prefix and type descriptions to branch naming
@@ -19,11 +22,13 @@ sidebar_order: 2
1922

2023
<SpecMeta />
2124

22-
<SpecSection id="commit-message-format" status="candidate" since="1.0.0">
25+
These standards cover how code gets into SDK repositories — from branch names and commit messages through to PR descriptions and changelogs. The goal is consistency across SDKs so that contributors and reviewers can move between repos without friction.
2326

24-
## Commit message format
27+
<SpecSection id="commit-message-format" status="stable" since="1.0.0">
2528

26-
#### Rule
29+
## Commit messages
30+
31+
Follow the [conventional commit](https://www.conventionalcommits.org/) format:
2732

2833
```
2934
<type>(<scope>): <subject>
@@ -35,199 +40,87 @@ sidebar_order: 2
3540

3641
**Header** (max 100 chars total):
3742

38-
- **Type**: one of:
39-
- `feat` – New user-facing functionality
40-
- `fix` – Broken behavior now works
41-
- `ref` – Same behavior, different structure
42-
- `perf` – Same behavior, faster
43-
- `style` – CSS, formatting, visual-only
44-
- `docs` – Documentation only
45-
- `test` – Tests only
46-
- `ci` – CI/CD config
47-
- `build` – Build system
48-
- `chore` – Deps, config, version bumps, updating existing tooling — no new logic
49-
- `meta` – Repo metadata changes
50-
- `license` – License changes
51-
- **Subject**: imperative mood, capitalize first letter, no trailing period, max 70 chars
52-
53-
**Body**: explain what and why, not how.
54-
55-
**Footer** (one or more of):
56-
57-
- Issue references: `Fixes SENTRY-1234`, `Fixes GH-1234`, `Refs LINEAR-ABC-123`
58-
- Breaking change notices: `BREAKING CHANGE:`
59-
- AI attribution (see [AI attribution](#ai-attribution))
60-
61-
For additional context on commit message best practices, see [Commit Messages](/engineering-practices/commit-messages/).
62-
63-
#### Enforcement
64-
65-
- [commitlint](https://github.com/conventional-changelog/commitlint) in CI
43+
- **Type**: one of `feat`, `fix`, `ref`, `perf`, `style`, `docs`, `test`, `ci`, `build`, `chore`, `meta`, `license`
44+
- **Scope**: optional, SDK-specific
45+
- **Subject**: imperative mood ("Add feature" not "Added feature"), capitalize first letter, no trailing period, max 70 chars
6646

67-
#### Suggested skill(s)
47+
The **body** should explain what changed and why — not how. The code shows how.
6848

69-
- [`sentry-skills:commit`](https://github.com/getsentry/skills#available-skills)
49+
The **footer** is for issue references (`Fixes SENTRY-1234`, `Refs LINEAR-ABC-123`), breaking change notices (`BREAKING CHANGE:`), and [AI attribution](#ai-attribution).
7050

71-
#### Per-SDK override
72-
73-
<StatusBadge type="no" /> Scope values are SDK-specific.
51+
See [Commit Messages](/engineering-practices/commit-messages/) for more examples and guidance.
7452

7553
</SpecSection>
7654

7755
---
7856

79-
<SpecSection id="branch-naming" status="candidate" since="1.0.0">
57+
<SpecSection id="branch-naming" status="stable" since="1.0.0">
8058

8159
## Branch naming
8260

83-
#### Rule
84-
85-
`<username>/<type>/<short-description>` (e.g., `theo/feat/add-client-reports`, `alice/fix/rate-limit-parsing`).
86-
87-
- **username**: GitHub username (e.g., from `gh api user --jq .login`)
88-
- **type**: same types as [commit messages](#commit-message-format)
89-
- **short-description**: overview of the change, in kebab-case
90-
91-
#### Enforcement
92-
93-
- CI advisory (non-blocking)
94-
95-
#### Suggested skill(s)
96-
97-
- [`sentry-skills:create-branch`](https://github.com/getsentry/skills#available-skills)
98-
99-
#### Per-SDK override
100-
101-
<StatusBadge type="no" />
102-
103-
</SpecSection>
104-
105-
---
106-
107-
<SpecSection id="pr-description-quality" status="candidate" since="1.0.0">
108-
109-
## PR description quality
110-
111-
#### Rule
112-
113-
Every PR **MUST** include a description with:
114-
115-
- What the PR does
116-
- Why these changes are being made
117-
- Links to relevant issues or tickets (**REQUIRED** except for typo fixes and one-line doc changes)
118-
- Alternative approaches considered (if any)
119-
- Additional context reviewers need
120-
121-
Test plan sections, checkbox lists, and boilerplate are not allowed. The tests in the diff serve as the test plan. Blank descriptions, template-only descriptions, and AI-generated filler are not acceptable. PR descriptions **MUST NOT** include any customer data or sensitive information.
122-
123-
#### Enforcement
61+
Use the format `<type>/<short-description>`:
12462

125-
- PR template
126-
- CI bot check: non-empty, issue reference present, override via `trivial` label
63+
- **type**: same types as commit messages (`feat`, `fix`, `ref`, etc.)
64+
- **short-description**: what the change is about, in kebab-case
12765

128-
#### Suggested skill(s)
129-
130-
- [`sentry-skills:create-pr`](https://github.com/getsentry/skills#available-skills)
131-
132-
#### Per-SDK override
133-
134-
<StatusBadge type="no" /> Template wording can vary. Linked-issue and non-empty
135-
requirements are universal.
66+
For example: `feat/add-client-reports` or `fix/rate-limit-parsing`.
13667

13768
</SpecSection>
13869

13970
---
14071

141-
<SpecSection id="pr-draft-mode" status="candidate" since="1.0.0">
142-
143-
## PR draft mode
144-
145-
#### Rule
146-
147-
PRs **MUST** be created as drafts. Mark ready when CI passes and description is complete.
148-
149-
#### Enforcement
150-
151-
- Convention
152-
- AGENTS.md
153-
154-
#### Suggested skill(s)
155-
156-
- [`sentry-skills:create-pr`](https://github.com/getsentry/skills#available-skills)
157-
158-
#### Per-SDK override
159-
160-
<StatusBadge type="no" />
161-
162-
</SpecSection>
72+
<SpecSection id="pull-requests" status="stable" since="1.0.0">
16373

164-
---
74+
## Pull requests
16575

166-
<SpecSection id="changelog-entry" status="candidate" since="1.0.0">
76+
### Start as a draft
16777

168-
## Changelog entry
78+
Create PRs as drafts. Mark them ready for review once CI passes and the description is complete.
16979

170-
#### Rule
80+
### Write a useful description
17181

172-
User-facing changes (`feat`, `fix`, `perf`, breaking) **REQUIRE** a changelog entry. Internal changes exempt. Override with `skip-changelog` label.
82+
Every PR needs a description that tells reviewers:
17383

174-
#### Enforcement
84+
- What the PR does and why
85+
- Links to relevant issues or tickets (required except for typo fixes and one-line doc changes)
86+
- Alternative approaches considered, if any
87+
- Additional context reviewers need
17588

176-
- CI check
89+
Skip boilerplate, checkbox lists, and template filler. Don't include customer data or sensitive information. The tests in the diff are the test plan — no need to restate them in the description.
17790

178-
#### Per-SDK override
91+
### Keep PRs focused
17992

180-
<StatusBadge type="yes" /> Format and location vary. Requirement is universal.
93+
A PR should do one thing well. Don't mix functional changes with unrelated refactors or cleanup. If the work naturally splits into distinct categories, make separate PRs. Smaller, focused PRs are easier to review, reason about, and revert if needed.
18194

18295
</SpecSection>
18396

18497
---
18598

186-
<SpecSection id="focused-prs" status="candidate" since="1.0.0">
187-
188-
## Keep PRs focused
189-
190-
#### Rule
191-
192-
A PR **SHOULD** do one thing — and do it well. Avoid mixing functional changes with unrelated refactors, cleanup, or reorganizations. If the work falls into distinct categories, split it into multiple PRs. Smaller, focused PRs are easier to review, reason about, and revert.
193-
194-
#### Enforcement
195-
196-
- Human review + AGENTS.md
197-
- CI advisory for size
99+
<SpecSection id="changelog-entry" status="stable" since="1.0.0">
198100

199-
#### Suggested skill(s)
101+
## Changelog entries
200102

201-
- [`sentry-skills:code-review`](https://github.com/getsentry/skills#available-skills)
103+
User-facing changes (`feat`, `fix`, `perf`, breaking changes) need a changelog entry. Internal changes are exempt. If a user-facing change truly doesn't warrant a changelog entry, use the `skip-changelog` label to opt out.
202104

203-
#### Per-SDK override
204-
205-
<StatusBadge type="yes" /> Size thresholds are SDK-specific.
105+
The format and location of changelog entries varies by SDK, but the requirement itself is universal.
206106

207107
</SpecSection>
208108

209109
---
210110

211-
<SpecSection id="ai-attribution" status="candidate" since="1.0.0">
111+
<SpecSection id="ai-attribution" status="stable" since="1.0.0">
212112

213113
## AI attribution
214114

215-
#### Rule
216-
217-
AI-generated changes get `Co-Authored-By` in commit footer (e.g., `Co-Authored-By: Claude <noreply@anthropic.com>`). This is the only AI involvement indicator. "Generated by AI" or similar markers **MUST NOT** appear anywhere.
218-
219-
#### Enforcement
220-
221-
- AGENTS.md instruction
115+
AI models improve over time, and future models will understand the shortcomings of earlier versions. Tagging commits with the model that produced them gives useful signal when debugging — if you know a commit was generated by an older model, you can focus on the kinds of mistakes that model was prone to.
222116

223-
#### Suggested skill(s)
117+
When AI generates or substantially contributes to a commit, add a `Co-Authored-By` line in the commit footer:
224118

225-
- [`sentry-skills:commit`](https://github.com/getsentry/skills#available-skills) - adds attribution automatically.
226-
- [`sentry-skills:agents-md`](https://github.com/getsentry/skills#available-skills) - ensures AGENTS.md includes the convention.
227-
228-
#### Per-SDK override
119+
```
120+
Co-Authored-By: Claude <noreply@anthropic.com>
121+
```
229122

230-
<StatusBadge type="no" />
123+
This is the only indicator of AI involvement. Don't add "Generated by AI", "Written with Claude", or similar markers anywhere else in the commit.
231124

232125
</SpecSection>
233126

0 commit comments

Comments
 (0)