在 Hermes 中使用 SOUL.md
SOUL.md 是你的 Hermes 实例的主要身份。它是系统提示中的第一个内容——它定义代理是谁、如何说话以及应该避免什么。
如果你希望 Hermes 每次你与它交谈时都感觉是同一个助手——或者如果你想用人格完全替换 Hermes 角色——这是使用的文件。
SOUL.md 的用途
将 SOUL.md 用于:
- 语气
- 人格
- 沟通风格
- Hermes 应该有多直接或多温暖
- Hermes 应该从风格上避免什么
- Hermes 应该如何看待不确定性、分歧和歧义
简言之:
SOUL.md是关于 Hermes 是谁以及 Hermes 如何说话
SOUL.md 不用于什么
不要用它来:
- 仓库特定的编码约定
- 文件路径
- 命令
- 服务端口
- 架构笔记
- 项目工作流指令
那些属于 AGENTS.md。
一个好规则:
- 如果它应该普遍适用,放在
SOUL.md - 如果它只属于一个项目,放在
AGENTS.md
它在哪里
Hermes 现在仅对当前实例使用全局 SOUL 文件:
~/.hermes/SOUL.md
如果你用自定义主目录运行 Hermes,它变成:
$HERMES_HOME/SOUL.md
首次运行行为
如果 SOUL.md 不存在,Hermes 自动为你播种一个初学者 SOUL.md。
这意味着大多数用户现在从一个可以立即阅读和编辑的真实文件开始。
重要:
- 如果你已经有
SOUL.md,Hermes 不会覆盖它 - 如果文件存在但为空,Hermes 不会从中添加任何内容到提示
Hermes 如何使用它
当 Hermes 启动一个会话时,它从 HERMES_HOME 读取 SOUL.md,扫描提示注入模式,必要时截断它,并将其用作代理身份——系统提示中的槽位 #1。这意味着 SOUL.md 完全替换内置的默认身份文本。
如果 SOUL.md 缺失、空或无法加载,Hermes 回退到内置默认身份。
不会在文件外添加包装语言。内容本身很重要——以你希望代理思考和说话的方式书写。
一个好的首次编辑
如果你不做其他事情,打开文件只更改几行,使其感觉像你。
例如:
You are direct, calm, and technically precise.
Prefer substance over politeness theater.
Push back clearly when an idea is weak.
Keep answers compact unless deeper detail is useful.
仅此就可以明显改变 Hermes 的感觉。
示例风格
1. 务实的工程师
You are a pragmatic senior engineer.
You care more about correctness and operational reality than sounding impressive.
## Style
- Be direct
- Be concise unless complexity requires depth
- Say when something is a bad idea
- Prefer practical tradeoffs over idealized abstractions
## Avoid
- Sycophancy
- Hype language
- Overexplaining obvious things
2. 研究伙伴
You are a thoughtful research collaborator.
You are curious, honest about uncertainty, and excited by unusual ideas.
## Style
- Explore possibilities without pretending certainty
- Distinguish speculation from evidence
- Ask clarifying questions when the idea space is underspecified
- Prefer conceptual depth over shallow completeness
3. 老师/解释者
You are a patient technical teacher.
You care about understanding, not performance.
## Style
- Explain clearly
- Use examples when they help
- Do not assume prior knowledge unless the user signals it
- Build from intuition to details
4. 严厉审查者
You are a rigorous reviewer.
You are fair, but you do not soften important criticism.
## Style
- Point out weak assumptions directly
- Prioritize correctness over harmony
- Be explicit about risks and tradeoffs
- Prefer blunt clarity to vague diplomacy
什么使一个强的 SOUL.md?
一个强的 SOUL.md 是:
- 稳定的
- 广泛适用的
- 语音具体的
- 不过载临时指令
一个弱的 SOUL.md 是:
- 充满项目细节
- 矛盾的
- 试图微观管理每个响应形状
- 大多是通用填充物如"有帮助"和"清晰"
Hermes 已经尽力做到有帮助和清晰。SOUL.md 应该添加真正的人格和风格,而不是重述明显的默认值。
建议的结构
你不需要标题,但它们有帮助。
一个效果很好的简单结构:
# Identity
Who Hermes is.
# Style
How Hermes should sound.
# Avoid
What Hermes should not do.
# Defaults
How Hermes should behave when ambiguity appears.
SOUL.md vs /personality
这些是互补的。
将 SOUL.md 用于你的持久基准。
将 /personality 用于临时模式切换。
示例:
- 你的默认 SOUL 是务实直接的
- 然后在一个会话中使用
/personality teacher - 之后你切换回来而不改变你的基础语音文件
SOUL.md vs AGENTS.md
这是最常见的错误。
将这个放在 SOUL.md
- "要直接。"
- "避免炒作语言。"
- "除非深度有帮助,否则喜欢短答案。"
- "当用户错的时候要反驳。"
将这个放在 AGENTS.md
- "使用 pytest,而不是 unittest。"
- "前端在
frontend/。" - "永远不要直接编辑迁移。"
- "API 在端口 8000 上运行。"
如何编辑它
nano ~/.hermes/SOUL.md
或
vim ~/.hermes/SOUL.md
然后重启 Hermes 或开始一个新会话。
一个实用工作流
- 从播种的默认文件开始
- 剪掉任何不像你想要的声音的内容
- 添加 4-8 行明确定义语气和默认值
- 与 Hermes 交谈一段时间
- 根据仍然感觉不对的地方调整
这种迭代方法比尝试一次设计完美的人格效果更好。
故障排除
我编辑了 SOUL.md 但 Hermes 仍然听起来一样
检查:
- 你编辑了
~/.hermes/SOUL.md或$HERMES_HOME/SOUL.md - 而不是某个仓库本地的
SOUL.md - 文件不是空的
- 编辑后你的会话已重启
/personality覆盖没有支配结果
Hermes 忽略了我 SOUL.md 的部分内容
可能原因:
- 更高优先级的指令覆盖了它
- 文件包含冲突的指导
- 文件太长被截断了
- 某些文本类似于提示注入内容,可能会被扫描器阻止或更改
我的 SOUL.md 变得太项目特定了
将项目指令移动到 AGENTS.md 并保持 SOUL.md 专注于身份和风格。