Ian Provencher
Podcast
← All field notes
Written here 2 min read

From plan to proof

By Ian Provencher

The other three posts in this series each take one part apart. Plan mode, enforced is the planning half, The completion meter is the proof half, and The HUD is the instrument I watch while either runs. This one puts them back together and follows a single job through all of it.

The job is the one that produced these four posts. It started as a message in a plan-mode session, became a plan with sixteen numbered items, and was built by a fresh window I walked away from. Every figure in the story is that job’s own record, read from the two session logs by a script that re-derives each one and traces every number in the posts to its source.

The shape of it

Two windows, one file between them, and a line of code at the end.

The planning window cannot change anything. It interviews me, sends helpers to read the code, and writes a plan whose every item names the command that proves it. Hooks check its work at each step. One refuses a question I could not answer well, and another refuses to let it leave plan mode with a plan that is not finished.

The build window starts clean. It gets the plan file and a goal, and nothing else from the planning conversation. It builds, runs each proof, and asks the meter for a tally. A separate model reads the conversation after each turn and stops the build only when the tally’s last line says it is done.

Two terminal windows. In front, a fresh Claude Code window already working: The strip skips a missing window in its names loop, so the absent case should already pass, with /goal active (1m). Behind, the planning window's recap and its strip: meter, Handed off, the walk-away window counts the build, goal met.
In action: a screenshot of a later job's hand-off, the plan for the HUD's 5-hour window, 31 October at 10:48. The planning window behind ends on Handed off, and the fresh build window in front is already working with its goal set. The grey boxes cover my user name.
  1. 01

    The parts

    Built into Claude Code

    Twelve parts, in the order a job meets them. Each one exists to stop one failure.

    My words his call the ask, before anything is decided Plan mode, the default Claude Code a change before a plan is approved Method loader a hook planning without the interview Helper hold a hook a change before the research lands Question guard a hook a decision I could not answer well The plan a file a step with no way to prove it Precheck and exit gate a hook approving a half-written plan Completion meter a mod done as a claim Handoff a hook a build that carries the interview /goal judge Claude Code a build that stops when it looks done HUD strip a mod a limit found by hitting it My go his call anything public before I read it
    Each box: the part, what kind of thing it is, and the failure it stops.

    Three kinds of part are machinery. A hook is a script Claude Code runs at a fixed moment, such as before a tool call, and it can refuse that call. A mod is code that runs inside Claude Code itself. It can add a tool, watch the session and draw on screen. Two of the boxes are built into Claude Code: plan mode and the /goal judge. Between the planning window and the build, only the plan file and a goal written from it pass across.

    The rest of this story follows one job through every box: the job that wrote this post and the three beside it.

  2. 02

    Words in

    His call

    The job starts as words in a plan-mode session, which can read and ask but cannot change anything.

    01:48 ET · the first prompt
    mode plan · the method loads · 96,655 tokens in the first request

    The first request already carried 96,655 tokens before the model wrote a word. That is Claude Code's own system prompt and tools, this setup's instructions, and the interview method the prompt hook added. Every later request in the window carries all of it again, so whatever the setup adds to a session is read again on every request.

  3. 03

    Research with no side effects

    Enforced by a hook

    The planning window sent 3 helpers to map the code in parallel, and nothing on the machine could change until all of them reported.

    3 search helpers out · their own contexts, read only
    back at 02:00 ET changes open

    A helper reads in its own context and returns a summary, so the planning window holds the conclusion rather than every file the helper opened. The price is that a summary can be wrong. The build window sent two helpers of its own and checked both maps against the code before writing from them. The HUD map corrected the plan's picture of the grading module. The plan had five surfaces sharing one file, and the map found six copies of it, only two of which grade.

  4. 04

    Decisions as boxes

    Enforced by a hook

    Every decision reached me as a box of options, checked by a hook before it was drawn.

    box 1 · 02:15 ET · 4 question(s)
    box 2 · 07:29 ET · 4 question(s)
    box 3 · 07:33 ET · 2 question(s)
    box 4 · 07:40 ET · 1 question(s)

    4 boxes held 11 questions. They covered where the figures come from, how I would use the posts in an interview, whether the meter and the HUD get public code, a stale record, whether my real usage readings could be shown, what would most embarrass me, where I would read the drafts, whether a judge should check a watched build, the restatement, and watch or walk.

    Watch or walk was asked twice. I picked Watch, then typed a switch into the next box's judge question. The gate counts only an answer picked in a box, so the last box asked again. The third box carried the restatement of the whole build inside its question, and I confirmed it there.

    The gap between the first box and the second is overnight. The clock in the panel is wall time, not working time.

  5. 05

    One plan, four readers

    A file

    The plan is one file with four readers, and each reads only the part it needs.

    me · the Intent: who, what, not, why, how, and done
    the exit gate · the seal, From zero, every proof line
    the completion meter · the numbered items and their proofs, frozen
    the launcher · the path and each step's first line, for the goal

    This plan has 11 steps and 5 checks, and every one ends with the command that proves it, or says it is mine or a later event's. The gate and the meter read those lines through the same code, so a plan cannot pass the gate and then be counted differently.

  6. 06

    The precheck and the gate

    Enforced by a hook

    Saving a sealed plan runs every check the exit would run. The exit runs them again, and there a failed check refuses.

    plan saved · 07:40 ET · precheck: nothing to refuse
    ExitPlanMode → the gate ALLOW
    approved · 07:41 ET

    The precheck answers as context, not as a refusal, so Claude fixes the plan before it ever asks to leave plan mode. This plan was saved once and passed the gate on its first exit.

  7. 07

    Approval freezes the list

    A mod

    At approval the meter freezes the list, so nothing written into the plan later can change what counts.

    16 items frozen · 14 in Claude's part
    plus commit, push and close → Claude 0 of 17

    Each item's key is its list and its whole text. Two of the 16 sit outside Claude's part: my read and my go, and the publication that follows it. Neither can be closed by Claude running a command.

  8. 08

    A window opens with the goal

    Enforced by a hook

    Approval opened a fresh window in auto mode, its first prompt already set to /goal.

    goal set · 07:41 ET · 2,500 characters
    first request · 73,267 tokens · the window's own setup, not the interview

    The goal names the plan file, lists each step's first line, and ends with the one line that counts: done when the latest tally ends VERDICT: ALL DONE. The new window starts with none of the planning conversation. Everything it knows about the job is in the plan file and that goal.

  9. 09

    Each proof run, each tally

    A mod

    Only a proof run moves the count. A tally reads it back.

    0714 08:0008:3009:00 T1 Tally 1 at 07:41 ET: Claude 0 of 17, NOT DONE T2 Tally 2 at 08:20 ET: Claude 5 of 17, NOT DONE T3 Tally 3 at 09:02 ET: Claude 8 of 17, NOT DONE ✓ S1 at 07:42 ET: passed, 1 of 14 proved ✓ S2 at 07:47 ET: passed, 2 of 14 proved ✓ S3 at 07:53 ET: passed, 3 of 14 proved ✓ V1 at 07:53 ET: passed, 4 of 14 proved ✓ S4 at 08:01 ET: passed, 5 of 14 proved ✓ S5 at 08:29 ET: passed, 6 of 14 proved ✓ S3 at 08:31 ET: passed, 6 of 14 proved ✓ V1 at 08:31 ET: passed, 6 of 14 proved ✓ S8 at 08:52 ET: passed, 7 of 14 proved ✓ S6 at 09:00 ET: passed, 8 of 14 proved ✓ S7 at 09:13 ET: passed, 9 of 14 proved 9 of 14
    Items proved in Claude's part, after each proof run (✓ passed, ✕ failed). T marks each tally.
    The runs as a table
    Time (ET)ItemExitProved after
    07:42S1clean1 of 14
    07:47S2clean2 of 14
    07:53S3clean3 of 14
    07:53V1clean4 of 14
    08:01S4clean5 of 14
    08:29S5clean6 of 14
    08:31S3clean6 of 14
    08:31V1clean6 of 14
    08:52S8clean7 of 14
    09:00S6clean8 of 14
    09:13S7clean9 of 14

    11 runs to the cut: 11 passed and 0 failed. 2 of them came from a command run in the background, so the meter held each as pending until the engine's own notice reported its exit. The figures script reads those notices the same way. An early version did not, and showed a background build that exited cleanly as a failure, until its count was checked against the meter's own tally.

    The last tally to the cut read Claude 8 of 17, NOT DONE.

  10. 10

    The judge after every turn

    Built into Claude Code

    When a turn ends, a separate model reads the conversation against the goal and decides whether the build may stop.

    goal set · 07:41 ET
    to the cut · 0 verdict(s) written

    The judge runs no commands and opens no files, so it can only weigh what the conversation shows. That is why the goal ends on a line the meter prints. To the cut it had written no verdict. Each turn that ended while it was armed ended with a search helper still at work.

    The log writes the goal again, word for word, each time the conversation is compacted: 2 times to the cut. The figures script reads the first as the moment the goal was set.

  11. 11

    The instruments while it runs

    A mod

    While the build ran, two lines above the prompt showed where it stood: the meter's band and the HUD.

    band · Claude 8 of 17 · the seven stages
    HUD · cache · 5-hour · week · the model window · context

    The build took 5 HUD readings, one at its start and one after each post, and the HUD post grades every one of them. Both lines are there so a glance answers the two questions a long build raises: how much is left of the plan, and how much is left of the allowance.

  12. 12

    My read and my go

    His call

    The build's last act is one question box with the four draft addresses, and only my answer publishes them.

    /blog/completion-meter/ · /blog/intent-lock-update/
    /blog/plan-to-proof/ · /blog/hud/
    go, or what to change

    Drafts render only on my own machine's preview, through the filter the site already uses, so nothing in this build was public before that answer. Publication itself is the plan's last item, a later event's, and it moves the update onto the original address of "Plan mode, enforced".

  13. 13

    The bill for the whole job

    Measured

    The whole job, both windows counted.

    • Planning: 43 requests reading 8,888,211 tokens.
    • Building, to the cut: 353 requests reading 93,534,584 tokens.
    • Together: 102,422,795 read, and 467,553 written.
    • The same build in the planning window would have carried 231,822 more tokens on every request, 184,255,961 in all. The handoff read 44.4% less.

    Almost all of it is re-reading. Each request sends the whole conversation so far, so the written output is a small share of the bill, and a fresh window is how the build stops paying for the interview on every request.

In action

Claude Code's goal panel: Goal achieved (2h · 1 turn · 463.5k tokens), then Goal: Carry out the sealed plan, read it first, it is approved and it is the scope, followed by the plan's eleven steps in short. Then Reason: The latest completion-meter tally, printed after the last change, ends with the required line, quoted as Claude's part 16 of 17, Proved: S1-S11, V1-V5, Commit and push: done, VERDICT: ALL DONE.
In action: a screenshot of the goal panel for the build that wrote these posts, opened at 10:16 on 31 October. It shows the goal the window was given and the judge's reason for stopping: the meter's last tally ended VERDICT: ALL DONE. The grey box covers my user name.
Plan text. The seal lines INTENT-LOCK:CONFIRMED and INTENT-LOCK:WALK, then From zero: the design as if nothing existed, with Simplest, Hardest to break, Most effective, Efficient and Robust lines. Then the numbered Steps, each ending with a Proof line, such as Proof: claude plugin test on the strip's folder, and a Proof line that runs the site's story-figures.mjs --check.
In action: a screenshot of the steps in that plan, 31 October at 10:46. Each step names its proof command, and that exact command is what the build window runs and the meter counts. The grey boxes cover my user name.

What the system does not do

It does not make the plan right. The interview makes it more likely, and the gate makes it complete, but a plan whose proofs check the wrong thing is proved by checking the wrong thing. The defence is a control beside each check, an input that must fail it. In this plan, the story walker must catch keys that do nothing and a planted error, and the figures check must catch a planted wrong value and a number with no source.

It does not remove me. Two decisions stay mine by design: the plan’s intent, confirmed in a box before it is sealed, and the go at the end. Everything between them runs without me, and I read the result before it goes anywhere.

It does not stop a build that is going wrong quickly. The only automatic stops are the ones the plan writes down. This plan’s are six hours of building, or a story that still fails its walk after three rounds of fixes. Inside those limits the meter counts proofs and the HUD shows usage. A build spending its allowance on a bad approach shows on the strip, and stopping it is a person’s call.

#claude-code#workflow#ai#build