
mnema: decision records for AI coding agents
io.github.felipesauerPublished by GitHub account felipesauerv0.1.5Updated Nov 5, 2026
Signed, append-only decision records for AI coding agents, over MCP. Verify them offline.
Overview
Signed, append-only decision records kept in a repository, written by AI coding agents over MCP and verified offline.
- What you can do
- Record decisions and tasks in a signed, append-only record inside the repository, in a shared, machine-private or global tree.
- Move work through gates, record handoffs with briefs and notes, and read who has each task in flight.
- Verify the record offline with no key and no network, and see which level of coverage each verdict reached.
- Read the rules in force for a path, including rules inherited from another repository and pinned at a commit.
- Set up the record and agent instructions, and check for configuration that would rewrite it.
- When to use it
- Useful when several agents and people work in one repository and you want the reasoning behind changes kept as signed, checkable entries rather than lost in chat. It suits teams that want an auditable trail of decisions and task handoffs that a stranger can verify without your keys.
- Requirements
- Runs as a local stdio process installed from the npm package @mnema/code, with Node 24.15.0 or a later 24, or 26.0.0 or later; the package is ESM-only. A repository to found the record in, and signing keys for the machine's identity. No authentication, environment variables or headers are declared.
Installation
In SourceWeft
- Open mnema: decision records for AI coding agents in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@mnema/code
[CI] [npm: @mnema/code] [License: Apache-2.0] [Node 24.15.0 or a later 24, or 26.0.0 or later]
Your decisions, handed to your agents' sessions and held at the edits they govern: append-only and signed in the repository, and checkable by anyone.
Tamper-evident, not tamper-proof: what is still in the record has not changed since it was signed, and a stranger can check that without your keys and without installing this.
This is the package you install: the mnema command line and the MCP server of
mnema, two surfaces over one record. The agent writes
through MCP while it works, and the plugin in plugin/ hands the record to a
session as it opens; you read, audit and verify from the terminal. It holds no domain logic of
its own: the workflow rules and the proof live in @mnema/core and @mnema/chain.
What it gives you
- A record of decisions in the repository that agents and people write to, each fact signed and appended, in a committed tree the team shares, a private one for this machine and a global one.
- A command line to record, read, move work through its gates and verify, and an MCP server
over stdio for the agent to do the same: both ask the same gate. At a terminal,
mnema decision reviewgoes through the decisions awaiting a judgement one by one (accept, reject, skip or quit), with no id to copy, and signs each verdict with your own key. mnema init, which founds the record and leaves in.mnema/aREADME.mdthat says what the folder is and an.editorconfigthat unsets what an outer one could impose on its bytes; where the repository has a.prettierignoreor declares prettier, it adds the line.mnema/to it and says so. It writes the mnema instructions (when to call the mnema tools, and what never goes in the record) intoAGENTS.md, into aCLAUDE.mdorGEMINI.mdthat exists, and into a rule file of its own for Claude Code, Copilot and Cursor, and names each file. At a terminal it first shows what it found around the folder, asks which agent hosts to write them for (arrows and space; the hosts found are checked; Esc founds nothing) and whether an agent may accept what you choose, and shows everything it will write, once, before it writes any of it; with no terminal, or with--all-hostsor--yes, it asks nothing and writes all four (an agent whose shell is a pseudo-terminal passes--all-hostsor--yes, or it waits at the question). Run again in a project founded before, it adds only what that project lacks beside the record;mnema instructions, with--checkor--remove, writes, checks or removes the instructions.mnema doctorpoints at a missing README,.prettierignoreline or instructions block, names a pre-commit hook, Biome, dprint or lint-staged configuration that would rewrite the record, and edits none of those files.- Tasks that carry their words. The
--descriptionoftask createand the--briefoftask handoff(and the same two arguments of thecreate_taskandrecord_handofftools) record up to 64 KiB of text beside the task, as a note about it;mnema show <task>serves the description, the last handoff with its brief and the notes, and the opening read says who has each task in flight and what happened last. A handoff that names no tree is recorded where its task lives. The format does not change. mnema verify, which reads the record with no key and no network and prints the level it reached. A record a formatter rewrote is refused, and one line beside the refusal names the files, when reading them back in canonical form proves that is all that happened. An agent key one tree of the project retired is retired in the others it reads: what the key signed there after the retirement is refused, and not counted as attested.- A brief and a plugin that hand the decisions in force to an agent's session, and the rules
addressed at a file beside a write to it (in Claude Code, Codex, Copilot CLI, Gemini CLI, Qwen Code and OpenCode). In Claude Code the plugin also hands the brief to a
subagent as it starts, and, after a question the agent asked the person is answered, names the
tool that records the choice. After a write there, a note of Claude Code's own memory for this
project is copied into this machine's private tree, once per content (never the index
MEMORY.md, never a note about the person, never the public tree; on untilmnema switch off host-memory-mirror), and a file that holds decisions the record cites nowhere gets one line naming the command that imports it, which records nothing. When themnemaon thePATHis older than the plugin, the opening of the session says so and gives the command that fixes it;mnema doctorsays it in either direction. - A record inherited from another repository (
mnema inherit set), pinned at one commit and read only when it verifies there: its rules in force reach the paths they address, inmnema rules,mnema why,governing_rulesand the gate before a write, each naming its origin and commit. mnema usage --tools, which counts how many times each MCP tool was called, from a file this machine keeps in its home and never in the repository;mnema switch off tool-call-countstops it.- A session journal, which the
Stophook keeps on this machine, outside the record: ids and counts of what a session did with it (never its words), so the nextStopreads only what the host wrote since and the run the MCP server closes ends with an outcome that theresumeandstatusreadings print, and the notes the next session opens with say where this one stopped; a conversation that was compacted is handed back what entered the record while its session ran.mnema switch off session-journal,last-sessionandafter-a-compactionstop them. - A task for the work a session hands to other agents, in the Claude Code plugin: the first dispatch of a session records
one private task, each dispatch a private handoff on it (its short description and the path of a brief file, never the
prompt), and the end of the session closes it;
mnema switch off agent-mirrorstops it. Every switch says where it begins and what it carries.
The reference has every verb and tool, and what each one leaves unproven.
What it proves, and what it does not
The record is tamper-evident, not tamper-proof: it does not stop an edit, and mnema verify
shows when what is in the record has changed since it was signed, and a cut that leaves the last
checkpoint in place; by default it does not catch a cut off the end that takes the last checkpoint with it, or one tail deleted whole while another remains (a key left without a tail is noted, not failed). A record in which no tail holds anything any more exits 1, by name, at every --require; --since <rev> exits 1 when files the revision held are gone. It reads the events and public keys of the project's trees, with
no private key and no network, and prints each verdict verbatim.
- It does not say every event is signed: the verdict names the level it reached, and only
verified (T1/T2/T4)means every event is covered. - It does not catch someone holding the signing key who rewrites and signs again; a witness
outside the machine (
mnema witness stamp) dates the record, and the history a git remote keeps is what shows a cut. - It does not prove nothing was deleted: a tail removed together with its key, while another remains, leaves nothing on disk to cross.
- It does not make the agent named on a fact the one that did the work, and it is not access control: anyone who can run the command line writes as this machine's identity.
- It does not count every use of a tool:
mnema usage --toolscounts only the calls this machine's MCP server answered, nothing of it is signed, andverifydoes not read it.
The whole table, claim by claim, is in What it proves, and the long form of each row is in the reference.
Install
Then mnema doctor says whether the mnema your shell runs is the one you meant. Where the package came from says how to check the published version against its npm provenance.
The install page has the steps for a Node installed by the system. Requires Node 24.15.0 or a later 24, or 26.0.0 or later; the package is ESM-only.
Your first record
Your first record shows what each of them prints, line by line.
Where to go next
The reference · Each host · How it works · The plugin · Where it fits · Evidence
License
Apache-2.0. See LICENSE and NOTICE, which this package carries.
Source: packages/code/README.md at commit a6ceea2
Tools
0Version history
1- v0.1.5LatestNov 5, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts