harness-evo: Agent Harness Evolution
An implementation of the Agent Harness Evolution . The system:
- watches a coding agent while it works,
- nudges it toward good engineering habits in the moment,
- grades the finished work at PR time on both the code and the development trace,
- uses the accumulated evidence to improve the harness itself, and measures each change against a baseline.
Claude Code is the first adapter. The core is harness-agnostic: it reads and writes one JSONL trace contract.
live loop (hooks) ──► .harness-evo/traces/<session>.jsonl ──► PR loop (CI) ──► labels
▲ │ │
└── nudge policy ◄── evolution loop (corpus · runner · stats · diagnose · experiments)
Install
As a Claude Code plugin (recommended)
The repo is its own plugin marketplace. You need Claude Code and any Python 3.9 or later; PyYAML is
bundled, so there is nothing to pip-install.
claude plugin marketplace add /path/to/evals-agent # or <owner>/<repo> once it is on a git host
claude plugin install harness-evo@harness-evo # add --scope project to enable it for one repo
or inside a session: /plugin marketplace add /path/to/evals-agent, then /plugin install harness-evo@harness-evo.
When you enable it, Claude Code asks for the plugin's settings. Change them later in /plugin.
| Setting | Values | Default | Effect |
|---|
strictness | observe / standard / strict | standard | observe logs only and never blocks. standard gates unverified stops (D4, D5) and denies destructive actions (D7); other detectors log only until proven. strict runs every detector at its full level. |
prompt_mode | text / hash | text | hash stores only a SHA-256 of each prompt. |
retention_days | 1 to 365 | 30 | Traces and session data older than this are deleted. |
pii_patterns | regexes | none | Redacted before anything is written, on top of the built-in secret patterns. |
trace_location | repo / user | repo | user keeps everything in ~/.local/share/harness-evo, so nothing is written into the repo. |
nudge_ab | true / false | false | Joins the nudges on/off experiment (harness-evo ab-report). |
A repo's own .harness-evo/nudge-policy.yaml overrides strictness. Privacy settings always combine to
the stricter value: hashing on either side wins, the shorter retention wins, and PII patterns from both
apply. harness-evo settings shows the effective values and where each came from.
To develop on the plugin itself, run claude --plugin-dir ./agent-harness-evolution.
Without the plugin
pip install -e . installs the CLI. Then harness-evo install --project-dir <repo> registers the hooks
in .claude/settings.local.json. User settings live in ~/.config/harness-evo/config.yaml, with the same
keys as above, and HARNESS_EVO_<KEY> environment variables override them.
When your organization blocks local plugin sources
Managed Claude Code policy (strictKnownMarketplaces) can block local marketplaces and
~/.claude/skills plugins. In that case, use a settings-file install, which needs no plugin system:
REPO=/path/to/evals-agent/agent-harness-evolution
ln -sfn "$REPO/bin/harness-evo" ~/.local/bin/harness-evo # any directory on your PATH
ln -sfn "$REPO/skills/harness-evo" ~/.claude/skills/harness-evo # personal skill: /harness-evo
harness-evo install --scope user --settings-only # 9 hooks into ~/.claude/settings.json
Settings go in ~/.config/harness-evo/config.yaml. Use trace_location: user for a user-scope
install: the hooks then run in every repo without writing into any of them.
To undo it: harness-evo uninstall --scope user, then remove the two links. The installer backs up
settings.json first and never overwrites an earlier backup.
Set up a repo
Hooks work in any repo with no setup. To make them precise, run harness-evo init. It detects pytest,
npm, yarn, pnpm, bun, go, cargo, maven and gradle, rspec, ruff, mypy, eslint and tsc, then writes a
starter .harness-evo/profile.yaml with the test commands and a guessed test_map (which tests cover
which source).
harness-evo init --dry-run # show what it would write
harness-evo init --git-hook # write it, and tag agent commits with Harness-Session trailers
Inside Claude Code, ask the skill to "set up harness-evo for this repo" (/harness-evo:harness-evo).
It walks you through the dry run and leaves the writes to you.
Commands