feat(stack-aware-ship): stacked PR support workflow integration (Layer 2/3)#560
Draft
tmchow wants to merge 4 commits intofeat/gh-stack-foundationfrom
Draft
feat(stack-aware-ship): stacked PR support workflow integration (Layer 2/3)#560tmchow wants to merge 4 commits intofeat/gh-stack-foundationfrom
tmchow wants to merge 4 commits intofeat/gh-stack-foundationfrom
Conversation
…d skill
New skill owns the value-first description writing logic that was
previously inline in git-commit-push-pr. Input contract is two-shape:
pr:<number> for existing PRs (used by refresh mode), or range:<base>..<head>
for pre-PR generation (used by new PR creation and by ce-pr-stack per
layer). Output is structured {title, body}; caller decides whether to
apply via gh pr edit.
No interactive prompts, no auto-apply, no branch coupling. The skill
is a pure capability — git-commit-push-pr wraps it with confirmation
prompts and evidence-capture for single-PR interactive flows;
ce-pr-stack (via git-commit-push-pr's stack-aware routing, coming next)
will call it per layer without the interactive scaffolding.
Refactor preserves git-commit-push-pr's user-facing behavior:
- Full flow: commit + push + create PR, description generated via
ce-pr-description with range:<base>..<head> and passed to gh pr create
in a single call (no transient placeholder on GitHub)
- Refresh mode (DU-1/DU-2/DU-3): interactive scaffolding stays; DU-3
delegates description generation to ce-pr-description with pr:<number>,
then presents the compare-and-confirm as before
Naming: ce-pr-description, not git-pr-description. PR is a GitHub
artifact; the ce- prefix matches the future convention for plugin
skills. git-commit-push-pr will rename later.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Adds four-case routing between push and description steps: - Case 1: on a stack branch → gh stack push + gh stack submit + per-PR description via ce-pr-description + gh pr edit per PR - Case 2: not in stack, change passes two-stage effectiveness test → suggest stacking, on yes load ce-pr-stack, on return re-enter routing as Case 1 - Case 3: gh-stack not installed, change passes stage-1 → offer-and-run install, on success re-enter as Case 2 - Case 4: monolithic default → existing git push + gh pr create, now with description via ce-pr-description Monolithic Steps 6-7 stay untouched; they are the single source of truth for monolithic description generation. Case 1 explicitly exits before them; Case 4 explicitly hands back to them. Effectiveness test prose carries a sync-obligation comment listing all four locations (this file, ce-work shipping, ce-work-beta shipping, ce-plan). Changes to the heuristic update all four atomically. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Adds a new step 1 to Phase 4 in both shipping-workflow files: run the two-stage effectiveness test (stage-1 size/spread hint, stage-2 effectiveness check with anti-patterns), offer to install gh-stack when missing and the stage-1 hint fires, and branch into either git-commit- push-pr for single-PR shipping or ce-pr-stack for decomposition. Both ce-work and ce-work-beta get identical changes — the two skills share the shipping workflow and must stay in sync. Sync-obligation comment at the top of the stacking section names all four heuristic locations (this file, ce-work-beta twin, git-commit-push-pr stack- aware reference, ce-plan) so future edits propagate atomically. When stacking is chosen, the workflow loads ce-pr-stack and hands off the ship step — git-commit-push-pr is not loaded separately, preventing double invocation. The governing principle carries prior consent across the skill chain without structured flags. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
When a PR under review is part of a gh-stack stack, identify the owning layer for each review comment via git blame + gh stack view --json, check out that layer, apply the fix, cascade via gh stack rebase, push via gh stack push, then reply on the original commented PR with a note when the fix landed on a different layer. Uses gh stack rebase's documented cascade semantics (pulls from remote, rebases dependents). Conflicts during rebase halt the workflow with guidance for manual resolution — V1 does not attempt automated conflict resolution. V1 scope: single-comment, single-layer fixes. Multi-layer fixes (one comment requiring changes in multiple layers) and automated conflict resolution are deferred to V2. Non-stack feedback flow is unaffected. Reference file loads only when gh-stack is installed AND the branch is part of a stack. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This was referenced Apr 14, 2026
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.
⏸ Blocked on gh-stack GA — Draft pending upstream availability
Summary
Second of three stacked PRs. Integrates stacked-PR support into existing stable skills (
git-commit-push-pr,ce-work/ce-work-betashipping workflow,resolve-pr-feedback) so users reach stacking through the same familiar ship flow they use for monolithic PRs.What's in this layer
git-commit-push-pr's Step 6 + DU-3. This portion is shipping standalone via PR feat(ce-pr-description): focused skill for PR description generation #561 — it is independently valuable.gh stack.gh stack.gh stack checkout, cascades viagh stack rebase, pushes viagh stack push. Requiresgh stack.Architectural shape
The four skills that touch stacking form a narrow interaction graph:
No back-edges; no duplicate ship logic. The two-stage effectiveness test carries a sync-obligation comment in each heuristic location.
Stack context
Test plan
Run these once
gh stackis enabled on the repo:plugins/compound-engineering/skills/git-commit-push-pr/references/stack-aware-workflow.mdand confirm four-case routingdiffthem)git-commit-push-pron a real stacked branch; verify Case 1 routing (push + submit + per-PR description via ce-pr-description)/resolve-pr-feedbackon a stacked PR with comments; verify owning-layer identification and cascadeStack created with GitHub Stacks CLI • Give Feedback 💬
🤖 Generated with Claude Code