Mental Models for the AI EconomyAI Development
Harness²: The Agent Harness That Rewrites Itself
A harness makes an agent reliable. A harness for the harness makes it get better: every correction is captured, promoted, enforced or deleted.
A harness is everything you wrap around a coding agent so it behaves like a teammate: standing instructions, permissions, hooks, tools and a verification loop. Most people build one, feel the improvement, and then freeze it. Six weeks later the file is stale, the agent is repeating last month’s mistakes and nobody remembers which rule was written for what.
The short from DIY Smart Code titled “Why your AI agent needs to rewrite its own rules” (tagged #harness2) names the next step. This is our longer version of that idea: the harness needs its own harness. Call it harness².
Harness² is a maintenance loop around your agent’s rules. Each correction is captured, classified, promoted to the cheapest layer that will actually hold it, and deleted when it stops being true. The agent may draft rule changes; a person approves them.
Why a static harness decays
Codebases move. Dependencies change, conventions drift, a deploy quirk gets fixed. Every rule in a memory file costs context on every session, and a contradicted rule is worse than none — it teaches the agent that the file is optional. A harness that only grows becomes noise. A harness that never grows keeps paying for the same mistake.
Every correction either repeats or retires
The model above shows the shape, not a measurement: promotion collapses repeat mistakes quickly, while pruning keeps the rule set from swelling into a context tax. The two dials work against each other only if you neglect one of them.
The loop
- Capture: when you correct the agent, it writes the correction down — what happened, what should have happened, which file.
- Classify: one-off, recurring pattern, or broken rule.
- Promote: recurring patterns go to memory or CLAUDE.md; rules the agent has broken go to a hook, because hooks run as code rather than as a request.
- Review: the agent proposes the edit as a diff. You approve it like any other change.
- Prune: on a cadence, the agent lists rules nothing has needed recently or that contradict the codebase, and proposes deletions.
Where does this correction belong?
Promote to memory / CLAUDE.md. A pattern. The second correction is the signal that the harness, not the model, is missing information.
Where it goes wrong
Self-approval. An agent that silently edits its own rules can relax its own constraints. Rule changes are diffs with a human signature, every time. Permissions and hooks protecting secrets or deploys should never be self-editable.
Rule inflation. Writing a rule for every hiccup is the same failure as never writing one, just slower. The promotion threshold — corrected twice — is the filter.
Vague rules. “Be careful with the database” is a mood. “Never run a migration without listing affected tables first” is testable. If you cannot tell whether a rule was followed, rewrite it.
What makes it better than a better prompt
Anthropic’s write-up on harnesses for long-running agents leans on persistent progress files and incremental, verifiable steps so each new session starts from recorded state rather than memory. Harness² applies the same discipline to the rules themselves: the lessons are recorded state, versioned in the repo, reviewed like code. Over time the harness becomes the most accurate document of how your project actually works.
A harness makes the agent reliable today. A harness for the harness is what keeps it reliable next quarter.
Sources and limits
Written October 20, 2026. Research dates describe the evidence, not a claim about current tool performance. The interactive models are illustrative; they do not predict an organization’s productivity.
Get the next essay the day it publishes.
A few a month, written from real builds. Unsubscribe in one click.

Performance marketing and search leader who builds — 15+ years in digital growth and product (AT&T/DirecTV, Microsoft, Employbridge, Site Impact), now running his own properties with AI. These essays are field notes from that loop: what AI actually changes about work, product, and the economics underneath. Based in South Florida.
- AI DevelopmentAI Development: Evidence Before Autonomy
A convincing demo is not a release gate. How to evaluate agent-built software, contain failure, and measure the whole delivery loop instead of the typing speed.
7 min read · interactive - AI DevelopmentThe Practice: Spec-Driven, Maker-Checker, Governed Scope
Two credible trials on AI coding point in opposite directions — 55.8% faster in one, 19% slower in the other. The difference isn't the model. It's the practice. Three patterns, with interactive math and cited data.
9 min read · interactive - AI DevelopmentLoop Engineering: The Definitive Field Guide
The leverage point in software has moved from writing prompts to designing the loops that prompt your agents. The complete field guide — Ralph, maker-checker, worktrees, AGENTS.md, memory, and MCP — from someone who runs these loops across a live portfolio.
24 min read - AI DevelopmentThe Agent Harness — Setting Up Claude Code Like You Mean It
An AI coding model on its own is a brilliant intern with amnesia. The harness — twelve parts of configuration, rules, and checks you wrap around it — turns it into a teammate you'd put on a real codebase.
Interactive deck · 14 slides - AI EconomicsWhen Code Is Cheap, What Still Protects a SaaS?
AI lets anyone clone a feature over a weekend. The moats that remain are data, workflow, distribution and trust—and you can audit yours in two minutes.
8 min read · interactive - Product StrategyAgent Evaluation: The Demo Worked. Can You Ship It?
A product leader's release contract for AI agents: representative tasks, final-state checks, critical failure gates and monitored pilots—with a reliability microscope and an interactive release desk.
9 min read · interactive