The build

One real web app, built by you and an agent over the whole course, one stage per chapter. By the end you have a deployed app, a commit trail, a mutation score, a threat model and a postmortem of an incident you caused on purpose, all yours to open in front of an interviewer. The deploy is the one step our own run could not do, and stage 16 says what stood in for it.

The app is Kitty. Friends log what they spent and it works out who owes whom. We chose it because a small app with money in it needs everything this course teaches. Rounding has to add up to the penny. People’s balances are private, so sign-in and access control matter. Comments invite script injection. Two people settling at once is a real race, and a payment webhook really does arrive twice. Nobody loses sleep over a to-do list.

It costs nothing beyond your agent. Bun, Hono and SQLite are free software, a public GitHub repo holds it, and Cloudflare’s free plan runs it. Your agent subscription is the only bill.

Checked at source on 6 November 2026. Claude Code needs a paid Claude plan, and the cheapest, Pro, is $20 a month, or $17 a month paid for a year at once (Claude’s pricing). The Workers free plan allows 100,000 requests a day and 10 ms of CPU time per request (Workers limits). Kitty’s password hash took about 7 ms on the local runtime, which is close, and that was not measured on Cloudflare. D1’s free plan allows 5 million rows read and 100,000 written a day, 5 GB in all and 500 MB a database (D1 pricing, limits). GitHub Free has unlimited public repos, and Actions minutes on its standard runners are free in them (GitHub’s pricing). Prices change, so look again before you start. Tokens are priced in chapter 5.

Your time
27 to 44 hoursOur estimate, for the building only. Reading the chapters comes on top, and we did not measure that.
Agent time we measured
185 minAcross 79 agent calls.
Model spend we measured
$4.49List prices for the whole path, including failed tries, nearly all on the cheapest Claude model. A subscription bills differently.
At the end
186 commits114 files in the repo we built by following this page.

Who has really done this: Nobody yet, as a person. An AI agent followed every step below and recorded what happened, so the agent’s work is measured and a person’s hands-on time is our estimate. Run on 5 and 6 November 2026, with Claude Code 2.1.318, headless, on claude-haiku-5-5, on a Mac with Apple silicon, macOS 27, Bun 1.4.2.

Stage 1 of 18, for chapter 1: The machine

First words with an agent

The agent installed, a folder called kitty, and one small program that splits a bill in whole pence. You can say what its exit code means.

About 30 to 60 minutes of your time.

What you need from the chapter

By hand first

  • claude --version

    Install the agent first, as Your first agent shows: it takes one line from the vendor’s page, and you need a paid plan. This prints a version number. If it says command not found, open a new terminal.

  • bun --version

    Bun runs the code. Install it with the line on bun.sh, then open a new terminal. This prints a version number.

  • mkdir kitty && cd kitty && pwd

    Makes the folder, moves into it, and prints where you are. Everything from now on happens here.

  • claude

    Starts the agent in this empty folder. Paste the words below into it.

The exact words to paste

Your first promptNew session

This is an empty folder for a small app called Kitty, which will split shared bills between friends. I am new to this, so before each command tell me in one sentence what it does. Write one file, split.ts, that runs with Bun and uses no packages. Running bun split.ts 1000 3 must print how 1000 pence is shared between 3 people, in whole pence, one share per line, largest first. The shares must add up to exactly the total. If the arguments are missing, or are not whole numbers above zero, print a one-line error to stderr and exit with code 1. When you finish, run it once to show me it works, then list every file you made and what it is for.

What it will probably do

Writes one file of about 40 lines, runs it once, and tells you what it made. It will ask before running a command: read the sentence it gives you, then say yes. Ours finished in 13 seconds and wrote no other files.

What to read in the diff

  1. Open split.ts in any editor. Find the two lines that work out the base share and the leftover pence.
  2. Find the line that prints the error, and the line after it that sets the exit code.
  3. Find the comment saying why the shares always add up. You should be able to say it back in your own words.

Run these yourself

  • bun split.ts 1000 3; echo "exit $?"

    334, 333 and 333 on three lines, then exit 0.

  • bun split.ts banana 3; echo "exit $?"

    A one-line error, then exit 1. That 1 is the machine saying no.

  • bun split.ts 1000 0 2> err.txt; echo "exit $?"; cat err.txt

    The screen stays quiet and says exit 1, and the error is in err.txt. You sent stderr to a file.

What will probably go wrong

  • bun: command not found. Your terminal started before Bun was installed. Open a new one.
  • The agent wants to run something you don’t understand. Say no, and ask it what that command does and why. That is allowed at every stage of this course.
  • It adds a package or a package.json. You asked for neither. Tell it so. Noticing this is the skill.

To undo this stage: Nothing here can hurt anything else. Delete the kitty folder and start again.

Prove it, with the agent closed

Predict, then run.

  1. Close the agent with /exit.
  2. On paper, write what bun split.ts 1 3 will print, and what bun split.ts 7 2 will print.
  3. Run both. If you were wrong, read the two lines that do the sums until you can say why.
  4. Run ls -a and say out loud what each thing in the folder is.

Done when: You predicted 1, 0, 0 and 4, 3, and you can explain why someone can owe 0p.

Commit it, and log it

  • No commit yet: git arrives in stage 3.

    What you commit by hand. The agent's own commits are already on the branch.

  • No row yet. The log arrives in stage 3.

    The row you add to docs/ratchet-log.md, with your own date, your own words and your own commit hash. If what went wrong for you was different, write that instead.

How this page was tested

An AI agent (Claude Opus 5.5) followed this page from an empty folder, in a scratch folder outside this site, on 5 and 6 November 2026. Every prompt you see went word for word to a fresh headless Claude Code session, claude -p, on claude-haiku-5-5. The one exception was the comparison in stage 15, which also ran Sonnet.

Each agent ran inside a macOS sandbox that let it write only to the scratch folder and read nothing else of the owner’s. It had no real accounts and made no real deploys, and its only outside requests were package installs. A headless run can’t answer a question, so where the agent stopped to ask permission to write in .claude/, we let it go ahead inside that sandbox, as a person saying yes would.

We ran every check on the page ourselves and did every step marked by hand, and we wrote down what failed. When a prompt failed we changed it and ran it again, and this page shows the version that ran. A check on this site fails if a prompt changes after its run.

The costs are list prices from the agent’s own report. A subscription bills differently. Two runs were cut off before they reported a cost, and for those we worked it out from the tokens in their session files.

The time for you is our estimate. No person has done this yet, and the steps for the agent-off walkthrough at the end can only be judged by a person doing them.

The workshop

Name a word, or describe what you mean in everyday language.