For those who wish to create other modes, I've added a modules directory, containing the components of the RooFlow system prompts. Basically you would need to modify modes.yml so that your new mode will interact correctly with the other modes. Then replace that section of rooflow_core_prompt.yaml and add the memory_bank_strategy.yml to the end of your system-prompt-[mode]
file. You'll also need to add an entry to the .roomodes file.
Now with install scripts for Windows and Linux/macOS!
Default Mode and Boomerang Mode are available for manual installation.
NeuroCogniFlow is a cognitive-inspired framework for AI-assisted development that implements a multi-layered memory architecture modeled after human memory systems. It provides specialized modes with their own memory spaces, cross-domain knowledge sharing, and self-improvement capabilities, resulting in more contextually aware AI assistance across different projects and domains.
- Brain-Inspired Memory Architecture: Implements short-term, working, and long-term memory systems with domain-specific and project-specific knowledge stores.
- Mode-Specific Cognition: Each specialized mode has its own memory space and perspective, enabling deeper domain expertise.
- Adaptive Self-Improvement: The system can modify its own rules, improve processes, and create new specialized modes as needed.
- Multi-Project Context Management: Maintains separate yet connected memory spaces for different projects, enabling cross-project learning.
- Reduced Token Consumption: Through targeted memory retrieval and context prioritization.
- Seamless Knowledge Transfer: Facilitates effective knowledge sharing between modes and across projects.
flowchart TB
subgraph "NeuroCogniFlow"
subgraph "Meta-Cognitive System"
MetaO["Orchestrator"] --> MetaR["Rule Management"]
MetaO --> ModeC["Mode Creation"]
MetaO --> SelfI["Self-Improvement"]
end
subgraph "Memory Architecture"
STM["Short-Term Memory<br>(Session Context)"] --> WM["Working Memory<br>(Active Context)"]
WM --> LTM["Long-Term Memory<br>(Persistent Storage)"]
subgraph "Long-Term Memory Components"
PM["Procedural Memory<br>(Patterns & Methods)"]
DM["Declarative Memory<br>(Facts & Knowledge)"]
EM["Episodic Memory<br>(Decision History)"]
end
LTM --> PM & DM & EM
end
subgraph "Knowledge Domains"
DOM1["Domain Knowledge<br>(Language/Framework Specific)"]
DOM2["Project Knowledge<br>(Project-Specific Context)"]
DOM3["Mode Knowledge<br>(Mode-Specific Expertise)"]
end
subgraph "Specialized Modes"
M1["Architect"]
M2["Code"]
M3["Test"]
M4["Debug"]
M5["Ask"]
M6["Custom Modes..."]
end
DOM3 --> M1 & M2 & M3 & M4 & M5 & M6
end
NeuroCogniFlow implements a cognitive-inspired memory system with multiple layers:
- Purpose: Holds immediate session context
- Characteristics: Volatile, limited capacity, recent interactions
- Implementation: Current chat session state
- Files: None (in-session only)
- Purpose: Active manipulation of current context
- Characteristics: Limited capacity, actively processed information
- Implementation:
active-memory/
directory - Files:
current-focus.md
: Current task and contextactive-context.md
: Active project elementssession-context.md
: Recent session historymode-specific/[mode]-context.md
: Mode-specific active context
-
Purpose: Persistent knowledge storage
-
Implementation:
memory-bank/
directory -
Components:
- Purpose: Facts, concepts, explicit knowledge
- Files:
project-context.md
: Project overview, requirements, goalsdomain-knowledge/[domain].md
: Language/framework specific knowledgeapi-references.md
: External API information
- Purpose: Patterns, methods, procedures
- Files:
system-patterns.md
: Recurring patterns in the codebaseworkflows.md
: Common processes and workflowsbest-practices.md
: Best practices for this project
- Purpose: History of events and decisions
- Files:
decision-log.md
: Important decisions and their contextprogress.md
: Project progress and milestonesproblem-solutions.md
: Problems encountered and their solutions
- Purpose: Specialized knowledge for each mode
- Implementation:
memory-bank/modes/[mode-name]/
- Files:
expertise.md
: Mode-specific expertise and knowledgepatterns.md
: Patterns relevant to this modehistory.md
: History of this mode's activities
- Purpose: Separate memory spaces for different projects
- Implementation: Project root directory contains its own memory architecture
- Cross-Project Learning: Knowledge can be abstracted and shared across projects in
global-memory/
NeuroCogniFlow can enhance its own capabilities through:
- Automatically updates its rule sets based on effectiveness
- Tracks rule performance and modifies underperforming rules
- Implements
rule-performance.md
to track rule effectiveness
- Can create new specialized modes as needed
- Analyzes patterns of work to identify needs for new specializations
- Implements
mode-creation.md
with templates and guidelines
- Analyzes memory usage patterns and optimizes storage structure
- Implements garbage collection for obsolete memory items
- Improves memory retrieval mechanisms over time
-
Install Roo Code Extension: Ensure you have the Roo Code extension installed in VS Code.
-
Prerequisite: Install Git: The installation script requires
git
to be installed and accessible in your system's PATH. Download Git from https://git-scm.com/downloads. -
Open your terminal and navigate (
cd
) to your project's root directory. -
Run the appropriate command for your operating system directly:
- Windows (Command Prompt or PowerShell):
- Download the script:
curl -L -o install_neurocogniflow.cmd https://raw.githubusercontent.com/GreatScottyMac/RooFlow/main/config/install_rooflow.cmd
- Execute the downloaded script:
.\install_neurocogniflow.cmd
- Download the script:
- Linux / macOS (bash/zsh):
- Download the script:
curl -L -o install_neurocogniflow.sh https://raw.githubusercontent.com/GreatScottyMac/RooFlow/main/config/install_rooflow.sh
- Make the script executable:
chmod +x install_neurocogniflow.sh
- Execute the downloaded script:
./install_neurocogniflow.sh
- Download the script:
- Windows (Command Prompt or PowerShell):
-
The command downloads and executes the script, which will create the cognitive memory architecture for your project.
- Start a Chat: Open a new Roo Code chat in your project.
- Select a Mode: Choose a specialized mode for your current task.
- Memory Initialization: If starting in a new project, the system will create a memory architecture.
- Memory Commands:
- "Update Memory" (UM): Updates the memory with current session information
- "Create Mode" (CM): Initiates the creation of a new specialized mode
- "Memory Status" (MS): Shows the current state of the memory system
- "Cross-Project Knowledge" (CPK): Access knowledge from other projects
The system maintains a global memory space that abstracts knowledge from specific projects into reusable patterns and concepts. To share knowledge between projects:
- Use the "Abstract Knowledge" (AK) command to extract project-agnostic concepts
- When starting work on a new project, relevant knowledge will automatically be suggested
NeuroCogniFlow can abstract specific knowledge into general principles and patterns, making them applicable across different projects. This is achieved through:
- Pattern Recognition: Identifying recurring patterns in code, architecture, and problem-solving approaches
- Domain Separation: Distinguishing between project-specific and domain-general knowledge
- Knowledge Generalization: Converting specific implementations into general principles
- Cross-Project Application: Suggesting relevant patterns from other projects when applicable
The system intelligently manages its memory to prioritize relevant information:
- Relevance Scoring: Content is scored based on relevance to current context
- Memory Compression: Less-used information is compressed to save token space
- Garbage Collection: Obsolete or redundant information is archived
- Retrieval Optimization: Memory retrieval is optimized based on usage patterns
Specialized modes work together through:
- Task Decomposition: Breaking complex tasks into mode-specific subtasks
- Knowledge Sharing: Passing relevant context between modes
- Progress Tracking: Maintaining a unified view of progress across mode switches
- Handoff Optimization: Ensuring smooth transitions between modes
Contributions to NeuroCogniFlow are welcome! Please see the CONTRIBUTING.md file for guidelines.