Step 7: A plan in phases
Step 7: A plan in phases
The seventh step of the harness I put around my coding agents: a plan I write in the repo, each phase ending on one commit, behind a gate.
Part of the series: Codebase Harness, Step by Step · View all parts
Previously in this series: Step 6: Fitness functions keep the architecture
At first I told the agent: make a plan, then follow it. It did, and I controlled nothing. Commits I could not map to anything, a plan that lived nowhere in my repo. So now I write the plan, in the repo, and each phase of it ends on one commit.
Two dimensions. A guide acts before the agent, a sensor after. Each is inferential, judged by a model, or computational, decided by a program. Inferential guides are what the agent reads, AGENTS.md, a skill, a plan, sharper written in the literature's words; computational guides are deterministic tools, a codemod, a generator, a command that acts in the agent's place, code mode, where the agent writes a program instead of a string of actions, a language server. Inferential sensors are a review by a model or a person; computational sensors are the type checker, the linter, tests and fitness functions. Each practice moves a judgement toward computation, and the computational sensor is the optimum.
- 4 · literature in skills
- 5 · skills
- 1 · type checker
- 2 · linter
- 3 · dead code
- 6 · fitness functions
- 7 · plan in phasestoday
In Birgitta Böckeler's grid of guides and sensors, the plan is a guide the agent reads. What makes it hold is the gate each phase must pass before it commits: a computational sensor. The series' map: Guides and Sensors: Mapping Your Attention to Free It
What it changes
A commit then means something: one phase of a plan you approved before it ran. And a phase commits only when its gate is green.
The gate runs the same checks as the agent's loop: type check, lint, format, dead code, the architecture test. The agent runs them while it works; the gate refuses the commit when one fails.
The longer argument, on my blog: Encode, Don't Imply
If you want an example, here is the first plan of one of my tools: lbdremy/phax/docs/plans/archive/2605111617-phax-cli-plan.md
Next in this series: Step 8: The files of each phase
A thought after reading?
If you would like to discuss about this article, you can write to me here. I share because I care and I want to learn. Please teach me with care.