iLang

Mem-Forever memory that outlives the session.

Every AI tool forgets you when the window closes. Mem-Forever keeps the memory in your own private Git repository: a profile, one file per memory, a hand-off note that says where you stopped, and an encrypted vault for your keys. Any tool that reads files can use it, and a chat with no tools gets it pasted in one message.

Use this template Read the engineering book

::PROGRESS{date:2026-11-05|done:§1 tests green|next:tag and release|unverified:docs build}
The hand-off note, example data. Four fields any tool can read: date, done, next, unverified. The next session, in any tool, starts here.

Three ways in

What a session does

  1. Reads the hand-off and tells you in two sentences what was done, what comes next and what is unverified.
  2. Commits what the last session left unsaved before touching the work.
  3. Reads the profile, yours and the agent's own, and the memory index; opens a memory file only when the task needs it.
  4. Judges each next item before acting: a boundary conflict stops, missing evidence asks, the owner's call waits.
  5. Updates the hand-off at every milestone, not at session end, so a closed window loses nothing.

A hand-off request authorizes nothing

Reading, restating or exporting the note is recording, not doing. An item enters done only with evidence from the conversation or an observed result; the item moves whole, its text unchanged.

Review before merge

A hand-off that comes back from another model is a candidate, not the truth. The tool compares it block by block with the accepted one and never writes: a deleted boundary, a forbidden or unevidenced item in done, a missing key, a changed identifier or a silent drop is rejected; the rest is listed for you to decide.

REJECT  boundary deleted or rewritten: ::BOUNDARY{never:force-push main|scope:project}
REJECT  DECIDE line 9: key why empty (write none)
REJECT  next item dropped without a word: write the release note
FLAG    decision 'ship from main, no release branch': why changed
TRANSITION next/unverified -> done, needs evidence: tag and release
review: REJECTED (3); baseline stays; nothing written

Output of brain.py handoff review on an example hand-off, 2026-11-05: the candidate dropped the boundary, emptied a reason and dropped a next item.

Measured, not estimated

WhatResult
The notation card, English, 1351 bytes381 to 410 tokens on ten models' own tokenizers, 539 on Claude's.
The notation card, Chinese352 to 392 tokens on the same ten, 542 on Claude's. Tested in conversation on twelve model tiers, weak to strong.
BRAIN.md, the eight points399 to 406 tokens on GPT, GLM and Kimi, 427 on Doubao, 588 on Claude's.
One web chat, signed out, no toolsRead the card and a 14-block hand-off in one message; restated 4, 6 and 9 items verbatim; its write-back was reviewed, corrected once, accepted.
Template filesEvery file with notation passes the iLang grammar validator with zero errors and zero warnings.

Dates and methods are in the engineering book, section 5.

Works with the tools you already use

Claude Code reads CLAUDE.md, Cursor reads .cursorrules, Codex reads AGENTS.md, Copilot reads .github/copilot-instructions.md, Gemini CLI reads GEMINI.md. The five files carry the same text. Web chats take BRAIN.md as their instructions and reach the repo through a connector, a Drive mirror or a pasted message.