blog/llm/evolver
All you need is a html file and Claude API key

I like the concept of Tiddlywiki quine; software that produces a copy of itself with changes. The entire software is a single html file. You can edit it, add notes, change frontend functionality, and save an updated version. Both data and code to vizualize it is in the same file, and the only way to save it is to make a copy of the entire thing in a new file. This concept fell out of fashion quickly because people want to have 1 file with persistent memory that is updated and Tiddlywiki quickly adopted a backend-frontend model, but I like having a html file I can just open in a browser which has everything.

I played with this quine concept a bit and thought "What if we build a quine using just a claude api key and a barebones html file?" We would start with a prompt window and api-key input, send the entire file (so.. itself?) to anthropic, and download updated file back. Maybe everyone can adopt and personalize their software like this? A html file with javascript already contains all functionality they could possibly need, and we don't need to care about runtime. Just use your browser! So here is gen 0:

Evolver, gen 0
Evolver, gen 1 - Add a note taking section
Evolver, gen 2 - Add light mode toggle
Evolver, gen 3a - Add a calculator lol
Evolver 3b - Add a todo tracker. You can fork from any generation!!!
Self evolving software

One thesis I had is the available context size will probably grow faster than our html apps even when we fill it with our data, so this approach will probably outlast me. We can fit entire software in a single LLM call and output an updated version in one shot. I did have several "evolve" attempts fail in generation 3, but by adding the updated prompt in gen 4, it fixed itself and has been working since!

The other idea is to use a single prompt as a entire development cycle, which is something I did not imagine 2 years ago. It just .. works?

Evolver, gen 4 - updated system prompt and added history
Evolver, gen 5 - a bit too late, but added generation history
Evolver, gen 6 - persist key
Malleable software vs one shot software

I found it crazy you can download any of these html files, plop in your api key and just make your own thing immediately with no friction. And it is faster to prompt claude to make you a bespoke solution to your problem instead of trying to learn some code or drag-and-drop-sequence of buttons to get what you want. It is probably not good for actual note taking due to saving creating a new file, but it is more lightweight than using the claude app. I also liked the evolution concept with consecutive generations a pool of them intermingling to create successors. Maybe there can be a evolver-fusion that takes in 2 of these files and combines them? Or we can add a file-ingestor into gen 7 that can consume other files as input.

Sky is the limit!