stack
╭───STACK───╮
dev
└─ #101
└─ #102
└─ #103
╰───────────╯Squash-safe stacked PR/MR repair for coding agents working in GitHub or GitLab repos that squash-merge and delete branches.
stack is agent-first. Humans can run it directly, but the happy path is: let the agent do normal code work with plain git, then use stack for stack inspection, repair, merge, and undo workflows.
Install
npm install -g @kitlangton/stackInstall the agent skill too:
npx skills add kitlangton/stack --skill stackInstall and authenticate the matching host CLI:
gh auth login # GitHub
glab auth login # GitLabAgent Happy Path
- Create stacked changes using normal git branches.
- Open the root PR/MR against trunk, for example main or dev.
- Open each child PR/MR against its parent branch.
- Preview the stack:
stack sync- Apply the safe maintenance workflow:
stack sync --apply- Merge from the root when ready:
stack merge
stack merge --applyUse stack merge --auto when the code host should wait for merge requirements, then repair descendants automatically after the root lands.