OpenAI 利用工程仓库初始化支架,支持代理优先开发。支持 Claude Code、Codex、Cursor。
概览
用OpenAI的利用工程支架,启动任何仓库,支持以代理优先开发。 这就是线束工程的本质。运行时反馈循环、代理审查环路和可观测集成都不在范围内。 通过8个阶段将仓库转变为代理准备环境: 1. 工程师成为环境设计师——定义约束,而非实现 2.给代理地图,而非百科全书——AGENTS.md~100行,渐进披露 3.如果代理看不到,那它就不存在——所有知识在仓库中机器可读 4.机械执行架构,而非通过标记价 — 使用模板和测试,而非散文 5.无聊技术获胜 — 可组合、稳定、训练良好的 API。熵管理是垃圾回收 — 定期扫描捕捉漂移 7.吞吐量变化融合理念 — 最小阻塞门槛 8.代理间代码审查 — 人类仅在判断时介入 重启Claude代码。
概述(AI 翻译)
用OpenAI的利用工程支架,启动任何仓库,支持以代理优先开发。
范围: 这是线束工程中的仓库初始化子集。运行时反馈循环、代理审查循环和可观测性集成不在范围内。
它的作用
通过8个阶段将仓库转变为代理准备环境:
| 相位 | 什么 |
|---|---|
| 0. 发现 | 检测栈、地图架构、识别层、注入动态上下文 |
| 1. AGENTS.md | ~100线方向地图(索引,非百科全书) |
| 2. 文档/ | 记录系统:architecture/LAYERS.md + golden-principles/ + SECURITY.md + guides/ |
| 3. 测试 | 带棘轮机构的架构边界测试 |
| 4. 线条处理 | 错误消息中的带修复的导入限制规则 |
| 5. CI | 并行lint + typecheck + test + build pipeline |
| 6. GC | 垃圾回收脚本 + 定时每周扫描 |
| 7. 钩子 | 预提交执行 |
核心原则(来自OpenAI)
- 工程师成为环境设计师——定义约束,而非实现
- 给代理一张地图,而不是百科全书——AGENTS.md~100行,逐步披露
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
harness-init
Bootstrap any repository with OpenAI’s harness engineering scaffolding for agent-first development.
Scope: This is the repo initialization subset of harness engineering. Runtime feedback loops, agent review loops, and observability integration are out of scope.
What It Does
Transforms a repository into an agent-ready environment through 8 phases:
| Phase | What |
|---|---|
| 0. Discovery | Detect stack, map architecture, identify layers, inject dynamic context |
| 1. AGENTS.md | ~100-line orientation map (index, not encyclopedia) |
| 2. docs/ | System of record: architecture/LAYERS.md + golden-principles/ + SECURITY.md + guides/ |
| 3. Testing | Architecture boundary test with ratchet mechanism |
| 4. Linting | Import restriction rules with remediation in error messages |
| 5. CI | Parallel lint + typecheck + test + build pipeline |
| 6. GC | Garbage collection scripts + scheduled weekly scan |
| 7. Hooks | Pre-commit enforcement |
Core Principles (from OpenAI)
- Engineers become environment designers — define constraints, not implementations
- Give agents a map, not an encyclopedia — AGENTS.md ~100 lines, progressive disclosure
- If agents can’t see it, it doesn’t exist — all knowledge machine-readable in repo
- Enforce architecture mechanically, not via markdown — linters and tests, not prose
- Boring technology wins — composable, stable, well-trained-on APIs
- Entropy management is garbage collection — periodic scans catch drift
- Throughput changes merge philosophy — minimal blocking gates
- Agent-to-agent code review — humans intervene only for judgment calls
Installation
Claude Code CLI (recommended)
claude plugin marketplace add https://github.com/Gizele1/harness-init.git
claude plugin install harness-init@harness-init
Restart Claude Code. The /harness-init command and skill will be available in all projects.
Claude Code settings.json (alternative)
Add to your ~/.claude/settings.json:
{
"extraKnownMarketplaces": {
"harness-init": {
"source": {
"source": "git",
"url": "https://github.com/Gizele1/harness-init.git"
}
}
},
"enabledPlugins": {
"harness-init@harness-init": true
}
}
Then restart Claude Code.
Claude Code (manual copy)
# Clone and copy skill + references to project-level skills
rm -rf /tmp/harness-init 2>/dev/null; git clone --depth 1 https://github.com/Gizele1/harness-init.git /tmp/harness-init
mkdir -p .claude/skills/harness-init/references
cp /tmp/harness-init/skills/harness-init/SKILL.md .claude/skills/harness-init/
cp /tmp/harness-init/skills/harness-init/references/*.md .claude/skills/harness-init/references/
rm -rf /tmp/harness-init
OpenAI Codex
# Clone and copy to Codex skills directory
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add gizele1/harness-init