DEV Community

Gaurav Narasimhan
Gaurav Narasimhan

Posted on Edited on Originally published at agentair.ai

Agentic engineering: the work around the agent

The model writes the code. Everything that decides whether that code is any good (where the agent starts, what it reads, when it stops, how it proves it's done) is engineering, and it's yours.

I run several coding agents on one laptop, most days in parallel: Claude Code, Codex and a couple of others, working on the same set of repositories and shipping to production.

The agents aren't what makes that work. They're the same ones anyone can buy. What made the difference was everything around them: where a session is allowed to start, which file it reads first, how work is cut into units, how a unit proves it is finished, and how a lesson from one session reaches the next. That surrounding system is what I mean by agentic engineering, and this series is about building it.

Prompting is not the job

The popular picture of working with a coding agent is a conversation. You describe what you want, the agent writes it, you read it and ask for changes. That picture puts all the skill in the prompt.

It's true for a single task. It stops being true the moment you run more than one session, or come back tomorrow, or let an agent ship. At that point the prompt is the smallest part of the outcome. What matters more is:

  • what the agent already knows when the prompt arrives,
  • whether it knows when to stop,
  • whether it can show that it's done, rather than say so,
  • and whether the next session inherits what this one learned.

None of those is a property of the model. Each one is a property of files, settings, scripts and habits that someone has to design. That design work is engineering in the ordinary sense: it has requirements, failure modes, tests and maintenance.

A working definition

Agentic engineering is designing the environment a coding agent works in (its context, its loops, its evidence and its procedures) so that the work it produces is correct, finished and reusable without a person checking every step.

The four parts

Everything I've built for the agents falls into one of four parts. Any setup that works has all four in some form; they just rarely get named.

The system around the agent

  1. PART 1 · Context What the agent knows before you say anything: the rules it loads, the notes it reads, the handoff from the last session. This post covers it.
  2. PART 2 · Loops A unit of work with a goal, a check and a stop condition. An agent without a stop condition either stops too early or never stops.
  3. PART 3 · Evidence The difference between 'I fixed it' and a test run, a health check that reports the deployed commit, or a release that counts only when all seven checks are green.
  4. PART 4 · Procedure How a lesson outlives the session that learned it: a skill, a gotcha, a handoff. This is what closes the loop back into context for the next session.
  5. THE POINT · The agent is the smallest box The model does the typing. The four parts around it decide whether the typing adds up to finished, working software. Those four are what you can engineer.

lit = this part · tap a box · ← → or Play · Interactive version in the original post

1 · Context: what the agent knows before you speak

Every session starts cold. What it knows at the first prompt is whatever it loaded: instruction files, notes, the last handoff. Start a session in the wrong folder and it loads the wrong notes: what it learns there is invisible to the next session that starts in the right place. Nothing errors. The agents are simply, confidently out of date.

The lesson generalizes. Context isn't something you write into a prompt each time. It's a structure on disk: where sessions start, which file every agent finds first, what's shared in git and what stays private. You design it once and then enforce it, because a rule that lives only in a note is advice, and agents don't read advice in files they never open.

2 · Loops: work with a stop condition

An agent is good at continuing. It's much less good at knowing when it's finished. Left alone, it stops at the first plausible result ("the tests I ran pass") or keeps polishing past the point of value.

The fix is to hand the agent a loop rather than a task: a goal, a check that can be run, and a condition that says stop. In One Roof, the desktop app I run these sessions in, this shows up as a readiness check that marks an issue not ready until it says what done means. That one field is what lets a single session take several issues, plan them, work them and move each one to review by itself.

3 · Evidence: proof, not reassurance

Agents report success fluently. Fluency is not evidence. The parts of my setup I trust are the ones where the claim and the proof are separate: a pipeline that won't promote an image to production until the health endpoint reports the same commit that passed staging; a release that counts only when the app installed on the Mac is the new version; a test suite that has to pass inside the worktree before the work lands.

Each of those is there to catch a "done" that isn't.

4 · Procedure: what the next session inherits

The last part is the one that compounds. When a session works out how to do something, such as closing a session properly, shipping a domain or writing a handoff, that knowledge either dies with the session or becomes a procedure the next one can follow.

In this workspace a procedure is a skill: one folder with a SKILL.md that says how to do one job, kept in a single library and linked into every agent's home. Edit it once and every linked agent has the new version at its next start. Failure modes go in a different place, one fact per file in a gotchas/ folder, so the next agent that hits the same wall finds the note instead of the wall.

Why "engineering"

It would be easy to call all of this tooling, or process, or prompt hygiene. I call it engineering because it behaves like the rest of engineering:

  • It has failure modes you can name. The split memory, the missing door, the agent that ships a regression because nobody wrote down what done meant.
  • It has tests. A script that checks every repo has a door; a hook that blocks a session started in the wrong place; a verification step that compares commit hashes.
  • It needs maintenance. The notes index that grew to 606 lines, of which only about the first 150 loaded, was technical debt in the most literal sense.
  • It's cumulative. Each fix makes the next session a little better without anyone having to remember to.

And like the rest of engineering, most of it is boring. One launch folder. One must-read list. A stop condition on every unit of work. None of it is clever, and none of it was true until it was enforced.

What this series covers

Three more posts follow, one for each of the other three parts:

  1. Loops with a stop condition. How to cut work into units an agent can finish without asking: the done-when, the check, and what a loop does when the check fails.
  2. Evidence, not confidence. Where agent work most often claims more than it did, and the gates that catch it: tests in the worktree, verified deploys, releases that count only when every check is green.
  3. One library, every agent. Skills as shared procedure: how one library reaches every agent on the machine, how a card teaches a person the same thing it tells an agent, and how the Agentic Engineering deck is built from it.

Alongside the series, the procedures themselves are becoming a site of their own: Agentic Engineering, a deck of short narrated cards, one per idea, each one a skill an agent can run and a lesson a person can hear in a few minutes. It now lives at /ae on this site and the other sites.

If you take one thing from this post

Before you write a better prompt, ask what the agent knew before it read it, how it will know it's finished, and what it will leave behind for the next session. Those three answers are worth more than the prompt.

Links


Originally published at https://agentair.ai/blog/agentic-engineering.

Top comments (0)