About 10 years ago I fell in love with Vue.js. The easy-to-learn syntax and reactivity were a joy to work with, and HMR (hot module replacement) added up to an incredible developer experience (DX).
At this point I've spent thousands of hours working with front-end JavaScript, and I'm still in love with it, but I also have to do a lot of backend work.
As joyful as the modern frontend DX is (shoutout Vite), working on the backend feels cumbersome by comparison. One of the tasks I like least is backend generation of Word documents using templates and server-side libraries. The iteration loop is slow, the errors are cryptic and debugging is painful.
I'd much rather build documents in HTML. But the existing HTML-to-docx libraries leave a lot to be desired and I never had the motivation to build something better, until now. Enter Karpathy Autoresearch loops.
Autoresearch loops are a general concept: use an agent to kick off a recursive self-improvement loop against something that can be objectively scored. For example, say you have a slow SQL query (speed being the metric). You could kick off a loop with a prompt like:






