← Devlog ·
The seed that lied: building with Claude Code
The bug
The same seed gave different runs. Nine modules called Python's global random, and visual effects consumed it too. So the same seed was not the same game.
The fix
All logic randomness goes through one generator, reseeded in each room from (seed, floor, room). Each room reproduces on its own. Saving doesn't store the dice state. A test fails if anyone calls the global random in the logic folders.
How I work with an AI assistant
- A rules file. The project has a CLAUDE.md that the assistant reads. It holds hard constraints:
core/never importsui/; items never edit combat; all text goes through the translation function. - Branches. New work happens on its own branch with tests green.
mainonly has what I approved. - Tests as the referee. 1,271 tests, about 40 seconds. If a change breaks one, it doesn't ship.
- Art is mine. The assistant can't approve art. Pixel art is placed by scripts that only place pixels, with no automatic scaling or rotation.
- Cheap work for cheap models. Mechanical searches go to a small model; design and hard bugs stay with the big one.
What it doesn't do
It doesn't decide what's fun. It doesn't say when something is finished. It gets things wrong: the first bot report said "23 modules" use global random. It was 9. I caught it by checking.
Unlocked
Loose Thumbtack. Fragile but hits hard. Attacks diagonally. A "kill me first" piece.
Next
Devlog 006: the beta opens.