AI workflow · 2 min read · 19 October 2026

A second brain that updates itself

My notes went stale because writing them was a chore. Now a hook spots what changed in each coding session, and an agent writes it into the vault, with no model call until there's something worth saying.

A cartoon brain-shaped cabinet where a tiny robot scribe files index cards into drawers
83
project notes in the vault
108
unique agent memories folded in
24
saved implementation plans

01 · The problem

What I learn ends up in many places, and none of them stay current.

Repos, agent memories, saved plans, half-finished notes. Writing it up after a task is the step I skip when I'm tired, which is exactly when the details are freshest.

02 · Three triggers

Capture runs in three layers.

  • in the session: a rule tells the agent to call a scribe at the end of a task that created something worth keeping, such as a new project, a stack or deploy change, a shipped feature or changed design tokens, but not a routine fix
  • at session end: a hook with no model call compares the repo with how it looked when the session started and writes signals to an inbox
  • at session start: if the inbox isn't empty, the agent gets a reminder, and sync runs in the background

03 · No model in the hook

The hook is a shell script, so it is cheap and deterministic.

It looks for new feat: commits, changed manifests and deploy configs, style files, agent instructions, schema migrations, a changed remote or a brand-new project. It skips the session if the scribe already wrote something. A model only runs when there is something worth writing about.

04 · Offline-first sync

The vault is a git repo, and it has to work on a plane.

Changes are committed locally first. Sync checks connectivity with a short timeout; if online it rebases and pushes, if offline it simply exits. On a conflict it aborts and logs it for me to fix by hand. The inbox is per machine and stays out of git.

git commit -m "docs: update project note"
if curl -sI --max-time 4 https://github.com >/dev/null; then
  git pull --rebase --autostash && git push
fi

05 · Indexes that rebuild themselves

Nobody maintains the overview pages by hand.

A script reads each note's frontmatter and regenerates the projects index, the style reference and the stack map, so the summaries can't drift from the notes.

06 · Honest status

It's new.

The vault's first commit and this capture workflow are both from this month. It's too early to claim time saved; the next thing to measure is how often a signal actually turns into a useful note. This article was drafted from it.

Next storyKetikaria: a typing game for kids who can't read yet