From fc54e0dba8c1e04a5b9923a11050f48ac8972105 Mon Sep 17 00:00:00 2001 From: richarjiang Date: Wed, 15 Apr 2026 11:13:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9D=E5=A7=8B=E5=8C=96=20llm=20iwi?= =?UTF-8?q?ki?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .obsidian/app.json | 3 + .obsidian/appearance.json | 1 + .obsidian/core-plugins.json | 33 +++++++ .obsidian/graph.json | 22 +++++ .obsidian/workspace.json | 192 ++++++++++++++++++++++++++++++++++++ CLAUDE.md | 112 +++++++++++++++++++++ wiki/index.md | 28 ++++++ wiki/log.md | 11 +++ 8 files changed, 402 insertions(+) create mode 100644 .obsidian/app.json create mode 100644 .obsidian/appearance.json create mode 100644 .obsidian/core-plugins.json create mode 100644 .obsidian/graph.json create mode 100644 .obsidian/workspace.json create mode 100644 CLAUDE.md create mode 100644 wiki/index.md create mode 100644 wiki/log.md diff --git a/.obsidian/app.json b/.obsidian/app.json new file mode 100644 index 0000000..eda8712 --- /dev/null +++ b/.obsidian/app.json @@ -0,0 +1,3 @@ +{ + "attachmentFolderPath": "assets" +} diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.obsidian/appearance.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json new file mode 100644 index 0000000..639b90d --- /dev/null +++ b/.obsidian/core-plugins.json @@ -0,0 +1,33 @@ +{ + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "footnotes": false, + "properties": true, + "page-preview": true, + "daily-notes": true, + "templates": true, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": false, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": true, + "bases": true, + "webviewer": false +} \ No newline at end of file diff --git a/.obsidian/graph.json b/.obsidian/graph.json new file mode 100644 index 0000000..046165d --- /dev/null +++ b/.obsidian/graph.json @@ -0,0 +1,22 @@ +{ + "collapse-filter": true, + "search": "", + "showTags": false, + "showAttachments": false, + "hideUnresolved": false, + "showOrphans": true, + "collapse-color-groups": true, + "colorGroups": [], + "collapse-display": true, + "showArrow": false, + "textFadeMultiplier": 0, + "nodeSizeMultiplier": 1, + "lineSizeMultiplier": 1, + "collapse-forces": true, + "centerStrength": 0.518713248970312, + "repelStrength": 10, + "linkStrength": 1, + "linkDistance": 250, + "scale": 1.992301859915002, + "close": false +} \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json new file mode 100644 index 0000000..d7657b0 --- /dev/null +++ b/.obsidian/workspace.json @@ -0,0 +1,192 @@ +{ + "main": { + "id": "c904bff9f1809506", + "type": "split", + "children": [ + { + "id": "37b384f6703532f4", + "type": "tabs", + "children": [ + { + "id": "07a6f5425ad166a7", + "type": "leaf", + "state": { + "type": "graph", + "state": {}, + "icon": "lucide-git-fork", + "title": "关系图谱" + } + } + ] + } + ], + "direction": "vertical" + }, + "left": { + "id": "b747ed72b5949dd0", + "type": "split", + "children": [ + { + "id": "6d5749264494a85f", + "type": "tabs", + "children": [ + { + "id": "7cfc0b6455181a1d", + "type": "leaf", + "state": { + "type": "file-explorer", + "state": { + "sortOrder": "alphabetical", + "autoReveal": false + }, + "icon": "lucide-folder-closed", + "title": "文件列表" + } + }, + { + "id": "67ffba76b779e2aa", + "type": "leaf", + "state": { + "type": "search", + "state": { + "query": "", + "matchingCase": false, + "explainSearch": false, + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical" + }, + "icon": "lucide-search", + "title": "搜索" + } + }, + { + "id": "138fba9bc595392e", + "type": "leaf", + "state": { + "type": "bookmarks", + "state": {}, + "icon": "lucide-bookmark", + "title": "书签" + } + } + ] + } + ], + "direction": "horizontal", + "width": 300 + }, + "right": { + "id": "8c6b8d4eadac9db0", + "type": "split", + "children": [ + { + "id": "8e37d49ebfe902b5", + "type": "tabs", + "children": [ + { + "id": "1a380483b92619ed", + "type": "leaf", + "state": { + "type": "backlink", + "state": { + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical", + "showSearch": false, + "searchQuery": "", + "backlinkCollapsed": false, + "unlinkedCollapsed": true + }, + "icon": "links-coming-in", + "title": "反向链接" + } + }, + { + "id": "9dc96dc60b63adf6", + "type": "leaf", + "state": { + "type": "outgoing-link", + "state": { + "linksCollapsed": false, + "unlinkedCollapsed": true + }, + "icon": "links-going-out", + "title": "出链" + } + }, + { + "id": "5de1b101fe3c9474", + "type": "leaf", + "state": { + "type": "tag", + "state": { + "sortOrder": "frequency", + "useHierarchy": true, + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-tags", + "title": "标签" + } + }, + { + "id": "dacd8aa8ef5549d6", + "type": "leaf", + "state": { + "type": "all-properties", + "state": { + "sortOrder": "frequency", + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-archive", + "title": "添加笔记属性" + } + }, + { + "id": "aa1135bf92837366", + "type": "leaf", + "state": { + "type": "outline", + "state": { + "followCursor": false, + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-list", + "title": "大纲" + } + } + ] + } + ], + "direction": "horizontal", + "width": 300, + "collapsed": true + }, + "left-ribbon": { + "hiddenItems": { + "switcher:打开快速切换": false, + "graph:查看关系图谱": false, + "canvas:新建白板": false, + "daily-notes:打开/创建今天的日记": false, + "templates:插入模板": false, + "command-palette:打开命令面板": false, + "bases:新建数据库": false + } + }, + "active": "07a6f5425ad166a7", + "lastOpenFiles": [ + "CLAUDE.md", + "wiki/log.md", + "wiki/index.md", + "assets", + "wiki/topics", + "wiki/sources", + "wiki/meta", + "wiki/ideas", + "wiki/entities", + "wiki" + ] +} \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..33f4346 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,112 @@ +# 知识库 Schema — 内容创作者 Wiki + +本知识库用于沉淀小红书、微信公众号等平台的内容素材,提炼主题,积累创作灵感。 +LLM 负责 wiki 层的全部写作和维护,人负责素材投喂、方向引导和最终创作。 + +--- + +## 三层架构 + +| 层 | 位置 | 所有者 | 说明 | +|---|---|---|---| +| Raw | 根目录(`*.md`、子文件夹均可) | 人 | 原始素材,不可变。文章剪藏、笔记截图、灵感草稿等 | +| Wiki | `wiki/` | LLM | 生成的结构化页面,人只读 | +| Schema | 本文件 (`CLAUDE.md`) | 人 + LLM | 约定与规则,需要调整时先改此文件 | + +### Raw 素材存放约定 +- 根目录下直接放 markdown 文件或按来源建子目录(如 `小红书/`、`公众号/`、`播客/`) +- 图片统一放 `assets/`,Obsidian 附件路径已配置指向此处 +- 文件名格式:`来源-标题.md` 或自由命名,无强制要求 + +### Wiki 目录结构 + +``` +wiki/ +├── index.md # 内容目录,LLM 每次 ingest 后更新 +├── log.md # 操作日志,append-only +├── sources/ # 每篇素材的摘要页(一对一) +├── topics/ # 主题/选题方向(多素材归纳) +├── entities/ # 实体页:人物、品牌、产品、账号 +├── ideas/ # 创作灵感、选题构思、内容框架 +└── meta/ # 方法论、风格指南等元知识 +``` + +--- + +## 页面规范 + +### Frontmatter(所有 wiki 页面必须包含) + +```yaml +--- +type: source | topic | entity | idea | meta +created: YYYY-MM-DD +updated: YYYY-MM-DD +tags: [] # 自由标签,小写,用短横线连接 +sources: [] # 关联的 raw 文件路径(source 页必填) +--- +``` + +### Source 页(`wiki/sources/`) +- 文件名:`{来源缩写}-{关键词}.md`,如 `xhs-护肤成分科普.md` +- 内容:原文核心观点摘要、关键数据/金句、可复用的内容角度 +- 必须标注原始素材路径 + +### Topic 页(`wiki/topics/`) +- 围绕一个选题方向,综合多个 source +- 包含:主题概述、关键论点、素材引用、潜在创作角度 +- 当 3+ 个 source 涉及同一主题时应创建 topic 页 + +### Entity 页(`wiki/entities/`) +- 人物、品牌、产品、账号等 +- 包含:基本信息、相关内容汇总、值得关注的点 + +### Idea 页(`wiki/ideas/`) +- 创作灵感和选题构思 +- 包含:核心 hook、目标受众、参考素材链接、初步大纲 +- 状态标记:`draft` / `ready` / `published` / `abandoned` + +--- + +## 操作流程 + +### Ingest(投喂素材) + +1. 读取 raw 素材全文 +2. 与用户讨论关键要点(除非用户要求批量处理) +3. 在 `wiki/sources/` 创建摘要页 +4. 检查是否需要:创建/更新 topic 页、创建/更新 entity 页、生成 idea 页 +5. 更新 `wiki/index.md` +6. 追加 `wiki/log.md` 条目:`## [YYYY-MM-DD] ingest | {标题}` + +### Query(查询) + +1. 先读 `wiki/index.md` 定位相关页面 +2. 读取相关 wiki 页面,综合回答 +3. 有价值的分析结果应存为新 wiki 页面(idea 或 topic) +4. 追加 log 条目:`## [YYYY-MM-DD] query | {问题摘要}` + +### Lint(健康检查) + +定期执行,检查: +- 孤立页面(无入链) +- 过时内容(source 更新但 topic 未同步) +- 缺失的交叉引用 +- 有素材积累但未创建的 topic +- idea 页面状态是否需要更新 +- 追加 log 条目:`## [YYYY-MM-DD] lint | 检查结果摘要` + +--- + +## 链接与引用 + +- Wiki 页之间用 Obsidian 双链:`[[wiki/topics/护肤成分]]` +- 引用 raw 素材用相对路径:`[[小红书/某篇笔记.md]]` +- 页面内引用具体段落时用 blockquote + 来源标注 + +--- + +## Obsidian 配置备忘 + +- 附件目录:`assets/` +- 推荐插件:Dataview(frontmatter 查询)、Graph View(关系可视化)、Marp(幻灯片) diff --git a/wiki/index.md b/wiki/index.md new file mode 100644 index 0000000..75122a2 --- /dev/null +++ b/wiki/index.md @@ -0,0 +1,28 @@ +--- +type: meta +updated: 2026-04-15 +--- + +# Wiki Index + +知识库内容目录。LLM 每次 ingest 后更新此文件。 + +## Sources + + +_暂无内容_ + +## Topics + + +_暂无内容_ + +## Entities + + +_暂无内容_ + +## Ideas + + +_暂无内容_ diff --git a/wiki/log.md b/wiki/log.md new file mode 100644 index 0000000..0e837d0 --- /dev/null +++ b/wiki/log.md @@ -0,0 +1,11 @@ +--- +type: meta +--- + +# Wiki Log + +操作日志,按时间倒序。每条以 `## [日期] 动作 | 标题` 格式记录。 + +## [2026-04-15] init | 知识库初始化 + +创建三层架构:raw(根目录)→ wiki → schema(CLAUDE.md)。