harness-evolve
它能做什么
这项技能对 AI 运行框架运行演化流程,尝试其策略设置的各种变化,只推广得分更高的版本。适合希望依靠实测结果而非猜测来调整运行框架的团队。
适用场景
- ✓当运行框架得分低于目标,而你不知道是哪项设置的问题时。
- ✓当你想通过测试为新领域找到一个好的起始设置时。
- ✓当你想把手工调整的运行框架与演化出的版本进行比较时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的仓库中根据测试演化运行框架,并告诉我哪项改动提高了分数。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能检查输入和限制条件,打印计划,只有在你确认后才运行演化。每个变体在沙盒中打分,只有经过实测的胜者才会被推广。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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-scoreresult 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.
- Validate args (
--repoexists, caps on--generations≤ 50,--children≤ 20,--concurrency≤ 8, sandbox/selection/mutator are known values). - Without
--confirm: print plan + exit 0 (mirrorsharness-mintsafety convention; defense in depth over the upstreamsafety.tschecks). - With
--confirm: runmetaharness-darwin evolve <repo> ...from the installed@metaharness/darwin(pin in_darwin.mjs; one-time~/.ruflo/darwin-cache-<pin>install only if no installed copy qualifies — never npx) via the shared_darwin.mjsasync helper. Per-generation progress is forwarded to stderr; final champion JSON is captured from stdout. - Compute timeout from
generations × children × per-variant(per-variant ≈ 60s real, ≈ 2s mock). Caller may override with--timeout-ms. - Honor upstream exit code 99 — propagate as "safety-disqualified", do not
remap. This is a designed-in tripwire (a variant tripped
inspectVariantfor secrets / shell-out / network / dynamic-eval). See ADR-153 §"Safety model". - Optional
--alert-on-no-improvement: exit 1 when champion ≤ parent.
The seven mutation surfaces
| Surface | What it owns |
|---|---|
planner |
task decomposition / step ordering |
contextBuilder |
what gets fed into the prompt |
reviewer |
self-critique / output verification |
retryPolicy |
when + how to retry on failure |
toolPolicy |
which tools the agent may use, under which conditions |
memoryPolicy |
what to persist, recall, forget |
scorePolicy |
how 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/darwin@0.8.0):
metaharness-darwin evolve --jsonprints 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 `{
常见问题
它会在没有我批准的情况下运行吗?
不会。如果没有确认参数,这项技能只打印计划,不做任何改动。
设定了哪些限制?
来源将代数上限设为 50,子代数量上限设为 20,并发数上限设为 8。
它是为了修改 Ruflo 本身吗?
不是。说明中提到,Ruflo 的 CI 检查关注的是优雅降级,而不是自动自我修改。
详情
作者的原始描述
Run `@metaharness/darwin evolve {repo}`: mutate a harness's seven policy surfaces, sandbox-score each variant and promote only measured wins. Use when evolving a harness against its tests or a bench suite. Degrades gracefully without darwin (ADR-150/153).
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1647
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。