Memory Governor
Reusable memory-governance core for different host environments.
The OpenClaw integration in this repository is only a reference host profile, not the only host model.
It is not a second-brain system, sync bus, or knowledge manager. It governs what should be remembered, where it should go, when it should be promoted, and what should be excluded.
It is a governance kernel, not an execution-first productivity skill. Its value is highest when a host already has multiple memory layers, multiple memory-writing skills, or adapter drift.
When to Use
Use this skill when:
- - you need to decide whether something should enter memory
- you need to choose the right memory layer or target class
- you need to promote daily, correction, or working state into durable rules
- multiple skills are starting to define memory differently and need governance
First Reading Path
If this is your first time opening memory-governor, start here:
- 1. INLINECODE1
- INLINECODE2
- INLINECODE3
- INLINECODE4
- INLINECODE5
The remaining reference files are optional on first read.
What Counts as Memory
Only information that improves future judgment, recovery, execution quality, or coordination consistency counts as memory.
Typical examples:
- - stable long-term preferences
- stable long-term facts
- key same-day events
- explicit corrections
- unproven but promising candidate lessons
- reusable lessons
- current progress state
- short-term recovery hints
For content that should stay out of memory, see references/exclusions.md.
Core Rule
The thing being standardized is the memory contract, not every skill implementation.
That means:
- - all skills should follow the same classification, routing, promotion, and exclusion rules
- each skill may keep its own internal logic, downstream tools, interaction style, and directory habits
In short:
standardize the core, not everything else
Target Classes
The kernel defines abstract target classes before it defines any optional skill path.
Recommended standard target classes:
- - INLINECODE6
- INLINECODE7
- INLINECODE8
- INLINECODE9
- INLINECODE10
- INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
Concrete file paths are adapter details, not the contract itself.
Notes:
- -
learning_candidates is a low-commitment staging layer for corrections and emerging lessons - it exists to prevent single observations from hardening too early
- INLINECODE16 and
working_buffer are stateful targets - they should not become infinite append-only logs
- they need freshness, replace or merge, and retention rules by default
Routing Order
When evaluating a candidate memory, reason in this order:
- 1. Is it worth remembering at all?
- What memory type is it?
- Which target class does that type belong to?
- Which adapter in the current host should store that target class?
- Is it still short-term, or is it ready for promotion?
- Does it match any exclusion rule?
See references/memory-routing.md for the routing table.
See references/routing-precedence.md for ambiguity resolution.
Promotion Rules
All promotion should extract and refine before it hardens.
Never:
- - write raw logs directly into long-term memory
- treat a working buffer as long-term memory
- use system-governance files as temporary capture inboxes
See references/promotion-rules.md for details.
See references/correction-pipeline.md for the correction-to-candidate-to-rule flow.
See references/candidate-review.md for keep/promote/discard review workflow.
See references/dreaming-integration.md for how this kernel should coexist with OpenClaw Dreaming without duplicate promotion paths.
See references/stateful-targets.md for update semantics on stateful targets.
See references/schema-conventions.md if the host wants stronger structured constraints.
See references/retention-rules.md for lifecycle rules.
See references/read-order.md for recovery-time read order.
Skill Integration
When another skill integrates with this kernel:
- - the skill may declare which information types it emits
- the skill may declare where those types usually land
- the skill should not invent a new global memory-layer definition
- the skill should not bypass exclusion rules
- the skill should not confuse downstream storage rules with upstream memory rules
See references/skill-integration.md.
Adapters
INLINECODE18 may provide default adapters, but those adapters are not the only truth.
Examples:
- -
long_term_memory -> INLINECODE20 - INLINECODE21 -> INLINECODE22
- INLINECODE23 ->
~/self-improving/... if self-improving is installed - INLINECODE26 -> a local fallback file if
self-improving is absent
See references/adapters.md for default adapter behavior.
See references/integration-checklist.md for integration checks.
See references/installation-integration.md for installation and host integration guidance.
See references/host-profiles.md for host differences.
Never Do
- - do not turn this skill into a monolithic personal memory system
- do not embed Obsidian, Notion, or OmniFocus implementation details into the governance kernel
- do not force every skill into the same implementation style
- do not invent a new primary memory directory unless the governance layer explicitly approves it
- do not write secrets, raw long logs, or short-lived noise into memory
Phase Boundary
The current phase is governance core only.
That means:
- - it may define contracts
- it may define references
- it may constrain how other skills write memory
- it may not quietly grow into a unified execution bus at this stage
If the project later wants an orchestration layer or a full personal memory system, that should be scoped separately after the governance layer is stable.
内存治理器
为不同宿主环境提供可复用的内存治理核心。
本仓库中的OpenClaw集成仅作为参考宿主配置文件,并非唯一的宿主模型。
它不是第二大脑系统、同步总线或知识管理器。它管理哪些内容应该被记住、应该存储在哪里、何时应该被提升、以及哪些内容应该被排除。
它是一个治理内核,而非以执行为优先的生产力技能。当宿主已经拥有多个内存层、多个内存写入技能或适配器漂移时,其价值最高。
使用时机
在以下情况下使用此技能:
- - 需要决定某件事是否应进入内存
- 需要选择正确的内存层或目标类别
- 需要将日常信息、修正信息或工作状态提升为持久规则
- 多个技能开始以不同方式定义内存,需要统一治理
首次阅读路径
如果你是第一次打开memory-governor,请从这里开始:
- 1. SKILL.md
- references/memory-routing.md
- references/promotion-rules.md
- references/exclusions.md
- references/adapters.md
其余参考文件在首次阅读时可选择跳过。
什么算作内存
只有能够改善未来判断、恢复、执行质量或协调一致性的信息才算作内存。
典型示例:
- - 稳定的长期偏好
- 稳定的长期事实
- 关键的同日事件
- 明确的修正信息
- 未经证实但有潜力的候选经验
- 可复用的经验
- 当前进度状态
- 短期恢复提示
关于不应进入内存的内容,请参见 references/exclusions.md。
核心规则
被标准化的对象是内存契约,而非每个技能的具体实现。
这意味着:
- - 所有技能应遵循相同的分类、路由、提升和排除规则
- 每个技能可以保留其内部逻辑、下游工具、交互风格和目录习惯
简而言之:
标准化核心,而非一切
目标类别
内核在定义任何可选的技能路径之前,先定义抽象的目标类别。
推荐的标准目标类别:
- - longtermmemory
- dailymemory
- learningcandidates
- reusablelessons
- proactivestate
- workingbuffer
- projectfacts
- systemrules
- toolrules
具体的文件路径属于适配器细节,而非契约本身。
注意事项:
- - learningcandidates 是一个低承诺的暂存层,用于存放修正信息和新兴经验
- 它的存在是为了防止单一观察结果过早固化
- proactivestate 和 working_buffer 是有状态的目标
- 它们不应成为无限追加的日志
- 默认情况下,它们需要新鲜度规则、替换或合并规则以及保留规则
路由顺序
在评估候选内存时,按以下顺序推理:
- 1. 它是否值得被记住?
- 它属于什么内存类型?
- 该类型属于哪个目标类别?
- 当前宿主中的哪个适配器应存储该目标类别?
- 它仍属于短期信息,还是已准备好被提升?
- 它是否符合任何排除规则?
路由表请参见 references/memory-routing.md。
歧义解决请参见 references/routing-precedence.md。
提升规则
所有提升操作应在固化之前进行提取和精炼。
绝对禁止:
- - 将原始日志直接写入长期内存
- 将工作缓冲区视为长期内存
- 将系统治理文件用作临时捕获收件箱
详情请参见 references/promotion-rules.md。
从修正到候选再到规则的流程请参见 references/correction-pipeline.md。
保留/提升/丢弃的审查工作流请参见 references/candidate-review.md。
关于此内核如何与OpenClaw Dreaming共存而不产生重复提升路径,请参见 references/dreaming-integration.md。
有状态目标的更新语义请参见 references/stateful-targets.md。
如果宿主需要更强的结构化约束,请参见 references/schema-conventions.md。
生命周期规则请参见 references/retention-rules.md。
恢复时的读取顺序请参见 references/read-order.md。
技能集成
当其他技能与此内核集成时:
- - 技能可以声明其输出的信息类型
- 技能可以声明这些类型通常落在哪个目标类别
- 技能不应发明新的全局内存层定义
- 技能不应绕过排除规则
- 技能不应混淆下游存储规则与上游内存规则
请参见 references/skill-integration.md。
适配器
memory-governor 可能提供默认适配器,但这些适配器并非唯一真理。
示例:
- - longtermmemory -> MEMORY.md
- dailymemory -> memory/YYYY-MM-DD.md
- reusablelessons -> ~/self-improving/...(如果安装了 self-improving)
- reusable_lessons -> 本地回退文件(如果未安装 self-improving)
默认适配器行为请参见 references/adapters.md。
集成检查请参见 references/integration-checklist.md。
安装和宿主集成指南请参见 references/installation-integration.md。
宿主差异请参见 references/host-profiles.md。
绝对禁止
- - 不要将此技能转变为单一的个人内存系统
- 不要将Obsidian、Notion或OmniFocus的实现细节嵌入治理内核
- 不要强制所有技能采用相同的实现风格
- 除非治理层明确批准,否则不要发明新的主内存目录
- 不要将机密信息、原始长日志或短寿命噪音写入内存
阶段边界
当前阶段仅为治理核心。
这意味着:
- - 它可以定义契约
- 它可以定义参考
- 它可以约束其他技能如何写入内存
- 在此阶段,它不应悄然发展成统一的执行总线
如果项目后续需要编排层或完整的个人内存系统,应在治理层稳定后另行规划范围。