Skip to content

chore: Add stacked PR support to create-java-pr skill and PR rules#5151

Open
adinauer wants to merge 2 commits intomainfrom
feat/pr-stack-workflow
Open

chore: Add stacked PR support to create-java-pr skill and PR rules#5151
adinauer wants to merge 2 commits intomainfrom
feat/pr-stack-workflow

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 4, 2026

📜 Description

Updates the create-java-pr skill and .cursor/rules/pr.mdc to support stacked PRs:

  • Skill file (.claude/skills/create-java-pr/SKILL.md):

    • Added Step 0 to determine PR type (standalone, first in stack, next in stack)
    • Extended Steps 1 and 5 with stacked PR instructions (collection branch, --base, [Topic N] title format)
    • Added Step 5.5 for updating stack lists on all PRs
    • Made Step 6 (changelog) conditional — skips for non-user-facing changes, adds #skip-changelog to PR description
    • Added required reading directive pointing to pr.mdc as source of truth
  • Rule file (.cursor/rules/pr.mdc):

    • Added collection branch workflow (empty commit for immediate PR creation)
    • Stack list goes in PR description (top of body) instead of a separate comment
    • Merge strategy: merge commits for stack PRs, squash-merge for collection branch into main
    • Explicit "do not merge PRs" guardrail for agents
    • Syncing and finding PRs in a stack

💡 Motivation and Context

The skill previously only handled standalone PRs. The PR rule file had stacked PR docs but the skill didn't reference or use them. This change connects the two so the agent can handle the full stacked PR workflow.

The collection branch pattern with merge commits avoids repeated merge conflict resolution that squash merging causes when syncing stacks.

💚 How did you test it?

Manual review of both files for consistency and completeness.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Test the skill end-to-end by invoking it to create a stacked PR.

#skip-changelog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@adinauer adinauer marked this pull request as ready for review March 4, 2026 09:11
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant