Code as Specification: Why the Schema Comes Before the Prompt The central mistake in prompt engineering is treating prose as the primary specification. In production systems, the prompt should be downstream of the contract, not the other way around.
Durable Execution: Why Python while Loops Are Not Production Ready A while loop is a state machine whose state lives in RAM. One pod eviction and every completed step is gone. Production agentic workflows require exactly-once semantics — a guarantee that must be encoded in the architecture, not hoped for through retry logic.
Dumb Core, Smart Edge: Agentic Design Many agentic systems I've watched fail in production had the same shape: intelligence concentrated at the center, where it was hard to test, replace, or reason about. The orchestrator was doing too much — routing requests, holding domain knowledge, managing memory, selecting tools, and shaping outputs, all at once.
The Probabilistic State Machine: Why Linear Chains Fail In data engineering, we build linear pipelines. In AI engineering, linear pipelines are fatal. If you have three steps, each with 90% accuracy, your system is only 72% reliable. To fix this, we must abandon the Chain and embrace the Probabilistic State Machine.
The Agentic Contract: Why a Prompt Is Not a Specification A raw prompt can express intent, but it cannot define a real behavior contract. The Agentic Contract turns one agent capability into a typed, executable specification with explicit inputs, outputs, failure modes, and economic bounds.
The End of Determinism: Why Unit Tests Are Useless for AI Agents Alan Turing's machine was absolute. An LLM is not. When we moved from logic to statistics, we broke every testing primitive we had — and most engineers haven't noticed yet.
Why AI Agents Should Be State Machines A monolithic agent prompt hides routing, extraction, tool selection, formatting, and recovery inside one probabilistic call. The antidote is the formal state machine: explicit states, typed transitions, validators, and recovery paths.