ZHI WANG

The Boring Secret to Building with AI Agents

I went into this project expecting the hard part of working with an AI agent to be the code. It wasn't. The hard part was continuity: keeping the work coherent when it happens in short, scattered sessions, and neither I nor the agent remembers the last one.

What solved it was dull: written documents, produced in a fixed order, each one a gate the next stage couldn't pass without. Over five days of personal time, that sequence took ReadyDay, a small wellness app for iPhone and Apple Watch that shows one daily readiness number and the reasons behind it, from an empty repository to a TestFlight-ready build. This post walks through the five stages, what each one produced, and where the approach falls short.

01
Environment
Git · CLAUDE.md
→
02
Product design
PLAN.md · cut line · V2.md
→
03
Technical design
ALGORITHM.md · DESIGN-SYSTEM.md · IMPLEMENTATION.md
→
04
Implementation
Code · tests · test.sh
→
05
Human verification
The skeptic's gate

Step 1 — Environment: two rules, written once

The repository started with two commits. The first added my research notes. The second added CLAUDE.md, the file of standing instructions the agent reads at the start of every session. The whole file is two rules:

  • After every completed change, you must create a corresponding Git commit.
  • After every change, you must write or update the relevant tests, and all tests must pass before delivering the work.

Both rules are about process, not product. They make every change traceable and testable. They don't stop the agent from building the wrong thing. That job belongs to the next two stages.

Step 2 — Product design: draw the cut line

I did the product thinking myself and used the agent as a scribe. The output was PLAN.md: the problem, the readiness bands (Rest / Easy / Train / Push), the business model, and one sentence that scoped the first release:

v1 is the glance — one number, one word, one sentence, plus three lines saying why.

Everything else went into V2.md, deferred on purpose rather than lost. A plan like this is a decision tool. If the one-screen version hadn't been convincing on paper, the idea would have died in an afternoon instead of after a week of code.

Step 3 — Technical design: separate the what, the math, and the how

The technical design was split across three documents, each with one job. ALGORITHM.md holds the math. DESIGN-SYSTEM.md holds six visual rules, each traced back to a line in the algorithm and enforced by tests. IMPLEMENTATION.md holds the build plan and says which document wins when they conflict:

PLAN.md is the what and why, ALGORITHM.md is the maths, DESIGN-SYSTEM.md is the look. Where this file and those disagree, they win and this one is wrong.

That precedence rule matters more than it looks. An agent that finds two documents disagreeing will pick one. Without the rule, you don't control which. I reviewed the whole design myself before any implementation began, and my test was simple: if I couldn't explain the approach back in my own words, it wasn't ready to build.

Step 4 — Implementation: small steps, tested every time

With the plan in hand, the agent built in small increments, one commit per change: first the scoring engine, ReadinessCore, with 28 passing tests; then the main screen, live Apple Health data, a Home Screen widget, and the watch app. The scoring engine has persona-based calibration tests, and the data layer has fixture-backed tests. Nothing came back to me until the whole suite passed.

A passing suite is necessary but not sufficient, though. It proves the code does what the tests say. It doesn't prove the tests say the right thing, and an agent writing both the code and its tests shares the same blind spots across them. That's why the last gate is not automated.

Step 5 — Human verification: judgment stays with a person

Agents are optimistic reporters. They tell you the work is done. My job at the end is to be the skeptic. On ReadyDay that meant product calls no test could make: which theme ships as the default, where exactly the first-release cut falls, and deferring in-app purchases entirely, for this reason:

You cannot learn what people will pay for before you know whether they open it daily.

My review asks three questions. Does the work do what the plan promised? Would I put it in front of a real user? Did every stage actually happen, or did one get skipped quietly?

The build, day by day

  • Day 1Research notes and standing instructions; repository created
  • Day 4Product plan and cut line; algorithm spec; design system with six rules
  • Day 5Implementation plan; scoring engine with 28 passing tests; main screen, health data, widget, watch app
  • Day 5–6Release build exposes issues, fixed and re-verified; README; ready for TestFlight

What I didn't expect: the documents are a handoff system

This was the real finding. When work happens in short sessions, the expensive part is rebuilding context at the start of each one. I never re-briefed the agent. The plan said what to build, the design documents said how, and the commit history said what was already done. Each session started with the agent reading those files and carrying on from where the last one stopped.

The same artifacts that let an agent resume would let a colleague resume. That's the part I think carries over beyond side projects.

The workflow loops

On paper the five stages run in a straight line. In practice they don't. ReadyDay's release build surfaced problems that sent work back into implementation. When review finds a problem, work goes back: usually to implementation, sometimes to technical design if the approach was wrong, and occasionally to product design if the plan itself was wrong. The stages stay fixed. The path through them doesn't.

Why I think this transfers to analytics teams

My background is epidemiology and data science, and the workflow above is mostly old analytics discipline applied to a new kind of collaborator:

Plan before you touch the data. A written analysis plan settles the question and the success criteria before results can reshape them. A product plan does the same job for an agent.

Traceability by default. One commit per change, each with its tests, means anyone can rebuild what changed and why. That's what makes work reviewable.

Accountability stays human. An agent can produce a forecast, a model, or a dashboard. It can't own the decision that rests on it. Someone with a name still has to sign off.

Documentation is onboarding. Files that let an agent pick up where it left off will do the same for a new analyst.

What this doesn't prove

This is one project, built by one person, from scratch, at small scale. There's no controlled comparison. I can't show that the same app wouldn't have shipped without the process. Team settings add constraints this project never faced: shared data access, validation requirements, formal review. So read this as a worked example, not a proven method. I'll keep testing it and report back where it breaks.

The checklist

  • Environment: repository initialized, standing instructions (CLAUDE.md / AGENTS.md) written
  • Product design: plan written, cut line drawn, everything else parked for v2
  • Technical design: what / math / how separated, precedence rules stated, reviewed by a person
  • Implementation: small commits, tests with every change, full suite passing before handoff
  • Human verification: matches the plan, fit for a real user, no stage skipped
  • Loop: when review fails, send the work back to the stage where the error started

None of this makes the agent smarter. It makes the agent's work reviewable, resumable, and accountable, and those three properties matter more than raw speed.

ReadyDay is a personal project, built on my own time and equipment. It's a general wellness app: it doesn't diagnose, treat, or give medical advice. All views here are my own and don't represent my employer.