Skip to content

Memory & Planning

Claude Code has two mechanisms for carrying context across sessions: auto memory (persistent notes) and planning documents (checked-in architectural decisions).

Claude Code maintains a persistent memory directory that survives across conversations:

~/.claude/projects/<project-hash>/memory/
  • MEMORY.md — loaded into every session’s system prompt. Contains key architectural decisions, completed phases, critical rules, and session notes. Must stay under 200 lines.
  • Topic files — detailed notes on specific subjects (e.g., debugging-rule-matching.md, completed-phases.md). Linked from MEMORY.md.
  • Stable patterns confirmed across multiple sessions
  • Key architectural decisions and their rationale
  • Solutions to recurring problems
  • User preferences for workflow and communication
  • Session-specific context (current task, in-progress work)
  • Unverified conclusions from reading a single file
  • Anything that duplicates CLAUDE.md instructions

The planning/ directory contains architectural planning documents:

UpDoc/planning/

These are checked into git and represent the project’s design record.

DocumentPurpose
REFACTOR_TO_CONFIGURABLE.mdConfig-driven extraction and mapping architecture
CREATE_FROM_SOURCE_SIDEBAR.mdUnified sidebar modal design
CREATE_FROM_SOURCE_UI.mdSingle entry point UI design
DESTINATION_DRIVEN_MAPPING.mdOutlook-rules-inspired destination-driven mapping
TRANSFORMED_VIEW.mdThree-layer Extract → Shape → Map pipeline
RULES_EDITOR.mdSection rules editor design
PLAYWRIGHT_TESTING.mdE2E testing strategy
Planning documentsAuto memory
Locationplanning/ (in repo)~/.claude/memory/ (local)
VersionedYes (git)No
SharedYes (all contributors)No (per-machine)
PurposeArchitectural decisions, implementation plansSession continuity, lessons learned
LifespanPermanent until supersededUpdated as understanding evolves

At the end of any significant planning phase, plans are saved to planning/ with a meaningful filename. Claude Code’s built-in .claude/plans/ directory uses auto-generated names that are hard to find — the planning/ directory is the human-readable permanent record.