Roo Code Memory Bank solves a critical challenge in AI-assisted development: maintaining context across sessions. By providing a structured memory system integrated with VS Code, it ensures your AI assistant maintains a deep understanding of your project across sessions.
graph LR
A[Memory Bank] --> B[Core Files]
A --> C[Mode Rules]
A --> D[VS Code UI]
B --> E[Project Context]
B --> F[Decisions]
B --> G[Progress]
C --> H[Architect]
C --> I[Code]
C --> J[Ask]
C --> K1[Debug]
K[Real-time Updates] --> B
K --> L[Continuous Sync]
L --> M[Auto-save]
L --> N[Event Tracking]
- π§ Memory Bank: Persistent storage for project knowledge
- π Mode Rules: YAML-based behavior configuration
- π§ VS Code Integration: Seamless development experience
- β‘ Real-time Updates: Continuous context synchronization
Download and copy these files to your project's root directory:
Mode | Rule File | Purpose |
---|---|---|
Code | .clinerules-code |
Implementation and coding tasks |
Architect | .clinerules-architect |
System design and architecture |
Ask | .clinerules-ask |
Information and assistance |
Debug | .roomodes |
Troubleshooting and problem-solving |
β οΈ Important: Leave the "Custom Instructions" text boxes empty in VS Code settings (Roo Code Prompts section)
- Switch to Architect or Code mode in Roo Code chat
- Send a message (e.g., "hello")
- Roo will automatically:
- π Scan for
memory-bank/
directory - π Create it if missing (with your approval)
- π Initialize core files
- π¦ Provide next steps
- π Scan for
π‘ Pro Tip: Project Brief
Create a projectBrief.md
in your project root before initialization to give Roo immediate project context.
project-root/
βββ .clinerules-architect
βββ .clinerules-code
βββ .clinerules-ask
βββ .roomodes
βββ memory-bank/
β βββ activeContext.md
β βββ productContext.md
β βββ progress.md
β βββ decisionLog.md
βββ projectBrief.md
graph TD
MB[memory-bank/] --> AC[activeContext.md]
MB --> DL[decisionLog.md]
MB --> PC[productContext.md]
MB --> PR[progress.md]
MB --> PB[projectBrief.md]
MB --> SP[systemPatterns.md]
subgraph Core Files
AC[Current Session State]
DL[Technical Decisions]
PC[Project Overview]
PR[Progress Tracking]
end
subgraph Optional
PB[Project Brief]
SP[System Patterns]
end
π View File Descriptions
File | Purpose |
---|---|
activeContext.md |
Tracks current goals, decisions, and session state |
decisionLog.md |
Records architectural choices and their rationale |
productContext.md |
Maintains high-level project context and knowledge |
progress.md |
Documents completed work and upcoming tasks |
projectBrief.md |
Contains initial project requirements (optional) |
systemPatterns.md |
Documents recurring patterns and standards |
- Remembers project details across sessions
- Maintains consistent understanding of your codebase
- Tracks decisions and their rationale
graph LR
A[Architect Mode] -->|Real-time Design Updates| B[Memory Bank]
C[Code Mode] -->|Real-time Implementation| B
D[Ask Mode] -->|Real-time Insights| B
F[Debug Mode] -->|Real-time Analysis| B
B -->|Instant Context| A
B -->|Instant Context| C
B -->|Instant Context| D
B -->|Instant Context| F
E[Event Monitor] -->|Continuous Sync| B
- Mode-based operation for specialized tasks
- Automatic context switching
- Project-specific customization via rules
- Structured documentation with clear purposes
- Technical decision tracking with rationale
- Automated progress monitoring
- Cross-referenced project knowledge
graph TD
A[Workspace] --> B[Project 1]
A --> C[Project 2]
B --> D[memory-bank/]
C --> E[memory-bank/]
D --> F[Automatic Detection]
E --> F
Roo automatically handles multiple Memory Banks in your workspace!
Roo Code Memory Bank now includes a Debug mode for troubleshooting and problem-solving. This mode was added using a .roomodes
file in the project root:
{
"customModes": [
{
"slug": "debug",
"name": "Debug",
"roleDefinition": "You are Roo, a meticulous problem-solver with surgical precision...",
"groups": [
"read",
"command"
]
}
]
}
Debug mode provides:
- Read-only access to files for safe analysis
- Command execution for diagnostic tools
- Systematic problem investigation
- Root cause identification
- Evidence-based verification
Switch to Debug mode when you need to troubleshoot issues in your project.
- β‘ Real-time Updates: Memory Bank automatically stays synchronized with your work
- πΎ Manual Updates: Use "UMB" or "update memory bank" as a fallback when:
- Ending a session unexpectedly
- Halting mid-task
- Recovering from connection issues
- Forcing a full synchronization
View on GitHub β’ Report Issues β’ Get Roo Code
Apache 2.0 Β© 2025 GreatScottyMac