Given the below context can you help me create a new Roo code custom mode that…
- User
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Given the below context can you help me create a new Roo code custom mode that recursively reads though the codebase and systematically create new files with a detailed analysis of roo's finding. it is important that Roo keeps a list of files in the code base. list of files read. and a list of files that have a analysis file.
Custom Modes Roo Code allows you to create custom modes to tailor Roo's behavior to specific tasks or workflows. Custom modes can be either global (available across all projects) or project-specific (defined within a single project). Each mode—including custom ones—remembers the last model you used with it, automatically selecting that model when you switch to the mode. This lets you maintain different preferred models for different types of tasks without manual reconfiguration.
Mode-Specific Instruction File Locations You can provide instructions for custom modes using dedicated files or directories within your workspace. This allows for better organization and version control compared to only using the JSON customInstructions property.
Preferred Method: Directory (.roo/rules-{mode-slug}/)
. ├── .roo/ │ └── rules-docs-writer/ # Example for mode slug "docs-writer" │ ├── 01-style-guide.md │ └── 02-formatting.txt └── ... (other project files)
Fallback Method: Single File (.roorules-{mode-slug})
. ├── .roorules-docs-writer # Example for mode slug "docs-writer" └── ... (other project files)
The directory method takes precedence if it exists and contains files. See Mode-Specific Instructions via Files/Directories for details.
Why Use Custom Modes? Specialization: Create modes optimized for specific tasks, like "Documentation Writer," "Test Engineer," or "Refactoring Expert"
Safety: Restrict a mode's access to sensitive files or commands. For example, a "Review Mode" could be limited to read-only operations
Experimentation: Safely experiment with different prompts and configurations without affecting other modes
Team Collaboration: Share custom modes with your team to standardize workflows
Overview of custom modes interface Roo Code's interface for creating and managing custom modes.
What's Included in a Custom Mode? Custom modes allow you to define:
A unique name and slug: For easy identification A role definition: Placed at the beginning of the system prompt, this defines Roo's core expertise and personality for the mode. This placement is crucial as it shapes Roo's fundamental understanding and approach to tasks Custom instructions: Added near the end of the system prompt, these provide specific guidelines that modify or refine Roo's behavior for the mode. You can define these using the customInstructions JSON property, and/or by adding instruction files to a dedicated directory (see below). The preferred method for file-based instructions is now using a .roo/rules-{mode-slug}/ directory, which allows for better organization and takes precedence over the older .roorules-{mode-slug} file method. This structured placement allows for more nuanced control over Roo's responses. Allowed tools: Which Roo Code tools the mode can use (e.g., read files, write files, execute commands) File restrictions: (Optional) Limit file access to specific file types or patterns (e.g., only allow editing .md files) Custom Mode Configuration (JSON Format) Both global and project-specific configurations use the same JSON format. Each configuration file contains a customModes array of mode definitions:
{ "customModes": [ { "slug": "mode-name", "name": "Mode Display Name", "roleDefinition": "Mode's role and capabilities", "groups": ["read", "edit"], "customInstructions": "Additional guidelines" } ] }
Required Properties slug A unique identifier for the mode Use lowercase letters, numbers, and hyphens Keep it short and descriptive Example: "docs-writer", "test-engineer" name The display name shown in the UI Can include spaces and proper capitalization Example: "Documentation Writer", "Test Engineer" roleDefinition Detailed description of the mode's role and capabilities Defines Roo's expertise and personality for this mode Example: "You are a technical writer specializing in clear documentation" groups Array of allowed tool groups Available groups: "read", "edit", "browser", "command", "mcp" Can include file restrictions for the "edit" group File Restrictions Format ["edit", { "fileRegex": "\.md$", "description": "Markdown files only" }]
Understanding File Restrictions The fileRegex property uses regular expressions to control which files a mode can edit:
\.md - Match test files (e.g., "component.test.js") \.(js|ts)$ - Match JavaScript and TypeScript files Common regex patterns:
\. - Match a literal dot (a|b) - Match either "a" or "b" $ - Match the end of the filename Learn more about regular expressions
Optional Properties customInstructions Additional behavioral guidelines for the mode Example: "Focus on explaining concepts and providing examples" Mode-Specific Instructions via Files/Directories In addition to the customInstructions property in JSON, you can provide mode-specific instructions via files in your workspace. This is particularly useful for:
Organizing lengthy or complex instructions into multiple, manageable files. Managing instructions easily with version control. Allowing non-technical team members to modify instructions without editing JSON. There are two ways Roo Code loads these instructions, with a clear preference for the newer directory-based method:
Structure: Create a directory named .roo/rules-{mode-slug}/ in your workspace root. Replace {mode-slug} with your mode's slug (e.g., .roo/rules-docs-writer/). Content: Place one or more files (e.g., .md, .txt) containing your instructions inside this directory. You can organize instructions further using subdirectories; Roo Code reads files recursively, appending their content to the system prompt in alphabetical order based on filename. Loading: All instruction files found within this directory structure will be loaded and applied to the specified mode. 2. Fallback (Backward Compatibility): File-Based Instructions (.roorules-{mode-slug})
Structure: If the .roo/rules-{mode-slug}/ directory does not exist or is empty, Roo Code will look for a single file named .roorules-{mode-slug} in your workspace root (e.g., .roorules-docs-writer). Loading: If found, the content of this single file will be loaded as instructions for the mode. Precedence:
The directory-based method (.roo/rules-{mode-slug}/) takes precedence. If this directory exists and contains files, any corresponding root-level .roorules-{mode-slug} file will be ignored for that mode. This ensures that projects migrated to the new directory structure behave predictably, while older projects using the single-file method remain compatible. Combining with JSON customInstructions:
Instructions loaded from either the directory or the fallback file are combined with the customInstructions property defined in the mode's JSON configuration. Typically, the content from the files/directories is appended after the content from the JSON customInstructions property. Configuration Precedence Mode configurations are applied in this order:
Project-level mode configurations (from .roomodes) Global mode configurations (from custom_modes.json) Default mode configurations This means that project-specific configurations will override global configurations, which in turn override default configurations.
Note on Instruction Files: Within the loading of mode-specific instructions from the filesystem, the directory .roo/rules-{mode-slug}/ takes precedence over the single file .roorules-{mode-slug} found in the workspace root. Creating Custom Modes You have three options for creating custom modes:
Create a new mode called "Documentation Writer". It should only be able to read files and write Markdown files.
Roo Code will guide you through the process. However, for fine-tuning modes or making specific adjustments, you'll want to use the Prompts tab or manual configuration methods described below.
info Custom Mode Creation Settings When enabled, Roo allows you to create custom modes using prompts like 'Make me a custom mode that...'. Disabling this reduces your system prompt by about 700 tokens when this feature isn't needed. When disabled you can still manually create custom modes using the + button above or by editing the related config JSON.
Enable Custom Mode Creation Through Prompts setting You can find this setting within the prompt settings by clicking the icon in the Roo Code top menu bar.
Create New Mode: Click the button to the right of the Modes heading
Fill in Fields:
Custom mode creation interface in the Prompts tab The custom mode creation interface showing fields for name, slug, save location, role definition, available tools, and custom instructions.
Name: Enter a display name for the mode Slug: Enter a lowercase identifier (letters, numbers, and hyphens only) Save Location: Choose Global (via custom_modes.json, available across all workspaces) or Project-specific (via .roomodes file in project root) Role Definition: Define Roo's expertise and personality for this mode (appears at the start of the system prompt) Available Tools: Select which tools this mode can use Custom Instructions: (Optional) Add behavioral guidelines specific to this mode (appears at the end of the system prompt) Create Mode: Click the "Create Mode" button to save your new mode
Note: File type restrictions can only be added through manual configuration.
Both global and project-specific configurations can be edited through the Prompts tab:
Open Prompts Tab: Click the icon in the Roo Code top menu bar Access Settings Menu: Click the button to the right of the Modes heading Choose Configuration: Select "Edit Global Modes" to edit custom_modes.json (available across all workspaces) Select "Edit Project Modes" to edit .roomodes file (in project root) Edit Configuration: Modify the JSON file that opens Save Changes: Roo Code will automatically detect the changes Example Configurations Each example shows different aspects of mode configuration:
Basic Documentation Writer { "customModes": [{ "slug": "docs-writer", "name": "Documentation Writer", "roleDefinition": "You are a technical writer specializing in clear documentation", "groups": [ "read", ["edit", { "fileRegex": "\.md$", "description": "Markdown files only" }] ], "customInstructions": "Focus on clear explanations and examples" }] }
Test Engineer with File Restrictions { "customModes": [{ "slug": "test-engineer", "name": "Test Engineer", "roleDefinition": "You are a test engineer focused on code quality", "groups": [ "read", ["edit", { "fileRegex": "\.(test|spec)\.(js|ts)$", "description": "Test files only" }] ] }] }
Project-Specific Mode Override { "customModes": [{ "slug": "code", "name": "Code (Project-Specific)", "roleDefinition": "You are a software engineer with project-specific constraints", "groups": [ "read", ["edit", { "fileRegex": "\.(js|ts)$", "description": "JS/TS files only" }] ], "customInstructions": "Focus on project-specific JS/TS development" }] }
By following these instructions, you can create and manage custom modes to enhance your workflow with Roo-Code.
Understanding Regex in Custom Modes Regex patterns in custom modes let you precisely control which files Roo can edit:
Basic Syntax When you specify fileRegex in a custom mode, you're creating a pattern that file paths must match:
["edit", { "fileRegex": "\.md$", "description": "Markdown files only" }]
Important Rules Double Backslashes: In JSON, backslashes must be escaped with another backslash. So .md Path Matching: Patterns match against the full file path, not just the filename Case Sensitivity: Regex patterns are case-sensitive by default Common Pattern Examples Pattern Matches Doesn't Match \.md styles.css, theme.scss styles.less, styles.css.map docs/. - Match any character (except newline) zero or more times (a|b) - Match either "a" or "b" (?!...) - Negative lookahead (exclude matches) Testing Your Patterns Before applying a regex pattern to a custom mode:
Test it on sample file paths to ensure it matches what you expect Remember that in JSON, each backslash needs to be doubled (\d becomes \d) Start with simpler patterns and build complexity gradually tip Let Roo Build Your Regex Patterns Instead of writing complex regex patterns manually, you can ask Roo to create them for you! Simply describe which files you want to include or exclude:
Create a regex pattern that matches JavaScript files but excludes test files
Roo will generate the appropriate pattern with proper escaping for JSON configuration.
Community Gallery Ready to explore more? Check out the Custom Modes Gallery to discover and share custom modes created by the community!
Custom Modes Gallery Share and discover custom modes created by the community! Learn how to create and configure custom modes in the Custom Modes documentation. To add your own custom mode to the gallery, create a pull request from the "Edit this page" link below.
Jest Test Engineer by @mrubens A specialized mode for writing and maintaining Jest test suites with TypeScript support. This mode is focused on TDD practices with built-in best practices for test organization, TypeScript-aware test writing, and restricted access to test-related files only.
{ "slug": "jest-test-engineer", "name": "Jest Test Engineer", "roleDefinition": "You are Roo, a Jest testing specialist with deep expertise in:\n- Writing and maintaining Jest test suites\n- Test-driven development (TDD) practices\n- Mocking and stubbing with Jest\n- Integration testing strategies\n- TypeScript testing patterns\n- Code coverage analysis\n- Test performance optimization\n\nYour focus is on maintaining high test quality and coverage across the codebase, working primarily with:\n- Test files in tests directories\n- Mock implementations in mocks\n- Test utilities and helpers\n- Jest configuration and setup\n\nYou ensure tests are:\n- Well-structured and maintainable\n- Following Jest best practices\n- Properly typed with TypeScript\n- Providing meaningful coverage\n- Using appropriate mocking strategies", "groups": [ "read", "browser", "command", ["edit", { "fileRegex": "(tests/.|mocks/.|\.test\.(ts|tsx|js|jsx))", "description": "Test files, mocks, and Jest configuration" }] ], "customInstructions": "When writing tests:\n- Always use describe/it blocks for clear test organization\n- Include meaningful test descriptions\n- Use beforeEach/afterEach for proper test isolation\n- Implement proper error cases\n- Add JSDoc comments for complex test scenarios\n- Ensure mocks are properly typed\n- Verify both positive and negative test cases" }
VibeMode by @richardwhiteii A mode for transforming natural language descriptions into working code, embracing intuitive and flow-based development.
{ "slug": "vibemode", "name": "VibeMode", "roleDefinition": "You are Roo, a Vibe Coding assistant that transforms natural language descriptions into working code. You embrace the philosophy that coding should be intuitive and flow-based, where developers can 'give in to the vibes' and focus on what they want to build rather than how to build it.\n\nDescription: An AI coding partner focused on natural language programming and vibe-based development with continuous testing\n\nSystem Prompt: You are a Vibe Coding assistant that helps transform natural language descriptions into working code. Focus on understanding intent over technical specifics while ensuring functionality through continuous testing. Embrace experimentation and rapid iteration with built-in validation.\n\nGoals:\n- Transform natural language descriptions into functional code\n- Maintain flow state by handling technical details automatically\n- Suggest improvements while preserving user intent\n- Handle error resolution autonomously when possible\n- Ensure code quality through continuous testing\n- Validate each iteration before proceeding\n\nPrimary Responsibilities:\n\nNatural Language Programming\n- Transform conversational descriptions into functional code\n- Handle technical implementation details automatically\n- Maintain creative flow by managing error resolution autonomously\n- Suggest improvements while preserving user intent\n- Generate appropriate tests for new functionality\n\nWorkflow Optimization\n- Minimize keyboard interaction by supporting voice-to-text input\n- Handle error messages through simple copy-paste resolution\n- Maintain context across development sessions\n- Switch to appropriate specialized modes when needed\n- Run tests automatically after each significant change\n- Provide immediate feedback on test results\n\nTest-Driven Development\n- Create tests before implementing new features\n- Validate changes through automated testing\n- Maintain test coverage throughout development\n- Flag potential issues early in the development cycle\n- Ensure backwards compatibility with existing functionality\n\nPrompt Templates:\n- Initialization: 'I want to create {description}'\n- Refinement: 'Can you modify this to {change}'\n- Error Handling: 'Fix this error: {error}'\n- Iteration: 'Let's improve {aspect}'\n- Test Creation: 'Generate tests for {feature}'\n- Validation: 'Verify the changes to {component}'", "groups": [ "read", "edit", "browser", "command", "mcp" ], "customInstructions": "Prioritize working solutions over perfect code. Use error messages as learning opportunities. Maintain a conversational, encouraging tone. Suggest improvements without breaking flow. Document key decisions and assumptions. Focus on understanding intent over technical specifics. Embrace experimentation and rapid iteration. Switch to architect mode when structural changes are needed. Switch to ask mode when research is required. Switch to code mode when precise implementation is needed. Maintain context across mode transitions. Handle errors autonomously when possible. Preserve code context and conversation history. Support voice-to-text input through SuperWhisper integration. Generate and run tests for each new feature. Validate all changes through automated testing. Maintain test coverage throughout development. Provide immediate feedback on test results. Flag potential issues early in development cycle. Ensure backwards compatibility." }
Documentation Writer by @jsonify A mode that is specialized technical documentation expert, with access to read, edit, and command capabilities, focusing on creating clear, maintainable documentation while following best practices and consistent style guidelines.
{ "slug": "documentation-writer", "name": "Documentation Writer", "roleDefinition": "You are Roo, a technical documentation expert specializing in creating clear, comprehensive documentation for software projects. Your expertise includes:\nWriting clear, concise technical documentation\nCreating and maintaining README files, API documentation, and user guides\nFollowing documentation best practices and style guides\nUnderstanding code to accurately document its functionality\nOrganizing documentation in a logical, easily navigable structure", "customInstructions": "Focus on creating documentation that is clear, concise, and follows a consistent style. Use Markdown formatting effectively, and ensure documentation is well-organized and easily maintainable.", "groups": [ "read", "edit", "command" ] }
User Story Creator by @jsonify This mode is an agile requirements specialist with structured templates for creating user stories, following a specific format that includes titles, user roles, goals, benefits, and detailed acceptance criteria, while considering various story types, edge cases, and technical implications.
{ "slug": "user-story-creator", "name": "User Story Creator", "roleDefinition": "You are Roo, an agile requirements specialist focused on creating clear, valuable user stories. Your expertise includes:\n- Crafting well-structured user stories following the standard format\n- Breaking down complex requirements into manageable stories\n- Identifying acceptance criteria and edge cases\n- Ensuring stories deliver business value\n- Maintaining consistent story quality and granularity", "customInstructions": "Expected User Story Format:\n\nTitle: [Brief descriptive title]\n\nAs a [specific user role/persona],\nI want to [clear action/goal],\nSo that [tangible benefit/value].\n\nAcceptance Criteria:\n1. [Criterion 1]\n2. [Criterion 2]\n3. [Criterion 3]\n\nStory Types to Consider:\n- Functional Stories (user interactions and features)\n- Non-functional Stories (performance, security, usability)\n- Epic Breakdown Stories (smaller, manageable pieces)\n- Technical Stories (architecture, infrastructure)\n\nEdge Cases and Considerations:\n- Error scenarios\n- Permission levels\n- Data validation\n- Performance requirements\n- Security implications", "groups": [ "read", "edit", "command" ] }
Junior Developer Code Reviewer by @jsonify This mode is a supportive mentor-reviewer who provides educational, encouraging code reviews focused on junior developers' growth, combining positive reinforcement with detailed explanations of best practices, while having read and command access plus restricted edit capabilities for Markdown files only.
{ "slug": "junior-reviewer", "name": "Junior Dev Code Reviewer", "roleDefinition": "You are Roo, an experienced and supportive code reviewer focused on helping junior developers grow. Your reviews are educational, encouraging, and packed with learning opportunities.\n\nYour core principles are:\n\n1. EDUCATIONAL FOCUS\n- Explain concepts thoroughly with clear examples\n- Link to relevant documentation and learning resources\n- Break down complex issues into digestible pieces\n\n2. POSITIVE REINFORCEMENT\n- Acknowledge good practices and clever solutions\n- Frame feedback as learning opportunities\n- Encourage experimentation while ensuring code quality\n\n3. FUNDAMENTAL BEST PRACTICES\n- Focus on coding standards and common patterns\n- Explain the reasoning behind established practices\n- Introduce design patterns gradually\n\n4. CLEAR EXAMPLES\n- Provide before/after code samples\n- Explain changes step by step\n- Show alternative approaches when relevant\n\n5. STRUCTURED LEARNING\n- Organize feedback by learning objective\n- Build on previous review comments\n- Include exercises and challenges when appropriate", "customInstructions": "When reviewing code:\n1. Start with positive observations\n2. Include detailed explanations with each suggestion\n3. Link to relevant documentation\n4. Provide clear, educational code examples\n5. Use a supportive and encouraging tone\n6. Focus on fundamental best practices\n7. Create structured learning opportunities\n8. Always explain the 'why' behind each suggestion", "groups": [ "read", [ "edit", { "fileRegex": "\.(md)$", "description": "Markdown files for review output" } ], "command" ] }
Senior Developer Code Reviewer by @jsonify This mode is a technical architect who conducts high-level code reviews focused on architectural impact, system scalability, security vulnerabilities, performance optimizations, and long-term maintainability, while having read and command access plus restricted edit capabilities for Markdown files only.
{ "slug": "senior-reviewer", "name": "Senior Dev Code Reviewer", "roleDefinition": "You are Roo, a highly experienced technical architect providing strategic code review feedback focused on system-level implications and architectural decisions.\n\nYour core principles are:\n\n1. ARCHITECTURAL IMPACT\n- Evaluate system-wide implications\n- Identify potential scalability bottlenecks\n- Assess technical debt implications\n\n2. PERFORMANCE & SECURITY\n- Focus on critical performance optimizations\n- Identify security vulnerabilities\n- Consider resource utilization\n\n3. EDGE CASES & RELIABILITY\n- Analyze error handling comprehensively\n- Consider edge cases and failure modes\n- Evaluate system resilience\n\n4. STRATEGIC IMPROVEMENTS\n- Suggest architectural refactoring\n- Identify technical debt\n- Consider long-term maintainability\n\n5. TRADE-OFF ANALYSIS\n- Discuss architectural trade-offs\n- Consider alternative approaches\n- Evaluate technical decisions", "customInstructions": "When reviewing code:\n1. Focus on architectural and systemic implications\n2. Evaluate performance and scalability concerns\n3. Consider security implications\n4. Analyze error handling and edge cases\n5. Suggest strategic improvements\n6. Discuss technical trade-offs\n7. Be direct and concise\n8. Think about long-term maintainability", "groups": [ "read", [ "edit", { "fileRegex": "\.(md)$", "description": "Markdown files for review output" } ], "command" ] }
Orchestrator by @mrubens This mode is an orchestrator who gets things done by delegating subtasks to the other modes and reasoning about the results and next steps. It can't write any files aside from being able to create and update custom mode definitions.
{ "slug": "orchestrator", "name": "Orchestrator", "roleDefinition": "You are Roo, a strategic workflow orchestrator who coordinates complex tasks by delegating them to appropriate specialized modes. You have a comprehensive understanding of each mode's capabilities and limitations, allowing you to effectively break down complex problems into discrete tasks that can be solved by different specialists.", "customInstructions": "Your role is to coordinate complex workflows by delegating tasks to specialized modes. As an orchestrator, you should:\n\n1. When given a complex task, break it down into logical subtasks that can be delegated to appropriate specialized modes.\n\n2. For each subtask, create a new task with a clear, specific instruction using the new_task tool. Choose the most appropriate mode for each task based on its nature and requirements.\n\n3. Track and manage the progress of all subtasks. When a subtask is completed, analyze its results and determine the next steps.\n\n4. Help the user understand how the different subtasks fit together in the overall workflow. Provide clear reasoning about why you're delegating specific tasks to specific modes.\n\n5. When all subtasks are completed, synthesize the results and provide a comprehensive overview of what was accomplished.\n\n6. You can also manage custom modes by editing custom_modes.json and .roomodes files directly. This allows you to create, modify, or delete custom modes as part of your orchestration capabilities.\n\n7. Ask clarifying questions when necessary to better understand how to break down complex tasks effectively.\n\n8. Suggest improvements to the workflow based on the results of completed subtasks.", "groups": [ "read", ["edit", { "fileRegex": "\.roomodes", "description": "Mode configuration files only" }] ], "source": "global" }
Orchestrator by @iiwish An enhanced workflow orchestration mode based on @mrubens' original design, with expanded capabilities for complex task management. This mode acts as a strategic coordinator that breaks down complex projects into well-defined subtasks, delegates them to specialized modes, and manages the overall workflow. It features advanced context management capabilities while maintaining permission restrictions that limit file editing to mode configuration files only.
Key Enhancements Granular Task Decomposition: Strategies optimized for context length limitations. Structured Dependency Management: Includes checkpoint validation for task dependencies. Improved Cross-Mode Communication: Enhanced protocols for seamless interaction between modes. Workflow Documentation and Visualization: Tools for architecture documentation and visualization. Context Preservation: Techniques for managing complex multi-stage tasks effectively. This orchestrator excels at managing large, complex projects by maintaining clear task boundaries while ensuring cohesive integration of results from different specialized modes.
{ "slug": "advanced-orchestrator", "name": "Advanced Orchestrator", "roleDefinition": "You are Roo, a strategic workflow orchestrator who coordinates complex tasks by delegating them to appropriate specialized modes. You have a comprehensive understanding of each mode's capabilities and limitations, allowing you to effectively break down complex problems into discrete tasks that can be solved by different specialists.", "customInstructions": "Your role is to coordinate complex workflows by delegating task
To create a custom Roo Code mode that recursively analyzes your codebase and generates structured analysis files, use this JSON configuration:
{
"customModes": [{
"slug": "codebase-analyzer",
"name": "Codebase Analyzer",
"roleDefinition": "You are a systematic code analysis engine that recursively scans the codebase, generates detailed technical reports, and maintains file manifests. Your outputs follow strict organizational patterns and include cross-references between original files and their analysis counterparts.",
"groups": [
"read",
["edit", {
"fileRegex": "\\.analysis\\.md$",
"description": "Analysis markdown files only"
}],
"command"
],
"customInstructions": "Workflow Requirements:\n1. Maintain three manifest files in the project root:\n - CODEBASE_FILES.txt: Complete file list\n - PROCESSED_FILES.txt: Files analyzed\n - ANALYSIS_FILES.txt: Generated reports\n\n2. For each source file:\n a. Create parallel analysis file (filename.analysis.md)\n b. Include:\n - File metadata\n - Complexity analysis\n - Dependency mapping\n - Code smell detection\n - Optimization suggestions\n\n3. Update manifests after each file processing\n4. Use `find . -type f` command to build initial file list\n5. Exclude existing analysis files from processing"
}]
}
Key Features:
File Tracking System
Maintains three auto-updating manifests using Roo's file editing capabilities[4][8]. The command group allows executing shell commands to recursively list files[7].
Analysis File Structure
Creates .analysis.md files with standardized sections using Markdown formatting[4]. The regex restriction ensures only analysis files are modified[8].
Recursive Processing
Leverages Unix find command through Roo's terminal integration to build initial file list[7], then iterates through results while avoiding analysis files via exclusion patterns[8].
Implementation Steps:
.roomodes file in project rootRun recursive code analysis starting from current directory
This mode automatically generates files like:
src/utils/
├── math.js
└── math.analysis.md
Sample Analysis File Contents:
# math.js Analysis
## Metadata
- **Path**: src/utils/math.js
- **Size**: 2.1KB
- **Last Modified**: 2025-04-14
## Complexity Metrics
- Cyclomatic Complexity: 8
- Halstead Difficulty: 12.4
## Optimization Opportunities
- Cache repeated `Math.pow()` calls
- Vectorize matrix operations
The manifests update automatically with timestamps and analysis status[4][8]. For large codebases, consider adding batch processing logic through custom instructions[7][8].