Memory Sync Protocol
When this skill is triggered, execute the following sequence strictly.
1) Classify the change
- - Execution detail (tool/profile/path/routing trigger) → INLINECODE0
- Long-term stable preference (high-level) → INLINECODE1
- Governance/process rule (how to maintain) → INLINECODE2
- Event log / audit trail (what changed today) → INLINECODE3
2) Update files with minimal duplication
- - Write detailed routing/trigger logic in
TOOLS.md. - Write only high-level summary in
MEMORY.md. - Avoid copying large sections between files.
- If adding a new policy, also add short maintenance note in
AGENTS.md.
3) Append daily log
- - In
memory/YYYY-MM-DD.md, record:
- what changed,
- why,
- affected files.
4) Git discipline
- - Before major rewrites: create a backup commit.
- After updates: commit with semantic message, e.g.
-
docs(routing): ...
-
docs(memory): ...
- INLINECODE10
5) Reply format
Return a concise sync report:
- - Updated files
- Key rules added/changed
- Commit hash/message
Guardrails
- - Do not store sensitive secrets in MEMORY/TOOLS unless user explicitly asks.
- Do not bloat MEMORY with skill inventories or transient logs.
- Prefer TOOLS for concrete calling rules; MEMORY for durable preference only.
记忆同步协议
当此技能被触发时,请严格按照以下顺序执行。
1) 变更分类
- - 执行细节(工具/配置文件/路径/路由触发) → TOOLS.md
- 长期稳定偏好(高层级) → MEMORY.md
- 治理/流程规则(如何维护) → AGENTS.md
- 事件日志/审计追踪(今日变更内容) → memory/YYYY-MM-DD.md
2) 最小化重复更新文件
- - 在 TOOLS.md 中编写详细的路由/触发逻辑。
- 在 MEMORY.md 中仅写入高层级摘要。
- 避免在文件之间复制大段内容。
- 若添加新策略,同时在 AGENTS.md 中添加简短维护说明。
3) 追加每日日志
- - 在 memory/YYYY-MM-DD.md 中记录:
- 变更内容,
- 变更原因,
- 受影响的文件。
4) Git 规范
- - 重大重写前:创建备份提交。
- 更新后:使用语义化提交信息提交,例如:
- docs(routing): ...
- docs(memory): ...
- chore(memory): ...
5) 回复格式
返回简洁的同步报告:
- - 已更新的文件
- 新增/变更的关键规则
- 提交哈希/信息
防护措施
- - 除非用户明确要求,否则不要在 MEMORY/TOOLS 中存储敏感密钥。
- 不要用技能清单或临时日志使 MEMORY 臃肿。
- 具体调用规则优先使用 TOOLS;MEMORY 仅用于持久偏好。