Aug 08, 20261 min read

Building Better AI Workflows

A practical look at structuring research, implementation, testing, and verification when working with coding agents.

AISoftware Engineering

Good work with coding agents is less about finding a single perfect prompt and more about creating a reliable loop around the model. The useful unit is a small, observable workflow: understand the context, make a focused change, and verify what happened.

Make the work legible

Before implementation, write down the shape of the problem. A short plan gives the agent boundaries, exposes missing decisions, and makes it easier to tell whether a result is complete. The plan should be specific enough to guide the work without turning into a second implementation.

typescript
type WorkflowStep = {
  name: string
  run: () => Promise<void>
}

export async function execute(steps: WorkflowStep[]) {
  for (const step of steps) {
    await step.run()
  }
}
Diagram of the understand, implement, verify loop feeding back into itself
The loop repeats until the result is verified, not just produced.

Close the loop with verification

Verification is not optional — it's the step that turns a guess into a fact. At minimum, that means running type checks and the relevant test suite, the same habits described in The Shape of a Useful Code Review.

  • Type checks pass without new suppressions

  • Linting is clean, not silenced

  • The relevant test suite runs and passes

  • A manual pass through the changed surface, not just the diff

A minimal loop

  1. Read the diff before running anything

  2. Run the checks that actually cover the change

  3. Confirm the result matches the original intent, not just that it compiles

A workflow you can't observe is a workflow you can't trust.

Checklist showing understand, implement, and verify as sequential steps
A minimal checklist is often enough to keep the loop honest.

None of this is exotic. It's the same discipline that makes any engineering work reviewable — applied consistently enough that it holds up when the agent, not just a human, is the one making the change.