DEV Community

Cover image for GitHub stacked PRs are the review tool agentic development needed
Ahsan Ali
Ahsan Ali

Posted on

GitHub stacked PRs are the review tool agentic development needed

Agents can write a 2,000-line PR in ten minutes. Nobody can review it in ten minutes.
That's the real bottleneck in agentic development. Not writing code. Reviewing it.
GitHub just made stacked PRs generally available, and I think they matter more for agents than for humans.

One feature, four layers

Instead of one giant PR, the agent splits the feature into layers:

  • #101 DB schema- #102 API (built on #101)- #103 UI (built on #102)- #104 Tests (built on #103)Each PR targets the one below it. Each one is small enough to actually read. ## Two ways to merge
  • Merge the bottom one. The next PR automatically retargets to main. Repeat.- Merge the top one. Every approved layer below it lands in one click.## Let the agent do the splitting GitHub ships an agent skill: gh skill install github/gh-stack. With it, the agent can turn a big diff into a stack, or plan the stack before writing a line. ## What changes
  • Reviews you can do properly, not skim- Feedback on layer 1 while the agent builds layer 3- Impact assessment per layer, not per featureOne caution: check your merge strategy first. Squash merges can fight with stacks. Agents made writing code cheap. Stacks make reviewing it possible.

Top comments (0)