The bottleneck moved, and it moved somewhere less fun
GitHub's own framing is blunt: writing code got faster, but the work around it did not. In one week this October, GitHub reports it saw more than 1.2 billion commits, over 400% more than a year earlier (GitHub Blog). That is a lot of code. The same post asks the obvious follow-up question: do you feel 400% more productive?
Probably not. The post cites a Faros AI study finding that pull requests spent 441% longer in review when teams moved from low to high AI adoption. Treat that number as a directional signal from one study, not a law of nature. The mechanism it points at is real, though: if implementation gets cheap, the expensive steps become planning, review, and figuring out what broke in production.
This article is about those three steps. It is not about prompting better. It is about the loop around the code.
Why planning is the highest-leverage step
A vague task ("make the API accept partial updates") hides decisions. Which fields are optional? What happens to omitted fields versus null fields? Do old clients keep working? An agent asked to implement that task directly will pick answers for you, silently, and you will discover them in the diff.
GitHub describes this as a context problem: the design lives in one tool, a compatibility requirement is buried in Slack, an old pull request explains why the current code works this way (GitHub Blog). An agent can gather that scattered context into one place and produce a reviewable plan. The value is not that the agent is smart. It is that the decisions become visible before anyone writes code.
A senior engineer treats the plan as the review artifact. If the plan is wrong, you spent ten minutes. If the implementation is wrong, you spent a day and a review cycle.
A worked plan-then-implement workflow
The pattern: the agent writes a plan file, a human edits it, and only then does implementation start. The plan is a contract. Here is a small Node.js script that enforces the gate mechanically, so nobody (human or agent) skips it.
// plan-gate.mjs
// Blocks implementation until a plan file exists and is marked approved.
import { readFile } from 'node:fs/promises';
import { existsSync } from 'node:fs';
const PLAN_PATH = process.argv[2] ?? 'docs/plans/current.md';
async function main() {
if (!existsSync(PLAN_PATH)) {
console.error(`No plan at ${PLAN_PATH}. Write the plan first.`);
process.exit(1);
}
let text;
try {
text = await readFile(PLAN_PATH, 'utf8');
} catch (err) {
console.error(`Could not read plan: ${err.message}`);
process.exit(1);
}
const required = ['## Goal', '## Acceptance criteria', '## Out of scope'];
const missing = required.filter((h) => !text.includes(h));
if (missing.length > 0) {
console.error(`Plan is missing sections: ${missing.join(', ')}`);
process.exit(1);
}
if (!/^Approved-by:\s*\S+/m.test(text)) {
console.error('Plan has no "Approved-by:" line. A human must sign off.');
process.exit(1);
}
console.log('Plan gate passed. Implementation may proceed.');
}
main().catch((err) => {
console.error(`Unexpected failure: ${err.message}`);
process.exit(1);
});Run it as the first step of your agent's task, or in CI on any branch that touches source. The point is not the script. The point is that "approved plan" becomes a checkable state rather than a vibe.
A plan that survives review tends to have four parts:
- Goal in one sentence, in terms of observable behavior.
- Acceptance criteria as testable statements, not adjectives.
- Out of scope listing what you deliberately are not doing.
- Open questions with a named owner, so unresolved decisions are visible instead of buried.
If your agent can't fill in acceptance criteria, that is a signal the task is underspecified, not a signal to let it improvise.
Structuring diffs so review stays tractable
Here is the failure mode nobody warns you about clearly enough. An agent produces a 900-line diff that touches the parser, the tests, a config file, and reformats an unrelated module. The code may even be correct. Review it anyway and you will approve it out of exhaustion. That is review fatigue, and it is how agent-written bugs reach production.
The fix is structural: constrain the agent to produce small, single-purpose changes. A few rules that work in practice:
- One concern per commit. Refactors and behavior changes never share a commit.
- Tests in the same commit as the code they cover, so a reviewer sees intent and proof together.
- No drive-by formatting. Configure the formatter to run separately and reject diffs that mix formatting with logic.
- Cap the diff. If a change exceeds a size you set in advance, the agent must split it or stop and ask.
For long-running agent tasks, the discipline of checkpointing and merge gates matters more than the prompt; see durable agent workflows: state, retries and merge gates for how to structure those checkpoints.
A review checklist for agent-authored diffs
Use this as a literal checklist in the PR template. It is written for the reviewer, not the author.
- Does the diff match the approved plan? If the agent did something the plan did not mention, that is a finding, even if the change looks fine.
- Are acceptance criteria covered by tests? Point at the specific test. If you can't, request it.
- Did the agent touch files outside the stated scope? Scope creep in a diff is a review hazard.
- Are error paths handled, or only the happy path? Agents frequently implement the success case and leave exceptions unhandled.
- Are there new dependencies? Any added package needs a reason and a check on maintenance status.
- Do the tests actually assert behavior? A test that calls a function and checks it didn't throw is not a test.
- Is there anything you cannot explain? If you can't explain a line, you can't approve it. Ask the agent to justify it in a comment, then judge the justification.
That last item is the one people skip. It is also the one that catches the subtle stuff.
Using agents for production investigation, with guardrails
Production triage is where agents are most tempting and most dangerous. The temptation: an alert fires at 2am, and you want something to read the logs, correlate the deploy, and propose a cause. The danger: an agent with write access to production is one hallucinated command away from making the incident worse.
GitHub frames this as the Observe stage of the loop, where agents help investigate what happens in production (GitHub Blog). The evidence does not describe specific guardrail mechanisms, so treat the following as engineering judgment, not vendor guidance.
Guardrails that hold up:
- Read-only by default. The agent gets log search, metrics, and deploy history. No shell on production hosts, no database writes.
- Every claim needs a citation. The agent must quote the log line or metric it is reasoning from. "It's probably the cache" is not a finding.
- The agent proposes, a human confirms. The output is a ranked hypothesis list with evidence, not a remediation action.
- Time-box the investigation. An agent that keeps searching without converging is burning incident time. Cap it and escalate.
If your agent ingests logs or tickets, remember that those are untrusted input. Prompt injection through a log line is a real path; the mitigation is architectural, as covered in prompt injection is an architecture problem.
Tradeoffs and when agents make things worse
Situation β Agent helps β Agent hurts Β· Vague task, no plan β Drafts a plan from scattered context β Invents requirements and implements them Β· Large refactor β Mechanical edits across many files β Produces huge diffs nobody reviews properly Β· Production incident β Fast log correlation β Confidently wrong hypothesis wastes time Β· Small, well-specified fix β Fast turnaround β Overkill; you'd have been faster typing
The honest limits:
- Review fatigue is real. A faster pipeline that produces larger diffs can make the team slower overall. The Faros finding cited by GitHub points in this direction, though one study is not proof.
- Context limits bite. Agents lose track of long tasks. Long-horizon work needs explicit state, not a longer prompt. See engineering practices for long-horizon coding agents.
- Agents make things worse when the task is underspecified. The fix is a plan, not a better model.
- Verification is still yours. An agent that says the tests pass is reporting a claim, not a fact. Check it. The approach in testing what your LLM agent actually did in CI is about making that claim checkable.
The pattern across all of this: agents compress the writing step and expand the judgment step. If your team's review and triage practices were already weak, more generated code will expose that faster than it fixes it.