Deploy a hierarchical multi-agent AI development system with President/Boss/Worker coordination for parallel software development using tmux and git worktrees.
Deploy a hierarchical multi-agent AI development system with President/Boss/Worker coordination for parallel software development using tmux and git worktrees.
This skill sets up and manages a sophisticated multi-agent AI development system that implements a 3-layer hierarchical structure:
The system uses tmux for session management and git worktrees for isolated parallel development environments.
The system supports two distinct patterns:
1. **AI President-Led**: Provide high-level requirements to the AI President, which autonomously breaks down and delegates tasks
2. **Human President-Led**: Create detailed `planlist.md` and directly control task distribution as the Boss
1. **Clone the Multi-Agent System**
- If setting up for an existing project, navigate to the project root first
- Clone the repository as a subdirectory or separate tool directory:
```bash
# Option 1: As subdirectory
git clone https://github.com/reinhardhq/claude-multi-agent-system.git .claude-multi-agent
# Option 2: As separate tool
git clone https://github.com/reinhardhq/claude-multi-agent-system.git ~/tools/claude-multi-agent
export PATH=$PATH:~/tools/claude-multi-agent/scripts
```
2. **Setup Project Environment**
- Set the target project root (if working with existing project):
```bash
export TARGET_PROJECT_ROOT=$(pwd)
```
- Initialize git worktrees for parallel development:
```bash
./scripts/worktree-manager-improved.sh setup
```
3. **Verify Prerequisites**
- Ensure Claude CLI is installed and authenticated
- Verify tmux is available (`tmux -V`)
- Confirm git repository is initialized
1. **Create tmux Session Structure**
```bash
cd scripts/
./setup-multiagent.sh
```
This creates a tmux session named `multiagent` with:
- Window 0: PRESIDENT pane
- Window 1: Team window with 4 panes (BOSS + 3 WORKERS)
2. **Launch AI Agents**
```bash
./quick-start-multiagent.sh
```
This starts Claude AI agents in each pane with their respective role definitions.
3. **Navigate tmux Session**
- `Ctrl+B → 0`: Switch to PRESIDENT window
- `Ctrl+B → 1`: Switch to team window (4-pane view)
- `Ctrl+B → arrow keys`: Navigate between panes
- `Ctrl+B → d`: Detach from session (agents continue running)
- `tmux attach -t multiagent`: Reattach to session
#### Pattern A: AI President-Led Workflow
1. **Send High-Level Requirements to President**
```bash
./agent-send.sh president "Create a TODO application with React frontend and Express backend, supporting user authentication and task management"
```
2. **President Analyzes and Creates Vision**
- Performs 5-layer needs analysis
- Defines quality standards and success criteria
- Creates strategic roadmap
3. **President Instructs Boss**
- Sends decomposed strategy to Boss
- Boss receives instructions automatically
4. **Boss Decomposes and Distributes Tasks**
```bash
./boss-commander.sh analyze # Boss analyzes president's instructions
./boss-commander.sh assign # Distribute tasks to workers
```
5. **Workers Execute in Parallel**
- Each worker operates in their own git worktree
- Workers report progress every 10 minutes
- Independent implementation with shared coordination
#### Pattern B: Human President-Led Workflow
1. **Create Detailed Project Plan**
- Copy `planlist.md` template to your project
- Fill in project overview, goals, and deadline
- Define approaches with this structure:
```markdown
## Approach N: [Technology Stack Name]
### Basic Info (Required)
**Overview**: [One-line description]
**Tech Stack**: [Technologies]
**Assigned Worker**: worker1
**Priority**: High
**Estimated Hours**: 8
### Implementation Details
[Specific requirements, architecture, tasks]
```
2. **Distribute Tasks via Boss Commander**
```bash
./boss-commander.sh analyze # Boss analyzes your planlist
./boss-commander.sh assign # Distribute to workers
```
3. **Send Specific Instructions to Workers**
```bash
./agent-send.sh worker1 "Implement React component structure following the design in planlist.md Approach 1"
./agent-send.sh worker2 "Setup Express API with authentication endpoints as specified in Approach 2"
./agent-send.sh worker3 "Configure database schema and migrations per Approach 3"
```
4. **Monitor and Provide Feedback**
```bash
./boss-commander.sh check # Check all worker progress
./boss-commander.sh review worker1 # Review specific worker
./progress-tracker.sh request all standard
./progress-tracker.sh monitor
```
1. **Send Messages to Agents**
```bash
# Individual agents
./agent-send.sh president "Message"
./agent-send.sh boss "Message"
./agent-send.sh worker1 "Message"
# Groups
./agent-send.sh team "Message to boss and all workers"
./agent-send.sh all "Message to everyone including president"
```
2. **Check Worktree Status**
```bash
./worktree-manager-improved.sh info # Show project info
./worktree-manager-improved.sh status # Check all worker worktrees
```
3. **Monitor Progress**
```bash
# Request progress reports
./progress-tracker.sh request all standard
./progress-tracker.sh request worker1 detailed
# Monitor continuously
./progress-tracker.sh monitor
```
1. **Review Worker Implementations**
```bash
./boss-commander.sh review worker1
./boss-commander.sh review worker2
./boss-commander.sh review worker3
```
2. **Merge Parallel Developments**
```bash
./parallel-dev-manager.sh merge-all
```
- Handles conflicts with worker collaboration
- Creates integration branches
- Validates merged result
3. **Final Quality Check**
- Boss compiles final report
- President reviews against original vision
- Validate all requirements met
Each worker operates in an isolated git worktree:
Environment variables:
```bash
cd ~/my-project
git clone https://github.com/reinhardhq/claude-multi-agent-system.git .claude-multi-agent
export TARGET_PROJECT_ROOT=$(pwd)
cd .claude-multi-agent/scripts
./worktree-manager-improved.sh setup
./setup-multiagent.sh
./quick-start-multiagent.sh
./agent-send.sh president "Build a REST API for user management with CRUD operations"
./progress-tracker.sh monitor
./parallel-dev-manager.sh merge-all
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/claude-multi-agent-system/raw