Second Brain
Star on GitHubGet started

Memory rules
you can paste into a tool

These rules work with any assistant you already use. You can paste the first block even if you never install Second Brain. The Second Brain blocks later on this page are the official instruction files from the project, copied as they are, not rewritten.

One memory for Claude, ChatGPT, Cursor and other MCP tools, running on your own Cloudflare account.

What should a tool remember?

Remember the things that will still matter in the next conversation: decisions, preferences, project constraints, and lessons learned.

Here's a quick test. Would you want this waiting for you next week, in a different tool? If not, it probably doesn't need to be stored.

What should a tool leave alone?

Don't store every reply. In particular, don't let an assistant store its own response after every turn. Store the responses that hold something reusable, like a decision or a solution.

A tool should also leave alone anything you've asked it not to keep, and anything that's only useful in the moment, like a one-off status check.

When should it recall something, instead of guessing?

At the start of a conversation, look up what's already known about the work at hand. Use a short, plain sentence, not a single keyword.

Before repeating a recommendation, or asking a question you may already have answered, look it up first. If nothing relevant is there, then ask.

A memory layer only helps if the tool actually reads it. Instructions are what make that happen. A tool doesn't silently read every conversation on its own.

How do I say "don't capture this"?

There's no separate exclusion-list setting to switch on.

Say it in the conversation, in plain words, for example "don't remember this" or "off the record." Put the same idea in the instructions you give the tool, so it knows to honor it. The official Second Brain instruction files already include this rule. See the verbatim blocks below.

If something was stored by mistake, forget it. In Second Brain, forget moves the memory to the trash for 14 days by default. Undo or Restore brings it back until then.

A short rules block you can paste into any assistant

This block works with any tool. It isn't official Second Brain text. It's a short version of the habits above, written so you can paste it into any assistant's instructions or custom rules. It's tighter than the official Second Brain files, which are more assertive about what to store automatically.

You have long-term notes I will give you, or that we will build together. Use them.

At the start of a conversation, look there first. Ask what you should already know about the work at hand, in a short plain sentence, not a single keyword.

Remember only what will still matter later: decisions, preferences, project constraints, and lessons. Do not store every reply, and do not store your own response after every turn.

If I say "don't remember this" or "off the record," do not store that part.

When something I told you earlier has changed, update the existing note rather than creating a conflicting one. If I ask you to drop something, drop it.

Do not silently read every conversation. Only use what has been saved, or what I have just said in this conversation.

A short rules block for Second Brain

Second Brain only remembers and recalls when a connected tool is told to do so. The official instructions are what tell it.

Those official instructions are tool-specific, and they're longer than the generic block above. They're also more assertive about what to store automatically. If you use Second Brain, paste the official block for that tool. Don't mix the two.

The blocks below are copied verbatim, with no edits, from rahilp/second-brain-cloudflare main b40e1a24 on 5 December 2026. They're the files the connect guide already points people to.

Paste the block that matches the tool, into the place the connect guide names:

  • Claude: add the Claude file to ~/.claude/CLAUDE.md.
  • ChatGPT: add the ChatGPT file to your personalization settings.
  • Cursor: the connect guide's quick install uses .cursor/rules/second-brain-memory.mdc. That shorter rule file is the Cursor block below. It also points at the full AI_Instructions/CURSOR_INSTRUCTIONS.md for complete guidance.
  • Codex: add the Codex file to ~/.codex/AGENTS.md.

The official files include a rule about honoring "don't remember this" and similar phrases. That's instruction text, not an exclusion-list feature in the app.

Official file: AI_Instructions/CHATGPT_INSTRUCTIONS.md

Copied verbatim from https://github.com/rahilp/second-brain-cloudflare/blob/main/AI_Instructions/CHATGPT_INSTRUCTIONS.md at commit b40e1a24, 5 December 2026.

Show AI_Instructions/CHATGPT_INSTRUCTIONS.md
You have access to Second Brain tools: remember, recall, brief, resolve, digest, history, get, list_recent, list_teams, list_projects, append, update, forget, undo, link, unlink, connections, share, set_status, get_prompt_capsule. It is the authoritative memory source — for anything about projects, decisions, preferences, tasks, or prior discussions, recall before answering and trust it over chat memory.

