Source profileQuality 91/100

ruvnet/ruflo/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md

harness-evolve

Run `@metaharness/darwin evolve <repo>` to mutate a harness's seven policy surfaces (planner/contextBuilder/reviewer/retryPolicy/toolPolicy/memoryPolicy/scorePolicy), sandbox-score each variant, and promote only measured wins. The model is frozen; the harness evolves. Closes the loop ADR-150 opens (score+genome describe; evolve changes). Degrades gracefully when @metaharness/darwin is absent (ADR-150 + ADR-153 architectural constraints).

Source repository stars
69,312
Declared platforms
0
Static risk flags
0
Last source update
2026-08-24
Source checked
2026-08-25

Decision brief

What it does: where it fits

Run `@metaharness/darwin evolve <repo>` to mutate a harness's seven policy surfaces (planner/contextBuilder/reviewer/retryPolicy/toolPolicy/memoryPolicy/scorePolicy), sandbox-score each variant, and promote only measured wins. The model is frozen; the harness evolves.

Best for

  • A harness-score result is below target and you don't know which policy
  • You're seeding a harness for a new vertical and want to find a good
  • You're comparing your hand-tuned harness against an evolved baseline

Not for

  • For continuous background optimization. Darwin Mode is human-initiated.
  • For ruflo itself in CI. ADR-153 §5 explicitly rejects auto-evolving ruflo

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/ruvnet/ruflo --skill "plugins/ruflo-metaharness/skills/harness-evolve"
Safe inspection promptEditorial

Inspect the Agent Skill "harness-evolve" from https://github.com/ruvnet/ruflo/blob/e21aa352fdc80fd2d3cc4e83404a76a18d118b96/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md at commit e21aa352fdc80fd2d3cc4e83404a76a18d118b96. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    When to use

    A harness-score result is below target and you don't know which policy

    A harness-score result is below target and you don't know which policyYou're seeding a harness for a new vertical and want to find a goodYou're comparing your hand-tuned harness against an evolved baseline
  2. 02

    When NOT to use

    For continuous background optimization. Darwin Mode is human-initiated.

    For continuous background optimization. Darwin Mode is human-initiated.For ruflo itself in CI. ADR-153 §5 explicitly rejects auto-evolving ruflo- For continuous background optimization. Darwin Mode is human-initiated. Wire it into CI for one-shot exploration, not for autonomous self-modification. - For ruflo itself in CI. ADR-153 §5 explicitly rejects auto-evol…
  3. 03

    Algorithm

    Implementation: scripts/evolve.mjs.

    Validate args (--repo exists, caps on --generations ≤ 50, --childrenWithout --confirm: print plan + exit 0 (mirrors harness-mint safetyWith --confirm: shell to npx -y @metaharness/[email protected] metaharness-darwin evolve ...
  4. 04

    The seven mutation surfaces

    One mutation per variant. Multi-surface mutations are not allowed (causal attribution stays clean).

    One mutation per variant. Multi-surface mutations are not allowed (causal attribution stays clean).
  5. 05

    Output

    Reports land under /.metaharness/:

    Reports land under /.metaharness/:Skill stdout = JSON {success, data: {champion, plan, durationMs, improved}} (plus data.diagnosis when --diagnose is passed — see below).

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars69,312SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
ruvnet/ruflo
Skill path
plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md
Commit
e21aa352fdc80fd2d3cc4e83404a76a18d118b96
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Surfaces the upstream metaharness-darwin evolve CLI as a ruflo skill. The write layer that pairs with ADR-150's read layer (score / genome / mcp-scan / threat-model / oia-audit). Use when you have a harness whose readiness scores are flat and you want to discover which surface mutation moves them — without retraining the foundation model.

When to use

  • A harness-score result is below target and you don't know which policy surface is responsible.
  • You're seeding a harness for a new vertical and want to find a good starting configuration empirically rather than hand-tuning.
  • You're comparing your hand-tuned harness against an evolved baseline (treat darwin's champion as the strawman).

When NOT to use

  • For continuous background optimization. Darwin Mode is human-initiated. Wire it into CI for one-shot exploration, not for autonomous self-modification.
  • For ruflo itself in CI. ADR-153 §5 explicitly rejects auto-evolving ruflo — the CI gate verifies graceful degradation, not convergence.

Algorithm

Implementation: scripts/evolve.mjs.

  1. Validate args (--repo exists, caps on --generations ≤ 50, --children ≤ 20, --concurrency ≤ 8, sandbox/selection/mutator are known values).
  2. Without --confirm: print plan + exit 0 (mirrors harness-mint safety convention; defense in depth over the upstream safety.ts checks).
  3. With --confirm: shell to npx -y @metaharness/darwin@~0.8.0 metaharness-darwin evolve <repo> ... via the shared _darwin.mjs async helper. Per-generation progress is forwarded to stderr; final champion JSON is captured from stdout.
  4. Compute timeout from generations × children × per-variant (per-variant ≈ 60s real, ≈ 2s mock). Caller may override with --timeout-ms.
  5. Honor upstream exit code 99 — propagate as "safety-disqualified", do not remap. This is a designed-in tripwire (a variant tripped inspectVariant for secrets / shell-out / network / dynamic-eval). See ADR-153 §"Safety model".
  6. Optional --alert-on-no-improvement: exit 1 when champion ≤ parent.

The seven mutation surfaces

SurfaceWhat it owns
plannertask decomposition / step ordering
contextBuilderwhat gets fed into the prompt
reviewerself-critique / output verification
retryPolicywhen + how to retry on failure
toolPolicywhich tools the agent may use, under which conditions
memoryPolicywhat to persist, recall, forget
scorePolicyhow the agent grades its own output

One mutation per variant. Multi-surface mutations are not allowed (causal attribution stays clean).

Output

Reports land under <repo>/.metaharness/:

.metaharness/
  archive.json         # full lineage tree (sampling next gen draws from this)
  lineage.json         # parent→child edges only
  variants/<id>/       # per-variant code (kept for audit)
  runs/<id>/           # per-variant sandbox test output
  reports/winner.json  # final champion + score delta vs parent

Skill stdout = JSON {success, data: {champion, plan, durationMs, improved}} (plus data.diagnosis when --diagnose is passed — see below).

Failure diagnosis (--diagnose)

GEPA's key trick is natural-language failure diagnosis from execution traces feeding the next mutation — not just scalar fitness. --diagnose adds a modest slice of that: after the evolution completes, the losing / failed variants' transcripts are run through darwin's GEPA library ops (analyzeTranscript + classifyFailure, via the shared importGepa resolver in scripts/_darwin.mjs) and a diagnosis section is appended to the emitted JSON:

"diagnosis": {
  "available": true,
  "scope": "losing-variants",
  "variants": [
    { "id": "g1_v0", "transcripts": 2,
      "failureClasses": { "exploration-loop": 1, "edit-mechanics": 1 },
      "dominantClass": "exploration-loop" }
  ],
  "totals": { "exploration-loop": 1, "edit-mechanics": 1 }
}

Upstream shape caveats (verified against @metaharness/[email protected]):

  • metaharness-darwin evolve --json prints a TEXT leaderboard — the stdout carries no JSON and no transcripts. Per-variant run records live at <repo>/.metaharness/runs/<id>.json.
  • Those run records hold sandbox exec traces ({taskId, exitCode, stdout, stderr}), which are NOT GEPA {actionRaw, obs} transcripts. Diagnosis therefore uses GEPA-shaped transcripts when a run record embeds them (agent sandbox / future upstream), falls back to the champion's transcript, and otherwise emits diagnosis: {available: false, reason, traceSummary} where traceSummary is a mechanical per-variant tally (tasks / failed / timedOut / blockedActions).
  • --diagnose NEVER fails the run — any internal error degrades to {available: false, reason: "diagnosis-failed: ..."}.

Exit codes

CodeMeaning
0Evolved OK, or dry-run, or degraded (Darwin absent)
1--alert-on-no-improvement and champion did not beat parent
2Config error or evolution infrastructure failure
99Upstream "safety-disqualified" (PROPAGATED, not remapped)

Graceful degradation (ADR-150 constraint 3 + ADR-153)

When @metaharness/darwin is not installed, the script emits {degraded: true, reason: 'metaharness-darwin-not-available', hint: ...} and exits 0. ruflo continues to function. CI's no-metaharness-smoke.yml-style job asserts this path.

Frequently asked questions

What to verify before installation and use

What does the harness-evolve source document cover?

Run `@metaharness/darwin evolve <repo>` to mutate a harness's seven policy surfaces (planner/contextBuilder/reviewer/retryPolicy/toolPolicy/memoryPolicy/scorePolicy), sandbox-score each variant, and promote only measured wins. The model is frozen; the harness evolves.

How do I install harness-evolve?

The source record exposes this install command: npx skills add https://github.com/ruvnet/ruflo --skill "plugins/ruflo-metaharness/skills/harness-evolve". Inspect the command and pinned source before running it.