CanonBall

Guide / One milestone, station by station

Build: write the code

The builder agent writes the code from the agreed milestone, and uses the observability tools to see what the code does.

Who
Agent: BuilderPerson: Architectif the team keeps detailed design
Reads
roadmap/M2-…/diff/roadmap/M2-…/tasks/observe/
Writes
src/refunds/observe/signals.md
In the repo
See exactly what this station changed a0c4938…1a1c0c7

What arrives

An agreed milestone arrives: one decision with three examples, a design, and three named tasks.

The builder starts from the files every agent reads first, then reads the files in the milestone’s diff/. Those files are its instructions, so it does not need the conversations that produced them.

Named tasks

The planner has sliced the milestone into tasks.

tasks/
  01-total-refunded.md   Read everything already refunded on an order.
  02-auto-approve.md     Apply DEC-031 in the decision logic, and pay what it approves.
  03-decision-log.md     Log each DEC-031 decision with its clause and inputs.

Each task names where it works, what it traces to, and when it is done, as a check that passes: “Done when: the DEC-031 satisfies/2 check passes.” Nobody marks a task done by hand.

Reading what the code did

The builder writes the rule first, on the lookup the service already had, starts the service in the verification environment, and tries a split refund by hand: an order whose first $60 refund is still waiting in review, and a second request for $60. The second refund is approved, when it should have gone to review.

Rather than reread its own code and reason about what might be wrong, the builder asks the system what happened.

$ observe/tools/observe decisions --order 7731
DEC-031  auto-approve under $100
  result  approved
  reason  total refunded $60, under $100

The total should read $120. The old lookup, total_paid, counted only refunds the gateway had paid, so the first refund, still in review, was left out. The first task replaces it with total_refunded in the store, which counts every refund on the order that is not refused, as the design says. The fix is short because the cause was read from the log.

The third task is what makes this possible. Logging each decision with the clause it applied and the inputs it used is part of the milestone from the start. Observability explains what to build and why agents depend on it.

What the builder cannot do

  • Change a check. It can run every check the verifier writes. If it thinks one is wrong, it attaches a proposed correction, and the verifier applies or rejects it.
  • Change the canon. If a clause cannot be met as written, the milestone goes back to Shape with a question. The builder must never work around a clause quietly.
  • Add behavior nobody asked for. Behavior a customer or another system could notice needs a clause, while plumbing that changes no such behavior, such as logging or configuration, does not. Review looks for the first kind.

Where a person comes in

On this team the architect made the two design calls at Shape, and reads what the agents decided when the milestone is released. A team that keeps detailed design with a person has the architect set the module boundaries and interfaces before the builder starts. That is a setting, described in Handing over decisions.

In both cases the product manager is not needed at this station and is already shaping M3.

What leaves

The station’s output is code in src/refunds/ for all three tasks, and the new values of the decision log listed in observe/signals.md. In practice Build and Verify run side by side from the same plan; the belt shows them in order because nothing counts as built until it is verified.