Think about the feedback loop

Coding agents work best when there is a feedback loop that allows them to check their results. In software engineering this typically means some sort of testing. When working with your agent to add a new feature, also work on the feedback loop - the testing strategy - the agent will use to verify its results.

Here is what this might look like as a prompt:

I want to make our homepage more responsive and load quicker for our users.

I first want you to benchmark out competitors, using sensible metrics.

I then want you to update our homepage so that we beat our competitors in every metric.

This is just a simple example. But giving the agent something concrete to work towards allows them to know definitively what done looks like. So to set your agent up for success - always think about the feedback loop.