diff --git a/.gitignore b/.gitignore index a4e56829..c5a6e503 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,19 @@ build/ # Environment variables .env +# BMAD system and exam implementation +.bmad/ +exam/ + +# IDE and temporary files +.idea/ +.vscode/ +*.tmp +*.temp + +# OS generated files +Thumbs.db +*.swp +*.swo + CLAUDE.md diff --git a/README.md b/README.md index da37adee..f6847081 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ ### Quick Start with Enhanced BMAD System (Recommended for Claude Code Users) #### Local Installation from Downloaded Repository + +**Option 1: Automatic Installation (Recommended)** ```bash # Download or clone this repository first git clone https://github.com/your-repo/BMAD-METHOD.git @@ -17,9 +19,32 @@ cp install-bmad.sh /path/to/your-project/ cd /path/to/your-project/ # Run the installation script +chmod +x install-bmad.sh ./install-bmad.sh ``` +**Option 2: Windows Users** +```cmd +# Download or clone this repository first +git clone https://github.com/your-repo/BMAD-METHOD.git +cd BMAD-METHOD + +# Copy install script to your project directory +copy install-bmad.bat C:\path\to\your-project\ +cd C:\path\to\your-project\ + +# Run the Windows installation script +install-bmad.bat +``` + +**Option 3: Manual Installation (If scripts fail)** +```bash +# From the BMAD-METHOD directory +mkdir /path/to/your-project/.bmad +cp -r bmad-agent /path/to/your-project/.bmad/ +cp -r bmad-system/* /path/to/your-project/.bmad/ 2>/dev/null || true +``` + #### Use with Claude Code After installation, start Claude Code in your project: ``` @@ -34,6 +59,41 @@ Please read the documentation and help me build my project using BMAD intelligen **Enhanced System Features**: 4 autonomy levels, universal LLM integration, enterprise features, self-optimization, 27 comprehensive modules. +#### Installation Troubleshooting + +**Common Issues:** + +1. **"bmad-agent directory not found" error:** + ```bash + # Make sure you're running from BMAD-METHOD root directory + ls -la # Should show bmad-agent/ directory + ``` + +2. **Permission denied errors:** + ```bash + # Make script executable (Linux/Mac) + chmod +x install-bmad.sh + + # Or use manual installation + mkdir -p .bmad + cp -r /path/to/BMAD-METHOD/bmad-agent .bmad/ + ``` + +3. **Windows line ending issues:** + ```bash + # Convert line endings if needed + dos2unix install-bmad.sh + + # Or use the Windows batch file instead + install-bmad.bat + ``` + +4. **Git Bash/WSL path issues:** + ```bash + # Use full paths if relative paths fail + /c/path/to/BMAD-METHOD/install-bmad.sh + ``` + 📚 **Full Documentation**: See `/bmad-system/` directory for complete guides. --- diff --git a/install-bmad.bat b/install-bmad.bat new file mode 100644 index 00000000..c73187b9 --- /dev/null +++ b/install-bmad.bat @@ -0,0 +1,257 @@ +@echo off +rem Enhanced BMAD System Windows Installation Script +rem Copies BMAD system and agents from local repository to your project + +echo 🚀 Installing Enhanced BMAD System from local repository... +echo. + +rem Get the directory where this script is located (BMAD repository root) +set "SCRIPT_DIR=%~dp0" +set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%" +echo 📁 BMAD repository found at: %SCRIPT_DIR% + +rem Check if we're in the BMAD repository directory +if not exist "%SCRIPT_DIR%\bmad-agent" ( + echo ❌ Error: bmad-agent directory not found + echo Expected location: %SCRIPT_DIR%\bmad-agent + echo. + echo 🔍 Available directories: + dir "%SCRIPT_DIR%" /B /AD 2>nul + echo. + echo 💡 Manual installation alternative: + echo mkdir .bmad + echo xcopy "%SCRIPT_DIR%\bmad-agent" .bmad\bmad-agent\ /E /I /Y + if exist "%SCRIPT_DIR%\bmad-system" ( + echo xcopy "%SCRIPT_DIR%\bmad-system" .bmad\ /E /Y + ) + pause + exit /b 1 +) + +rem Create .bmad directory in current project +echo 📁 Creating .bmad directory in your project... +mkdir .bmad 2>nul +if errorlevel 1 ( + echo ❌ Error: Failed to create .bmad directory - check write permissions + pause + exit /b 1 +) + +rem Copy BMAD system documentation (if it exists) +if exist "%SCRIPT_DIR%\bmad-system" ( + echo 📚 Copying BMAD system documentation... + xcopy "%SCRIPT_DIR%\bmad-system" .bmad\ /E /Y /Q >nul 2>&1 + if errorlevel 1 ( + echo ⚠️ Some BMAD system files may not have copied ^(this is okay^) + ) else ( + echo ✅ BMAD system documentation copied + ) +) else ( + echo ⚠️ bmad-system directory not found, creating minimal structure... + mkdir .bmad\bmad-system 2>nul + echo # BMAD System Documentation > .bmad\README.md + echo The Enhanced BMAD System provides enterprise-grade AI development capabilities. >> .bmad\README.md +) + +rem Copy BMAD agents (essential component) +echo 🤖 Copying BMAD agents... +xcopy "%SCRIPT_DIR%\bmad-agent" .bmad\bmad-agent\ /E /I /Y /Q >nul +if errorlevel 1 ( + echo ❌ Error: Failed to copy BMAD agents - this is required for functionality + pause + exit /b 1 +) + +rem Create CLAUDE.md file for persistent reference +echo 📝 Creating CLAUDE.md reference file... +( +echo # BMAD System Reference for Claude Code +echo. +echo ## Enhanced BMAD System Available +echo. +echo This project has the Enhanced BMAD System installed in the `.bmad/` directory. +echo. +echo ### Quick Start +echo. +echo When starting a new Claude Code session, use this prompt: +echo. +echo ``` +echo I have the Enhanced BMAD System installed in my .bmad/ directory. +echo. +echo Please: +echo 1. Read .bmad/README.md to understand the BMAD system capabilities +echo 2. Read .bmad/QUICK_START_CLAUDE_CODE.md for setup guidance +echo 3. Configure BMAD for my project with these settings: +echo - Autonomy Level: Collaborative +echo - Learning: Enabled +echo - Project Type: [describe your project type] +echo - Optimization Focus: [quality/speed/cost] +echo. +echo Available BMAD agents in .bmad/bmad-agent/: +echo - Architect: System architecture and design +echo - Developer: Code implementation and optimization +echo - DevOps: Infrastructure and deployment +echo - Product Manager: Requirements and planning +echo - Analyst: Data analysis and insights +echo. +echo Start BMAD-powered development assistance for my project. +echo ``` +echo. +echo ### Key Capabilities +echo. +echo - **4 Autonomy Levels**: Guided → Collaborative → Supervised → Full +echo - **Universal LLM Integration**: Claude, GPT-4, Gemini, DeepSeek, Llama +echo - **Enterprise Features**: Security, compliance, governance, cost optimization +echo - **Self-Optimization**: Continuous learning and improvement +echo - **27 Comprehensive Modules**: Complete development platform +echo - **Specialized Agents**: Expert personas for different roles +echo. +echo --- +echo. +echo *This file ensures Claude Code can always reference the BMAD system capabilities* +) > CLAUDE.md + +rem Create project-specific BMAD configuration +echo ⚙️ Creating project configuration... +( +echo # Enhanced BMAD System Project Configuration +echo bmad_config: +echo version: "1.0.0" +echo installation_date: "%date% %time%" +echo project_type: "general" # Options: web_application, mobile_app, enterprise, scientific, gaming +echo autonomy_level: "collaborative" # Options: guided, collaborative, supervised, full +echo +echo optimization_focus: +echo - "quality" +echo - "maintainability" +echo - "performance" +echo +echo learning: +echo enabled: true +echo adapt_to_style: true +echo remember_preferences: true +echo +echo features: +echo code_analysis: true +echo automated_testing: true +echo performance_monitoring: false +echo security_scanning: false +echo cost_optimization: false +echo +echo constraints: +echo no_production_changes: true +echo require_review: false +echo max_autonomy: "supervised" +echo. +echo agents: +echo preferred_personas: +echo - "architect" # System design and architecture +echo - "dev.ide" # IDE-focused development +echo - "analyst" # Analysis and insights +echo +echo available_tasks: +echo - "create-architecture" +echo - "create-frontend-architecture" +echo - "review-infrastructure" +echo - "advanced-elicitation" +echo. +echo # Customize this configuration for your specific project needs +echo # See .bmad/bmad-agent/ directory for available personas and tasks +) > .bmad\project-config.yml + +rem Update .gitignore to optionally exclude BMAD +if exist .gitignore ( + findstr /C:".bmad/" .gitignore >nul 2>&1 + if errorlevel 1 ( + echo. >> .gitignore + echo # Enhanced BMAD System ^(uncomment to exclude from git^) >> .gitignore + echo #.bmad/ >> .gitignore + echo 📝 Added optional .bmad/ entry to .gitignore + ) +) else ( + echo # Enhanced BMAD System ^(uncomment to exclude from git^) > .gitignore + echo #.bmad/ >> .gitignore + echo 📝 Created .gitignore with optional .bmad/ entry +) + +rem Verify installation +echo. +echo 🔍 Verifying installation... + +set "INSTALLATION_VALID=true" + +if not exist .bmad ( + echo ❌ .bmad directory not created + set "INSTALLATION_VALID=false" +) + +if not exist .bmad\bmad-agent ( + echo ❌ BMAD agents not installed + set "INSTALLATION_VALID=false" +) + +if not exist CLAUDE.md ( + echo ❌ CLAUDE.md reference file not created + set "INSTALLATION_VALID=false" +) + +if "%INSTALLATION_VALID%" == "true" ( + echo ✅ Enhanced BMAD System installed successfully! + echo. + echo 📁 Installation summary: + echo 📚 BMAD System: .bmad/ ^(documentation and modules^) + echo 🤖 BMAD Agents: .bmad/bmad-agent/ ^(personas and tasks^) + echo 📝 Claude Reference: CLAUDE.md ^(persistent reference^) + echo ⚙️ Configuration: .bmad/project-config.yml + echo. + echo 📊 Files installed: + + rem Count files + for /f %%i in ('dir .bmad\*.md /s /b 2^>nul ^| find /c /v ""') do set MD_COUNT=%%i + for /f %%i in ('dir .bmad\*.yml .bmad\*.yaml /s /b 2^>nul ^| find /c /v ""') do set YML_COUNT=%%i + echo Documentation files: %MD_COUNT% + echo Configuration files: %YML_COUNT% + + echo. + echo 🎯 Next steps: + echo 1. Open Claude Code in this project directory + echo 2. Reference CLAUDE.md for the startup prompt + echo 3. Start with: 'I have Enhanced BMAD System in .bmad/ directory' + echo 4. Let Claude read the documentation and begin BMAD-powered development + echo. + echo 📚 Key files to mention to Claude: + echo - .bmad/README.md ^(system overview^) + if exist .bmad\QUICK_START_CLAUDE_CODE.md ( + echo - .bmad/QUICK_START_CLAUDE_CODE.md ^(setup guide^) + ) + echo - .bmad/bmad-agent/ ^(specialized agents^) + echo - CLAUDE.md ^(reference guide^) + echo. + echo 🆘 If you encounter issues: + echo - Make sure you're in your target project directory + echo - Check file permissions if copying failed + echo - Run script from the BMAD-METHOD repository root + echo - Use the manual installation commands shown above if needed +) else ( + echo ❌ Installation completed with errors. Manual steps: + echo. + echo 📝 Manual installation commands: + echo mkdir .bmad + echo xcopy "%SCRIPT_DIR%\bmad-agent" .bmad\bmad-agent\ /E /I /Y + if exist "%SCRIPT_DIR%\bmad-system" ( + echo xcopy "%SCRIPT_DIR%\bmad-system" .bmad\ /E /Y + ) + echo. + echo 🔍 Check: + echo 1. You have write permissions in current directory + echo 2. Source files exist in BMAD repository + echo 3. No conflicts with existing .bmad directory + pause + exit /b 1 +) + +echo. +echo 🚀 Enhanced BMAD System ready! +echo Welcome to the future of AI-powered development! 🎉 +echo. +pause \ No newline at end of file diff --git a/install-bmad.sh b/install-bmad.sh index 4fb13145..46880fcf 100644 --- a/install-bmad.sh +++ b/install-bmad.sh @@ -1,232 +1,314 @@ -#!/bin/bash - -# Enhanced BMAD System Local Installation Script -# Copies BMAD system and agents from local repository to your project - -echo "🚀 Installing Enhanced BMAD System from local repository..." -echo "" - -# Get the directory where this script is located (BMAD repository root) -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -echo "📁 BMAD repository found at: $SCRIPT_DIR" - -# Check if we're in the BMAD repository directory -if [ ! -d "$SCRIPT_DIR/bmad-system" ] || [ ! -d "$SCRIPT_DIR/bmad-agent" ]; then - echo "❌ Error: This script must be run from the BMAD-METHOD repository directory" - echo " Make sure you have bmad-system/ and bmad-agent/ directories" - exit 1 -fi - -# Create .bmad directory in current project -echo "📁 Creating .bmad directory in your project..." -mkdir -p .bmad - -# Copy BMAD system documentation -echo "📚 Copying BMAD system documentation..." -cp -r "$SCRIPT_DIR/bmad-system"/* .bmad/ - -# Copy BMAD agents -echo "🤖 Copying BMAD agents..." -cp -r "$SCRIPT_DIR/bmad-agent" .bmad/ - -# Create CLAUDE.md file for persistent reference -echo "📝 Creating CLAUDE.md reference file..." -cat > CLAUDE.md << 'EOF' -# BMAD System Reference for Claude Code - -## Enhanced BMAD System Available - -This project has the Enhanced BMAD System installed in the `.bmad/` directory. - -### Quick Start - -When starting a new Claude Code session, use this prompt: - -``` -I have the Enhanced BMAD System installed in my .bmad/ directory. - -Please: -1. Read .bmad/README.md to understand the BMAD system capabilities -2. Read .bmad/QUICK_START_CLAUDE_CODE.md for setup guidance -3. Configure BMAD for my project with these settings: - - Autonomy Level: Collaborative - - Learning: Enabled - - Project Type: [describe your project type] - - Optimization Focus: [quality/speed/cost] - -Available BMAD agents in .bmad/bmad-agent/: -- Architect: System architecture and design -- Developer: Code implementation and optimization -- DevOps: Infrastructure and deployment -- Product Manager: Requirements and planning -- Analyst: Data analysis and insights - -Start BMAD-powered development assistance for my project. -``` - -### BMAD System Structure - -``` -.bmad/ -├── README.md # Main BMAD system overview -├── QUICK_START_CLAUDE_CODE.md # Claude Code integration guide -├── USE_CASES_AND_EXAMPLES.md # Real-world examples -├── ARCHITECTURE_OVERVIEW.md # System architecture -├── INTEGRATION_GUIDE.md # Advanced integration -├── INSTALLATION_GUIDE.md # Installation reference -├── autonomous-development/ # Autonomous development engine -├── code-intelligence/ # Advanced code intelligence -├── self-optimization/ # Self-optimization engine -├── enterprise-architecture/ # Enterprise architecture platform -├── governance/ # Advanced governance framework -├── strategic-intelligence/ # Strategic intelligence dashboard -├── security-compliance/ # Enterprise security & compliance -├── monitoring-analytics/ # Advanced monitoring & analytics -├── cost-optimization/ # Cost optimization engine -└── bmad-agent/ # BMAD agent personas and tasks - ├── personas/ # Agent personalities - ├── tasks/ # Specialized tasks - ├── checklists/ # Quality checklists - ├── templates/ # Document templates - └── data/ # Knowledge base -``` - -### Key Capabilities - -- **4 Autonomy Levels**: Guided → Collaborative → Supervised → Full -- **Universal LLM Integration**: Claude, GPT-4, Gemini, DeepSeek, Llama -- **Enterprise Features**: Security, compliance, governance, cost optimization -- **Self-Optimization**: Continuous learning and improvement -- **27 Comprehensive Modules**: Complete development platform -- **Specialized Agents**: Expert personas for different roles - -### Usage Examples - -#### Start New Feature Development -``` -Using BMAD collaborative development, help me implement [feature description]. -Reference the BMAD agents and system capabilities in .bmad/ directory. -``` - -#### Code Review and Optimization -``` -Using BMAD code intelligence, analyze this codebase and suggest improvements. -Apply BMAD optimization principles from .bmad/self-optimization/. -``` - -#### Architecture Design -``` -Using BMAD enterprise architecture, help me design a scalable system. -Reference .bmad/enterprise-architecture/ and .bmad/bmad-agent/personas/architect.md. -``` - ---- - -*This file ensures Claude Code can always reference the BMAD system capabilities* -EOF - -# Create project-specific BMAD configuration -echo "⚙️ Creating project configuration..." -cat > .bmad/project-config.yml << EOF -# Enhanced BMAD System Project Configuration -bmad_config: - version: "1.0.0" - installation_date: "$(date)" - project_type: "general" # Options: web_application, mobile_app, enterprise, scientific, gaming - autonomy_level: "collaborative" # Options: guided, collaborative, supervised, full - - optimization_focus: - - "quality" - - "maintainability" - - "performance" - - learning: - enabled: true - adapt_to_style: true - remember_preferences: true - - features: - code_analysis: true - automated_testing: true - performance_monitoring: false - security_scanning: false - cost_optimization: false - - constraints: - no_production_changes: true - require_review: false - max_autonomy: "supervised" - - agents: - preferred_personas: - - "architect" # System design and architecture - - "dev.ide" # IDE-focused development - - "analyst" # Analysis and insights - - available_tasks: - - "create-architecture" - - "create-frontend-architecture" - - "review-infrastructure" - - "advanced-elicitation" - -# Customize this configuration for your specific project needs -# See .bmad/bmad-agent/ directory for available personas and tasks -EOF - -# Update .gitignore to optionally exclude BMAD (but recommend keeping it) -if [ -f .gitignore ]; then - if ! grep -q ".bmad/" .gitignore; then - echo "" >> .gitignore - echo "# Enhanced BMAD System (uncomment to exclude from git)" >> .gitignore - echo "#.bmad/" >> .gitignore - echo "📝 Added optional .bmad/ entry to .gitignore" - fi -else - echo "# Enhanced BMAD System (uncomment to exclude from git)" > .gitignore - echo "#.bmad/" >> .gitignore - echo "📝 Created .gitignore with optional .bmad/ entry" -fi - -# Verify installation -echo "" -echo "🔍 Verifying installation..." -if [ -d .bmad/bmad-system ] || [ -f .bmad/README.md ]; then - if [ -d .bmad/bmad-agent ]; then - echo "✅ Enhanced BMAD System installed successfully!" - echo "" - echo "📁 Installation summary:" - echo " 📚 BMAD System: .bmad/ (documentation and modules)" - echo " 🤖 BMAD Agents: .bmad/bmad-agent/ (personas and tasks)" - echo " 📝 Claude Reference: CLAUDE.md (persistent reference)" - echo " ⚙️ Configuration: .bmad/project-config.yml" - echo "" - echo "📊 Files installed:" - find .bmad -name "*.md" | wc -l | xargs echo " Documentation files:" - find .bmad -name "*.yml" -o -name "*.yaml" | wc -l | xargs echo " Configuration files:" - echo "" - echo "🎯 Next steps:" - echo "1. Open Claude Code in this project directory" - echo "2. Reference CLAUDE.md for the startup prompt" - echo "3. Start with: 'I have Enhanced BMAD System in .bmad/ directory'" - echo "4. Let Claude read the documentation and begin BMAD-powered development" - echo "" - echo "📚 Key files to mention to Claude:" - echo " - .bmad/README.md (system overview)" - echo " - .bmad/QUICK_START_CLAUDE_CODE.md (setup guide)" - echo " - .bmad/bmad-agent/ (specialized agents)" - echo " - CLAUDE.md (reference guide)" - else - echo "⚠️ BMAD system installed but agents directory missing" - echo " Please check that bmad-agent/ directory exists in source" - fi -else - echo "❌ Installation failed. Please check:" - echo " 1. You're running this from the BMAD-METHOD directory" - echo " 2. bmad-system/ and bmad-agent/ directories exist" - echo " 3. You have write permissions in current directory" - exit 1 -fi - -echo "" -echo "🚀 Enhanced BMAD System ready!" +#!/bin/bash + +# Enhanced BMAD System Local Installation Script +# Copies BMAD system and agents from local repository to your project + +echo "🚀 Installing Enhanced BMAD System from local repository..." +echo "" + +# Get the directory where this script is located (BMAD repository root) +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +echo "📁 BMAD repository found at: $SCRIPT_DIR" + +# Function to check if command succeeded +check_success() { + if [ $? -ne 0 ]; then + echo "❌ Error: $1" + exit 1 + fi +} + +# Function to convert Windows paths to Unix-style for Git Bash/WSL +normalize_path() { + local path="$1" + # Convert Windows drive letters (C:\ -> /c/) + if [[ "$path" =~ ^[A-Za-z]: ]]; then + path=$(echo "$path" | sed 's|^\([A-Za-z]\):|/\L\1|' | tr '\\' '/') + fi + echo "$path" +} + +# Normalize script directory path +SCRIPT_DIR=$(normalize_path "$SCRIPT_DIR") + +# Check if we're in the BMAD repository directory (flexible check) +if [ ! -d "$SCRIPT_DIR/bmad-agent" ]; then + echo "❌ Error: bmad-agent directory not found" + echo " Expected location: $SCRIPT_DIR/bmad-agent" + echo "" + echo "🔍 Available directories:" + ls -la "$SCRIPT_DIR" 2>/dev/null || echo " Cannot list directory contents" + echo "" + echo "💡 Manual installation alternative:" + echo " mkdir -p .bmad" + echo " cp -r $SCRIPT_DIR/bmad-agent .bmad/" + if [ -d "$SCRIPT_DIR/bmad-system" ]; then + echo " cp -r $SCRIPT_DIR/bmad-system/* .bmad/" + fi + exit 1 +fi + +# Create .bmad directory in current project +echo "📁 Creating .bmad directory in your project..." +mkdir -p .bmad +check_success "Failed to create .bmad directory - check write permissions" + +# Copy BMAD system documentation (if it exists) +if [ -d "$SCRIPT_DIR/bmad-system" ]; then + echo "📚 Copying BMAD system documentation..." + cp -r "$SCRIPT_DIR/bmad-system"/* .bmad/ 2>/dev/null + if [ $? -eq 0 ]; then + echo " ✅ BMAD system documentation copied" + else + echo " ⚠️ Some BMAD system files may not have copied (this is okay)" + fi +else + echo "⚠️ bmad-system directory not found, creating minimal structure..." + # Create minimal required files + mkdir -p .bmad/bmad-system + echo "# BMAD System Documentation" > .bmad/README.md + echo "The Enhanced BMAD System provides enterprise-grade AI development capabilities." >> .bmad/README.md +fi + +# Copy BMAD agents (essential component) +echo "🤖 Copying BMAD agents..." +cp -r "$SCRIPT_DIR/bmad-agent" .bmad/ +check_success "Failed to copy BMAD agents - this is required for functionality" + +# Create CLAUDE.md file for persistent reference +echo "📝 Creating CLAUDE.md reference file..." +cat > CLAUDE.md << 'EOF' +# BMAD System Reference for Claude Code + +## Enhanced BMAD System Available + +This project has the Enhanced BMAD System installed in the `.bmad/` directory. + +### Quick Start + +When starting a new Claude Code session, use this prompt: + +``` +I have the Enhanced BMAD System installed in my .bmad/ directory. + +Please: +1. Read .bmad/README.md to understand the BMAD system capabilities +2. Read .bmad/QUICK_START_CLAUDE_CODE.md for setup guidance +3. Configure BMAD for my project with these settings: + - Autonomy Level: Collaborative + - Learning: Enabled + - Project Type: [describe your project type] + - Optimization Focus: [quality/speed/cost] + +Available BMAD agents in .bmad/bmad-agent/: +- Architect: System architecture and design +- Developer: Code implementation and optimization +- DevOps: Infrastructure and deployment +- Product Manager: Requirements and planning +- Analyst: Data analysis and insights + +Start BMAD-powered development assistance for my project. +``` + +### BMAD System Structure + +``` +.bmad/ +├── README.md # Main BMAD system overview +├── QUICK_START_CLAUDE_CODE.md # Claude Code integration guide +├── USE_CASES_AND_EXAMPLES.md # Real-world examples +├── ARCHITECTURE_OVERVIEW.md # System architecture +├── INTEGRATION_GUIDE.md # Advanced integration +├── INSTALLATION_GUIDE.md # Installation reference +├── autonomous-development/ # Autonomous development engine +├── code-intelligence/ # Advanced code intelligence +├── self-optimization/ # Self-optimization engine +├── enterprise-architecture/ # Enterprise architecture platform +├── governance/ # Advanced governance framework +├── strategic-intelligence/ # Strategic intelligence dashboard +├── security-compliance/ # Enterprise security & compliance +├── monitoring-analytics/ # Advanced monitoring & analytics +├── cost-optimization/ # Cost optimization engine +└── bmad-agent/ # BMAD agent personas and tasks + ├── personas/ # Agent personalities + ├── tasks/ # Specialized tasks + ├── checklists/ # Quality checklists + ├── templates/ # Document templates + └── data/ # Knowledge base +``` + +### Key Capabilities + +- **4 Autonomy Levels**: Guided → Collaborative → Supervised → Full +- **Universal LLM Integration**: Claude, GPT-4, Gemini, DeepSeek, Llama +- **Enterprise Features**: Security, compliance, governance, cost optimization +- **Self-Optimization**: Continuous learning and improvement +- **27 Comprehensive Modules**: Complete development platform +- **Specialized Agents**: Expert personas for different roles + +### Usage Examples + +#### Start New Feature Development +``` +Using BMAD collaborative development, help me implement [feature description]. +Reference the BMAD agents and system capabilities in .bmad/ directory. +``` + +#### Code Review and Optimization +``` +Using BMAD code intelligence, analyze this codebase and suggest improvements. +Apply BMAD optimization principles from .bmad/self-optimization/. +``` + +#### Architecture Design +``` +Using BMAD enterprise architecture, help me design a scalable system. +Reference .bmad/enterprise-architecture/ and .bmad/bmad-agent/personas/architect.md. +``` + +--- + +*This file ensures Claude Code can always reference the BMAD system capabilities* +EOF + +# Create project-specific BMAD configuration +echo "⚙️ Creating project configuration..." +cat > .bmad/project-config.yml << EOF +# Enhanced BMAD System Project Configuration +bmad_config: + version: "1.0.0" + installation_date: "$(date)" + project_type: "general" # Options: web_application, mobile_app, enterprise, scientific, gaming + autonomy_level: "collaborative" # Options: guided, collaborative, supervised, full + + optimization_focus: + - "quality" + - "maintainability" + - "performance" + + learning: + enabled: true + adapt_to_style: true + remember_preferences: true + + features: + code_analysis: true + automated_testing: true + performance_monitoring: false + security_scanning: false + cost_optimization: false + + constraints: + no_production_changes: true + require_review: false + max_autonomy: "supervised" + + agents: + preferred_personas: + - "architect" # System design and architecture + - "dev.ide" # IDE-focused development + - "analyst" # Analysis and insights + + available_tasks: + - "create-architecture" + - "create-frontend-architecture" + - "review-infrastructure" + - "advanced-elicitation" + +# Customize this configuration for your specific project needs +# See .bmad/bmad-agent/ directory for available personas and tasks +EOF + +# Update .gitignore to optionally exclude BMAD (but recommend keeping it) +if [ -f .gitignore ]; then + if ! grep -q ".bmad/" .gitignore; then + echo "" >> .gitignore + echo "# Enhanced BMAD System (uncomment to exclude from git)" >> .gitignore + echo "#.bmad/" >> .gitignore + echo "📝 Added optional .bmad/ entry to .gitignore" + fi +else + echo "# Enhanced BMAD System (uncomment to exclude from git)" > .gitignore + echo "#.bmad/" >> .gitignore + echo "📝 Created .gitignore with optional .bmad/ entry" +fi + +# Verify installation +echo "" +echo "🔍 Verifying installation..." + +# Check critical components +INSTALLATION_VALID=true + +if [ ! -d .bmad ]; then + echo "❌ .bmad directory not created" + INSTALLATION_VALID=false +fi + +if [ ! -d .bmad/bmad-agent ]; then + echo "❌ BMAD agents not installed" + INSTALLATION_VALID=false +fi + +if [ ! -f CLAUDE.md ]; then + echo "❌ CLAUDE.md reference file not created" + INSTALLATION_VALID=false +fi + +if [ "$INSTALLATION_VALID" = true ]; then + echo "✅ Enhanced BMAD System installed successfully!" + echo "" + echo "📁 Installation summary:" + echo " 📚 BMAD System: .bmad/ (documentation and modules)" + echo " 🤖 BMAD Agents: .bmad/bmad-agent/ (personas and tasks)" + echo " 📝 Claude Reference: CLAUDE.md (persistent reference)" + echo " ⚙️ Configuration: .bmad/project-config.yml" + echo "" + echo "📊 Files installed:" + + # Count files more reliably + MD_COUNT=$(find .bmad -name "*.md" 2>/dev/null | wc -l) + YML_COUNT=$(find .bmad -name "*.yml" -o -name "*.yaml" 2>/dev/null | wc -l) + echo " Documentation files: $MD_COUNT" + echo " Configuration files: $YML_COUNT" + + echo "" + echo "🎯 Next steps:" + echo "1. Open Claude Code in this project directory" + echo "2. Reference CLAUDE.md for the startup prompt" + echo "3. Start with: 'I have Enhanced BMAD System in .bmad/ directory'" + echo "4. Let Claude read the documentation and begin BMAD-powered development" + echo "" + echo "📚 Key files to mention to Claude:" + echo " - .bmad/README.md (system overview)" + if [ -f .bmad/QUICK_START_CLAUDE_CODE.md ]; then + echo " - .bmad/QUICK_START_CLAUDE_CODE.md (setup guide)" + fi + echo " - .bmad/bmad-agent/ (specialized agents)" + echo " - CLAUDE.md (reference guide)" + echo "" + echo "🆘 If you encounter issues:" + echo " - Make sure you're in your target project directory" + echo " - Check file permissions if copying failed" + echo " - Run script from the BMAD-METHOD repository root" + echo " - Use the manual installation commands shown above if needed" +else + echo "❌ Installation completed with errors. Manual steps:" + echo "" + echo "📝 Manual installation commands:" + echo " mkdir -p .bmad" + echo " cp -r '$SCRIPT_DIR/bmad-agent' .bmad/" + if [ -d "$SCRIPT_DIR/bmad-system" ]; then + echo " cp -r '$SCRIPT_DIR/bmad-system'/* .bmad/" + fi + echo "" + echo "🔍 Check:" + echo " 1. You have write permissions in current directory" + echo " 2. Source files exist in BMAD repository" + echo " 3. No conflicts with existing .bmad directory" + exit 1 +fi + +echo "" +echo "🚀 Enhanced BMAD System ready!" echo " Welcome to the future of AI-powered development! 🎉" \ No newline at end of file