Rebuilding this site with agents: 37 tickets, two model families, 199 accepts
The site was rebuilt by agents in about 26 hours. The slow parts were joining parallel work and approving it.
Contents · 9 sections
How v4 of andreasheige.cc and its v4.1 round were built from plan to pull request by Claude agents, checked by the other model family at every gate: the loop, the numbers, what blocked, and what had to stay human.
Until v4 this site was one page: Gödels machine, a Vite/React single page. Now it is an Astro blog with posts, projects and a talk, Lighthouse 98–100 on every page type, a strict CSP and no JavaScript unless a page needs it. Gödels machine still runs, unchanged, as one of the projects.
Agents rebuilt it, around the existing app and five gists that became the posts. The recorded build window runs from 3 November, 11:50 UTC to 4 November, 14:17 UTC: about 26 hours, a night included, for 76 commits, 474 files, 37 tickets, 71 recorded decisions and 5,014 site tests. My part was the design brief and a choice between design boards, approving the plan, about 30 prompts, the approvals, two facts about the world, one force-push and the final merge.
Why rebuild at all? I wanted a site that presents who I am, how I work and how I think, and building with agents is how I work.
This post is about how it was built. How the site works is a separate story. The numbers below come from the build log in the repo’s deep dive (§16), and each one there names its source: git log, the session transcripts, tt time reports, review-loop stats.
The plan is the program
Nothing started with code. The devsecops-workflow plugin’s outer loop ran once for the whole epic: a PRD, then an architecture document, then the epic sliced into one file per ticket in docs/tickets/. Each document had to pass the plugin’s check-doc-structure.sh before the next step could start.
The tickets became a checklist, one line per ticket with after: lines for order, rendered as a progress board on localhost:4319. - [~] @agent means in progress, - [!] blocked with the reason on the next line, - [x] done and verified. The plan gate, a Stop hook, keeps the session moving from item to item. It stops only on a BLOCKED: line: a real ambiguity, an ask-first area (auth, payments, PII, migrations, infrastructure) or an outward-facing action nobody approved. After 10 automatic continuations in one prompt it gives up, and “continue” restarts it.
One ticket, nine steps
Every ticket went through the same inner loop:
prime-codebaseOnly the files the ticket touches or must respect. Then every step as step → verify, with a check that can run.
implementRed to green, one step at a time.
validateL1–L5: the check, an adversarial tester, the build, screenshots looked at, the JS budget and accessibility.
review-changesA fresh reviewer compares the diff with the architecture. The deep dive is updated in the same commit.
git commitChained on the gates, so a red test stops it. Co-Authored-By names the family that wrote it.
review-loop eotA finder and a verifier from the other family. Blocking: fix, then recheck, two at most. Clean: the pre-push gate lets the push through. A weakened control: only a human may accept.
Prime reads only the files the ticket touches or must respect. Plan writes every step as [step] → verify: [check], with a check that can run. Implement goes red to green per step. Validate has five levels: npm run check; a tester subagent writing adversarial tests against a diff it did not write; the build with its guard and link tests; screenshots at 390 and 1440 px in light and dark, motion on and off, actually looked at; then the JS budget and accessibility. A fresh architecture-reviewer compares the diff with the architecture document and the ticket’s Definition of Done. The deep dive section the ticket touches is updated in the same commit.
Then the commit, which is where the first lesson came from. Twice in v4 a commit landed on a failing test, because the command that ran the tests did not stop the command that committed. The rule since then is one chained line:
npm run check && npm test && npm run build && git commit …
Since v4.1 the build runs the check and the tests itself, so the line is now npm run build && git commit ….
That pattern repeated through the whole build. Every rule that held was a test, a hook or a chained command. Every rule that lived only in prose was broken at least once.
Model choice followed cost: mechanical tickets (moves, config, imports) went to Sonnet subagents; design, architecture and review stayed on Opus. Across the build the orchestrator started 114 subagent runs.
The other family checks
Claude wrote the code. The other family checked it, and not because an agent remembered to ask. Each cross-check sits in a step that has to pass.
At the end of every ticket, review-loop runs:
review-loop eot --ticket docs/tickets/<id>.md --base <commit before the ticket>
It reads Co-Authored-By to learn which family wrote the change, runs a deterministic scan (a secret stops it before any model sees the diff), then a finder and a verifier from the other family: on this site, Copilot CLI running a GPT model. The agent fixes what blocks and runs recheck, which reviews only what changed. Two rechecks at most; after that the finding goes to a human. A pre-push hook refuses a push without a clean record, so skipping the step is not an option the agent has.
v4 produced 54 review records, up to three rounds per ticket, a median of 61 seconds each. The loop found 18 hard and 5 blocking findings, all fixed; 19 advisory; 20 that its own verifier threw out.
Questions went the same way. Before stopping to ask me, an agent asked Codex a closed question with the files named in it:
codex exec --sandbox read-only --skip-git-repo-check -C ~/Dev/blog \
"<question, files to read, options a/b/…; answer with ANSWER: <x>>" < /dev/null
Same answer from both families: proceed, and log the decision as agreed by Claude and Codex. Ten decisions were settled that way, the first being how short the root CLAUDE.md should stay (it costs tokens every turn). One stayed split: Codex wanted the reading-progress line as CSS only, Claude wanted a script fallback. That one came to me. Disagreement turned out to be the useful signal; agreement was a cheap way to not bother the human.
The biggest check failed outright. review-loop epic reviews the whole epic diff for bugs between tickets, and for v4 that prompt was 2.26 M tokens against a 272 k limit. The replacement was a Codex review of the seams: only the files that two or more tickets had touched. It found one real bug no single-ticket review could have seen: llms-full.txt was missing the posts’ figure blocks.
What blocked
Most blocks were not about code.
A safety hook blocks every command containing the git word for joining two branches. It meant the agents could not join ticket worktrees back onto the epic branch the usual way, and could not even ask git for a common base with it. Tickets moved as patches instead, made in the worktree and applied on the epic:
git diff --binary <epic commit the ticket started from> > ticket.patch # in the ticket's worktree
git apply --3way ticket.patch # on the epic branch
The auto-mode classifier denied git stash and rebase inside worktrees, and at the end the force-push after rebasing onto main. The force-push was mine.
Hidden Unicode. Agents’ test files and docs contained zero-width and bidi characters. Writing a \u200B escape through the editor tool turned it back into the real character, and so did Biome’s autofix on a regex. The guard that catches them now compares code points as numbers, so there is no pattern for a formatter to rewrite.
Flaky tests under parallel worktrees, from shared temp folders and tight timeouts. Each suite got its own TMPDIR, timeouts became explicit, and one wall-clock check became a growth-ratio check. That check then exposed a real bug: the markdown parse grew superlinearly on long runs of ”-”, so gists are now capped at 120 k characters.
The laptop slept and an agent died mid-ticket. It resumed with its context intact.
Facts no model can know: the talk’s event and date. I answered; the event’s published slides turned out to be byte-identical to the deck.
Where the tokens went
Claude made 997 API calls for the orchestrator in v4, 2,294 for Opus subagents, 1,174 for Sonnet and 2 for Haiku. Together they wrote 4.10 M output tokens and read 870 M from cache. Uncached input was 9 k. Codex used 13 codex exec sessions for questions, the doc check and the seam review: 9.08 M input, 8.24 M of it cached, 22 k output. The review loop’s own Copilot CLI calls, running gpt-6.1-sol, are missing from that count, because review-loop does not record tokens yet.
So the cost of an agentic build is not the code it writes. It is the context it re-reads every turn. That is the case for /clear at task boundaries, and for keeping a file like CLAUDE.md short.
Approvals do not scale yet
Fixed findings were never the problem. needs_human was: findings code marks as weakening a control, such as a changed test pin, a new suppression comment, or a fix that arrived after the recheck cap. No agent may accept one. review-loop accept needs a human: here, Touch ID at first, and later a script in my terminal, still one finding at a time, once a fingerprint for every accept got annoying.
v4 produced 184 of them, counted again in each round, mostly test pins changed on purpose. I recorded 199 accepts, in batches from the board’s “Needs you” panel and from a small script. The epic never stopped for them: an agent parked each one on a single blocked plan item, with a recommendation, and moved on, so I went through them in batches.
I read every one of them, one by one, before I approved it. That is the problem: a human gate that fires a hundred times in a day is a gate people learn to wave through, and it will be reworked in my setup.
The fix is planned, not built: explain each request, approve several with one Touch ID, and let agents settle low-risk classes while secrets, hidden Unicode, auth and infrastructure stay human-only.
v4.1: the second round
v4.1 added the About page with its text portrait, an Ask box answered by a model behind a Cloudflare Worker, and a polish round. Its build log, written on the morning of 7 November, counts from the first commit (5 November, 20:53 CET) to the last one before it (7 November, 08:56): 39 commits, 140 files, decisions D75–D93, 5,811 site tests, 49 prompts. Claude used 1,407 calls, 1.02 M output tokens and 285 M cache reads; Codex 5 sessions. Twenty more commits of polish landed after the log was written, so these are a snapshot, not the final count.
The structure changed. Each ticket got its own branch and worktree off feat/v4.1-about-ask, and the polish round ran four implementer agents at once (links, underlines, the nav dot, the portrait drift), with the orchestrator rebasing, reviewing and landing each as it finished. Landing was the bottleneck again, for the same reason as in v4: every branch touched the deep dive’s component table and decision log, so every rebase had a doc conflict. The code itself joined cleanly every time.
The review loop earned its keep. Blocking findings that would otherwise have shipped: a Lighthouse exception meant for the portrait that also matched .portrait-toggle; an edge in and an edge out of the same figure box drawn as one arrow; a ripple in the portrait’s red row that broke the seam of its drift; a Worker that could return answers citing nothing; and the live app still calling itself by its old name. Codex’s check of the docs against the code found that the Ask answer cache had no version, so a content deploy would have served day-old answers.
Approvals were still the slowest part: 152 accepts from 5 to 7 November, almost all test pins moved on purpose.
And one slip reached me. An agent ran a rebase in the wrong direction in the worktree the dev server was watching. The dev server hot-reloaded a half-applied branch, and I saw a broken portrait. The rule since: in a worktree a dev server watches, only fast-forward.
What stays human
Three kinds of work never moved to the agents: taste (the brief, the choice of boards), facts about the world (a talk’s date), and anything outward-facing (the force-push, the deploy, the merge). In v4.1 the wrangler.jsonc change that put a Worker on the site came to me as an exact diff, and was written only after I said yes.
Where that line sits is not a judgement made per task. It is written down in my guardrails, a hook that blocks commands and a list of files agents may not write, described in my Claude Code setup.
The thread
On the site’s graph this post sits on three ideas, and each points somewhere. Harness engineering leads to my Claude Code setup, where the hooks and the plan gate used here are written down. Review leads to review-loop and the server-side floor under it, security-floor. AI-native architecture is the site itself: strict schemas so a frontmatter typo fails the build, guard tests instead of conventions, one way in for data. Those rules exist so that an agent’s mistake breaks a test instead of the page.
This post went through the same loop. An agent drafted it from the build log the agents kept while they built the site, and Codex checked it against the repo before it reached me.
Code: andreasheige/review-loop and andreasheige/claude-plugins (plugin devsecops-workflow).
Follows the thread to
- How Claude, Codex, Copilot and Gemini talk to each other
- How this site works, part 3: deploy and guards
- How this site works, part 2: islands and the Ask Worker
- Old knowledge into new work, part 2: the library draws itself
- devsecops-workflow: a dual-loop way of working for coding agents
- review-loop: a second model family reviews every ticket, and code decides what blocks
- My Claude Code setup: guardrails, a plan gate, shared memory and a wiki that dreams
- Lunchit
- Throw away your IDE?