Repository navigation
v0.1.2
Added
- After a write in Claude Code,
mnema after-a-writecopies a note of the host's own memory into the private tree,
and names the door of a file that holds decisions. APostToolUsehook onWrite|Editruns it behind a shell that
reads the path out of the payload and starts nothing for any other path (about 6 ms per common write on a loaded
machine). A note under this project's own memory directory in Claude Code (projects/<project>/memory/*.md, with<project>the
main working tree's path as the host names it, so every worktree of a repository shares it, under$CLAUDE_CONFIG_DIRor
~/.claude, or whereautoMemoryDirectorypoints in your own settings or the project's.claude/settings.local.json)
is recorded as a memory in this machine's private tree, with a marker naming the file and a hash of its content, once
per content, under a new channel,host-memory-mirror, which starts ON (mnema switch off host-memory-mirrorstops it):
the one channel that writes without a verb and begins on, by a recorded decision. A note in
another project's directory, the indexMEMORY.mdand a note oftype: userare never copied, and nothing goes to the public tree. A file under
docs/adr/,docs/decisions/or anadr/directory, or aCLAUDE.md,AGENTS.md,GEMINI.md, host rules file,
plan, handoff or ledger whose new lines open asRuling:,Decision:or a correction does, gets one line naming
mnema decision import <the directory or file>orrecord_decisionwhen the record cites it nowhere, once per session and file; it records
nothing, andmnema switch off decision-file-writtenstops it. The line atStopnow also counts the notes copied
since the session opened.readHostMemoryin@mnema/coreis the one reading of a memory file, for this and for
decision import --format claude-memory. Two limits are known and left as they are: a project path longer than 200
characters is compared by its first 200 (the host cuts the name there and adds a hash this does not compute), so two
such projects that share those 200 are not told apart; and the name pattern*plan*.mdalso matches a name such as
explanation.md, whose new lines still have to open as a decision does before any line is given. - The record carries an
.editorconfig, andmnema doctorand the brief warn of the other tools that would rewrite it..mnema/.editorconfig
setsinsert_final_newline,trim_trailing_whitespace,end_of_line,charset,indent_styleandindent_sizetounset
(noroot = true, so nothing else of the folders above is cut); it is written where the README is (the founding, theinit
that completes a founded project, and the first signed write that grows a record with none), never over an existing file and
never by a read or a refused write, and it is not part of the proof (FORMAT.mdsection 4).mnema doctorand the hook's brief
also name a.pre-commit-config.yamlwith a rewriting hook, a Biome, dprint or lint-staged configuration that does not leave
.mnema/out, each with the line to add, and say when a file could not be read well enough to confirm; none of those files is
edited. The.prettierignoreis now written where prettier is declared: the project's own directory or the nearest one above it up to
the git root, instead of the git root alone. - After a question the agent asked the person is answered, the agent is told which tool records the choice. A new verb,
mnema settled, answers a hook after the host's question tool ran with one sentence of fact beside the answer: that a
question was answered, thatrecord_decisionrecords a choice it settled with the options not taken asalternatives,
and that nothing was recorded from it. It records nothing and reads which tool ran, never the answer. The plugin declares it
as aPostToolUsehook onAskUserQuestion, behind a shell that starts no process for any other tool (VS Code runs the
plugin's hooks whatever their matcher says); the hooks files of Codex (request_user_input), Copilot CLI
(AskUserQuestion), Gemini CLI (ask_user,AfterTool) and OpenCode (question,tool.execute.after) carry the same
hook, documented and not measured. A new channel,choice-settled, is on untilmnema switch off choice-settled. Held in
Claude Code against the real binary, where the sentence arrives inside the question's result. - With
user-correctionsswitched on, the answers the person gave to the agent's questions are proposals too. At
Stop, besides the openings that correct,mnema correctionsrecords the option the person chose in the host's question
tool (read from the result the host writes in the transcript, which the reader passed over before) and the prompt typed
right after a response that ended in a question mark, each quoted with its question, as aproposeddecision in this
machine's private tree, titledAnswer: …, with an email address in the title replaced by<email>as in the body. An
answer that only assents or refuses ("yes", "ok", "go ahead", "pode") is not recorded. The channel is still off until
somebody switches it on. - A subagent that begins is handed the brief of the session. The plugin gains a
SubagentStarthook that runs
mnema brief --hookand hands the document to the subagent as it starts, byte for byte what the opening hands the session,
under the event the host routes the reply by. It is the opening's channel and the opening's switch (mnema switch off brief-documentstops both), and it is silent where there is no project. It is held against the real Claude Code binary; VS
Code documents the event and reads the same hooks file, and was not measured on it. docs/evidence.mdcarries a presence map. For each host and each moment of the work (a choice settled with the person, the
host's own memory, a plan or decision file, the opening, an edit, the end of a response, a subagent's start and stop) it says
whether the host offers something the plugin could ride, and how that is known: held by a test, documented and not measured,
no channel, or not read. It is generated from the host table, and a copy edited by hand is red.- A project founded before the README completes it on its first signed write. The first write to a public record that has no
.mnema/README.md(any verb, or any MCP tool) leaves the same pagemnema initleaves and says so in one line, on stderr for a
verb and in the tool's reply for the server. It is made only after the record grew: a read, a refused write and a write to a
tree that does not travel leave the folder as it was, and a README that is already there is never replaced. Only the README is
written this way, and only inside.mnema/: the.prettierignoreis still edited bymnema initalone. The session brief
(mnema brief --hook, never the file a person redirects it into) gains one line wheremnema doctorwould add the line.mnema/to the
.prettierignore(the same function), saying the formatter can rewrite the signed record and thatmnema initprotects it. mnema decision reviewgoes through the decisions awaiting a judgement, one by one, at a terminal, with no id to copy. It
lists what isproposedin the ordermnema statuslists it, shows each one's ADR, title, reason and what it turned down,
and asks: accept, reject, skip or quit. It asks for one note at the start (the default says the date and that it was reviewed
with the verb), used for every verdict unless a note is written after the letter, and ends with how many were accepted,
rejected and skipped. Each verdict is the movedecision movemakes, through the same gate, key and refusal codes; a refusal
on one decision is said and the review goes on. It is a person's: it signs with your own key, refuses--which, and says
whenMNEMA_AGENT_KEYis set that it does not use it. Without a terminal it writes nothing, refuses with
DECISION_REVIEW_NEEDS_A_PERSONand prints thedecision move accept <ids> --notecommand that rules the same
decisions; with nothing awaiting, it says so and exits 0.- A plugin and a
mnemaof different versions now say so. Amnemaolder than the plugin is the pair that breaks: the
plugin may ask it for something it never learned, and a refused hook was silence. The hook that opens a session now compares
the versionmnema --identifyanswers with the plugin's own and, when the binary is the older, adds one line after the
document (or alone, where the binary printed nothing) saying the two do not match and giving the command that fixes it,
npm i -g @mnema/code@<the plugin's version>. The hook still exits 0 and blocks nothing.mnema doctorsays the same for
the plugin Claude Code lists as installed, in the direction that applies: a binary older than the plugin gets thenpm
command, and a binary newer than the plugin (which works) getsclaude plugin update. A binary newer than the plugin adds
nothing to the session. mnema initleaves aREADME.mdin.mnema/and keeps prettier away from the record. The page says what the folder is,
that the record changes with the work and each change goes in the same commit as the work it describes, that nothing in it
is edited or reformatted, that the private keys are not there, and how to verify it. It is not part of the proof: both readers
ignore it, andFORMAT.mdsection 4 lists it beside.gitignore. Where the repository has a.prettierignoreor declares
prettier (a dependency, aprettierkey inpackage.json, or a.prettierrc*at the root),initadds the line.mnema/
to the.prettierignoreat the root of the repository, creating it only when prettier is declared, and says so; a repository
with no prettier is left as it is. The session brief gains one line saying that recording changes.mnema/and that the change
goes in the same commit as the work. Run again in a project that is already founded,initadds what that project
lacks of the README and the.prettierignoreline, says what it added and touches nothing else of the record, and
mnema doctorpoints at either when it is missing (it writes nothing; the fix it names ismnema init).mnema usage --toolscounts how many times each MCP tool was called, from a file this machine keeps. For each call
the server answers and counts it appends one line (the instant, the tool's name, whether the tool writes, andokor the code of
the refusal) to<data directory>/tool-calls/<digest of the project>.jsonl, in the home and never in the repository.
Never an argument, a word an agent wrote or a record's id; no event, no signature, no change of format, andverify
does not read it. The verb prints, per tool, the calls, the refusals and the first and last date, and says it counts
only what the MCP server on this machine answered. A call refused while validating its arguments (they do not match the
tool's input schema) never reaches the tool and is not counted. It is on untilmnema switch off tool-call-count; on a machine
with no key of its own yet nothing is kept and no directory is made.
Changed
-
A write over MCP says the directory of the project it fell in, whether or not it named one.
In the project at <path>.followed only a write that carried aproject. It now follows every write that landed in a project's tree
(not the global one), a move by id (task_transition,decision_transition,skill_transition) and a retraction
included: after a reload the workspace can hold another checkout of the same repository, and an id the clone also holds
used to move there without a word. -
The agent a fact names, and a relation, are asked what a recipe prints in their place.
--which "<name>"was
recorded as the executor;--rel src/a.tsas the relation. Both are refused withNOT_A_REFERENCE, by the door
every write passes (awhichthat is a marker; a relation that is a path: one that starts with/,./or../, or has a separator and a file extension, or names a file or directory that exists in the project;and/orandv1.2stay labels). -
resume,focusand the resume insidebootstrapread the runs of every project of the workspace. A session that
wrote first in a project its client listed second was answeredlastRun: nulland no open run. While no identity signs
for the session (a machine with no key, before the first write) the sentence about the connection now also says that
actoris empty because of that. -
read_recordandbootstrapsay when a record was moved twice out of one state by machines that had not seen each
other.showand the brief said it; the agent was served the last state alone. The sentence is the same
function's, as a block beside the payload. -
The server's instructions say to record here even what is also kept elsewhere. The handshake text now asks that a decision or a note be recorded as the work happens and also when the same thing is already in a plan, a ledger,
CLAUDE.mdor the host's own memory, because this is the signed copy and the one later sessions read back. To stay under 2,048 characters (the text is now 2,013) it drops the sentence that the record outlasts the session, a parenthesis about themnid, and shortens the last paragraph; therecording-decisionsskill says the same in one sentence. -
In VS Code and Cursor, a write no rule can meet no longer starts
mnema. The gate there is a process per write, and most
of its cost was loadingmnema, paid even in a project whose record addresses no path. The plugin's handler now reads the
stored lines of the project's committed tree, of its private tree and of the machine's global tree itself, and where none
holds a link undergoverns,asks-for-a-personorrefuses-a-writeit answers whatmnemawould answer there, nothing,
without starting it. A canonical line holds that relation byte for byte, so the search cannot miss one. Every doubt starts
mnemaas before: a tree it cannot list, a line that is not UTF-8, not canonical, or not of a kind, a version and a shape
the first published reader declared (the plugin carries a copy of those declarations, held to the reader's by a test), so a
recordmnemacannot read still refuses every write. Nothing is kept between two writes, so a rule that arrives bygit pullis met at the next one. Measured on one Linux machine under load, 50 runs each, in a project with one accepted rule and
no address: the handler went from about 330 ms (Cursor) and 290 ms (VS Code) at the median to about 50 ms; with a rule that
refuses, it costs what it did. Claude Code's hook, a call into the server, is unchanged. -
The links check after the merge reads
docs/too, andosv-scannerruns weekly. The job that asks the network for every address of the READMEs once a change is onmainnow also reads every Markdown page underdocs/; it is still never a check on a pull request, and still opens one issue for the broken ones.osv-scannernow also runs on Mondays against the unchanged lockfile, so an advisory published against a dependency nobody touched shows up; a finding fails that run and shows in the Actions tab, and opens nothing else.gitleaksstays on pull requests and onmain. -
Two scanners now read the repository in CI, outside the required checks.
gitleaksreads the whole history for a committed credential andosv-scannerreadspnpm-lock.yamlfor a dependency with a published advisory, on every pull request and onmain. Both are release binaries pinned by version and SHA-256. The first reading found no credential: every match was a public test vector, a made-up fixture or a fingerprint, and.gitleaks.tomlnames each class and why. It found no advisory.
Fixed
- A title made only of spaces is refused, like one made only of punctuation.
task create " "recorded a task
named with blanks (and a decision, a skill, an observation topic):NOT_A_TITLE, in words that do not echo the spaces.
The empty string stays refused as it was. retractand theretract_noteandskillstools take anADR-<n>label like every other verb that takes an
id. The label became the decision's id, whichretractthen names as a decision; a label two trees both carry is
refused with both ids (AMBIGUOUS_LABEL).- The release job that tags waits for npm to serve the five packages. npm can take minutes to serve a version it has just
accepted, and the single check right after the publish failed the 0.1.1 run. The job now asks every 30 seconds, up to
20 times (about ten minutes), goes on as soon as all five answer, and otherwise fails saying how long it waited. mnema check run --keyrefuses a key that is not Ed25519, askey restore --agentandkey request --agent --keydo. A
P-256 or an RSA key file was accepted and then failed further on; it is now refused up front withUNREADABLE_KEYand
the same account of what is wrong with the key (an agent's key is an Ed25519 one), ending with the way to make a checker key, and nothing is recorded.- Both verifiers check a tail's proof of ownership under the key the tail id names, and nothing else. The Python
verifier looked the key up by the proof's ownsignerFp, so atailproof.jsonthat another key of the record signed
over the tail's id was verified there and refused bymnema verify.mnema verifychecked the signature under the
tail's key without comparing that key with the proof'ssignerFp, so a proof the tail's key signed naming another key
was accepted there and refused by the Python verifier. Both now refuse a proof whosesignerFpis not the fingerprint
the tail id begins with, assigner-mismatch.mnema verifyalso recomputes the fingerprint of the key file it checks
a tail proof under, as it already did for a checkpoint's key: a tail with no checkpoint yet, whose key file held
another key that signed the proof, verified there and was refused by the Python verifier. No record a mnema binary
writes is touched: a tail's proof is signed at birth by the key its id is named for. mnema verifyand the pagemnema sitewrites refuse a committed key file whose name is not its key, as the Python
verifier does. Akeys/<name>.pubthat no tail, checkpoint, enrolment or tail proof uses, and whose material does not
hash to<name>, was read as a committed key with no tail, a note, and the record verified; the Python verifier refused
it. Both now refuse it, in the same words: the file is named for a fingerprint its own material does not hash to
(FORMAT.mdsection 6). A key nothing uses whose name is its fingerprint is still a note. No record a mnema binary writes
is touched: every key file is written under the fingerprint of the key it holds, which records written by 0.1.1 and by
this version, with a person, an agent key, a checker, a second machine and a restored and protected key, were checked for.
Changed
- What
verifysays of a file when it is given a base commit is a sentence. A file the record held at the base commit and no longer
holds, and a file that no longer begins with the bytes it held there, are said assince <rev> (<commit>): <file> was in the record there and is not hereandsince <rev> (<commit>): <file> no longer begins with the bytes it held there, without thegone:andrewritten:labels. The exit code and the JSON reading are unchanged. - The pages say what the rules hook costs per edit, host by host. Measured on one machine (version 0.1.1, a sandbox,
50 runs each, without the real host): about 1 ms at the median per edit in Claude Code, where the hook is a call on a
server already running (the server's own start, 270 to 350 ms, is paid once per session), and about 200 ms at the
median per edit in Cursor and VS Code, which start a process per edit even where no rule addresses the file. Before,
the pages gave only the orders of magnitude. - The step that checks the manifest signature of Claude Code, and the steps that read a host's version, in the
host-contract workflow no longer rely on a pipe. A host that printed more than one line could fail the step on a
broken pipe, and a signature check that reads its own output through a quietgrepcould do the same. - The Python reader no longer carries type aliases it never checked, and its comments no longer say how many vectors
carry a field. The comments say how many were published when the finding was made (October 2026).