Memory Bank is a documentation methodology that transforms Cline from a stateless assistant into a persistent development partner. Through structured markdown files, Cline can “remember” your project details across sessions.Documentation Index
Fetch the complete documentation index at: https://docs.cline.bot/llms.txt
Use this file to discover all available pages before exploring further.
Quick Setup
- Copy the custom instructions below
- Add them to a Cline Rules file, such as
.clinerules/memory-bank.md - Ask Cline to “initialize memory bank”
How It Works
Memory Bank files are regular markdown files in your project that both you and Cline can access. They’re organized hierarchically to build a complete picture of your project:.png)
Core Files
| File | Purpose |
|---|---|
projectbrief.md | Foundation document with core requirements and goals |
productContext.md | Why the project exists, problems it solves, UX goals |
activeContext.md | Current focus, recent changes, next steps (updates most frequently) |
systemPatterns.md | Architecture, design patterns, component relationships |
techContext.md | Tech stack, setup, constraints, dependencies |
progress.md | What works, what’s left, known issues |
Key Commands
- “follow your custom instructions” - Tells Cline to read Memory Bank and continue where you left off
- “initialize memory bank” - Creates the initial structure for a new project
- “update memory bank” - Triggers a full documentation review and update
/newtask and /smol help you manage context windows without losing progress.
Managing Context Windows
Every AI model has a context window that limits how much information it can process at once. As you work, this window fills with conversation history, file contents, and tool results. Memory Bank helps you preserve important knowledge when you need to free up space.Manual approach
When your context window fills up:- Ask Cline to “update memory bank” to document the current state
- Start a new conversation
- Ask Cline to “follow your custom instructions”
Best Practices
- Start with a basic project brief and let structure evolve
- Let Cline help create the initial structure
activeContext.mdchanges most frequently; update it after each sessionprogress.mdtracks milestones; review it when resuming work- Update after significant milestones or direction changes
- Use Cline Rules to store the Memory Bank instructions per project
Memory Bank Custom Instructions
Copy this into a Cline Rules file (for example,.clinerules/memory-bank.md) or your global custom instructions:
FAQ
Custom instructions or Cline Rules? Either works. Custom instructions apply globally across all projects. A Cline Rules file is project-specific and stored in your repo, which makes it easy to share with collaborators. You can also use conditional rules to activate Memory Bank instructions only when working withmemory-bank/ files.
How often should I update?
After significant milestones or direction changes. For active development, every few sessions. You can also let Auto Compact handle routine context management and reserve manual “update memory bank” for important checkpoints.
Does this work with other AI tools?
Yes. Memory Bank is a documentation methodology that works with any AI that can read docs. Commands may differ but the approach works across tools.
Different from README files?
Memory Bank provides structured, comprehensive documentation designed for AI context management, going beyond what a single README covers. It includes files for active context and progress tracking that change frequently, unlike a typical README.
