Repository navigation
docs: one source for when to stack pull requests - #15389
Conversation
Move the stacked pull request reference to source-control's plugin level (reference/stacked-prs.md) so other plugins can point at it, and make its "When to stack" section the single source: dependent changes, a large change split for review and ordered series stack; independent changes stay separate PRs off the trunk. Replace the stale line that said the pipeline lanes skip a layer whose base is not the default branch: since the trust gate's untrusted-base stop, such a layer gets a failure check, so the reference now says to check the pipeline before stacking. Point pull-request, worktree, work-items (execution-shape, decompose, ship run, work) and implement-dispatch at it instead of restating it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q2ceZLXhTR4d1vkTCe
A skill spoke may not add a ${CLAUDE_PLUGIN_ROOT} path beyond its
baseline (check-spoke-plugin-root).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VQb9Q2ceZLXhTR4d1vkTCe
A stacked PR stops at check-trusted-trigger (untrusted-base) in step 3 of the run job, before check-trusted-base; correct pr-run-activity.md and stacked-prs.md. Drop the restated stack triggers from execution-shape.md and the heading anchors from the cross-plugin links. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q2ceZLXhTR4d1vkTCe
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
A blob URL to the new file 404s until it merges (lychee-online-changed), and an installed plugin cannot reach another plugin by a relative path, so name the source-control plugin's file as the existing cross-plugin citations do. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q2ceZLXhTR4d1vkTCe
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3909728ff7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-review reviewed Code review: no blocking findings. This pass reported blocking findings only, because the prior-findings file shows this lane already reviewed an earlier head ( What changed since the earlier review. The one settled thread asked to drop the
What I checked at head:
Not checked:
|
|
claude-security-review reviewed Security review: PR #15389, docs: one source for when to stack pull requestsNo security issues found. I read every hunk of all 15 listed files and the deletion of Scope
Since the last review: the head commit removes the Instruction-surface lens. I read the deleted
No removed rule loses its enforcement. I judged each rule by its consequence and did not consult the protected-class register ( Trust controls. Nothing changes PR context: I found no embedded instructions aimed at the review lane. Manifests: no critical-findings: 0 |
Take #15400's pr-run-activity.md paragraph (native stack layers into the default branch run their lanes), keeping this branch's step 3 correction for every other non-default base. Update stacked-prs.md to match: the review and run lanes accept such a layer, the merge and issue lanes do not yet (#15410), so unattended lanes still do not stack. Drop the #when-to-stack heading anchors (Codex review). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q2ceZLXhTR4d1vkTCe
No related issue: owner-requested guidance on when to use native stacked pull requests.
Summary
Makes
plugins/source-control/reference/stacked-prs.md(moved fromskills/pull-request/reference/stacks.mdso other plugins can cite it) the single source for when to stack. Stack dependent changes, a large change split for review, and ordered series ("part N of M", blocked-by chains). Keep independent changes as separate PRs off the trunk. The skills that plan, split or open PRs now point at it instead of restating it.It also fixes a stale claim. The reference said the pipeline lanes skip a layer whose base is not the default branch. Since #9019 (2026-10-22), the trust gate fails such a layer, so the reference now says to check the pipeline first and use sequential PRs where it refuses layers. In this repository, #15400 now lets the review and run lanes accept a native stack layer whose stack base is
main. The merge and issue lanes still do not handle layers (#15410), so the reference keeps unattended lanes from stacking until that lands.Fix
source-control/reference/stacked-prs.md: the "When to stack" section now lists when to stack and when not to, adds a "check the repository's pipeline first" paragraph, and says unattended lanes do not stack until their pipeline accepts layers. Its records are re-stamped 2026-11-11, and the queue pointer now names Merging using a merge queue.pull-requestSKILL.md: a "Stack or separate" action default. The links in SKILL.md andmerge.mdnow go to the new path.worktreecontext/create.md: a stacked layer starts from the layer below it.work-itemsreference/execution-shape.md: a new "Stacked per-item PRs" note underper-item PRs. It is not a new shape value, so the parser is unchanged.decompose(Blocked by),ship run(the gotcha about out-of-order merges) andworkpoint at it.workalso says CI mode never stacks.implementationimplement-dispatchreference/item-list.md: a caller may stack a dependent item; the skill never cuts a worker from another worker's branch.docs/upstream/cursor-pstack.md: the link follows the move.docs/conventions/pr-pipeline/pr-run-activity.md: a stacked PR's failure comes from step 3 (check-trusted-trigger,untrusted-base), not step 4.source-control,work-items,implementationandpr-pipeline(patch).Not edited:
code-tidying(batch-simplifyandtidyeach ship one PR by design, so a stack has no place there).babysit-prsandbabysit-loop(they already carry thebabysit_stacked_prsopt-in).hold_patternslist (AGENTS.md,.claude/*, lane workflows, babysit scripts).Verification
plugins/skill-quality/scripts/check-skill.shover thesource-control,work-itemsandimplementationskills roots: 21 passed, 0 failed (the Gotchas warnings were there before this change).markdownlint-cli2on the changed reference files: 0 issues.git grep stacks.mdoutside CHANGELOGs: no references left.execution-shape.md; drop heading anchors from cross-plugin links) were fixed. Local security review: no findings.gh stackis installed on the authoring machine (github/gh-stackv0.3.0, fromgh extension list).Follow-ups
Each item below is a lane that needs a code change before this repository's lanes can use stacks. Issue filing is paused, so they are listed here instead.
main. As first found:.github/actions/check-trusted-trigger/check-trusted-trigger.mjs:1379-1381throwsuntrusted-basewhenpull.base.refis not the default branch. ADR 0055 (docs/adr/0055-load-nothing-head-controlled-into-a-pipeline-skill-activity.md:14-17) records why: a PR into an unprotected branch could choose its own base. The review lanes run this gate (.github/workflows/pr-review-main.yml:353), andci-statusrequires both review lanes on the head (.github/workflows/pr-require-checks.yml:6969-6983), so an upper layer'sci-statuscannot pass. One option is to accept a layer when the webhook'spull_request.stack.base.refis the default branch, and read config from the default branch's tip instead of the layer's base (How workflows run for a stack). That loosens a security control, so it needs the owner's decision..github/scripts/work-resolve-issue/report-outcome.mjs:2638-2641and:2806open every lane PR against the default branch, andcheck-blockers.mjs:142skips an issue while its blocker is open. A stacked series needs the lane to start part N+1 on part N's open branch and open its PR on that base.main..github/scripts/pr-merge/enable-auto-merge.mjs:291-295queriesbaseRefName: "main", so it never sees an upper layer..github/scripts/lib/done-evidence.mjs:65andplugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py:2526requirebase.refto be the default branch. The docs(source-control): re-stamp stacks reference at GA and correct queue text #7668 probe saw an upper layer merge in the same pass and keep its old base, so its merge would not count. UNVERIFIED: whether GitHub closes the issue named by an upper layer'sCloses #Nin that case; probe before relying on it.pr-refinefails a layer (docs(source-control): re-stamp stacks reference at GA and correct queue text #7668 probe).pr-unblock.yml:246-283andresolve-conflictsskip withnot-applicable(docs/conventions/pr-pipeline/README.md:241-242).babysit_stacked_prsis off by default (plugins/source-control/.claude-plugin/plugin.json:145-146), so babysit holds layers for a human.Not blockers:
base,ci-gate,signing,trust-root,merge-queue) all target~DEFAULT_BRANCH, and GitHub applies the trunk's rules to every layer.prune-branches.mjs:40already spares a branch that open PRs use as their base.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01VQb9Q2ceZLXhTR4d1vkTCe