Repository navigation
feat(stacking-prs)!: rename split-branch to stacking-prs and cover managing and landing stacks - #54
Merged
Merged
Conversation
- Weight changed lines by file risk and review effort - Add layered configuration, validation, and analyzer coverage - Require goal confirmation and refresh stack headers after changes - Document research on splitting and stacking PRs
Approved brainstorm design for reworking split-branch into a full-lifecycle stacked-PR skill (split, manage, land).
… phase references Renames the skill and its config file to stacking-prs, moves the split flow to references/split.md, adds manage and land phases, fixes the size citations, and adds trigger evals and a structure test.
…replay stack.sh reads the stack from GitHub or GitLab, or from local ancestry, and emits JSON with warnings. restack.sh replays one layer onto a new base with a backup, a lease-protected push, and an optional retarget.
…udes, restack above a split layer
…o run mid-operation
…ects every fork, tightens the CI scan
…it's rebase off update-refs
…hildren, reject undecodable block entries
…child, return a demoted PR to draft
A branch sharing the bottom layer's name prefix (topic vs topic_extra) has backups the old glob also matched, and a descending refname sort put them first. The recovery now accepts only an exact YYYYMMDD_HHMMSS remainder.
- Bind forge operations to the configured remote and report incomplete listings - Improve native, fork, merged-parent, and published-head detection - Prevent unsafe rebases, pushes, retargets, and branch deletion - Make diff analysis robust for unusual paths and encoding - Expand regression coverage for stack and workflow edge cases
…enhance-pr-stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
split-branchonly knew how to cut a big branch into layers. It's nowstacking-prsand covers the whole life of a stack: splitting it, keeping it healthy while lower PRs get review fixes, and syncing it after each merge. The research behind it is indocs/quirk/explorations/2026-10-19-splitting-and-stacking-prs.md, and the specs are indocs/quirk/specs/2026-10-20-stacking-prs/.SKILL.mdis now a short router. It runsstack.shto see where you are and sends you toreferences/split.md,references/manage.md, orreferences/land.md.split.mdkeeps the old flow and adds off-ramps for plans deeper than 4 layers or diffs too small to split, a CI-filter preflight, native GitHub stack registration throughgh stack link, a restack of the layers above a layer you split further, and a step that puts an existing PR back to draft once it isn't the bottom layer.manage.mdcovers a review fix on a lower layer, a moved trunk, and a broken chain. The plan gets approved before anything is committed, backups are taken first, and the--update-refsrebase filters out the backup refs so they stay put.land.mdcovers pre-merge checks and the post-merge sync, including a merged PR with several children and the fork case. The skill never merges anything itself.scripts/stack.shis new. It's read-only and prints the stack as JSON from GitHub (native stacks or the PR base chain), GitLab, or local ancestry, with warnings for forks, deep stacks, GitLab's retarget cap, CI filters that would skip layers, and layers checked out in other worktrees.scripts/restack.shis new. It replays one layer onto its new base after a merge: backup,rebase --no-update-refs --onto, verify, push with--force-with-lease --force-if-includes, then retarget the PR. Each failure has its own exit code.Test Plan
python3 -m pytest -q -p no:cacheproviderpasses on the branch tip. About 230 new tests acrosstests/test_stacking_prs_{skill,stack,restack,analyze}.py.stack.shandrestack.shrun against real temp repos with stubbedgh/glab.gh, and I checked each end state by hand. All three ended where they should./quirk:stacking-prson a real two-layer stack on GitHub.The full suite now takes 8 to 10 minutes.
pytest-xdistwith-n autowould help, but I didn't change the test config here.Changelog
split-branchis renamed tostacking-prsand now covers splitting, managing, and landing stacked PRs. Invokequirk:stacking-prsinstead ofquirk:split-branch. Size weighting can be tuned in.quirk/stacking-prs.json(per repo) or~/.quirk/stacking-prs.json.