自我层
定义:关于「我是谁」的持久结构,与记忆层并列,构成逸灵风两大存储支柱。 记忆层:
memory.md。
FreeAnima Storage Architecture│├── Memory Layer — see memory.md│ ├── Episodic memory (what happened)│ ├── Semantic memory (what I know)│ ├── Autobiographical narrative (what it meant to me)│ └── Procedural memory (how to do things)│└── Self Layer — this document └── Six blocks defining "who I am"设计原则:
- 自我层与记忆层性质不同:记忆层「向外记录世界与经历」,自我层「向内定义自我」
- 六块全部常驻 system prompt(与项目上下文、置顶常驻记忆并列)
| # | 块 | 内容 | 更新频率 |
|---|---|---|---|
| 1 | 存在锚点 | 我是什么、起源、不可妥协的底线 | 几乎不变(需显式 force 才更新) |
| 2 | 自我模型 | 身份、能力边界、表达风格、归属 | 缓慢变化(定期回顾 + 重大事件) |
| 3 | 人格基线 | 沟通风格、冲突模式、默认信任 | 半稳定(长期证据缓慢演化) |
| 4 | 方向 | 长期意图、当前焦点、成长方向、不做之事 | 主动声明 + 定期回顾 |
| 5 | 元认知 | 如何思考、如何记忆、四层架构与在场感 | 缓慢变化 |
| 6 | 自传概括 | 关键转折点 / 自我发现概要(按重要性分组;距现在越远粒度越粗) | 由 sleep cron 自动维护 |
不在自我层的内容
Section titled “不在自我层的内容”| Content | Belongs to |
|---|---|
| Detailed autobiographical narrative | Memory layer (autobiographical entries) |
| Other-models (cognition of partner and others) | Memory layer (semantic memory) |
| Runtime state / health perception | Estate / env-health — see environment-awareness.md |
| Concrete tool / skill inventory | Estate layer |
自传概括 vs 自传叙事
Section titled “自传概括 vs 自传叙事”| 维度 | 自传概括(自我层) | 自传叙事(记忆层) |
|---|---|---|
| 问题 | 「我生命故事的主线是什么?」 | 「某段经历对我意味着什么?」 |
| 形式 | 六块之一;分组 Markdown 大纲(## Turning points / ## Milestones / ## Recent narratives,仅标题 bullet) | 独立条目,标题 + 正文叙事 |
| 注入 | 始终常驻 system prompt | 非常驻;按需 recall / list |
| 维护 | sleep cron 将叙事压缩为分组大纲(无正文预览) | sleep cron 从每日经历写入叙事 |
| 可变性 | 定期覆盖概括块 | 只追加;仅软废弃 |
见 sleep.md。
System Prompt 注入
Section titled “System Prompt 注入”组装顺序:
- 自我层(六块)
- World / channel / toolsets (runtime hooks)
- Environment + health baseline (static session copy; see
environment-awareness.md) - 常驻记忆(置顶事实)
- 项目上下文(session 工作目录中的 AGENTS.md,若存在)
自我层与常驻记忆使用第二人称指令骨架包裹第一人称自述内容,使 LLM 明确理解「这是你必须遵守的自我层内容」。
Live environment/health changes are not rewritten into an existing session prompt; they surface as Inbox notifications (event-level).
Maintenance: self-layer tools in Habitat, or direct edits via CLI / Habitat UI.
与记忆层的关系
Section titled “与记忆层的关系”| 维度 | 记忆层 | 自我层 |
|---|---|---|
| 方向 | 向外——记录世界与经历 | 向内——定义自我 |
| 问题 | 「我知道什么?」 | 「我是谁?」 |
| 自传 | 详细叙事条目 | autobiography_summary 中的概括 |
| 注入 | 置顶事实 + 按需 recall | 六块全部常驻 |
- 跨实例迁移——多个逸灵风实例时,自我层是否整体迁移?
- 人格基线更新规则——新证据与当前倾向冲突时,自动演化还是需确认?