My AI agent kept misreading my business logic. So I built a different way to pass it in.

I Made this

Something kept bugging me about the way I was working with AI agents. The obvious cases always worked fine. But edge cases failed differently every time, even with the same rules. I spent a while thinking it was a prompting problem.

It wasn't. I also tried Mermaid diagrams for a while, which helped with readability, but the problem stayed the same: the agent still had to interpret what a node or edge actually meant in context. Natural language and visual freeform graphs have the same issue: they don't separate defining a rule from applying it. So every time the model hit an ambiguous situation, it guessed. Sometimes right, sometimes not.

I started looking into Rulemapping, a methodology originally developed to make legal texts machine-readable. The idea clicked immediately: define the logic explicitly so the agent only has to execute, not interpret. Interpretation stays with me when I build the map.

So I built a browser-based editor for it. You define your logic visually with typed nodes, Decision, Condition, Consequence, Action, Input Data, and export it as JSON or Markdown directly into your agent's context. A few things came out of building it that I didn't plan for: the structure forces you to find your own gaps before the agent does, validation flags dead ends before the JSON reaches the model, and each node can carry a binding level so the agent knows what it can deviate from and what it can't.

No install, no signup: https://visuellamende.github.io/rule_editor_demo/

Curious how others handle this. How do you pass complex logic into your agents?

Posted Jun 15, 2026, 12:58 PM UTC

21
Loading comments…