claude-flow-novice
Version:
Claude Flow Novice - Advanced orchestration platform for multi-agent AI workflows with CFN Loop architecture Includes CodeSearch (hybrid SQLite + pgvector), mem0/memgraph specialists, and all CFN skills.
68 lines (56 loc) • 1.85 kB
Markdown
# Node Modules Centralization Plan
## Problem
- Duplicate node_modules directories across 88 locations in .claude/
- Total size: 11GB+ in .claude/ + 720MB at root
- Prevents including .claude/ in npm package
## Root Cause Analysis
1. Individual skill directories have their own package.json files
2. Each runs `npm install` independently
3. No workspace/yarn.lock configuration to share dependencies
## Solution Steps
### 1. Cleanup Duplicate node_modules
```bash
# Remove all node_modules in .claude/ directory
find .claude -name "node_modules" -type d -exec rm -rf {} + 2>/dev/null
# Also remove package-lock.json files in .claude/
find .claude -name "package-lock.json" -delete 2>/dev/null
```
### 2. Implement Workspace Configuration
```json
// Add to root package.json
{
"workspaces": [
".claude/skills/*",
".claude/skills/*/lib/*"
]
}
```
### 3. Consolidate Dependencies
- Move common dependencies to root package.json
- Remove local package.json files from skill subdirectories
- Keep only essential skill-specific dependencies locally
### 4. Update Import Paths
- Adjust require/import statements to use root dependencies
- Update any relative paths that assume local node_modules
### 5. Update .npmignore
```
# Allow .claude/ but exclude build artifacts
!.claude/
!.claude/**
# Only exclude build artifacts and temp files
.claude/**/target/
.claude/**/dist/
.claude/**/.ruvector/
.claude/**/index.db
.claude/**/*.sqlite
.claude/**/*.sqlite3
```
## Expected Outcome
- Single node_modules at root (~1-2GB)
- .claude/ can be included in npm package
- Drastically reduced npm package size
- Proper dependency management
## Implementation Notes
- Test each skill after consolidation
- Maintain backward compatibility
- Update CI/CD pipelines if needed