Process raw source documents into wiki pages. Use when the user adds files to raw/ and wants them ingested, says "process this source", "ingest this article", "I added something to raw/", or wants to incorporate new material into their knowledge base.
Process raw source documents into structured, interlinked wiki pages.
Determine which files need ingestion:
raw/ (excluding raw/assets/)wiki/log.md and extract all previously ingested source filenames from ingest entriesraw/ not listed in the log is unprocessedFor each source file, follow this workflow:
Read the entire file. If the file contains image references, note them — read the images separately if they contain important information.
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.
Create a new file in wiki/sources/ named after the source (slugified). Include:
---
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
- ...
For each entity (person, organization, product, tool) and concept (idea, framework, theory, pattern) mentioned in the source:
If a wiki page already exists:
sources: frontmatter listupdated: dateIf no wiki page exists:
wiki/entities/ for people, organizations, products, toolswiki/concepts/ for ideas, frameworks, theories, patternsEnsure all related pages link to each other using [[wikilink]] syntax. Every mention of an entity or concept that has its own page should be linked.
For each new page created, add an entry under the appropriate category header:
- [[Page Name]] — one-line summary (under 120 characters)
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]].
Tell the user what was done:
[[wikilinks]] for all internal references. Never use raw file paths.After ingesting sources, the user can:
/second-brain-query to explore what was ingested/second-brain-ingest again/second-brain-lint after every 10 ingests to catch gaps