claude-coordination-system
v2.1.22
Published
π€ Multi-Claude Parallel Processing Coordination System - Organize multiple Claude AI instances to work together seamlessly on complex development tasks
Downloads
39
Maintainers
Readme
π€ Multi-Claude Coordinator
Project-Independent Parallel Development Coordination System
π Quick Start
Global Installation
npm install -g claude-coordination-systemInitialize Project
cd your-project
claude-coord initStart Coordination
# Terminal 1 - Coordinator
claude-coord start
# Terminal 2-N - Workers
claude-worker --id=claude_a --group=TYPESCRIPT
claude-worker --id=claude_b --group=ESLINTMonitor System
claude-monitor # Real-time dashboardπ― Features
β Project-Independent
- Universal Configuration: Works with any project structure
- Flexible Task Definitions: Customizable for different tech stacks
- Smart Detection: Auto-detects project type (React, Vue, Node, etc.)
β Intelligent Coordination
- File Locking: Prevents conflicts between workers
- Dependency Management: Smart task ordering
- Real-time Communication: Workers coordinate automatically
- Progress Tracking: Visual progress monitoring
β Professional Quality
- Zero Degradation: Never breaks existing functionality
- TypeScript Support: Full type safety
- ESLint Integration: Code quality enforcement
- Test Integration: Automatic testing validation
π Supported Project Types
| Type | Auto-Detection | Default Groups |
|------|----------------|----------------|
| Next.js | next.config.js | TypeScript, ESLint, Bundle |
| React | package.json React deps | Components, Build, Tests |
| Node.js | package.json Node deps | Server, Database, API |
| Vue | vue.config.js | Components, Router, Vuex |
| Custom | Manual config | User-defined |
βοΈ Configuration
Project Config: claude-coord.json
{
"project": {
"name": "my-project",
"type": "nextjs",
"root": "."
},
"workers": {
"max_workers": 6,
"coordination_mode": "file_based",
"heartbeat_interval": 15000
},
"groups": {
"TYPESCRIPT": {
"name": "TypeScript & Build",
"priority": 1,
"files": ["tsconfig.json", "src/**/*.ts"],
"dependencies": []
},
"ESLINT": {
"name": "ESLint & Quality",
"priority": 2,
"files": ["eslint.config.js", "src/**/*"],
"dependencies": ["TYPESCRIPT"]
}
}
}Global Config: ~/.claude-coord/config.json
{
"user": {
"machine_id": "auto-generated",
"preferred_terminal": "iterm2"
},
"defaults": {
"coordination_port": 7777,
"log_level": "info",
"auto_backup": true
},
"projects": [
{
"name": "agendaiq",
"path": "/Users/hs/Project/agendaiq",
"last_used": "2025-09-08T16:30:00Z"
}
]
}π οΈ Commands
Initialization
claude-coord init # Initialize project
claude-coord init --type=nextjs # Initialize with specific type
claude-coord init --interactive # Interactive setupCoordination
claude-coord start # Start coordinator
claude-coord start --port=8888 # Custom port
claude-coord status # System status
claude-coord stop # Stop all workersWorkers
claude-worker --id=claude_a --group=TYPESCRIPT
claude-worker --list-groups # Show available groups
claude-worker --validate # Validate worker setupMonitoring
claude-monitor # Full dashboard
claude-monitor --compact # Compact view
claude-monitor --export # Export metricsπ§ Dynamic Group Creation
Creating Custom Work Groups
# Interactive group creation
claude-coord create-groups --interactive
# Quick group from description
claude-coord create-task --description "Build user authentication system with JWT"
# Split large work into multiple groups
claude-coord split-work --tasks=3 --description="E-commerce platform with payments"Example: Custom Feature Development
User Request: "I want 3 Claude instances: one for authentication, one for payment integration, one for admin dashboard"
System Response:
β
Created 3 work groups:
πΉ AUTH_SYSTEM: Authentication & user management
πΉ PAYMENT_INTEGRATION: Stripe/payment processing
πΉ ADMIN_DASHBOARD: Admin panel & analytics
π Ready to coordinate - run these in separate terminals:
claude-worker --id=claude_auth --group=AUTH_SYSTEM
claude-worker --id=claude_payment --group=PAYMENT_INTEGRATION
claude-worker --id=claude_admin --group=ADMIN_DASHBOARDSmart File Pattern Detection
The system automatically infers file patterns for common features:
{
"AUTH_SYSTEM": {
"files": ["src/auth/**/*", "middleware.ts", "*/login/**/*", "*/register/**/*"]
},
"PAYMENT_INTEGRATION": {
"files": ["src/payment/**/*", "*/checkout/**/*", "*/stripe/**/*"],
"dependencies": ["AUTH_SYSTEM"] // Payments need auth first
}
}π₯ Integrating Active Claude Instances
If You Already Have Claude Running
Scenario: You're currently working with Claude and want to add parallel workers.
Step 1: Initialize coordination in your current project
# In your current terminal with Claude
cd your-project
claude-coord init --type=nextjs # Or your project typeStep 2: Start the coordinator
# New terminal - Terminal 1
claude-coord startStep 3: Convert your current Claude to a worker
# In THIS terminal (where Claude is active)
claude-worker --id=claude_main --group=TYPESCRIPT --verbose
# This Claude becomes the TYPESCRIPT group worker
# It will receive TypeScript-related tasks automaticallyStep 4: Add more Claude instances
# New terminal - Terminal 2
claude-worker --id=claude_eslint --group=ESLINT --verbose
# New terminal - Terminal 3
claude-worker --id=claude_ui --group=UI --verboseStep 5: Monitor all workers
# New terminal - Terminal 4
claude-monitorPractical Integration Example
Current situation: You have Claude Code open and working on a Next.js project.
Integration steps:
- Keep working - don't close your current Claude
- Run
claude-coord initin your project - Open 3 new terminals:
- Terminal 1:
claude-coord start(coordinator) - Terminal 2:
claude-worker --id=claude_b --group=ESLINT - Terminal 3:
claude-monitor(dashboard)
- Terminal 1:
- In your current Claude terminal:
claude-worker --id=claude_main --group=TYPESCRIPT - Now you have 2 Claude workers coordinating automatically!
System Architecture Visualization
βββββββββββββββββββββββ
β π COORDINATOR β β Only manages & organizes
β (Terminal 1) β
β - File locks β
β - Heartbeat β
β - Dependencies β
ββββββββββββ¬βββββββββββ
β
ββββββββ΄βββββββ
β β
βββββΌββββ βββββΌββββ βββββΌββββ
βWORKER β βWORKER β βWORKER β β Does actual work
βClaude β βClaude β βClaude β
β A β β B β β C β
βββββββββ βββββββββ βββββββββCoordinator Role: Manager π
- π§ Central brain - organizes entire system
- π Heartbeat monitoring (15s intervals)
- π File lock management
- π State management
- π Dependency chain control
- β οΈ Dead worker cleanup
Worker Role: Developer π©βπ»
- Executes actual coding tasks
- Follows coordinator instructions
- Reports progress via heartbeat
- Respects file locks and dependencies
Worker Assignment Strategies
Method 1: Direct Assignment
# Assign workers based on expertise
claude-worker --id=claude_backend --group=API # Backend specialist
claude-worker --id=claude_frontend --group=UI # Frontend specialist
claude-worker --id=claude_devops --group=DATABASE # DevOps specialistMethod 2: Standby Mode (Interactive Assignment) π
# Start worker in standby mode - no group assigned
claude-worker --id=claude_flex --standby
# Interactive session starts:
βΈοΈ Starting in STANDBY mode
Waiting for group assignment...
Available groups:
- TYPESCRIPT: TypeScript & Build System
- ESLINT: ESLint & Code Quality
- UI: UI Components & Pages
- API: API Routes & Backend
π Interactive Commands:
join <group> - Join a work group
list - List available groups
status - Show current status
quit - Exit worker
claude> join TYPESCRIPT
π Joining group: TYPESCRIPT
π Switching from STANDBY to TYPESCRIPT
π claude_flex completed all tasks for TYPESCRIPTStandby Mode Benefits
β
Dynamic Assignment: Assign workers to groups on-demand
β
Resource Flexibility: Keep workers ready without fixed roles
β
Interactive Control: Real-time group switching
β
Load Balancing: Move workers where they're needed most
Practical Standby Usage
# Terminal 1: Coordinator
claude-coord start
# Terminal 2-4: Flexible workers in standby
claude-worker --id=claude_a --standby
claude-worker --id=claude_b --standby
claude-worker --id=claude_c --standby
# Assign workers as needed:
# claude_a: join TYPESCRIPT
# claude_b: join ESLINT
# claude_c: join UIπ€ User Interaction & Coordination Awareness
Real-time Status Queries
When users ask about the coordination system, Claude instances can respond intelligently:
User: "What are you working on right now?" Claude Response:
π€ Current Status:
Worker ID: claude_main
Group: TYPESCRIPT
Task: Fixing interface definitions in src/components/
Memory: 145MB / 256MB (57%)
Progress: 3/8 TypeScript errors resolved
Locked Files: src/types/user.ts, src/interfaces/api.ts
π Coordination Status:
- claude_eslint (ESLINT): Waiting for TYPESCRIPT completion
- claude_ui (UI): Processing components (2 files locked)
System healthy β
User: "How many Claude instances are working on this project?" Claude Response:
π₯ Active Workers: 3/6
π§ claude_main (TYPESCRIPT): Working - Memory 57%
βΈοΈ claude_eslint (ESLINT): Waiting - Depends on TYPESCRIPT
π¨ claude_ui (UI): Working - Memory 71%
π System load: OptimalStatus Command Integration
Each Claude can report system status on demand:
# In any worker terminal, Claude can respond to:
# "Show me the coordination status"
# "What's the current system state?"
# "How are other Claude instances doing?"Automatic Coordination Awareness
β
Self-aware: Each Claude knows its role and current task
β
System-aware: Can report on other workers' status
β
Progress-aware: Tracks completion percentage
β
Resource-aware: Memory, locks, dependencies
π Monitoring Dashboard Examples
Terminal Monitor Output
claude-monitorReal-time Display:
π€ Multi-Claude Coordination Monitor
Project: agendaiq | 2025-09-08 16:45:23
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π System Overview:
Active Workers: 3
File Locks: 5
Tasks: 2/6 completed
Health: Healthy β
π₯ Active Workers:
π§ claude_main (TYPESCRIPT)
Status: Working
Memory: 145MB / 256MB (57%) β
Last seen: 3s ago
Task: Fixing interface definitions
β³ claude_eslint (ESLINT)
Status: Waiting
Memory: 89MB / 256MB (35%) β
Last seen: 5s ago
Task: Waiting for TYPESCRIPT completion
π¨ claude_ui (UI)
Status: Working
Memory: 182MB / 256MB (71%) β οΈ
Last seen: 2s ago
Task: Updating component interfaces
π File Locks:
π src/types/user.ts β claude_main
π src/interfaces/api.ts β claude_main
π src/components/Button.tsx β claude_ui
π src/components/Form.tsx β claude_ui
π src/hooks/useAuth.ts β claude_ui
π Task Progress:
β
BUNDLE: Bundle & Dependencies - Completed
π§ TYPESCRIPT: TypeScript & Build System - In Progress (claude_main)
β³ ESLINT: ESLint & Code Quality - Waiting (depends on TYPESCRIPT)
π§ UI: UI Components & Pages - In Progress (claude_ui)
βΈοΈ API: API Routes & Backend - Ready
βΈοΈ DATABASE: Database & Performance - Ready
π Recent Activity:
16:45:20 INFO claude_main started TypeScript fixes
16:45:18 INFO claude_ui locked src/components/Button.tsx
16:45:15 INFO System initialized with 3 workers
16:45:12 INFO Coordinator started on port 7777Compact Monitor Mode
claude-monitor --compactπ€ Multi-Claude Monitor | agendaiq | 16:45:23
Workers: 3/6 | Locks: 5 | Tasks: 2/6 | Health: β
claude_main(TS): Working 57% | claude_eslint(ES): Waiting 35% | claude_ui(UI): Working 71%Web Dashboard
claude-monitor --web --port=8888
# Opens: http://localhost:8888Web Interface Features:
- π Real-time charts and graphs
- π Auto-refresh every 2 seconds
- π± Mobile-responsive design
- π Memory usage trending
- π Detailed worker inspection
- πΎ Export system metrics
π§ Memory Management & Performance
Automatic Resource Management
The system includes comprehensive memory monitoring and cleanup to prevent resource exhaustion:
// Each worker automatically monitors:
{
"maxMemoryMB": 256, // 256MB default per worker
"checkInterval": 30000, // Check every 30 seconds
"warningThreshold": 0.8, // 80% warning threshold
"criticalThreshold": 0.9 // 90% critical threshold
}Built-in Protections
β Memory Leak Prevention
- Automatic cache size limits (100 items default)
- TTL-based cache expiration (5 min default)
- Periodic garbage collection triggers
β Resource Cleanup
- Old log file rotation (keep 10 files)
- State history cleanup (keep 50 snapshots)
- Temporary directory cleanup
- File lock auto-release on shutdown
β Critical State Handling
- Memory warnings at 80% usage
- Emergency cleanup at 90% usage
- Automatic worker restart recommendations
- Graceful degradation under load
Memory Monitoring in Action
# Real-time memory display in monitor
π€ claude_main (TYPESCRIPT)
Status: Working
Memory: 156MB / 256MB (61%) β
Last seen: 12s ago
Task: Fixing interface definitions
β οΈ claude_heavy (UI)
Status: Working
Memory: 220MB / 256MB (86%) β οΈ
Last seen: 5s ago
Task: Processing large componentsCustom Memory Limits
# Set custom memory limits per worker
claude-worker --id=claude_heavy --group=UI --memory=512 # 512MB limit
claude-worker --id=claude_light --group=TYPESCRIPT --memory=128 # 128MB limitPerformance Guarantees
| Resource | Limit | Auto-Action | |----------|--------|-------------| | Memory per worker | 256MB default | Warning β Cleanup β Restart suggestion | | Cache size | 100 items | LRU eviction + TTL cleanup | | Log files | 10 files | Auto-rotation | | State history | 50 snapshots | Auto-pruning | | Temp files | 1 hour TTL | Auto-cleanup |
Result: Your system stays stable even with 10+ parallel Claude workers! π
π§ Advanced Usage
Custom Task Definitions
Create claude-coord.tasks.js:
module.exports = {
TYPESCRIPT: [
{
name: 'Fix syntax errors in components',
files: ['src/components/**/*.tsx'],
action: 'typescript_fix',
validation: 'npx tsc --noEmit'
}
],
CUSTOM_GROUP: [
{
name: 'Custom processing',
files: ['custom/**/*'],
action: async (files, context) => {
// Custom implementation
}
}
]
};Integration with Existing Tools
# Package.json scripts
"scripts": {
"coord:start": "claude-coord start",
"coord:typescript": "claude-worker --group=TYPESCRIPT",
"coord:monitor": "claude-monitor --compact"
}π Success Metrics
| Metric | Target | Description |
|--------|--------|-------------|
| Coordination Overhead | <5% | Time spent on coordination vs work |
| File Conflicts | <2/hour | Lock conflicts between workers |
| Worker Utilization | >90% | Active work time percentage |
| Task Success Rate | >95% | Successfully completed tasks |
π Installation Guide
Method 1: NPM Global Install
npm install -g claude-coordination-systemMethod 2: Local Project Install
npm install --save-dev claude-coordination-system
npx claude-coord initMethod 3: Direct Clone
git clone https://github.com/hsandir/claude-coordination-system.git
cd claude-coordination-system
npm install
npm link # Global accessBu sistem tΓΌm projelerinizde kullanΔ±labilir ve proje tΓΌrΓΌnΓΌ otomatik algΔ±layarak uygun koordinasyon stratejisi uygular!
