Shared Memory Governor
Preserve each agent’s private long-term memory.
Add a separate, reviewable shared-memory layer for durable user preferences, shared rules, and cross-agent facts.
Keep assistant-specific identity context private.
What this skill is for
Use this skill to govern a shared-memory layer across multiple agents while preserving each agent’s private memory system.
This skill helps define:
- - what kinds of information may be shared
- what kinds of information must remain private
- how shared-memory files should be organized
- how attached agents should read shared memory in a safe order
- how shared-memory updates should remain reviewable and reversible
This skill is for workspace-scoped shared-memory design and maintenance. It is not a credential tool, not a hidden prompt tool, and not a system-level persistence mechanism.
Safety boundaries
Follow these boundaries at all times:
- - Operate only within user-designated workspace paths
- Process only explicitly approved memory files
- Treat shared memory as supplemental context, not identity-defining context
- Keep assistant-specific identity context private
- Keep shared-memory updates reviewable and reversible
- Keep recurring schedules disabled by default unless the user explicitly enables them
Never:
- - read credentials, SSH keys, browser sessions, or unrelated local files
- collect plaintext secrets into shared memory
- alter hidden system prompts or hidden runtime policy layers
- treat assistant identity files as shared-memory sources in v1
- silently enable recurring background schedules
Core model
Use a two-layer long-term memory model:
- 1. Private memory layer
- Each agent keeps its own curated memory notes
- Each agent keeps its own daily memory files
- Each agent keeps its own local assistant-specific context
- 2. Shared memory layer
- Store shared files under the shared root directory
- Use this layer for stable user preferences, shared rules, and durable cross-agent facts
- Treat this layer as part of the long-term memory workflow
- Do not use this layer for assistant-specific identity context
Core principles
Follow these rules at all times:
- 1. Preserve private memory systems
- Share user-level and cross-agent durable context, not assistant-specific identity context
- Read private memory first, then shared memory
- Treat shared memory as supplemental background
- Never let shared memory override assistant-specific identity context or private identity guidance
- Do not auto-delete private entries after promotion to shared memory
- Require explicit local guidance for participating agents
- Keep assistant identity context private in v1
- Prefer conservative promotion decisions
Shared memory structure
Use the shared root with this default structure:
CODEBLOCK0
File roles
- -
shared-user.md → stable user preferences, habits, and constraints - INLINECODE1 → durable facts reusable across agents
- INLINECODE2 → governance rules for the shared-memory system
- INLINECODE3 → operational logs for review and traceability
- INLINECODE4 → archived local shared-memory guidance after detach
For detailed file-boundary examples, read:
High-level workflows
1) Initialize the shared-memory system
Use when the shared layer does not exist yet.
Goal:
- - create the shared root structure
- create base shared files
- create the default config
- prepare shared scan and shared maintenance schedules in a disabled-by-default state
Use:
For config details, read:
2) Register and attach an agent
Use when an agent should participate in the shared-memory system.
Goal:
- - add the agent to the participant set
- create or update local shared-memory guidance
- make the shared read path explicit and reviewable
Use:
For startup guidance placement and cleanup rules, read:
Important:
- -
register does not automatically mean INLINECODE12 - updating local guidance files does not retroactively change what an already-running session has loaded
3) Review status and local readiness
Use when checking whether the shared-memory system is set up correctly.
Goal:
- - inspect global shared-memory status
- review whether each attached agent has complete local guidance
- review schedule consistency against config
Use:
- - INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
For status and reporting fields, read:
4) Run shared promotion
Use when updating the shared layer from approved upstream memory sources.
Goal:
- - review approved local memory sources
- identify cautiously promotable shared candidates
- update shared-memory files conservatively
- record a scan log and summary
Use:
Default rule in v1:
- - shared promotion should be conservative
- single-agent local items should be skipped by default unless they have explicit shared-scope justification
For promotion decisions and target-file boundaries, read:
5) Run shared maintenance
Use when reviewing and refining the shared layer itself.
Goal:
- - deduplicate shared entries
- merge or refine overlapping entries when appropriate
- prune outdated shared content
- update governance notes when needed
Use:
For reporting fields and maintenance review structure, read:
- - INLINECODE21
- INLINECODE22
6) Repair, detach, or remove an agent
Use when local shared-memory guidance is incomplete, stale, or no longer needed.
Use:
- - INLINECODE23
- INLINECODE24
- INLINECODE25
Rules:
- - detach should remove local shared-memory guidance, not private memory
- unregister should normally happen after detach when local guidance is still active
For startup guidance repair and detach cleanup rules, read:
Reference map
Read these files only when needed:
- local startup guidance placement
- fallback placement
- attach success criteria
- detach cleanup behavior
- shared-scope validation
- promotion categories
- target-file boundaries
- promotion report fields
- status display fields
- attachment review fields
- schedule consistency outcomes
- maintenance report section order
- config schema
- field meanings
- config-related command behavior
- schedule/config consistency rules
Commands
V1 supports:
- - INLINECODE31
- INLINECODE32
- INLINECODE33
- INLINECODE34
- INLINECODE35
- INLINECODE36
- INLINECODE37
- INLINECODE38
- INLINECODE39
- INLINECODE40
- INLINECODE41
- INLINECODE42
- INLINECODE43
- INLINECODE44
- INLINECODE45
Config-related commands may support explicit config paths.
Default operating stance
Keep this skill:
- - low-intrusion
- explicit
- auditable
- configuration-driven
- strict about identity isolation
- conservative about write authority
- centered on governance rather than hidden magic
共享内存管理器
保留每个代理的私有长期记忆。
为持久的用户偏好、共享规则和跨代理事实添加一个独立的、可审查的共享内存层。
保持助手特定身份上下文的私密性。
此技能的用途
使用此技能来管理跨多个代理的共享内存层,同时保留每个代理的私有记忆系统。
此技能有助于定义:
- - 哪些类型的信息可以共享
- 哪些类型的信息必须保持私密
- 共享内存文件应如何组织
- 附加代理应如何以安全顺序读取共享内存
- 共享内存更新应如何保持可审查和可逆
此技能适用于工作区范围的共享内存设计和维护。它不是凭证工具,不是隐藏提示工具,也不是系统级持久化机制。
安全边界
始终遵循以下边界:
- - 仅在用户指定的工作区路径内操作
- 仅处理明确批准的存储文件
- 将共享内存视为补充上下文,而非身份定义上下文
- 保持助手特定身份上下文的私密性
- 保持共享内存更新的可审查性和可逆性
- 默认禁用定期计划,除非用户明确启用
切勿:
- - 读取凭证、SSH密钥、浏览器会话或无关的本地文件
- 将明文机密收集到共享内存中
- 更改隐藏的系统提示或隐藏的运行时策略层
- 在v1中将助手身份文件视为共享内存源
- 静默启用定期后台计划
核心模型
使用两层长期记忆模型:
- 1. 私有内存层
- 每个代理保留自己精心整理的记忆笔记
- 每个代理保留自己的每日记忆文件
- 每个代理保留自己的本地助手特定上下文
- 2. 共享内存层
- 将共享文件存储在共享根目录下
- 使用此层存储稳定的用户偏好、共享规则和持久的跨代理事实
- 将此层视为长期记忆工作流的一部分
- 不要将此层用于助手特定的身份上下文
核心原则
始终遵循以下规则:
- 1. 保留私有记忆系统
- 共享用户级和跨代理的持久上下文,而非助手特定的身份上下文
- 先读取私有记忆,再读取共享记忆
- 将共享记忆视为补充背景信息
- 绝不让共享记忆覆盖助手特定的身份上下文或私有身份指导
- 在提升到共享内存后,不要自动删除私有条目
- 要求参与代理有明确的本地指导
- 在v1中保持助手身份上下文的私密性
- 倾向于保守的提升决策
共享内存结构
使用具有以下默认结构的共享根目录:
text
/
├── shared-user.md
├── shared-memory.md
├── shared-rules.md
├── shared-sync-log/
│ ├── YYYY-MM-DDHHMMscan.md
│ └── YYYY-MM-DDHHMMmaintenance.md
└── archived/
└── /
文件角色
- - shared-user.md → 稳定的用户偏好、习惯和约束
- shared-memory.md → 可在代理间重复使用的持久事实
- shared-rules.md → 共享内存系统的治理规则
- shared-sync-log/ → 用于审查和追溯的操作日志
- archived// → 分离后归档的本地共享内存指导
有关详细的文件边界示例,请阅读:
- - references/shared-promotion-rules.md
高级工作流
1) 初始化共享内存系统
在共享层尚不存在时使用。
目标:
- - 创建共享根目录结构
- 创建基础共享文件
- 创建默认配置
- 以默认禁用状态准备共享扫描和共享维护计划
使用:
有关配置详情,请阅读:
- - references/config-reference.md
2) 注册并附加代理
在代理应参与共享内存系统时使用。
目标:
- - 将代理添加到参与者集合
- 创建或更新本地共享内存指导
- 使共享读取路径明确且可审查
使用:
有关启动指导放置和清理规则,请阅读:
- - references/startup-guidance-rules.md
重要提示:
- - register 并不自动意味着 attach
- 更新本地指导文件不会追溯更改已运行会话加载的内容
3) 审查状态和本地就绪情况
在检查共享内存系统是否设置正确时使用。
目标:
- - 检查全局共享内存状态
- 审查每个附加代理是否具有完整的本地指导
- 对照配置审查计划一致性
使用:
- - show-status
- review-attachments
- show-config
- validate-config
有关状态和报告字段,请阅读:
- - references/status-review-fields.md
4) 运行共享提升
在从批准的上级内存源更新共享层时使用。
目标:
- - 审查批准的本地内存源
- 识别可谨慎提升的共享候选
- 保守地更新共享内存文件
- 记录扫描日志和摘要
使用:
v1中的默认规则:
- - 共享提升应保守
- 默认情况下应跳过单代理本地项目,除非它们有明确的共享范围理由
有关提升决策和目标文件边界,请阅读:
- - references/shared-promotion-rules.md
5) 运行共享维护
在审查和优化共享层本身时使用。
目标:
- - 去重共享条目
- 在适当时合并或优化重叠条目
- 修剪过时的共享内容
- 在需要时更新治理说明
使用:
有关报告字段和维护审查结构,请阅读:
- - references/status-review-fields.md
- references/config-reference.md
6) 修复、分离或移除代理
在本地共享内存指导不完整、过时或不再需要时使用。
使用:
- - repair-attachment
- detach
- unregister
规则:
- - 分离应移除本地共享内存指导,而非私有记忆
- 当本地指导仍处于活动状态时,取消注册通常应在分离之后进行
有关启动指导修复和分离清理规则,请阅读:
- - references/startup-guidance-rules.md
参考映射
仅在需要时阅读以下文件:
- - references/startup-guidance-rules.md
- 本地启动指导放置
- 回退放置
- 附加成功标准
- 分离清理行为
- - references/shared-promotion-rules.md
- 共享范围验证
- 提升类别
- 目标文件边界
- 提升报告字段
- - references/status-review-fields.md
- 状态显示字段
- 附件审查字段
- 计划一致性结果
- 维护报告部分顺序
- - references/config-reference.md
- 配置模式
- 字段含义
- 配置相关命令行为
- 计划/配置一致性规则
命令
V1支持:
- - init
- show-config
- validate-config
- update-config
- register
- unregister
- attach
- detach
- repair-attachment
- run-shared-scan
- run-shared-maintenance
- show-status
- review-attachments
- show-sync-logs
- prune-sync-logs
配置相关命令可能支持显式配置路径。
默认操作姿态
保持此技能:
- - 低侵入性
- 明确性
- 可审计性
- 配置驱动
- 严格的身份隔离
- 保守的写入权限
- 以治理而非隐藏魔法为中心