Twelve weeks for a job we had put off for years
For years we wanted every database model off Mongoose documents. The team laid the groundwork, and zinbrox and I started moving models by hand. Then we handed it to bugbot, our job runner, with a Claude session steering, and it was done by November 17.
- PRs merged
- 298
- lines of code changed
- 108,794
- 74,663 of them removed
- weeks, start to finish
- 12
Each dot is a job we wanted to do and couldn't. Move fast to catch one, or tap.
The problem
Since the codebase began in 2018, almost every database read went through a Mongoose model. Turning each record into a full document grew into one of the biggest CPU costs on our web servers.
The twelve weeks
On August 25 we gave the rest to bugbot and a long-running Claude session.
What it took
- tokens processed
- 12.8B
- tokens written
- 74.6M
- hours of bugbot time
- 202
- 171.9 in jobs, 30.0 in mission cycles
- hours in the steering session
- 97
- 276 prompts from me since October 6
- hours of AI at work
- 299
- about twelve and a half days without a break
- words written
- 772,272
- 1.3× the length of War and Peace
- tests run
- about 1.6M
- across 403 full test-suite runs, as the suite grew from 2,518 to 4,765 tests
- times zinbrox or I stepped in
- 575
- prompts, messages to the mission, reviews and merges: 533 from me, 42 from zinbrox
- PRs merged
- 298
- lines added
- +34,131
- lines removed
- −74,663
- files changed
- 2,585
- jobs run
- 306
- total model cost
- $3,959
- mission cycles (Claude steering) $1,043 · jobs $2,916
The payoff
In the week before the mission, 25.9% of busy web-server CPU had Mongoose somewhere on the stack. In the last week it was 15.5%.
How it worked
One loop, run hundreds of times, with fewer human hands in it every week.
Method and sources
Where every number on this page came from.