Files
Genarrative/.hermes/README.md

93 lines
4.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Genarrative 团队 Hermes 共享记忆
本目录用于在仓库内共享团队级 Hermes 上下文,供 3 名开发人员在各自本地 Hermes 中读取、更新和同步。
## 使用原则
- `.hermes/` 中只保存可以进入 Git 的团队共享内容。
- 不提交个人配置、API Key、会话转录、模型密钥、本地路径密钥等敏感内容。
- 个人 Hermes 的 `~/.hermes/config.yaml``~/.hermes/.env``~/.hermes/sessions/` 不应复制到本仓库。
- 开发前先阅读本目录下与任务相关的记忆文件;开发后如产生稳定知识,更新对应文档。
- 若本目录内容与 `docs/` 或代码事实冲突,以当前代码和最新 `docs/` 为准,并同步修正过期记忆。
## 目录结构
```text
.hermes/
├─ README.md # 本说明
├─ shared-memory/
│ ├─ project-overview.md # 项目概览与当前技术路线
│ ├─ team-conventions.md # 团队协作约定
│ ├─ development-workflow.md # 开发、测试、提交流程
│ ├─ document-map.md # README / AGENTS / docs 阅读索引
│ ├─ decision-log.md # 长期决策记录
│ ├─ pitfalls.md # 踩坑与排障记录
│ └─ handoff-template.md # 任务交接模板
├─ plans/ # 阶段性计划与实施方案
├─ 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 以及 .hermes/shared-memory/ 下与本任务相关的团队共享记忆,再开始分析。若任务完成后产生稳定项目知识,请更新 .hermes/shared-memory/ 对应文件。
```
## 需要沉淀到这里的内容
- 长期有效的架构约定
- 反复会用到的本地开发/测试流程
- 已确认的接口契约或模块边界
- 重要技术决策及原因
- 踩坑、排障方式、验证命令
- 团队协作规则和任务交接规范
## 不应沉淀到这里的内容
- API Key、Token、Cookie、私有密钥
- 个人账号、个人本地绝对路径、个人隐私信息
- 大段临时聊天记录
- 尚未确认的一次性猜测
- 构建产物、日志、缓存、数据库 dump