# Plan, implement, verify

> A repeatable rhythm for shipping with a coding agent: plan before editing, drive the change from a specification or a failing test, land it in small working increments ordered so feedback arrives early, keep every step reversible, and record the work in commits and pull requests a team can review.

Page: https://schubergphilis.github.io/ai-training/topics/coding-with-agents/workflow/
License: CC BY-SA 4.0, https://creativecommons.org/licenses/by-sa/4.0/

*Coding with agents* · topic `coding-with-agents/workflow`

A repeatable rhythm for shipping with a coding agent: plan before editing, drive the change from a specification or a failing test, land it in small working increments ordered so feedback arrives early, keep every step reversible, and record the work in commits and pull requests a team can review.

## Concepts

- **Plan mode**: Having the agent explore and propose before it edits anything. In plan mode it reads the code, asks questions and writes down the steps it intends to take; you correct the plan while corrections are cheap. Most agent mistakes are cheaper to catch in a plan than in a diff, so use it for any change touching more than a couple of files. [glossary](https://schubergphilis.github.io/ai-training/glossary/#plan-mode)
- **Spec-driven change**: Writing the specification of a change, including its success criteria, as a document the agent works from and the reviewer checks against. The spec stays the source of truth while the agent iterates; when the code and the spec disagree, one of them is updated deliberately. It suits changes where the design matters more than any single test. [glossary](https://schubergphilis.github.io/ai-training/glossary/#spec-driven-change)
- **Test-driven change**: Writing or having the agent write a failing test that captures the desired behavior, then implementing until it passes, then cleaning up. The test gives the agent an unambiguous target it can run on its own and gives you proof that the change does what was asked. It suits bounded behavioral changes and bug fixes. [glossary](https://schubergphilis.github.io/ai-training/glossary/#test-driven-change)
- **Working increments**: Landing a change as a series of small steps, each of which leaves the system working and tested. Increments keep the diff reviewable, keep the agent's context focused and make it obvious which step introduced a problem. An agent will happily produce a large change in one go; asking for increments is part of the brief. [glossary](https://schubergphilis.github.io/ai-training/glossary/#working-increments)
- **Sequencing for early feedback**: Ordering increments so the riskiest assumption or the most visible behavior is tested first. Build the thin end-to-end path before the details, the integration before the polish, the part you are least sure about before the part you are certain of. Early feedback turns a possible rewrite into a small correction. [glossary](https://schubergphilis.github.io/ai-training/glossary/#sequencing-for-early-feedback)
- **Reversibility**: Keeping every change easy to undo: committed in small steps, on a branch, with no destructive operations mixed in, and with data migrations that can be rolled back. Reversibility is what makes it safe to let an agent try something. If a step cannot be reversed, it is the step that needs a human to look before it runs. [glossary](https://schubergphilis.github.io/ai-training/glossary/#reversibility)
- **Commits and PRs**: Recording agent-assisted work in the team's normal units: focused commits with messages that say why, and pull requests that explain the change, link the specification and state what was verified and how. Good commit boundaries make review and revert possible; a PR that describes the agent's role lets reviewers calibrate their attention. [glossary](https://schubergphilis.github.io/ai-training/glossary/#commits-and-prs)

## Links

- **Builds on:** [Running a coding agent](https://schubergphilis.github.io/ai-training/topics/coding-with-agents/first-session/), [Deciding and specifying](https://schubergphilis.github.io/ai-training/topics/coding-with-agents/specification/)
- **Leads to:** [Context engineering for code](https://schubergphilis.github.io/ai-training/topics/coding-with-agents/context/), [Verifying agent work](https://schubergphilis.github.io/ai-training/topics/coding-with-agents/verification/)
- **Competencies drawing on it:** [Ships a change with a coding agent through plan, implement and verify](https://schubergphilis.github.io/ai-training/competencies/coding-with-agents/ships-with-agent/), [Works with agents alongside a team](https://schubergphilis.github.io/ai-training/competencies/coding-with-agents/works-in-team/)

## Lessons

- [Staying the engineer who understands the system](https://schubergphilis.github.io/ai-training/coding-with-agents/keeping-understanding/) (explanation)
- [Plan first, then drive the change from a failing test](https://schubergphilis.github.io/ai-training/coding-with-agents/plan-then-test/) (tutorial)
- [Keeping every agent change easy to undo](https://schubergphilis.github.io/ai-training/coding-with-agents/reversible-changes/) (tutorial)
- [Working from a spec in small increments](https://schubergphilis.github.io/ai-training/coding-with-agents/spec-driven-increments/) (tutorial)

## Sources

- `DLAI-5` [Claude Code: A Highly Agentic Coding Assistant](https://www.deeplearning.ai/courses/claude-code-a-highly-agentic-coding-assistant), DeepLearning.AI (course)
- `DLAI-6` [Introduction to Generative AI for Software Development](https://www.deeplearning.ai/courses/introduction-to-generative-ai-for-software-development), DeepLearning.AI (course)
- `Brilliant INC` Developing incrementally, Brilliant, Coding with AI skills map (reference)
- `Academy claude-code-101` [Claude Code 101](https://academy.claude.com/courses/claude-code-101), Claude Academy (course)
- `Academy ai-native-sdlc-playbook` [The AI-native SDLC playbook](https://academy.claude.com/courses/ai-native-sdlc-playbook), Claude Academy (course)
