Personally, I only have success with coding agents if it's for filling in some design I already engineered and half-implemented (like added interfaces and method declarations for example)
I feel like this is the best way to condition the agent, I don't have much success trying to do it via the prompt only