Back to writing
Parham Davari
Parham Davari

What AI Agents Taught Me About Thinking First

I’ve been delegating coding tasks to AI agents — Claude and Gemini, mostly — and something unexpected has come out of the process.

To hand off work effectively, I have to be precise. Not just about what I want built, but about the inputs, the business rules, and the edge cases I’d normally figure out on the fly while writing the code myself. The agent doesn’t fill in the blanks the way I do. It follows what I give it.

The Spec Costs More Than the Code

Preparing a clear enough brief for an AI agent often takes longer than doing the task myself would have. That sounds like a bug. It’s actually a feature.

Because in the process of writing that brief, I catch things:

  • Logical assumptions I hadn’t questioned
  • Gaps in my understanding of the problem
  • Missing validations I would have added mid-implementation — or worse, shipped without

The act of articulating a task clearly enough for an agent to execute it is, itself, a form of design work. It forces early decisions that would otherwise be deferred until the code was already half-written.

A Pattern I Recognize From Research

This reminds me of how I approach academic research. I’ve learned to keep the discovery phase — exploring, reading, asking questions — separate from the deep analysis phase. Mixing them produces muddier thinking in both.

Working with AI agents follows the same logic. The thinking and the doing need to be distinct steps. When they’re collapsed into one, you get lower-quality output from both the human and the machine.

The Broader Shift

I think the AI era is quietly pushing developers toward a habit that good engineers have always practiced but rarely enforced: thinking before building.

The difference is that now there’s a forcing function. If your brief is vague, the agent produces something vague. The feedback loop is fast and unambiguous.

Has your approach to coding shifted in the AI era — more upfront planning, more structured thinking before you write the first line? I’d be curious to hear whether others are experiencing the same pull.