OfCourse by AgileIdeas.dk
Course outline

Agents That Write Code You Can Live With

Getting started 7 pages · 1 h 1 min
Free taster: the one-hour quality harness 5 pages · 1 h 10 min
Part 1: Habits Coming soon 4 modules · 5 h 45 min
Part 2: Measure and guard Coming soon 2 modules · 2 h 40 min
Part 3: Going deeper Coming soon 3 modules · 4 h 45 min

Reading, about 15 minutes

The course robot grinning at a slice of layer cake, red and yellow layers stacked high

The seven layers of a quality harness

A quality harness is everything around the agent that shapes what it produces. Give an agent the same task twice and you get two different results. The harness doesn't make its best run better; it raises the floor, so even its worst run is one you can live with.

It has seven layers. You don't need all of them on day one, but knowing them tells you where your gaps are.

flowchart TB
    P["<strong>Before the agent starts</strong><br/>1 · Context<br/>2 · Specification<br/>5 · Work shaping"]:::yellowline
    G["<strong>The agent writes code</strong>"]
    F["<strong>3 · Fast feedback</strong><br/>tests, types, lint"]
    H["<strong>4 · Guardrails</strong><br/>hooks, CI, permissions"]:::greenline
    R["<strong>After it's done</strong><br/>6 · Review and measurement<br/>7 · Evolution"]
    P --> G
    G --> F
    F -->|<span class="red">fails</span>| G
    F -->|<span class="green">passes</span>| H
    H -->|<span class="red">blocked</span>| G
    H -->|<span class="green">passes</span>| R
    R -->|<span class="green">learnings</span>| P

Three layers shape the work before the agent starts, two check it while it works, and two make sure the result is good and stays good. The loop only closes when what you learn in review is written back into the context the agent reads next time. Otherwise you correct the same mistake again and again.

The layers

1. Context: does the agent know how we do things here? A short file in the repo (usually AGENTS.md) with your conventions, where things live, and what never to do. Add decision records for the choices that aren't obvious from the code.

2. Specification: does the agent know what "done" means? Acceptance examples and tests written before the code. When "done" is checkable, the agent can check it. When it isn't, it guesses.

3. Fast feedback: can the agent find its own mistakes in seconds? One command that runs formatting, static analysis and tests. If it is slow or flaky, the agent (and your team) will stop running it.

4. Guardrails: what is the agent never allowed to do? Rules that are enforced, not just written down: hooks, CI gates, permissions that limit what the agent may run or change, and architecture tests that fail when a boundary is crossed.

5. Work shaping: is the task small and clear enough? Thin slices, a plan before the implementation, and separate steps for building and reviewing. Big tasks produce big diffs, and big diffs don't get reviewed properly. After each task, look back: was it small enough, or could it have been split? That shapes the next one.

6. Review and measurement: is the result actually good? Did it do what the specification asked, and are you happy with how? A review checklist for agent diffs, plus a few numbers that show the trend: mutation score, complexity and churn in the places you care about.

7. Evolution: does quality hold over months? What you learn in review becomes new rules in AGENTS.md and better specifications for the next task. Add regular refactoring sessions and a budget for technical debt, and keep the context files up to date rather than writing them once.

Where to start

Layers 1 and 3 give the most for the least effort. An agent that knows your conventions and can check its own work avoids most of the problems from the previous page. That is exactly what the exercise sets up.

Next: the exercise. From here on, the taster asks you to sign in with your email address. You get a sign-in link, no password, and your progress follows you to any device.

You've marked this page as done.

Kept in this browser. Sign in to keep it on every device.