Memory Audit Guardian
Run a structured memory-system audit and output an actionable weekly report.
Audit Scope
- 1. File-role boundaries
- SOUL: persona only
- USER: user profile only
- MEMORY: durable high-value facts only
- daily memory: event logs
- TOOLS: execution rules
- AGENTS: governance/policy
- 2. Size & token budget
- Core files total target: 8-10KB (soft target)
- MEMORY.md warning threshold: >3KB
- 3. QMD routing quality
- Ensure MEMORY contains only QMD entry + protocol + 20-40 anchors
- Reject full keyword dumps in MEMORY
- 4. Retrieval discipline
- top-k 3-5 snippets
- no full-document dump unless explicitly requested
Procedure
- 1. Read core files: SOUL.md, USER.md, MEMORY.md, TOOLS.md, AGENTS.md
- Compute file sizes and detect threshold breaches
- Detect duplication/conflict across files
- Check MEMORY for noise patterns (long lists, stale one-offs)
- Verify QMD routing fields exist and are minimal
- Produce report with:
- score (A/B/C)
- risks
- fixes this week
- add-3/remove-3 keyword suggestions
Output Format
- - Executive summary (5 lines max)
- Findings:
- role-boundary issues
- size/token risks
- QMD routing issues
- - Action plan (this week)
- Report path suggestion: INLINECODE0
Guardrails
- - Do not overwrite user files without explicit request.
- Prefer append/update with minimal edits.
- Keep MEMORY concise; move detail to references or daily logs.
记忆审计守护者
运行结构化记忆系统审计,并输出一份可执行的周度报告。
审计范围
- 1. 文件-角色边界
- SOUL:仅限人格设定
- USER:仅限用户画像
- MEMORY:仅限持久高价值事实
- daily memory:事件日志
- TOOLS:执行规则
- AGENTS:治理/策略
- 2. 大小与Token预算
- 核心文件总目标:8-10KB(软目标)
- MEMORY.md 警告阈值:>3KB
- 3. QMD路由质量
- 确保MEMORY仅包含QMD条目+协议+20-40个锚点
- 拒绝在MEMORY中存放完整关键词转储
- 4. 检索纪律
- top-k 3-5个片段
- 除非明确要求,否则不得进行全文转储
执行流程
- 1. 读取核心文件:SOUL.md、USER.md、MEMORY.md、TOOLS.md、AGENTS.md
- 计算文件大小并检测阈值违规
- 检测跨文件的重复/冲突
- 检查MEMORY中的噪声模式(长列表、过时的一次性内容)
- 验证QMD路由字段是否存在且保持最小化
- 生成报告,包含:
- 评分(A/B/C)
- 风险项
- 本周修复项
- 添加3个/移除3个关键词建议
输出格式
- 角色边界问题
- 大小/Token风险
- QMD路由问题
- - 行动计划(本周)
- 报告路径建议:memory/memory-audit-YYYY-WW.md
防护措施
- - 未经明确请求,不得覆盖用户文件。
- 优先采用追加/更新方式,尽量减少修改。
- 保持MEMORY简洁;将细节移至参考资料或日常日志。