Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
ADR-0013 — Knowledge Wiki replaces the legacy flat-file Curator
Status: Proposed · Date: 2026-05-11 · Phase: Memory rebuild (B0)
Context
Dodaios already keeps long-term notes via the legacy
dodaios/memory/curator/ merger, which writes free-form Markdown into a
small set of flat files under data/workspace/: USER.md, MEMORY.md,
soul.md, and per-person files under people/. The legacy design has
two failure modes that are now observable in practice:
- Knowledge gets trapped per file. A new fact about a person tends
to land in
MEMORY.mdeven when the canonical home is thepeople/<name>.mdpage. Cross-cutting facts have no good home, so they get duplicated or lost. - Maintenance is an unstructured rewrite. The merger reads the target file end-to-end and asks an LLM to "merge in" the new fact. With more than ~50 entries the LLM starts dropping or paraphrasing older content. There is no append-only audit trail.
Andrej Karpathy's LLM Wiki pattern (public gist 442a6bf, April 2026)
addresses exactly this. Core idea: the LLM is not a retriever, it is a
wiki editor. Knowledge is compiled once into a structured vault of
markdown pages with cross-references, and updates touch 10-15 pages per
ingest rather than rewriting one file wholesale. Read happens via FTS5
- structured links, not vector retrieval.
The pattern aligns well with Dodaios because:
data/workspace/is already a markdown vault — the move is from flat to structured, not from one storage to another.- Obsidian (free for personal use) gives instant visualisation of the graph, search, and editing, with no integration work on our side.
- Markdown + Git is portable and human-readable; if Dodaios ever dies, the user keeps every fact in a format every editor can open.
Decision
We introduce a three-tier memory hierarchy. This ADR covers the long-term tier; the mid-term tier is added in B7 and is consistent with the same vault layout.
| Tier | Lifespan | Lives in | Read by |
|---|---|---|---|
| Short-term | seconds to 30 min | AwarenessManager.state (RAM) |
awareness-snapshot tool |
| Mid-term | last 3-5 sessions | data/workspace/sessions/*.md (this vault) |
system-prompt injector |
| Long-term | permanent | data/workspace/{entities,concepts,projects}/*.md (this vault) |
wiki-recall tool + system-prompt injector |
The long-term tier is structured per the Karpathy contract documented
in data/workspace/schema.md:
- Entity pages for concrete things (one file per Person, Tool, Repository, Service, Device).
- Concept pages for abstract recurring ideas.
- Project pages for active workstreams.
- An append-only
log.mdfor chronology. - A human-readable
index.mdas table of contents. - Cross-references via Obsidian-style
[[wikilinks]], validated by the curator (no dangling links allowed).
A new WikiCurator (Phase B1) replaces the legacy Curator-Merger.
The legacy merger remains active during B0-B1 to avoid data loss; B4
removes it once the new path is proven.
The vault is read by the Brain along three paths:
- System-prompt injection — a compact excerpt block at the top of
every Brain call, generated by a
WikiPromptInjectorthat runs FTS5 on the latest user utterance. Adds ~1500 chars / ~400 tokens. wiki-recalltool — explicit BM25 search the Brain can call when the system-prompt excerpt is insufficient.wiki-page-readtool — full page read after the Brain notices a relevant[[wikilink]]in the excerpt.
Writes happen exclusively through the WikiCurator and are always
async (10-15 page updates per ingest can take 30-60s with Haiku; the
voice path must never block on them).
Consequences
- Existing flat files are migrated, not deleted.
scripts/wiki_migrate_v0_to_v1.py(B0.2) converts the legacy layout to the new one. Originals are backed up todata/backups/wiki-migrate-<ts>.tar.gzbefore any rewrite. The legacy curator keeps running until B4. - Obsidian becomes the recommended viewer. No code dependency
on Obsidian — Dodaios runs the same whether Obsidian is
installed or not. The desktop app gains its own in-app wiki view
in B3 using
react-force-graph+react-markdown(both MIT). - Awareness Layer (A0-A5) is unchanged. The short-term and mid-term pipelines feed into the wiki; the wiki never reaches back into the RAM state. Episode summaries become a primary curator input source.
- No vector embeddings in the primary path. FTS5 + wiki structure is sufficient at the 100-500 page scale we target. A vector index can be added later as a secondary rerank layer if FTS5 recall falls short; it is not a Phase-B prerequisite.
- Migration risk is bounded. The legacy files stay on disk and the
legacy curator keeps writing to them until B4. If B1-B3 prove
unstable, rolling back is
rm -rf data/workspace/{entities,concepts,projects,sessions}and restarting Dodaios — no data loss because the legacy files were never modified.
Alternatives Considered
- Keep the flat-file Curator-Merger, just add more files. Rejected — the failure modes are inherent to the unstructured-rewrite pattern, not to file count.
- Move to a vector-DB-only memory. Rejected — opaque to the user, unmaintainable when a fact is wrong, and Karpathy's explicit anti-pattern: "the LLM rediscovers knowledge from scratch on every query."
- Hosted SaaS memory (mem0, MemGPT cloud, etc.). Rejected — the user's whole point is that Dodaios is local, private, and portable. SaaS lock-in is a non-starter.
- Notion/Obsidian Sync as the storage layer. Rejected for storage, accepted for viewing. The vault stays as plain markdown files on disk; Obsidian opens them but does not own them.
References
- Karpathy, A. (April 2026). "LLM Wiki: Technical Architecture Summary."
GitHub Gist
442a6bf555914893e9891c11519de94f. data/workspace/schema.md— the maintenance contract this ADR commits to.JARVIS_AWARENESS_PLAN.md— the L1+L2 short-term tier this vault complements.- ADR-0009 (Self-Healing Worker-Critic) — the mission pipeline that will feed mission outcomes into the wiki in B6.
- ADR-0012 — Awareness Phase A3 routing decision, the immediate predecessor of this work.