Mentatcurated
Artificial Intelligence medium · first-party

Wrapture

Graham Dumpleton spent two decades hand-writing the Python library that lets code wrap other code, then had an AI write every line of the new one he built on top of it.

Dumpleton made the first commit in mid-August. A bit over two weeks later the project had eleven alpha releases, over a thousand tests and more than 150 pages of documentation, and he had typed none of it.

"Every line of code and documentation in wrapture, this page included, was written by an AI assistant working under my direction." — Graham Dumpleton

The library is called wrapture, a squash of wrapt and capture. You point it at a function by name and run your program; it hands back a record of what actually happened, the nested tree of calls with the arguments going in and the values coming back. The same handle that watches a call can also answer it instead, so the mechanism a programmer uses to fake a database inside a test is the mechanism that reports on the real one once the program is live. Those two jobs have always been done by separate tools.

He is an odd person to have delegated this. Dumpleton wrote wrapt, the small, fiddly library that lets Python code be wrapped without being edited, and it sits underneath New Relic's Python monitoring and a great deal of everyday Python plumbing. Twenty years of that kind of work is the usual argument for why some code still has to be written by hand.

He never names the model. It is 'an AI assistant' throughout, as though which one is a detail, and the page on how the library was made argues that the discipline of the direction is what earns trust in the result. Nobody has audited that. The code is early enough that its author still expects to break it, and roughly a dozen people have starred it, so it has had no outside scrutiny either. All of it is public, which is the only way an argument like this gets tested.

Want to try it?

Start with the "How wrapture was built" page in the docs rather than the code: it is the process argument in the author's own words, written by the machine it describes.

Open the repo at grahamdumpleton.me →

The lenses

Novelty 3
Impact · breadth 2
Impact · depth 2
Actionable 4
Delight 3
Substance 4
Hype 1

The facts

What it isA Python library that records, alters or answers function calls without editing the code being watched
AuthorshipEvery line of code and docs written by an AI assistant under the author's direction; the model is never named
MaturityEleventh alpha, first commit mid-August 2026; needs Python 3.12 or later
CostFree and open source, BSD 2-Clause
Open grahamdumpleton.me →

How this connects

Tap a node to open it

How this connects