You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mode-writer): Add global vs. local mode creation choice
This commit enhances the 'Mode Writer' mode by introducing a new workflow that allows users to choose between creating a global or a local mode.
- Updates `1_mode_creation_workflow.xml` to include a new initial step for selecting the mode's scope (global/local) and adjusts subsequent steps to handle file paths and directory creation accordingly.
- Modifies `.roomodes` to update the `whenToUse` description and broaden the `fileRegex` to allow editing of global configuration files.
Copy file name to clipboardExpand all lines: .roo/rules-mode-writer/1_mode_creation_workflow.xml
+45-5Lines changed: 45 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,25 @@
6
6
7
7
<detailed_steps>
8
8
<stepnumber="1">
9
+
<title>Choose Mode Scope</title>
10
+
<description>
11
+
Determine whether the mode should be available globally or only within the current project.
12
+
</description>
13
+
<actions>
14
+
<action>Ask the user to select the mode's scope.</action>
15
+
</actions>
16
+
<example>
17
+
<ask_followup_question>
18
+
<question>Should this be a global mode (available in all projects) or a local mode (only for this project)?</question>
19
+
<follow_up>
20
+
<suggest>Create a global mode</suggest>
21
+
<suggest>Create a local mode</suggest>
22
+
</follow_up>
23
+
</ask_followup_question>
24
+
</example>
25
+
</step>
26
+
27
+
<stepnumber="2">
9
28
<title>Gather Requirements</title>
10
29
<description>
11
30
Understand what the user wants the mode to accomplish
@@ -29,7 +48,28 @@
29
48
</example>
30
49
</step>
31
50
32
-
<stepnumber="2">
51
+
<stepnumber="3">
52
+
<title>Define Final File Paths and Create Directories</title>
53
+
<description>
54
+
Based on the selected scope, define the absolute paths for the mode's configuration and rule files, and create the necessary directories directly in the final location.
55
+
</description>
56
+
<actions>
57
+
<action>
58
+
If "global" is selected, construct the full path using the 'Home Directory' from the SYSTEM INFORMATION section. The base path is `[Home Directory]/AppData/Roaming/Code/User/globalStorage/rooveterinaryinc.roo-cline/`. The mode configuration file is `[base path]/settings/custom_modes.yaml` and the rules directory is `[base path]/.roo/rules-[mode-slug]/`.
59
+
</action>
60
+
<action>
61
+
If "local" is selected, the mode configuration file is `.roomodes` and the rules directory is `.roo/rules-[mode-slug]/` relative to the workspace root.
62
+
</action>
63
+
<action>
64
+
Create the `rules-[mode-slug]` directory directly in the final destination path (local or global).
65
+
</action>
66
+
</actions>
67
+
<important_note>
68
+
Always use the full, absolute path when creating directories and writing files for global modes.
69
+
</important_note>
70
+
</step>
71
+
72
+
<stepnumber="4">
33
73
<title>Design Mode Configuration</title>
34
74
<description>
35
75
Create the mode definition with all required fields
@@ -75,7 +115,7 @@
75
115
</important_note>
76
116
</step>
77
117
78
-
<stepnumber="3">
118
+
<stepnumber="5">
79
119
<title>Implement File Restrictions</title>
80
120
<description>
81
121
Configure appropriate file access permissions
@@ -98,10 +138,10 @@ groups:
98
138
</guidelines>
99
139
</step>
100
140
101
-
<stepnumber="4">
141
+
<stepnumber="6">
102
142
<title>Create XML Instruction Files</title>
103
143
<description>
104
-
Design structured instruction files in .roo/rules-[mode-slug]/
144
+
Design structured instruction files and write them directly to the full path determined in the previous step (e.g., `C:\Users\...\rules-[mode-slug]/` for global, or `./.roo/rules-[mode-slug]/` for local). Do not create files locally and move them.
105
145
</description>
106
146
<file_structure>
107
147
<filename="1_workflow.xml">Main workflow and step-by-step processes</file>
Copy file name to clipboardExpand all lines: .roomodes
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,12 +17,11 @@ customModes:
17
17
- Creating detailed XML instruction files in the .roo folder
18
18
- Ensuring instructions are well-organized with proper XML tags
19
19
- Following established patterns from existing modes
20
-
whenToUse: Use this mode when you need to create a new custom mode.
21
-
description: Create and implement custom modes.
20
+
whenToUse: Use this mode when you need to create a new custom mode. It will guide you through the process of creating a new mode, including choosing whether to create it globally (available in all projects) or locally (for the current project only).
22
21
groups:
23
22
- read
24
23
- - edit
25
-
- fileRegex: (\.roomodes$|\.roo/.*\.xml$|\.yaml$)
24
+
- fileRegex: (\.roomodes$|.*\.xml$|.*\.yaml$)
26
25
description: Mode configuration files and XML instructions
0 commit comments