Case study · built with AI agents

How I built this site by directing AI coding agents

I'm a mobile engineer, not a full-stack web developer. AI coding agents built this site, from the design tokens to the deploy pipeline, and I ran them the way I'd run any team. I approve a spec before anything gets built, tests come before code, pull requests stay small, and nothing merges until I've reviewed it.

01

The workflow

The agents write the code and I make the decisions. Every change passes three gates where I decide whether it goes on, and every step in between has to show proof that it worked, like test output or a screenshot.

Go deeper

Context and constraints

I'm one person with no web background, and I wanted production-quality code. Agents write plausible-looking code fast and report success with confidence, even when the code is wrong. So the process had to catch wrong code early and cheaply, and leave every decision with me, without me reading every line.

Design

One change, end to end
  1. Ideame
  2. Brainstormquestions, mockups
  3. Spechuman gate · I approve
  4. Plantasks, interfaces
  5. Failing tests
  6. Code
  7. Local runhuman gate · I check it
  8. Pull requestdiagrams, test plan
  9. CIautomated check · 3 jobs
  10. Mergehuman gate · me

A failing CI job or a review comment wakes the session that owns the pull request, which fixes it and pushes. Independent work runs as parallel sessions, each in its own git worktree, sharing a notes folder.

A pull request, from push to production
  1. Agent session → GitHub: Push the branch, open the pull request
  2. GitHub → CI: Run check and portability, in parallel
  3. CI → Vercel: Deploy a preview
  4. CI → GitHub: Post the preview link on the pull request
  5. GitHub → Agent session: A failing job or a review comment, relayed
  6. Agent session → GitHub: Fix, verify, push
  7. Me → GitHub: Review the preview, merge
  8. GitHub → CI: Push to main
  9. CI → Vercel: Deploy production
Where the context lives
  1. Written down

    • Project instructionsCLAUDE.md
    • Standing rulesagent memory
    • Specs and plans
    • Shared notes folderbetween sessions
  2. Read by

    • The main session
    • Side sessionseach in its own worktree
  3. Produces

    • Commits
    • Pull requestswith diagrams
    • Mergehuman gate

Nothing important lives only in a chat. A new session, or one whose context was compacted, starts from the same files.

Decisions

QuestionOptions consideredChoseWhy, and what it costs
Where does a person sit?
  • Review every diff
  • Review nothing and trust CI
Three gates: the spec, a local run, the mergeMy review time goes where the decisions are. The downside is that a bad idea can get halfway built before I see it, so tests come first and CI won't pass without them.
Where do decisions live?
  • In the chat
A written spec with an approaches tableA written spec survives a context reset, and parallel sessions can all read it. The cost is a spec for every change, even small ones.
How is "done" proven?
  • The agent's report
Evidence: test output, screenshots, deployment recordsAn agent's report is only its word. So every step names the check that proves it, and a failure comes back with its output.
How does work run in parallel?
  • One long session
One session per independent task, each in its own worktreeThe Supabase adapters and the CI move ran at the same time without touching each other's files. The cost is coordination: a shared notes folder and some rebasing.

Invariants, and what enforces them

InvariantEnforced by
No code before the design is approvedThe options laid out, a written spec and an explicit yes from me
A test fails for the right reason before the code existsEvery plan writes the test first, and the failing run is kept as part of the record
Nothing is pushed before I've seen it run locallyA standing rule the agents load every session
Every pull request explains itself with diagramsBefore/after, flow and boundary diagrams, each parsed by Mermaid before posting

Failure modes

What goes wrongWhat it affectsWhat contains it
An agent invents an API or a flagType errors, failing tests, a red CI jobTypes and tests before merge, and pinned tool versions
Scope creepA diff touching files the spec didn't nameNon-goals in the spec, and one task per session
Context lost in a long sessionSettled questions asked againSpecs, plans and notes on disk, not in the chat
A confident but wrong status reportA claim without outputEvidence required, and deploys checked against Vercel's own records

