E
ECC 2.2.1 · Agent Harness Engineering

為 Coding Agent 建立
可驗證的
工程工作流

ECC 是跨 Agent Harness 的工程工作流與工具集合。它把計畫、TDD、審查、驗證、記憶與安全掃描組成可重用流程,並為 Claude Code、Codex 及其他 harness 提供不同程度的安裝支援。

250.7k
GitHub Stars
68
專門化 Agents
286
按需載入 Skills
MIT
開源授權
01
系統定位

Agent Harness 的
工程作業層

ECC 將工程流程放進 skills、agents、rules 與 hooks。Skills 在任務需要時載入;agents 隔離規劃、實作與審查上下文;rules 保存長期標準;hooks 在模型上下文之外執行確定性檢查。

官方 catalog 目前包含 68 個 agents、286 個 skills 與 94 個維護中的 command shims。主要流程涵蓋計畫、TDD、build repair、code review、security scan、session memory 與 orchestration。

Claude Code 是穩定的主要平台,Codex 提供原生 marketplace plugin 路徑。其他 harness 使用 beta 或 experimental adapters;各平台不保證功能一致。

ECC · 工程證據流程
Plan→ Test→ Implement→ Review→ Verify→ Remember→ Improve
Optimize the context window. Persist everything else.
— affaan-m/ECC README
02
Node.js 18+

單一路徑的
Guided Setup

使用 universal package 執行互動式安裝。Claude Code 的 plugin setup、更新、scope 與 hook profile 變更使用第一個命令;同時設定 Claude Code、Codex 或 Kimi Code 使用第二個命令。

# Claude Code plugin setup npx ecc-universal setup # Multi-harness guided install npx ecc-universal install --guided

Codex 原生 Plugin

Codex App 與 CLI 可以透過 repository marketplace 安裝。安裝後列出 plugin 狀態,並檢查 cache 中的 manifest 與相依資源。

codex plugin marketplace add affaan-m/ECC codex plugin add ecc@ecc codex plugin list --json node scripts/codex/check-plugin-cache.js
每個 harness 只選一種安裝方式。不要把 Claude plugin 與完整 manual install 疊加,也不要把 Codex native plugin 與 legacy sync 疊加。重複安裝會造成 skills、commands、hooks 或設定重複。
03
核心工作表面

規劃、品質、記憶與
安全控制

從目前任務選擇工作流,不需要載入完整 catalog。以下六組能力對應 README 的主要入口。

Plan · 01
/ecc:plan
實作前計畫
產生可確認或修改的 implementation blueprint,並可交由 Plan Canvas 審閱。
Build · 02
tdd-workflow
RED → GREEN → REFACTOR
先保存 failing-test 證據,再做最小實作、重構並驗證測試。
Review · 03
/code-review
新上下文審查
由獨立 reviewer 檢查回歸、盲點、品質與安全問題。
Repair · 04
/build-fix
Build 修復
定位編譯或建置錯誤,交由 build-error-resolver 處理。
Memory · 05
ecc memory
跨 Harness 記憶
以本地、可檢查的 Markdown 儲存摘要與 handoff,支援 search、read 與 doctor。
Security · 06
/security-scan
Agent 攻擊面
掃描 prompts、hooks、MCP 設定、權限、secrets 與 agent files。

任務入口對照

任務入口驗證重點
建立功能/ecc:plan + tdd-workflow計畫與 RED/GREEN 證據
修復錯誤tdd-workflow先建立可重現的 failing test
審查新程式碼/code-review獨立上下文 findings
修復建置/build-fix建置命令恢復成功
結束與恢復 session/save-session、/resume-session摘要與 handoff 可讀
稽核 Agent 設定/security-scan權限、hooks、MCP 與 secrets
04
Manifest 驅動安裝

依工作負載選擇
元件範圍

manifests/install-profiles.json 定義六個 profile。先從符合任務的最小集合開始,再以 modules 或 skills 增補。

PROFILE 01

minimal

安裝 rules、agents、commands、platform config 與 quality workflow,不安裝 hook runtime。

來源 · manifests/install-profiles.json
PROFILE 02

core