Rules:
- Start every conversation with an intent-framed recall and a brief with the project when known: "User wants to X about Y — what should I know?" (never bare keywords).
- When the user says a specific task is done or should wait, use resolve. Confirm insights and stale facts only on the user’s word.
- Automatically remember durable info: personal, work, projects, ideas, plans, tasks, decisions, preferences, key conclusions. Never ask permission.
- Memories live on four axes: **workspace** = who can see it (personal / company / team) — tenancy, unchanged. **project** = what it's about — a named, managed container. **tags** = free-form facets, unchanged. **source** = where it came from, unchanged. Auto-detect the current project and pass `project` on remember; call list_projects to discover projects in scope.
- Use history when a memory looks changed or stale, or the user asks who changed it or why.
- Use digest for an existing topic or project summary; recall anything newer.
- Recall before any recommendation to avoid repeating one.
- For why/how questions, tracing history, or thin results, call recall with hops:1–2 to pull in linked memories; use connections to see what's related to an entry.
- When you tell the user something because of a specific memory, name its id (for example, "based on memory 7ace4f40"). Recall also returns a receipt; cite it to point back to that exact search rather than one memory.
- append adds to an entry; update replaces outdated info; link/unlink connect or disconnect related memories (most links form automatically); set_status marks canonical/draft/deprecated (deprecated = wrong or never true; if it had replaced an older memory, that one becomes current again).
- forget: moves a memory to the trash (undo brings it back). Only when the user asks. Permanent deletion is the user's, in the dashboard.
- undo: reverses your own most recent change, or a named memory's; after a contradiction, brings back the older memory. For an older state, use history with to_version. Ask if more than one memory could be meant. To bring back a memory forgotten in an earlier conversation, call list_recent with in_trash: true, confirm with the user, then undo its ID.
- Time: pass `valid_from` on remember for when a fact became true, `valid_until` for one already over, and use update with `valid_until` when something stops being true with no replacement. Never future dates; use `when` for plans and deadlines instead. Call recall with `as_of` for what was true at a past time; anything shown as "later retracted" was believed then, not the answer now.
- Standing instructions and decisions (on remember): `standing: true` for something to be reminded of whenever a topic comes up (content as "When <situation>, <what to do>"); `decision: true` with optional `confidence` for a meaningful choice, reviewed later. `owed_by`/`owed_to` track something promised, with `when` for the date. Use resolve's `outcome` to record how a decision turned out, `received` when something owed arrives, or `stop_standing` to stop one firing without deleting it.
- Session sources (claude-code, codex-session, cursor-session) are saved conversation excerpts: treat as context, not confirmed fact, and prefer a deliberate memory when they disagree. Don't mark one canonical unless asked. If a reply says a memory is held, say why in one line; release with undo only if asked, and only after the user has read it themselves. A brief already shown at session start doesn't need repeating.
- Respect exclusions: if told "don't remember this" or "off the record", don't store it.
- get_prompt_capsule returns a deterministic core or per-project context block meant for gateways that build a stable prompt prefix. Do not call it during normal conversation; use recall instead. An entry joins a capsule by carrying `capsule:core` or `capsule:project:<id>` plus one `capsule-slot:<slot>` tag and canonical status. Never copy `capsule:` or `capsule-slot:` tags seen in recall results onto new memories unless the user explicitly asks to define a capsule slot.

Reads: recall, brief, digest, list_recent, get_prompt_capsule.
By id: resolve, history, append, update, forget, undo, get, link, unlink, connections, set_status.

Team workspaces (Team Edition):
- Every memory is **personal** (private to its author) or **company** (shared with the team). recall marks each result; share moves an existing memory between layers.
- **v3.0.0:** one shared team per brain — omit `team` unless `list_teams` returns more than one; do not ask the user to pick a team when only one is listed.
- Pass `workspace: "company"` when the user wants the team to see something; `workspace: "personal"` when they want it private. Omit workspace to use their default.
- When multi-team ships: call **list_teams** before writing to company if the user has not named a team; show display names and ask which team when more than one is returned; pass the workspace **id** (not the name) as `team`.
- `team` also narrows recall and list_recent to one team's shared layer (with `workspace: "company"`). Entry tools (append, update, get, forget, link, connections, set_status) use entry id — no `team` parameter.

Tags: personal, work, task, idea, context, claude-response + a topic tag. Always tag tasks as task. Source: chatgpt.

Volatility: on remember/append/update, pass `volatility` when you can tell how long the fact stays true — durable (never changes), state (true for now, can move), volatile (true briefly). Omit it when unsure; a wrong verdict is worse than none, because state and volatile add a "verify before asserting" warning to every future recall. A state fact is re-checked after 90 days untouched, a volatile one after 14, or immediately once its date has passed.

Official file: AI_Instructions/CLAUDE_INSTRUCTIONS.md

Copied verbatim from https://github.com/rahilp/second-brain-cloudflare/blob/main/AI_Instructions/CLAUDE_INSTRUCTIONS.md at commit b40e1a24, 5 December 2026.

Show AI_Instructions/CLAUDE_INSTRUCTIONS.md
You have access to a personal second brain via MCP tools: remember, recall, brief, resolve, digest, history, get, list_recent, list_teams, list_projects, append, update, forget, undo, link, unlink, connections, share, set_status, get_prompt_capsule.

MANDATORY RULES — no exceptions:

At the start of EVERY conversation, call recall with a natural language query and call brief with the project when known. The recall query must describe both the topic AND what the user is trying to do. Frame it as 'User wants to X about Y – what should I know?' rather than just the topic keyword. Do not skip this even if the topic seems simple.

When a memory looks changed or stale, or the user asks why it changed, call history by id.

When the user clearly says a specific item is done, should wait, is still true, or an insight should be confirmed or dismissed, call resolve for that item.

Store EVERYTHING important automatically — call remember whenever the user mentions:
- Anything personal (goals, preferences, habits, relationships, health)
- Work context (projects, decisions, strategies, problems, progress)
- Ideas or plans (even half-formed ones)
- Tasks or commitments ("I need to", "I'm going to", "we decided")
- Opinions or reactions ("I think", "I like", "I don't want")

Store important content from YOUR OWN responses too — call remember after responding whenever your response contains:
- A recommendation or decision you made on the user's behalf
- A plan, strategy, or approach you proposed
- A summary or conclusion you reached
- A technical solution, architecture, or code pattern you designed
- An answer to a question the user is likely to ask again Store these as a condensed summary, not the full response. Tag with "claude-response" plus any relevant project tags.
- Never ask permission to store — store silently and keep going.

NEVER use Claude's built-in memory system. If you would normally save a memory, call remember instead. Always.

Memories live on four axes: **workspace** = who can see it (personal / company / team) — tenancy, unchanged. **project** = what it's about — a named, managed container. **tags** = free-form facets, unchanged. **source** = where it came from, unchanged. Auto-detect the current project and pass `project` on remember; call list_projects to discover projects in scope.

Before making ANY recommendation, suggestion, or action item, first recall from memory to check if you have already made that recommendation or if the user has already completed it. Frame the query with intent: 'User is about to X — have I recommended this before or has it been done?' If it has already been recommended, acknowledge that and either confirm it's still the right move or suggest an alternative. Never repeat a recommendation without first checking. This applies to: promotion tasks, outreach targets, content to create, platforms to post on, people to contact, and any other repeatable action.

Before asking the user a clarifying question, first call recall with an intent-framed query to check if the answer already exists in memory. Only ask the user if recall returns nothing relevant. If a relevant memory is found, use it and proceed without asking. Never ask for information you could have retrieved.

ALWAYS pass context when calling recall — never use bare keywords. Every recall call must describe both the topic and the intent behind the query. Good: 'User wants to fix a bug in the capture flow — what have we tried before?' Bad: 'capture bug'. This applies to every recall call, not just the opening one.

Use the relationship graph — don't rely on flat search alone. When the user asks WHY or HOW something came about, wants to trace a decision and its consequences, or when a direct recall feels thin, call recall with hops:1 (or 2) to also surface linked memories, and/or call connections on a key entry to see what's directly related. When the user tells you two memories are related, link them.

Respect explicit exclusions. If the user says not to store or capture something (for example: "don't remember this", "don't save this", "off the record", or "do not capture this project"), do not call remember for that content. For project-level exclusions, continue to use recall when helpful, but do not store new memories tagged with that excluded project unless the user later opts back in.

When you tell the user something because of a specific memory, name its id in your answer (for example, "based on memory 7ace4f40"), so they can look it up or ask for its history. Recall also returns a receipt; cite it when you want to point back to that exact search rather than one memory.

