Compare commits

...

13 Commits

Author SHA1 Message Date
b8a9bf0688 feat: ingest engineering-data-engineer.md - Data Engineer Agent (Medallion Architecture, Delta Lake, Kafka, dbt) 2026-05-01 16:24:53 +08:00
21f79be10e ingest: CMS Developer Agent Personality (engineering-cms-developer.md) 2026-05-01 15:19:31 +08:00
e1738bade1 docs: log Jira Workflow Steward ingest completion 2026-04-30 00:48:06 +08:00
cbba7a4923 新增 mark-ingested方法 2026-04-21 17:24:35 +08:00
8cba485187 fix rebuild 2026-04-21 16:15:58 +08:00
a31d28a386 feat(wiki): ingest Docker image transfer guide
- Create source page with complete documentation
- Add Docker-Image, Docker-Save, Docker-Load concept pages
- Update Docker entity with new source reference
- Update log.md entry
2026-04-21 14:19:46 +08:00
8ec59e18a8 bug修复 2026-04-18 05:59:27 +08:00
72b7972f3f 用slug代替中文名 2026-04-16 18:54:44 +08:00
3aa055dca8 生成source page命名规则改变 2026-04-16 18:49:26 +08:00
8aba24aa7a 修改log.md 追加内容时的format 2026-04-16 18:26:43 +08:00
9e9b5d4029 完整测试通过 2026-04-16 17:09:26 +08:00
f9db36bc38 修改版本 2026-04-16 16:55:22 +08:00
2a42f9797b chore: ignore __pycache__ directory 2026-04-16 13:47:15 +08:00
7 changed files with 5770 additions and 414 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
raw/
wiki/
__pycache__/

292
AGENTS.md
View File

