[ LEVEL HIGHER ]
Architecture / Alexander's field notes

Agentic Coding Architecture: Planner, Tools, Guardrails and Evidence

Reliable coding agents need more than a strong model. They need an operating architecture that controls context, tool access, risk and evidence.

The planner: decide what must be true

Planning is useful when it translates an open-ended request into a sequence of testable states. A good plan names the outcome, the dependencies and the order in which uncertainty will be removed.

The plan should change when inspection disproves an assumption. An agent that follows a stale plan more faithfully than the actual system is not reliable; it is merely deterministic.

The tool layer: turn reasoning into controlled action

Tools give the agent access to files, commands, browsers, APIs and external services. Each tool should expose enough information to verify what happened. A file patch shows an exact diff. An API response reports a status. A browser snapshot provides the current accessible structure.

Broad, invisible access makes debugging harder. Narrow tools create useful boundaries: read before write, test before deploy and separate the authority to inspect from the authority to publish.

Guardrails: protect the rest of the system

Prompt instructions are necessary but insufficient. Operational guardrails should also live in permissions, allowlists, protected paths, input validation, rate limits and deployment assertions.

On a shared home server, a deployment script can verify that the target path is inside the intended project, preserve sibling process state and refuse to continue if a protected file changes. Those checks remain effective even when the model makes a poor assumption.

The evidence layer: close the loop

Evidence tells the agent whether the goal was achieved. Unit tests are one form, but not the only one. Visual tasks need rendered output. SEO work needs indexable HTML, canonical URLs and reachable pages. Payment work needs a sandbox transaction and a verified callback.

Evidence should come from the closest authoritative source. A configuration file is weaker evidence than a live endpoint. A successful build is weaker evidence than a working production route. The final proof should match the user’s actual experience.

State and memory

Agents often need short-term working state: what has been inspected, what changed and what remains. Durable product data should not live in that working memory. It belongs in the application’s database or files with explicit ownership and backup behaviour.

Keeping those two forms of state separate prevents a conversational context from becoming an accidental source of truth.

A practical architecture review

Before trusting an agentic coding system, ask four questions. Can it explain the goal in observable terms? Are its tools constrained to the intended surface? Can risky actions be stopped or reviewed? Does it collect evidence from the real result?

If any answer is unclear, improve the operating architecture before increasing autonomy. More autonomy without better boundaries usually increases the speed of failure, not the speed of delivery.

Alexander's public build log

See what gets built next.

Follow the next build →