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) <noreply@anthropic.com>