second-brain-ingest
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSecond Brain — Ingest
第二大脑——内容导入
Process raw source documents into structured, interlinked wiki pages.
将原始源文档处理为结构化、相互关联的Wiki页面。
Identify Sources to Process
确定待处理的源文件
Determine which files need ingestion:
- If the user specifies a file or files, use those
- If the user says "process new sources" or similar, detect unprocessed files:
- List all files in (excluding
raw/)raw/assets/ - Read and extract all previously ingested source filenames from
wiki/log.mdentriesingest - Any file in not listed in the log is unprocessed
raw/
- List all files in
- If no unprocessed files are found, tell the user
判断哪些文件需要导入:
- 如果用户指定了一个或多个文件,直接使用这些文件
- 如果用户说“处理新的源文件”或类似表述,检测未处理的文件:
- 列出目录下的所有文件(排除
raw/)raw/assets/ - 读取,从
wiki/log.md记录中提取所有之前已经导入过的源文件名ingest - 所有存在于但未在日志中记录的文件即为未处理文件
raw/
- 列出
- 如果没有找到未处理文件,告知用户
Process Each Source
处理每个源文件
For each source file, follow this workflow:
对每个源文件,遵循以下工作流:
1. Read the source completely
1. 完整读取源文件
Read the entire file. If the file contains image references, note them — read the images separately if they contain important information.
读取文件全部内容。如果文件包含图片引用,做好记录——如果图片包含重要信息,单独读取图片内容。
2. Discuss key takeaways with the user
2. 和用户确认核心要点
Before writing anything, share the 3-5 most important takeaways from the source. Ask the user if they want to emphasize any particular aspects or skip any topics. Wait for confirmation before proceeding.
在撰写任何内容前,先分享源文件中3-5个最重要的要点。询问用户是否需要重点突出特定方面,或者跳过某些主题。等待用户确认后再继续后续操作。
3. Create source summary page
3. 创建源文件摘要页面
Create a new file in named after the source (slugified). Include:
wiki/sources/---
tags: [relevant, tags]
sources: [original-filename.md]
created: YYYY-MM-DD
updated: YYYY-MM-DD
---
# Source Title
**Source:** original-filename.md
**Date ingested:** YYYY-MM-DD
**Type:** article | paper | transcript | notes | etc.
## Summary
Structured summary of the source content.
## Key Claims
- Claim 1
- Claim 2
- ...
## Entities Mentioned
- [[Entity Name]] — brief context
- ...
## Concepts Covered
- [[Concept Name]] — brief context
- ...在目录下创建新文件,以源文件名称进行slug化命名。文件包含以下内容:
wiki/sources/---
tags: [relevant, tags]
sources: [original-filename.md]
created: YYYY-MM-DD
updated: YYYY-MM-DD
---4. Update entity and concept pages
源文件标题
For each entity (person, organization, product, tool) and concept (idea, framework, theory, pattern) mentioned in the source:
If a wiki page already exists:
- Read the existing page
- Add new information from this source
- Add the source to the frontmatter list
sources: - Update the date
updated: - Note any contradictions with existing content, citing both sources
If no wiki page exists:
- Create a new page in the appropriate subdirectory:
- for people, organizations, products, tools
wiki/entities/ - for ideas, frameworks, theories, patterns
wiki/concepts/
- Include YAML frontmatter with tags, sources, created, and updated fields
- Write a focused summary based on what this source says about the topic
来源: original-filename.md
导入日期: YYYY-MM-DD
类型: article | paper | transcript | notes | 其他
5. Add wikilinks
摘要
Ensure all related pages link to each other using syntax. Every mention of an entity or concept that has its own page should be linked.
[[wikilink]]源文件内容的结构化摘要。
6. Update wiki/index.md
核心观点
For each new page created, add an entry under the appropriate category header:
- [[Page Name]] — one-line summary (under 120 characters)- 观点1
- 观点2
- ...
7. Update wiki/log.md
提及的实体
Append:
## [YYYY-MM-DD] ingest | Source Title
Processed source-filename.md. Created N new pages, updated M existing pages.
New entities: [[Entity1]], [[Entity2]]. New concepts: [[Concept1]].- [[实体名称]] —— 简要上下文
- ...
8. Report results
涵盖的概念
Tell the user what was done:
- Pages created (with links)
- Pages updated (with what changed)
- New entities and concepts identified
- Any contradictions found with existing content
- [[概念名称]] —— 简要上下文
- ...
undefinedConventions
4. 更新实体和概念页面
- Source summary pages are factual only. Save interpretation and synthesis for concept and synthesis pages.
- A single source typically touches 10-15 wiki pages. This is normal and expected.
- When new information contradicts existing wiki content, update the wiki page and note the contradiction with both sources cited.
- Prefer updating existing pages over creating new ones. Only create a new page when the topic is distinct enough to warrant its own page.
- Use for all internal references. Never use raw file paths.
[[wikilinks]]
针对源文件中提及的每个实体(人物、组织、产品、工具)和概念(想法、框架、理论、模式):
如果对应的Wiki页面已存在:
- 读取现有页面内容
- 补充本次源文件中的新信息
- 将该源文件添加到frontmatter的列表中
sources: - 更新日期
updated: - 记录和现有内容存在矛盾的地方,同时标注两个来源
如果没有对应的Wiki页面:
- 在对应的子目录下创建新页面:
- 人物、组织、产品、工具相关页面放在目录下
wiki/entities/ - 想法、框架、理论、模式相关页面放在目录下
wiki/concepts/
- 人物、组织、产品、工具相关页面放在
- 页面包含YAML frontmatter,标注tags、sources、created和updated字段
- 基于本次源文件中对该主题的描述,撰写精准的摘要
—
5. 添加Wiki链接
—
确保所有相关页面通过语法相互关联。所有提及的拥有独立页面的实体或概念都要加上链接。
[[wikilink]]—
6. 更新wiki/index.md
—
针对每个新创建的页面,在对应分类标题下添加条目:
- [[页面名称]] —— 一行摘要(不超过120个字符)—
7. 更新wiki/log.md
—
追加以下内容:
undefined—
[YYYY-MM-DD] 导入 | 源文件标题
—
已处理source-filename.md。新建N个页面,更新M个现有页面。
新增实体:[[实体1]], [[实体2]]。新增概念:[[概念1]]。
undefined—
8. 反馈处理结果
—
告知用户完成的操作:
- 新建的页面(带链接)
- 更新的页面(标注修改内容)
- 识别到的新实体和新概念
- 发现的和现有内容存在矛盾的地方
—
规范约定
—
- 源文件摘要页面仅保留事实性内容。解读和整合内容放在概念页和整合页中。
- 单个源文件通常会关联10-15个Wiki页面,这是正常且符合预期的情况。
- 当新信息和现有Wiki内容冲突时,更新Wiki页面并记录矛盾点,同时标注两个信息来源。
- 优先更新现有页面而非创建新页面。只有当主题足够独立,需要单独页面承载时才新建页面。
- 所有内部引用都使用语法,禁止使用原始文件路径。
[[wikilinks]]