| name | poocommerce-git-draft-pr |
| description | Create a high-quality draft PR for the current branch. Use when the user says "create a PR", "draft PR", "open a PR", "make a PR", "push and create PR", or "submit PR". |
Create Draft PR
Create a concise, reviewer-friendly draft PR from the current branch.
Dynamic Context
- Current branch: !
git branch --show-current
- Commits: !
git log trunk..HEAD --format="%h %s" --reverse 2>/dev/null || echo "No commits ahead of trunk"
- Diff stat: !
git diff trunk...HEAD --stat 2>/dev/null
- Uncommitted changes: !
git status --short
- Existing changelogs: !
git diff trunk...HEAD --name-only -- '*/changelog/*' 2>/dev/null
- PR template: !
cat .github/PULL_REQUEST_TEMPLATE.md
Procedure
1. Preflight and Analyze
Verify from dynamic context: not on trunk (stop if so), commits exist ahead of trunk (stop if none), no uncommitted changes (stop if dirty).
Base branch: use release/* if the branch was created from one, otherwise trunk.
From the dynamic context above (read full diffs only if the stat summary is ambiguous), determine:
- Change type: Fix, Add, Update, Dev, Tweak, Performance, or Enhancement
- Significance: Patch (most common), Minor (new features), Major (breaking — rare)
- Bug fix? Look for issue refs in commits/branch name (e.g.,
#12345, fix/issue-12345)
- UI changes? Changes in
client/, templates/, CSS/SCSS, JSX/TSX
- Plugin-affecting? Code shipped to users = yes. CI/CD, workflows, tooling, docs = no. This drives the Milestone, Changelog, and Release Communication decisions in Step 3.