Back to blog

My second brain tidies itself up while I sleep. Nothing gets deleted.

A memory that only grows turns into a junk drawer. Mine had duplicate notes, dead links and decisions that contradicted each other. So I built a night shift: a small job that reads the notes on my own machine, proposes what to merge and archive, and mails me in the morning. It deletes nothing, and nothing changes until I say yes.

Gaëtan Steijaert
Written by Gaëtan Steijaert Process analyst and software architect from Ghent

A while ago I wrote about the folder of plain text files that holds everything I need to remember about my projects. That folder has one problem a head doesn't have: it never forgets, and it never cleans up. After a few months it had hundreds of notes. The same subject sat in six places. A price existed in three versions, and only one was still true. Links pointed at notes that had been renamed. Half the "waiting on" items were weeks old and nobody was waiting anymore.

My AI reads that folder before every task. A messy memory makes it confidently wrong, the same way it would make me wrong.

What sleep does

When you sleep, your brain goes through the day and sorts it. Some things get kept and filed, some fade, and things that belong together get connected. You don't do it on purpose. It happens at night, when nobody is asking you anything.

I wanted that for the notes. So I built what I call the dream agent, a job that runs while I'm not working.

What it does at night

First it checks the plain stuff: broken links, notes without a proper header, notes nobody links to, anything that has been "waiting" for too long. That part needs no AI at all, it's ordinary code and it takes seconds.

Then it hands only the suspicious notes to a language model: groups that look like duplicates, and project notes that say they're finished. The model decides whether to merge, archive or leave them. Its answers get checked by code before anything is accepted. If it quotes a sentence, that sentence has to exist word for word in the note. If it merges two notes, every number, date and link from both has to show up in the result, or be listed as dropped with a reason. An answer that fails one check gets thrown out whole.

What survives goes onto a separate branch of the notes, a parallel copy where changes are stored but not applied. It has hard limits per night on how much it may move and how much it may change. It can't delete. It can't touch private folders. If the night's result breaks one of those rules, it throws the whole thing away.

The morning

I get a short mail. What it found, what it proposes, what needs a decision from me, and the command to accept the proposal. I read it with my coffee. If it looks right, I approve all of it or only a part. If not, I reject it and the branch disappears.

Old notes aren't removed, they move to an archive folder. A merged note keeps its originals next to it. Whatever doesn't fit in one night comes back the next.

The full film for this story: 50 seconds, no sound.
daytime night night morning the notes pile up checks links, duplicates, stale local model proposes, code checks separate branch my yes It proposes while I sleep. Only my approval in the morning changes the notes. Nothing is deleted.
The night shift proposes. I decide.

Why the model runs on my own machine

These notes hold everything: client context, prices, decisions, half-formed ideas. I didn't want any of that going to a cloud AI just so it could be sorted. The language model that does the thinking runs on a machine in my own office, and the job only talks to it over my own network. The notes stay here. The most private folders are never opened at all, the job only counts what's in them.

Where it stands

It runs every night now. The first audit of my notes found groups of duplicates, a price that existed in three versions and a pile of dead links. Those are the things it keeps working on, so the memory gets a bit cleaner every week instead of a bit messier. Fewer duplicates and fewer contradictions mean the AI that reads it before every task starts from a cleaner picture, and it gets fewer chances to be confidently wrong. The part I trust most is the boring one: it can't delete, and it can't change anything without me.

What about you?

A company's shared memory has the same problem, only with more people adding to it. Folders nobody cleans, three versions of the same document, a price list that contradicts the website. Building the memory is half the job. Keeping it true is the other half. Does your company have anything like that? Let us take a look. The first look is free, no strings.