roo-code-memory-bank

roo-code-memory-bank

🧠 Roo Code Memory Bank - Now with new debug mode! (Thanks @TheRealAlexV) Solve the AI context challenge: maintain deep project understanding across sessions with our structured VS Code memory system. Never repeat project details again! ✨

Stars: 200

Visit
 screenshot

Roo Code Memory Bank is a tool designed for AI-assisted development to maintain project context across sessions. It provides a structured memory system integrated with VS Code, ensuring deep understanding of the project for the AI assistant. The tool includes key components such as Memory Bank for persistent storage, Mode Rules for behavior configuration, VS Code Integration for seamless development experience, and Real-time Updates for continuous context synchronization. Users can configure custom instructions, initialize the Memory Bank, and organize files within the project root directory. The Memory Bank structure includes files for tracking session state, technical decisions, project overview, progress tracking, and optional project brief and system patterns documentation. Features include persistent context, smart workflows for specialized tasks, knowledge management with structured documentation, and cross-referenced project knowledge. Pro tips include handling multiple projects, utilizing Debug mode for troubleshooting, and managing session updates for synchronization. The tool aims to enhance AI-assisted development by providing a comprehensive solution for maintaining project context and facilitating efficient workflows.

README:

🧠 Roo Code Memory Bank

Persistent Project Context for AI-Assisted Development

VS Code Extension GitHub

🎯 Overview

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.

Key Components

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

πŸš€ Quick Start

1. Configure Custom Instructions

a. Copy Rule and Mode Files

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 .clinerules-debug Troubleshooting and problem-solving
Modes .roomodes Additional modes

b. Configure VS Code Settings

⚠️ Important: Leave the "Custom Instructions" text boxes empty in VS Code settings (Roo Code Prompts section)

πŸ“· View Settings Screenshot

Roo Code Settings

2. Initialize Memory Bank

  1. Switch to Architect or Code mode in Roo Code chat
  2. Send a message (e.g., "hello")
  3. Roo will automatically:
    • πŸ” Scan for memory-bank/ directory
    • πŸ“ Create it if missing (with your approval)
    • πŸ“ Initialize core files
    • 🚦 Provide next steps
πŸ’‘ Pro Tip: Project Brief

Create a projectBrief.md in your project root before initialization to give Roo immediate project context.

File Organization

project-root/
β”œβ”€β”€ .clinerules-architect
β”œβ”€β”€ .clinerules-code
β”œβ”€β”€ .clinerules-ask
β”œβ”€β”€ .clinerules-debug
β”œβ”€β”€ .roomodes
β”œβ”€β”€ memory-bank/
β”‚   β”œβ”€β”€ activeContext.md
β”‚   β”œβ”€β”€ productContext.md
β”‚   β”œβ”€β”€ progress.md
β”‚   └── decisionLog.md
└── projectBrief.md

πŸ“š Memory Bank Structure

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

✨ Features

🧠 Persistent Context

  • Remembers project details across sessions
  • Maintains consistent understanding of your codebase
  • Tracks decisions and their rationale

πŸ”„ Smart Workflows

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

πŸ“Š Knowledge Management

  • Structured documentation with clear purposes
  • Technical decision tracking with rationale
  • Automated progress monitoring
  • Cross-referenced project knowledge

πŸ’‘ Pro Tips

Multiple Projects

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!

Debug Mode

Roo Code Memory Bank includes a powerful Debug mode for systematic troubleshooting and problem-solving. This mode operates with surgical precision, focusing on root cause analysis and evidence-based verification.

Key Capabilities

  • πŸ” Non-destructive Investigation: Read-only access ensures system integrity during analysis
  • πŸ“Š Diagnostic Tools: Access to logging, tracing, and system analysis tools
  • πŸ”¬ Systematic Analysis: Methodical problem investigation and isolation
  • 🎯 Root Cause Identification: Traces error propagation through all system layers
  • βœ… Evidence-based Verification: Validates findings through multiple checkpoints

Real-time Update Triggers

Debug mode actively monitors and updates Memory Bank files based on:

  • πŸ› Bug discoveries and error patterns
  • πŸ’Ύ Memory leaks and resource issues
  • πŸ”„ Race conditions and deadlocks
  • πŸ“ˆ Performance bottlenecks
  • πŸ“ Log analysis and trace outputs

Memory Bank Integration

graph TD
    A[Debug Mode] --> B[Analysis]
    B --> C[Findings]
    C --> D[Memory Bank Updates]
    D --> E[activeContext.md]
    D --> F[progress.md]
    D --> G[decisionLog.md]
    E --> H[Current Issues]
    F --> I[Debug Progress]
    G --> J[Solution Decisions]

Switch to Debug mode when you need to:

  • Investigate system behavior
  • Analyze failure patterns
  • Isolate root causes
  • Verify fixes
  • Document debugging insights

Session Management

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

πŸ“– Documentation


View on GitHub β€’ Report Issues β€’ Get Roo Code

License

Apache 2.0 Β© 2025 GreatScottyMac

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for roo-code-memory-bank

Similar Open Source Tools

For similar tasks

For similar jobs