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.
3
Human gates per change
Spec, local run, merge
200+
Automated tests
Run on every push
5
Vendors behind interfaces
Each one file to replace
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
- Ideame
- Brainstormquestions, mockups
- Spechuman gate · I approve
- Plantasks, interfaces
- Failing tests
- Code
- Local runhuman gate · I check it
- Pull requestdiagrams, test plan
- CIautomated check · 3 jobs
- 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.
- Agent session → GitHub: Push the branch, open the pull request
- GitHub → CI: Run check and portability, in parallel
- CI → Vercel: Deploy a preview
- CI → GitHub: Post the preview link on the pull request
- GitHub → Agent session: A failing job or a review comment, relayed
- Agent session → GitHub: Fix, verify, push
- Me → GitHub: Review the preview, merge
- GitHub → CI: Push to main
- CI → Vercel: Deploy production
Written down
- Project instructionsCLAUDE.md
- Standing rulesagent memory
- Specs and plans
- Shared notes folderbetween sessions
Read by
- The main session
- Side sessionseach in its own worktree
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
| Question | Options considered | Chose | Why, and what it costs |
|---|---|---|---|
| Where does a person sit? |
| Three gates: the spec, a local run, the merge | My 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? |
| A written spec with an approaches table | A 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? |
| Evidence: test output, screenshots, deployment records | An 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 session per independent task, each in its own worktree | The 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
| Invariant | Enforced by |
|---|---|
| No code before the design is approved | The options laid out, a written spec and an explicit yes from me |
| A test fails for the right reason before the code exists | Every 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 locally | A standing rule the agents load every session |
| Every pull request explains itself with diagrams | Before/after, flow and boundary diagrams, each parsed by Mermaid before posting |
Failure modes
| What goes wrong | What it affects | What contains it |
|---|---|---|
| An agent invents an API or a flag | Type errors, failing tests, a red CI job | Types and tests before merge, and pinned tool versions |
| Scope creep | A diff touching files the spec didn't name | Non-goals in the spec, and one task per session |
| Context lost in a long session | Settled questions asked again | Specs, plans and notes on disk, not in the chat |
| A confident but wrong status report | A claim without output | Evidence 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
| | 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
- Spec with 20 diagrams and an approaches table, approved.
- Plan: 4 tasks, each naming its tests.
- The deploy script dry-run against a fake Vercel CLI caught a bash 3.2 bug before CI ever ran it.
- First CI run green: the Docker smoke test passed 4/4 and the preview link was posted on the pull request.
- 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
Presentation
- App Router pages
- Server sections
- Client islands
- UI primitives
Application
- Data facade
- submitContact use case
- Composition roots
Domain
- Types
- Ports
- Pure rules: contact, experience, skills
Adapters
- Static content
- Supabase (reference)
- BotID
- Resend
- Vercel Analytics
- Browser theme and motion
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.
- DataProviderDATA_SOURCE
Content
page.tsx
- staticdefault
- supabasereference
- ContactStoreCONTACT_STORE
Contact storage
submitContact
- nonedefault
- supabasereference
- BotCheckBOT_CHECK
Bot check
submitContact
- botiddefault
- none
- ContactNotifier
Email
submitContact
- resenddefault
- AnalyticsANALYTICS
Analytics
TrackedLink, ContactForm
- verceldefault
- none
- ThemePorts
Theme
ThemeProvider
- browserdefaultlocalStorage · matchMedia · html
- deploy action
Deploy
the CI deploy job
- deploy-verceldefault
An unset flag means whatever production runs. Tests swap in-memory fakes through the same ports.
- Browser → Server action: POST / with the fields and the honeypot
- Server action → submitContact: The input, typed as unknown
- submitContact → submitContact: Honeypot filled? Fake success, stop
- submitContact → BotCheck: isBot()
- BotCheck → submitContact: No
- submitContact → submitContact: Parse, then validate
- submitContact → ContactStore: save()
- ContactStore → submitContact: Stored, or not
- submitContact → Notifier: notify()
- Notifier → submitContact: Sent, unconfigured or failed
- submitContact → Server action: Success, or a reason
- 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
| Question | Options considered | Chose | Why, and what it costs |
|---|---|---|---|
| How are pages rendered? |
| Fully static, at build | Nothing 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? |
| Typed TypeScript behind a DataProvider | Content 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? |
| An interface per concern, and a lint allow-list per SDK | Replacing 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? |
| Environment flags read by one helper | An 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
| Invariant | Enforced by |
|---|---|
| A vendor SDK is imported only by its adapter | An ESLint import allow-list, which fails CI |
| Server data never reaches the browser bundle | server-only imports and a boundary test |
| A misspelled flag never picks a backend | readEnvChoice throws, so the build fails |
| Every adapter returns exactly the domain types | Contract test suites run against each adapter |
Failure modes
| What goes wrong | What it affects | What contains it |
|---|---|---|
| The email service is down | The contact form says it didn't send | Everything else is static and unaffected |
| Hosting somewhere other than Vercel | Bot checks and analytics can't run | Flags turn both off, and a honeypot field still catches simple bots |
| A client component imports server code | Secrets or content in the browser bundle | The 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
/** Tells people from bots. Contract: resolves true only for a request it has identified as a bot. */
export interface BotCheck {
isBot(): Promise<boolean>;
}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
Sources
- design/tokens.json
- design/kurma-insignia.svg
yarn tokens
- Validateautomated check · same tokens per theme, motion limits
- Generate
Generated, committed
- CSStokens.css, theme.css
- TypeScripttheme and motion tokens, the mark
- Iconsicon.svg, favicon.ico, apple-icon.png
Guards
- Colour checkautomated check · before every build
- Regenerate and diffautomated check · in CI
- Browser → Head script: Parse <head>, before the first paint
- Head script → Head script: Saved choice, else the system's scheme
- Head script → Browser: Set data-theme on <html>
- Browser → Browser: First paint, already in the right theme
- Browser → React: Hydrate
- React → React: Read the store and the system, so the markup matches the server's
- 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
| Question | Options considered | Chose | Why, and what it costs |
|---|---|---|---|
| Where do colours come from? |
| One JSON token file, with everything else generated from it | The 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? |
| Commit them, and have CI regenerate them and fail on any difference | Reviewers see the CSS a token change produces. The cost is regenerating after every token edit. |
| How are motion rules kept? |
| Limits in the token build itself | The 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? |
| A small script in the head sets it before first paint | There'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
| Invariant | Enforced by |
|---|---|
| No colour literal outside the generated files | The colour check, before every build and in CI |
| Every theme defines the same colour tokens | Token validation in yarn tokens |
| Generated files match design/ | CI regenerates and diffs |
| One accent-coloured element per view | The floating contact button hides while another accent button is on screen |
Failure modes
| What goes wrong | What it affects | What contains it |
|---|---|---|
| Someone hard-codes a colour | Off-palette UI in one theme | The build fails. Opting out needs an explicit marker on that line |
| A token edit isn't regenerated | Code and design disagree | CI's diff check fails |
| A reader asked for less motion | Animation they didn't want | Nothing 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: 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
Trigger
- Push to main
- Pull request
Gates, in parallel
- checkautomated check · lint · test · build
- portabilityautomated check · Docker · smoke test
Deploy
- deploy-vercel actiontakes target, ref and sha, returns the url
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.
Build context
- The repominus env files and .git
Builder · node:24-slim
- yarn install --frozen-lockfile
- BUILD_STANDALONE=1 yarn buildanalytics and BotID off
Runner · node:24-slim
- node server.jsnon-root, port 3000
Smoke test
- Home pageautomated check · hero name
- Sitemap and robots.txtautomated check
- /_next/imageautomated check · the image optimiser runs
- GitHub → Gates: Run check and portability
- Gates → Deploy job: Both passed
- Deploy job → Vercel: vercel pull: settings and the branch's preview env
- Deploy job → Deploy job: vercel build, on the runner
- Deploy job → Vercel: Upload the prebuilt output
- Vercel → Deploy job: Preview URL
- Deploy job → GitHub: Create or update the one preview comment
Decisions
| Question | Options considered | Chose | Why, and what it costs |
|---|---|---|---|
| Where does Vercel live in CI? |
| A local action behind a host-neutral interface | Switching 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? |
| A multi-stage Docker build, then a smoke test | That'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? |
| A one-line vercel.json, merged with the new CI | Vercel 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
| Invariant | Enforced by |
|---|---|
| Nothing deploys unless both gates pass | deploy needs check and portability |
| Production deploys finish, in order | Runs on main are never cancelled by a newer push |
| The site runs without Vercel | A smoke test against the container, including the image optimiser |
| Secrets never reach logs or the image | The token only passes through the environment, and .dockerignore keeps env files out |
Failure modes
| What goes wrong | What it affects | What contains it |
|---|---|---|
| The deploy token expires | Deploys stop, but the site keeps serving | Rotate the secret (there's a yearly reminder) |
| A bad deploy reaches production | The live site | Vercel's instant rollback, without touching CI |
| A change only works on Vercel | Lock-in, discovered too late | The 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
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
- CI deploys previews alongside Vercel's own, and both appear on the pull request.
- vercel.json added on the branch: Vercel makes no deployment for that commit.
- Merged: exactly one production deployment for the merge commit, from CI.
- 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
- Requestme
- Proposalapproaches, mockups
- Decisionhuman gate · me
- Build and verifyagents
- Review the evidencehuman gate · me
- Correction → standing ruleloaded every session
Stays with me
- Scopehuman gate
- Approachhuman gate
- Approvals and mergeshuman gate
- Account and dashboard changeshuman gate
Delegated
- Specs and plans
- Code and tests
- Docs and diagrams
- Verification
Kept honest by
- Tests and CIautomated check
- Evidence in every report
- Standing rules
Decisions
| Question | Options considered | Chose | Why, and what it costs |
|---|---|---|---|
| What stays with me? |
| Scope, approach, approvals, merges and account changes | Those 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? |
| Written rules the agents load every session | A correction I make once applies to every session after it. The cost is pruning rules when they go stale. |
| When was the answer no? |
| Keep the site static, with Supabase as a tested, switched-off reference | A 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
| Invariant | Enforced by |
|---|---|
| yarn, never npm | Project instructions every agent reads |
| Run it locally and show me before anything is pushed | A standing rule, since the theme redesign |
| Every pull request carries diagrams, parse-checked | A standing rule and a description template, since pull request #3 |
| The site stays static | A standing rule, since the Supabase work |
| Docs describe the system as it is, not how it got there | A standing rule, from the CI docs |
Failure modes
| What goes wrong | What it affects | What contains it |
|---|---|---|
| Success reported without proof | A broken change that looks done | Evidence required: output, screenshots, deployment records |
| A proposal bigger than the need | Weeks of work a portfolio doesn't need | Approaches side by side, and an explicit choice |
| A secret pasted into a chat | A token in a transcript | Secrets 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
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.