Getting coding agents to build what you meant
A few notes on getting coding agents to build what you actually had in mind.
I’ve spent a lot of this year building things with Claude Code and similar agents. The same pattern keeps showing up: what I get back is fine, and fine is the problem. These are the notes I wish I’d had earlier. They’re short, and they’re opinions, not laws.
Two observations first.
1) Your prompt is not a spec. It feels like one because the agent acts on it right away. But you described maybe three things you care about, and the work involves three hundred decisions. The agent doesn’t stop and ask about the other 297. It fills them in.
2) It fills them in with the average. For any decision you didn’t make, it picks the safest, most common choice it has seen. Each pick is reasonable on its own. Put them together and you have something that looks like everyone else’s, because in a real sense it is. Nothing errors and nothing looks broken. It just comes out bland.
So the job is mostly about making those decisions yourself before the agent makes them for you. Here’s roughly how I do that.
The recipe
1. Don’t write code yet. Start by having the agent study whatever you’re working with: the files, the data, the existing app, the documents. Ask it what it notices, what’s odd, what’s missing. Half my good ideas come from this step, and it’s also the cheapest place to find out the agent misunderstood something.
2. Get interviewed. Don’t try to write the perfect prompt. Ask the agent to question you one thing at a time until nothing is left to guess. It’s surprisingly good at finding the decisions you didn’t know you were skipping. It also asks about the boring parts, and the boring parts are exactly what it would otherwise get wrong without telling you.
3. Borrow someone else’s eyes. Ask how a specific expert would approach the problem, someone whose way of thinking you can name. I was skeptical, but it reliably gets me better research and sharper questions. It works best when you also ask what that person would look at first and what they’d ignore. That gives the agent priorities instead of a costume.
4. Write it down: spec, then plan. When the conversation is done, have the agent write a spec covering what we’re building, what we decided, and how I’ll know it’s done. Then have it write a plan from the spec. Both go in files, so the decisions outlive the chat.
5. Ask a stranger. Open a fresh session and ask it to tear the plan apart. A fresh session wasn’t there when the decisions were made, so it has nothing to defend. Give it the plan, not your opinion of it, or it will politely agree with you.
6. Build three, keep one. When there are several reasonable directions, especially for anything visual, don’t pick one from a description. Have the agent make quick rough versions of each and look at them side by side. The Superpowers brainstorming skill does this well. It’s cheaper than you’d think, and it beats arguing in the abstract.
7. When you’re lost, think out loud. Sometimes you don’t know what you want yet. Dump every idea into the chat, including the half-baked ones, and let the agent find the thread. If some part stays fuzzy, ask how other people have solved that exact problem. Someone usually has.
A note on memory
Agents that remember how you work are great until the memory turns into a rulebook. Write “always do X” enough times and the agent stops considering anything else, and so, slowly, do you. I now write preferences as “prefer X because Y”. The reason lets the agent see when an exception makes sense. Every so often I also ask it to suggest a few approaches it wouldn’t normally pick, rate them, and tell me which of my rules it would break.
A prompt to start with
This is roughly what I paste at the start of anything bigger than a small fix:
Before writing any code, help me think this through.
1. Study what we're working with (files, data, the existing app) and tell
me what you notice: what's odd, what's missing, what you'd ask about.
2. Interview me, one question at a time, about the decisions I haven't
made yet, including the boring ones. Don't fill gaps with defaults. Ask.
3. Where there are several good options, show me two or three with their
trade-offs and say which you'd pick. Don't pick silently.
4. When nothing is left to guess, write SPEC.md: what we're building, what
we decided and why, and how I'll know it's done. Then write PLAN.md.
Don't start building until I say so.
Conclusion
None of this is clever. It’s mostly about slowing down at the start, which is the part that feels least productive and matters most. It’s all based on my own experience, so try it, change it, and keep what works for you. Have fun :)