Episode Summary
Martin shares his experience running Claude Code on a 1.2-million-line codebase for 40 hours (~$500 in API costs), then discovering that browser automation via MCP produced far better event models. The full strategy: overlay event models from UI automation, database deltas, code analysis, and documentation.
Main Discussion Points
- 40-Hour AI Legacy Analysis โ Martin ran Claude Code on a 1.2M-line codebase for ~40 hours, burning ~40 million tokens (~$500); the code-based event models were okay but not great
- Browser Automation as the Better Approach โ Pointing Claude Code via MCP at the legacy UI and saying โexplore this and build an event modelโ dramatically outperformed static code analysis
- UI Screenshots โ Event Model โ Feed browser automation screenshots directly into the event model: commands from buttons, read models from data displays, events inferred from state changes
- Database Delta Watching โ Sandwich UI automation with database snapshot diffing: if a โnavigationโ click causes DB writes, it reveals a hidden command disguised as a read
- Multi-Angle Legacy Analysis โ The most robust strategy overlays event models from: UI automation, database deltas, codebase analysis, and documentation; gaps reveal technical debt
- Documentation Correlation โ Using Git history and wiki page timestamps to determine whether documentation predates or follows implementation; stale docs actively mislead
- Local GPU Inference Economics โ Adam runs smaller models on his own GX10 hardware; Martin has three Spark machines; local vs. cloud inference tradeoffs
- Event Model JSON as the Specification โ Reiterating that the Miro JSON export is already the complete AI-ready specification; no translation layer needed
- Work Shifting to Higher Abstraction โ Industry catching up to what event modeling practitioners knew: โthe spec is the thing, not the codeโ
- Open Agent Orchestration โ Discussion of open-source agent orchestration frameworks; both using MCP browser automation
Browser Automation as the Better Approach
โI just pointed Claude Code using an MCP server to this UI. I didnโt tell it anything. Just said: go to this UI, find out what this thing is doing, and build an event model from that. It worked like a charm.โ - Martin
The Spec Is the Thing
โCode is no longer the thing. Itโs the spec. Oh, really? Interesting. Thanks for telling us what we knew for many many years.โ - Adam
Lessons No Longer Apply
โThe lessons you learned from before AI no longer apply โ just like lessons you learned for CRUD donโt apply to event sourcing. Itโs the same thing.โ - Martin
Key Takeaways
- Browser automation beats static code analysis for legacy โ Pointing an AI agent at the UI dramatically outperforms 40 hours of static code analysis
- Database deltas reveal hidden commands โ Snapshot diffing exposes navigation clicks that secretly write to the database
- Multi-angle overlay produces the most complete event model โ UI automation + database deltas + code analysis + documentation fill each otherโs gaps
- Stale documentation actively misleads โ Git history and timestamps reveal whether docs predate or follow implementation
- ~$500 for 1.2M LOC analysis is affordable โ The economics of AI-powered legacy analysis are increasingly viable
- Event model JSON is already AI-ready โ The Miro JSON export is the complete specification; no translation layer needed
- Local GPU inference is becoming viable โ GX10 hardware runs smaller models competitively against cloud inference
- The spec is the new source of truth โ Industry is catching up to what event modeling practitioners knew for years
Join the Agentic Engineer Program
Apply Spec-Driven Development Hands-On - Event Modeling, Event Sourcing, and AI Engineering with autonomous agents.
