Tutorial: Split Giant AI PRs into Reviewable Stacks A tutorial by Stacking.dev advises developers to split large AI-generated pull requests into stacked PRs to improve reviewability, citing a 1,721-line monolith that stalled review. The workflow decomposes diffs into logical layers of 300-400 lines each, using tools like Stacking.dev or GitHub's native stacked PR experience to maintain dependency chains and run CI per layer. Tutorial: Split Giant AI PRs into Reviewable Stacks Coding agents are absurdly productive Gartner's 50% SDLC productivity projection by 2028 feels conservative , but they ship in big blocks by default. They don't care about review ergonomics. That's on us. The problem in practice Last week I asked an agent to add product search to our shopping assistant. The starting state was exactly what you'd expect: - A mock assistant pulling responses from a random line generator - Hardcoded, inconsistent product data scattered across components - Zero backend—no catalog module, no API, no data layer What landed in the PR was a monolith: new data model + seed data, API route + validation, client wiring + UI + all the empty/error/fallback states, updated tests. Clocking in at 1,721 lines. My reviewer's response was predictable: "1,721 lines changed This description isn't very helpful. I'll review this later." Translation: this sits in review limbo for a week, context degrades, feedback quality drops, and the whole thing merges under-reviewed. Stacked PRs: the actual workflow The fix isn't to slow down the agent—it's to give the agent a structure to ship into. Stacked pull requests decompose that giant diff into logical layers: PR 1: Add catalog data model + seed data ↓ PR 2: Build /api/search route + validation ↓ PR 3: Wire client + render UI states ↓ PR 4: Add tests + end-to-end coverage Each PR is ~300-400 lines, scoped to one concern, and naturally builds on the previous one. Reviewers can move linearly—understand the data layer, then the API, then the UI—without holding the entire feature in their head at once. The agent still does its job at full speed. We just route its output through a pipeline that humans can actually consume. Getting started If you're using GitHub, tools like Stacking.dev https://stacking.dev or the native GitHub stacked PR experience let you branch from a parent PR, open a child, and link them automatically. The dependency chain keeps itself in sync, and CI runs per-layer. Start small: pick your next agent-generated feature, break it into 3-4 logical chunks before you even prompt the agent, and watch your review cycle time drop from days to hours. Next Understanding LLM Reasoning Limits: Why Raw Scaling Isn't Enough → /en/threads/4945/ All Replies (0) No replies yet — be the first