Turn one giant AI-generated pull request to a reviewable stack
Aug 4, 2026Julia Muiruri

Summary
This post introduces and details the concept and implementation of stacked pull requests as a method to manage large AI-generated code changes. It explains the trade-offs of monolithic pull requests versus manually managed chains of smaller PRs. The post introduces the `gh stack` CLI extension and `gh stack skills` for agents to manage these stacks. It outlines a four-layer example of adding product search to a shopping assistant, demonstrating how to decompose work into data, API, chat grounding, and UI layers. It also describes the reviewer's workflow for stacked PRs (read top-down, review bottom-up) and the process of updating and rebasing stacks, highlighting the importance of signed commits and the `gh stack rebase` command.