Before AI agents wrote any code, I wrote 12,000 lines of spec
The spec took one to two days, and the first code landed 47 minutes after it reached the repo. If AI agents write code this fast, why slow down for a spec at all?
At 8:19pm on 2 November I committed a folder called rewrite/ to an empty repo. It held 168 files: about 12,000 lines of written spec, plus 65 HTML mockups, another 16,000 lines. Forty-seven minutes later, the first code landed: the workspace scaffold.
Nine days after that, Flair v2 took over from v1. But those nine days only worked because of the one to two days before them, when no code was written at all.
It can look like wasted time. If AI can write an app in nine days, why spend two of them writing about it first?
What went into the spec
Opus did most of the reading. It scanned Flair v1, our live order system, and wrote down what it found. Then it redrew the app, screen by screen, on a Claude canvas.
That gave us three things:
- An 11-tab rewrite doc. The stack decision, a feature map, field rules, the schema and how old data maps to it, state machines and events, test parity, an action catalogue, errors and URLs, integrations, the switchover, and operations.
- A 65-board mockup canvas. Every screen, in the states that matter.
- A design system. Tokens, components and the rules for using them.
All three live in Claude, but agents work from the repo. So I exported them into rewrite/ as plain Markdown, HTML and images, where any agent could read them offline.
Some of it was easy to write because v1 had taught me. In v1 I had already shared one action between the API, the web app and our MCP server. I knew what the system needed, so the spec didn’t have to guess.
The spec couldn’t answer everything
The same commit started a file called tracker/DECISIONS.md, with four rows. Its first line read: “Decisions made during the build.” Each row is one numbered decision, with its reason, and whether it overrides the spec.
Here are the first two, as they still read:
| D-001 | 2026-11-02 | Bun for package manager, workspaces, scripts and runtime | Owner checked Bun works with the stack. 01-main allows "Node or Bun"; it says pnpm for the workspace | Yes: pnpm → Bun |
| D-002 | 2026-11-02 | No TanStack Start server functions. Hono is the only API | 01-main rule 1 | No |The title of this post was meant to be “200+ decisions before a line of code”. That isn’t true, and the git history shows it. When the first code landed, the file had 19 rows.
By the switchover it had 202 rows. Fifty-five were written on the first day and 65 on the second. The rest came while the agents built.
That was the real job of the spec. It didn’t answer every question. It gave every question somewhere to land. When an agent found a gap, it asked on the issue. The answer came from the spec, the mockups or v1. If it set a rule for more than one module, it became a new row.
Next to the decisions sat the parity checklists: one per module, one row per requirement. Each row points to the spec line it comes from and names the test that proves it. By the end there were more than 4,500 rows.
The decision I’m glad about
The one I’m most glad about is GitHub issues as the tracker.
On day one, the tracker lived in the repo, in Markdown files. It didn’t last. By the next day, 34 of the first 50 commits on main only recorded status. Agents were spending time and tokens on bookkeeping.
So on 3 November we moved it all into GitHub. One issue per task, whose body is the brief. Labels for module, wave, risk and status. Questions and answers as comments on the issue. The repo kept only the rules, the decisions and the checklists.
The same decision put a number on why questions matter. Of the first 29 times work was sent back, 13 were over spec questions. So questions moved to the issue, before any code, and an answer that sets a rule becomes a decision.
So, why spend days on a spec when AI codes this fast? Because the speed is only useful when you can check the result. Without a spec, an agent builds something plausible and you find out later whether it’s right. With one, every choice points back to a line, a board or a decision. A reviewer can check it for correctness, and so can I.
The lessonAI makes writing code cheap. It doesn’t make deciding cheap.
What I’d tell anyone handing work to AI
- Let the AI read your old system first. A feature map from the real code beats one from memory.
- Put the spec where the agents work. A live doc is great for people. An agent needs it in the repo.
- Keep a numbered decision log. One row per rule, with a reason. Agents can cite “D-002” instead of rearguing it.
- Don’t track status in the repo. Use issues. Commits that only say “in progress” cost real time.
The spec was done and the decision log was growing. Next came the part that looked like a big engineering team: by the switchover, a florist with one developer had 424 GitHub issues.
