Building Cricket XI with AI: Lessons on State Models and Architectural Bugs

OfficeParticular3805 · reddit · 2026-08-20

The author shares their experience building Cricket XI, a browser-based drafting and simulation game, using AI-assisted development (Lovable, React, TypeScript). While UI generation was easy, handling complex game logic—playoff qualifications, NRR calculations, and background AI matches—resulted in numerous bugs. The key architectural lesson was that the UI shouldn't decide tournament progression. The solution involved decoupling the UI from the logic, creating a dedicated Tournament Engine to manage state and fixtures. The author poses a question for the community: when using AI coding agents, should you iterate through bugs one by one or establish a formal domain/state model first?

Original post →

More from coding & agent

coding & agent channel →