Chapter 6 · Capstone: Build Your Harness · Lesson 6.2

One Feature, End to End

Watch a single small feature travel the whole harness loop, so every lesson clicks into one picture.

The whole course, in one pass

Every lesson so far has been one piece: spec, hooks, review, the ratchet, evals. This lesson snaps them together. We take one genuinely small feature and follow it through your harness from start to finish - and by the end you'll see that the pieces are not a checklist, they're a single connected loop.

The feature: add a rate limit to an API endpoint - cap each caller at 100 requests a minute. Small, real, and it happens to touch every stage. Here is its trip through the loop.

  1. Spec first. Before a line of code, write the five-line spec (Lesson 1.4): objective (cap callers at 100/min), in scope (this one endpoint), out of scope (leave auth and other routes alone), done-when (the 101st call in a minute returns a clear "too many requests" instead of going through).
  2. Clean ground. Start on a fresh git branch (Lesson 3.3) so a bad run is one reset away and never touches your working code.
  3. Let it loop. The agent reasons, acts, observes, repeats - that's the loop (Lesson 0.2). Your job is to keep it healthy: context lean (Lesson 1.5) and tools few (Lesson 3.1), so it stays sharp across turns.
  4. Hooks enforce. Your hooks (Lesson 1.3) run the tests after every edit. A failure is loud and stops the run; a pass is silent. You don't have to remember to check - the harness checks.
  5. Review. A fresh second agent reads the finished change with no memory of writing it - cross-agent review (Lesson 1.6) - and hunts for what the first one missed.
  6. A failure appears - and you ratchet it. Say the reviewer finds the limit isn't reset when the minute rolls over. You don't just patch it: you turn it into a durable fix so it can never come back - the ratchet (Lesson 1.1). A rule if the agent just needs to know it, a hook if it must be enforced.
  7. Confirm. Re-run your eval set (Lessons 4.2 / 4.5) - your fixed golden tasks - to prove the fix helped and nothing else regressed.
The loop, one pass
  1. Spec - five lines, done-when testable.
  2. Branch - clean ground, easy reset.
  3. Loop - reason, act, observe; context lean, tools few.
  4. Hooks - tests run every edit; failures loud.
  5. Review - fresh agent, different eyes.
  6. Ratchet - a real failure becomes a rule or hook.
  7. Confirm - re-run golden tasks; helped, nothing broke.

Read that list again and notice: no step stands alone. The spec is what the review pass checks against. The ratchet only fires because a hook or reviewer surfaced a failure. The confirm step only means something because you built the eval set earlier. Pull one out and the others wobble.

One small feature touches every lesson in the course - and that connectedness is the skill. The example feature doesn't matter; the fact that the pieces link into one loop is the whole point.

This is the capstone idea in a sentence: you are not learning seven separate tricks, you are learning one loop with seven stations. Once you've run it once, every lesson has a home.

Check yourself

What this walkthrough really teaches is -

The example feature is disposable. The point is that spec, hooks, review, ratchet, and evals form one connected loop - pull one out and the rest wobble.

The review turns up a bug. You should -

That's the ratchet: a real failure earns a durable fix - a rule if the agent just needs to know, a hook if it must be enforced - so the same bug can't recur.

After the fix lands, you re-run -

The eval set is your fixed set of golden tasks. Re-running it proves the fix helped and, just as important, that nothing else quietly regressed.

Do this now (30-45 min)

Pick one genuinely small, real feature and run it through all seven steps on your starter harness (Lesson 6.1):

  1. Spec it (five lines), branch, let it loop, let the hooks and a review pass do their work.
  2. Write down the one failure you hit - and exactly what you ratcheted it into (a rule, a hook, or a reviewer check).
  3. Re-run your golden tasks and confirm.

That one ratcheted line is the souvenir - it's your harness getting permanently better from a single feature.

I'm your teacher - ask freely. Have a real feature in mind? Tell me what it is and we'll walk it through all seven steps together, right now, and place the failure you hit into the right home.

Go deeper

Primary source (read this): Simon Willison - How coding agents work / Agentic Engineering Patterns, the clearest end-to-end picture of the loop these stations sit inside.

Secondary: Addy Osmani - Agent Harness Engineering, for why each pass earns its place.

Wisdom (test it on people): the HumanLayer community - bring your one ratcheted line and see if it survives a critique.