# The threshold of vibe programming lies in boundaries, not syntax

Date: 2025-11-12
Category: Tech Topics
Tags: AI Programming, Context Engineering, Engineering Habits
Summary: After handing the code to the model, the typing time saved all turns into time defining boundaries. This piece explains clearly why acceptance criteria, step-by-step progression, rules files, and rollback matter more than prompt engineering tricks.

Let AI add a filter feature to a dashboard. The instruction wasn't short—it covered the requirements, fields, and interactions. After the AI made its changes, a blank white page was not uncommon.

The problem wasn't that it got a single line wrong. It was that it casually replaced the existing global state management, because in its context that looked like a piece of redundancy worth optimizing. I pasted the error, and it made two more rounds of changes, each one proceeding on a wrong assumption, until it had changed the file beyond my own recognition.

That was the first real disagreement between us: it thought it was optimizing, I thought it was tearing down the house.

## A blank page made me change how I work

In hindsight, the cause was ordinary. I crammed three things into one instruction: the filter UI, the data filtering logic, and the chart render update. The three depended on each other, and the model didn't have enough information to tell which was the main body, so it just ordered them itself. It picked the order that was worst for me.

The other layer was context. I'd had it modify that file several times before, and the history was piled with "tweak it again" and "change that back." What it read wasn't a clean project but a chaotic memory of the project. On input like that, even a stronger model can only guess.

I used to think the barrier to vibe coding was "knowing how to write prompts." I don't see it that way anymore. The barrier is whether a person can cut one thing into several small, independent things and state clearly where each one's boundary lies. That ability has nothing to do with syntax; it has to do with architecture experience, and with whether you've been burned before.

Since then I've sorted out how I use it, roughly into three categories.

One is completion. I write half, it writes the other half, and I read line by line. This is the least risky and also the least rewarding—roughly, it saves typing time.

One is conversational editing. I describe a change, it gives a diff, I review. This is where I spend most of my time now. It isn't fast, but it separates "thinking" from "typing," and I only need to keep the former.

One is full agency. Give it a goal, and it finds files, edits them, runs tests, and fixes things itself. This is the most impressive in demos and what I use least. The reason is simple: the longer it runs, the more I have to verify. Ten minutes of autonomous execution might take twenty minutes to confirm it didn't casually change something else.

I don't think the third category has no future. It's genuinely useful in one case: tasks with extremely low verification cost. Changing copy, batch renaming, converting a batch of files by rule. With these, mistakes are immediately visible and rollback is clean. Anything whose verification relies on judgment, I fall back to the second category.

Automation saves operating time, not judgment time. The judgment doesn't shrink; it just gets deferred to the end.

## Define acceptance first, then proceed in four steps

One thing I changed very late, but which paid off the most: before writing code, write out the conditions for "done."

This is an old relationship with test-driven development; I just swapped the executor from myself to the model. The change is direct: before, the task I gave was "add a filter"; now it's "filter by date and type, the two conditions can stack, clearing returns to the full set, switching type preserves the date." The former requires a lot of guessing; the latter just needs filling in.

I don't necessarily write the test file first. Most of the time it's just a few lines of acceptance conditions, written in the conversation. But I insist it restate them first, to confirm it understands the same thing I do. When it restates wrong, it's usually not a comprehension problem—it's that my few lines were ambiguous.

This is also changing my habits in reverse. I used to think as I went, with requirements becoming clear during implementation. That doesn't work now, because the model won't wait for me to become clear—it will produce a version first, and then all my edits become patches on its version. Better to spend ten extra minutes getting the conditions clear than to rework on top of its wrong structure.

Only after the acceptance conditions are set do I let it start. I no longer write long instructions; now it's a fixed four steps, in order.

The first step is narrowing the scope. I state explicitly which directory to change, which file to reference, and what not to touch. The reference-file item is the most useful: saying "follow the card style on the settings page" is ten times more effective than saying "make it look good with Tailwind," because it gives a concrete sample rather than an adjective.

The second step is having it propose a plan first, without writing code. I want to see which files it thinks should change and in what order. This step often catches disasters: if one of the files it lists is one I never intended to touch, I know it's misunderstood.

The third step is generating in batches. Only one file or one function at a time. It loves handing over five files at once—looks satisfying, but I can't review it. Code I can't review is code that wasn't reviewed.

The fourth step is feeding real results back. Not "it errored, fix it," but the full error, what I did, and what I expected, all together. The difference is big: the former makes it start guessing, the latter lets it locate the problem.

I rarely get stuck because the model isn't smart enough; most of the time it's that I didn't give it enough information to judge.

This loop is slow. What could be pushed through in an afternoon might be only three or four files. But it has an advantage: at every step I can stop, and I know where I stopped.

## The rules file is a living document

