agentleFS
rahilprahilp/second-brain-cloudflare/.cursor/rules/second-brain-memory.mdc

second-brain-cloudflare / rules

Cursor rule801 starsChanged 3 months agoMITView on GitHub

Always recall at session start and remember important context via Second Brain (MCP or brain CLI)

  • Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.

    Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

We split this second-brain-memory.mdc into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Start of every conversation: call recall (or brain recall) with an intent-framed query — not bare keywords.

    line 23
  2. Very specific:

    During and after work: call remember (or brain remember) silently whenever:

    line 25
  3. Very specific:

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

    line 33

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.