# Evolve Agent Harness

Evolves an agent harness in a sandboxed, safety-gated loop while the model stays fixed.

- Repository: https://github.com/ruvnet/RuView (101983 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ruvnet/RuView --skill evolve -g -a claude-code -y`
Codex: `npx skills add ruvnet/RuView --skill evolve -g -a codex -y`
Cursor: `npx skills add ruvnet/RuView --skill evolve -g -a cursor -y`
Gemini CLI: `npx skills add ruvnet/RuView --skill evolve -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add ruvnet/RuView`

## Description

Evolve this harness with Darwin Mode, frozen model, evolving harness (real, sandboxed, safety-gated).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# evolve, Darwin Mode self-improvement

`wifi-densepose-sar-harness` ships with **Darwin Mode** (`@metaharness/darwin`, ADR-070…146): the model
is frozen; the *harness* evolves. Each generation mutates ONE of the 7 surface files
(planner, contextBuilder, reviewer, retry/tool/memory/score policy), sandboxes each
child, scores it, and keeps only variants that *measurably* improve, building an
archive of successful descendants.

## Run it

```bash
npm run evolve        # real substrate: runs your test command per variant (deterministic mutator, no API key, no network)
npm run evolve:dry    # mock substrate: fast, fully offline, no test execution
```

Or directly:

```bash
npx metaharness-darwin evolve . --sandbox real --generations 3 --children 4
```

## Safety (secure by default)

- **Deterministic mutator** is the default, **no network, no API key, air-gapped**.
- Every mutation passes the `validateGeneratedCode` gate: no new imports, network,
  filesystem, shell, env access, or dependencies, pure refactor/tuning only.
- Mutations run in a **sandbox**; only variants that pass your tests are archived.
- Nothing is promoted without measured improvement (guard against Goodharting).

See `@metaharness/darwin` for selection strategies (`--selection`, `--crossover`,
`--curriculum`), statistical gates (`--fdr`, `--bench`), and the real-LLM mutator (library API).

## What the benchmarks taught us (measured, full SWE-bench Lite 300)

Defaults worth carrying into how you evolve and run this harness (full evidence + CIs in
`@metaharness/darwin`'s `LEARNINGS.md` / `bench/results/RESULTS.md`):

The rest: https://github.com/ruvnet/RuView/blob/HEAD/harness/wifi-densepose-sar/.claude/skills/evolve/SKILL.md
