walkinglabs/learn-harness-engineering
Learn Harness Engineering is a free, project-based GitHub course teaching how to build the "harness" around AI coding agents — the instructions, state tracking, verification, scope control, and session lifecycle that make models like Claude and Codex reliable on real repositories instead of just prompt-following. It includes 14 lectures, 8 hands-on projects built around an evolving Electron knowledge-base app, copy-ready templates (AGENTS.md, feature_list.json, init.sh, claude-progress.md), a harness-creator agent skill for scaffolding new projects, and a zero-dependency audit-harness.sh script that checks a repo against the five harness subsystems. Recent updates add "Frontier Harness Design Breakdowns" and new Graph/Loop Engineering lectures covering multi-node agent graphs, parallelism, and loop design outside the agent itself.
What it claims
The course claims that agent reliability on real repositories comes from the environment around the model, not from the model or the prompt. Its headline evidence is an Anthropic experiment it cites: the same model (Opus 4.5) and the same prompt ("build a 2D retro game editor") gave different results depending on the harness.
- Without a harness: $9 spent over 20 minutes, producing something that didn't work.
- With a full planner + generator + evaluator harness: $200 spent over 6 hours, producing a playable game.
It also cites OpenAI reporting a "qualitative shift" from unreliable to reliable with Codex in a well-harnessed repo. Both results are second-hand. The course does not run its own measurements on this page.
How it works
The core prescription is a fixed per-session lifecycle driven by files in the repo. It is the part you would actually copy.
flowchart TD
A[Read AGENTS.md / CLAUDE.md] --> B[Run init.sh]
B --> C[Read progress log, feature_list.json, git log]
C --> D[Pick ONE unfinished feature]
D --> E[Implement]
E --> F{Tests, lint, type-check pass?}
F -- no --> E
F -- yes --> G[Record evidence]
G --> H[Update progress + feature list, note what's broken]
H --> I[Commit only if safe to resume]The design rules attached to this lifecycle:
- Instructions are split across files. The agent navigates them on demand ("progressive disclosure") rather than reading one giant file.
- Only a passing test suite counts as "done."
- The agent may not rewrite the feature list to hide unfinished work.
Later phases move beyond the single session. L13/P07 cover loops: goal loop, timer loop, maker-checker. L14/P08 cover graphs: fan-out/fan-in, rollback edges, human-in-the-loop.
How to use it
Minimal adoption. Drop four files from the Resource Library into your project root: AGENTS.md (or CLAUDE.md), init.sh, feature_list.json and claude-progress.md.
Despite its name, claude-progress.md is agent-agnostic. It works with Codex, OpenHands and others, but no agent updates it automatically. Your root instructions must tell the agent to read it at startup and update it before handoff.
Audit an existing repo. audit-harness.sh is pure shell and needs no Node.js. It exits 0 when all CRITICAL items pass, so it can serve as a CI gate:
curl -fsSL https://raw.githubusercontent.com/walkinglabs/learn-harness-engineering/main/tools/audit-harness.sh | bash -s -- /path/to/your/repo
# or after cloning
bash tools/audit-harness.sh /path/to/your/repoThe harness-creator skill ships a separate validate-harness.mjs.
Run the course locally. The docs site uses VitePress:
npm install
npm run docs:dev
npm run pdf:build # PDFs to artifacts/pdfs/Project code. Projects are an Electron + TypeScript + React app under projects/project-NN/, each with starter/ and solution/ directories. Each project's solution becomes the next project's starter, so you cannot easily skip ahead.
Requirements and time. You need an agent that can edit files and run commands, such as Claude Code or Codex. Without one you can read the material but not complete the projects. The stated pace is about one week per phase part-time, with phases 1–3 doable in a long weekend.
Limits
- Inconsistent counts. The README says "13 lectures / 7 projects" and "all six course projects" in places, but 14 lectures and 8 projects in the outline and repo tree. Recently added material may not be reflected everywhere.
- No licence stated on the fetched page. Check the repo before reusing the templates or code.
- No measured results of its own. The course says projects "compare weak vs. strong harness results," but this page reports none.
- Not aimed at prompt-only or no-code users, by the course's own statement.
Organisations named here
- OpenAI
- Anthropic
- Claude Code
- OpenHands
Technologies named here
- Claude Code
- Opus 4.5
- Codex
- OpenHands
- Antigravity
- harness-creator
- audit-harness.sh
- VitePress
- Node.js
- TypeScript
- React
- Electron
- Git
- GitHub
- Google Antigravity
- Claude Opus 4.5
Techniques named here
- Harness engineering
- Loop engineering
- Graph engineering
- Progressive disclosure
- Session lifecycle management
- Feature-scoped task constraint
- Verification-gated completion
Related in coding-agents
