Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv266be231f5da
diff --git a/v3/@claude-flow/cli/src/init/executor.ts b/v3/@claude-flow/cli/src/init/executor.ts
index 9ec7e8cbb0..705efbea8f 100644
--- a/v3/@claude-flow/cli/src/init/executor.ts
+++ b/v3/@claude-flow/cli/src/init/executor.ts
@@ -654,8 +654,17 @@ function findSourceDir(type: 'skills' | 'commands' | 'agents', sourceBaseDir?: s
possiblePaths.push(path.join(sourceBaseDir, '.claude', type));
}
+ // IMPORTANT: Check the package's own .claude directory first
+ // This is the primary path when running as an npm package
+ // __dirname is typically /path/to/node_modules/@claude-flow/cli/dist/src/init
+ // We need to go up 4 levels to reach the package root
+ const packageRoot = path.resolve(__dirname, '..', '..', '..', '..');
+ const packageDotClaude = path.join(packageRoot, '.claude', type);
+ if (fs.existsSync(packageDotClaude)) {
+ possiblePaths.unshift(packageDotClaude); // Add to beginning (highest priority)
+ }
+
// From dist/src/init -> go up to project root
- // __dirname is typically /path/to/v3/@claude-flow/cli/dist/src/init
const distPath = __dirname;
// Try to find the project root by looking for .claude directory