Repository navigation
The plan drafted by the built-in Plan agent, held to the minimum the chain reads - #57
Merged
Merged
Conversation
…chain reads `/surface-plan` wrote `plan.md` itself, from a template of seven numbered sections, most of which nothing in the chain read. What that form held, a good plan, is what the built-in `Plan` agent already produces, read only: it now drafts the plan. - Step 6 of `/surface-plan` launches a fresh `Plan` agent with file paths only: the plan folder and the template, which is its whole mandate, since the chain ships no definition for it. The agent has no write tool: it returns the plan, and the command writes `plan.md` as returned, then checks the minimum the chain reads, nothing else. - The template is that minimum, under three headings without numbers: the acceptance criteria, numbered; the slices, each behind its marker and enough for an agent that starts fresh; the `gates` block. The design and its layout are the agent's. A new revision keeps the slices the journal records as done, under their numbers. - The gates stay the command's: it writes them in `exploration.md` as the gates of the plan, and corrects the block when the agent wrote others. - The exploration of step 4 stops at what the interview needs: the path through the code is the agent's. - A new role `planner` in `models` of `.claude/surface.json`, `opus` by default, passed on the Agent call. `show --json` gains the field, with no new version. - ADR 0035 records the decision. `ARCHITECTURE.md`, the guide and the end to end guide follow, and the toy's plan and exploration take the new form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/surface-planwroteplan.mditself, from a template of seven numbered sections. Nothing in the chain read most of that form, and what it held, a good plan, is what thePlanagent built into Claude Code already produces. That agent now drafts the plan, held to the minimum the chain reads.What was done
Step 6 goes to the
Planagent./surface-planlaunches it fresh, with a prompt of file paths only: the plan folder and the template. The chain ships no definition for it, so the template is its whole mandate. The agent has no write tool: it returns the plan, the command writesplan.mdas returned, then checks the minimum the chain reads and nothing else. A return that is no plan, or one that fails that minimum, gets one more launch, then the command tells the developer and stops.The template is the minimum, under three headings without numbers:
<!-- slice:N -->marker and enough for an agent that starts fresh, a number never reused;gatesblock.The design and its layout, decisions, tests, risks and assumptions, are the agent's. No code beyond a signature or a schema fragment, in the language
exploration.mdnames.A new revision keeps what is built. The agent redrafts from the existing plan, the amendments and accepted plan changes of
interview.md, and the journal: a slice aslice-doneline records stays under its number, and what is left to build goes into slices that have not run, or into new ones.The gates stay the command's. It finds them, writes them in
exploration.mdas the gates of the plan, and corrects thegatesblock when the agent wrote others.A shorter exploration. Step 4 reads the code as far as the interview needs, so that no question is asked that the code answers. The path through the code, layer by layer, is the agent's.
A
plannerrole inmodelsof.claude/surface.json,opusby default, passed on the Agent call like the other roles.show --jsongains the field, with no new version.No prompt names a section of a document by a number: a test holds it for the prompts and the templates.
ADR 0035 records the decision.
ARCHITECTURE.md, the guide and the end to end guide follow, and the toy's plan and exploration take the new form.Decisions
On the questions #56 left open. The developer chose the model; the others were proposed to them and not objected to.
exploration.mdfor the language, the conventions and the gates, and the interview needs enough of the code to ask nothing it answers.plannerinmodels, rather than the session's, so that the chain pins the models of its agents whatever the session (ADR 0031). With no definition, nothing carries a default nor an effort: launched without the model the agent would run on the session's, and it runs at the session's effort.Tests
scripts/gate.shis green. The contract of the prompts holds the three headings of the template without numbers, the readable markers and gates block, the mandate the template carries, the order of step 6, write as returned then check the minimum, the gates named by the command, the exploration that stops at the interview, theplannerrole with no definition behind it, and that no prompt names a section by a number.The end to end tests were run in the container, on real sessions:
conformant, a session killed in a slice resumes it, a modified blueprint stops the loop, the ceiling hands back. The executor and the reviewer work from a plan of the new form.Planonopuswith the two paths, wrote its return, and the plan held the three headings, two slices behind their markers and the gate of the toy, around sections of the agent's own: context, decisions, assumptions, risks. The extraction and the cross-check followed, with no omission, then the hand over./surface-executeapproves.Planagent, cross-checked with no omission, and pushed.All of it cost 3.70 USD at list price.
Risks
Closes #56