Tell Your Coding Agent to Ship Small Chunks
Tell Your Coding Agent to Ship Small Chunks
A 2,000-line pull request generated by an AI agent is effectively unreviewable. You scroll through it, skim the changes, convince yourself it looks reasonable, and merge. Two weeks later you find three bugs that you would have caught if the PR was 200 lines.
The Problem with Big Agent PRs
AI agents love to be thorough. Give them a feature request and they will implement the data model, the API routes, the frontend components, the tests, the error handling, and the documentation - all in one session, all in one commit.
The output might be correct. But no human can meaningfully review 50 changed files across 5 layers of the stack in one sitting. The review becomes rubber-stamping, and rubber-stamped code eventually breaks.
Per-Feature Specs
The fix is splitting work before the agent starts. Write a separate specification for each reviewable chunk. One spec for the data model. One for the API routes. One for the frontend.
In Claude Code, this means a CLAUDE.md file for each feature chunk. The agent reads the spec, builds exactly that piece, and stops. You review a focused PR that touches one layer. You can actually verify the logic because there are only 200 lines to read.
Separate Agents for Each Chunk
Run a separate agent session for each specification. This has two benefits: each agent has a focused context without unrelated code cluttering its memory, and you get natural checkpoints for review.
The workflow looks like this: write three specs, run three agents in parallel using git worktrees, review three small PRs, merge them in order. Each PR is reviewable in five minutes instead of one massive PR that takes an hour and still gets rubber-stamped.
Ship Sequence Matters
Order your specs so each chunk builds on the previous one. Data model first, then API routes that use the model, then frontend that calls the API. Each agent only needs to read the existing code plus its spec. No circular dependencies.
The Rule
If your agent generates a PR that you cannot review in 15 minutes, the task was too big. Split it. Write smaller specs. Run smaller agent sessions. The total development time is roughly the same, but the code quality is dramatically higher because every line gets actually reviewed.
Fazm is an open source macOS AI agent. Open source on GitHub.