@codemafia0000/d0
Version:
Claude Multi-Agent Automated Development AI - Revolutionary development environment where multiple AI agents collaborate to automate software development
547 lines (414 loc) β’ 14.6 kB
Markdown
# π€ d0 - Multi-Agent Automated Development AI
[](https://badge.fury.io/js/@codemafia0000/d0)
[](https://opensource.org/licenses/MIT)
[](https://nodejs.org/)
[]()
**d0** is a revolutionary development environment where multiple specialized AI agents collaborate to automate software development. Like a real company, each AI agent has distinct roles - President (Project Manager), Boss (Tech Lead), and Workers (Specialists) - working together through Node.js session management to deliver high-quality software projects.
## π What Makes This Special
**Traditional Development:**
```
Human β AI β Result
```
**d0 Multi-Agent System:**
```
Human β AI President β AI Tech Lead β Specialized AI Workers β Integration β Result
```
**Key Benefits:**
- **3x Faster Development** with parallel processing
- **Specialized Expertise** in each domain (Frontend, Backend, DevOps, QA, etc.)
- **Rich Collaboration** between AI agents
- **Higher Quality** output with built-in review processes
- **Scalable Team Size** (1-10 agents based on project needs)
## π Features
**Explained in 3 lines:**
1. Multiple AI agents (President, Manager, Workers) collaborate on development
2. Each operates in different terminal screens, exchanging messages
3. Role-based division of labor like human organizations for efficient development
**Real Results:**
- Survey system (EmotiFlow) completed in 3 hours
- Generated 12 innovative ideas
- Achieved 100% test coverage
## π₯οΈ System Requirements
### Supported Platforms
- **macOS** (Intel & Apple Silicon)
- **Linux** (Ubuntu, Debian, CentOS, etc.)
- **Windows** (Windows 10/11)
- **Architecture**: x64, ARM64
### Prerequisites
- **Node.js** v14.0.0 or higher
- **Claude CLI** (Anthropic's official CLI)
### Windows Notes
No additional dependencies required! The system uses Node.js with proper readline interface management for session handling instead of tmux, making it fully compatible with Windows out of the box. The latest version includes enhanced terminal compatibility and conflict resolution with Claude CLI.
### Supported Development Environments
- **Frontend**: React, Vue, Angular, Next.js, Svelte
- **Backend**: Node.js, Express, FastAPI, Django
- **Databases**: PostgreSQL, MongoDB, MySQL, Redis
- **Cloud**: AWS, GCP, Azure
- **DevOps**: Docker, Kubernetes, CI/CD
## π Installation
### Quick Start
```bash
# Install globally
npm install -g @codemafia0000/d0
# Verify installation
d0 --version
```
### Install Dependencies
```bash
# macOS (using Homebrew)
brew install node
# Ubuntu/Debian
sudo apt update
sudo apt install nodejs npm
# CentOS/RHEL
sudo yum install nodejs npm
# Windows (using Chocolatey)
choco install nodejs
# Windows (using Scoop)
scoop install nodejs
# Install Claude CLI (all platforms)
# Visit: https://docs.anthropic.com/en/docs/claude-code
```
### Verify Setup
```bash
# Check all prerequisites
d0 status
```
## π Usage
### 1. Project Setup
```bash
# Create project directory
mkdir my-ai-project && cd my-ai-project
# Basic setup (3 workers)
d0 init
# Custom team size (1-10 workers)
d0 init --workers 5
# Force overwrite existing setup
d0 init --force --workers 8
```
### 2. Start AI Agents Environment
```bash
# Launch all agent sessions
d0 start
# View team configuration
d0 agents
# Check system status
d0 status --detailed
```
### 3. Connect to President (Project Manager)
```bash
# Quick connection to president
d0 hi president
# Claude CLI starts automatically, or type:
claude
```
### 4. Start Development Project
**Option 1: Connect and type directly**
```bash
d0 hi president
# Then type in president session:
# "You are the president. Create a modern e-commerce platform..."
```
**Option 2: Send message directly (easier!)**
```bash
d0 tell "You are the president. Create a modern e-commerce platform with React frontend, Node.js backend, PostgreSQL database, and Docker deployment."
```
**Option 3: Use a project brief file**
```bash
# Create project-brief.txt with detailed requirements
d0 tell --file project-brief.txt
```
**What happens automatically:**
1. **President** analyzes requirements and creates project strategy
2. **Tech Lead (boss)** breaks down tasks and assigns specialists
3. **Frontend Developer (worker1)** builds React components and UI
4. **Backend Developer (worker2)** creates APIs and database logic
5. **DevOps Engineer (worker3)** sets up deployment and infrastructure
6. **QA Engineer (worker4)** writes tests and ensures quality
7. **Integration & Delivery** - All components work together seamlessly
### 5. Monitor Progress
```bash
# Check real-time status
d0 status
# View detailed team info
d0 agents
# List all available sessions
d0 list
# Connect to specific agents
d0 hi president # Project Manager
d0 hi boss # Tech Lead
d0 hi worker1 # Frontend Developer
d0 hi worker2 # Backend Developer
d0 hi worker3 # DevOps Engineer
```
### 6. Stop Environment
```bash
# Stop all agent sessions and cleanup
d0 stop
```
## π’ Agent Configuration
### π President (PRESIDENT)
- **Role**: Decides overall direction
- **Characteristic**: Genius at understanding users' true needs
- **Catchphrase**: "Please realize this vision"
### π― Manager (boss)
- **Role**: Middle management coordinating the team
- **Characteristic**: Expert at drawing out members' creativity
- **Catchphrase**: "Please provide 3+ innovative ideas"
### π· Workers (worker1, 2, 3)
- **worker1**: Design specialist (UI/UX)
- **worker2**: Data processing specialist
- **worker3**: Testing specialist
## π CLI Commands
### Core Commands
```bash
# Setup & Initialization
d0 init [--workers 5] [--force] # Initialize and setup with custom worker count
d0 start # Start all agent sessions
d0 stop # Stop all sessions
d0 status # Check system status
# Quick Connection
d0 hi president # Connect to Project Manager
d0 hi boss # Connect to Tech Lead
d0 hi worker1 # Connect to specific worker
# Communication & Messaging
d0 tell "New project" # Send to president (default)
d0 tell boss "New project" # Send message to specific agent
d0 tell everyone "All hands meeting" # Send to all agents
d0 tell --file brief.txt # Send from file
d0 comm # Check communication status
d0 comm --clear # Clear message notifications
# Team & Project Management
d0 agents # Show team overview
d0 list # List all available sessions
d0 team # Check team completion status
d0 team --reset # Reset team completion markers
# Project Analysis
d0 analyze-project # Analyze current project structure
d0 auto-setup # Smart setup based on project analysis
# History & Analytics
d0 history # Show development history
d0 analytics # Show project metrics
# Help & Utilities
d0 --help # Show all commands
d0 completion bash # Generate shell completion
d0 monitor # Real-time monitoring
```
### Quick Start Workflow
```bash
# π Complete workflow in 3 commands (Works on Windows, macOS, Linux!)
d0 init --workers 5 # Initialize 5-agent team
d0 start # Start all agents
d0 tell "Create a modern React e-commerce app" # Start your project
```
### Shell Completion (Tab Completion)
Enable tab completion for d0 commands to improve productivity:
```bash
# For Bash users
d0 completion bash
source ~/.bashrc
# For Zsh users
d0 completion zsh
source ~/.zshrc
# For PowerShell users (Windows)
d0 completion powershell
. $PROFILE
# For PowerShell Core users (Cross-platform)
d0 completion pwsh
. $PROFILE
```
**After setup, you can use tab completion:**
```bash
d0 <TAB> # Shows: init, start, tell, hi, comm, team, etc.
d0 tell <TAB> # Shows: president, boss, worker1, worker2, etc.
d0 hi <TAB> # Shows: president, boss, worker1, worker2, etc.
```
### Project Analysis & Role Management Commands
```bash
# Analyze project structure and suggest agent roles
d0 analyze-project
# Create instruction for new agent role
d0 generate-instruction <role> [options]
# Options:
# -n, --name <name> Display name
# -e, --emoji <emoji> Emoji
# -d, --description <desc> Role description
# Example: Create custom agent
d0 generate-instruction designer -n "UX Designer" -e "π¨" -d "User experience design specialist"
```
### History Management & Analytics Commands
```bash
# Display project history
d0 history [options]
# Options:
# -t, --type <type> History type: all|tasks|messages|progress|sessions
# -a, --agent <agent> Filter by specific agent
# -d, --days <days> Past N days history (default: 7)
# --export Export history to JSON file
# Manually log message
d0 log-message <from> <to> <message>
# Manually log task
d0 log-task <action> <agent> <task> [--details <details>]
# action: start|complete|block|progress
# Project analysis and statistics
d0 analytics [--period <period>]
# period: day|week|month
# Example: Show only frontend agent task history
d0 history -t tasks -a frontend
# Example: Export past 30 days history
d0 history -d 30 --export
```
### Session Management Commands
```bash
# List all sessions with agent info
d0 list
# Quick connect to agents (much easier than tmux!)
d0 hi president # Project Manager
d0 hi boss # Tech Lead
d0 hi worker1 # Frontend Developer
d0 hi worker2 # Backend Developer
d0 hi worker3 # DevOps Engineer
# Check communication status
d0 comm # View message status
d0 comm --clear # Clear notifications
# Team management
d0 team # Check team completion
d0 team --reset # Reset completion markers
```
## π¬ Inter-Agent Communication
### Easy Message Sending
```bash
# Simple message sending - these are equivalent:
d0 tell "Create a new project" # Defaults to president
d0 tell president "Create a new project" # Explicit president
# Send to specific agents:
d0 tell boss "This is a new project"
d0 tell worker1 "Please create the UI"
# Send message from file (for long instructions)
d0 tell --file project-brief.txt # To president (default)
d0 tell boss --file project-brief.txt # To specific agent
# Broadcast to all agents
d0 tell everyone "Emergency: Please stop current work and prioritize security fix"
```
### Real Communication Example
**President β Manager:**
```
d0 tell boss "You are boss.
**Project Name:** Survey System Development
**Vision:**
A system that anyone can use easily and see results immediately
**Success Criteria:**
- Complete response in 3 clicks
- Real-time result display
Please realize this with innovative ideas."
```
## π Project Structure
Project structure after setup:
```
your-project/
βββ .d0/ # Agent environment directory
β βββ config.json # Project configuration (version, workers, etc.)
β βββ tmp/ # Session & communication files (gitignored)
β β βββ inbox/ # Agent message inboxes
β β βββ sessions.json # Active session tracking
β β βββ message_status.json # Communication status
β βββ history/ # Development history & logs (gitignored)
β βββ instructions/ # Agent behavioral guidelines
β βββ president.md # Project manager instructions
β βββ boss.md # Tech lead instructions
β βββ worker.md # Worker instructions
βββ scripts/ # Utility scripts (team completion checker, etc.)
βββ .gitignore # Auto-updated to exclude temporary files
βββ CLAUDE.md # System configuration & agent setup
```
## π¨ Example: EmotiFlow
### What was created?
- π Survey that can express emotions with emojis
- π Real-time result viewing
- π± Mobile-friendly
### Try it out
```bash
cd your-project
# Check developed files
ls -la
```
## π§ Troubleshooting
### Q: Agents not responding
```bash
# Check status
d0 status
# Restart
d0 stop
d0 start
```
### Q: Messages not being delivered
```bash
# Check logs
d0 history -t messages
# Manual test
d0 tell boss "Test message"
```
### Q: Want to start over
```bash
# Full reset
d0 stop
rm -rf ./tmp/*
d0 init --force
```
## π Customization
### Add New Workers
Use the CLI command to generate new agent instructions:
```bash
# Generate custom agent role
d0 generate-instruction worker4 -n "Database Specialist" -e "π" -d "Database design and optimization expert"
```
### Edit Agent Instructions
Edit files in the `instructions/` directory to modify each agent's behavior, or use:
```bash
# Regenerate instructions for existing roles
d0 generate-instruction boss -n "Tech Lead" -e "π―"
```
## π System Architecture
### Screen Layout
```
βββββββββββββββββββ
β PRESIDENT β β President screen (purple)
βββββββββββββββββββ
ββββββββββ¬βββββββββ
β boss βworker1 β β Manager (red) and Worker1 (blue)
ββββββββββΌβββββββββ€
βworker2 βworker3 β β Worker2 and 3 (blue)
ββββββββββ΄βββββββββ
```
### Communication Flow
```
President
β "Realize this vision"
Manager
β "Everyone, provide ideas"
Workers
β "Completed!"
Manager
β "All tasks completed"
President
```
## π‘ Why This is Amazing?
### Traditional Development
```
Human β AI β Result
```
### This System
```
Human β AI President β AI Manager β AI WorkersΓ3 β Integration β Result
```
**Benefits:**
- 3x faster with parallel processing
- Leverage specialized expertise
- Rich in ideas
- Higher quality output
## π€ Contributing
Please submit bug reports and feature requests to [Issues](https://github.com/leapin0000/d0/issues).
## π License
MIT License
## π Acknowledgments
Inspired by [Claude-Code-Communication](https://github.com/nishimoto265/Claude-Code-Communication) by nishimoto265.