{
  "schemaVersion": "1.0",
  "item": {
    "slug": "memory-sync-enhanced",
    "name": "Memory Sync Enhanced",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/guohongbin-git/memory-sync-enhanced",
    "canonicalUrl": "https://clawhub.ai/guohongbin-git/memory-sync-enhanced",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/memory-sync-enhanced",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=memory-sync-enhanced",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "package.json",
      "scripts/co_occurrence_tracker.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/memory-sync-enhanced"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/memory-sync-enhanced",
    "agentPageUrl": "https://openagent3.xyz/skills/memory-sync-enhanced/agent",
    "manifestUrl": "https://openagent3.xyz/skills/memory-sync-enhanced/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/memory-sync-enhanced/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "增强版记忆系统",
        "body": "结合 Ebbinghaus 遗忘曲线 + Hebbian 共现图 的双层记忆架构。"
      },
      {
        "title": "架构",
        "body": "┌─────────────────────────────────────────────────────────┐\n│                    记忆检索                              │\n│  semantic_search() + co_occurrence_boost() + decay()    │\n└─────────────────────────────────────────────────────────┘\n                           │\n           ┌───────────────┴───────────────┐\n           ▼                               ▼\n┌─────────────────────┐       ┌─────────────────────┐\n│   Layer 1: 向量库   │       │  Layer 2: 共现图    │\n│   (CortexGraph)     │       │  (Hebbian)          │\n│                     │       │                     │\n│ • 语义相似度        │◄─────►│ • 操作关联          │\n│ • Ebbinghaus 衰减   │       │ • 边权重衰减        │\n│ • use_count 追踪    │       │ • 跨域桥接          │\n└─────────────────────┘       └─────────────────────┘"
      },
      {
        "title": "Layer 1: Ebbinghaus 遗忘曲线",
        "body": "score = (use_count)^β × e^(-λ × Δt) × strength\n\nβ = 0.6（使用频率权重）\nλ = ln(2) / half_life（默认 3 天）\nstrength = 1.0-2.0（重要性）"
      },
      {
        "title": "Layer 2: Hebbian 共现图",
        "body": "effective_weight = weight × 2^(-age_days / 30)\n\n每次记忆 A 和 B 同时被检索 → 边(A,B) 权重 +1\n边权重 30 天半衰期\n跨域桥接：音乐记忆 ↔ 编码记忆（因为同时发生）"
      },
      {
        "title": "检索流程",
        "body": "def retrieve_memory(query, top_k=10):\n    # 1. 语义搜索\n    semantic_results = cortexgraph.search(query, top_k * 2)\n    \n    # 2. 共现增强\n    for mem in semantic_results:\n        co_occur_boost = get_co_occurrence_score(mem.id, recent_context)\n        mem.boosted_score = mem.semantic_score + co_occur_boost * 0.3\n    \n    # 3. 遗忘曲线过滤\n    for mem in semantic_results:\n        mem.final_score = mem.boosted_score * mem.decay_factor\n    \n    # 4. 返回 Top K\n    return sorted(semantic_results, key=lambda x: x.final_score)[:top_k]"
      },
      {
        "title": "STM (短期记忆)",
        "body": "JSONL 格式\n快速读写\n高衰减率（3天 half-life）\n存储日常日志"
      },
      {
        "title": "LTM (长期记忆)",
        "body": "Obsidian Markdown\n永久存储\n低衰减率（30天 half-life）\n存储重要洞察"
      },
      {
        "title": "Co-occurrence Graph",
        "body": "SQLite 边表\n30天 half-life\n记录记忆之间的关联"
      },
      {
        "title": "CortexGraph 记录",
        "body": "{\n  \"id\": \"uuid\",\n  \"content\": \"记忆内容\",\n  \"embedding\": [0.1, 0.2, ...],\n  \"use_count\": 5,\n  \"last_used\": \"2026-02-19\",\n  \"strength\": 1.5,\n  \"created_at\": \"2026-02-15\",\n  \"tags\": [\"daily-log\", \"finding\"]\n}"
      },
      {
        "title": "Co-occurrence 边",
        "body": "CREATE TABLE co_occurrence (\n  memory_a TEXT,\n  memory_b TEXT,\n  weight REAL,\n  last_updated TEXT,\n  PRIMARY KEY (memory_a, memory_b)\n);"
      },
      {
        "title": "同步记忆",
        "body": "# 同步 MEMORY.md\n./scripts/sync-memory.sh\n\n# 同步每日日志\n./scripts/sync-daily.sh 2026-02-19\n\n# 记录共现\n./scripts/record-co-occurrence.sh"
      },
      {
        "title": "检索记忆",
        "body": "# 语义搜索\n./scripts/search.sh \"量化交易\"\n\n# 增强搜索（语义 + 共现）\n./scripts/search-enhanced.sh \"量化交易\""
      },
      {
        "title": "记忆管理",
        "body": "# 查看记忆统计\n./scripts/stats.sh\n\n# 垃圾回收（删除低分记忆）\n./scripts/gc.sh --threshold 0.1\n\n# 晋升到长期记忆\n./scripts/promote.sh <memory_id>"
      },
      {
        "title": "统计示例",
        "body": "=== 记忆系统统计 ===\n\n总记忆数: 2,400\n共现边: 803 (连接 366 个记忆)\n平均每个记忆连接: 2.2 个\n\n记忆分布:\n- STM: 1,800 (75%)\n- LTM: 600 (25%)\n\n衰减状态:\n- Danger zone (0.15-0.35): 120 个\n- Healthy (0.35-0.65): 1,500 个\n- Strong (>0.65): 780 个"
      },
      {
        "title": "与其他系统对比",
        "body": "系统向量搜索遗忘曲线共现图Markdown 文件❌❌❌CortexGraph 原版✅✅❌Zeph 的 Hebbian✅❌✅本系统✅✅✅"
      },
      {
        "title": "设计理念",
        "body": "遗忘是功能 - 不是所有记忆都需要永久保存\n关联即记忆 - 两个记忆同时出现 = 它们有关联\n跨域桥接 - 穿衣服记录和调试记录可以关联\n个性在桥接中 - 跨域边是 personality 所在"
      },
      {
        "title": "参考",
        "body": "CortexGraph\n@Zeph 的 Hebbian 共现图帖子 (The Colony)\nEbbinghaus 遗忘曲线理论\n\n版本: 2.0.0\n结合 Ebbinghaus 遗忘曲线 + Hebbian 共现图"
      }
    ],
    "body": "增强版记忆系统\n\n结合 Ebbinghaus 遗忘曲线 + Hebbian 共现图 的双层记忆架构。\n\n架构\n┌─────────────────────────────────────────────────────────┐\n│                    记忆检索                              │\n│  semantic_search() + co_occurrence_boost() + decay()    │\n└─────────────────────────────────────────────────────────┘\n                           │\n           ┌───────────────┴───────────────┐\n           ▼                               ▼\n┌─────────────────────┐       ┌─────────────────────┐\n│   Layer 1: 向量库   │       │  Layer 2: 共现图    │\n│   (CortexGraph)     │       │  (Hebbian)          │\n│                     │       │                     │\n│ • 语义相似度        │◄─────►│ • 操作关联          │\n│ • Ebbinghaus 衰减   │       │ • 边权重衰减        │\n│ • use_count 追踪    │       │ • 跨域桥接          │\n└─────────────────────┘       └─────────────────────┘\n\n核心算法\nLayer 1: Ebbinghaus 遗忘曲线\nscore = (use_count)^β × e^(-λ × Δt) × strength\n\nβ = 0.6（使用频率权重）\nλ = ln(2) / half_life（默认 3 天）\nstrength = 1.0-2.0（重要性）\nLayer 2: Hebbian 共现图\neffective_weight = weight × 2^(-age_days / 30)\n\n每次记忆 A 和 B 同时被检索 → 边(A,B) 权重 +1\n边权重 30 天半衰期\n跨域桥接：音乐记忆 ↔ 编码记忆（因为同时发生）\n检索流程\ndef retrieve_memory(query, top_k=10):\n    # 1. 语义搜索\n    semantic_results = cortexgraph.search(query, top_k * 2)\n    \n    # 2. 共现增强\n    for mem in semantic_results:\n        co_occur_boost = get_co_occurrence_score(mem.id, recent_context)\n        mem.boosted_score = mem.semantic_score + co_occur_boost * 0.3\n    \n    # 3. 遗忘曲线过滤\n    for mem in semantic_results:\n        mem.final_score = mem.boosted_score * mem.decay_factor\n    \n    # 4. 返回 Top K\n    return sorted(semantic_results, key=lambda x: x.final_score)[:top_k]\n\n记忆类型\nSTM (短期记忆)\nJSONL 格式\n快速读写\n高衰减率（3天 half-life）\n存储日常日志\nLTM (长期记忆)\nObsidian Markdown\n永久存储\n低衰减率（30天 half-life）\n存储重要洞察\nCo-occurrence Graph\nSQLite 边表\n30天 half-life\n记录记忆之间的关联\n数据结构\nCortexGraph 记录\n{\n  \"id\": \"uuid\",\n  \"content\": \"记忆内容\",\n  \"embedding\": [0.1, 0.2, ...],\n  \"use_count\": 5,\n  \"last_used\": \"2026-02-19\",\n  \"strength\": 1.5,\n  \"created_at\": \"2026-02-15\",\n  \"tags\": [\"daily-log\", \"finding\"]\n}\n\nCo-occurrence 边\nCREATE TABLE co_occurrence (\n  memory_a TEXT,\n  memory_b TEXT,\n  weight REAL,\n  last_updated TEXT,\n  PRIMARY KEY (memory_a, memory_b)\n);\n\n使用方法\n同步记忆\n# 同步 MEMORY.md\n./scripts/sync-memory.sh\n\n# 同步每日日志\n./scripts/sync-daily.sh 2026-02-19\n\n# 记录共现\n./scripts/record-co-occurrence.sh\n\n检索记忆\n# 语义搜索\n./scripts/search.sh \"量化交易\"\n\n# 增强搜索（语义 + 共现）\n./scripts/search-enhanced.sh \"量化交易\"\n\n记忆管理\n# 查看记忆统计\n./scripts/stats.sh\n\n# 垃圾回收（删除低分记忆）\n./scripts/gc.sh --threshold 0.1\n\n# 晋升到长期记忆\n./scripts/promote.sh <memory_id>\n\n统计示例\n=== 记忆系统统计 ===\n\n总记忆数: 2,400\n共现边: 803 (连接 366 个记忆)\n平均每个记忆连接: 2.2 个\n\n记忆分布:\n- STM: 1,800 (75%)\n- LTM: 600 (25%)\n\n衰减状态:\n- Danger zone (0.15-0.35): 120 个\n- Healthy (0.35-0.65): 1,500 个\n- Strong (>0.65): 780 个\n\n与其他系统对比\n系统\t向量搜索\t遗忘曲线\t共现图\nMarkdown 文件\t❌\t❌\t❌\nCortexGraph 原版\t✅\t✅\t❌\nZeph 的 Hebbian\t✅\t❌\t✅\n本系统\t✅\t✅\t✅\n设计理念\n遗忘是功能 - 不是所有记忆都需要永久保存\n关联即记忆 - 两个记忆同时出现 = 它们有关联\n跨域桥接 - 穿衣服记录和调试记录可以关联\n个性在桥接中 - 跨域边是 personality 所在\n参考\nCortexGraph\n@Zeph 的 Hebbian 共现图帖子 (The Colony)\nEbbinghaus 遗忘曲线理论\n\n版本: 2.0.0 结合 Ebbinghaus 遗忘曲线 + Hebbian 共现图"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/guohongbin-git/memory-sync-enhanced",
    "publisherUrl": "https://clawhub.ai/guohongbin-git/memory-sync-enhanced",
    "owner": "guohongbin-git",
    "version": "2.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/memory-sync-enhanced",
    "downloadUrl": "https://openagent3.xyz/downloads/memory-sync-enhanced",
    "agentUrl": "https://openagent3.xyz/skills/memory-sync-enhanced/agent",
    "manifestUrl": "https://openagent3.xyz/skills/memory-sync-enhanced/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/memory-sync-enhanced/agent.md"
  }
}