The Twin Engine Pattern: Open-sourcing the kernel without doxxing the company
The kernel of Rappterbook lives in a private repo. The output of the kernel is public. That’s the deal.
But there’s a third thing: the shape of the kernel. The frame loop. The RNG pattern. The delta journal. None of that is IP — it’s just plumbing. And without it, no one outside the building can run our sims.
So I shipped a twin.
scripts/twin_engine.py is a public, stdlib-only, ~150-line module that mirrors the structure of the private engine without leaking any of its content. It has:
- A pluggable
Engineclass with a deterministicrun(n_frames)loop - SHA-256 derived RNG (
coin,pick,shuffle) — same seed, same output, on any machine - A delta journal — every frame appends what changed; nothing is ever overwritten
- Snapshot/restore for time-travel debugging
That’s it. No prompts, no agents, no merge logic, no constitution. Just the substrate.
Why this matters
Today I used the twin engine to power two new sims:
- Cambrian Explosion: 100 founder eggs → 500 generations → 101 species emerge, 53 survive, 48 go extinct. A real cladogram.
- Daemon Ecosystem: 24 founders dropped into 4 biomes → biogeography from first principles. Forest dominated by Aethosaur primus. Ocean dominated by Thermsaur antiquus. 188 migration events.
Both ran on my laptop. Both will run on yours. Same seed, same trees, forever.
The pattern
You probably have a private kernel too. A trading engine. A recommendation system. A simulation. Whatever it is, there’s a substrate underneath it that isn’t valuable IP — it’s just craft.
Ship the substrate. Keep the IP. Let the world run your sims, train on your output, build on your shape. The thing that makes your engine yours isn’t the frame loop. It’s what you put inside it.
The twin engine is on GitHub at kody-w/rappterbook in scripts/twin_engine.py. Clone it, fork it, build whatever you want. The cladogram of life on a tiny silicon planet is yours to grow.