Cookbook / Personal AI memory

Cookbook

Personal AI memory

Keep the memory, rules and skills your AI agents write in one Wiele folder, shared by every machine and every tool you use.

Goal: one folder holding what your agents know about you and how you work: memory notes, rules files such as AGENTS.md and CLAUDE.md, and skills. Claude Code, Codex and Cursor on every computer read the same files. Only agents write here; you ask them to remember or forget things, and every change they make has a version you can undo.

This differs from a second brain, where you write the notes. Here the files are the agents' working memory, so the setup favours small files, a push after every change and easy rollback.

Setup

Create a private workspace and seed it from the rules file you already have:

wiele workspace create "AI memory" --slug ai-memory
mkdir -p ~/ai-memory/memory ~/ai-memory/skills
cp ~/.claude/CLAUDE.md ~/ai-memory/AGENTS.md
wiele track ai-memory:/ ~/ai-memory
wiele push --directory ~/ai-memory -m "Seed AI memory"
wiele sync enable --directory ~/ai-memory
wiele daemon install

Point each tool at the shared files with symbolic links: one for the rules file per tool, and one per skill folder. Back up the originals first; ln -sf replaces them:

mkdir -p ~/.claude/skills ~/.codex
ln -sf ~/ai-memory/AGENTS.md ~/.claude/CLAUDE.md
ln -sf ~/ai-memory/AGENTS.md ~/.codex/AGENTS.md
ln -sf ~/ai-memory/skills/release-notes ~/.claude/skills/release-notes

For Cursor, add ~/ai-memory/AGENTS.md to its user rules, or link it into a project's rules folder.

On every other computer, sign in, fetch the folder and create the same links:

wiele fetch ai-memory:/ ~/ai-memory
wiele sync enable --directory ~/ai-memory
wiele daemon install

Folder layout

ai-memory:/
  AGENTS.md                 rules every tool loads; ends with the memory rules below
  memory/
    MEMORY.md               one line per memory file, so agents find the right one
    prefers-pnpm.md
    writing-style.md
    project-billing.md
  skills/
    release-notes/
      SKILL.md

Add these rules to the end of AGENTS.md, so every agent maintains the folder the same way:

## Memory

My memory lives in ~/ai-memory. Read memory/MEMORY.md at the start of a task.

- To remember something, write one small file under memory/ and add a line to MEMORY.md.
- To forget something, delete its file and its line.
- Never store secrets, tokens, passwords or other people's private data.
- After any change in ~/ai-memory, run `wiele push --directory ~/ai-memory -m "MESSAGE"`.
  If you deleted a file, add `--delete`.
- If the push fails with PUSH_CONFLICT, run `wiele pull --directory ~/ai-memory --keep-local`,
  merge your change with the recovery copy that `wiele status --directory ~/ai-memory` lists,
  and push again.

Working with the agent

"Remember that I use pnpm, never npm."

The agent writes memory/prefers-pnpm.md, adds a line to memory/MEMORY.md, then:

wiele push --directory ~/ai-memory -m "Prefers pnpm"

Within a minute, sync puts the file on your other machines, where Codex or Cursor read it on their next task.

"Forget what you saved about the old billing project."

wiele push --directory ~/ai-memory --delete -m "Forget old billing project"

--delete approves removing tracked files that are missing locally. The old versions stay in history.

"Turn what we just did into a skill."

The agent writes skills/changelog/SKILL.md, links it into ~/.claude/skills, and pushes. Run the ln -s line on your other machines to use it there.

"You saved something wrong about my writing style yesterday. Put it back."

wiele stat ai-memory:/memory/writing-style.md
wiele history RESOURCE_ID --workspace ai-memory
wiele restore memory/writing-style.md --revision SHA --directory ~/ai-memory
wiele push --directory ~/ai-memory -m "Restore writing style memory"

Notes

  • Two agents on two machines can write at the same time. Pushes that touch different files both apply; MEMORY.md is the file most likely to conflict, and the rules above tell the agent how to merge it.
  • Sync turns off for a checkout when a remote change would overwrite a local edit. wiele sync status --directory ~/ai-memory shows it; fix it as in Background sync.
  • Symbolic links pointing into the checkout work, since the files themselves live in ~/ai-memory.