Rebuilding my homelab as code, with an agent riding shotgun
Starting a phased, infrastructure-as-code rebuild of the homelab — and pairing with an AI agent that does the typing while I keep the judgement.
My homelab grew the way most do: one good idea at a time, until “how does this actually work?” had no honest answer. So I’m rebuilding it as code — and doing it in the open, paired with an AI agent that holds the plan while I hold the veto.
The rules of engagement
One document is the source of truth: a phased rollout plan, Phase 0 through 10, each phase split into verify → act → document → checkpoint. The agent reads live state before it changes anything, and it stops at every ASK HUMAN gate. No secrets in git. Pin every dependency, vet it, and wait until a release has aged a few weeks before trusting it. Boring on purpose.
Why pair with an agent at all
Because the tedious half — writing the OpenTofu, the Ansible, the API calls, the checks — is exactly where I make sloppy mistakes at 11pm. The agent is relentless about the boring parts. I’m the one who knows that “the plan says VLAN X” and “the network actually does Y” are different sentences. That division of labour turns out to be the whole game.
The agent types fast and never gets bored. I decide what’s true. Neither of us should do the other’s job.
What “done” looks like
Every host provisioned by code, configured by code, its services declared in a repo, its data on a disk I can rebuild around. If a box dies, I redeploy it from a template and a playbook instead of remembering what I did last summer.
Next up: Phase 0 — reading the house carefully before I touch a single wall.