fix roo init (add modes)
This commit is contained in:
@@ -545,18 +545,31 @@ function createProjectStructure(addAliases, dryRun) {
|
|||||||
path.join(targetDir, '.cursor', 'rules', 'self_improve.mdc')
|
path.join(targetDir, '.cursor', 'rules', 'self_improve.mdc')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const rooSourceDir = path.join(__dirname, '..', 'assets', 'roocode');
|
||||||
// Copy .roomodes for Roo Code integration
|
const rooModesDir = path.join(rooSourceDir, '.roo');
|
||||||
copyTemplateFile('.roomodes', path.join(targetDir, '.roomodes'));
|
|
||||||
|
|
||||||
// Copy Roo rule files for each mode
|
|
||||||
const rooModes = ['architect', 'ask', 'boomerang', 'code', 'debug', 'test'];
|
const rooModes = ['architect', 'ask', 'boomerang', 'code', 'debug', 'test'];
|
||||||
for (const mode of rooModes) {
|
|
||||||
copyTemplateFile(
|
// Copy .roomodes to project root
|
||||||
`${mode}-rules`,
|
const roomodesSrc = path.join(rooSourceDir, '.roomodes');
|
||||||
path.join(targetDir, '.roo', `rules-${mode}`, `${mode}-rules`)
|
const roomodesDest = path.join(targetDir, '.roomodes');
|
||||||
);
|
if (fs.existsSync(roomodesSrc)) {
|
||||||
|
fs.copyFileSync(roomodesSrc, roomodesDest);
|
||||||
|
log('info', `Copied .roomodes to ${roomodesDest}`);
|
||||||
|
} else {
|
||||||
|
log('warn', `.roomodes not found at ${roomodesSrc}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy each <mode>-rules file into the corresponding .roo/rules-<mode>/ folder
|
||||||
|
for (const mode of rooModes) {
|
||||||
|
const src = path.join(rooModesDir, `rules-${mode}`, `${mode}-rules`);
|
||||||
|
const dest = path.join(targetDir, '.roo', `rules-${mode}`, `${mode}-rules`);
|
||||||
|
if (fs.existsSync(src)) {
|
||||||
|
fs.copyFileSync(src, dest);
|
||||||
|
log('info', `Copied ${src} to ${dest}`);
|
||||||
|
} else {
|
||||||
|
log('warn', `Roo rule file not found for mode '${mode}': ${src}`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Copy example_prd.txt
|
// Copy example_prd.txt
|
||||||
copyTemplateFile(
|
copyTemplateFile(
|
||||||
|
|||||||
Reference in New Issue
Block a user