迁移项目共享记忆到 docs/project-memory,保留 .hermes 仅作为工具目录 新增 Agent 本地 RAG 索引与上下文包检索脚本 记录 RAG 依赖只安装到 .rag/runtime 并加入忽略规则 同步文档与检查脚本中的项目记忆路径
67 lines
3.1 KiB
Markdown
67 lines
3.1 KiB
Markdown
# Genarrative Hermes 工具目录
|
||
|
||
本目录只保留 Hermes 专用的仓库级工具资源,例如 Hermes skills、plugins 和启用说明。项目知识本体、长期记忆、计划和 TODO 不再放在 `.hermes/`,统一迁移到 `docs/project-memory/`。
|
||
|
||
## 使用原则
|
||
|
||
- `.hermes/` 中只保存 Hermes 工具运行或加载所需内容。
|
||
- 项目长期知识、架构约定、排障经验、协作规则、计划和 TODO 统一放在 `docs/project-memory/`。
|
||
- 不提交个人配置、API Key、会话转录、模型密钥、本地路径密钥等敏感内容。
|
||
- 个人 Hermes 的 `~/.hermes/config.yaml`、`~/.hermes/.env`、`~/.hermes/sessions/` 不应复制到本仓库。
|
||
- 后续新增的 Markdown 文档文件名必须以分类标签开头,格式为 `【标签名】中文标题-日期.md`,便于团队跨目录检索。
|
||
- 若 `.hermes/` 中的工具说明与代码或 `docs/` 冲突,以当前代码和最新 `docs/` 为准。
|
||
|
||
## 目录结构
|
||
|
||
```text
|
||
.hermes/
|
||
├─ README.md # Hermes 工具目录说明
|
||
├─ skills/ # 仓库级 Hermes skills
|
||
└─ plugins/ # 仓库级 Hermes plugins(需显式启用项目 plugin)
|
||
```
|
||
|
||
## 仓库级 Plugins
|
||
|
||
本仓库可共享的 Hermes plugin 放在 `.hermes/plugins/<plugin-name>/`。当前已包含:
|
||
|
||
- `.hermes/plugins/game-studio/`:浏览器游戏设计、原型、2D/3D 技术栈、素材管线与 playtest 相关工作流。
|
||
|
||
Hermes 的项目级 plugin 默认不会自动加载。团队成员拉取仓库后,如需使用本仓库内 plugin,请在仓库根目录启动 Hermes 前设置:
|
||
|
||
```bash
|
||
export HERMES_ENABLE_PROJECT_PLUGINS=1
|
||
```
|
||
|
||
然后确认当前 Hermes 配置的 `plugins.enabled` 中包含 `game-studio`。如果成员本机尚未启用过该 plugin,当前 Hermes 的 `hermes plugins enable` 只识别用户级或内置 plugin,可能不会识别项目级 plugin;可用以下命令写入个人配置:
|
||
|
||
```bash
|
||
python - <<'PY'
|
||
from hermes_cli.config import load_config, save_config
|
||
config = load_config()
|
||
plugins = config.setdefault('plugins', {})
|
||
enabled = set(plugins.get('enabled') or [])
|
||
disabled = set(plugins.get('disabled') or [])
|
||
enabled.add('game-studio')
|
||
disabled.discard('game-studio')
|
||
plugins['enabled'] = sorted(enabled)
|
||
plugins['disabled'] = sorted(disabled)
|
||
save_config(config)
|
||
PY
|
||
```
|
||
|
||
启用后重新进入一个新 Hermes 会话。`hermes plugins list` 当前主要展示内置和用户级 plugin,未必列出项目级 plugin;如需验证项目级扫描,可在仓库根目录运行:
|
||
|
||
```bash
|
||
HERMES_ENABLE_PROJECT_PLUGINS=1 HERMES_PLUGINS_DEBUG=1 hermes chat -q "请读取 game-studio:game-studio skill 并概括它的用途"
|
||
```
|
||
|
||
该 plugin 注册的是带命名空间的 plugin skills,可用类似 `game-studio:phaser-2d-game` 的名称显式加载。
|
||
|
||
## 推荐给 Hermes 的启动提示
|
||
|
||
在本仓库中开始复杂任务时,可以先对 Hermes 说:
|
||
|
||
```text
|
||
请先读取 AGENTS.md 以及 docs/project-memory/shared-memory/ 下与本任务相关的团队共享记忆,再开始分析。若任务完成后产生稳定项目知识,请更新 docs/project-memory/shared-memory/ 对应文件。
|
||
```
|