Skip to main content
rule CX Codex

memory · bhartendu-kumar, roo — Claude Code rule: project memory and setup

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

no license ★ 1,054 updated 2025-07-17

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/memory.md
Open on GitHub

What memory 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.

What it helps with

  • 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 for the agent

  • 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.

How to install memory

Manually: put the files in place

.claude/rules/memory.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about memory

How do I install memory in Claude Code?

Create .claude/rules/memory.md and put the rule content in that file.

What does the memory rule do?

It sets up a file structure for requirements, architecture, technical context, tasks, and project lessons. The agent follows that structure in PLAN and ACT modes.

What belongs in the core memory structure?

The core set includes docs/product_requirement_docs.md, docs/architecture.md, docs/technical.md, tasks/tasks_plan.md, tasks/active_context.md, .cursor/rules/error-documentation.mdc, and .cursor/rules/lessons-learned.mdc. Extra context can go in docs/literature/ and tasks/rfc/.

Similar IDE rules

All IDE rules for Agent setup: memory, context, orchestration →

memory by other authors comes first.

memory Bhartendu-Kumar Keeps project memory in a fixed set of files the agent reads before work: requirements, architecture, stack, task plan, current state. CX Codex +1 ★ 1,054repo stars deep-agents-memory langchain-ai deep-agents-memory — a skill that maps where a Deep Agent keeps its files: thread state, a persistent store, or the real disk. Useful once the agent starts dropping context. CX Codex +1 20,000installs memory-safety-patterns Seth Hobson memory-safety-patterns — a Claude Code skill covering memory-safe patterns in Rust, C++ and C. It kicks in for systems code, resource handling and hunting down memory bugs. CX Codex +1 11,746installs memory-management official anthropics The memory-management skill organizes workplace shorthand, names, and project details into files an agent can consult. It fits projects where requests rely on an internal vocabulary and shared context. CX Codex +1 7,800installs memory-discipline rohitg00 memory-discipline — a skill for Claude Code, Cursor and other platforms that retrieves prior context at task start, stores decisions the moment they settle, and learns from corrections. CX Codex +1 4,900installs memory-leak-debugging ChromeDevTools memory-leak-debugging finds memory leaks in JavaScript and Node.js with Chrome DevTools MCP. Use it to investigate high memory use, OOM errors, and heap snapshots. CX Codex +1 3,700installs trader-memory-core tradermonty trader-memory-core is a Claude Code skill that tracks investment theses from initial screening to postmortem analysis. Activates when you ask to track an idea or review open theses. CX Codex +1 3,700installs

From the same set11

The whole set →

Project sponsors

Companies that keep this analytics open