Moving this site from Hugo to Astro with AI
The site had been stuck on an old Hugo for years. Splitting the move into eleven tasks and giving each one to an agent got it done in an afternoon.
This site ran on Hugo 0.47.1 and the last build was from August 2021.
The version is the problem. .Data.Pages was removed in Hugo 0.57 and the theme uses it on every listing page, so the site could not be rebuilt on any current Hugo.
Nothing was broken, the site was up, and there was no way forward that didn’t start with a rewrite.
So it sat there for years, because a rewrite was a couple of days of work and there was always something better to do with them.
I used Claude to do it and it took an afternoon, but not by asking it to migrate the site.
The first thing we did was write down the plan, and then split it into eleven tasks, each one small enough to finish and check on its own.
.claude/ CONTEXT.md stack, conventions, decisions, hard rules STATUS.md what each task actually did tasks/ 01-scaffold.md 02-design-shell.md 03-blog-engine.md ... 11-cutover.mdEvery task got its own agent with no memory of any of the others, so CONTEXT.md is the thing they all read before anything else.
It holds the pinned versions, the conventions from my other sites, the decisions I’d already made so nobody re-opens them, and the rules that break the site if you get them wrong.
Trailing slashes, the frozen URL shapes, the feed staying at /index.xml.
Each brief is the same seven sections.
What it is for, what to read, what’s in scope, what is explicitly not, which files it owns, how to know it worked, and what to write down afterwards.
The files owned part is the one that makes the whole thing work, because two agents running at the same time must not touch the same file.
The scopes don’t overlap, and when one strays outside its own list I throw that change away rather than merging it.
We ran them mostly in sequence, with me reading the result and the diff before the next one was allowed to start.
The second task is the entire design with dead links and placeholder content, and nothing real got built until I had looked at it, because every task after that one inherits those decisions.
The bit that saved the time was not the writing, it was the checking.
Every post body got diffed against the Hugo original, all of them, and they came out byte identical.
All 575 URLs were walked against the new build, from the live sitemap and the old Apache config, including 85 redirects that have been dead in production for years.
They all resolve now.
I would not have done that by hand, I’d have checked twenty of them and found out about the rest from the 404 logs six months later.
The bit it’s bad at is anything I didn’t tell it, and it is confident either way.
It wrote a perfectly good homepage saying I currently work somewhere I left in 2022, because nobody had told it otherwise and it needed a sentence there.
So everything got read before it shipped, which is the real cost of working this way.
It’s an afternoon against a couple of days, which is not the interesting part.
The interesting part is that I checked all of it instead of some of it, and I would never have done that on my own.