Run a GEPA learning cycle via `metaharness learn` (upstream ADR-235, metaharness@0.3.0) — optimizes a harness genome against a SWE-bench-style slice manifest. $
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-harness-learn-b45bf1daab25 ,按照其中的说明把「harness-learn」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Surfaces metaharness learn — the upstream GEPA learning harness that
evolves harness policy genomes against a scored task corpus instead of
hand-editing prompts. Candidates are scored on held-out slices and only
measured winners promote (the shipped cand-6 genome is the first such
promotion: holdout gold 2/12 → 3/12, zero regressions).
harness-gepa --op render
to inspect what the promoted policy actually says.The learning harness (GEPA + SWE-bench + Docker) is too heavy for the npm
package, so learn needs a local clone:
git clone https://github.com/ruvnet/metaharness.git
node scripts/learn.mjs --repo ./metaharness --host claude-code --model haiku --slice slices/lite.json
Without a checkout the script emits {status: "checkout-required"} and
exits 0 — a precondition report, not an error (distinct from
degraded: true, which means the npm package itself is absent). The
managed-service path (gateway-side learn jobs, no checkout) is upstream's
ADR-235 follow-up and not available yet.
Implementation: scripts/learn.mjs.
--repo exists when given; export it as $METAHARNESS_REPO.metaharness binary (metaharness@~0.4.1, local install
or one-time versioned cache — never @latest): metaharness learn --host <h> --model <m> --slice <s> [--run] via _harness.mjs (graceful degradation,
hard timeout).--run — real runs on larger
slices need an explicit --timeout-ms matched to slice size × model cost.rawReport.--run is the ONLY path that spends. Everything else — dry-run, checkout
probe, degraded path — is $0. The MCP tool (metaharness_learn) has a 120s
subprocess budget; run real learning cycles from a terminal via
ruflo metaharness learn ... --run --timeout-ms <big>.
0 — report produced (or dry-run, checkout-required, degraded)1 — --alert-on-fail and the learn run reported failure2 — config error (bad --repo path)