split-prs
Split PRs
Turn one pile of work into a gh-stack of deployable slices. Rewrite freely (reorder, fixup, squash) so each slice is review-by-commit and safe to ship alone. Keep the grain coarse — split only when review clarity or deploy risk earns it.
Requires docs/agents/commit-style.md and the gh stack extension (gh extension install github/gh-stack). Run /setup-formsg-ai-skills if commit style is missing. Deployability and grain rules: DEPLOYABLE.md. PR titles and bodies inherit the review voice from TEMPLATE.md.
Gate: propose the plan and wait for approval before rewriting history, creating branches, pushing, or opening PRs. Snapshot first (git stash create → refs/backup/pre-split-<timestamp>).
Process
1. Survey
Pin trunk (PR base if one exists, else repo default). Capture git diff <trunk>...HEAD, git log <trunk>..HEAD --oneline, the existing PR body if any, and intent from chat / breadcrumbs / issue refs. Note ownership signals (CODEOWNERS) when they suggest natural cuts.
Done when: trunk, diff, commit list, and intent sources are in hand.
2. Propose the stack
Draft the coarsest set of deployable slices that still improve review or risk. For each slice, list: