Compile articles, documents, or notes into a structured wiki knowledge base. Use when user says 'ingest to wiki', 'compile to knowledge base', 'update wiki', 'wiki ingest', 'add this to wiki', or invokes /wiki-ingest. Supports single or batch ingest. Triggers: wiki, ingest, knowledge base, compile, digest, index, catalog.
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 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
Accept user-specified content source:
If user doesn't specify a wiki path, use wiki/. Create the directory if it doesn't exist.
Read wiki/index.md (if exists) to understand existing pages and avoid duplicates.
Extract from content:
concepts/): Abstract ideas, terminology, theoriesproducts/): Specific products, tools, servicespatterns/): Engineering patterns, design decisions, methodologiescomparisons/): Cross-product or cross-approach analysisExtraction threshold: An entity deserves its own page only if it would be referenced by other pages.
Each entity maps to one wiki page.
→ Load references/page-templates.md for page templates.
Rules:
Check all existing wiki pages. If new content involves concepts referenced in other pages:
Add new page entries to wiki/index.md, organized by category.
Append to wiki/log.md:
## 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
Tell user: what pages were created, what pages were updated, what new cross-references were established.
agent-loop.md, kv-cache.md[[category/page-name]] double-link format (Obsidian-compatible), e.g. [[concepts/agent-loop]], [[products/claude-code]]