@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
Markdown
# @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