AI Coding Weekly

Pocock tests harsh lint rules as a leash on agents

The idea that too much choice hurts agents, moved out of the prompt and into the linter.

Matt Pocock posted his experiment of the day, an extremely constrained version of the tools he likes, enforced through what he calls incredibly harsh lint rules. His worked example is React. The agent is allowed to use it, but all state must go in Zustand or useReducer. Nothing else. He is thinking of calling it /constrain.

Matt Pocock
@mattpocockuk
X
Strip out all the nuance, create a black hole of success, all through incredibly harsh lint rules.
Nov 17, 2026 · View on X

The premise he states up front is that too much choice is bad for agents. If that is true, the fix is not a longer prompt explaining which of five state options to prefer, it is removing four of them from the build.

Why the linter and not the prompt

A prompt is advice. An agent reads it, weighs it against everything else in context, and sometimes quietly does the other thing twenty turns later when the file it is editing already uses a different pattern. A lint rule is a failing command. The agent runs it, sees red, and either fixes the code or cannot claim the task is done. The constraint survives context compaction, model swaps and the agent's own taste.

Pocock's phrasing for the goal is worth keeping.

Strip out all the nuance, create a black hole of success, all through incredibly harsh lint rules.

The black hole part is the interesting bit. The aim is not to catch bad code after the fact but to shape the space so that almost every path the agent can take lands somewhere acceptable. One way to do state, one way to fetch, one way to lay out a component. Fewer decisions means fewer places for the model to be creative in a way you have to review.

What we do not know yet

This is an experiment, posted as an experiment. There is no repo, no rule set, no before and after on a real codebase, and no evidence yet that a harshly constrained React actually produces better agent output than a normally linted one. Pocock has not said what /constrain would ship as.

It does fit the direction of his other recent posts, which lean on making work mechanically checkable rather than merely described. He has previously pushed asking how to make a change fully verifiable before starting it. Same instinct here, pushed earlier in the loop. Instead of verifying the change after the agent writes it, you narrow what the agent is able to write at all.

For working engineers, the cheap version of this needs no new tool. Pick the two or three decisions your agents keep getting wrong in your codebase and turn each one into a lint rule that fails the build.

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.