agentleFS
GhostwheeIGhostwheeI/Master-Planner/.cursor/rules/004-memory-and-resume.mdc

Master-Planner / rules

Cursor rule0 starsChanged 5 months agoMITView on GitHub

Keeps durable planning memory on disk and enables recovery after context loss or compaction

The file

We split this 004-memory-and-resume.mdc into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    When a .cursor/plans/<project>/ directory exists:

    line 12
  2. Very specific:

    Read manifest.md before continuing any in-progress plan.

    line 13
  3. Very specific:

    Read context.md (the memory bank) before proposing architecture (check Key Decisions) and before re-fixing a bug (check Known Pitfalls).

    line 14
  4. Very specific:

    Update manifest.md (phase, status, active assumptions, resume instruction) whenever the plan advances a phase.

    line 17
  5. Distinctive:

    Never store secrets (keys, tokens, passwords, PII) in any memory or planning file.

    line 19
  6. Distinctive:

    If you sense you have lost the thread (after compaction, a new session, or a long conversation):

    line 22

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 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
004-memory-and-resume.mdc
---
description: Keeps durable planning memory on disk and enables recovery after context loss or compaction
globs: *
alwaysApply: true
---
# Memory and Resume

## Why this rule exists
The agent's chat context is volatile: it is lost on compaction, new sessions, and long conversations. Anything that must survive belongs on disk. This rule makes the file system the source of truth for planning state.

## Read memory before deciding
When a `.cursor/plans/<project>/` directory exists:
- Read `manifest.md` before continuing any in-progress plan.
- Read `context.md` (the memory bank) before proposing architecture (check **Key Decisions**) and before re-fixing a bug (check **Known Pitfalls**). Do not re-litigate a settled decision recorded as an ADR.

## Write memory at phase boundaries
- Update `manifest.md` (phase, status, active assumptions, resume instruction) whenever the plan advances a phase.
- Append to `context.md` when a decision, fact, or pitfall emerges that will prevent a future mistake. Keep entries terse. Do not create memory churn — memory is a safety net, not a diary.
- Never store secrets (keys, tokens, passwords, PII) in any memory or planning file.

## Recover after context loss
If you sense you have lost the thread (after compaction, a new session, or a long conversation):
1. Read `.cursor/plans/<project>/manifest.md` first.
2. Then read `spec.md` and `tasks.md`.
3. Continue from the phase recorded in the manifest. Do not restart from scratch and do not invent state.

## Anti-Rationalization

| Excuse | Reality |
|--------|---------|
| "I'll remember it" | Compaction will erase it. Write it down. |
| "Updating the manifest is busywork" | It is the only thing that lets a future session resume. 20 seconds now saves a restart. |
| "This decision is obvious, no need to record" | Obvious now, invisible after compaction. One ADR line prevents a re-litigation. |

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.