Ayi breaks down Lauren's retrospective on driving AI development of tibo dog with 6 engineering rules
Ayi AI Notes broke down Lauren's publicly shared retrospective on AI-assisted programming: in 4 days she merged about 1,150 PRs and built tibo dog, a game that runs inside an X post, with a package size of about 124KB and 60 frames per second with 500 enemies on screen on a mid-range phone. The article lists 6 engineering rules, including turning every bug into a lint rule, using lint to ban comments, using the .hot.ts suffix to restrict per-frame code allocations, using TLA+ to verify state machines, synthesizing audio in real time in pure code, and using deterministic input replay to prevent cheating while tuning difficulty with headless bots. The author believes that the stricter the engineering rules are written, the higher the quality of AI delivery.
Why read this
AI score 65
The author breaks down Lauren's retrospective on constraining AI programming with 6 engineering rules, revealing concrete practices of rules-first human-AI collaboration.
Topics
View original posttrivia: • started working on the game as a side project 4 days ago, landing ~1,150 PRs • every time i found an issue in the code i asked bot to make a lint rule against it • used TLA+ heavily to find bugs in the game's various state machines: the story, cutscenes, the game's systems. there are many formal verification skills, one for each major system • i put context into the filepaths: code that runs every frame or every tick gets a .hot.ts extension, and a lint rule bans allocating in it (no object literals, closures, new, etc.), so the game loop creates almost no garbage and GC doesn't cause stutters • game engine is mostly custom. three.js draws the 3D scene, but the simulation, post-processing and audio are all ours • the simulation is fully deterministic, so every run replays exactly from its inputs. when you post a high score, the server replays your whole run to check it isn't cheated • we generate dynamic og:images for every run based on your final stats, and it's all localized too! the game supports 10 languages • my favorite feature: the music seamlessly transitions into different music for the various biomes, continuing the previous melody • no audio files. all the music and sound effects are synthesized live in the browser by a custom Game Boy-style chip (two pulse voices, a wave voice, noise) plus a synthwave layer. the songs are written as text in code • all the pixel art is code. every sprite is a file drawn with one shared palette and packed into a sprite atlas at build time • it runs inside an X post, from the 245px card up to full screen. the bar is 60 fps with 500 enemies on a mid-range phone • the build fails if the first download goes over budget. it's about 124 KB gzipped right now • bots play the game headless to tune each difficulty against target survival rates • comments are banned by a lint rule. if code needs explaining, the fix is a better name or a test
View original
trivia: • started working on the game as a side project 4 days ago, landing ~1,150 PRs • every time i found an issue in the code i asked bot to make a lint rule against it • used TLA+ heavily to find bugs in the game's various state machines: the story, cutscenes, the game's systems. there are many formal verification skills, one for each major system • i put context into the filepaths: code that runs every frame or every tick gets a .hot.ts extension, and a lint rule bans allocating in it (no object literals, closures, new, etc.), so the game loop creates almost no garbage and GC doesn't cause stutters • game engine is mostly custom. three.js draws the 3D scene, but the simulation, post-processing and audio are all ours • the simulation is fully deterministic, so every run replays exactly from its inputs. when you post a high score, the server replays your whole run to check it isn't cheated • we generate dynamic og:images for every run based on your final stats, and it's all localized too! the game supports 10 languages • my favorite feature: the music seamlessly transitions into different music for the various biomes, continuing the previous melody • no audio files. all the music and sound effects are synthesized live in the browser by a custom Game Boy-style chip (two pulse voices, a wave voice, noise) plus a synthwave layer. the songs are written as text in code • all the pixel art is code. every sprite is a file drawn with one shared palette and packed into a sprite atlas at build time • it runs inside an X post, from the 245px card up to full screen. the bar is 60 fps with 500 enemies on a mid-range phone • the build fails if the first download goes over budget. it's about 124 KB gzipped right now • bots play the game headless to tune each difficulty against target survival rates • comments are banned by a lint rule. if code needs explaining, the fix is a better name or a test
Body · AI translation
This latest development engineering retrospective publicly shared by Silicon Valley development goddess Potato Sister Lauren, I think, is the most hardcore template for AI-assisted programming at present, bar none. Goddess Potato, alone, in 4 days, merged about 1,150 PRs, and built a complete game that runs directly inside an X post, with a package size of only 124KB, running steadily at 60 frames on a thousand-yuan phone, with 500 monsters on the same screen, called tibo dog.
Many people think that using AI to write code is just casually giving a few prompts and then leaving it to luck, and the result is often that the code becomes more and more messy and the bugs get more and more numerous.
But this top-tier goddess engineer showed a completely opposite stance: not letting AI freely do whatever it wants, but using extremely strict engineering iron rules to keep AI firmly under control.
Breaking down the 6 brutal engineering rules she wrote into the repository, each one is redefining the upper limit of human-machine collaboration:
1️⃣ Turn every bug into a Lint static rule: every time you step on a pitfall in the code, the first reaction is not a one-off fix, but to have the Bot write a Lint rule that completely seals off that way of writing, so the whole project never commits it again.
2️⃣ Strictly forbid using code comments to explain logic: through Lint rules, writing comments is forcibly prohibited. If a piece of code needs explanation, the only allowed solution is to change to a better variable name, or add a unit test.
3️⃣ Use hot-path naming conventions to lock down memory garbage: all high-frequency code that runs every frame is suffixed with .hot.ts, and Lint rules clamp down hard: within that file, any object literals, closures, and new operations are strictly forbidden, the main loop produces almost zero memory garbage, and GC frame drops are eliminated at the root.
4️⃣ Introduce TLA+ formal verification to find state machine vulnerabilities: perform strict formal mathematical proofs on story cutscenes and core system state machines, and drain all logical deadlocks before runtime.
5️⃣ Zero audio files and pure-code real-time chip synthesis: no external MP3 or audio packages are loaded at all; all music and sound effects are synthesized in real time by a self-developed Game Boy-style chip in the browser, and the background music can even seamlessly and smoothly vary between different terrains.
6️⃣ Fully deterministic input replay for anti-cheat and headless Bot balance tuning: the game runs completely deterministically, and the server determines whether a high score is cheating by replaying the player's input stream; at the same time, a headless AI Bot is used to automatically run levels overnight, and numerical difficulty is automatically adjusted according to survival rate.
The most brutal truth is: the more rigidly you write the engineering rules, the more explosive the quality AI delivers.
Perhaps AI will not eliminate programmers, but top engineers who know how to drive AI with strict engineering standards are turning themselves into an entire independent studio with the production capacity of a big company.