wiki-ingest

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Wiki Ingest — Knowledge Base Compiler

Wiki Ingest — 知识库编译工具

Compile any text content (articles, documents, notes) into structured wiki pages with cross-references, building a searchable, interconnected knowledge network.
IRON LAW: One wiki page = one knowledge entity. Never cram multiple concepts into one page.
将任意文本内容(文章、文档、笔记)编译为带有交叉引用的结构化Wiki页面,构建一个可搜索、相互关联的知识网络。
铁则:一个Wiki页面 = 一个知识实体。切勿将多个概念塞进同一个页面。

Wiki Directory Structure

Wiki目录结构

Wiki defaults to
wiki/
under the current project root. User may specify a different path.
wiki/
├── index.md              # Full table of contents
├── log.md                # Append-only operation log
├── concepts/             # Core concept pages
├── products/             # Product/tool entity pages
├── patterns/             # Engineering patterns & design decisions
└── comparisons/          # Cross-topic comparison pages
Wiki默认位于当前项目根目录下的
wiki/
文件夹。用户可指定其他路径。
wiki/
├── index.md              # Full table of contents
├── log.md                # Append-only operation log
├── concepts/             # Core concept pages
├── products/             # Product/tool entity pages
├── patterns/             # Engineering patterns & design decisions
└── comparisons/          # Cross-topic comparison pages

Workflow

工作流程

1. Confirm Input

1. 确认输入

Accept user-specified content source:
  • Pasted text directly
  • File path(s) (md, txt, pdf, etc.)
  • Directory path (batch processing)
If user doesn't specify a wiki path, use
wiki/
. Create the directory if it doesn't exist.
接受用户指定的内容来源:
  • 直接粘贴的文本
  • 文件路径(md、txt、pdf等格式)
  • 目录路径(批量处理)
如果用户未指定Wiki路径,则使用
wiki/
。若目录不存在则创建。

2. Check Existing Wiki

2. 检查现有Wiki

Read
wiki/index.md
(if exists) to understand existing pages and avoid duplicates.
读取
wiki/index.md
(若存在),了解现有页面以避免重复。

3. Extract Knowledge Entities

3. 提取知识实体

Extract from content:
  • Concepts (
    concepts/
    ): Abstract ideas, terminology, theories
  • Products (
    products/
    ): Specific products, tools, services
  • Patterns (
    patterns/
    ): Engineering patterns, design decisions, methodologies
  • Comparisons (
    comparisons/
    ): Cross-product or cross-approach analysis
Extraction threshold: An entity deserves its own page only if it would be referenced by other pages.
从内容中提取:
  • Concepts
    concepts/
    ):抽象概念、术语、理论
  • Products
    products/
    ):特定产品、工具、服务
  • Patterns
    patterns/
    ):工程模式、设计决策、方法论
  • Comparisons
    comparisons/
    ):跨产品或跨方法分析
提取阈值:只有当某一实体会被其他页面引用时,才值得为其创建独立页面。

4. Create or Update Pages

4. 创建或更新页面

Each entity maps to one wiki page.
→ Load references/page-templates.md for page templates.
Rules:
  • If page already exists → update it, append new information, don't overwrite existing content
  • Keep the one-line definition stable unless the new content provides a clearly better one
  • Prioritize updating "Sources" and "Related Pages" sections
每个实体对应一个Wiki页面。
→ 加载references/page-templates.md获取页面模板。
规则:
  • 若页面已存在 → 更新页面,追加新信息,切勿覆盖现有内容
  • 除非新内容提供明显更优的定义,否则保持单行定义稳定
  • 优先更新「来源」和「相关页面」部分

5. Update Cross-References

5. 更新交叉引用

Check all existing wiki pages. If new content involves concepts referenced in other pages:
  • Update their Related Pages list
  • Update their Sources list
  • Supplement new information in their detail sections
检查所有现有Wiki页面。若新内容涉及其他页面中引用的概念:
  • 更新它们的相关页面列表
  • 更新它们的来源列表
  • 在它们的详细部分补充新信息

6. Update index.md

6. 更新index.md

Add new page entries to
wiki/index.md
, organized by category.
将新页面条目添加到
wiki/index.md
中,按类别组织。

7. Append to log.md

7. 追加到log.md

Append to
wiki/log.md
:
markdown
undefined
追加内容到
wiki/log.md
markdown
undefined

YYYY-MM-DD: Ingest <source title>

YYYY-MM-DD: Ingest <source title>

Source: <file path or "user input"> New pages: list newly created pages Updated pages: list modified pages New cross-references: list newly established links
undefined
Source: <file path or "user input"> New pages: list newly created pages Updated pages: list modified pages New cross-references: list newly established links
undefined

8. Report Results

8. 报告结果

Tell user: what pages were created, what pages were updated, what new cross-references were established.
告知用户:创建了哪些页面、更新了哪些页面、建立了哪些新的交叉引用。

File Naming

文件命名规则

  • All lowercase, hyphen-separated:
    agent-loop.md
    ,
    kv-cache.md
  • Name by entity, not by number
  • 全部小写,连字符分隔:
    agent-loop.md
    kv-cache.md
  • 按实体命名,而非按编号

Cross-Reference Format

交叉引用格式

  • Use
    [[category/page-name]]
    double-link format (Obsidian-compatible), e.g.
    [[concepts/agent-loop]]
    ,
    [[products/claude-code]]
  • Always include the category prefix to avoid ambiguity across directories
  • List all related pages at the bottom of each page
  • 使用
    [[category/page-name]]
    双链接格式(兼容Obsidian),例如
    [[concepts/agent-loop]]
    [[products/claude-code]]
  • 始终包含类别前缀,避免跨目录的歧义
  • 在每个页面底部列出所有相关页面

Guidelines

指南

  • Never create duplicate pages — always check wiki/ first
  • Don't extract trivial entities — if a concept appears once and won't be referenced elsewhere, skip it
  • For batch processing: extract all entities first, then create pages and update references in one pass to avoid inconsistent intermediate states
  • Always update index.md and log.md after every ingest
  • 切勿创建重复页面 — 务必先检查wiki/目录
  • 不要提取无关紧要的实体 — 如果某个概念仅出现一次且不会被其他页面引用,则跳过
  • 批量处理时:先提取所有实体,再一次性创建页面并更新引用,避免出现不一致的中间状态
  • 每次导入后务必更新index.md和log.md