Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 20, 2025

This PR implements the feature requested in #5972 to add a global/local scope option to the Mode Writer mode.

Changes Made

  1. Updated Mode Writer permissions: Modified the fileRegex in .roomodes from (\.roomodes$|\.roo/.*\.xml$|\.yaml$) to (\.roomodes$|.*\.xml$|.*\.yaml$) to allow the Mode Writer to access global YAML files outside the project directory.

  2. Added scope selection step: Modified the Mode Writer workflow to ask users upfront whether they want to create a global mode (available in all projects) or a local mode (project-specific).

  3. Updated workflow with scope-aware paths:

    • Global modes: Write to the system's custom_modes.yaml file
    • Local modes: Write to the project's .roomodes file
    • Rules directories follow the same pattern
  4. Created comprehensive path guidance: Added a new instruction file (7_global_mode_paths.xml) that provides detailed guidance on constructing the correct paths for global mode creation across different operating systems.

Testing

  • ✅ All existing CustomModesManager tests pass
  • ✅ All linting checks pass
  • ✅ All type checks pass

Acceptance Criteria Met

✅ When creating a global mode, the configuration is written to the global custom_modes.yaml file
✅ When creating a local mode, the configuration is written to the project's .roomodes file
✅ The Mode Writer prompts for scope selection before proceeding
✅ File paths are correctly handled based on the selected scope

Fixes #5972


Important

Adds global/local scope option to Mode Writer mode, updating permissions, workflow, and path handling for mode configurations.

  • Behavior:
    • Adds global/local scope option to Mode Writer mode, prompting users to choose scope before mode creation.
    • Global modes are written to custom_modes.yaml in the system's global settings directory.
    • Local modes are written to the project's .roomodes file.
  • Permissions:
    • Updates fileRegex in .roomodes to allow Mode Writer to access global YAML files.
  • Workflow:
    • Updates 1_mode_creation_workflow.xml to include scope selection and path handling based on scope.
    • Adds 7_global_mode_paths.xml for guidance on global mode path construction across OS.
  • Testing:
    • Confirms all existing tests, linting, and type checks pass.

This description was created by Ellipsis for 4ecb332. You can customize this summary. It will automatically update as commits are pushed.

- Updated mode-writer fileRegex to allow writing to any XML/YAML files
- Added scope selection as first step in mode creation workflow
- Updated workflow to handle different file paths for global vs local modes
- Created new instruction file for global mode path guidance
- Fixes #5972
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 20, 2025 03:46
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jul 20, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 20, 2025
@daniel-lxs
Copy link
Member

Closing, see #5973 (comment)

@daniel-lxs daniel-lxs closed this Jul 22, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 22, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Feature: Add Global/Local Scope option to "Mode Writer" mode

4 participants