openclaw - 💡(How to fix) Fix memory-wiki: 支持子目录结构 [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63208Fetched 2026-04-09 07:57:00
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Code Example

sources/
  OpenClaw配置文件指南/
    AGENTS.md
    SOUL.md
  agent-skills/
    skill-xxx.md

---

sources/
  OpenClaw配置文件指南/
    AGENTS.md  → pageId: source.OpenClaw配置文件指南.AGENTS
    SOUL.md    → pageId: source.OpenClaw配置文件指南.SOUL

---

{
  "ingest": {
    "recursive": true  // 递归扫描子目录
  }
}
RAW_BUFFERClick to expand / collapse

问题描述

当前 memory-wiki 的 compile 只扫描各目录根目录下的 .md 文件,不支持子目录结构。

当前行为

vault layout:

sources/
  OpenClaw配置文件指南/
    AGENTS.md
    SOUL.md
  agent-skills/
    skill-xxx.md

运行 openclaw wiki compile

  • 只识别 sources/*.md(根目录)
  • 不识别 sources/OpenClaw配置文件指南/*.md(子目录)

测试结果:

  • 把文件放到 sources/ 根目录 → 识别并索引
  • 放到子目录 → 不识别

期望行为

支持递归扫描子目录,保持用户的目录组织结构:

sources/
  OpenClaw配置文件指南/
    AGENTS.md  → pageId: source.OpenClaw配置文件指南.AGENTS
    SOUL.md    → pageId: source.OpenClaw配置文件指南.SOUL

或通过配置项控制:

{
  "ingest": {
    "recursive": true  // 递归扫描子目录
  }
}

使用场景

用户有现有的笔记目录结构(如 Obsidian vault),希望导入到 memory-wiki 并保持原有组织:

  • 技术文档按主题分目录
  • 项目笔记按项目名分目录
  • 知识库按领域分目录

当前只能平铺到根目录,丢失原有的组织结构。

替代方案

当前用户可以:

  1. 直接用 Obsidian 打开 wiki vault(绕过 compile 索引)
  2. 手动平铺文件 + 通过 id 区分来源

但这些都不能享受 memory-wiki 的结构化 claims、digest、dashboard 功能。

相关文档

extent analysis

TL;DR

To fix the issue, modify the openclaw wiki compile command to support recursive scanning of subdirectories or add a configuration option to enable recursive scanning.

Guidance

  • Modify the openclaw wiki compile command to recursively scan subdirectories by updating the directory traversal logic.
  • Add a configuration option, such as "ingest": { "recursive": true }, to control whether subdirectories are scanned.
  • Update the indexing logic to handle page IDs with subdirectory paths, such as source.OpenClaw配置文件指南.AGENTS.
  • Test the updated command with different directory structures to ensure it works as expected.

Example

No code snippet is provided as the issue does not contain enough information about the implementation details.

Notes

The solution may require updates to the openclaw wiki compile command, the indexing logic, and possibly the configuration parsing code. The exact implementation details are not provided in the issue.

Recommendation

Apply a workaround by modifying the openclaw wiki compile command to support recursive scanning of subdirectories, as this is the most direct way to address the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING