Visual decision trees vs. text-heavy acceptance criteria: What’s your workflow?

As a PO, I kept hitting the same wall: I’d spec out a feature, write it up as clearly as possible, and still get an implementation that handled edge cases differently than intended. Prose is just a terrible format for capturing complex decision logic.

Recently, I started experimenting with a different approach: forcing all decision logic into strict visual trees (conditions and outcomes) before drafting any text for tickets.

The original catalyst for this was actually AI. We wanted to map out logic so strictly that an AI agent couldn't "interpret" or hallucinate the rules. But something surprising happened when our BAs and testers got involved: the AI part became secondary, and the visual modeling became the actual value.

Building a decision tree collaboratively forces you to spot logical gaps before a single line of code is written. A missing branch stands out instantly in a diagram. In a Jira ticket, it just blends in as a sentence that made sense yesterday. It completely removed the ambiguity for our developers.

One specific practice that has been a game-changer for us: attaching concrete input examples directly to the consequence nodes. Basically forcing ourselves to answer "when exactly does this happen?" with real input values, which later serve as strict test cases.

I'm curious about the BA perspective on this. Have you completely moved to structured visual modeling (like DMN or custom decision trees) for complex logic, or do you still find yourselves writing extensive prose and hoping the developers interpret it correctly?

reddit.com
u/visuellamende — 7 days ago

Ich habe Rulemaps gebaut um KI-Agenten anzuleiten. Dann habe ich es andersherum probiert.

Die ursprüngliche Idee war einfach: Geschäftslogik visuell mappen, als typisiertes JSON exportieren und dem Agenten als strukturierten Kontext übergeben. Präziser als Fließtext, weniger Interpretationsspielraum.

Um mein generiertes JSON zu überprüfen, habe ich den Weg umgekehrt. Ich habe einen kleinen Python Bot mit Ollama und Qwen 3.6 gebaut, der das JSON Schema kennt und anhand einer bestehenden Codebase automatisch Decisionmaps erstellt. Diese JSON lade ich in meinen Editor und kann auf einmal grafisch sehen, was im Code eigentlich drinsteckt.

Als Nicht-Entwickler war das ein echter Aha-Moment. Nicht nur für die Dokumentation praktisch, sondern auch für Reviews: Map laden, anpassen, dem Agenten für gewünschte Änderungen zurückgeben.

Getestet habe ich es an meinem eigenen Projekt NoteLog, das leider keine besonders komplexe Entscheidungslogik hat. Die Maps blieben entsprechend überschaubar. Mich würde interessieren wie das bei einer Codebase mit echter Komplexität aussieht: tief verschachtelte Bedingungen, gewachsene Businessregeln, viele Edge Cases.

Möchte das mal jemand bei seinem (komplexen) Projekt probieren?

Web Demo (kostenlos, kein Account): https://visuellamende.github.io/rule_editor_demo/

reddit.com
u/visuellamende — 13 days ago

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

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.

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

reddit.com
u/visuellamende — 20 days ago

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

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/\](https://visuellamende.github.io/rule\_editor\_demo/)

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

reddit.com
u/visuellamende — 20 days ago

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

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?

reddit.com
u/visuellamende — 21 days ago

How do you keep your prompts consistent when the logic gets complex?

At some point plain prompts stop scaling. You add conditions, exceptions, edge cases and suddenly the prompt is a wall of text that the model half-ignores and you can barely maintain.

I started looking into Rulemapping, a methodology originally developed to make legal texts machine-readable. The core idea is to break down complex rule systems into explicit conditions, outcomes, and exceptions in a format that both humans and machines can process without ambiguity. If it works for legislation, it should work for prompt logic.

So I built a browser-based Rulemap editor. No install, no account. You define your logic visually, export it as JSON, and drop it into your prompt as structured context. I've been using it for code audits, feature specs, and generating test cases – anything where the model needs to follow defined rules rather than interpret vague instructions.

Web demo (free, no signup): https://visuellamende.github.io/rule_editor_demo/

Curious how others handle this. Do you keep complex logic in plain prose, use YAML, chain prompts, something else?

reddit.com
u/visuellamende — 23 days ago

Ich habe einen visuellen Editor gebaut, damit KI-Agenten Entscheidungslogik als Spec nutzen können

Ich arbeite als Product Owner an einem eigenen Projekt und nutze dabei KI-Agenten für die Entwicklung. Ein Problem, das ich immer wieder hatte: Wie beschreibe ich Entscheidungslogik so, dass ein Agent sie korrekt umsetzen kann?

Beispiel: »Wann bekommt ein Nutzer Zugriff auf einen geschützten Bereich?« Das klingt einfach, aber dahinter steckt ein Entscheidungsbaum — ist der Nutzer in der Organisation? Hat der Bereich eine Mitgliederliste? Welche Rolle hat der Nutzer? Je nach Pfad: Zugriff erlaubt oder verweigert.

Ich bin dann auf Rulemapping gestoßen, eine Methodik aus dem juristischen Bereich, bei der man Entscheidungslogik als Baumstruktur abbildet. Jeder Knoten ist eine Bedingung, jeder Pfad führt zu einem eindeutigen Ergebnis. Kein Interpretationsspielraum.

Damit habe ich zuerst einen Code-Audit-Bot gebaut: Ein lokales KI-Modell (Ollama/Qwen) bekommt die Rulemap und den Quellcode, und prüft mechanisch, ob jeder Entscheidungspfad im Code implementiert ist. Das hat erstaunlich gut funktioniert, der Bot hat tatsächlich fehlende Berechtigungsprüfungen gefunden.

Der nächste Schritt war, die Rulemaps auch als Implementierungsspezifikation zu nutzen, also nicht nur zu prüfen, sondern dem Agenten zu sagen: »Hier ist die Logik, bau das.« Aber der bestehende Rulemap Builder ist für juristische Sachverhalte gebaut und exportiert nur XML. Für Software-Workflows war das sperrig.

Also habe ich einen eigenen Editor gebaut: den Rule Editor. Speziell für Softwareentwicklung, mit vier Knotentypen (Decision, Condition, Action, Consequence), JSON-Export statt XML. Man klickt auf »+«, wählt einen Knotentyp, formuliert die Bedingung und baut den Baum Knoten für Knoten weiter.

https://preview.redd.it/awhlbtfsbz6h1.png?width=1790&format=png&auto=webp&s=c9250fcca0b6678d0490713db047685c92771f23

Das Besondere am Export: Jeder Knoten kann neben dem fachlichen Label einen technischen Key und Datentyp haben (»isUserInOrganization«, boolean). Verbindungen haben neben »Ja/Nein« einen maschinenlesbaren Wert (»true"/"false«, »GUEST"/"MEMBER«). Ein KI-Agent kann das JSON direkt traversieren und daraus Code generieren.

Web-Demo zum Ausprobieren: https://visuellamende.github.io/rule_editor_demo/

Die Demo läuft komplett im Browser (localStorage), keine Anmeldung. Es gibt auch eine native macOS-Version mit Dateisystem-Integration und Autosave.

Stack: React, TypeScript, React Flow, Tauri (für die Desktop-Version).

Ich würde mich über Feedback freuen, vor allem: Wie beschreibt ihr fachliche Logik für eure KI-Agenten? Habt ihr ein ähnliches Problem?

reddit.com
u/visuellamende — 23 days ago