首页
/ ECC for Hermes

ECC for Hermes

2026-09-06 13:35:39作者:咎竹峻Karen

This directory contains the ECC (Everything Claude Code) configuration for the Hermes harness.

What is installed

  • rules/ecc/ — shared coding rules and guidelines
  • skills/ecc/ — reusable skills
  • commands/ — slash commands
  • AGENTS.md — agent instructions

Manual install

bash ./install.sh --target hermes --profile minimal

Notes

  • Hermes config files (config.yaml, .env, etc.) are not touched by ECC install.
  • Use npx ecc-universal doctor --target hermes to check install health.

这个 README 承担了三重角色:安装清单声明、操作指南、安全边界说明。从源码结构看,它同时还是安装器的"锚点":安装器把 `.hermes` 作为 Hermes 目标的原生根目录来识别(后文详述),因此该目录的存在本身即是平台契约的一部分。

## 手动安装命令与安装器真实调用链

README 给出的唯一手动安装命令是:

```bash
bash ./install.sh --target hermes --profile minimal

这条命令的实际执行链路可以通过源码完整还原:

第一步:shell 入口 install.sh 该文件自述为 "Legacy shell entrypoint for the ECC installer",共 32 行,做三件事:

  1. 解析符号链接install.sh#L9-L15):当通过 npm bin 的 symlink 调用时,循环 readlink 找到真实仓库/包根目录,保证 SCRIPT_DIR 始终指向包根;
  2. 自动补装依赖install.sh#L17-L21):若 node_modules 不存在(典型场景是从 git clone 直接运行),自动执行 npm install --no-audit --no-fund
  3. Windows/Git Bash 路径修正install.sh#L23-L30):在 MSYS2 环境下用 cygpath -w 将 POSIX 路径转为 Windows 路径,避免 Node 收到 G:\g\... 这类被自动转换破坏的路径。

最后 exec node scripts/install-apply.js "$@"--target hermes --profile minimal 原样交给 Node 安装器。

第二步:目标适配器 scripts/lib/install-targets/hermes-home.js 这是理解 --target hermes 语义的关键文件,全文仅 10 行:

module.exports = createInstallTargetAdapter({
  id: 'hermes-home',
  target: 'hermes',
  kind: 'home',
  rootSegments: ['.hermes'],
  installStatePathSegments: ['ecc-install-state.json'],
  nativeRootRelativePath: '.hermes',
});

由此可以确认:

  • Hermes 的 targethermes,适配器内部 id 为 hermes-homekindhome——即安装落在用户主目录下的 ~/.hermes/ 作用域,而非某个项目目录;
  • rootSegments: ['.hermes'] 决定安装内容写入 ~/.hermes/
  • installStatePathSegments: ['ecc-install-state.json'] 表明安装状态记录在 ~/.hermes/ecc-install-state.json,供 doctor、状态查询和卸载/重装时读取;
  • nativeRootRelativePath: '.hermes' 对应仓库内的 .hermes/ 目录——即本文档所在目录正是"原生根"映射的仓库侧对应物。

该适配器在 scripts/lib/install-targets/registry.js 中与 claude-homecodex-homeopencode-homeopenclaw-home 等一起注册,说明 hermes 与这些 harness 走同一套目标解析框架。

"What is installed" 与安装清单的对应关系

README 声明的 4 项安装内容(rules/ecc/skills/ecc/commands/AGENTS.md)并非凭空列举,而是与 minimal profile 的模块展开一致。

manifests/install-profiles.jsonminimal profile 定义为:

"minimal": {
  "description": "Low-context Claude Code setup with rules, agents, commands, platform configs, and quality workflow support, but no hook runtime.",
  "modules": [
    "rules-core",
    "agents-core",
    "commands-core",
    "platform-configs",
    "workflow-quality"
  ]
}

对照 manifests/install-modules.json 各模块定义,可以看到这些模块对 hermes 目标的支持情况:

模块 内容 是否包含 hermes 目标
rules-core 仓库 rules/ 目录(共享与语言规则) 是(targets 列表含 hermes
agents-core agents/AGENTS.md 等 agent 定义
commands-core commands/ 斜杠命令库及 scripts/harness-audit.jsscripts/skills-health.js
platform-configs 各平台原生目录,路径列表显式包含 ".hermes",以及 mcp-configs/scripts/setup-package-manager.js
workflow-quality 评估、TDD、验证、跨 harness memory 等质量工作流 skills
hooks-runtime 钩子运行时 ——hooks-runtime 的 targets 仅含 claudecursoropencodecodebuddy,且 minimal profile 本就刻意排除它

值得注意的是 platform-configspaths 中显式列出了 ".hermes"manifests/install-modules.json#L113-L129),这正是 .hermes/README.md 被分发给目标机器的载体机制。同时 rules-coreagents-corecommands-core 的 targets 数组均含 hermes,与 README 的 "What is installed" 清单一一对应;而 framework-languagedatabasesecurity 等重量级 skill 模块的 targets 列表中不含 hermes,这也解释了为何 Hermes 安装默认走 minimal 而非更大 profile——更大 profile 中的多数模块并不会安装到 hermes 目标上。

npm 侧的发布事实可以交叉验证:package.json 中包名为 ecc-universal(当前版本 2.2.1),bin 段注册了 eccecc-installecc-memory-mcpecc-plan-canvasecc-universalecc-control-pane 等可执行入口,且 files 段包含 install.shmanifests/mcp-configs/ 等安装必需资产——因此 README Notes 中 npx ecc-universal doctor --target hermes 这类 npx 用法才有据可依。

安全边界:Hermes 自身配置不被 ECC 触碰

README 的 Notes 中第一条强调:Hermes 配置文件(config.yaml.env 等)不会被 ECC 安装修改。从源码结构看这一边界是自洽的:

  • hermes-home 适配器声明的写入路径只有 rootSegments: ['.hermes'] 下的 ECC 侧目录结构,安装状态也只写 ecc-install-state.json 这一个文件,不涉及 ~/.hermes/config.yaml~/.hermes/.env 等 Hermes 私有配置;
  • 模型路由、MCP server 注册、插件加载等 Hermes 自身的运行时配置(在 ~/.hermes/config.yaml 中管理)按 docs/HERMES-SETUP.md 的"Public Workspace Map"描述,由操作者自行维护,ECC 只提供可复用的 skills/rules/commands 底层资产。

安装后建议执行 README 给出的健康检查:

npx ecc-universal doctor --target hermes

doctor 入口由 npm bin eccscripts/ecc.js)承载,可对照 ecc-install-state.json 验证 ECC 侧安装完整性,而不侵入 Hermes 自身状态。

扩展:Hermes 与 ECC Memory Vault 的衔接

如果 Hermes 需要与其他 harness(Claude Code、Codex)共享上下文,可以按 docs/HERMES-SETUP.md 初始化 ECC Memory Vault:

npm install -g ecc-universal
ecc memory --help
command -v ecc-memory-mcp

ecc memory init --scope project --scope team
登录后查看全文
热门项目推荐
相关项目推荐