24 KiB
Note
本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
English · 原始项目 · 上游 README
原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
Compound Engineering
让每一次工程工作都比上一次更轻松的 AI 技能。
理念
每一次工程工作都应让后续工作变得更轻松——而不是更困难。
传统开发会累积技术债。每个功能都会增加复杂度。每次修 bug 都会留下一点本地知识,后来还得有人重新发现。代码库越来越大,上下文越来越难把握,下一次改动也就越来越慢。
复合工程(Compound Engineering)扭转了这一局面。80% 花在规划与评审上,20% 花在执行上:
- 写代码前用
/ce-brainstorm和/ce-plan充分规划,产出一份基于就绪度(readiness)的规划产物 - 通过
/ce-code-review和/ce-doc-review评审,发现问题并校准判断 - 用
/ce-compound将知识编码化,以便复用 - 保持高质量,让后续改动更容易
重点不在形式,而在杠杆。好的头脑风暴能让计划更锐利。好的计划能让执行更小。好的评审能抓住模式,而不只是抓住 bug。好的复合笔记意味着下一个 agent 不必从零再学同一课。
了解更多
工作流
核心循环共六步:头脑风暴(brainstorm)需求、规划(plan)实现、执行(work)计划、简化(simplify)所写内容、评审(review)结果,然后复合(compound)所学——并以更好的上下文重复。
| Skill | 用途 |
|---|---|
/ce-brainstorm |
交互式问答,在规划前思考功能或问题,并撰写仅含需求的统一计划 |
/ce-plan |
将功能想法或仅含需求的计划充实为可实施的规划 |
/ce-work |
使用 worktree 和任务跟踪执行可实施的规划 |
/ce-simplify-code |
在评审前精炼新写代码,提升清晰度与可复用性 |
/ce-code-review |
合并前对照计划进行多 agent 评审 |
/ce-compound |
将所学沉淀到 docs/solutions/,让下一轮循环更聪明地开始 |
每一轮都会复合:/ce-compound 写下所学,供下一轮 /ce-brainstorm 和 /ce-plan 作为 grounding 读取——头脑风暴让计划更锐利,计划反哺未来计划,评审发现更多问题,模式被文档化。这条回馈箭头才是要点。
附加技能
它们围绕循环存在,或按需取用——并非每轮循环都需要。
| Skill | 何时使用 |
|---|---|
/ce-ideate |
循环之前,当你还不知道要构建什么时——生成并严格排序有依据的想法,然后将最强候选路由到 /ce-brainstorm |
/ce-strategy |
上游锚点——创建并维护 STRATEGY.md,供 ideate、brainstorm 和 plan 作为 grounding 读取,使战略选择流入每个功能 |
/ce-product-pulse |
外环——关于用户实际体验(使用、性能、错误)的按时间窗口报告,保存到 docs/pulse-reports/;其后续行动反馈到构思与头脑风暴 |
/ce-debug |
替代 brainstorm -> plan -> work,当输入是 bug 而非功能时——复现、追溯根因、修复,然后在适当时于 PR 交接前打磨/评审 |
/ce-pov |
按需,在提交之前——对是否采用、切换或重新审视外部技术、库、模式或平台给出果断、基于项目的裁决;可冷启动或会话中途使用,并根据裁决提出下一步(/ce-plan、/ce-brainstorm,或 spike) |
/ce-explain |
按需,持续学习——将概念、diff、想法或「我这周做了什么?」转化为为你个人撰写的密集可视化讲解,并可选加入巩固环节(diff 的预测-揭示、纠错练习) |
完整目录及各技能如何串联,见 docs/skills。完整清单见下文。
快速示例
寻找方向——当你还没有具体想法时,先 ideate,再将最强幸存者带入循环:
/ce-ideate new drawing tools
/ce-ideate surprise me
/ce-ideate github issues # ground ideas in your open issues instead of a prompt
/ce-ideate 先做功课(代码库、过往所学、网上先例,可选你的 issue tracker),然后交给你一组有依据的排序候选,供带入 /ce-brainstorm。
标准功能循环——将粗略想法变为已交付、已评审的代码:
/ce-brainstorm make background job retries safer
/ce-plan
/ce-work
/ce-simplify-code
/ce-code-review
/ce-compound
简化代码——在新实现之后使用,或指向持续拖慢改动的代码:
/ce-simplify-code
/ce-simplify-code simplify the code in my most-churned file
第一轮在评审前收紧近期分支改动。定向 pass 适用于某个文件不断吸收无关修复、后续跟进或合并冲突的情况。
调试 bug——当你从异常行为而非功能出发时:
/ce-debug the checkout webhook sometimes creates duplicate invoices
/ce-code-review
/ce-compound
自主运行——交接一个功能,让 agent 跑完整条流水线:
/ce-brainstorm describe the feature
/lfg
/lfg 免手操作跑完整循环:规划、执行计划、简化、运行代码评审并应用修复、运行浏览器测试、提交、推送、开 PR,然后盯 CI 并修复失败直至变绿。在 /ce-brainstorm 之后启动,以便对照真实需求规划,而非一行提示。它是标准循环的自动驾驶版——想暂时离开、回来时看到已打开且 CI 全绿的 PR 时很合适。
入门
安装后,在任意项目中运行 /ce-setup。它会检查仓库本地配置、报告可选工具能力,并帮助将机器本地的 CE 设置安全地 gitignore。
compound-engineering 插件目前提供 30 个技能和 0 个独立 agent。专项评审、研究与工作流行为内置于所属技能,作为技能本地 prompt 资产。
完整技能清单
| Skill | 用途 |
|---|---|
/ce-strategy |
创建或维护 STRATEGY.md |
/ce-ideate |
生成并严格评估有依据的想法 |
/ce-pov |
对外部输入形成果断、基于项目的裁决 |
/ce-explain |
将概念、diff、想法或你自己工作的一段窗口解释为你的个人学习产物 |
/ce-brainstorm |
探索需求并撰写体量合适的 requirements doc |
/ce-plan |
创建结构化实施计划 |
/ce-work |
系统化执行实施计划 |
/ce-code-review |
使用技能本地评审者 persona 评审代码 |
/ce-doc-review |
评审需求与计划文档 |
/ce-debug |
复现失败、追溯根因、修复 bug,并为非平凡修复准备 PR |
/ce-compound |
记录已解决问题以复合团队知识 |
/ce-compound-refresh |
刷新陈旧或漂移的所学 |
/ce-optimize |
运行迭代优化循环 |
/ce-product-pulse |
生成按时间窗口的产品脉搏报告 |
/ce-riffrec-feedback-analysis |
将 Riffrec 录音或笔记转化为结构化反馈 |
/ce-sweep |
扫描反馈来源、跟踪条目生命周期,并输出 /lfg-ready 计划 |
/ce-resolve-pr-feedback |
处理 PR 评审反馈 |
/ce-commit |
创建带清晰信息的 git commit |
/ce-commit-push-pr |
提交、推送并打开 PR,讲解变更新引入的任何概念 |
/ce-babysit-pr |
盯守已打开的 PR 并推动其走向合并,随评审评论与 CI 到达而响应 |
/ce-worktree |
确保工作在隔离的 git worktree 中进行 |
/ce-promote |
起草面向用户的公告文案 |
/ce-test-browser |
对 PR 影响的页面运行浏览器测试 |
/ce-test-xcode |
在模拟器上构建并测试 iOS 应用 |
/ce-setup |
诊断可选工具能力与项目配置 |
/ce-simplify-code |
简化近期代码改动 |
/ce-polish |
启动开发服务器并迭代 UX 打磨 |
/ce-proof |
创建、编辑并分享 Proof 文档 |
/ce-dogfood |
对活跃分支进行免手操作的 diff 范围浏览器 QA,并自主修复 |
/lfg |
完整自主工程工作流 |
安装
Claude Code
/plugin marketplace add EveryInc/compound-engineering-plugin
/plugin install compound-engineering
已经安装过 Compound Engineering? Compound Engineering 已迁移为根目录原生(root-native)布局。更新前必须先刷新 marketplace — 参见已有安装。仅运行
/plugin update会让你停留在旧版本。
Cursor
在 Cursor Agent 聊天中,从插件 marketplace 安装:
/add-plugin compound-engineering
或在插件 marketplace 中搜索 "compound engineering"。
Codex App
Compound Engineering 尚未列入 Codex 内置插件 marketplace。请将其添加为自定义 marketplace:
-
在 Codex 应用中,从侧边栏打开 Plugins。
-
点击 Add / Add plugin marketplace。
-
填写:
Field Value Source EveryInc/compound-engineering-pluginGit ref mainSparse paths leave blank -
点击 Add marketplace。
-
选择 Compound Engineering,安装 compound-engineering,然后重启 Codex。
Codex 应用安装对 Compound Engineering 而言是自包含的。专家 reviewer 与研究行为内置于 skills 中,作为本地 prompt 资源;无需单独安装 custom-agent 步骤。
Codex CLI
注册 marketplace,然后安装插件。
-
向 Codex 注册 marketplace:
codex plugin marketplace add EveryInc/compound-engineering-plugin -
安装插件:
codex plugin add compound-engineering@compound-engineering-plugin你也可以启动
codex,运行/plugins,找到 Compound Engineering marketplace,选择 compound-engineering 插件,然后选择 Install。安装完成后重启 Codex。
原生 Codex 插件安装对 Compound Engineering 而言是自包含的。专家 reviewer 与研究行为内置于 skills 中,作为本地 prompt 资源;无需单独安装 custom-agent 步骤。
对于非默认 Codex profile,请针对同一 CODEX_HOME 执行所有与 Codex 相关的步骤。以下示例将 CE 安装到 work profile:
CODEX_HOME="$HOME/.codex/profiles/work" codex plugin marketplace add EveryInc/compound-engineering-plugin
CODEX_HOME="$HOME/.codex/profiles/work" codex plugin add compound-engineering@compound-engineering-plugin
marketplace 步骤仅使插件可用;插件安装才会为该 profile 激活原生 CE skills。
Kimi Code CLI
Kimi Code CLI 可直接从本仓库安装 Compound Engineering,因为仓库提供了原生 .kimi-plugin/plugin.json manifest:
/plugins install https://github.com/EveryInc/compound-engineering-plugin
你也可以通过 Kimi 的自定义 marketplace 流程浏览:
/plugins marketplace https://raw.githubusercontent.com/EveryInc/compound-engineering-plugin/main/.kimi-plugin/marketplace.json
安装或更新后,运行 /reload 或开启新的 Kimi 会话,以加载插件 skills。
Cline
Cline 从按需加载的 SKILL.md 目录中加载 CE skills。在 Cline 扩展中启用 Settings -> Features -> Enable Skills,然后将本仓库的 skills 全局或按项目链接:
git clone https://github.com/EveryInc/compound-engineering-plugin
./compound-engineering-plugin/.cline/scripts/install-skills.sh --global
从 checkout 按项目安装:
./compound-engineering-plugin/.cline/scripts/install-skills.sh --project
安装或更新 skills 后,请开启新的 Cline 任务。有关固定版本、本地开发与卸载步骤,参见 .cline/INSTALL.md。
Grok Build CLI(grok)
xAI 的 Grok Build CLI (grok) 可直接从本仓库安装 Compound Engineering — 仓库根目录是有效的 Grok 插件(grok 会读取现有的 Claude 兼容 manifest,仓库也提供了原生 .grok-plugin/plugin.json):
grok plugin install EveryInc/compound-engineering-plugin
该方式跟踪仓库;运行 grok plugin update 可拉取最新版本。若要以 marketplace 源方式浏览,仓库提供了原生 .grok-plugin/marketplace.json:
grok plugin marketplace add EveryInc/compound-engineering-plugin
grok plugin install compound-engineering
两种路径都直接跟踪仓库(无 commit pin),因此无需 Bun 安装步骤。添加 --trust 可跳过安装确认。grok 将配置存储在 ~/.grok 下;安装后请开启新会话以加载 skills。
Compound Engineering 也正在提交至官方 xAI plugin marketplace; 维护者操作手册见 docs/grok-marketplace-submission.md。
Devin CLI
Devin CLI 可直接从 GitHub 安装 Compound Engineering,因为仓库提供了原生 .devin-plugin/plugin.json manifest:
devin plugins install EveryInc/compound-engineering-plugin
验证安装并检查 skills:
devin plugins list
devin plugins info compound-engineering
使用 devin plugins update compound-engineering 更新到最新版本。插件在会话启动时加载,因此安装或更新后请开启新的 Devin 会话,skills 才会出现(以 /compound-engineering:<skill> slash 命令形式)。
部分 skills 声明了 Devin 不映射的 Claude 风格 allowed-tools 名称(例如 Bash);这些 skills 仍可使用,但其部分操作会请求权限,而非自动批准执行。详情参见 docs/specs/devin.md。
GitHub Copilot
对于 VS Code Copilot Agent Plugins:
- 在 VS Code 命令面板中运行
Chat: Install Plugin from Source - 将
EveryInc/compound-engineering-plugin用作仓库 - 当 VS Code 显示本仓库中的插件时,选择
compound-engineering
对于 Copilot CLI,使用:
在 Copilot CLI 内:
/plugin marketplace add EveryInc/compound-engineering-plugin
/plugin install compound-engineering@compound-engineering-plugin
在已安装 copilot 二进制文件的 shell 中:
copilot plugin marketplace add EveryInc/compound-engineering-plugin
copilot plugin install compound-engineering@compound-engineering-plugin
Copilot CLI 会读取现有的 Claude 兼容插件 manifest,因此无需单独的 Bun 安装步骤。
Factory Droid
在已安装 droid 二进制文件的 shell 中:
droid plugin marketplace add https://github.com/EveryInc/compound-engineering-plugin
droid plugin install compound-engineering@compound-engineering-plugin
Droid 使用 plugin@marketplace 插件 ID;此处 compound-engineering 是插件,compound-engineering-plugin 是 marketplace 名称。Droid 会安装现有的 Claude Code 兼容插件,并在安装时自动转换格式,因此无需 Bun 安装步骤。
Qwen Code
qwen extensions install EveryInc/compound-engineering-plugin:compound-engineering
Qwen Code 可直接从 GitHub 安装 Claude Code 兼容插件,并在安装时转换插件格式,因此无需 Bun 安装步骤。
OpenCode
在全局或项目级 opencode.json 的 plugin 数组中添加 Compound Engineering:
{
"plugin": ["compound-engineering@git+https://github.com/EveryInc/compound-engineering-plugin.git"]
}
修改配置后重启 OpenCode。OpenCode 插件会直接注册 Compound Engineering skills 目录;无需 Bun 安装器或生成的 skill 副本。固定版本示例参见 .opencode/INSTALL.md。
Pi
从本仓库将 Compound Engineering 安装为 Pi 包:
pi install git:github.com/EveryInc/compound-engineering-plugin
对于会调度 reviewer、research 或 implementation 子代理(subagent)的 CE 工作流,所需配套组件:
pi install npm:pi-subagents
推荐搭配使用,以获得更丰富的阻断式提问体验:
pi install npm:pi-ask-user
Antigravity CLI (agy)
Google 已用 Antigravity CLI (agy) 取代面向消费者的 Gemini CLI,后者仍运行在 Gemini 模型上。可直接从 GitHub 安装 Compound Engineering —— 无需克隆步骤:
agy plugin install https://github.com/EveryInc/compound-engineering-plugin
使用 agy plugin list 进行验证。仓库根目录即为插件包(plugin.json 加上 skills/)。
若需本地检出或固定版本发布:
git clone https://github.com/EveryInc/compound-engineering-plugin
agy plugin install ./compound-engineering-plugin
捆绑的 .agy/ 目录仍作为兼容性入口(agy plugin install ./compound-engineering-plugin/.agy)。agy 也会从该检出加载 GEMINI.md 工作区上下文。
有关固定版本、本地开发、卸载及旧版 Gemini 导入,请参阅 .agy/INSTALL.md。
已有安装
Compound Engineering 已迁移为根目录原生、仅含 skills 的布局。已有的 marketplace 安装会保留一份缓存的 marketplace 快照,该快照仍指向旧的 plugins/compound-engineering 路径,因此单独更新插件会读取这份过期快照,使你停留在旧版本。请先刷新缓存的 marketplace,再更新插件 —— 顺序很重要。
Claude Code
/plugin marketplace update compound-engineering-plugin
/plugin update compound-engineering
Codex CLI
codex plugin marketplace upgrade compound-engineering-plugin
codex plugin add compound-engineering@compound-engineering-plugin
没有 codex plugin update;重新运行 add 会从刷新后的快照重新安装。若使用非默认 profile,请对同一 CODEX_HOME 执行上述两条命令。
Codex App
从 Plugins 面板刷新 marketplace(若无刷新控件,则移除并重新添加 EveryInc/compound-engineering-plugin marketplace),然后重新安装 compound-engineering 并重启 Codex。
若你配置的主机使用了 plugins/compound-engineering 下的直接路径或 sparse path,请编辑或重新安装该源,使其指向仓库根目录且不设置 sparse path。
若先前通过 Bun 安装的副本仍在覆盖原生插件 skills,请在本仓库的检出目录中运行当前的清理命令:
git clone https://github.com/EveryInc/compound-engineering-plugin.git /tmp/compound-engineering-plugin-cleanup
cd /tmp/compound-engineering-plugin-cleanup
bun install
bun run cleanup --target all
本地开发
bun install
bun test
bun run release:validate
从本地检出
进行活跃开发时,请在你希望测试的 harness 中直接加载此检出。
Claude Code
claude --plugin-dir "$PWD"
Codex App
在应用的 Add plugin marketplace 表单中,将此检出作为源:
| Field | Value |
|---|---|
| Source | /path/to/compound-engineering-plugin |
| Git ref | 当前分支,或本地文件夹留空 |
| Sparse paths | 留空 |
Codex CLI
codex plugin marketplace add "$PWD"
codex plugin add compound-engineering@compound-engineering-plugin
若希望将本地测试与常规 Codex profile 隔离,请使用单独的 CODEX_HOME。Codex marketplace 条目指向公共 Git 插件源,以便根目录形态的插件仓库能正确安装;端到端测试未发布的插件内容变更时,请使用带有 source.url 和 ref 的临时 marketplace 目录。
Kimi Code CLI
在 Kimi Code CLI 内:
/plugins install /path/to/compound-engineering-plugin
若要测试本地 marketplace 目录,请传入目录路径:
/plugins marketplace /path/to/compound-engineering-plugin/.kimi-plugin/marketplace.json
Cline
/path/to/compound-engineering-plugin/.cline/scripts/install-skills.sh --global
在 Cline 扩展中启用 Settings -> Features -> Enable Skills,然后启动新任务。
Devin CLI
devin plugins install /path/to/compound-engineering-plugin
本地安装会链接到检出目录而非复制,因此修改 skill 后无需重新安装,下次 Devin 会话即可生效。
OpenCode
{
"plugin": ["/path/to/compound-engineering-plugin"]
}
修改 opencode.json 后请重启 OpenCode。
Pi
pi -e "$PWD"
Antigravity CLI (agy)
agy plugin install "$PWD"
agy plugin validate "$PWD"
或安装捆绑的 .agy/ 入口:
agy plugin install "$PWD/.agy"
有关远程安装与固定版本示例,请参阅 .agy/INSTALL.md。
限制
OpenCode 和 Pi 使用本仓库的原生包/插件加载方式。Bun CLI 仍用于仓库开发与转换器维护,而非日常安装。
发布版本由发布自动化管理。常规功能 PR 不应手动提升插件或 marketplace manifest 版本号。
常见问题
安装 Compound Engineering 需要 Bun 吗?
不需要。Bun 仅用于仓库开发任务和转换器维护。
在哪里查看所有可用 skills?
skill 清单见本 README,更完整的 skill 目录见 docs/skills/README.md。每个 skill 的权威运行时规范位于 skills/<skill>/SKILL.md。
发布历史在哪里?
GitHub Releases 是正式的发布说明入口。根目录 CHANGELOG.md 指向该历史记录。
贡献
欢迎贡献。Issue、缺陷报告和 Pull Request 都能让项目变得更好,我们由衷感谢 —— 尤其是缺陷报告。
关于预期的一点说明:Compound Engineering 在设计上带有明确主张。它由 @kieranklaassen 和 @tmchow, 维护,其方向反映了对 AI 辅助工程应如何运作的特定观点。因此,虽然我们欢迎帮助,但无法承诺接受每一项变更 —— 有些提案即使本身是好主意,也可能不符合这一愿景。
欢迎提交 Issue 或 PR,我们会纳入能推动插件朝正确方向发展的内容。我们只是希望事先说明,并非所有内容都会被合并。