Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .claude/skills/create-java-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Derive the branch name from the changes being made. Use `feat/`, `fix/`, `ref/`,

**For stacked PRs:** For the first PR in a new stack, first create and push the collection branch (see `.cursor/rules/pr.mdc` § "Creating the Collection Branch"), then branch the PR off it. For subsequent PRs, branch off the previous stack branch. Use the naming conventions from `.cursor/rules/pr.mdc` § "Branch Naming".

**CRITICAL: Never merge, fast-forward, or push commits into the collection branch.** It stays at its initial position until the user merges stack PRs through GitHub. Updating it will auto-merge and destroy the entire PR stack.

## Step 2: Format Code and Regenerate API Files

```bash
Expand Down
8 changes: 6 additions & 2 deletions .cursor/rules/pr.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ git push -u origin HEAD
gh pr create --base main --draft --title "<type>(<scope>): <Topic>" --body "Collection PR for the <Topic> stack. Squash-merge this once all stack PRs are merged."
```

**CRITICAL: Do NOT manually update the collection branch.** Never merge, fast-forward, or push stack branch commits into the collection branch. The collection branch stays at its initial position (the empty commit on `main`) until the user merges individual stack PRs into it one by one through GitHub. If you fast-forward the collection branch to include stack commits, GitHub will auto-merge and delete all stack PR branches, destroying the entire stack.

### Creating a New Stacked PR

1. Start from the tip of the previous stack branch (or the collection branch for the first PR).
Expand Down Expand Up @@ -237,12 +239,12 @@ Once all stack PRs are merged into the collection branch, the collection PR is *

### Syncing the Stack

When a base PR changes (e.g. after addressing review feedback on PR 1), merge the changes forward through the stack:
When a base PR changes (e.g. after addressing review feedback on PR 1), merge the changes forward through the stack **between adjacent stack PR branches only**:

```bash
# On the branch for PR 2
git checkout feat/scope-attributes-logger
git merge feat/scope-attributes
git merge feat/scope-attributes-api
git push

# On the branch for PR 3
Expand All @@ -251,4 +253,6 @@ git merge feat/scope-attributes-logger
git push
```

**Never merge into the collection branch.** Syncing only happens between stack PR branches. The collection branch is untouched until the user merges PRs through GitHub.

Prefer merge over rebase — it preserves commit history, doesn't invalidate existing review comments, and avoids the need for force-pushing. Only rebase if explicitly requested.
Loading