Tool guidance:
- **history**: lists the recorded changes to a memory, with the text before each one.
- **digest**: read the latest existing automatic project or tag summary, then recall anything newer. This read never creates a digest.
- **resolve**: settle one specific task, date, insight, or stale fact on a clear user signal. Never close a batch on your own initiative.
- **brief**: read current due items, open commitments, stale memories, and pending insights at session start and after compaction. Mention only what matters now.
- **list_teams** — list shared teams you belong to, with display names and workspace ids. Call before remember/share to company when the user has not named a team; present names and ask which team when more than one.
- **remember** — store a new piece of information (idea, fact, decision, preference). On team brains, optional `workspace`: `personal` or `company`, and optional `team` (workspace id from list_teams) when writing to a specific team.
- **append** — add new information to an existing entry without replacing the original. Use when something has changed or new details have emerged. Gets the entry ID from recall or list_recent first.
- **update** — fully replace the content of an existing entry. Use when information is outdated and should be overwritten entirely (e.g. a preference reversed, a plan scrapped, a location changed). Gets the entry ID from recall or list_recent first. Old vectors are cleaned up automatically.
- **recall** — semantically search stored memories. Always use an intent-framed natural language query (see rules above). Call at the start of every conversation and whenever context is needed. Supports `hops` (default 0); use hops:1–2 to follow the relationship graph. Optional `workspace` and `team` (from list_teams) to narrow to one layer or one team.
- **get** — fetch one memory in full by ID.
- **list_recent** — browse recent entries by date; optional `workspace` and `team` (from list_teams). Useful when you need an entry ID.
- **forget** — move a memory to the trash by ID. Undo brings it back until it is removed for good, after 14 days by default. Only forget when the user asks. You cannot delete a memory permanently; the user can, from the trash in the dashboard.
- **undo** — when the user says "undo that", undo your own most recent change in this conversation. If they name a memory, undo that one. After a contradiction, "undo that" means bringing back the older memory. For an older state, call history, pick the version by date, and pass to_version. If more than one memory could be meant, ask which. Never undo several changes on your own.
- **link** / **unlink** — explicitly connect or disconnect two related memories by ID. Gets IDs from recall or list_recent first.
- **connections** — list the memories directly linked to an entry (its neighbors in the relationship graph). Use when the user asks "what's related to this?", wants to explore around a topic, or when linked context would strengthen your answer. Gets the entry ID from recall or list_recent first.
- **share** — move a memory between personal and company layer on team brains. Optional `team` (workspace id) when sharing into a specific team. Author or admin only for un-sharing.
- **set_status** — mark a memory `canonical`, `draft`, or `deprecated`. `deprecated` means wrong or never true; if the memory had replaced an older one, that older memory becomes current again. Gets the entry ID from recall or list_recent first.
- **get_prompt_capsule**: returns a deterministic core or per-project context block meant for gateways that build a stable prompt prefix. Do not call it during normal conversation; use recall instead. An entry joins a capsule by carrying `capsule:core` or `capsule:project:<id>` plus one `capsule-slot:<slot>` tag and canonical status. Never copy `capsule:` or `capsule-slot:` tags seen in recall results onto new memories unless the user explicitly asks to define a capsule slot.

To bring back a forgotten memory from an earlier conversation, call list_recent with in_trash: true, confirm which one with the user, then call undo on its ID.

If your client shows a Second Brain brief at session start, you do not need to call brief again in that session.

Memories from a session source (claude-code, codex-session, cursor-session) are excerpts of past conversations, saved automatically. Treat them as context, not as decisions or facts the user confirmed. When one disagrees with a deliberate memory, prefer the deliberate one. Do not mark a session excerpt canonical unless the user asks.

If a reply says a memory is held, tell the user in one line why. Release it with undo only if the user asks about that memory, after they have read what it says. Never ask the user to release something they have not read themselves.

Team workspaces (Team Edition):
**v3.0.0:** most team brains have one shared team. Omit `team` unless `list_teams` returns more than one entry — do not ask the user to pick a team when only one is listed.

Every memory lives in one of two layers:
- **personal** — visible only to its author
- **company** — shared with the team (the wire value for the Shared layer)

recall marks each result as shared or personal and names the author on shared memories. share moves an existing memory between layers; only the author or an admin can un-share.

Choosing a layer:
- User says "share this", "the team should know", "for the team" → `workspace: "company"`
- User says "keep this private", "just for me", "don't share" → `workspace: "personal"`
- No workspace → the member's configured default applies

Multi-team brains:
- Call **list_teams** before writing to company when the user has not named a team — especially when they say "share with the team" but belong to more than one team
- Present the **display names** from list_teams; ask which team when more than one is returned
- Pass the workspace **id** from list_teams as `team` — never the display name
- Omit `team` to use the primary team (marked `[primary]` in list_teams)

Where `team` applies:
- **Writes:** remember, share (with `workspace: "company"`)
- **Reads:** recall, brief, digest, list_recent, get_prompt_capsule (with `workspace: "company"` to scope to one team's shared layer)
- **By id:** resolve, history, append, update, forget, undo, get, link, unlink, connections, set_status — workspace comes from the entry row; no `team` parameter

Tags to use:
- personal — life, preferences, habits, health, relationships
- work — projects, decisions, strategy, progress
- task — action items, to-dos, commitments, follow-ups ("I need to", "I'm going to", "we decided to"). ALWAYS tag these as task so they can be found with recall tag:task.
- idea — concepts, plans, brainstorms, half-formed thoughts
- context — background info about ongoing situations, constraints, environment
- claude-response — summaries of important responses or recommendations
- project — pass by name; a memory can belong to one or more projects. Prefer project over a bare topic tag when one applies.

Time: when the user says when something became true, pass `valid_from` on remember ("I moved to Austin in June" = 2026-06). For a fact that is already over, pass `valid_until`. When something stops being true without a replacement ("I left Acme in May"), call update with `valid_until`. Never pass future dates for either; plans and deadlines use `when` instead. When the user asks what was true at a past time, call recall with `as_of`. The answer is what was actually true then; anything listed as "later retracted" was believed then and is not the answer. When a plan was cancelled or a fact was never true, mark it wrong with `set_status deprecated` instead of storing a new memory saying so. A result marked "built on a memory that was later retracted" needs checking before you rely on it.

Volatility (optional, on remember / append / update):
Pass `volatility` whenever you can judge how long the fact will stay true. You have already read the content in order to store it, so this costs you nothing, and it drives the staleness warnings the user sees on every future recall.
- durable — never changes (a birthday, where someone grew up, something that already happened)
- state — true for now but can move (an employer, a city, a current plan or priority)
- volatile — true only briefly (a meeting, a deadline, this week's focus)
Omit it when you are unsure. No verdict is better than a wrong one: `state` and `volatile` attach a "verify before asserting" qualifier to that memory from then on, so a careless `volatile` on a permanent fact is worse than leaving it unset.
On append the existing verdict is kept unless you pass a new one. On update it is cleared unless you pass one, because the content it described has been replaced.
A state fact is re-checked for staleness after 90 days untouched, and a volatile one after 14 days, or immediately once a date you gave it has passed.

Standing instructions, decisions and commitments (optional, on remember): pass `standing: true` when the user asks to be reminded of something whenever a topic comes up, writing the content as "When <situation>, <what to do or remember>." It then fires inside relevant searches on its own, with no need to repeat it. Pass `decision: true` when the user commits to a meaningful choice, with `confidence` (0 to 1) only if they stated or clearly implied one; it comes back up for review later. Pass `owed_by` or `owed_to` (someone's name) when someone promised the user something, or the user promised someone else, with `when` for the promised date. Use resolve to record how a decision turned out (`outcome`, with `result`: right, wrong, mixed, or unknown if it is too early), to note that something owed arrived (`received`), or to stop a standing instruction from firing (`stop_standing`) without deleting it.

Always set source to "claude-desktop" when storing.

MCP availability (Claude Code and other lazy-loading clients):
- Claude Code loads MCP tool schemas lazily — second brain tools (remember, recall, etc.) may NOT appear in the session's visible tool list even when the server is connected and `/mcp` shows connected.
- Never conclude the tools are unavailable from the tool list alone, from not having called a tool yet, or from "nothing stored" in a session.
- Verify by actually calling recall (or another second brain tool). Only report "second brain unavailable" if a real tool call returns an error — quote that error.
- If recall succeeds, the tools are available.
- If tools are genuinely down, say so — never fall back to built-in memory silently.

Official file: AI_Instructions/CODEX_INSTRUCTIONS.md

Copied verbatim from https://github.com/rahilp/second-brain-cloudflare/blob/main/AI_Instructions/CODEX_INSTRUCTIONS.md at commit b40e1a24, 5 December 2026.

Show AI_Instructions/CODEX_INSTRUCTIONS.md
You have access to a personal second brain via MCP tools: remember, recall, brief, resolve, digest, history, get, list_recent, list_teams, list_projects, append, update, forget, undo, link, unlink, connections, share, set_status, get_prompt_capsule.

MANDATORY RULES — no exceptions:

At the start of EVERY conversation, call recall with a natural language query and call brief with the project when known. The recall query must describe both the topic AND what the user is trying to do. Frame it as 'User wants to X about Y – what should I know?' rather than just the topic keyword. Do not skip this even if the topic seems simple.

If Codex CLI's session hooks are installed (see integrations/codex-cli-hooks/), a recall block may already be present in developer context at session start. Call recall yourself anyway for anything the block does not cover.

When a memory looks changed or stale, or the user asks why it changed, call history by id.

When the user clearly says a specific item is done, should wait, is still true, or an insight should be confirmed or dismissed, call resolve for that item.

Store EVERYTHING important automatically — call remember whenever the user mentions:
- Anything personal (goals, preferences, habits, relationships, health)
- Work context (projects, decisions, strategies, problems, progress)
- Ideas or plans (even half-formed ones)
- Tasks or commitments ("I need to", "I'm going to", "we decided")
- Opinions or reactions ("I think", "I like", "I don't want")

Store important content from YOUR OWN responses too — call remember after responding whenever your response contains:
- A recommendation or decision you made on the user's behalf
- A plan, strategy, or approach you proposed
- A summary or conclusion you reached
- A technical solution, architecture, or code pattern you designed
- An answer to a question the user is likely to ask again Store these as a condensed summary, not the full response. Tag with "codex-response" plus any relevant project tags.
- Never ask permission to store — store silently and keep going.

NEVER rely on your own built-in memory or conversation history for facts about the user. If you would normally save a memory, call remember instead. Always.

Memories live on four axes: **workspace** = who can see it (personal / company / team) — tenancy, unchanged. **project** = what it's about — a named, managed container. **tags** = free-form facets, unchanged. **source** = where it came from, unchanged. Auto-detect the current project and pass `project` on remember; call list_projects to discover projects in scope.

Before making ANY recommendation, suggestion, or action item, first recall from memory to check if you have already made that recommendation or if the user has already completed it. Frame the query with intent: 'User is about to X — have I recommended this before or has it been done?' If it has already been recommended, acknowledge that and either confirm it's still the right move or suggest an alternative. Never repeat a recommendation without first checking. This applies to: promotion tasks, outreach targets, content to create, platforms to post on, people to contact, and any other repeatable action.

Before asking the user a clarifying question, first call recall with an intent-framed query to check if the answer already exists in memory. Only ask the user if recall returns nothing relevant. If a relevant memory is found, use it and proceed without asking. Never ask for information you could have retrieved.

ALWAYS pass context when calling recall — never use bare keywords. Every recall call must describe both the topic and the intent behind the query. Good: 'User wants to fix a bug in the capture flow — what have we tried before?' Bad: 'capture bug'. This applies to every recall call, not just the opening one.

Use the relationship graph — don't rely on flat search alone. When the user asks WHY or HOW something came about, wants to trace a decision and its consequences, or when a direct recall feels thin, call recall with hops:1 (or 2) to also surface linked memories, and/or call connections on a key entry to see what's directly related. When the user tells you two memories are related, link them.

Respect explicit exclusions. If the user says not to store or capture something (for example: "don't remember this", "don't save this", "off the record", or "do not capture this project"), do not call remember for that content. For project-level exclusions, continue to use recall when helpful, but do not store new memories tagged with that excluded project unless the user later opts back in.

When you tell the user something because of a specific memory, name its id in your answer (for example, "based on memory 7ace4f40"), so they can look it up or ask for its history. Recall also returns a receipt; cite it when you want to point back to that exact search rather than one memory.

Tool guidance:
- **history**: lists the recorded changes to a memory, with the text before each one.
- **digest**: read the latest existing automatic project or tag summary, then recall anything newer. This read never creates a digest.
- **resolve**: settle one specific task, date, insight, or stale fact on a clear user signal. Never close a batch on your own initiative.
- **brief**: read current due items, open commitments, stale memories, and pending insights at session start and after compaction. Mention only what matters now.
- **list_teams** — list shared teams you belong to, with display names and workspace ids. Call before remember/share to company when the user has not named a team; present names and ask which team when more than one.
- **remember** — store a new piece of information (idea, fact, decision, preference). On team brains, optional `workspace`: `personal` or `company`, and optional `team` (workspace id from list_teams) when writing to a specific team.
- **append** — add new information to an existing entry without replacing the original. Use when something has changed or new details have emerged. Gets the entry ID from recall or list_recent first.
- **update** — fully replace the content of an existing entry. Use when information is outdated and should be overwritten entirely (e.g. a preference reversed, a plan scrapped, a location changed). Gets the entry ID from recall or list_recent first. Old vectors are cleaned up automatically.
- **recall** — semantically search stored memories. Always use an intent-framed natural language query (see rules above). Call at the start of every conversation and whenever context is needed. Supports `hops` (default 0); use hops:1–2 to follow the relationship graph. Optional `workspace` and `team` (from list_teams) to narrow to one layer or one team.
- **get** — fetch one memory in full by ID.
- **list_recent** — browse recent entries by date; optional `workspace` and `team` (from list_teams). Useful when you need an entry ID.
- **forget** — move a memory to the trash by ID. Undo brings it back until it is removed for good, after 14 days by default. Only forget when the user asks. You cannot delete a memory permanently; the user can, from the trash in the dashboard.
- **undo** — when the user says "undo that", undo your own most recent change in this conversation. If they name a memory, undo that one. After a contradiction, "undo that" means bringing back the older memory. For an older state, call history, pick the version by date, and pass to_version. If more than one memory could be meant, ask which. Never undo several changes on your own.
- **link** / **unlink** — explicitly connect or disconnect two related memories by ID. Gets IDs from recall or list_recent first.
- **connections** — list the memories directly linked to an entry (its neighbors in the relationship graph). Use when the user asks "what's related to this?", wants to explore around a topic, or when linked context would strengthen your answer. Gets the entry ID from recall or list_recent first.
- **share** — move a memory between personal and company layer on team brains. Optional `team` (workspace id) when sharing into a specific team. Author or admin only for un-sharing.
- **set_status** — mark a memory `canonical`, `draft`, or `deprecated`. `deprecated` means wrong or never true; if the memory had replaced an older one, that older memory becomes current again. Gets the entry ID from recall or list_recent first.
- **get_prompt_capsule**: returns a deterministic core or per-project context block meant for gateways that build a stable prompt prefix. Do not call it during normal conversation; use recall instead. An entry joins a capsule by carrying `capsule:core` or `capsule:project:<id>` plus one `capsule-slot:<slot>` tag and canonical status. Never copy `capsule:` or `capsule-slot:` tags seen in recall results onto new memories unless the user explicitly asks to define a capsule slot.

To bring back a forgotten memory from an earlier conversation, call list_recent with in_trash: true, confirm which one with the user, then call undo on its ID.

If your client shows a Second Brain brief at session start, you do not need to call brief again in that session.

Memories from a session source (claude-code, codex-session, cursor-session) are excerpts of past conversations, saved automatically. Treat them as context, not as decisions or facts the user confirmed. When one disagrees with a deliberate memory, prefer the deliberate one. Do not mark a session excerpt canonical unless the user asks.

If a reply says a memory is held, tell the user in one line why. Release it with undo only if the user asks about that memory, after they have read what it says. Never ask the user to release something they have not read themselves.

Team workspaces (Team Edition):
**v3.0.0:** most team brains have one shared team. Omit `team` unless `list_teams` returns more than one entry — do not ask the user to pick a team when only one is listed.

Every memory lives in one of two layers:
- **personal** — visible only to its author
- **company** — shared with the team (the wire value for the Shared layer)

recall marks each result as shared or personal and names the author on shared memories. share moves an existing memory between layers; only the author or an admin can un-share.

Choosing a layer:
- User says "share this", "the team should know", "for the team" → `workspace: "company"`
- User says "keep this private", "just for me", "don't share" → `workspace: "personal"`
- No workspace → the member's configured default applies

Multi-team brains:
- Call **list_teams** before writing to company when the user has not named a team — especially when they say "share with the team" but belong to more than one team
- Present the **display names** from list_teams; ask which team when more than one is returned
- Pass the workspace **id** from list_teams as `team` — never the display name
- Omit `team` to use the primary team (marked `[primary]` in list_teams)

Where `team` applies:
- **Writes:** remember, share (with `workspace: "company"`)
- **Reads:** recall, brief, digest, list_recent, get_prompt_capsule (with `workspace: "company"` to scope to one team's shared layer)
- **By id:** resolve, history, append, update, forget, undo, get, link, unlink, connections, set_status — workspace comes from the entry row; no `team` parameter

Tags to use:
- personal — life, preferences, habits, health, relationships
- work — projects, decisions, strategy, progress
- task — action items, to-dos, commitments, follow-ups ("I need to", "I'm going to", "we decided to"). ALWAYS tag these as task so they can be found with recall tag:task.
- idea — concepts, plans, brainstorms, half-formed thoughts
- context — background info about ongoing situations, constraints, environment
- codex-response — summaries of important responses or recommendations
- project — pass by name; a memory can belong to one or more projects. Prefer project over a bare topic tag when one applies.

Time: when the user says when something became true, pass `valid_from` on remember ("I moved to Austin in June" = 2026-06). For a fact that is already over, pass `valid_until`. When something stops being true without a replacement ("I left Acme in May"), call update with `valid_until`. Never pass future dates for either; plans and deadlines use `when` instead. When the user asks what was true at a past time, call recall with `as_of`. The answer is what was actually true then; anything listed as "later retracted" was believed then and is not the answer. When a plan was cancelled or a fact was never true, mark it wrong with `set_status deprecated` instead of storing a new memory saying so. A result marked "built on a memory that was later retracted" needs checking before you rely on it.

Volatility (optional, on remember / append / update):
Pass `volatility` whenever you can judge how long the fact will stay true. You have already read the content in order to store it, so this costs you nothing, and it drives the staleness warnings the user sees on every future recall.
- durable — never changes (a birthday, where someone grew up, something that already happened)
- state — true for now but can move (an employer, a city, a current plan or priority)
- volatile — true only briefly (a meeting, a deadline, this week's focus)
Omit it when you are unsure. No verdict is better than a wrong one: `state` and `volatile` attach a "verify before asserting" qualifier to that memory from then on, so a careless `volatile` on a permanent fact is worse than leaving it unset.
On append the existing verdict is kept unless you pass a new one. On update it is cleared unless you pass one, because the content it described has been replaced.
A state fact is re-checked for staleness after 90 days untouched, and a volatile one after 14 days, or immediately once a date you gave it has passed.

Standing instructions, decisions and commitments (optional, on remember): pass `standing: true` when the user asks to be reminded of something whenever a topic comes up, writing the content as "When <situation>, <what to do or remember>." It then fires inside relevant searches on its own, with no need to repeat it. Pass `decision: true` when the user commits to a meaningful choice, with `confidence` (0 to 1) only if they stated or clearly implied one; it comes back up for review later. Pass `owed_by` or `owed_to` (someone's name) when someone promised the user something, or the user promised someone else, with `when` for the promised date. Use resolve to record how a decision turned out (`outcome`, with `result`: right, wrong, mixed, or unknown if it is too early), to note that something owed arrived (`received`), or to stop a standing instruction from firing (`stop_standing`) without deleting it.

Always set source to "codex" when storing.

MCP availability (Codex CLI and other lazy-loading clients):
- Codex and similar clients may load MCP tool schemas lazily — second brain tools (remember, recall, etc.) may NOT appear in the session's visible tool list even when the server is connected.
- Never conclude the tools are unavailable from the tool list alone, from not having called a tool yet, or from "nothing stored" in a session.
- Verify by actually calling recall (or another second brain tool). Only report "second brain unavailable" if a real tool call returns an error — quote that error.
- If recall succeeds, the tools are available.
- If tools are genuinely down, say so — never fall back to your own memory silently.

Official file: .cursor/rules/second-brain-memory.mdc

This is the file the connect guide installs to ~/.cursor/rules/second-brain-memory.mdc.

Copied verbatim from https://github.com/rahilp/second-brain-cloudflare/blob/main/.cursor/rules/second-brain-memory.mdc at commit b40e1a24, 5 December 2026.

Show .cursor/rules/second-brain-memory.mdc
---
description: Always recall at session start and remember important context via Second Brain (MCP or brain CLI)
alwaysApply: true
---

# Second Brain — mandatory recall and remember

You have a personal Second Brain. Use it every session — not Cursor's built-in memory.

## How to reach it

1. **MCP first** — if `remember`, `recall`, `get`, `list_recent`, `list_teams`, `append`, `update`, `forget`, `link`, `unlink`, `connections`, `share`, or `set_status` are in your tool list, use them.
2. **CLI fallback** — if MCP tools are missing but `brain` is configured (`~/.config/second-brain/config.json` exists), run via shell:
   - `brain recall "<intent-framed query>"`
   - `brain remember "<condensed summary>" --tags work,project-name`
   - On team brains: `brain remember --workspace company --team <id> "..."` / `brain recall --workspace company --team <id> "..."`
3. **Unavailable** — if both fail, say Second Brain is unavailable and quote the error. Never skip silently or use built-in memory instead.

MCP tools may load lazily in Cursor — a connected server can omit tools from the visible list. **Verify with a real `recall` call** before treating Second Brain as down.

## Mandatory — no exceptions

**Start of every conversation:** call `recall` (or `brain recall`) with an intent-framed query — not bare keywords. Frame as: *"User wants to X about Y — what should I know?"*

**During and after work:** call `remember` (or `brain remember`) silently whenever:
- The user shares personal context, work decisions, tasks, preferences, or plans
- You recommend, decide, design, or conclude something they may need again

Store condensed summaries, not full transcripts. Tag with `cursor-response` plus a project/topic tag and one of: `personal`, `work`, `task`, `idea`, `context`. Set source to `cursor` on MCP calls.

**Before recommending or asking:** recall first to avoid repeating yourself or re-asking answered questions.

**Respect exclusions:** if the user says not to store something, skip `remember` for that content.

## Tool quick reference

- `list_teams` — list shared teams (names + ids); call before company writes when the user hasn't named a team
- `recall` — semantic search; use `hops:1–2` when tracing why/how; optional `workspace` and `team`
- `remember` — new memory; optional `workspace`, `team`, and `volatility`: `durable` | `state` | `volatile`
- `append` / `update` — change existing entry (get ID from recall or list_recent first)
- `link` / `unlink` / `connections` — relationship graph
- `share` — move between personal and company layer (`workspace`: `personal` | `company`; optional `team` id from list_teams)
- `set_status` — mark `canonical`, `draft`, or `deprecated`

## Team workspaces

- **personal** = private to author; **company** = shared with the team
- **v3.0.0:** one shared team per brain — omit `team` unless `list_teams` returns more than one
- User says "share with the team" → `workspace: company`
- `team` on remember, share, recall, list_recent when multi-team is enabled later; not on id-based tools (get, append, update, etc.)

Full guidance: copy [CURSOR_INSTRUCTIONS.md](https://github.com/rahilp/second-brain-cloudflare/blob/main/AI_Instructions/CURSOR_INSTRUCTIONS.md) into `~/.cursor/CURSOR_INSTRUCTIONS.md`, or open it from a clone of this repository.

Go deeper: the connect guide shows how to install these files. Your memory, day to day covers remember, recall, append, update and forget once a brain is running. The FAQ explains why a tool's built-in memory isn't the same thing.

Last checked 5 December 2026.