Harness Engineering tutorial

Build the rules, skills, hooks and checks that make an AI coding agent do the right thing every time, then export them for your own repo.

Start the course

Course contents

Foundations

  1. Coding Agents — What an AI coding agent is, the read, plan, act, observe loop it runs, how you approve or deny its tool calls, and the two-line rules file that turns a guessing agent into a careful one.
  2. Failure Gallery — The one formula of this course, Agent = Model + Harness. Watch six real ways coding agents fail, tag each one as a guide gap or a sensor gap, and pick the harness part that fixes it for good.
  3. Rules Files — Why the agent only knows what is written in the repo, how one rules line fixes the wrong test command, and why a 600-line AGENTS.md gets half-ignored. You turn it into a short map that points into docs/.
  4. Agent Skills — Why an agent does the same job differently each time, and how a SKILL.md fixes it: a description that says when to load it, and steps that say how. You write a skill that loads on the right requests, stays quiet on decoys, and gets every step done.
  5. Tests and Linters — Why an agent says "done" while a team rule is broken, how a definition of done makes it run the checks first, and how a lint message that names the fix lets the agent repair its own mistake. Includes sensors for testing, UI, planning, APIs and CI.
  6. Hooks and Permissions — Rules are requests; hooks and permissions are walls. You watch an agent in a hurry with and without guards, write a guard config that blocks only the dangerous calls, see the same guards in Claude Code, Cursor and Codex, then check and download your v1 harness.

Long-Running Work

  1. Context Windows — Why an agent that works over many sessions forgets what it did, redoes finished work, and how a reset with a written handoff (progress.md and git log) beats a vague compacted summary. Covers context windows, context rot and task scheduling across sessions.
  2. Feature Lists — Why an agent with a big goal and no list calls the app done at 40%, and why a list without rules gets easier on its own. Build the initializer pack: init.sh, feature_list.json with every feature failing, a progress file and four rules lines.
  3. Incremental Sessions — Why an agent that does too much in one session runs out of room mid-feature and leaves a broken build, and how one feature per session plus a clean exit (green tests, a commit, nothing half-done, a progress note) keeps every session ready for the next.
  4. End-to-End Testing — Why green unit tests and a list full of "passes": true can still hide a feature that is never turned on, and how an end-to-end check in the passes rule (Playwright for the React frontend, HTTP tests for the ASP.NET Core backend) proves each feature works in the running app.
  5. Evaluator Agents — Why an agent that grades its own work passes everything, and how a separate evaluator with a concrete rubric catches skipped tests, rewritten descriptions, unrelated edits and features that never turn on. Covers the planner, generator and evaluator roles for frontend, backend and UI design reviews.

Scale and Maintain

  1. Subagents and MCP — Why big tool output pushes your rules out of the agent's context, and why an agent without a way to look things up guesses. You add a log-searching subagent and an MCP server, in Claude Code, Codex and Cursor, so the rules stay in view and the agent calls the real API.
  2. Architecture Tests — Why an agent takes a shortcut through your layers while every test stays green, how an architecture test turns a layer rule into a check that teaches the fix, and how a doc-gardening skill finds stale docs on a schedule without deleting them.
  3. Continuous Improvement — How to turn every agent mistake into one new check in the right layer, and how ablation (removing one part at a time and re-running every check) shows which parts of your harness carry weight and which only cost context.
  4. Capstone Project — Put the whole course into one harness. It must pass every part of the capstone check: single-session jobs, two five-session builds, the architecture test, the subagent and MCP server, and the harness lint. Then export it for Claude Code, Codex or Cursor and try it in your own repo.

Reference

  1. Cheat Sheet — One page to come back to: where each harness file lives in Claude Code, Codex and Cursor, the lab's budgets, hook events and guard files, lint formats, definition-of-done and long-task templates, the evaluator rubric, the architecture test, the gardening skill, a failure-to-fix table, a module index and a glossary.