Ingest a source document or URL into the LLM wiki. Triggers when the user provides a file path like "raw/...", pastes a URL, or says "ingest", "add to the wiki", "process this", "read this into the wiki". Creates source, entity, and concept pages; updates index, overview, and log.
The core write operation. Every ingest ripples across the wiki — it doesn't just create a new page, it updates every related page, flags contradictions, and revises the living overview.
Read wiki/index.md and wiki/overview.md to understand the current wiki state before touching anything.
File path (e.g. raw/papers/llama2.md): use #tool:read/readFile.
URL: use #tool:web/fetch to retrieve full content, then save a clean markdown copy to raw/<category>/<slug>.md before processing. Ask the user which category folder fits (raw/articles/, raw/papers/, raw/notes/, etc.).
Before writing any files, briefly list what you plan to create:
📋 Ingest plan for: [Source Title]
New pages:
- wiki/sources/slug.md
- wiki/entities/Name.md (new)
- wiki/concepts/Name.md (new)
Pages to update:
- wiki/entities/ExistingName.md (add appearance)
- wiki/concepts/ExistingConcept.md (add source ref)
Contradictions detected: [none | list]
Proceed? (say "yes" or trim the list)
Wait for user confirmation before writing files.
Extract from the source:
Synthesis structure: Summary → Key Claims (with citations) → Connections (wikilinks) → Contradictions
Create wiki/sources/<slug>.md:
---