You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7e97735
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .claude/skills/create-java-pr/SKILL.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,15 @@ default body shape — it is the single source of truth for the sections and che
112
112
reproduce it from memory. Fill in each section based on the changes being PR'd, drop the HTML
113
113
comment hints, and check any checklist items that apply.
114
114
115
+
Before you create the PR, check which repository `gh` targets:
116
+
117
+
```bash
118
+
gh repo set-default --view
119
+
```
120
+
121
+
If it prints anything other than `getsentry/sentry-java`, or nothing, ask the user which repository
122
+
to target. Don't let`gh` pick a community fork.
123
+
115
124
Write the body to `/tmp/pr-body-<branch>.md`, with each `/`in the branch name replaced by `-`, not
116
125
to pr-writer's `/tmp/pr-body.md`: that file outlives sessions and can still hold another PR's body.
117
126
Only after the write succeeds, pass that file to `gh pr create`in place of pr-writer's:
@@ -169,7 +178,7 @@ Add an entry to `CHANGELOG.md` under the `## Unreleased` section.
169
178
170
179
Create the subsection under `## Unreleased` if it does not already exist.
171
180
172
-
**When rebasing:** A rebase onto `main`can land your branch after a release was cut, where the `## Unreleased` heading your entry lived under has since been renamed to that version number. If that happens, move your new entry into an `## Unreleased` section at the top of `CHANGELOG.md` (create the section if it no longer exists) so it is not left under an already-released version.
181
+
**When rebasing or merging `main`:** Your branch can land after a release was cut, where the `## Unreleased` heading your entry lived under has since been renamed to that version number. A merge does this without a conflict, sometimes with a duplicate subsection heading, so check the `## ` headings, not only the diff. If that happens, move your new entry into an `## Unreleased` section at the top of `CHANGELOG.md` (create the section if it no longer exists) so it is not left under an already-released version.
Copy file name to clipboardExpand all lines: AGENTS.md
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,8 +80,9 @@ resolves the per-module test task, including integration test suites, for you.
80
80
3.**Use todo tracking**: Work through todo items, marking them as complete as you go
81
81
4.**High-level communication**: Give high-level explanations of changes made, not step-by-step descriptions
82
82
5.**Simplicity first**: Make every task and code change as simple as possible. Avoid massive or complex changes. Impact as little code as possible.
83
-
6.**Format and regenerate**: Once done, format code and regenerate .api files: `make format api`
84
-
7.**Propose commit**: As final step, git stage relevant files and propose (but not execute) a single git commit command. This applies to implementation work; when the task is to open a PR, the `create-java-pr` skill takes over from here and does commit, push, and open it.
83
+
6.**Don't code for impossible states**: Before you add state tracking or heuristics around a framework object, find out its real lifecycle.
84
+
7.**Format and regenerate**: Once done, format code and regenerate .api files: `make format api`
85
+
8.**Propose commit**: As final step, git stage relevant files and propose (but not execute) a single git commit command. This applies to implementation work; when the task is to open a PR, the `create-java-pr` skill takes over from here and does commit, push, and open it.
85
86
86
87
## Repository Skills
87
88
@@ -133,6 +134,21 @@ The repository is organized into multiple modules:
133
134
-**Formatting**: Enforced via Spotless
134
135
-**API Compatibility**: Binary compatibility is enforced. `.api` files are generated, never hand-edited
135
136
137
+
### Comments
138
+
139
+
The default is no comment. Add one only when it gives a reason that the code, the names, and the
140
+
class Javadoc don't, in one short sentence: a rationale, a gotcha, the meaning of a magic number,
141
+
why an empty catch is safe, or a comment this file requires (for example on a broad catch).
142
+
143
+
- Don't describe what the next line does, in production code or in tests.
144
+
- Don't repeat what a method Javadoc already describes.
145
+
- Existing narrating comments are not a pattern to copy.
146
+
147
+
**Javadoc of an interface, callback, or model class describes only the type itself**, in general
148
+
terms. Requirements on the implementer are fine ("Must be fast, no I/O."). Don't name who calls it,
149
+
when, or on which thread: a type can't promise how others use it. A thread contract belongs on the
150
+
methods of the component that owns the thread.
151
+
136
152
### Exception Handling
137
153
138
154
The following section applies only in cases where the spec (sentry-docs) do not define an exception
0 commit comments