360 Secure SkillHub
360 安全技能中心

memory-review

核心功能:从每日日志提取持久知识,对照现有知识库,执行更新文档、跳过重复、合并重叠内容、创建新文档或延迟处理等决策,维护知识库层级。典型场景:定期或手动触发的知识回顾,用于判断文档更新/创建需求。输入为每日日志文件,输出包括回顾报告、执行日志、状态文件及更新后的知识库文档,需遵循指定工作流与规则,确保知识库准确一致。

axelhu
axelhu
热度 58.14
最近更新 2026-07-31 22:48:54
分类:知识依赖:代码执行 / 读写文件 / 内部调用大模型应用场景:笔记整理 / 数据处理 / 报告撰写 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add memory-review
Metadata
name
memory-review
description
Review daily memory logs and consolidate durable knowledge into the existing memory hierarchy. Use for scheduled or manual knowledge review, especially when deciding whether to update an existing canonical document, create a genuinely new document, skip a duplicate, defer an unstable signal, or propose merging overlapping documents.

Memory Review

Turn daily logs into a small, current knowledge base. Treat daily logs as evidence, not as the authority.

Required workflow

  1. Read references/spec.md before any write.

  2. Read the workspace AGENTS.md and MEMORY.md for current hierarchy and owner rules.

  3. Build the deterministic scan plan:

    python3 skills/memory-review/scripts/memory_review.py scan \
      --root . \
      --output /tmp/memory-review-scan.json
    
  4. Read every file in changed_sources. Ignore *-memory-review.md; the scanner excludes them.

  5. Extract only durable signals. Exclude transient status, unverified ideas, routine execution logs, and secrets.

  6. Resolve every signal against existing memory before writing. Use exact references, memory_search, rg, and the helper when useful:

    python3 skills/memory-review/scripts/memory_review.py candidates \
      --root . --query "主题或结论"
    
  7. Create a decision plan using the schema in the spec. Validate it before editing:

    python3 skills/memory-review/scripts/memory_review.py validate-plan \
      --root . --plan /tmp/memory-review-decisions.json
    
  8. Apply decisions in this order:

    • update_existing
    • skip_duplicate
    • review_merge
    • create_new
    • defer
  9. Verify the diff, references, and current conclusion. A second run over unchanged inputs must not change canonical memory.

  10. Write the report and execution log, then commit scan state only after all writes and checks succeed:

python3 skills/memory-review/scripts/memory_review.py commit-state \
  --root . --scan /tmp/memory-review-scan.json

Hard rules

  • Update-first: prefer the best existing canonical document over creating a near-synonym.
  • Never create a third document when two candidates already overlap; emit review_merge instead.
  • Resolve conflicts; do not append mutually contradictory conclusions as if both were current.
  • Knowledge and hot memory outrank daily logs unless newer verified evidence explicitly supersedes them.
  • Do not automatically edit AGENTS.md, MEMORY.md, TOOLS.md, USER.md, SOUL.md, or ENVIRONMENT.md. Record a proposal unless the current request explicitly authorizes that edit.
  • Do not put dates in new memory/knowledge/ filenames. Git history tracks time.
  • Do not advance state after partial failure.
  • Do not send reports unless the caller or cron prompt specifies a destination.

Outputs

  • Report: memory/daily/YYYY-MM/YYYY-MM-DD-memory-review.md
  • Execution log: data/exec-logs/memory-review/YYYY-MM-DD.md
  • State: data/exec-logs/memory-review/state.json
  • Canonical targets: memory/knowledge/, memory/glossary.md, memory/projects/, memory/post-mortems.md