Narrow And Wide Specs

Remember my vibe-coded browser game? It was a fun way to show off how far a frontier model can get you on one or two vague prompts. Other than a general notion of what type of game I wanted it to build, name-dropping a few features, I let the AI make all the decisions. So that would be a very wide spec.

Remember, also, when Cursor had an autonomous agent build a browser from scratch? And when Anthropic had AI agents build a C compiler? Those are examples of a very narrow spec.

In both cases, AI was left to its own devices and delivered something impressive (with the usual caveats on how useful and reliable that agent-produced browser really was...)

This makes perfect sense if you think about it:

In the video game case, the reason I got away with basically no spec at all (and no iteration, either) is that there are a myriad ways to build a satisfying browser game. For my Halloween-themed trick-or-treating game, the AI could have picked any number of different costumes to choose from. It could have picked any number of characters for the homes in the town, and all sorts of different surprises and secrets to find.

In the compiler and browser cases, an AI agent can work autonomously for days because the spec is exhaustive. The ways a browser is supposed to render HTML, style it with CSS and make it interactive with JavaScript are painstakingly documented, over years and years of collaborative (human!) effort.

And where does that leave the rest of us?

  • You probably can't and shouldn't create specs as detailed as those for browsers and compilers. The effort outweighs the benefits.

  • If you let the agent run autonomously for too long, it will, by necessity, invent things to fill any gaps left in the initial spec

There's a great mantra in the fantastic book, The Pragmatic Programmer:

Don't outrun your headlights

Don't code further than you can see, agent or not. Don't ask the agent to build more in one loop than you can absorb (review, inspect, iterate). Most importantly, pick an approach that lets you course-correct cheaply.

Previous
Previous

Taking The Shiny Toys Away

Next
Next

Are better specs the answer?