# memory

Keeps project memory in a fixed set of files the agent reads before work: requirements, architecture, stack, task plan, current state.

- rule · `type=rule` · Claude Code, Cline, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop) · ★ 1054 repo stars
- Author: Bhartendu-Kumar
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Bhartendu-Kumar/rules_template/tree/HEAD/.cursor/rules/memory.mdc
- Updated: 2025-07-17
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/memory

## What it does

Seven files carry the memory: a requirements doc, architecture, the technical stack, a task backlog, the current working state, and two journals for mistakes and for lessons. The rule lays them out as a hierarchy, with a mermaid diagram showing what builds on what.

Work runs in one of two modes. Plan mode reads `docs/` and `tasks/`, checks whether anything is missing and brings you a strategy to approve. Act mode refreshes the docs first and only then touches code. You can name the mode outright with `MODE = ACT MODE`, otherwise the agent infers it and asks when the request is unclear. Expect an extra question at the start of a session.

The whole scheme depends on the files being there. Without them plan mode has nothing to read and starts by drafting the set, including the PRD at project start. Asking the agent to update memory files makes it go through every core file again, which is how the picture stays current.

## Install

### Cursor (native platform)

**Manually: put the files in place**
- File: `.cursor/rules/memory.mdc` — Frontmatter: description, globs, alwaysApply

### Claude Code

**Manually: put the files in place**
- File: `.claude/rules/memory.md` — The paths frontmatter field limits the files: move globs from the source into paths

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/memory.instructions.md` — The applyTo field sets which files it applies to: move globs from the source into applyTo

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/memory.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/memory.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Bhartendu-Kumar/rules_template/tree/HEAD/.cursor/rules/memory.mdc

## When to use it
- keep requirements and architecture in files the agent reads first
- pick a task back up after a session restart
- log a fix so the same mistake is not repeated
- separate planning from code edits
- keep RFCs and literature notes next to the task plan

## Example prompts
- MODE = PLAN MODE: read the memory files in `docs/` and `tasks/`, then propose a plan.
- Update memory files: go through `tasks/active_context.md` and `tasks/tasks_plan.md`.
- Write that fix into `.cursor/rules/error-documentation.mdc` before you continue.

## Similar
- [story-memory](https://affpapa.org/en/nevibecode/skills/story-memory.md) — skill · 606 installs
- [notion-memory](https://affpapa.org/en/nevibecode/plugins/notion-memory.md) — plugin · ★ 11 repo stars
- [remember](https://affpapa.org/en/nevibecode/skills/yeachan-heo-remember.md) — skill · 695 installs
- [memory-discipline](https://affpapa.org/en/nevibecode/skills/memory-discipline.md) — skill · 4900 installs
- [OMEGA Memory](https://affpapa.org/en/nevibecode/mcp/omega-memory-omega-memory.md) — MCP server · 2862 installs
- [claude-memory-curator](https://affpapa.org/en/nevibecode/skills/claude-memory-curator.md) — skill · 2700 installs

## Other versions with the same name
- [memory · bhartendu-kumar](https://affpapa.org/en/nevibecode/rules/bhartendu-kumar-memory.md) — ★ 1054 repo stars

From the same set: [bhartendu-kumar/rules_template](https://affpapa.org/en/nevibecode/by/bhartendu-kumar/rules_template.md) — 11 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
