Karpathy Autoresearch + Anthropic / OpenAI / Martin Fowler Harness 深度融合的生产级长期自主 AI 编码研究员系统。
人类只写 program.md,AI 代理 24/7 自主研究、迭代、实验、自维护。
| 来源 | 核心贡献 | 融合角色 |
|---|---|---|
| Autoresearch (Karpathy) | 1 GPU + 1 文件 + 1 指标 + git 二元决策 + 5 分钟循环 | 内循环极致效率 |
| Anthropic Harness | Initializer + Coding Agent + progress.md + 干净交接 | 多会话状态持久 |
| OpenAI Harness Engineering | 仓库即记录系统 + 渐进式披露 + 不变式强制 + 垃圾回收 | 长期可维护性 |
| Martin Fowler Harness | 上下文工程 + 架构约束 + 周期性熵清理 | 系统自洁与质量守卫 |
fused-autoresearch/
├── AGENTS.md # 代理目录 + golden principles
├── program.md # 人类唯一输入
├── claude-progress.md # 进度日志 + 假设历史
├── results.tsv # 实验结果
├── experiment-log/ # 时间戳日志
├── docs/
│ ├── golden-principles.md # 黄金原则
│ └── architecture.md # 融合架构文档
├── core/
│ └── agent.py # 唯一可修改的核心文件
├── .github/workflows/
│ └── lint-and-gc.yml # 自动 linter + garbage-collect
├── prepare.py # 一次性初始化
└── harness.py # 多代理 Orchestrator
- Python 3.11+
- uv (推荐) 或 pip
- Git
# 1. 克隆仓库
git clone https://github.com/<your-username>/fused-autoresearch.git
cd fused-autoresearch
# 2. 运行初始化 (首次)
uv run prepare.py
# 3. 编辑你的研究计划
vim program.md
# 4. 启动 Harness (多代理编排)
uv run harness.py --init初始化完成后,Harness 自动进入循环:
- Research Agent 读取
program.md+claude-progress.md - 修改
core/agent.py-> 运行 5 分钟实验 - 二元决策:
git commit(改进) 或git reset(回退) - 更新
results.tsv和claude-progress.md - 每 10 轮触发 Garbage Collector Agent 清理熵
| 代理 | 职责 | 触发时机 |
|---|---|---|
| Initializer | 运行 prepare.py、创建文件、git init、写入 golden principles |
仅首次 |
| Research | 读取指令 -> 修改 1 文件 -> 跑实验 -> 二元决策 | 每轮循环 |
| Evaluator | 运行 linter、structural test、不变式检查 | 每次提交前 |
| Garbage Collector | 扫描熵、更新 docs、清理过时文件 | 每 10 轮/每天 |
- 可修改文件限制为 1 个 (
core/agent.py) - 单一量化指标 (val_bpb / eval score / test pass rate)
- 每次 handoff 必须通过 linter + structural test
- 每次 handoff 必须更新
claude-progress.md并保持仓库干净可运行