FMTechnical notes
Portfolio
Back to the blog

AI & Agents · Advanced · Agentic

Case study: rebuilding this portfolio with agents

This site was not rewritten in an afternoon: it was rewritten in seven rounds, with two agents auditing in parallel, two writing at once, and a parent that never delegated git. The numbers that matter came from measuring, not from looking.

After reading this
  • See how work is split between agents on a real repo
  • Recognise bugs that only automated audits reveal
  • Read metrics without fooling yourself with one run
  • Accept and reject recommendations with evidence
01 / 05

The starting point

The portfolio was on the Pages Router, with fifteen articles, no mobile navigation, and a route transition that never ran in any modern browser. The first session was an audit, not code.

The rule that ordered everything else: every claim needs a command that backs it. If there is no command, it is an opinion.

  • Migrate to the App Router without changing public URLs.
  • Preserve SEO, RSS, sitemap, and JSON-LD.
  • Do not add effects that duplicate existing ones.
02 / 05

The topology

Two read-only agents audited in parallel: one the landing (narrative, hierarchy, proof), one the motion system (duplication, cost, accessibility). While they ran, the parent did the server/client split.

Then two writers in parallel with disjoint surfaces: hero and case cards, each with its own stylesheet. The shared five-thousand-line CSS was never a merge point.

text
parent -> architecture, git, commits, final verification
  agent A (read-only) -> landing: narrative, proof, CTA
  agent B (read-only) -> motion: duplication, cost, reduced motion
  writer 1 -> hero-section.tsx + hero-life.css
  writer 2 -> selected-work-section.tsx + work-life.css
03 / 05

The bugs that only appear when measuring

None of these were visible by looking at the screen. All of them came from an audit or a test.

The most expensive one: animating the opacity of the LCP element disqualifies it as a candidate. Mobile LCP went from 3.0 to 5.7 seconds without the page looking any different.

  • The progress rail was driven by two engines writing the same transform.
  • The View Transitions fallback left links with no transition in Firefox.
  • The noscript block restored one reveal attribute but not the other.
  • The article re-rendered its whole tree on every scroll frame.
css
/* wrong: the LCP element starts invisible */
@keyframes hero-visual-in {
  from { opacity: 0; transform: translateY(32px); }
}

/* right: it moves, but it paints from the first frame */
@keyframes hero-visual-in {
  from { transform: translateY(32px) scale(0.96); filter: blur(8px); }
  to   { transform: none; filter: blur(0); }
}
04 / 05

The evidence

Every round closes with a list of green commands and a before/after table. The functional suite has 53 checks; the browser suite, 18; the accessibility suite, 6 routes.

Performance is measured three times and the median is what counts. A change that does not move the median is not reported as an improvement: it is reported as a simplification.

bash
npm test          # 85 unit tests
npm run build     # 47 pages
npm run test:e2e  # 18 journeys with axe
node audit.mjs    # 53 DOM and console checks
05 / 05

What I would do differently

Three things. First: stop chasing Lighthouse noise with a single run; two rounds were spent on that.

Second: write the work document before the first line, even for changes that look obvious. Third: fix the branch order before committing, not after.

  • Measure three times before believing.
  • One order per unit, with its proof.
  • The parent commits; the agents write.
  • If the number does not move, do not call it an improvement.
Render strategy● interactive

The server fetches data and serializes it as JSON.

Practice

Audit your own project

Pick one page of your project and write three checks that do not exist today: one DOM, one accessibility, one performance. Run each one against the current state and write down what it found.

Show a hint

If a check cannot fail, it is not checking anything.