Skip to content

Minimal Graph

A workflow graph is read by an agent one step at a time, so every node it contains costs a turn and every branch costs a decision. The default shape is therefore a straight line: start → the responsibilities the task actually has → end. Branches, loops, and extra turns are added when something in the task requires them, not to make the graph look thorough.

flowchart LR
    A[start] --> B[Gather the contract] --> C[Do the work] --> D[Review it] --> E[end]

Add a branch when there is a real alternative outcome — a user decision, a check that can fail, a source that may or may not exist. Add a loop when changing the reviewed artifact can actually resolve the finding; if repair cannot change or reproduce the problem, the correct behaviour is to report the cause, not to route back.

A node that pauses for the agent is justified by one of these:

ReasonExample
New judgmentDeciding an approach from the gathered requirements
Independent reviewA reviewer that must not be the producer
A user decisionApproving a plan, accepting a result
A separate side-effect authorityPublishing, deleting, mutating something external
A real external waitA notification whose answer arrives later

Making a directory, copying a known value, renaming a report, assembling a prompt from files, or recording what the previous node did are none of these. The owner of a substantive operation creates its own artifacts in the same turn.

A graph that grew to forty nodes for a five-responsibility task is telling you something, and so is a graph squeezed to five nodes by merging a reviewer into the producer. Neither number is the goal: preserve the responsibilities, the routes, and the conditions first, then look at the resulting size. Choosing a target count and deleting toward it removes behaviour — a skip route, a failure path, a review — while the count looks better.