At first I treated the rules file as one-time configuration: write in the tech stack, naming conventions, directory structure, and then ignore it.

The result is that it slowly goes stale. Not because the file changed, but because the project did. A new caching layer was added and not written in the rules; the error-handling approach changed and the rules still had the old one; a directory's responsibility had long expanded while its description stayed half a year old. The model works from expired rules, and you can't blame it for what comes out.

My current practice is: every time I hit a specific mistake, I add a rule. It used `console.log`, so I add "logging goes through the project's logger"; it changed environment variables on its own, so I add "environment config may only be changed in the designated file." The rules aren't copied from an architecture doc; they grow out of the pits I've fallen into.

On length I have a hard requirement: short. Past two or three hundred lines, I don't want to finish reading it myself, let alone expect the model to take it seriously. A rule that can't fit usually means the project itself has a problem, or that the rule shouldn't be guaranteed by documentation at all.

One thing I insist the model not do: modify the rules file. It can suggest in conversation, but it can't write into it itself. The rules are what constrain it; letting the constrained edit the constraints is a loop with no end.

As the rules grew, the codebase changed too—an unexpected gain.

To make it err less, I split files finer. Cramming three unrelated features into one file means when it changes one it easily touches the other two; split apart, I give it one file at a time and the blast radius is controllable.

I've also come to hate implicit conventions. I used to think "everyone knows where this logic lives"; now it has to be an explicit function, or it will reimplement it elsewhere. Duplication I used to tolerate, I no longer can, because with duplication it only changes one place.

The side effect is that the code has become a bit verbose. Many places have an extra layer of wrapping, several small files replace one big one, and things that used to work by convention now have to be declared explicitly. From a purely aesthetic view, this isn't prettier. But I've traded it for something very practical: I can hand a piece of code to the model on its own, without stuffing the whole project into it.

The math works out for me. Code is read by two people: me and the model. Lowering the reading cost for the latter usually lowers the maintenance cost for the former too. I didn't believe that before; now I somewhat do.

## When it goes off the rails, roll back first, don't negotiate

The most expensive pit I've fallen into was trying to reason with a model that had gone wrong.

That time it made up a nonexistent API. I pasted the error, it apologized, switched to a different approach, and made up another one. After three rounds, the code had two nonexistent dependencies and a deleted state management. Continuing the conversation on top of the errors it created was effectively letting it reason inside a wrong world.

What I do now is mechanical: commit before any complex change. When something breaks, roll back to the last working version and start a fresh conversation from a clean state. Thirty seconds to roll back versus half an hour of negotiating—the math is easy.

If I absolutely have to fix it, I have a rule of my own: two failed fixes in a row, and I stop letting it touch the code. Instead, I have it add logging to print out the real runtime data. It can't see the runtime, so it can only guess; logs pull it out of guessing. It's a dumb approach, but the success rate is far higher than continuing the conversation.

The more I roll back, the more my sense of the boundary shifts. The longer I use it, the less I hand over.

What's suitable to hand over is work that is "clearly structured, clearly bounded, and obviously wrong when it's wrong": moving a component, adding an empty state, extracting duplicated logic into a function, writing a script I can't be bothered to write. It does these faster than I do, and I can tell at a glance from the diff whether it's right.

Three categories are unsuitable. One is core logic involving state transitions—when it's wrong, it doesn't throw an error immediately; it fails silently in some edge case. Another is things that require judging "whether this should be done at all"—it will always give a seemingly reasonable plan, because it doesn't know how to refuse. The last is places where I myself haven't thought it through; if I haven't thought it through, it will only amplify the vagueness into a larger vagueness.

I no longer believe the "you don't need to read the code" line either. I can skip writing it, but I can't skip reading it. The part I don't read will come back for me late one night three months from now. By then, I'll be facing a pile of code I don't recognize, and a person who can't quite remember why it was written this way.

There's one exception: one-off scripts. Run them and throw them away—they don't go into the repo, they carry no maintenance responsibility. I don't look at these at all; I let it write whatever, as long as it runs. Distinguishing "code that will stick around" from "code that gets thrown away after use" is far more practical than finding a compromise review intensity somewhere in between.

I've been following things like MCP (Model Context Protocol). It solves a real problem: the model can't see my database, my logs, my tickets—it can only wait for me to paste them. Once connected, it gets first-hand information, and hallucinations drop a lot.

But it solves access, not judgment. Just because it can see the table schema doesn't mean it knows which table must not be written to in production; just because it can read a ticket doesn't mean it understands who is applying pressure behind that ticket. The smoother the interface, the easier it is for me to forget this.

I'm not sure how long this way of working will last either. Tools are changing, model autonomy is changing—what takes me four steps today might take one sentence next year. But one thing I suspect won't change: the person writing the code is responsible for the result. No matter who typed the code, when something goes wrong, the person standing there explaining is me.
