What makes a good coding-agent prompt
If you are using an AI coding agent (Claude Code, OpenCode, Cursor, etc.) to develop real-world, professional-grade software, what makes a good prompt?
Because coding agents are "garbage in, garbage out". So it pays to be careful what you feed them.
In my view, here are some important factors:
1. Precision
Referring to the level of detail you choose to express in your prompt.
"Build a website" is not very precise. "Build an informative marketing website that has a home page, a contact page, and a products page" is more precise.
Your prompts will never be 100% precise. Nor do they need to be.
But below your prompt's level of detail, the coding agent will insert what amounts to the statistical average of its training data. And if you're not detailed enough, that average will probably not be what you want.
2. Exactness
This means describing what you want, clearly enough that you won't get something else instead.
So if you want the program to use a particular library, or have a certain architecture, your prompt says that.
More subtly, if you want a certain design aesthetic for the user interface, you are going to have to describe it in clear enough terms that the coding agent can create what you have in your mind's eye.
After all, coding agents cannot currently read your mind. For better or worse.
3. Thoroughness
Meaning: does your prompt cover everything it should?
Not that it needs to cover everything, because you will have more than one prompt.
But for what you have decided is the scope of this one prompt, and what you want to accomplish, have you described everything you want the coding agent to include?
Again, anything you leave out, the coding agent will decide based on the average of its training data.
4. Constraints
Think 'secondary requirements'.
Whatever main requirements the software must fill, it may have other rules it needs to follow.
For example, if you need to use certain versions of a library, or align with a certain standard, or even follow certain UI conventions.
5. Invariants
This means things that are always true, or things that are never true.
"Leverage any opensource libraries which make sense and will simplify the implementation."
"Ensure the program is cross-platform, so that it works on macos, linux and windows."
"Do not use mocks in the test suite, unless it is necessary to avoid network operations when running tests."
So that is my list of what makes a good prompt for a coding agent.
What other factors can you think of? Reply and tell me.