---
type: Concept
title: The Self-Refining Harness
description: The harness improves from its own run evidence — a detect → draft → PM-gate loop that turns evals, friction, and calibration data into concrete harness edits, bounded at the L3 ceiling so it never becomes L4 self-mutation.
tags: [harness, self-improvement, evals, friction, autonomy, context-engineering]
timestamp: 2026-07-01
---

# The Self-Refining Harness

**Situating context:** PMOS already frames the [agent as model + harness](/okf/core/concepts/agent-harness.md)
and already *collects* evidence about its own harness (`evals` defects, `v_friction_recurrence`,
transcripts, `eval-calibration.md`). What it lacked was a named pattern — and a procedure — for turning
that evidence back into harness improvements. This concept names it. It was extracted from the
2026-07-01 "Agent = Model + Harness" research (which found the field converging on *harness engineering*
as its own discipline, and "agents improving their own tools" as its highest-leverage loop) and it
informs the [harness-refine skill](/skills/harness-refine.skill), [D47](/okf/products/pmos/adr/d47-self-refining-harness.md),
and the [D23](/okf/products/pmos/adr/d23-quarterly-cadence.md) quarterly harness review.

## The pattern

`Agent = Model + Harness`. The model improves on someone else's schedule; **the harness is the part
PMOS controls**, so the harness is where PMOS's own improvement has to come from. A harness that only
grows by hand improves as fast as a human notices problems. A **self-refining harness** improves as fast
as it *runs*: every agent run leaves evidence, and that evidence is the raw material for the next
harness edit. This is what makes "Agent = Model + Harness" a **compounding** system rather than a static
wrapper — and it is the direct mechanism behind the north star (fewer repeated corrections, because the
harness edits away the causes of the last ones).

## The loop: detect → draft → PM-gate

The self-refining harness is the same shape as the OKF upkeep loop
([D36](/okf/products/pmos/adr/d36-okf-mirror-ci-enforced.md) → [D42](/okf/products/pmos/adr/d42-okf-author-on-demand.md)),
one level up — applied to the harness itself:

1. **Detect** — a deterministic signal shows a gap: a `v_friction_recurrence` theme with no resolving
   decision, a recurring `evals` defect class, a persistent `eval-calibration.md` disagreement, a
   context-budget signal.
2. **Draft** — the [harness-refine skill](/skills/harness-refine.skill) reads that evidence and
   drafts concrete, **evidence-cited** edits, each mapped to one artifact: an MCP tool description
   ([ACI](/build-skills/MCP-SPEC.md), D19), a skill body, an OKF concept, or an `AGENTS.md` heuristic.
   It **prunes** as readily as it adds (D23 / [prune the scaffolding](/PRINCIPLES.md)).
3. **PM-gate** — the edits land as a **PR under the human [Acceptance Gate](/okf/core/concepts/output-eval.md)**.
   The agent proposes; the PM disposes.

## Bounded at L3 — why this is not L4

A harness that rewrites itself on a schedule with no human in the loop is precisely the **L4
[silent-drift](/okf/core/concepts/watermelon-flag.md) failure mode** — a green gate over a quietly
deviating reality. The self-refining harness stays at the **L3 ceiling** by three bounds, locked in
[D47](/okf/products/pmos/adr/d47-self-refining-harness.md):

- **On-demand, never scheduled** — it acts when a PM invokes it or a signal fires, not on a clock.
- **Proposes, never applies** — it opens a PR; it never merges or self-approves.
- **Every edit traces to evidence** — a proposal with no run/friction/eval behind it is dropped, so the
  harness cannot drift on the agent's opinion.

Self-improvement and self-mutation are different things: the first proposes to a human, the second
decides alone. PMOS does the first.

## Relationship to the field

The 2026 literature names this the move from prompt- to context- to **harness engineering**, and credits
"agents improving their own tools" (refining tool descriptions and instructions from run transcripts)
with state-of-the-art coding results. PMOS's version is the disciplined one: the improvement is
*evidence-cited* and *PM-gated*, which avoids the self-evolving-memory risk class (an agent that rewrites
its own knowledge unbounded). See [harness-knowledge](/planning/research/harness-knowledge.md) for the
sources.

## Related

- [agent-harness](/okf/core/concepts/agent-harness.md) — what the harness is; the Summary Gate.
- [control-plane](/okf/core/concepts/control-plane.md) — why PMOS edits the harness, not the app.
- [output-eval](/okf/core/concepts/output-eval.md) — the Acceptance Gate this loop submits to.
- [watermelon-flag](/okf/core/concepts/watermelon-flag.md) — the L4 failure mode the L3 bounds prevent.
- Skill: [harness-refine](/skills/harness-refine.skill). Decision:
  [D47](/okf/products/pmos/adr/d47-self-refining-harness.md).
