Skip to content

feat(stacked-prs): Add skill for safely updating stacked PRs - #179

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
feat/stacked-prs-skill
Open

sentry-junior[bot] wants to merge 1 commit into
mainfrom
feat/stacked-prs-skill

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Adds a stacked-prs skill so agents stop merging the default branch into a PR whose base is another feature branch. When that happens, every default-branch commit the base doesn't have lands in the PR diff, and CODEOWNERS requests review from dozens of teams on push. Those notifications can't be unsent.

The guidance started as a CLAUDE.md rule. It's moving into a skill so it only loads when an agent is actually updating a PR branch, and doesn't sit in always-on context.

The skill tells the agent to:

  • check baseRefName before any merge, rebase, or push
  • update stacks bottom-up: default branch into the bottom PR, then each base into the PR above it
  • compare the base...HEAD file count to the PR's changedFiles before pushing, and stop to ask if it jumps
  • if a bad push already went out, use the PR timeline's review_requested events to remove only the review requests that push added

The skill is registered in the README, .claude/settings.json, and the claude-settings-audit allowlist.

via Josh Goldberg.

--

View Junior Session [Sentry]

Moves guidance that otherwise lives in always-on CLAUDE.md context into an
on-demand skill: check the PR base before merging, update stacks bottom-up,
verify the file count before pushing, and clean up stray CODEOWNERS review
requests if a bad push goes out.

Co-Authored-By: Josh Goldberg <joshua.goldberg@sentry.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants