Skip to content

Commit 3520717

Browse files
committed
Require a shared prefix and stack position in stacked PR titles
1 parent 3471af3 commit 3520717

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,16 @@ portion that cannot compile, pass the suite or be described in one `What` line i
637637
it belongs with the branch that completes it. When the work genuinely is one decision, one PR is
638638
the right answer and a stack of one is nothing but ceremony.
639639

640+
**Every PR in a stack is titled `<shared prefix> [X/Y]: <rest of the title>`** — so
641+
`Conflict handling [2/4]: resolve the standalone conflict` sits between the `[1/4]` and the `[3/4]`
642+
of the same prefix. The prefix names the work all of them belong to and `X/Y` names the position and
643+
the size, which is the whole of what a reviewer scanning the PR list needs: that these belong
644+
together, which one to open first, and how much more is coming. `Y` is a count, so appending a
645+
branch renumbers every PR already open — retitle them in the same pass as the `gh stack add`, or the
646+
numbering says the series is shorter than it is. `gh stack submit --auto` generates a title from the
647+
branch's commits and carries no prefix, so titles are written or corrected with `gh pr edit --title`
648+
afterwards; a later submit preserves them.
649+
640650
**A PR based on another branch is not automatically a stack.** The commonest reason to cut from an
641651
open branch instead of `main` is that both touch the same file and cutting from `main` would
642652
guarantee a conflict — that is a base branch and nothing more. Point the PR's base at the branch

0 commit comments

Comments
 (0)