#architecture
A collection of 12 technical articles about #architecture.
100% coverage, and it still did not run
A feature was completely dead in production while 178 tests were green and coverage held at 100%. Tests measure lines that ran, not the path that ships.
Ask before writing, and refuse when nobody answers
Permission is not a true/false flag. It is a seam with a contract, three sandbox modes that speak only about files, and a safe default: no answer means no.
Cut the context, keep the audit trail
Compaction deletes nothing. It only shadows a range on the surface sent to the model, records exactly which range, and leaves the original in the log for later.
Permission sits on the path, not in the tool
A tool call passes seven stages before it reaches the tool body. Policy, hooks and sandboxing live there — and the tool itself need not know about them.
The log is the source, not a copy
Everything the model sees must be in the log first. Context is never stored beside it — it is derived, and that is the difference between a source and a copy.
The same loop, different seams
Every harness has a log, a tool registry, a context budget and a permission layer. They differ in which of those you may replace — I read four to answer.
Where a harness begins
The loop is only a coordinator. Four parts turn it into a harness: a durable log, a tool registry, a context budget, and a permission layer, all four pluggable.
System One AI: don't burn 800ms just to get one routing keyword
Explore System One AI with TypeSafe Jev: replace slow LLMs with Typed Decisions, probability distributions and the three primitives Choice, Score and Noul.
The while loop works, until it doesn't
An agent loop runs in ten lines. The production version of that same loop is 101 lines, and every extra line marks a place it used to break. Here are the four.
The model proposes, your code executes
The model sees only a tool declaration, never its execution. A tool call is a structured request your code validates, authorises, and then decides to run.
The context window is not memory
A context window is a finite budget, not a memory. On the same request, two published token ratios differ by 1.6x, and you cannot tell which one you are on.
Call the API, then forget
Every API call is a pure function: text in, text out, then nothing. The memory you think the model has is history you resend yourself, and you pay for it.