Most automation failures I have seen come from putting a model where a rule belonged, or a rule where judgment was required.
The split
- Deterministic code owns anything with a correct answer: schema validation, formatting, transformations, broker file formats, compliance checks.
- Models own ambiguity: classifying messy inputs, summarising documents, deciding what a human should look at first.
- Humans own accountability: the review gate, the final publish, the exception.
Why the boundary matters
When a model is asked to produce a 21-column broker CSV directly, every run is a new risk. When it is asked to interpret an instruction and a typed schema does the rest, the risk collapses to something testable.
The practical rule
Before adding a model to a workflow, ask whether the step has a verifiable answer. If it does, write code. If it does not, use the model — and put a human review path behind it.