Why production agents fail without Entity, State, Transition, and Constraint.
Most production agent failures are not reasoning failures. They are world-model failures.
The agent did exactly what it was told. The problem was that no one defined the world it was operating in.
Agents hallucinate states, skip constraints, confuse belief with committed facts, and return free-form results instead of executable verdicts. This repo catalogs the most common world-model anti-patterns and shows how to fix them.
A world model defines:
- What exists — the entities your agent operates on (orders, users, payments)
- What state it is in — the current committed status of each entity
- What can change — the valid transitions from one state to another
- What must never be violated — the hard constraints that govern every action
Without a world model, an agent is reasoning about a fiction it constructed from text. That fiction may look correct until it isn't.
| Pillar | Question it answers |
|---|---|
| Entity | What are the objects in this domain? |
| State | What is the current committed condition of each entity? |
| Transition | What state changes are allowed, and from where? |
| Constraint | What conditions must hold before a transition is permitted? |
ESTC is not a framework. It is a design vocabulary. You can implement it in code, YAML, a DSL, or a typed schema. What matters is that it is explicit, executable, and authoritative — not embedded in a prompt.
| # | Anti-pattern | Bad smell |
|---|---|---|
| 01 | State as Text | "The order seems delivered…" |
| 02 | Transition-less Action | refundPayment() without Delivered -> RefundRequested |
| 03 | Guard as Prompt | "Never refund after 7 days" buried in a system prompt |
| 04 | Belief-Commit Confusion | LLM belief treated as SSOT |
| 05 | No Verdict Contract | Agent returns "Done" instead of ALLOW / DENY / ESCALATE |
Each anti-pattern is a boundary violation. ESTC makes those boundaries explicit:
Payload ≠ Entity
Belief ≠ State
Action ≠ Transition
Prompt ≠ Constraint
Text ≠ Verdict
Tool call ≠ Commit
anti-patterns/— Each file covers one anti-pattern: what it looks like, why it fails, and how ESTC fixes it.examples/bad/— Concrete bad examples showing the anti-pattern in action.examples/good/— Concrete good examples showing ESTC-structured alternatives.
You don't need to read in order. Jump to whichever anti-pattern matches a failure you've seen.
This catalog names the failure modes.
World Debt Detector scans prompts, tools, configs, and workflows to detect those patterns automatically.
- Agentic World Model — map: executable world specification toolkit
- ESTC World Model Runtime — engine: Python runtime and schema export
- World Model Anti-Patterns — why it matters: failure catalog
- World Debt Detector — measure it: CLI scanner for implicit world-model debt
Apache-2.0. See LICENSE.