# memory

This rule organizes project memory across docs/, tasks/, and .cursor/rules/. It helps an agent retain plans, context, errors, and project decisions between tasks.

- 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/archive/.roo/rules/memory.md
- Updated: 2025-07-17
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/bhartendu-kumar-memory

## What it does

The rule defines a file-based memory layout for a project. Seven core files cover different parts of the work: `docs/product_requirement_docs.md` stores requirements, `docs/architecture.md` describes the system, `docs/technical.md` records the stack and constraints, while `tasks/tasks_plan.md` and `tasks/active_context.md` track the backlog and current state. The `.cursor/rules/` files keep reusable fixes and project lessons.

Work is split into PLAN and ACT modes. In PLAN, the agent reads the memory files, checks the context, and prepares an approach. In ACT, it updates the documentation, carries out the task, and records changes. Optional context can live under `docs/literature/` and `tasks/rfc/`. The requested mode controls the workflow; when the request is unclear, the rule tells the agent to ask before proceeding.

For Claude Code, create `.claude/rules/memory.md` and place the rule there. Cline uses `.clinerules/memory.md`. The rule provides the structure, while the project files still need updates after meaningful changes.

## Install

### Claude Code (native platform)

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

### Codex

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

### Cursor

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

### GitHub Copilot

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

### 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/archive/.roo/rules/memory.md

## When to use it
- separate requirements from architecture notes
- track the task backlog and current project state
- record reusable fixes for later work
- capture project decisions and working preferences
- split planning from task execution

## Example prompts
- Read the project memory files first and decide whether this request is PLAN or ACT mode.
- Update `tasks/tasks_plan.md` and `tasks/active_context.md` after completing this task.
- Record this reusable fix in `.cursor/rules/error-documentation.mdc`.

## Similar
- [deep-agents-memory](https://affpapa.org/en/nevibecode/skills/deep-agents-memory.md) — skill · 20000 installs
- [memory-safety-patterns](https://affpapa.org/en/nevibecode/skills/memory-safety-patterns.md) — skill · 11746 installs
- [memory-management](https://affpapa.org/en/nevibecode/skills/memory-management.md) — skill · 7800 installs
- [memory-discipline](https://affpapa.org/en/nevibecode/skills/memory-discipline.md) — skill · 4900 installs
- [memory-leak-debugging](https://affpapa.org/en/nevibecode/skills/memory-leak-debugging.md) — skill · 3700 installs
- [trader-memory-core](https://affpapa.org/en/nevibecode/skills/trader-memory-core.md) — skill · 3700 installs

## Other versions with the same name
- [memory · bhartendu-kumar](https://affpapa.org/en/nevibecode/rules/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
