harness-bench
它能做什么
这项技能创建或验证一套基准测试集,即一组固定的任务,用于为 AI 运行框架的不同版本打分。适合进行演化实验、需要稳定可比分数的开发者。
适用场景
- ✓当你建立新的演化流程,需要一组固定任务来打分时。
- ✓当测试集应在每次改动后检查,然后再比较结果时。
- ✓当你将运行框架复制并分支到新领域,并希望分数能与原版比较时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-metaharness/skills/harness-bench/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我的代码仓库创建一套基准测试集,并检查它是否有效。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能调用 darwin 基准工具,从现有测试中创建测试集,或验证测试集文件。当某个任务格式有误时,验证会以错误结束。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Surfaces metaharness-darwin bench <create|verify> — the supporting verb
for harness-evolve --bench. Use when you want evolution scored against a
fixed corpus (independent of npm test) so champion fitness is comparable
across commits or across forks of the same harness.
When to use
- Setting up a new evolution pipeline for a repo whose
npm testis flaky, slow, or undersized — scaffold a deterministic bench suite once, then evolve against it repeatedly. - CI:
bench verifythe checked-in suite on every PR that touches it (cheap; ~5s). - Forking a harness to a new domain: copy and edit the suite to retarget the evaluation without losing comparability to the parent.
Algorithm
Implementation: scripts/bench.mjs.
--op create
- Resolve
--repopath; reject if missing. - Shell to
metaharness-darwin bench create <repo> [--out <suite.json>]. - Default output path:
<repo>/.metaharness/bench/suite.json(chosen by upstream). - Suite shape (per upstream): array of
{ input, expectedOutput, weight }tasks derived from existing test cases.
--op verify
- Resolve
--suitepath; reject if missing. - Shell to
metaharness-darwin bench verify <suite.json>. - Exit 1 if any task malformed (upstream's signal).
Output shape
{
"success": true,
"data": {
"op": "verify",
"taskCount": 42,
"wellFormed": true,
"durationMs": 870
}
}
Exit codes
| Code | Meaning |
|---|---|
| 0 | OK (or degraded — Darwin absent) |
| 1 | --op verify and suite malformed |
| 2 | Config error or upstream invocation failure |
Graceful degradation
When @metaharness/darwin is absent, emits the standard {degraded: true, reason: 'metaharness-darwin-not-available'} payload and exits 0.
常见问题
测试集由什么组成?
来源说明,它是一个任务列表,每个任务都有输入、预期输出和权重,由现有测试用例推导而来。
如果 darwin 包缺失怎么办?
这项技能会报告该功能不可用,而不会崩溃。
它会自己运行演化吗?
不会。它只创建或检查基准。由 harness-evolve 技能执行打分运行。
详情
作者的原始描述
Create (`bench create {repo}`) or verify (`bench verify {suite.json}`) a @metaharness/darwin bench suite, the fixed corpus `harness-evolve --bench` scores variants against. Use when preparing an evolution benchmark. Degrades gracefully without darwin.
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1645
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。