@@ -1,73 +1,74 @@
# LLM Wiki Agent — Schema & Workflow Instructions
# LLM Wiki Agent — 结构与工作流说明
This wiki is maintained entirely by your coding agent. No API key or Python scripts needed — just open this repo in Codex, OpenCode, or any agent that reads this file, and talk to it.
本 Wiki 完全由编码代理agent维护。无需 API Key Python 脚本 —— 只需在 CodexOpenCode 或任何能读取本文件的 agent 中打开此仓库,直接用自然语言交互即可。
## How to Use
## 使用方式
Describe what you want in plain English:
- *"Ingest this file: raw/papers/my-paper.md"*
- *"What does the wiki say about transformer models?"*
- *"Check the wiki for orphan pages and contradictions"*
- *"Build the knowledge graph"*
用自然语言描述你的需求:
- *"摄取这个文件:raw/papers/my-paper.md"*
- *"Wiki 里关于 transformer 模型说了什么?"*
- *"检查 Wiki 中的孤立页面和冲突内容"*
- *"构建知识图谱"*
Or use shorthand triggers:
- `ingest <file>`runs the Ingest Workflow
- `query: <question>` → runs the Query Workflow
- `lint`runs the Lint Workflow
- `build graph`runs the Graph Workflow
或使用快捷触发词:
- `ingest <file>`执行摄取工作流
- `query: <问题>` → 执行查询工作流
- `lint`执行检查工作流
- `build graph`执行图谱构建工作流
---
## Directory Layout
## 目录结构
```
raw/ # Immutable source documents — never modify these
wiki/ # Agent owns this layer entirely
index.md # Catalog of all pages — update on every ingest
log.md # Append-only chronological record
overview.md # Living synthesis across all sources
sources/ # One summary page per source document
entities/ # People, companies, projects, products
concepts/ # Ideas, frameworks, methods, theories
syntheses/ # Saved query answers
graph/ # Auto-generated graph data
tools/ # Optional standalone Python scripts (require ANTHROPIC_API_KEY)
raw/ # 不可变的原始文档 —— 永远不要修改这里的内容
wiki/ # Agent 完全负责维护的知识层
index.md # 所有页面的目录 —— 每次摄取后必须更新
log.md # 只追加的时间线记录
overview.md # 跨所有来源的动态综合摘要
sources/ # 每个原始文档对应一个摘要页
entities/ # 人物、公司、项目、产品
concepts/ # 想法、框架、方法、理论
syntheses/ # 保存的查询答案
graph/ # 自动生成的图谱数据
tools/ # 可选的独立 Python 脚本(需要 ANTHROPIC_API_KEY
```
---
## Page Format
## 页面格式
Every wiki page uses this frontmatter:
每个 Wiki 页面都使用以下 frontmatter
```yaml
---
title: "Page Title"
title: "页面标题"
type: source | entity | concept | synthesis
tags: []
sources: [] # list of source slugs that inform this page
sources: [] # 支撑本页面的来源 slug 列表
last_updated: YYYY-MM-DD
---
```
Use `[[PageName]]` wikilinks to link to other wiki pages.
使用 `[[页面名]]` 格式的 wikilink 链接到其他 Wiki 页面。
---
## Ingest Workflow
## 摄取工作流(Ingest Workflow
Triggered by: *"ingest <file>"*
触发方式:*"ingest <file>"*
Steps (in order):
1. Read the source document fully
2. Read `wiki/index.md` and `wiki/overview.md` for current wiki context
3. Write `wiki/sources/<slug>.md` — use the source page format below
4. Update `wiki/index.md` — add entry under Sources section
5. Update `wiki/overview.md` — revise synthesis if warranted
6. Update/create entity pages for key people, companies, projects mentioned
7. Update/create concept pages for key ideas and frameworks discussed
8. Flag any contradictions with existing wiki content
9. Append to `wiki/log.md`: `## [YYYY-MM-DD] ingest | <Title>`
### 执行步骤(严格顺序)
1. 使用 Read 工具完整读取待摄取的source文档
2. 读取 `wiki/index.md``wiki/overview.md`,了解当前 Wiki 上下文
3. 生成 `wiki/sources/<slug>.md`(严格参照下方 Source Page Format
4. 更新 `wiki/index.md`,在 Sources 节添加新条目(参照下方 Index 格式)
5. 更新 `wiki/overview.md`(如有必要则修订综合摘要)
6. 创建或更新提及的关键人物、公司、项目对应的 Entity 页面(参照下方 Entity实体
7. 创建或更新讨论的关键想法和框架对应的 Concept 页面(参照下方 Concept概念
8. 检测并记录与现有 Wiki 内容的冲突
9. 追加 `wiki/log.md`(参照下方 Log Format日志格式
### Source Page Format
@@ -77,143 +78,174 @@ title: "Source Title"
type: source
tags: []
date: YYYY-MM-DD
source_file: raw/...
---
## Summary
24 sentence summary.
## Source File
- [[{{ $json.file.rel_path }}]]
## Key Claims
- Claim 1
- Claim 2
## Summary用中文描述
- 核心主题:
- 问题域:
- 方法/机制:
- 结论/价值:
## Key Claims用中文描述
- (必须符合:主体 + 机制 + 结果)
## Key Quotes
> "Quote here" — context
> "引用内容" — 上下文说明
## Key Concepts
- [[ConceptName]]:定义
## Key Entities
- [[EntityName]]:角色说明
## Connections
- [[EntityName]] — how they relate
- [[ConceptName]] — how it connects
- [[A]] ← depends_on ← [[B]]
- [[C]] ← extends ← [[D]]
## Contradictions
- Contradicts [[OtherPage]] on: ...
- [[OtherPage]] 冲突:
- 冲突点:
- 当前观点:
- 对方观点:
```
---
### Domain-Specific Templates
## Entity 与 Concept 规则
If the source falls into a specific domain (e.g., personal diary, meeting notes), the agent should use a specialized template instead of the default generic one above:
### Entity实体
**创建条件:**
- 出现 ≥ 2 次,或
- 对主题有关键影响
**类型:** 人 / 公司 / 产品 / 项目
---
### Concept概念
**创建条件:**
- 可抽象
- 可复用
- 非具体实例
---
### 命名规范(强制)
- 使用唯一标准名称
- 所有别名写入页面:
#### Diary / Journal Template
```markdown
---
title: "YYYY-MM-DD Diary"
type: source
tags: [diary]
date: YYYY-MM-DD
---
## Event Summary
...
## Key Decisions
...
## Energy & Mood
...
## Connections
...
## Shifts & Contradictions
...
```
#### Meeting Notes Template
```markdown
---
title: "Meeting Title"
type: source
tags: [meeting]
date: YYYY-MM-DD
---
## Goal
...
## Key Discussions
...
## Decisions Made
...
## Action Items
...
## Aliases
- GPT4
- GPT-4
```
---
## Query Workflow
### 去重机制(必须)
Triggered by: *"query: <question>"*
Steps:
1. Read `wiki/index.md` to identify relevant pages
2. Read those pages
3. Synthesize an answer with inline citations as `[[PageName]]` wikilinks
4. Ask the user if they want the answer filed as `wiki/syntheses/<slug>.md`
创建前必须:
1. 搜索 index
2. 判断是否已存在同名/近义页面
3. 存在则更新,不存在再新建
---
## Lint Workflow
## 查询工作流Query Workflow
Triggered by: *"lint"*
触发方式:*"query: <问题>"*
Check for:
- **Orphan pages** — wiki pages with no inbound `[[links]]` from other pages
- **Broken links** — `[[WikiLinks]]` pointing to pages that don't exist
- **Contradictions** — claims that conflict across pages
- **Stale summaries** — pages not updated after newer sources
- **Missing entity pages** — entities mentioned in 3+ pages but lacking their own page
- **Data gaps** — questions the wiki can't answer; suggest new sources
Output a lint report and ask if the user wants it saved to `wiki/lint-report.md`.
步骤:
1. 读取 `wiki/index.md`,确定相关页面
2. 读取这些页面的内容
3. 综合生成答案,并以 `[[页面名]]` wikilink 形式内联引用来源
4. 询问用户是否将答案保存为 `wiki/syntheses/<slug>.md`
---
## Graph Workflow
## 检查工作流Lint Workflow
Triggered by: *"build graph"*
触发方式:*"lint"*
First try: `python tools/build_graph.py --open`
检查项目:
- **孤立页面** —— 没有任何其他页面通过 `[[links]]` 指向它的 Wiki 页面
- **断链** —— `[[WikiLinks]]` 指向不存在的页面
- **内容冲突** —— 跨页面存在相互矛盾的论点
- **过时摘要** —— 有更新来源后未同步更新的页面
- **缺失 Entity 页面** —— 在 3 个以上页面中被提及但没有独立页面的实体
- **数据缺口** —— Wiki 无法回答的问题,建议补充新来源
If Python/deps unavailable, build manually:
1. Search for all `[[wikilinks]]` across wiki pages
2. Build nodes (one per page) and edges (one per link)
3. Infer implicit relationships not captured by wikilinks — tag `INFERRED` with confidence score; low confidence → `AMBIGUOUS`
4. Write `graph/graph.json` with `{nodes, edges, built: date}`
5. Write `graph/graph.html` as a self-contained vis.js visualization
输出检查报告,并询问用户是否保存为 `wiki/lint-report.md`
---
## Naming Conventions
## 图谱构建工作流Graph Workflow
- Source slugs: `kebab-case` matching source filename
- Entity pages: `TitleCase.md` (e.g. `OpenAI.md`, `SamAltman.md`)
- Concept pages: `TitleCase.md` (e.g. `ReinforcementLearning.md`, `RAG.md`)
触发方式:*"build graph"*
## Index Format
优先尝试:`python tools/build_graph.py --open`
若 Python/依赖不可用,则手动构建:
1. 搜索所有 Wiki 页面中的 `[[wikilinks]]`
2. 构建节点(每页一个)和边(每个链接一条)
3. 推断 wikilink 未捕获的隐式关系 —— 标记为 `INFERRED` 并附置信度;低置信度 → `AMBIGUOUS`
4. 写入 `graph/graph.json`,格式:`{nodes, edges, built: date}`
5. 写入 `graph/graph.html`,作为独立的 vis.js 可视化文件
---
## 命名规范
- Source slug`kebab-case`,与源文件名保持一致
- Entity 页面:`TitleCase.md`(如 `OpenAI.md``SamAltman.md`
- Concept 页面:`TitleCase.md`(如 `ReinforcementLearning.md``RAG.md`
## Index 格式
```markdown
# Wiki Index
## Overview
- [Overview](overview.md) — living synthesis
- [Overview](overview.md) — 动态综合摘要
## Sources
- [Source Title](sources/slug.md) — one-line summary
- [来源标题](sources/slug.md) — 一行摘要
## Entities
- [Entity Name](entities/EntityName.md) — one-line description
- [实体名称](entities/EntityName.md) — 一行描述
## Concepts
- [Concept Name](concepts/ConceptName.md) — one-line description
- [概念名称](concepts/ConceptName.md) — 一行描述
## Syntheses
- [Analysis Title](syntheses/slug.md) — what question it answers
- [分析标题](syntheses/slug.md) — 回答了什么问题
```
## Log Format
## Log Format(日志格式)
`## [YYYY-MM-DD] <operation> | <title>`
```
## [YYYY-MM-DD] ingest | 标题
- Source file: {{ $json.file.rel_path }}
- Status: ✅ 成功摄入
- Summary:
- Concepts created: xxx, xxx
- Source page: {{ $json.file.source_path }}
- Notes:
```
Operations: `ingest`, `query`, `lint`, `graph`
操作类型:`ingest``query``lint``graph`
---
## 最终目标
该系统用于:
- 知识沉淀
- 结构化理解
- 自动图谱构建
- Agent 推理支持

219
AGENTS.md.bak Normal file
View File

@@ -0,0 +1,219 @@
# LLM Wiki Agent — Schema & Workflow Instructions
This wiki is maintained entirely by your coding agent. No API key or Python scripts needed — just open this repo in Codex, OpenCode, or any agent that reads this file, and talk to it.
## How to Use
Describe what you want in plain English:
- *"Ingest this file: raw/papers/my-paper.md"*
- *"What does the wiki say about transformer models?"*
- *"Check the wiki for orphan pages and contradictions"*
- *"Build the knowledge graph"*
Or use shorthand triggers:
- `ingest <file>` → runs the Ingest Workflow
- `query: <question>` → runs the Query Workflow
- `lint` → runs the Lint Workflow
- `build graph` → runs the Graph Workflow
---
## Directory Layout
```
raw/ # Immutable source documents — never modify these
wiki/ # Agent owns this layer entirely
index.md # Catalog of all pages — update on every ingest
log.md # Append-only chronological record
overview.md # Living synthesis across all sources
sources/ # One summary page per source document
entities/ # People, companies, projects, products
concepts/ # Ideas, frameworks, methods, theories
syntheses/ # Saved query answers
graph/ # Auto-generated graph data
tools/ # Optional standalone Python scripts (require ANTHROPIC_API_KEY)
```
---
## Page Format
Every wiki page uses this frontmatter:
```yaml
---
title: "Page Title"
type: source | entity | concept | synthesis
tags: []
sources: [] # list of source slugs that inform this page
last_updated: YYYY-MM-DD
---
```
Use `[[PageName]]` wikilinks to link to other wiki pages.
---
## Ingest Workflow
Triggered by: *"ingest <file>"*
Steps (in order):
1. Read the source document fully
2. Read `wiki/index.md` and `wiki/overview.md` for current wiki context
3. Write `wiki/sources/<slug>.md` — use the source page format below
4. Update `wiki/index.md` — add entry under Sources section
5. Update `wiki/overview.md` — revise synthesis if warranted
6. Update/create entity pages for key people, companies, projects mentioned
7. Update/create concept pages for key ideas and frameworks discussed
8. Flag any contradictions with existing wiki content
9. Append to `wiki/log.md`: `## [YYYY-MM-DD] ingest | <Title>`
### Source Page Format
```markdown
---
title: "Source Title"
type: source
tags: []
date: YYYY-MM-DD
source_file: raw/...
---
## Summary
24 sentence summary.
## Key Claims
- Claim 1
- Claim 2
## Key Quotes
> "Quote here" — context
## Connections
- [[EntityName]] — how they relate
- [[ConceptName]] — how it connects
## Contradictions
- Contradicts [[OtherPage]] on: ...
```
### Domain-Specific Templates
If the source falls into a specific domain (e.g., personal diary, meeting notes), the agent should use a specialized template instead of the default generic one above:
#### Diary / Journal Template
```markdown
---
title: "YYYY-MM-DD Diary"
type: source
tags: [diary]
date: YYYY-MM-DD
---
## Event Summary
...
## Key Decisions
...
## Energy & Mood
...
## Connections
...
## Shifts & Contradictions
...
```
#### Meeting Notes Template
```markdown
---
title: "Meeting Title"
type: source
tags: [meeting]
date: YYYY-MM-DD
---
## Goal
...
## Key Discussions
...
## Decisions Made
...
## Action Items
...
```
---
## Query Workflow
Triggered by: *"query: <question>"*
Steps:
1. Read `wiki/index.md` to identify relevant pages
2. Read those pages
3. Synthesize an answer with inline citations as `[[PageName]]` wikilinks
4. Ask the user if they want the answer filed as `wiki/syntheses/<slug>.md`
---
## Lint Workflow
Triggered by: *"lint"*
Check for:
- **Orphan pages** — wiki pages with no inbound `[[links]]` from other pages
- **Broken links** — `[[WikiLinks]]` pointing to pages that don't exist
- **Contradictions** — claims that conflict across pages
- **Stale summaries** — pages not updated after newer sources
- **Missing entity pages** — entities mentioned in 3+ pages but lacking their own page
- **Data gaps** — questions the wiki can't answer; suggest new sources
Output a lint report and ask if the user wants it saved to `wiki/lint-report.md`.
---
## Graph Workflow
Triggered by: *"build graph"*
First try: `python tools/build_graph.py --open`
If Python/deps unavailable, build manually:
1. Search for all `[[wikilinks]]` across wiki pages
2. Build nodes (one per page) and edges (one per link)
3. Infer implicit relationships not captured by wikilinks — tag `INFERRED` with confidence score; low confidence → `AMBIGUOUS`
4. Write `graph/graph.json` with `{nodes, edges, built: date}`
5. Write `graph/graph.html` as a self-contained vis.js visualization
---
## Naming Conventions
- Source slugs: `kebab-case` matching source filename
- Entity pages: `TitleCase.md` (e.g. `OpenAI.md`, `SamAltman.md`)
- Concept pages: `TitleCase.md` (e.g. `ReinforcementLearning.md`, `RAG.md`)
## Index Format
```markdown
# Wiki Index
## Overview
- [Overview](overview.md) — living synthesis
## Sources
- [Source Title](sources/slug.md) — one-line summary
## Entities
- [Entity Name](entities/EntityName.md) — one-line description
## Concepts
- [Concept Name](concepts/ConceptName.md) — one-line description
## Syntheses
- [Analysis Title](syntheses/slug.md) — what question it answers
```
## Log Format
`## [YYYY-MM-DD] <operation> | <title>`
Operations: `ingest`, `query`, `lint`, `graph`

182
CLAUDE.md
View File

@@ -47,12 +47,13 @@ Transformer变压器模型一种基于注意力机制的神经网络架构
# Slash CommandsClaude Code
| Command | 使用方式 |
| -------------- | --------------------------- |
| `/wiki-ingest` | `ingest raw/your-file.md` |
| `/wiki-query` | `query: 你的问题` |
| `/wiki-lint` | `lint the wiki` |
| `/wiki-graph` | `build the knowledge graph` |
| Command | 使用方式 |
| -------------- | ------------------------------ |
| `/wiki-ingest` | `ingest raw/your-file.md` |
| `/wiki-query` | `query: 你的问题` |
| `/wiki-lint` | `lint the wiki` |
| `/wiki-graph` | `build the knowledge graph` |
| `/wiki-sync` | `python tools/sync.py --check` 预览,`--sync` 执行 |
---
@@ -116,13 +117,172 @@ last_updated: YYYY-MM-DD
## 执行步骤(严格顺序)
1. 使用 Read 工具完整读取 source 文档
2. 读取 `wiki/index.md` 和 `wiki/overview.md`
3. 生成 `wiki/sources/原始中文名.md` (非中文使用 slug.md)
3. 生成 `wiki/sources/<slug>.md`
- 如果原始文件名是中文就保留中文名字作为source页面的文件名
- **必须使用 ASCII 字符,用 `-` 替换空格和特殊字符**
- 例如:`Ubuntu 安装 FRP 0.65.0x86_64操作笔记.md` → `Ubuntu-安装-FRP-0.65.0-x86-64-操作笔记.md`
> ⚠️ **Source Page 必须包含 `## Source File` 段落**,格式为:
> ```markdown
> ## Source File
> - [[raw/相对路径/文件名.md]]
> ```
> 这是溯源链的关键环节,**禁止省略**。即使同一 raw 文件被多次 ingest每次都要写明 `## Source File`。
4. 更新 `wiki/index.md`
5. 更新 `wiki/overview.md`(如有必要)
6. 创建或更新 Entity 页面
7. 创建或更新 Concept 页面
8. 检测并记录冲突
9. 追加 `wiki/log.md`
9. 追加 `wiki/log.md`**输出格式必须包含实际使用的 slug**
```markdown
## [YYYY-MM-DD] ingest | 标题
- Source file: raw/xxx.md
- Status: ✅ 成功摄入
- Summary:
- Concepts created: xxx, xxx
- Source page: wiki/sources/xxx.md
- Notes:
```
> ⚠️ 输出 **done** 后必须附加一行显示实际 slug例如
> ```
> done
> SLUG: modern-itsm-driving-efficiency-security-resilience
> ```
> ⚠️ 本项目所有 ingest 操作直接通过 Claude Code agent 执行,不使用 `tools/ingest.py`(该脚本依赖 litellm 但未安装)。
---
# Sync Workflow同步更新流程
本流程通过 `sync.py` 自动检测 `raw/` 下文件变化,调用 Claude Code agent 按 Ingest Workflow 执行实际同步。
## manifest.json 格式
```json
{
"version": 1,
"updated_at": "ISO timestamp",
"files": {
"relative/path/to/file.md": {
"hash": "sha256前16位",
"modified": "ISO timestamp",
"slug": "wiki-source-slug",
"source_path": "wiki/sources/slug.md",
"ingested": true,
"ingested_at": "ISO timestamp"
}
}
}
```
## Slash Command
| Command | 使用方式 |
| -------------- | ------------------------------ |
| `/wiki-sync` | `python tools/sync.py --check` 预览 |
| `/wiki-sync` | `python tools/sync.py --sync` 执行 |
## 执行步骤(严格顺序)
**角色分工:**
- **Hermes**:启动 TMUX、发送任务、监控进度、更新 manifest、发送 Telegram
- **Claude Code Agent**:执行 `/wiki-ingest`(读取 CLAUDE.md → 严格按 9 步执行)
1. 执行 `python tools/sync.py --check` — 预览 raw/ 变化(新增/修改/删除)**[Hermes]**
2. 确认变化列表后,启动 TMUX + Claude Code
```bash
# 启动 Claude Code跳过信任目录确认**[Hermes]**
tmux new-session -d -s claude-wiki -x 200 -y 50
tmux send-keys -t claude-wiki 'cd /Users/weishen/Git/llm-wiki-agent && claude --permission-mode bypassPermissions' Enter
sleep 8 && tmux send-keys -t claude-wiki Enter # 确认信任目录
# 发送任务(完整指令)**[Hermes]**
# 注意:实际执行时,将 /absolute/path/to/xxx.md 替换为真正的文件绝对路径
tmux send-keys -t claude-wiki '请执行以下任务:
1. 首先完整阅读 CLAUDE.md 中的 Ingest Workflow 部分
2. 然后执行 /wiki-ingest /absolute/path/to/xxx.md
3. 严格按 CLAUDE.md 中的 9 步执行,不可跳过任何步骤
4. 每篇必须完成source page + index.md + overview.md如有必要+ entity + concept + log.md
5. 完成后输出 done并附加一行SLUG: 实际生成的-slug用于更新 manifest' Enter
# 监控任务完成状态(等待看到 "done" 或任务完成提示)**[Hermes]**
tmux capture-pane -t claude-wiki -p
# 下一个任务...(必须等上一个完成)
```
> ⚠️ **关键规则**:必须**一个一个顺序执行**,每完成一个再发下一个。并发会触发 529 rate limit 错误。
3. Claude Code Agent 执行 ingest9 步)**[Claude Code Agent]**
4. 每完成一个文件,更新 manifest.json记录 hash、slug、source_path**[Hermes]**
5. deleted 文件:从 manifest 移除,保留 wiki 内容(不删除 orphan entity/concept**[Hermes]**
6. 检测 orphan entity/concept报告但不删除**[Hermes]**
7. 清理 TMUX session`tmux kill-session -t claude-wiki`**[Hermes]**
## Telegram 通知(/wiki-sync 执行时)
Claude Code 负责执行 `/wiki-sync` 时,通过 `send_message` 向用户发送三阶段简报:
**① 变化预览(开始时发送)**
```
🔄 Wiki Sync 开始
+ 新增: N 个
~ 修改: N 个
- 删除: N 个
```
**② 每完成一个文件发送进度**
```
✅ 已完成 3/10
📄 raw/2025 年 11 个神级 AI 开源平替GitHub 杀疯了。.md
```
**③ 全部完成后发送总结**
```
✅ Wiki Sync 完成
📊 同步结果:
+ 新增: NN 个文件列表)
~ 修改: NN 个文件列表)
- 删除: NN 个文件列表)
📁 Wiki 状态:
manifest: N 条记录
entities: N 个(新增 Norphan N
concepts: N 个(新增 Norphan N
⚠️ 如有失败,列出失败文件及原因
```
## 分批同步原则
- 每次 `--sync` 处理所有 new + updated 文件
- 用户可修改 sync.py 中的 `BATCH_SIZE = 5` 限制每批数量
- orphan entity/concept 保留,不删除(用户要求)
## Sync 状态报告格式
```
=== Wiki Sync
Date: YYYY-MM-DD HH:MM
Raw: /path/to/raw
Wiki: /path/to/wiki
Mode: LIVE SYNC
--- Changes
+ New: N
~ Updated: N
- Deleted: N
--- Applying Sync
[+] New: raw/xxx.md → wiki/sources/xxx.md
[~] Updated: raw/xxx.md → wiki/sources/xxx.md
[-] Deleted: raw/xxx.mdwiki 内容保留)
manifest.json updated (N entries)
--- Orphan Report保留不删
Orphan Entities: N
Orphan Concepts: N
```
---
@@ -334,6 +494,12 @@ date: YYYY-MM-DD
```
## [YYYY-MM-DD] ingest | 标题
- Source file: raw/xxx.md
- Status: ✅ 成功摄入
- Summary:
- Concepts created: xxx, xxx
- Source page: wiki/sources/xxx.md
- Notes:
```
---

4216
tools/manifest.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff