Harness gepa

From ruvnet/ruflo · View interactive version

Harness gepa is an AI agent skill from the GitHub repository ruvnet/ruflo. Load, validate or render a GEPA genome, or classify failure modes in a run transcript, via @metaharness/darwin/gepa. Use when inspecting or auditing a genome; use harness-evolve for sandbox-scored evolution. Degrades gracefully without darwin.

How to use this skill

Skill file

Surfaces the GEPA (genetic-evolution prompt-adaptation) library exports

from @metaharness/darwin/gepa. Unlike the other skills in this plugin

there is no CLI binary behind this — the script dynamic-imports the library

(local resolution first, versioned cache install as fallback) and calls the

subprocess-safe subset.

When to use

prompt a genome compiles to — read THAT, not the raw JSON, before

wiring a genome into a harness.

cand-6 genome (first holdout-confirmed cheap-tier promotion; provenance

ships in the package) or any genome file you point at.

on structural errors.

failure modes (GEPA's failure-class taxonomy) from a transcript array.

What is deliberately NOT here

gepaOptimize — the optimization loop takes an in-process

evaluate(candidate) callback ("bring your own evaluator") that cannot

cross a subprocess boundary. Two supported paths instead:

  1. Library consumers: import { gepaOptimize, loadCand6Genome } from '@metaharness/darwin/gepa'
  2. Sandbox-scored evolution: harness-evolve (darwin CLI evolve),

which pairs GEPA with its own sandbox evaluators.

Algorithm

Implementation: CODE0.

  1. import('@metaharness/darwin/gepa'); on MODULE_NOT_FOUND fall back to a

one-time npm install --prefix ~/.ruflo/darwin-cache-<pin> and import

the cached dist/gepa/index.js (versioned dir → pin bumps invalidate).

  1. Dispatch --op:

the validator instead of throwing in the loader)

  1. Emit one JSON object; exit 0 (or 1 under --alert-on-invalid, 2 on bad input).

Examples

node scripts/gepa.mjs --op genome                          # cand-6 + validation
node scripts/gepa.mjs --op render | jq -r .system         # what does cand-6 SAY?
node scripts/gepa.mjs --op validate --path my-genome.json --alert-on-invalid
node scripts/gepa.mjs --op analyze --transcript run.json

Exit codes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.