mnema-instructions

mnema-instructions is a cursor rule for Cursor from felipesauer/mnema. It costs 606 tokens per session, scanned C, original, Apache-2.0.

A repository rule for keeping a signed, permanent record of important decisions in the `.mnema/` folder. It tells coding agents when to load the current rules, check rules for a file, record a decision, or mark an older decision as replaced.

In plain words
What is it for?
Use it to guide agent work that changes files, settles technical choices, or needs an auditable history of alternatives and approvals.
Why use it?
It prevents important choices and their reasoning from being lost or silently changed. It also makes it clear which decisions are currently in force.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions subagents.

Good fit Use it to guide agent work that changes files, settles technical choices, or needs an auditable history of alternatives and approvals.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/felipesauer/mnema/mnema-instructions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/felipesauer/mnema

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mnema-instructions

README.md
[![agentmods](https://agentmods.dev/badge/rules/felipesauer/mnema/mnema-instructions/github.svg)](https://agentmods.dev/rules/felipesauer/mnema/mnema-instructions)
Your own site
<a href="https://agentmods.dev/rules/felipesauer/mnema/mnema-instructions"><img src="https://agentmods.dev/badge/rules/felipesauer/mnema/mnema-instructions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mnema-instructions

Your own site · 80×15
<a href="https://agentmods.dev/rules/felipesauer/mnema/mnema-instructions"><img src="https://agentmods.dev/badge/rules/felipesauer/mnema/mnema-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 606 This file is loaded in full into every session.
When invoked 606 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00606 $0.00606
Opus 5.5 $0.00242 $0.00242
Sonnet 5.5 $0.00121 $0.00121
Haiku 4.5 $0.00061 $0.00061

Measured 3d ago against content hash 53ae32010476, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

mnema-instructions scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- mnema:begin v3 (written by mnema; `mnema instructions --remove` takes it out) -->
.cursor/rules/mnema-instructions.mdc · 31 lines

What it actually says

Recording the work (mnema)

This repository keeps a signed record of its decisions in .mnema/. Where the mnema tools are connected:

  • At the start of a session, call bootstrap: it opens with what is in force, what awaits a judgement and the work in flight.
  • Before changing a file, call governing_rules with its path.
  • When a choice is settled, with the person or alone, that someone could later question (a library, an approach, a trade-off, an option turned down), call record_decision in that turn, with the rationale and, in alternatives, what was turned down and why. Record it even when it is also written in a plan, a ledger, this file or your own memory.
  • A decision is born proposed; once it is accepted it is in force here (an acceptance made by an agent is recorded as an agent’s, and mnema switch off agent-accepts leaves it to a person).
  • A decision is not edited once it is recorded. When a new one replaces an earlier one, record the new one and then call decision_transition on the earlier one with action supersede, the new decision’s id in by and the reason; the new one is then read as replacing the earlier one, which it names.
  • A subagent records no decision: it hands its decisions back in its final reply, and the session that started it records them.
  • When you learn something about this project that its code does not show, call capture_memory, also when you keep it in your own memory.
  • Work in flight is a task (create_task), and handing work to another agent is a handoff on it (record_handoff), with its brief: the short text, and the path of a file where the brief is long.
  • Not for the record: each step taken, a credential, personal data, what the code or git already says.
  • Commit .mnema/ with the work it describes: the record changes as the work does, through these tools and the mnema command. Never edit or reformat its files by hand.

Where the tools are not connected and the mnema command is installed, the shell does the same. This records a decision, with what was turned down:

mnema decision record "Use pnpm for the workspace" "The lockfile and the workspace scripts already assume it." --alternatives "npm: no workspace protocol; yarn: a second lockfile to keep"

And this one says a new decision replaces an earlier one:

mnema decision supersede <old-id> <new-id> --reason "<why>"
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 31 lines · 606 tokens per session scan C 53ae32010476

Subscribe to this mod's changes

mnema-instructions is a cursor rule published in the GitHub repository felipesauer/mnema (4 stars, last pushed yesterday), licensed Apache-2.0. It adds 606 tokens to every session, about $0.0024 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-30.