← Back to Podcast

Episode 39 - Live AI Agent Coding From Event Model Changes in Real Time

Martin and Adam discuss how AI agents can now pick up event model changes live and generate code in real time, and deep-dive into building a fully HTML-based event modeling tool with smart arrow routing algorithms.

Episode Summary

Martin accidentally discovers that an AI agent running in the background picks up live event model changes during a webinar and immediately implements them in code. Adam reveals his progress building a fully HTML/div-based event modeling tool with a “leftness index” algorithm for smart arrow routing — no canvas needed.

Main Discussion Points

  • Live AI Coding from Event Models — Martin discovers an AI agent picked up a live event model change during a webinar and implemented it in code within a minute
  • Arrow Rendering Without Canvas — Adam builds event model arrows using only HTML div borders, Z-ordering, and absolute coordinates — no canvas element needed
  • The “Leftness Index” Algorithm — A custom algorithm to minimize arrow crossings in diagrams by summing the positional index of connected elements
  • MCP Servers for Agent Interaction — Exposing event models via APIs and MCP servers so agents (not humans) interact with the tool directly
  • Slice-Based Architecture Misunderstood — Martin posts about slice architecture on LinkedIn and gets confused responses; explains why traditional onion/hexagonal critiques don’t apply
  • Automating Rituals vs. Solving Problems — Criticism of teams building agents that replicate standups, sprint retrospectives, and Jira updates — “automating rituals” rather than real work
  • Event Model as the Spec — Discussion of a client trying to translate event models into GitHub’s SpecKit; the JSON export from the event model is already the specification
  • Traditional Abstractions Break Slices — An architect suggests adding abstraction layers on top of slices; the hosts explain this re-introduces coupling and destroys the architecture
  • Event Modeling Tool Nearing Miro Replacement — Adam’s HTML-based tool is nearly feature-complete and will soon integrate with code generation agents

Live AI Coding from Event Models

“You model something, I just adjusted the event model, and then I went back into the code and I saw what I modeled just one minute ago was already in code — already implemented.” - Martin

“Your old best practices are going to actually hurt you when you try to exist in this world.” - Adam

Traditional Abstractions Break Slices

“The moment you put on these abstractions, this is nothing but coupling — you will destroy the whole architecture, it will stop working, you will destroy everything if you do that.” - Martin

Automating Rituals vs. Solving Problems

“They’re automating their rituals. Their agents are going to go to a stand-up meeting, transcribe and update the Jira tickets. It’s just laughable.” - Adam

Key Takeaways

  1. Live AI coding from event models is already possible — Agents pick up live event model changes and implement them in code within minutes
  2. Event models are the spec — No translation layer needed; the JSON export is the complete AI-ready specification
  3. Slice isolation is non-negotiable — Traditional abstraction layers re-introduce coupling and destroy the architecture
  4. Traditional abstractions break slice architecture — Adding layers on top of slices is the fastest way to destroy the system
  5. Arrow routing in HTML is possible without canvas — Only HTML div borders, Z-ordering, and absolute coordinates needed
  6. MCP servers enable agent-to-tool interaction — Agents, not humans, interact with the event modeling tool directly
  7. Automating rituals adds no value — Agents replicating standups and Jira updates solve nothing
  8. Event modeling conventions survive AI upheaval — Unlike JavaScript frameworks, event modeling remains applicable through every shift in tooling

Learn Event Modeling from the experts

Join the Event Modeling Hands-On Workshop on March 16/17 — learn how to design systems that are honest from the start.

Register now →

Want to learn how to apply Event Modeling and Event Sourcing in practice?

Follow the Online Course “Implementing Eventsourcing” - comes with a Lifetime Event Modeling Toolkit License.

Start Learning →