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: Edit /workspaces/claude-code-flow/src/cli/simple-commands/init/templates/claude-md.js

rUv5ab36579c2b4
diff --git a/.claude/checkpoints/1754360016.json b/.claude/checkpoints/1754360016.json
new file mode 100644
index 0000000000..9e6f1f0a63
--- /dev/null
+++ b/.claude/checkpoints/1754360016.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250805-021336", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/init/templates/claude-md.js", "timestamp": "2025-08-05T02:13:36Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/.claude/checkpoints/1754360018.json b/.claude/checkpoints/1754360018.json
new file mode 100644
index 0000000000..6fd815c4fa
--- /dev/null
+++ b/.claude/checkpoints/1754360018.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250805-021338", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/init/templates/claude-md.js", "timestamp": "2025-08-05T02:13:38Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/task-metrics.json | 6 +++--- .claude/checkpoints/1754359979.json | 1 + .claude/checkpoints/1754359981.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/init/templates/claude-md.js | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) "}
diff --git a/.claude/checkpoints/1754360195.json b/.claude/checkpoints/1754360195.json
new file mode 100644
index 0000000000..b052305b6b
--- /dev/null
+++ b/.claude/checkpoints/1754360195.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250805-021635", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/init/templates/claude-md-optimized.js", "timestamp": "2025-08-05T02:16:35Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/src/cli/simple-commands/init/templates/claude-md.js b/src/cli/simple-commands/init/templates/claude-md.js
index 17c3012190..c47c7e3aec 100644
--- a/src/cli/simple-commands/init/templates/claude-md.js
+++ b/src/cli/simple-commands/init/templates/claude-md.js
@@ -469,10 +469,272 @@ For more information about SPARC methodology, see: https://github.com/ruvnet/cla
`;
}
-// Import optimized version
-import { createOptimizedSparcClaudeMd as optimizedTemplate } from './claude-md-optimized.js';
-
// Create optimized SPARC CLAUDE.md with batchtools integration
export function createOptimizedSparcClaudeMd() {
- return optimizedTemplate();
+ return `# Claude Code Configuration - SPARC Development Environment
+
+## 🚨 CRITICAL: CONCURRENT EXECUTION & FILE MANAGEMENT
+
+**ABSOLUTE RULES**:
+1. ALL operations MUST be concurrent/parallel in a single message
+2. **NEVER save working files, text/mds and tests to the root folder**
+3. ALWAYS organize files in appropriate subdirectories
+
+### ⚑ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
+
+**MANDATORY PATTERNS:**
+- **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
+- **Task tool**: ALWAYS spawn ALL agents in ONE message with full instructions
+- **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
+- **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
+- **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
+
+### πŸ“ File Organization Rules
+
+**NEVER save to root folder. Use these directories:**
+- \`/src\` - Source code files
+- \`/tests\` - Test files
+- \`/docs\` - Documentation and markdown files
+- \`/config\` - Configuration files
+- \`/scripts\` - Utility scripts
+- \`/examples\` - Example code
+
+## Project Overview
+
+This project uses SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology with Claude-Flow orchestration for systematic Test-Driven Development.
+
+## SPARC Commands
+
+### Core Commands
+- \`npx claude-flow sparc modes\` - List available modes
+- \`npx claude-flow sparc run <mode> "<task>"\` - Execute specific mode
+- \`npx claude-flow sparc tdd "<feature>"\` - Run complete TDD workflow
+- \`npx claude-flow sparc info <mode>\` - Get mode details
+
+### Batchtools Commands
+- \`npx claude-flow sparc batch <modes> "<task>"\` - Parallel execution
+- \`npx claude-flow sparc pipeline "<task>"\` - Full pipeline processing
+- \`npx claude-flow sparc concurrent <mode> "<tasks-file>"\` - Multi-task processing
+
+### Build Commands
+- \`npm run build\` - Build project
+- \`npm run test\` - Run tests
+- \`npm run lint\` - Linting
+- \`npm run typecheck\` - Type checking
+
+## SPARC Workflow Phases
+
+1. **Specification** - Requirements analysis (\`sparc run spec-pseudocode\`)
+2. **Pseudocode** - Algorithm design (\`sparc run spec-pseudocode\`)
+3. **Architecture** - System design (\`sparc run architect\`)
+4. **Refinement** - TDD implementation (\`sparc tdd\`)
+5. **Completion** - Integration (\`sparc run integration\`)
+
+## Code Style & Best Practices
+
+- **Modular Design**: Files under 500 lines
+- **Environment Safety**: Never hardcode secrets
+- **Test-First**: Write tests before implementation
+- **Clean Architecture**: Separate concerns
+- **Documentation**: Keep updated
+
+## πŸš€ Available Agents (54 Total)
+
+### Core Development
+\`coder\`, \`reviewer\`, \`tester\`, \`planner\`, \`researcher\`
+
+### Swarm Coordination
+\`hierarchical-coordinator\`, \`mesh-coordinator\`, \`adaptive-coordinator\`, \`collective-intelligence-coordinator\`, \`swarm-memory-manager\`
+
+### Consensus & Distributed
+\`byzantine-coordinator\`, \`raft-manager\`, \`gossip-coordinator\`, \`consensus-builder\`, \`crdt-synchronizer\`, \`quorum-manager\`, \`security-manager\`
+
+### Performance & Optimization
+\`perf-analyzer\`, \`performance-benchmarker\`, \`task-orchestrator\`, \`memory-coordinator\`, \`smart-agent\`
+
+### GitHub & Repository
+\`github-modes\`, \`pr-manager\`, \`code-review-swarm\`, \`issue-tracker\`, \`release-manager\`, \`workflow-automation\`, \`project-board-sync\`, \`repo-architect\`, \`multi-repo-swarm\`
+
+### SPARC Methodology
+\`sparc-coord\`, \`sparc-coder\`, \`specification\`, \`pseudocode\`, \`architecture\`, \`refinement\`
+
+### Specialized Development
+\`backend-dev\`, \`mobile-dev\`, \`ml-developer\`, \`cicd-engineer\`, \`api-docs\`, \`system-architect\`, \`code-analyzer\`, \`base-template-generator\`
+
+### Testing & Validation
+\`tdd-london-swarm\`, \`production-validator\`
+
+### Migration & Planning
+\`migration-planner\`, \`swarm-init\`
+
+## 🎯 Claude Code vs MCP Tools
+
+### Claude Code Handles ALL:
+- File operations (Read, Write, Edit, MultiEdit, Glob, Grep)
+- Code generation and programming
+- Bash commands and system operations
+- Implementation work
+- Project navigation and analysis
+- TodoWrite and task management
+- Git operations
+- Package management
+- Testing and debugging
+
+### MCP Tools ONLY:
+- Coordination and planning
+- Memory management
+- Neural features
+- Performance tracking
+- Swarm orchestration
+- GitHub integration
+
+**KEY**: MCP coordinates, Claude Code executes.
+
+## πŸš€ Quick Setup
+
+\`\`\`bash
+# Add Claude Flow MCP server
+claude mcp add claude-flow npx claude-flow@alpha mcp start
+\`\`\`
+
+## MCP Tool Categories
+
+### Coordination
+\`swarm_init\`, \`agent_spawn\`, \`task_orchestrate\`
+
+### Monitoring
+\`swarm_status\`, \`agent_list\`, \`agent_metrics\`, \`task_status\`, \`task_results\`
+
+### Memory & Neural
+\`memory_usage\`, \`neural_status\`, \`neural_train\`, \`neural_patterns\`
+
+### GitHub Integration
+\`github_swarm\`, \`repo_analyze\`, \`pr_enhance\`, \`issue_triage\`, \`code_review\`
+
+### System
+\`benchmark_run\`, \`features_detect\`, \`swarm_monitor\`
+
+## πŸ“‹ Agent Coordination Protocol
+
+### Every Agent MUST:
+
+**1️⃣ BEFORE Work:**
+\`\`\`bash
+npx claude-flow@alpha hooks pre-task --description "[task]"
+npx claude-flow@alpha hooks session-restore --session-id "swarm-[id]"
+\`\`\`
+
+**2️⃣ DURING Work:**
+\`\`\`bash
+npx claude-flow@alpha hooks post-edit --file "[file]" --memory-key "swarm/[agent]/[step]"
+npx claude-flow@alpha hooks notify --message "[what was done]"
+\`\`\`
+
+**3️⃣ AFTER Work:**
+\`\`\`bash
+npx claude-flow@alpha hooks post-task --task-id "[task]"
+npx claude-flow@alpha hooks session-end --export-metrics true
+\`\`\`
+
+## 🎯 Concurrent Execution Examples
+
+### βœ… CORRECT (Single Message):
+\`\`\`javascript
+[BatchTool]:
+ // Initialize swarm
+ mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 6 }
+ mcp__claude-flow__agent_spawn { type: "researcher" }
+ mcp__claude-flow__agent_spawn { type: "coder" }
+ mcp__claude-flow__agent_spawn { type: "tester" }
+
+ // Spawn agents with Task tool
+ Task("Research agent: Analyze requirements...")
+ Task("Coder agent: Implement features...")
+ Task("Tester agent: Create test suite...")
+
+ // Batch todos
+ TodoWrite { todos: [
+ {id: "1", content: "Research", status: "in_progress", priority: "high"},
+ {id: "2", content: "Design", status: "pending", priority: "high"},
+ {id: "3", content: "Implement", status: "pending", priority: "high"},
+ {id: "4", content: "Test", status: "pending", priority: "medium"},
+ {id: "5", content: "Document", status: "pending", priority: "low"}
+ ]}
+
+ // File operations
+ Bash "mkdir -p app/{src,tests,docs}"
+ Write "app/src/index.js"
+ Write "app/tests/index.test.js"
+ Write "app/docs/README.md"
+\`\`\`
+
+### ❌ WRONG (Multiple Messages):
+\`\`\`javascript
+Message 1: mcp__claude-flow__swarm_init
+Message 2: Task("agent 1")
+Message 3: TodoWrite { todos: [single todo] }
+Message 4: Write "file.js"
+// This breaks parallel coordination!
+\`\`\`
+
+## Performance Benefits
+
+- **84.8% SWE-Bench solve rate**
+- **32.3% token reduction**
+- **2.8-4.4x speed improvement**
+- **27+ neural models**
+
+## Hooks Integration
+
+### Pre-Operation
+- Auto-assign agents by file type
+- Validate commands for safety
+- Prepare resources automatically
+- Optimize topology by complexity
+- Cache searches
+
+### Post-Operation
+- Auto-format code
+- Train neural patterns
+- Update memory
+- Analyze performance
+- Track token usage
+
+### Session Management
+- Generate summaries
+- Persist state
+- Track metrics
+- Restore context
+- Export workflows
+
+## Advanced Features (v2.0.0)
+
+- πŸš€ Automatic Topology Selection
+- ⚑ Parallel Execution (2.8-4.4x speed)
+- 🧠 Neural Training
+- πŸ“Š Bottleneck Analysis
+- πŸ€– Smart Auto-Spawning
+- πŸ›‘οΈ Self-Healing Workflows
+- πŸ’Ύ Cross-Session Memory
+- πŸ”— GitHub Integration
+
+## Integration Tips
+
+1. Start with basic swarm init
+2. Scale agents gradually
+3. Use memory for context
+4. Monitor progress regularly
+5. Train patterns from success
+6. Enable hooks automation
+7. Use GitHub tools first
+
+## Support
+
+- Documentation: https://github.com/ruvnet/claude-flow
+- Issues: https://github.com/ruvnet/claude-flow/issues
+
+---
+
+Remember: **Claude Flow coordinates, Claude Code creates!**
+\`;
}