This repo follows the LLM Wiki pattern (Karpathy gist): a persistent, interlinked markdown layer between you and raw sources.
| Layer | Location | Who edits |
|---|---|---|
| Raw sources | raw/ |
You only — immutable inputs (clippings, exports, notes) |
| Wiki | wiki/ |
The assistant (tools + IDE) — summaries, entities, synthesis |
| Runtime state | data/ (gitignored) |
App — chats, memories, QMD index, SQLite |
wiki/index.md— catalog: every wiki page linked with a one-line summary; group by category (entities, concepts, sources, etc.). Update on every ingest that adds or renames pages.wiki/log.md— append-only timeline. Use a consistent heading prefix, e.g.## [YYYY-MM-DD] ingest | Short titleorquery | …/lint | …, so Unix tools can grep it.
- Read the new file(s); extract claims, entities, and how they relate to existing wiki pages.
- Create or update wiki pages; add
[[wikilinks]]or markdown links to related pages. - If new information contradicts the wiki, surface the contradiction on the relevant pages (don’t silently overwrite without noting conflict).
- Update
wiki/index.mdand append a section towiki/log.md. - Run
qmd_update(or let the app’s end-of-turn refresh run) so QMD picks up changes.
- Prefer reading
wiki/index.mdfirst to find relevant pages, then open those files (orqmd_search/qmd_querywith collectionllm-wikiwhen needed). - Answer with citations to wiki paths or raw paths when applicable.
- Valuable answers (comparisons, analyses) may be saved as new wiki pages and linked from
index.md, then logged inlog.md.
- Contradictions between pages; stale claims superseded by newer sources.
- Orphan pages (no inbound links); missing entity pages for important terms.
- Gaps worth a web search or a new raw source.
- Prefer
wiki/topics/…,wiki/entities/…, or flatwiki/Topic-Name.md— stay consistent once chosen. - File names:
kebab-caseorTitle-Case— pick one style per wiki.
wiki_read/wiki_write— paths relative towiki/only.wiki_append_log— appends a dated block towiki/log.md.raw_read— paths relative toraw/only (read-only).- After wiki changes, call
qmd_updateif you need immediate search visibility before the next chat turn.
When editing the wiki in Cursor: follow this file, keep raw/ read-only, and preserve append-only structure in log.md (append at bottom).