I see a lot of posts from people using my exported Event Models to generate code. Itās fun and you can quickly get something working.
And Iām looking at what is typically generated - 1000+ line TSX files, coupling in the backend - thinking āthis is going to hurt you later.ā
Donāt get me wrong. I donāt blame anyone. I started exactly the same way. Everybody does.
Someone says ābuild me <thing I need>ā and the AI generates it. On first look, itās fine. It works. You move on.
But then you see all these tiny problems starting to appear. They add up. Projects donāt fail on day 1. They fail on day 2.
Itās Not the Messy Code That Kills You
Itās not even the messy code that kills your project in the end. Handling existing data in a jungle of coupling. This is where the cursing starts.
Iāve worked on tables with 400 columns and more. Making real change is impossible. Your job is not to break anything. An LLM will just add a new column to whatever table looks best. Itās learned behavior - trained on some of the worst codebases in the world.
That 400-column table? Itās not a database table. Itās a graveyard of feature requests.
The Modularity Test
Hereās the test: Can you look at one specific feature - doesnāt matter which one - delete it (including tables, UI, business logic) - start the system, and everything will still run? Just without that one feature?
Thatās the level of modularity you need to work effectively with AI.
When I started working with slices, it was such a revealing way of working. You get this ālego brickā feeling. Everything becomes just another slice. If you donāt need something, you just delete the slice and youāre good.
I was so fed up with projects turning into messes, even though we really tried to make it better this time. It seemed like an inevitable fate for most projects, if you keep adding features long enough.
Coupling Is the End Boss
Coupling is the end boss - AI amplifies this.
If you base all features on one table, a migration to that table will affect all features. Thatās coupling.
If you canāt adjust a table because two features are based on it - thatās coupling.
Then you start doing workarounds. Introduce āspecialā columns. Add conditional logic. From here on everything gets worse.
And even though you used microservices, self-contained systems, API contract testing - you end up in the same place you were before.
You just distributed the problem.
Structure First
Thatās why I always define the blueprint architecture by hand.
āThat is what good looks like.ā
From there, you develop custom code generators and skills that allow the AI to work toward the blueprint architecture.
For the AI, itās painting by the numbers. If you prepare the structure, it can do it at lightning speed.
If you donāt define the blueprint, the AI will define it for you.
And itās trained on some of the worst codebases in the world.
After Day 1 Comes Day 2
After Day 1 comes Day 2. Thatās true for every project.
Have you hit Day 2 yet?
The difference between a prototype and a production system is not about code quality. Itās about what happens when you need to change something. When requirements shift. When the business pivots. When you need to delete a feature without taking down the entire system.
Day 1 is about getting it to work. Day 2 is about keeping it working while everything around it changes.
Most teams never prepare for Day 2. They think clean code and microservices will save them. They wonāt. Not if your data layer is coupled. Not if deleting one feature requires a three-week migration plan.
Slice-based architecture is how you survive Day 2.
Each slice is independent. Each slice owns its data. Each slice can be deleted, modified, or replaced without touching anything else.
Thatās not a nice-to-have. Thatās the only way forward when AI is generating code faster than humans can review it.
Structure first. Blueprint first. Slices first.
Then let the AI paint by numbers.
Join the Agentic Engineer Program
Apply Spec-Driven Development Hands-On - Event Modeling, Event Sourcing, and AI Engineering with autonomous agents.
Book a Call Today
Want to talk through how Event Modeling could work for your team or project? Letās have a quick, no-pressure conversation.
