Coding Agents & Complexity Budgets

I migrated [cursor.com](http://cursor.com) from a CMS to raw code and Markdown. I had estimated it would take a few weeks, but was able to **finish the migration in three days** with **$260 in tokens** and hundreds of agents.
#### Content is just code
I was eating lunch with [Roman](https://x.com/romanugarte_) and [Eric](https://x.com/ericzakariasson) at Cursor and we started talking about the [cursor.com](http://cursor.com) website. We recently shipped a redesign, and as part of that change, all content and web pages were now built through a headless CMS.
We went around the table airing our grievances. The CMS wasn’t working. We had this beautiful new website design and yet it felt more difficult than ever to ship new content.
Previously, we could `@cursor` and ask it to modify the code and content, but now we introduced a new CMS abstraction in between. Everything became a bit more clunky. We went back to clicking through UI menus versus asking agents to do things for us.
With AI and coding agents, the cost of an abstraction has never been higher. I asked them: do we *really* need a CMS? Will people care if they have to use a chatbot to modify content versus a GUI? We could eliminate so much complexity if we just went back to the raw code.
Roman asked me how long it would take to migrate from the CMS back to code. My quick estimate was 1-2 weeks and we’d probably hire an agency to help with it. Maybe I just haven’t updated my timelines for the current state of AI, but I decided to try creating a plan in Cursor for how to migrate and then kicking off an agent to take a first pass. I was surprised by how far it got, although there was clearly much more work to do.
It was enough to nerdsnipe me into taking on the migration. Here’s how I ended up migrating the site over the course of a weekend.
#### Removing complexity
The Cursor website is a standard Next.js and React app.
The new version was built on top of a CMS so that non-developers could build marketing pages and writers could add new blog posts. Again, using a CMS is pretty standard for most sites.
For many teams, the cost of the CMS abstraction is worth it. They need to have a portal where writers or marketers can log in, click a few buttons, and change the content. It’s been like this since the dawn of time (WordPress).
What is under discussed is the amount of technical complexity needed to integrate a headless CMS well into a modern website. I’m familiar with all the products and solutions, and yes some do a very good job of hiding that complexity! It’s *still there* though, even if behind an npm package.
Here’s a short list of the hidden complexity. If you’re not as interested in the technical details, you can skip over these:
#### Doing the migration
I created a plan with Opus 4.5. Cursor returned with a few clarifying questions.
It suggested something which was obvious but I didn’t immediately think of. We already have an API key to fetch content from the CMS. Rather than fumbling through menus to download things, we can create a series of scripts to export the content, validate the structure, convert it into markdown and files in the repository, and then upload the images and videos to object storage.
I got 80% of the way there with probably 10 agent runs. Cursor installed and removed dependencies, ran scripts, and built out pages and pages of content. However, as with most things in engineering, that last 20% takes most of the time. But it was too late, I was already nerdsniped. I needed to complete the task.
Some of the pages were not an exact match, so I ran this agent on every page:
> The /features page is not a perfect match to production. Review how we exported CMS data for the home page, and re-export the full contents of the features page, including all sub-components, images, and backgrounds.
>
> Use the @browser to take screenshots and keep iterating until the local version is a perfect match. The first attached image is local, second is production.
>
>
Once I started kicking off agents, I started doing a much more broad refactor of all the codebase patterns that were annoying. It was also a nice chance to use subagents (coming in the next version). I worked with Opus to create a plan for the API shape I wanted, and then asked Cursor to run subagents to make the changes in many different call sites in parallel. Much faster!
Using subagents with Cursor plan mode
#### Happy little accidents
I was so excited to remove complexity that I also deleted Storybook entirely.
Storybook has some nice features but we were barely using it. Plus, with the Cursor browser and being able to visually edit things, I don’t really see the value as much anymore.
Plus, that’s a lot of dependencies being downloaded and installed on every machine and CI run, when I could instead build this simple version very quickly.
Viewing all components in a playground
I also still wanted to have a GUI for managing assets on top of object storage. This was 3 or 4 prompts with the agent to get something decent and workable. It’s the minimum viable feature set. Sure, there’s a lot more it *could* do, but I don’t need that.
Viewing all assets from object storage in a nice GUI
Another benefit of having your content in code is that all changes flow through git. This was nice in the past (for reverts or figuring out who changed things) but is *incredibly* helpful for coding agents to dig through autonomously.
#### Results
This is mind-blowing to me. Cursor wrote a script to use our APIs and calculate the usage:
* **$260.32** and 297.4M tokens (mostly cached)
* 344 agent requests
* 66 manual Tab changes
* 67 commits (+43K / -322K lines)
What I previously thought would take weeks and maybe an agency to help with the slog work was done in $260 of tokens (or one $200/mo Cursor plan).
More importantly, the migration has already been worth it. The first day after, I merged a fix to the website from a cloud agent on my phone. The next day, an engineer shipped a feature across the product and marketing site in the same PR.
We’re saving thousands of dollars in CDN usage by moving to lower cost object storage. As a side effect, build times are 2x faster by cutting out network I/O going to the CMS when prerendering pages.
The cost of abstractions with AI is very high. Over abstraction was always annoying and a code smell but now there’s an easy solution: spend tokens. It was well worth the money to delete complexity from our codebase and it already paid for itself.
Imagine what this story would look like across the entire economy. Coding agents are helping teams try their wildest ideas, and fix tech debt that was buried deep in the backlog. I’m excited for a world of abundant, high-quality software, and hope that Cursor can continue to play a role in making it happen., Coding Agents & Complexity Budgets, leerob.com, 01kg84e2j0frfywv5ex87k26an.