AI Coding Weekly

Pocock splits one-way-door PRs into a revertible half

His prompt of the day turns an irreversible change into an expand/contract pair you can test in production first.

Matt Pocock's prompt of the day asks the agent to take a "one-way door" PR and split it in two. The first PR implements everything but stays easy to revert, what he calls a two-way door. The second PR is stacked on top and actually goes through the one-way door. He names the pattern expand/contract and says to use feature flags as needed.

Matt Pocock
@mattpocockuk
X
Lets you de-risk a huge PR by testing large chunks of it in production first.
Oct 26, 2026 · View on X

The stated payoff is risk. In Pocock's words the split "lets you de-risk a huge PR by testing large chunks of it in production first", so the part that cannot be undone, a schema cutover, a deleted column, a protocol switch, is the smallest and last thing you ship.

Why it shows up now

None of this is new release engineering. Expand/contract has been the standard way to do a migration without a maintenance window for years, and feature flags are not an AI invention. What is new is who does the splitting. Pocock is handing the refactor to the agent as a single prompt, which is the kind of mechanical, rule-shaped work that agents are reliably good at and that humans skip because it is tedious.

For working engineers, the pressure behind the prompt is size. Agent-authored changes arrive as big diffs, and a big diff that contains an irreversible step is the worst shape to review, because the reviewer has to be right the first time. Splitting it restores the thing that made small PRs tolerable, which is that you can put the change in front of real traffic and then take it back. Pocock has been pushing in this direction for a while, including a pre-commit hook that blocks agent-authored files over 5,000 tokens.

Worth being clear about the evidence. This is a prompt Pocock is sharing, not a measured result. He gives no numbers, no repo and no before-and-after, and nobody has published a comparison of review outcomes on split versus unsplit agent PRs.

Have the good opinion, not the loud one

One email a day. Under three minutes. What working engineers found out about coding with AI.

Get the next one by email

Coding with AI, read daily so you do not have to. The experiments, the receipts and the arguments from engineers shipping real software. Not a changelog.