Skip to content

Ships a change with a coding agent through plan, implement and verify

Coding with agents · competency coding-with-agents/ships-with-agent

Taught in: the Coding with agents course

Draws on: Running a coding agent, Plan, implement, verify, Context engineering for code

Learning objectives

Runs a session from setup to a reviewed diff (base)

ClaimWhyExample
The learner has the agent describe the codebase and confirm the plan before it edits anything.A wrong model of the repository produces a confident change in the wrong place, and it is cheaper to correct a sentence than a diff [1].The learner asks "where is the config loaded and which tests cover it?" and checks the answer against the tree before saying "go ahead".
Every session ends with the learner reading the full diff.The summary is the agent's account of what it meant to do, and the diff is what it did.The summary says "added validation", and the diff also shows a deleted test, which the learner catches and asks about.
The learner keeps a session to one task and starts a new one when the task changes.A long session carries stale assumptions in context, and the agent keeps acting on the earlier task's constraints.After the bug fix is committed, the learner opens a fresh session for the refactor instead of typing "now also" into the same one.

Served by: Your first session with a coding agent, Keeping API keys out of the agent's reach, Plan first, then drive the change from a failing test, Sandboxing a coding agent

Works in small increments, sequenced for early feedback (base)

ClaimWhyExample
Each increment leaves the system working and adds one thing that can be shown.A working state after every step means a mistake is found in a small diff and the last good state is one step back.The learner asks for "the endpoint returning a hard-coded response first, then the real query, then the caching", and runs the app after each.
The learner sequences increments so the riskiest assumption is tested first.Finding out on day one that the external API does not return what you expected is cheap, and on day five it is not.The integration with the payment provider is the first increment, because its behavior is the least known.
An increment is committed when its check passes, before the next one starts.A commit per increment gives a point to return to and a diff a reviewer can read.Three small pull requests with green tests replace one large one at the end of the week.

Served by: Working from a spec in small increments

Keeps every change reversible (base)

ClaimWhyExample
Every change is on a branch and in commits small enough to revert one at a time.Reverting is the cheapest fix there is, and only if the change is isolated.The learner has the agent commit after each passing increment instead of one commit at the end.
Data and schema changes are designed with the way back written down before they run.Code reverts in a second, and a migrated table does not.The migration adds the new column, the code writes both columns, and then a backfill fills the old rows. Dropping the old column is a separate change a week later, after the code has run on the new one.
The learner prefers a change that can be turned off to one that can only be undone.A feature flag or a configuration switch reverses in seconds and without a deploy.The new ranking algorithm ships behind a flag that is off by default, and is enabled for internal users first.

Served by: Keeping every agent change easy to undo

Gives the agent the files, constraints and limits the task needs (base)

ClaimWhyExample
The learner names the files the task touches and the files it must not touch.Left to search, an agent finds the nearest plausible file, and the nearest one is often the wrong one."Change the retry logic in src/http/client.ts; the tests are in tests/http/; leave src/http/legacy/ alone" instead of "fix the retries".
Constraints that are not in the code are stated in the brief: style, compatibility, what must keep working.The agent cannot infer a rule it cannot see, and a project convention lives in people's heads until it is written down.The learner adds "this must stay compatible with Node 20 and must not add a dependency" because neither fact is visible in the file being edited.
The learner gives the verification command along with the task.An agent that knows how the work will be checked runs the check itself and reports honestly against it."Done when npm test -- http passes and the lint task is clean" lets the agent close its own loop before handing back.

Served by: Your first session with a coding agent, Writing project instructions the agent reads every session, Telling the agent where the task is and where it stops

Keeps their own understanding of the code as the agent produces more of it (expert)

ClaimWhyExample
The learner can explain, without looking, how the parts the agent wrote fit into the system and why they were built that way.An engineer who cannot explain the system cannot review changes to it, and the agent's next change goes unchecked.Asked in a design review why the cache is keyed by user rather than by request, the learner answers from their own understanding without opening a transcript.
The learner reads agent-written code with the same attention as a colleague's, and asks the agent to explain anything they do not follow.Understanding is built while reading, so skipping the reading skips the understanding.The learner stops at a regular expression they cannot parse and asks for a plain-language explanation and a test that documents it.
The learner keeps the architecture decisions and the reasons for them in a place the agent also reads.A decision that is only in someone's head gets contradicted by the next session.The project's docs/decisions/ folder records why the queue is in-process, and the project instructions point the agent at it.

Served by: Staying the engineer who understands the system, Writing project instructions the agent reads every session

Alignment

FrameworkCodeAsksObjectives here
Ng, AI engineering skills mapUsing coding agentsPlan, execute, verify, monitor at calibrated autonomyruns-a-session, works-in-increments, keeps-change-reversible, gives-the-right-context, keeps-understanding
AI Fluency 4D (Dakan and Feller)DescriptionState the goal, context and wanted output clearly, and refine itgives-the-right-context
Brilliant Coding with AISPC-5, BLD-1Manage constraints; direct an agent to a specificationgives-the-right-context
Brilliant Coding with AIINC-1, INC-2, INC-5Working increments, early feedback, reversibilityworks-in-increments, keeps-change-reversible
Brilliant Coding with AIINC-3, INC-4Maintain understanding and coherencekeeps-understanding

References

  1. Anthropic. Claude Code 101. Claude Academy. Course. Academy claude-code-101