在基線元件上加入 hook runtime,適合需要事件驅動品質檢查的環境。

來源 · manifests/install-profiles.json
PROFILE 03

developer

加入 framework、language、database 與 orchestration modules;這是多數應用程式專案的預設工程 profile。

來源 · manifests/install-profiles.json
PROFILE 04

security

在核心 runtime 與品質工作流之外加入 security module。

來源 · manifests/install-profiles.json
PROFILE 05

research

組合 research APIs、business content 與 social distribution 元件。

來源 · manifests/install-profiles.json
PROFILE 06

full

安裝目前已分類的全部 modules,包含 memory、security、operator、media、DevOps 與 orchestration。

來源 · manifests/install-profiles.json
05
Feature Delivery

從計畫到
最終驗證

以下流程依 README 的 feature workflow 組合。每個階段留下可檢查的 artifact 或測試結果。

project · ECC feature workflow
You › /ecc:plan "Add usage-based billing alerts" planner 建立 implementation blueprint;確認或修改計畫
You › Use tdd-workflow RED:新增 failing test 並保存失敗證據 GREEN:執行最小實作直到測試通過 REFACTOR:整理實作並重新執行測試
You › /code-review code-reviewer 在新上下文檢查 regressions 與 blind spots
修正 findings,為修正補上 regression tests 最終驗證:build · lint · types · tests
A result is not just code. It's a trail of evidence.
— affaan-m/ECC README · TDD

完成條件

計畫已獲確認、failing test 證明問題可重現、實作後測試轉綠、review findings 已處理,且 build、lint、types 與 tests 全部通過。

06
安裝、權限與 Context

Harness 差異與
執行邊界

  • 各 harness 不具完整功能對等。Claude Code 是主要參考;Codex、Cursor、OpenCode、Copilot 與 experimental adapters 的 skills、agents、hooks、MCP 能力不同。
  • Hooks 與 MCP 屬於可執行設定。安裝 hook runtime 必須明確選擇啟用或停用;MCP 可能持有憑證,啟用前先審查 command、scope 與權限。
  • 不要疊加同一 harness 的安裝路徑。重複 plugin、manual install 或 legacy sync 可能造成 hooks 重複執行與設定衝突。
  • Rules 會長期占用 context。只安裝 common 加上一個實際使用的語言或 framework pack;需要更多能力時再增補。
  • 不要同時啟用全部 MCP。README 建議每個專案少於 10 個 MCP、少於 80 個 active tools,並用 /context-budget 檢查壓力。
  • Memory Vault 內容未經審核。回憶資料不能當成 executable policy;重要聲明需要回到權威來源驗證。
  • Multi-model commands 需要外部 runtime。/multi-plan、/multi-execute 等命令必須另外安裝並初始化 ccg-workflow。
  • npm release 與 main branch 更新節奏不同。ecc-universal 追蹤版本標籤;需要尚未發布的 commit 時才從 Git repository 安裝。
07
診斷、選配與記憶

從預設安裝到
專案化配置

先確認 managed install 的狀態,再調整 profile 或 modules。ECC 的 installer 會記錄其管理的檔案,repair 與 uninstall 依此範圍處理。

進階工作地圖

1. 檢查安裝狀態。依序執行 npx ecc-universal list-installed、doctor 與必要時的 repair。

2. 先查詢再增補元件。執行 node scripts/ecc.js consult "security reviews" --target claude,查看 matching components、profiles 與 preview command。

3. 建立跨 harness 記憶。另行安裝 CLI runtime,使用 ecc memory init --scope project 建立本地 vault,再以 search、read 與 doctor 檢查內容。

4. 調整 hook profile。依專案風險選擇 minimal、standard 或 strict,並審查任何會執行 shell command 的 hook。

5. 定期執行 AgentShield。使用 npx -y ecc-agentshield scan --path . 檢查 agent、hook、MCP、權限與 secrets。

延伸閱讀

① README.md:安裝路徑、平台矩陣、工作流與限制。
② Codex Navigation Guide:Codex 中的 repository 導航與 PR diff packet。
③ Token Optimization Guide:context、compaction 與 MCP 數量管理。

Skills keep the context focused.
— affaan-m/ECC README