bayshier

Harness Engineering — Git skill for Claude Code

Git community

企业级多 Agent 协同实战:Multi-Agent + Sandbox + 自我进化的 Skill — Kotlin reference implementation of the 5 components every serious agent harness needs (OODA loop, sandbox seam, git-versioned evolving skills, tas.

How to install Harness Engineering

This entry records only its repository, not the path inside it, so there is no exact command to give. Open bayshier/harness-engineering and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Harness Engineering does

企业级多 Agent 协同实战:Multi-Agent + Sandbox + 自我进化的 Skill — Kotlin reference implementation of the 5 components every serious agent harness needs (OODA loop, sandbox seam, git-versioned evolving skills, task DAG, budget guardrails). Runs offline.

Alternatives in Git

  • Analysis Claude Code — GitHub Repo stars Complete reverse engineering research and analysis of Claude Code v1.0.33 Reverse engineerin 35k ★
  • Claude Code Reverse — GitHub Repo stars Reverse Engineering Claude Code with LLMs Reverse engineering research 2.2k ★
  • GitHub Review PR — Use when a PR needs full review — resolves merge conflicts with the base first, then fixes CI failures, then a 1.5k ★

README

Harness Engineering

**企业级多 Agent 协同实战:Multi-Agent + Sandbox + 自我进化的 Skill** A Kotlin reference implementation of the five components every serious agent harness needs.

[![Kotlin](https://img.shields.io/badge/Kotlin-2.4.10-7F52FF?style=flat-square&logo=kotlin&logoColor=white)](https://kotlinlang.org) [![Tests](https://img.shields.io/badge/tests-9%2F9-3DDC84?style=flat-square)](#verified) [![Offline demo](https://img.shields.io/badge/demo-runs%20offline-3DDC84?style=flat-square)](#quick-start) [![License: MIT](https://img.shields.io/badge/License-MIT-3DDC84?style=flat-square)](LICENSE)


术语从哪来

"Harness Engineering" 的 canonical 出处是 **OpenAI 2026 年 2 月的工程博文**(Ryan Lopopolo, 《Harness Engineering: Leveraging Codex in an Agent-First World》),把 harness 定义为 **连接模型与工具、权限、环境的那一层**,并用 OODA 循环(Observe / Orient / Decide / Act) 刻画它。往前有 Anthropic 的《Effective Harnesses for Long-Running Agents》;往后有 Lilian Weng 的《Harness Engineering for Self-Improvement》、martinfowler.com 与 Addy Osmani 的同题文章。**framework 是你 import 的代码结构,harness 是围绕一个模型循环的生产运行时产品。**

反方观点同样值得刻在墙上(HumanLayer,394 分 HN):“harness engineering is not enough—— 模型训练问题不是脚手架能修的。” 本文实现不宣称相反。

五个组件,全部可运行

# 组件 依据 本仓库实现
1 显式 Agent 循环 + 事件 schema + token 记账 OpenAI/Anthropic:非结构化工具输出=“上下文腐烂”;多 Agent 的 token 消耗解释 80% 的结果方差 loop/Events.kt:结构化事件(ToolStart/Finish/Denied)+ TokenBudget 硬护栏,超限大声爆炸
2 可组合 Sandbox 接缝 + deny-then-escalate DSH 的沙箱设计文档:confine(argv, policy)、三档文件效果、一次批准升级、fail-closed sandbox/ProcessSandbox.kt:macOS Seatbelt / Linux bwrap 运行器链 + EscalationGate(一次机会,之后终拒)
3 Eval 门控的自进化 Skill + git 版本化 ECC(24 万★)的 observe→instinct、skill-creator 的 eval 门控重写、seed 的 git 版本化——git 是所有大项目都缺的那块 skills/EvolutionLoop.kt + SkillStore.kt:观察→本能(置信度)→ eval 门控 → 真实 git commit → 可 revert 回滚
4 Orchestrator-Worker + 任务 DAG + 文件工件 Anthropic 多 Agent 研究系统(+90.2%,但 15× token);“电话游戏”的修复=工件落盘不经过上下文 `team/Orch