joshuadablo.comAll posts

October 15, 2026 · 6 min read

Give Your AI a Second Brain: Stop It Re-Reading Your Whole Codebase

Every new AI coding session starts by digging through your files again, and you pay for that in tokens. A "second brain" gives the AI a map of your project to look things up in instead.

Video not loading? Watch the reel on Facebook.

Ask an AI agent a question about your project and watch what it does first: it opens file after file, searching for the right place. Ask again tomorrow in a new session, and it does the same thing all over again. It doesn't remember. Every one of those file reads costs tokens.

The bigger your project, the worse this gets.

The idea: let the AI keep its own notes

In April 2026, Andrej Karpathy (a founding member of OpenAI and former head of AI at Tesla) shared an idea he called the LLM Wiki. Instead of re-reading raw documents for every question, the AI builds and maintains its own set of linked notes about them. Next time, it reads its notes, which are far shorter than the originals.

Think of it as the difference between re-reading a whole textbook before every exam question and checking your own summary.

Graphify: a second brain for your code

Graphify is an open-source tool inspired by that idea. Point it at a folder (code, docs, database schemas, even PDFs) and it builds a map of how everything connects: which file calls which, what depends on what. It writes the map to a few files your AI agent can query instead of searching through everything.

It also creates a visual graph you can open in your browser, which is a nice way to see a project you didn't write.

Setting it up

You need Python. Note the package name has two y's; other packages with similar names are not the real project.

pip install graphifyy
graphify install

On Windows, use graphify install --platform windows. If Windows says graphify is not recognized, install with pipx install graphifyy instead.

Then, inside Claude Code, open your project and run:

/graphify .

To make Claude Code use the map automatically in a project, run graphify claude install in that project. Codex is supported too; see the project's README for its setup.

How much does it actually save?

You'll see big numbers online, including in my own reel. Here is the honest version:

Rule of thumb: the bigger and messier your project, the more a second brain helps. For a small project with a handful of files, the AI can just read them.

No tool? Do it by hand

The habit works without any software. Ask your AI, once:

"Read this project and write a PROJECT_NOTES.md: what each folder does, the main files, how data flows, and anything surprising. Keep it under one page."

Then start every new session with "Read PROJECT_NOTES.md first." Update the notes whenever something big changes. It's a small version of the same idea, and it already saves a lot of re-reading.