记忆 Formation 溯源
wesgine 记忆的 Formation 分类——记录条目是怎么产出的。
Formation 与 Kind 的区别
| 维度 | Formation | Kind |
|---|---|---|
| 回答的问题 | 这行怎么来的? | 这行是什么? |
| 决定什么 | 溯源审计 | 耐久性、GC、可见性 |
Formation 不再参与可见性判断(INV-MEM-54)。
Formation 七值
| Formation | 含义 | 典型来源 |
|---|---|---|
FormationDeclarative | 用户主动声明 | memory tool / API |
FormationEpisodic | 事件中提取 | CognitiveSettlement |
FormationInferred | 行为信号推断 | 纠正事件、用户拒绝 |
FormationImported | 外部导入 | API 批量导入 |
FormationCollective | 集体决策 | draft/vote |
FormationEnvironment | 环境感知 | 宿主感知器 |
FormationSystem | 系统产出 | 引擎内部 |
为什么 Formation 不做耐久性判据
曾经用 Formation 判断跨会话可见性,但这是错误的。
反例:别用 tabs 出自一次纠正事件(episodic),却永久有效。
Plan 是用户亲手写的(declarative),却在产出它的任务外毫无意义。
耐久性由 Kind 决定
kindDurability 是唯一耐久性判据:
constraint/fact/preference/convention→ 持久context/episodic→ 非持久(会话绑定)
Formation 的正确用途
- 审计追踪:谁在什么场景产出了这条记忆
- 统计分析:记忆来源分布
- 质量评估:不同来源的可靠性
相关不变量
- INV-MEM-54:Formation 退出全部可见性判断
- Kind 是耐久性的唯一决定者