返回顶部
m

memory-architect记忆架构

Restructure flat MEMORY.md files into a tiered memory system with an entity graph. Use when: (1) MEMORY.md is growing unwieldy or exceeds 150 lines, (2) user asks to organize/restructure/tier memory, (3) context compaction is losing important details, (4) you need structured entity lookup (people, projects, properties, contacts) instead of scanning markdown. Triggers on organize my memory, memory is too big, restructure memory, tier my memory, make memory more efficient.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
348
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

memory-architect

记忆架构师

将单一的MEMORY.md拆分为三个层级加上结构化实体图。

架构

MEMORY.md → 路由器(最多30行)。指向各层级。
memory/protocols.md → 热数据:稳定工作流、快捷方式、流程。会话启动时读取。
memory/active.md → 温数据:当前项目、待办事项、实时上下文。操作前检查。
memory/archive.md → 冷数据:已完成工作、历史参考。需要时搜索。
memory/ontology/graph.jsonl → 结构化实体+关系(仅追加JSONL格式)

流程

1. 分析现有MEMORY.md

读取完整文件。对每个部分进行分类:

内容类型层级示例
稳定工作流/流程protocols表情符号快捷方式、部署步骤、工具使用规则
活跃项目/待办事项
active | 当前构建、待回复消息、实时URL |
| 已完成工作/参考数据 | archive | 已完成任务、联系人列表、账户表格、旧决策 |
| 命名实体及其属性 | ontology | 人员、组织、项目、属性、位置 |

2. 创建层级文件

为每个层级文件添加头部注释,说明其用途和更新频率。

protocols.md规则:

  • - 仅包含很少变更的流程
  • 包含精确命令(可复制粘贴)
  • 不包含项目特定状态

active.md规则:

  • - 仅包含有下一步操作或待处理状态的内容
  • 底部包含待办事项部分
  • 每次更新时将已完成项目移至archive

archive.md规则:

  • - 按日期或类别分组的已完成工作
  • 参考数据(联系人、账户、聊天ID)
  • 保持可搜索性——使用标题和表格

3. 提取实体到本体

对每个命名的人员、组织、项目、属性或位置,创建JSONL条目:

jsonl
{op:create,entity:{id:p_alice,type:Person,properties:{name:Alice,email:alice@example.com,role:工程师}},timestamp:2026-01-01T00:00:00Z}
{op:relate,from:palice,rel:memberof,to:org_acme,timestamp:2026-01-01T00:00:00Z}

ID命名规范:

  • - 人员:p简称
  • 组织:grp名称 或 org名称
  • 项目:proj名称
  • 属性/位置:prop名称 或 loc名称

关系类型: memberof(成员)、owns(拥有)、collaborateson(协作)、interestedin(感兴趣)、guides(指导)、uses(使用)、listedby(列出)、located_at(位于)

4. 重写MEMORY.md为路由器

将MEMORY.md替换为约25行的索引,包含:

  • - 列出三个层级及一行描述
  • 注明本体位置
  • 保留任何系统指令(NO_REPLY规则、心跳指令)
  • 不包含任何项目特定内容

5. 验证

bash
wc -l MEMORY.md memory/protocols.md memory/active.md memory/archive.md memory/ontology/graph.jsonl

目标:MEMORY.md不超过30行,protocols不超过100行,active不超过80行,graph每个实体/关系一行。

维护

每次会话

  • - 读取 memory/protocols.md(始终)
  • 扫描 memory/active.md(始终)
  • memory/archive.md — 仅在 memory_search 或明确请求时

添加新信息时

  • - 新流程 → protocols.md
  • 新项目/活跃项 → active.md
  • 已完成项 → 从active移至archive
  • 新人/组织/项目 → 追加到graph.jsonl

实体查询

bash grep p_forrest memory/ontology/graph.jsonl grep type:Project memory/ontology/graph.jsonl cat memory/ontology/graph.jsonl | jq -r select(.entity?.type==Person) | .entity.properties.name

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 memory-architect-1776287990 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 memory-architect-1776287990 技能

通过命令行安装

skillhub install memory-architect-1776287990

下载

⬇ 下载 memory-architect v1.0.0(免费)

文件大小: 2.46 KB | 发布时间: 2026-4-16 17:56

v1.0.0 最新 2026-4-16 17:56
Initial release of memory-architect: split MEMORY.md into tiers and entity graph.

- Introduces a system to restructure MEMORY.md into protocols, active, archive files, and a structured ontology graph.
- Defines clear rules for classifying and storing workflows, active items, completed work, and structured entities.
- MEMORY.md becomes a concise router/index.
- Provides maintenance guidelines for ongoing organization and efficient entity lookups.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部