Prompt for behaviour

Here’s a tip for your agentic coding:

Don’t prompt for the thing you want, prompt for behaviour.

Say you need to add authentication. So many details are missing: What kind of auth? How strict? What does it look like? Where does it lead to? Where does it end?

The agent needs context. It has some, can figure out some more. But you, the builder, have most if not all of it. Plus your preferences. Plus your intuition. What needs to happen is telepathic transfer from you to the agent.

The agent is so eager to start working. It is trained for action. Like a junior dev refactoring billing on their first day, it will gladly run amok before you can even type design doc.

So be deliberate about how you want it to act.

You don’t have to spend a day writing a perfect spec. Use the agent’s eagerness to your advantage. Let it do the typing. Instead, short prompts for behaviour:

  • Say, plan authentication with me.
  • And ask me questions to align.
  • And investigate best practices for oauth.
  • And discuss the pros/cons of magic links.
  • Say write our plan to an .md file in docs/

Then, finally, when the context is primed like a stretched bow and arrow: implement @docs/auth-plan.md.

This makes sure the agent doesn’t run like a mad man, 100 km/hour in the wrong direction.

You may not know what the final result should look like. You might not know which details to include. But your intuition does. So help the agent help you both first, then let it run like the wind.