name: gh-stack
description: Stacked-PR workflow — split work into a chain of dependent PRs (each layer <200 lines, 1 concern, --base on the layer below). Uses gh stack where enabled, else the manual gh pr create --base fallback. Triggers — "split into stacked PRs", "stack these changes", "make a PR chain", "rebase the stack".
allowed-tools: Bash
@D gh-stack := "stacked-PR workflow" :: skill
do = "split into a chain — each layer <200 lines · 1 concern · --base on the layer below"
do = "before each gh pr create --base <layer-below> run bin/gh_stack_lint.sh <layer-below> — >200 lines (added+deleted) FAILs · split the layer first"
dont = "one large multi-concern PR · skip the gh pr create --base fallback when gh stack is off"
dont = "open a layer PR that fails the line-count gate · raise the 200 cap to pass"