FixMap 為 AI 編碼智能體加入 2KB 記憶
Your AI agent has amnesia. I gave mine a 2KB memory.
Arsh 建立 FixMap,透過專案內的 MAP.md 和 fixbank/,讓 AI 編碼智能體保存專案脈絡及已驗證的錯誤修復。MAP.md 上限約 150 行、約 2,000 tokens;倉庫示例把了解專案所需的讀檔量由約 30,000 tokens 降至約 1,600。
Every AI coding session starts with amnesia.
The agent doesn't remember your project, so it re-reads it — dozens of files, tens of thousands of tokens — just to answer "what is this and how do I run it?" Then, mid-task, it hits an error. An error you solved together last week. It doesn't remember that either, so it debugs from zero. Sometimes it even "fixes" it a new, worse way.
I kept thinking: the fix for a forgetful teammate isn't a bigger brain. It's a notebook.
So I built FixMap — a notebook that lives inside the project, in two parts.
Part 1: MAP.md — the map (Context Diet)
One small markdown file: purpose, structure, key files, the exact commands to run / test / build, conventions, and a do-not-touch list.
The important part is the budget: ~150 lines, ~2,000 tokens, hard cap. A map that grows into documentation stops being read. The agent reads the map first — usually only the map — and starts work in seconds. In the worked example in the repo, orientation goes from ~30,000 tokens of file-reading to ~1,600.
Part 2: fixbank/ — the fix bank
Every solved error becomes one small file: the exact error signature, the context, the root cause, the fix that actually worked, the proof, and — just as important — what did not work, so nobody retries the dead ends.
Two rules make it work:
- Search before debug. An error appears → search the bank by the exact error text first.
- Bank only what's verified. Guesses don't go in the bank. Only fixes that ran and were proven.
There's a tiny ranked-search script, and a one-step script that scaffolds a new entry + index line.
It works with the agent you already use
FixMap is plain markdown plus two small shell scripts — no server, no account, no dependencies. The repo has adapters for Claude Code, Muse, Codex, Cursor and ChatGPT.
Install is one sentence to your agent:
Install FixMap for me from https://github.com/notarshzzz/fixmap — read INSTALL-FOR-AI.md and follow it.
Then, in any project, say "fixmap this" once. After that you do nothing extra — the map and the bank grow as you work.
The result
Sessions start smarter than the last one ended. Known errors get fixed in one try. And the knowledge lives in your project, not in one vendor's chat history — switch agents, keep the memory.
It's free and MIT: https://github.com/notarshzzz/fixmap
If you try it, I'd love to hear: is 150 lines the right cap for the map? What would you put in yours?
來源:DEV Community · dev.to