0H

001tmf/harness-forge

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

81 stars 质量 62 趋势 18MIT

把Claude代码变成自己的Meta-Harness——一项通过原生提案→分数→帕累托循环,围绕固定模型(记忆、检索、上下文、提示)进化脚手架的技能。

概览

Harness Forge 是一项 Claude 代码技能,运行端到端的过程——提出→评分→保持帕累托最佳→重复——以改进固定模型的代码:记忆、检索、上下文构建、总结、提示模板和工具选择逻辑。模型从不改变;支架逐渐完善。 它是Meta-Harness:模型框架端到端优化(Lee, Nair, Zhang, Lee, Khattab & Finn, 2026)中的方法之一。原始参考仓库包含~1,260行Python(claude_wrapper.py + meta_harness.py),其任务是驱动无头Claude:生成会话、解析输出、跟踪工具调用、记录一切、循环。因此Harness Forge只保留不可约域逻辑——一个廉价的评分器——并将整个外部循环表达为原生编排。整个搜索从~1,260变成了~75行。 提案者是变异算子。前沿是搜索记忆。

概述(AI 翻译)

将Claude代码变成自己的元架构——围绕固定模型原生演进脚手架。

-555)

束缚锻造是一项Claude代码技能,是端到端运行的 利用优化循环 — 提出→分数→保持帕累托最佳→重复——以改进 围绕固定模型编写代码:其内存、检索、上下文构建、摘要、提示 模板和工具选择逻辑。模型从不变;脚手架变得更好。

它是该方法的原生重实现 元束:模型束的端到端优化 (李、奈尔、张、李、哈塔布和芬恩,2026年)。原文 参考回收船 ~1,260 条 Python (claude_wrapper.py + meta_harness.py),其任务是驾驶无头的克劳德:生成一个 会话,解析输出,跟踪工具调用,记录一切,循环。在Claude代码里,那个 运行时已经作为一流工具存在。 因此 Harness Forge 只保留不可约域 逻辑——廉价的配乐器——并以本土编曲的形式表达整个外部循环。整体 搜索线数由~1,260变成~75行。


一张照片里的理念

提议者是突变算符。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Harness Forge is a Claude Code skill that runs an end-to-end harness-optimization loop — propose → score → keep the Pareto-best → repeat — to improve the code around a fixed model: its memory, retrieval, context construction, summarization, prompt templates, and tool-selection logic. The model never changes; the scaffolding gets better.

It is a native reimplementation of the method in Meta-Harness: End-to-End Optimization of Model Harnesses (Lee, Nair, Zhang, Lee, Khattab & Finn, 2026). The original reference repo ships ~1,260 lines of Python (claude_wrapper.py + meta_harness.py) whose job is to drive a headless Claude: spawn a session, parse its output, track tool calls, log everything, loop. Inside Claude Code, that runtime already exists as first-class tools. So Harness Forge keeps only the irreducible domain logic — a cheap scorer — and expresses the entire outer loop as native orchestration. The whole search becomes ~75 lines instead of ~1,260.


The idea in one picture

seed the frontier with the incumbent harness (the thing to beat)
repeat:
    PROPOSE   k candidate harness variants     ← parallel proposer agents write code
    VALIDATE  each imports / type-checks
    SCORE     each on a held-out-protected eval ← a $0, deterministic scorer
    FRONTIER  Pareto-merge: quality up, cost down, floor-respecting
final: score the frontier once on the untouched test split

The proposer is the mutation operator. The frontier is the search memory. The model is frozen throughout — which is exactly why this fits a fixed / off-the-shelf-API deployment, where you can’t change the weights and the gain has to come from the harness.

The paper’s headline result was +7.7 accuracy points at ~4× fewer context tokens on text classification — a pure harness-side win. Harness Forge reproduces that shape of result natively.


Why native?

claude_wrapper.py is a hand-rolled agent runtime. Claude Code is an agent runtime. So every orchestration piece has a native equivalent, and the Python driver becomes redundant:

Meta-Harness (Python) Harness Forge (native)
claude_wrapper.run() — drive a headless Claude Agent / agent() inside a Workflow
meta_harness.py outer loop a Workflow script (parallel / while)
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add 001tmf/harness-forge
新手?先看 mcpskill.org 教程 →