# Getting AI to find things again: Markdown files and folders as the core of memory

> The memory system I share with my AI assistant: the files are the only truth, routing decides what to look at first, indexes only nominate candidates, and every answer is read back from the files.

Published 2026-11-02 · Updated 2026-11-02 · URL https://wizerdbache.com/en/notes/md-memory-overview/


I use an AI assistant (Claude Code) every day for research and coding, and over a few months it has piled up ninety projects and more than a thousand conversations. The problem I run into most is not that the AI is not smart enough. It is that **it does not remember**: the approach I settled on last week, the pitfalls I already hit, where a certain file lives. Open a new conversation and all of it is gone.

This series lays out my current approach. The core is simple: **everything worth remembering is written as a Markdown file and kept in folders**. On top of that base I add two more layers. One is “routing,” which decides what the AI sees first and which file it should read for each situation. The other is “indexing,” which helps nominate likely locations when a trail goes cold. I use only a little database, and it holds none of the truth.

The numbers below were all measured on November 2, 2026, in my own environment. This is a one-person system, not a general-purpose product. What can be copied is the approach, not the numbers.

## Conclusions first

- **Truth takes only one form**: Markdown files plus folders. Each file covers one thing and opens with a small card (what it is, aliases, status, date). People can open and read it directly, and so can the AI.
- **Routing matters more than search**: what the AI sees right at the start is kept to about 68 KB (cap about 73 KB), and everything else sits behind a lookup table of “which file to read for which situation,” read only when needed.
- **Indexes only nominate, they never answer**: every index can be deleted whole and rebuilt from the files. An index says “it may be here”; the answer always comes from opening the file and reading it.
- **Follow the trail, not a needle in a haystack**: a question first takes the cheapest route (a summary already at hand, then the project register, then the progress log, then the file), and global search is used only when the trail goes cold.
- **Writes are disciplined**: each thing has only one home; decisions are written down at the moment they are made and only appended, never edited; every always-loaded file has a size cap.

## 1. Four-layer architecture

![Four-layer architecture diagram: at the top are you and the AI assistant; the thickest layer in the middle is the truth layer, made of Markdown files and folders; above it sits the routing layer, with the rebuildable derived index beside it; and the bottom strip is write discipline.](https://wizerdbache.com/_astro/fig1-four-layers.SoreOQsM_8xzAk.webp "Each of the four layers does one job: routing decides what to read first, the truth layer is the only source of answers, and the index can be deleted and rebuilt at any time. The diagram does not show individual files or tools.")

| Layer | What it covers | Examples |
|---|---|---|
| Truth layer | Everything worth remembering, one thing per file | Memory cards, lesson cards, project register, progress logs, decision logs, note vault |
| Routing layer | What the AI sees first and which file to read next | Always-loaded instruction files, the opening summary, rules loaded only when a file is touched, lookup tables |
| Derived index | Nominates likely locations when a trail goes cold | Federated search, card index, relation graph, vector index |
| Write discipline | Keeps the three layers above findable over time | One home per fact, append-only, size caps, generated files never hand-edited |

The three posts below cover the truth layer, the routing layer, and indexing and search, in that order.

## 2. Why Markdown and folders

I have also built vector retrieval and used small databases, but in this system they are all just “indexes”; the truth has always been plain text files. There are four reasons:

1. **People and AI read the same thing**. Opening a file is enough to check what the AI remembered and what it got wrong, with no separate interface needed.
2. **Version control comes free**. The whole environment lives in git, so a memory that gets broken can be rolled back, and who changed what, and when, can always be looked up.
3. **The folders are the categories**. One folder per project and one format per kind of record, so the AI does not have to guess where to write.
4. **Indexes can be swapped at any time**. The files are the truth, and an index is only computed from them; keyword search today, vectors tomorrow, and the files do not need to change.

The cost is that once there are many files, routing and indexes are needed, or they still cannot be found. That is exactly what the two later layers are meant to solve.

## 3. Scale

| Item | Count (2026-11-02) |
|---|---|
| Markdown files in the AI environment | About 4,400 (excluding raw conversation files) |
| Registered projects | 90, one row each |
| Long-term memory cards | 175, spread across 19 folders |
| Lesson cards (pitfalls hit) | 216 |
| Decision records | About 6,900, covering about 1,700 conversations |
| Conversation summary cards | 1,323, generated from the saved raw conversation files |
| Always-loaded opening content | About 68 KB, cap about 73 KB |

## 4. Where it still falls short

> **Still being worked on**:  Retrieval matches the literal wording, so a rephrasing (for example, asking in Chinese when the notes are in English) can miss things; on the fixed 30-question test it currently gets 23 right. The relation graph and the vector index, the two derived views, are both out of date at the moment, and the system simply says “out of date, not answering” rather than forcing an answer from stale data.

- Only about 5 KB of room is left in the always-loaded opening content, so every new line has to compete for space with what is already there.
- The routing works because I am the only one writing and I keep to the same file discipline; co-writing with several people has not been tried yet.

## This series

1. Overview (this post)
2. [Truth layer: one file per thing, and folders are the categories](https://wizerdbache.com/en/notes/md-memory-truth-layer/)
3. [Routing layer: what the AI sees first when it opens, and what it reads only when a situation calls for it](https://wizerdbache.com/en/notes/md-memory-routing/)
4. [Index and lead-following search: the index only nominates, and answers come from the files](https://wizerdbache.com/en/notes/md-memory-index-search/)
5. [Slide version: the whole memory system in one sitting](https://wizerdbache.com/en/notes/md-memory-deck/)