Evidence, Nov 2026

  • 3

    Pull requests through every gate (#3, #5, #6)

  • 20

    Diagrams in one spec (the CI move)

  • 2

    Sessions in parallel, separate worktrees

  • 200+

    Tests, all written before their code

Show the details

Artifacts

The approaches table from the spec for moving deploys into GitHub Actionsdocs/superpowers/specs, pull request #5
|          | Approach                                                       | Trade-off                                        |
| A (pick) | Local composite action deploy-vercel (target, ref, sha → url) | Swapping hosts = a new action, same interface    |
| B        | The vercel commands inline in ci.yml                           | Host details spread through the pipeline         |
| C        | Third-party vercel-action                                      | Hands the token to someone else's code; rejected |

That change, start to finish

  1. Spec with 20 diagrams and an approaches table, approved.
  2. Plan: 4 tasks, each naming its tests.
  3. The deploy script dry-run against a fake Vercel CLI caught a bash 3.2 bug before CI ever ran it.
  4. First CI run green: the Docker smoke test passed 4/4 and the preview link was posted on the pull request.
  5. Cutover checked on Vercel at each step: one deployment per commit, from CI only.

Who did what

Me
The goal, the scope, each approach choice, every approval, the merges and the dashboard changes.
The agents
The spec draft, diagrams, plan, tests, code, CI config, docs, and checking all of it against GitHub and Vercel.

02

Architecture

The site is static and prerendered at build time. Every outside service sits behind a small interface, so swapping a vendor means replacing one file.

Go deeper

Context and constraints

A portfolio should be fast and cheap to run, and reading it should never break anything. The contact form is the only thing that writes data. The site uses five outside services, and I didn't want any of them showing up inside the components.

Design

Layers, with dependencies pointing inward
  1. Presentation

    • App Router pages
    • Server sections
    • Client islands
    • UI primitives
  2. Application

    • Data facade
    • submitContact use case
    • Composition roots
  3. Domain

    • Types
    • Ports
    • Pure rules: contact, experience, skills
  4. Adapters

    • Static content
    • Supabase (reference)
    • BotID
    • Resend
    • Vercel Analytics
    • Browser theme and motion
  5. Generated

    • Token CSS
    • Tailwind theme
    • Typed tokens
    • Icons

Adapters implement the domain's ports. Pages and the use case never import an adapter. A lint rule and a boundary test make sure of it.

Every outside service, behind a port
  • Content

    page.tsx

    DataProviderDATA_SOURCE
    • staticdefault
    • supabasereference
  • Contact storage

    submitContact

    ContactStoreCONTACT_STORE
    • nonedefault
    • supabasereference
  • Bot check

    submitContact

    BotCheckBOT_CHECK
    • botiddefault
    • none
  • Email

    submitContact

    ContactNotifier
    • resenddefault
  • Analytics

    TrackedLink, ContactForm

    AnalyticsANALYTICS
    • verceldefault
    • none
  • Theme

    ThemeProvider

    ThemePorts
    • browserdefaultlocalStorage · matchMedia · html
  • Deploy

    the CI deploy job

    deploy action
    • deploy-verceldefault

An unset flag means whatever production runs. Tests swap in-memory fakes through the same ports.

A contact form submission
  1. Browser → Server action: POST / with the fields and the honeypot
  2. Server action → submitContact: The input, typed as unknown
  3. submitContact → submitContact: Honeypot filled? Fake success, stop
  4. submitContact → BotCheck: isBot()
  5. BotCheck → submitContact: No
  6. submitContact → submitContact: Parse, then validate
  7. submitContact → ContactStore: save()
  8. ContactStore → submitContact: Stored, or not
  9. submitContact → Notifier: notify()
  10. Notifier → submitContact: Sent, unconfigured or failed
  11. submitContact → Server action: Success, or a reason
  12. Server action → Browser: The form shows the result

A message the store kept counts as delivered even if the email fails. Production keeps nothing, so the email is the record.

Decisions

QuestionOptions consideredChoseWhy, and what it costs
How are pages rendered?
  • Server-rendered per request
  • Incremental regeneration
Fully static, at buildNothing can fail at runtime when someone reads the site. The cost is that every content change needs a deploy.
Where does the content come from?
  • A hosted CMS or database
Typed TypeScript behind a DataProviderContent changes go through pull requests like code, and the build works offline. There's a fully tested Supabase adapter, but it stays switched off.
How are vendors coupled?
  • Call each SDK where it's needed
An interface per concern, and a lint allow-list per SDKReplacing a vendor means one new adapter and one changed line. The cost is more files than a site this size strictly needs.
How is an adapter chosen?
  • Code edits per environment
Environment flags read by one helperAn unset flag gives you what production runs, and a typo fails the build rather than quietly picking the wrong backend.

Invariants, and what enforces them

InvariantEnforced by
A vendor SDK is imported only by its adapterAn ESLint import allow-list, which fails CI
Server data never reaches the browser bundleserver-only imports and a boundary test
A misspelled flag never picks a backendreadEnvChoice throws, so the build fails
Every adapter returns exactly the domain typesContract test suites run against each adapter

Failure modes

What goes wrongWhat it affectsWhat contains it
The email service is downThe contact form says it didn't sendEverything else is static and unaffected
Hosting somewhere other than VercelBot checks and analytics can't runFlags turn both off, and a honeypot field still catches simple bots
A client component imports server codeSecrets or content in the browser bundleThe build fails on server-only, and a test checks every client file

Evidence, Nov 2026

  • 5

    Vendors behind interfaces

  • 1

    File allowed to import each vendor SDK

  • 15

    Files that run in the browser (the rest render at build)

  • 1

    Path that writes anything: the contact form

Show the details

Artifacts

A port: no vendor type appears in itsrc/contact/ports.ts
/** Tells people from bots. Contract: resolves true only for a request it has identified as a bot. */
export interface BotCheck {
  isBot(): Promise<boolean>;
}
The flag reader every composition root uses (types left out)src/data/config.ts
export function readEnvChoice(env, name, choices) {
  const value = env[name];
  if (!value) return choices[0];
  if (choices.includes(value)) return value;
  throw new Error(`${name} must be one of ${choices.join(", ")}; got "${value}"`);
}

Who did what

Me
Keeping the site static, picking the vendors, and saying no to a live database the site didn't need.
The agents
The ports, the adapters, the contract suites, the lint boundaries and the flags.

03

Design system

One token file generates every colour, type style, motion timing and icon. A build check rejects a colour written anywhere else.

Go deeper

Context and constraints

Agent-written CSS tends to drift, especially with two themes and a set of motion rules: a hard-coded hex value in one file, a 300ms transition in another. So the design needed one source, and the build had to refuse anything that didn't come from it.

Design

From two files to every screen
  1. Sources

    • design/tokens.json
    • design/kurma-insignia.svg
  2. yarn tokens

    • Validateautomated check · same tokens per theme, motion limits
    • Generate
  3. Generated, committed

    • CSStokens.css, theme.css
    • TypeScripttheme and motion tokens, the mark
    • Iconsicon.svg, favicon.ico, apple-icon.png
  4. Guards

    • Colour checkautomated check · before every build
    • Regenerate and diffautomated check · in CI
The theme, without a flash
  1. Browser → Head script: Parse <head>, before the first paint
  2. Head script → Head script: Saved choice, else the system's scheme
  3. Head script → Browser: Set data-theme on <html>
  4. Browser → Browser: First paint, already in the right theme
  5. Browser → React: Hydrate
  6. React → React: Read the store and the system, so the markup matches the server's
  7. Theme toggle → Browser: On click: set data-theme, save the choice

The head script repeats the theme logic in plain JavaScript because it runs before React. A test keeps the two in step.

Decisions

QuestionOptions consideredChoseWhy, and what it costs
Where do colours come from?
  • Tailwind's default palette
  • Hand-written CSS variables
One JSON token file, with everything else generated from itThe palette can't drift, and both themes always define the same tokens. The cost is a build step and generated files in git.
How do generated files stay honest?
  • Generate at build time only
Commit them, and have CI regenerate them and fail on any differenceReviewers see the CSS a token change produces. The cost is regenerating after every token edit.
How are motion rules kept?
  • A style guide
  • Code review
Limits in the token build itselfThe build refuses a micro-interaction over 150ms or any animation over a second. The cost is that every timing has to go through a token.
How does the theme load without a flash?
  • Apply it after the page hydrates
A small script in the head sets it before first paintThere's no flash of the wrong theme. The cost is that the theme logic exists twice, and a test keeps both copies in step.

Invariants, and what enforces them

InvariantEnforced by
No colour literal outside the generated filesThe colour check, before every build and in CI
Every theme defines the same colour tokensToken validation in yarn tokens
Generated files match design/CI regenerates and diffs
One accent-coloured element per viewThe floating contact button hides while another accent button is on screen

Failure modes

What goes wrongWhat it affectsWhat contains it
Someone hard-codes a colourOff-palette UI in one themeThe build fails. Opting out needs an explicit marker on that line
A token edit isn't regeneratedCode and design disagreeCI's diff check fails
A reader asked for less motionAnimation they didn't wantNothing moves under reduced motion, and without JavaScript everything just shows

Evidence, Nov 2026

  • 2

    Themes, Steel and Iron, from one file

  • 8

    Generated outputs from 2 source files

  • 150ms

    Ceiling for any micro-interaction

  • 0

    Colour literals outside generated files

Show the details

Artifacts

The motion rule, enforced where the tokens are builtscripts/build-tokens.mjs
// The motion rule: micro-interactions (hover, toggles) stay at 150ms or less, nothing animates for over a second.
export const MICRO_MAX_MS = 150;
export const MOTION_MAX_MS = 1000;

if (motion.duration.fast > MICRO_MAX_MS) {
  throw new Error(`motion duration "fast" is for micro-interactions and must stay at ${MICRO_MAX_MS}ms or less`);
}

Who did what

Me
The visual direction (Steel and Iron), the type, and the rules the build now enforces.
The agents
The token pipeline, the generators, the checks and their tests.

04

Build, test and deploy

GitHub Actions runs the pipeline, and Vercel is one step in it that can be swapped out. Every change is also built and tested as a plain Docker container, so nothing can quietly depend on Vercel.

Go deeper

Context and constraints

Vercel's Git integration used to build and deploy every push by itself, and production didn't wait for CI. The release process lived in a dashboard instead of the repo. I wanted to keep Vercel as the host but move the pipeline into the repo.

Design

Every push and pull request
  1. Trigger

    • Push to main
    • Pull request
  2. Gates, in parallel

    • checkautomated check · lint · test · build
    • portabilityautomated check · Docker · smoke test
  3. Deploy

    • deploy-vercel actiontakes target, ref and sha, returns the url
  4. Result

    • Productionfrom main
    • Previewlink posted on the PR

Runs on main are never cancelled, so production deploys finish in order. A newer push to a pull request cancels the older run.

The portability check
  1. Build context

    • The repominus env files and .git
  2. Builder · node:24-slim

    • yarn install --frozen-lockfile
    • BUILD_STANDALONE=1 yarn buildanalytics and BotID off
  3. Runner · node:24-slim

    • node server.jsnon-root, port 3000
  4. Smoke test

    • Home pageautomated check · hero name
    • Sitemap and robots.txtautomated check
    • /_next/imageautomated check · the image optimiser runs
A preview deploy
  1. GitHub → Gates: Run check and portability
  2. Gates → Deploy job: Both passed
  3. Deploy job → Vercel: vercel pull: settings and the branch's preview env
  4. Deploy job → Deploy job: vercel build, on the runner
  5. Deploy job → Vercel: Upload the prebuilt output
  6. Vercel → Deploy job: Preview URL
  7. Deploy job → GitHub: Create or update the one preview comment

Decisions

QuestionOptions consideredChoseWhy, and what it costs
Where does Vercel live in CI?
  • Commands inline in the workflow
  • A third-party action
A local action behind a host-neutral interfaceSwitching hosts touches one file, and the token never goes through someone else's code. The cost is one more file to maintain.
How is "runs without Vercel" proven?
  • Build on the runner and copy it into an image
A multi-stage Docker build, then a smoke testThat's how any other host would build it, and the native binaries match the image. It adds about a minute and a half per run, in parallel with the other checks.
How are Vercel's own deploys switched off?
  • Disconnect in the dashboard first
  • An ignored-build-step script
A one-line vercel.json, merged with the new CIVercel reads it on each commit, so production switched over in the merge itself, with no gap and no double deploy.

Invariants, and what enforces them

InvariantEnforced by
Nothing deploys unless both gates passdeploy needs check and portability
Production deploys finish, in orderRuns on main are never cancelled by a newer push
The site runs without VercelA smoke test against the container, including the image optimiser
Secrets never reach logs or the imageThe token only passes through the environment, and .dockerignore keeps env files out

Failure modes

What goes wrongWhat it affectsWhat contains it
The deploy token expiresDeploys stop, but the site keeps servingRotate the secret (there's a yearly reminder)
A bad deploy reaches productionThe live siteVercel's instant rollback, without touching CI
A change only works on VercelLock-in, discovered too lateThe portability job fails before deploy runs

Evidence, Nov 2026

  • ~1m30s

    Docker build and smoke test

  • ~2m10s

    Deploy job

  • 1

    Deployment per commit after the cutover

  • 4/4

    Smoke checks on the live site

Show the details

Artifacts

The deploy job: the only Vercel-specific line is the action it uses.github/workflows/ci.yml
deploy:
  needs: [check, portability]
  steps:
    - uses: ./.github/actions/deploy-vercel
      with:
        target: ${{ github.event_name == 'push' && 'production' || 'preview' }}
        ref: ${{ github.head_ref || github.ref_name }}
        sha: ${{ github.event.pull_request.head.sha || github.sha }}

The cutover, one checked step at a time

  1. CI deploys previews alongside Vercel's own, and both appear on the pull request.
  2. vercel.json added on the branch: Vercel makes no deployment for that commit.
  3. Merged: exactly one production deployment for the merge commit, from CI.
  4. The next pull request and merge go through CI alone.

Who did what

Me
Keeping Vercel without lock-in, the token and secrets, each cutover step and the merges.
The agents
The workflow, the deploy action, the Dockerfile, the smoke test, and checking every deployment on Vercel.

05

Me and the agents

What I decided, what I delegated, and the corrections that became standing rules.

Go deeper

Context and constraints

Agents are fast and thorough, but they work on whatever request is in front of them. Most of my job was deciding what not to hand over: the scope, the judgement calls and the taste. When I corrected something, I wrote it down as a rule so I'd only have to say it once.

Design

How a request turns into a habit
  1. Requestme
  2. Proposalapproaches, mockups
  3. Decisionhuman gate · me
  4. Build and verifyagents
  5. Review the evidencehuman gate · me
  6. Correction → standing ruleloaded every session
Who decides, who does
  1. Stays with me

    • Scopehuman gate
    • Approachhuman gate
    • Approvals and mergeshuman gate
    • Account and dashboard changeshuman gate
  2. Delegated

    • Specs and plans
    • Code and tests
    • Docs and diagrams
    • Verification
  3. Kept honest by

    • Tests and CIautomated check
    • Evidence in every report
    • Standing rules

Decisions

QuestionOptions consideredChoseWhy, and what it costs
What stays with me?
  • Delegate the decisions too
Scope, approach, approvals, merges and account changesThose are the choices that are hard to undo or that other people see. The cost is that I'm the bottleneck at three points in every change.
How do corrections stick?
  • Repeat them each session
Written rules the agents load every sessionA correction I make once applies to every session after it. The cost is pruning rules when they go stale.
When was the answer no?
  • Build the full backend that was proposed
Keep the site static, with Supabase as a tested, switched-off referenceA live database adds cost and ways to fail that a portfolio doesn't need. The trade-off is that the adapter's real queries are documented as unverified.

Invariants, and what enforces them

InvariantEnforced by
yarn, never npmProject instructions every agent reads
Run it locally and show me before anything is pushedA standing rule, since the theme redesign
Every pull request carries diagrams, parse-checkedA standing rule and a description template, since pull request #3
The site stays staticA standing rule, since the Supabase work
Docs describe the system as it is, not how it got thereA standing rule, from the CI docs

Failure modes

What goes wrongWhat it affectsWhat contains it
Success reported without proofA broken change that looks doneEvidence required: output, screenshots, deployment records
A proposal bigger than the needWeeks of work a portfolio doesn't needApproaches side by side, and an explicit choice
A secret pasted into a chatA token in a transcriptSecrets go in through hidden prompts or the clipboard, never the conversation

Evidence, Nov 2026

  • 5

    Corrections that became standing rules

  • 3

    Decisions per change that stay mine

  • 1

    Backend kept switched off, by choice

  • 2

    Rounds of mockups before this page was built

Show the details

Artifacts

A standing rule, as the agents load itagent memory: local preview first
User wants every change run locally and shown to them (dev server output, screenshots, diff)
before anything is pushed to GitHub.

How to apply: work on a local branch, verify in the browser preview, show output and diff,
and never push or open a PR until the user says so.

Who did what

Me
Everything in the decisions table, and the call on what this page claims.
The agents
Proposals, mockups, code, tests, docs, and checking their own work against GitHub and Vercel.

The code

The repository is private

I'm happy to walk you through it, or to give you read access to the code, the specs and the pull requests.

Request repo access