跳到正文
Skillpedia
测试81k · #1645

harness-bench

它能做什么

这项技能创建或验证一套基准测试集,即一组固定的任务,用于为 AI 运行框架的不同版本打分。适合进行演化实验、需要稳定可比分数的开发者。

适用场景

  • ✓当你建立新的演化流程,需要一组固定任务来打分时。
  • ✓当测试集应在每次改动后检查,然后再比较结果时。
  • ✓当你将运行框架复制并分支到新领域,并希望分数能与原版比较时。

技能链接

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-metaharness/skills/harness-bench/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-metaharness/skills/harness-bench/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 test is flaky, slow, or undersized — scaffold a deterministic bench suite once, then evolve against it repeatedly.
  • CI: bench verify the 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

  1. Resolve --repo path; reject if missing.
  2. Shell to metaharness-darwin bench create <repo> [--out <suite.json>].
  3. Default output path: <repo>/.metaharness/bench/suite.json (chosen by upstream).
  4. Suite shape (per upstream): array of { input, expectedOutput, weight } tasks derived from existing test cases.

--op verify

  1. Resolve --suite path; reject if missing.
  2. Shell to metaharness-darwin bench verify <suite.json>.
  3. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能