UNPKG

@zosmaai/pi-llm-wiki

Version:

Self-maintaining LLM Wiki for Pi โ€” Karpathy-pattern knowledge base with immutable source capture, automated ingestion, search, linting, and Obsidian-compatible vault. auto-updating personal & company wiki.

80 lines (67 loc) โ€ข 3.63 kB
# @zosmaai/pi-llm-wiki โ€” Architecture Diagram This Mermaid diagram shows the three-layer architecture of the LLM Wiki pattern. ```mermaid flowchart TB subgraph Human["๐Ÿ‘ค You (Curate & Ask)"] direction LR Sources["๐Ÿ“„ Drop Sources"] --> Questions["โ“ Ask Questions"] end subgraph LLM["๐Ÿค– LLM (Writes & Maintains)"] direction TB SKILL["๐Ÿ“œ SKILL.md Schema"] INGEST["๐Ÿ“ฅ Ingest<br/>Read โ†’ Summarize โ†’ Cross-ref"] QUERY["๐Ÿ” Query<br/>Index โ†’ Synthesize โ†’ Cite"] LINT["๐Ÿงน Lint<br/>Contradictions โ†’ Orphans โ†’ Gaps"] DISCOVER["๐ŸŒ Discover<br/>Search โ†’ Fetch โ†’ Save"] end subgraph Storage["๐Ÿ’พ File System"] direction LR RAW["raw/<br/>(immutable sources)"] WIKI["wiki/<br/>(LLM-managed markdown)"] OUTPUTS["outputs/<br/>(reports, digests)"] end subgraph Obsidian["๐Ÿ““ Obsidian Integration"] GRAPH["Graph View<br/>[[wikilinks]]"] DATAVIEW["Dataview<br/>Frontmatter queries"] DASHBOARD["Dashboard<br/>Analytics"] end Sources --> RAW RAW --> INGEST INGEST --> WIKI SKILL --> INGEST SKILL --> QUERY SKILL --> LINT SKILL --> DISCOVER DISCOVER --> RAW QUERY --> WIKI QUERY --> OUTPUTS LINT --> WIKI LINT --> OUTPUTS Questions --> QUERY WIKI --> GRAPH WIKI --> DATAVIEW WIKI --> DASHBOARD ``` ## Three-Layer Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ YOU (curate & ask) โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ wiki/ โ”‚ outputs/ โ”‚ Obsidian vault โ”‚ โ”‚ (read only) โ”‚ (reports, digests) โ”‚ (graph view, UI) โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ LLM (writes & maintains) โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ raw/ โ”‚ SKILL.md schema โ”‚ โ”‚ (immutable sources) โ”‚ (rules & conventions) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ## Three Operations | Operation | Trigger | What Happens | | ---------- | -------------------- | ------------------------------------------------------------------------------------------- | | **Ingest** | Add source to `raw/` | LLM reads, creates summary, updates 5-15 wiki pages, cross-references, flags contradictions | | **Query** | Ask any question | LLM searches index, reads relevant pages, synthesizes answer with `[[citations]]` | | **Lint** | `/wiki-lint` | Health check: contradictions, orphans, missing pages, stale claims, knowledge gaps | ## Two Modes - **๐Ÿ‘ค Personal Wiki** โ€” Learning, journaling, goals, book notes - **๐Ÿข Company Wiki** โ€” Competitive intel, change detection, battlecards