Code what can be code. If a step has a right answer that a rule can find, a rule finds it. Validation, routing, retries, writes to a database and anything that must happen exactly once stay in plain code. The model handles the judgement in between. On the agent that maintains this website, the model edits page content and nothing else; redirects, the page registry and restores are deterministic operations a person approves.
Give the agent sensors, not just instructions. A rule in a prompt is a request. A test, a type check or a validator that fails loudly is a fact the agent can act on. The most reliable harnesses we have built tell the agent quickly and mechanically when it is wrong.
Keep context small and relevant. More context is not better context. We give each step the files, rules and records it needs, and send focused subagents to explore and report back, so the main loop does not drown in its own history.
Grant the least access that does the job. Each tool gets its own scope. The agent that reads the inbox cannot send from it without approval; the agent that runs tests cannot deploy.
Measure before and after. No harness change, model swap or prompt edit ships without the evaluation set passing. See evaluation harnesses.