harness-learn
它能做什么
这项技能运行一个学习过程,根据一组有评分的软件任务调整运行框架的策略。适合希望实现可衡量的改进、并准备设置本地代码副本的团队。
适用场景
- ✓当运行框架的提示词在某一类任务上表现不佳,你希望进行可衡量的改进时。
- ✓当你想在投入费用之前先预估学习运行的成本时。
- ✓当学习运行推广了新设置,你想检查它时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-metaharness/skills/harness-learn/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请先为我的运行框架预估一次学习运行的成本,只有在我确认后才真正运行。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能先检查 metaharness 代码副本是否存在,然后运行学习脚本。默认是试运行,它会确定任务列表并报告成本,但不调用模型。真正运行需要明确的选项。
技术内容(原始 SKILL.md)
作者在 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).
When to use
- A harness's policy prompt underperforms on a task family and you want a measured improvement loop rather than manual prompt iteration.
- Pricing a learning run before committing spend — the default dry-run resolves the slice manifest and reports cost without any model calls.
- After a learn run promotes a genome: pair with
harness-gepa --op renderto inspect what the promoted policy actually says.
Preconditions (upstream design)
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.
Algorithm
Implementation: scripts/learn.mjs.
- Validate
--repoexists when given; export it as$METAHARNESS_REPO. - Invoke the pinned
metaharnessbinary (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). - Default timeouts: 120s dry-run, 600s with
--run— real runs on larger slices need an explicit--timeout-msmatched to slice size × model cost. - Detect the checkout-required message → structured payload, exit 0.
- Parse the trailing JSON report when upstream emits one; otherwise return
the raw report text under
rawReport.
Cost note
--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>.
Exit codes
0— report produced (or dry-run, checkout-required, degraded)1—--alert-on-failand the learn run reported failure2— config error (bad--repopath)
常见问题
试运行要花钱吗?
默认的试运行不调用模型,因此不会产生模型费用。
运行之前我需要什么?
需要 metaharness 项目的本地克隆。没有的话,这项技能会报告需要先有代码副本。
这里有托管服务吗?
没有。来源说明,托管服务路径目前不属于这项技能的一部分。
详情
作者的原始描述
Run a GEPA learning cycle via `metaharness learn`, optimizing a harness genome against a SWE-bench-style slice. Use when training a harness genome. $0 dry-run by default; `--run` opts into spend. Needs a metaharness checkout (--repo or $METAHARNESS_REPO).
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1650
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。