Skip to content

[Enhancement idea] Set up custom modes in global JSON file instead of within each workspace #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sealad886 opened this issue Mar 9, 2025 · 2 comments

Comments

@sealad886
Copy link

sealad886 commented Mar 9, 2025

Here's my current custom set up with this tool:

export AC_ROO_MEM_PATH="/path/to/downloaded/roo-code-memory-bank"
roo () {
	emulate -L zsh
	setopt null_glob
	if [ -z "$AC_ROO_MEM_PATH" ]
	then
		echo "Error: AC_ROO_MEM_PATH is not set. Please set the AC_ROO_MEM_PATH environment variable."
		return 1
	fi
	local exists=false 
	if [ -d ".roo" ]
	then
		exists=true 
	fi
	if [ -f ".roomodes" ]
	then
		exists=true 
	fi
	local clinerules_files=(.clinerules*) 
	if [ ${#clinerules_files[@]} -gt 0 ]
	then
		exists=true 
	fi
	if [ "$exists" = true ]
	then
		read "answer?Reinitialize Roo-Memory from scratch? (y/n) "
		if [ "$answer" != "y" ]
		then
			echo "Aborting reinitialization."
			return 0
		fi
		rm -i -rf .roo .roomodes .clinerules*
	fi
	cp -i -r "${AC_ROO_MEM_PATH}/.roo" .
	cp -i "${AC_ROO_MEM_PATH}"/.clinerules* .
	cp -i "${AC_ROO_MEM_PATH}/.roomodes" .
	node "${AC_ROO_MEM_PATH}/scripts/populate-system-vars.js"
	echo "" >> .gitignore
	echo ".roo/" >> .gitignore
	echo '.clinerules*' >> .gitignore
	echo ".roomodes" >> .gitignore
	echo "memory-bank/" >> .gitignore
	return 0
}

And this is how I currently can initialize a new project with memory-bank.

However, I propose that instead of using the .clinerules-* files, would it not be a good alternative to just use the globals in (for MacOS) ~/Library/Application Support/Code/Users/globalStorage/rooveterinaryinc.roo-cline/settings/cline_custom_modes.json and set the same default prompts there?

This alleviates the requirement to copy these files to each new repository (yay, reduction in duplicate setup) and additionally easily allows updates to be applied (i.e. just update the global promps, and BOOM updates applied globally.

@GreatScottyMac
Copy link
Owner

Good point about using the global config! I need to think that through. I've been working on the other RooFlow system which uses custom system prompts. I'm integrating the .clinerules-[mode] content into system-prompt-[mode] files which should hopefully streamline everything.

@sealad886
Copy link
Author

The reason I suggest using the cline-custom-modes.json file is that the system prompt will be dynamically updated based on a TON of other configuration settings within the Roo-Code menu. The MCP server settings I had mentioned in #16 is just one example of that. Using the global overrides for custom prompts while still allowing Roo overall control of the system prompt gets the best of both worlds!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants