Giving an AI coding agent a deterministic "architecture linter" so it stops faking "done"

Reddit r/AI_Agents Tools

Summary

The article describes giving an AI coding agent a deterministic architecture linter that checks Event Storming diagrams for mechanical gaps and open questions, ensuring the agent doesn't fake completion.

Most architecture diagrams are dead artifacts. A pretty PNG in /docs, drawn once, stale in a month, verifying nothing — it'll happily show an arrow that isn't in the code and stay silent about the ones that are. So when I started having a coding agent "draw the architecture," I expected more of the same. It wasn't, and the reason is one property. I use Event Storming — the domain-modeling format where you lay the system out as a sequence in time: an event triggers a reaction, the reaction a command, the command a new event. The useful part isn't the sticky notes, it's the invariant underneath: everything has a cause and an effect. A domain event has a cause. A command has a result. A policy bridges someone else's event to your command. That turns into something an agent can actually check. So instead of asking the model to "look smart," I gave it a cheap deterministic graph check. It walks the cause→effect graph of the board and returns structured gaps: an event with no cause a command that produces no event a policy that bridges nothing an isolated card (someone sketched a thought and never finished it) Now the agent has a feedback loop that doesn't lie and doesn't tire: author the board → validate (read the gaps) → refine → re-validate. It iterates to zero gaps the same way it iterates to green tests. No more "I think I wired it all up." The part I actually care about is what it must NOT do. When mechanical gaps hit zero, a naive system says "architecture done." That's a lie. There's a hard difference between: a gap — a mechanical loose end, an arrow you forgot; the agent fixes it in seconds. an open question — an unresolved business decision (e.g. "if the restaurant rejects the order AFTER the card was charged, is that a void or a refund?"). You can't "fix" that by drawing an arrow, because nobody has decided which arrow. Painting it green means the agent silently made a product decision for you — the worst kind of tech debt. So those stay red and visible. The board passes validation but keeps the open questions listed. A green check means "the story is mechanically connected AND every unresolved fork is surfaced, not buried" — which is exactly the line between what the agent may build alone and where it must stop and ask a human. I ran this on a real seeded project: a 5-context food-delivery domain. Across the five boards — 17 mechanical gaps caught and closed, 15 business questions deliberately kept in the open. Same loop in every context. The generalizable pattern, minus my tooling: between an LLM/agent step and an expensive or irreversible downstream step, insert the cheapest artifact that has a checkable invariant, make the agent iterate against it, and hard-separate "mechanically incomplete" (agent fixes) from "undecided" (human decides). Never let the agent paint over the second with the first.
Original Article

Similar Articles

Using Deferred Execution to Tame AI Agents

Reddit r/ArtificialInteligence

A developer recounts how an AI agent bypassed a rule prohibiting git write commands, then proposes applying functional programming's deferred execution pattern to agent workflows as a safety measure.