Harem Empire: A Story of Vibe, Chaos, and Specs

Inspired by games like Call me Emperor and Bitlife, Harem Empire is a political survival game where you manipulate a court of AI personalities to seize the throne. Every character is driven by personality vectors like ambition and loyalty, creating a dynamic political landscape.

The project began with fast-paced vibe coding, quickly resulting in a fun prototype. However, this speed led to a single, thousand-line JavaScript file that was nearly impossible to maintain. The breaking point was a five-hour debugging session that failed to fix a single bug. The project's ambition had outgrown its architecture.

After migrating to React and XState, my first attempt to use a large, auto-generated spec from Kiro failed spectacularly. The key was realizing I needed to build the foundation myself. I manually coded the core gameMachine and characterMachine to create a solid, understandable base for the game's logic.

With that foundation in place, the real collaboration began. I wrote detailed specs for ambitious features, like the AI-powered "Emperor Audience" endgame, and Kiro generated the entire React UI. This workflow was the breakthrough. It freed me to focus exclusively on the game's "brain"—the complex state logic—while Kiro handled the front-end implementation. This partnership of human architecture and AI implementation was what made it possible to build a far more complex and compelling game.

Built With

Share this project:

Updates