RooFlow Documentation

repository·main·Indexed 21 days ago

https://github.com/greatscottymac/rooflow

An experimental framework for the Roo Code VS Code extension that provides YAML-based system prompts and a Memory Bank system. RooFlow introduces specialized 'Flow' modes—including Flow-Architect, Flow-Code, Flow-Debug, Flow-Ask, and Flow-Orchestrator—to provide persistent project context and token-optimized AI-assisted development.

Tokens
2K
Snippets
1
Records
9
Agent score
29%

What's inside RooFlow

  1. Key improvements in RooFlow over Roo Code Memory Bank

    main

    RooFlow improves upon the original roo-code-memory-bank implementation through several optimizations:

    • Reduced Token Consumption: Optimized prompts and instructions minimize token usage.
    • Five Integrated Modes: Provides a cohesive suite of modes: Flow-Architect, Flow-Code, Flow-Debug, Flow-Ask, and Flow-Orchestrator.
    • Simplified Setup: Easier installation and configuration processes.
    • Streamlined Real-time Updates: More efficient and targeted updates to the Memory Bank.
    • Clearer Instructions: Uses YAML-based rule files for better readability and maintainability.
  2. What is RooFlow and how does it work with Roo Code?

    main

    RooFlow is an experimental alternative to the standard system prompts used in the Roo Code VS Code extension. Instead of using Markdown, RooFlow utilizes YAML-based system prompts to define specialized "Flow" modes. This approach aims to improve efficiency and reduce token consumption.

    Core Concepts

    • Flow Modes: Specialized modes defined by YAML instructions located in .roo/system-prompt-[mode].
    • Memory Bank: A persistent storage system for project knowledge that is automatically managed to ensure the AI maintains context across sessions.
    • Mode Delegation: The Flow-Orchestrator mode can delegate tasks to specific execution modes.

    Flow Modes and Memory Bank Access

    ModePurposeMemory Bank Access
    Flow-OrchestratorManages complex tasks by delegating to execution modesN/A
    Flow-ArchitectHigh-level design and architectureRead/Write (<-->)
    Flow-CodeImplementation and coding tasksRead/Write (<-->)
    Flow-DebugTroubleshooting and debuggingRead/Write (<-->)
    Flow-AskAnswering questions and retrieving informationRead-Only (-->)
  3. Understand the Memory Bank structure

    main

    The Memory Bank is a memory-bank/ directory in your project root used by RooFlow to maintain project knowledge. It consists of the following Markdown files:

    FilePurpose
    activeContext.mdTracks the current session's context: recent changes, current goals, and open questions/issues.
    decisionLog.mdRecords architectural and implementation decisions (context, decision, rationale, implementation).
    productContext.mdHigh-level overview of project goals, features, and overall architecture.
    progress.mdTracks project progress using a task list format (completed work, current tasks, next steps).
    systemPatterns.md(Optional) Documents recurring coding, architectural, or testing patterns and standards.

    RooFlow manages these files automatically; manual editing is generally not required but can be used for review.

  4. Understand RooFlow modes and collaboration

    main

    RooFlow utilizes five specialized modes designed to work together by sharing information through the Memory Bank:

    • Flow-Architect: For high-level design and planning.
    • Flow-Code: For implementation and coding tasks.
    • Flow-Debug: For troubleshooting and fixing issues.
    • Flow-Ask: For querying information and general assistance.
    • Flow-Orchestrator: The central mode that can delegate tasks to the other four modes and manage transitions between them.
  5. Use RooFlow Modes

    main

    Once installed, you can select specialized Flow modes in the Roo Code interface to assist with specific tasks:

    • 🌊Flow Code💻: For writing, modifying, and documenting code.
    • 🌊Flow Architect🏗️: For system design, project structure, and Memory Bank initialization.
    • 🌊Flow Ask❓: For questions, code analysis, and explanations.
    • 🌊Flow Debug🪲: For troubleshooting errors and debugging code.
    • 🌊Flow Orchestrator🪃: For complex tasks requiring breakdown and delegation to other modes.

    Key Commands and Workflows

    • Memory Bank Initialization: If your project lacks a memory-bank/ directory, Roo will suggest switching to Flow-Architect mode to initialize it.
    • Update Memory Bank: Type Update Memory Bank or UMB in the chat to force synchronization of the current session's information into the Memory Bank files.
  6. Install RooFlow

    main

    RooFlow adds specialized Flow-* modes to the Roo Code extension. Installation requires the Roo Code extension, git, python3 (or python on Windows), and the pyyaml Python library.

    Prerequisites

    • Roo Code Extension: Installed in VS Code.
    • Git: Accessible in your system's PATH.
    • Python 3: Accessible as python3 (Linux/macOS) or python (Windows).
    • PyYAML: Install via pip:
      pip install pyyaml
      # or potentially pip3 install pyyaml

    Installation Steps

    1. Navigate to your project's root directory in a terminal.
    2. Download and execute the appropriate script for your OS and usage type:

    Windows (Command Prompt or PowerShell)

    For File Based Memory Bank:

    curl -O https://raw.githubusercontent.com/GreatScottyMac/RooFlow/main/config/install_rooflow.cmd
    ./install_rooflow.cmd

    For Context Portal MCP:

    curl -O https://raw.githubusercontent.com/GreatScottyMac/RooFlow/main/config/install_rooflow_conport.cmd
    ./install_rooflow_conport.cmd

    Linux / macOS (bash/zsh)

    For File Based Memory Bank:

    curl -O https://raw.githubusercontent.com/GreatScottyMac/RooFlow/main/config/install_rooflow.sh
    chmod +x install_rooflow.sh
    ./install_rooflow.sh

    For Context Portal MCP:

    curl -O https://raw.githubusercontent.com/GreatScottyMac/RooFlow/main/config/install_rooflow_conport.sh
    chmod +x install_rooflow_conport.sh
    ./install_rooflow_conport.sh

    Verification

    After running, verify that a .roo/ directory and a .roomodes file exist in your project root. You can also inspect .roo/system-prompt-* files to ensure WORKSPACE_PLACEHOLDER has been replaced with your actual system paths.

    pip install pyyaml
  7. Update the Memory Bank using the UMB command

    main

    You can manually trigger an update of the Memory Bank at any time during a session to ensure it captures information from the current chat. Use either the full command or the shorthand alias.

    Commands:

    • Update Memory Bank
    • UMB
  8. Import Connected MCP Server Tools into RooFlow

    main

    If you use MCP (Model Context Protocol) servers, RooFlow can inject their tool and resource details into the Flow mode prompts. This ensures the Flow modes are aware of the same tools as standard Roo Code modes.

    Initial Installation with MCP

    1. Get Full System Prompt: In Roo Code, go to Extensions -> Roo Code -> Prompts. Select a standard mode (e.g., "Architect") and click "Copy system prompt to clipboard". This prompt contains the dynamically discovered MCP server info.
    2. Save to File: Create a file named system_prompt.md in your project's root directory and paste the copied text.
    3. Run Installer: Run the RooFlow installer script (install_rooflow.sh or install_rooflow.cmd). The installer will detect system_prompt.md, parse the MCP details via generate_mcp_yaml.py, and inject them into the .roo/system-prompt-flow-* files.

    Updating MCP Information

    If you modify your MCP server configurations:

    1. Copy the latest full system prompt from a standard Roo Code mode.
    2. Overwrite the existing system_prompt.md in your project root with this new text.
    3. Re-run the installer script.

    ⚠️ Warning: Re-running the installer overwrites the .roo/ directory and the .roomodes file. Any manual customizations made directly to the .roo/system-prompt-flow-* files will be lost.

  9. Update RooFlow

    main

    To update RooFlow, simply run the installation script again. This will overwrite your existing .roo/ directory and .roomodes file with the latest versions.

    Preserving Custom Modes: If you have added your own custom modes to .roomodes, follow these steps to avoid losing them:

    1. Rename your existing .roomodes file (e.g., mv .roomodes .roomodes.bak).
    2. Run the RooFlow installer.
    3. Replace the contents of the newly installed .roomodes file with the contents from your backup.