Skip to content

🐝 MinionHive orchestrates a swarm of AI minions to execute tasks safely in parallel - fast, coordinated, and contract-driven

License

Notifications You must be signed in to change notification settings

GuitaristForEver/minion-hive

Repository files navigation

MinionHive Logo

MinionHive

Unleash the minions - they'll build it in parallel.

npm version License: MIT GitHub stars Claude Code Plugin

MinionHive is a Claude Code plugin that revolutionizes how you build software by providing:

  • πŸ€– Intelligent Task Analysis: AI determines optimal execution strategy
  • ⚑ Safe Parallel Execution: AST-based conflict detection enables concurrent work without race conditions
  • 🌊 Wave-Based Coordination: Tasks execute in dependency-respecting waves
  • πŸ“ Contract-First Development: API contracts and zone boundaries designed before implementation
  • βœ… Comprehensive Validation: Automated testing with local and E2E validation
  • πŸ” Self-Validation: AI analyzes results and auto-fixes issues when confident
  • 🎯 Full-Stack Best Practices: Frontend, Backend, Security, Performance, UX, Accessibility

Features

🎭 Intelligent Agent Orchestration

The Orchestrator Agent analyzes your task and determines the best execution strategy:

  • Single domain? Handle it directly
  • Multi-domain? Run conflict detection for safe parallel execution
  • Need coordination? Design API contracts and zone boundaries first
  • Always validate? Run tests automatically after execution

🧠 AI-Driven Domain Analysis & Conflict Detection

The Domain Analyzer Agent and Conflict Detector Agent use AI and AST analysis to decide:

  • Which domains are involved (frontend, backend, database, etc.)
  • Can work be parallelized safely? (AST-level dependency analysis)
  • What are the conflict zones? (circular dependencies, high coupling)
  • What are the API boundaries and zone boundaries?
  • What's the optimal wave-based execution plan?

πŸ“‹ Contract-First Development with Zone Boundaries

The API Contract Designer creates comprehensive contracts before parallel work:

  • API endpoints with full type definitions
  • Shared types and interfaces
  • Zone boundaries (which files each agent can/cannot modify)
  • Ownership rules (who owns shared code)
  • Symbol contracts (shared functions/classes)
  • Validation rules and error codes
  • Clear documentation of assumptions

πŸ‘₯ Specialist Agents & Parallel Execution

Domain experts that work in safe parallel waves:

  • Parallel Executor: Coordinates concurrent subagent execution
  • Frontend Specialist: React, TypeScript, UX, Accessibility, Performance
  • Backend Specialist: APIs, Databases, Security, Business Logic

Each specialist:

  • Receives clear zone boundaries (files they can/cannot modify)
  • Works within their assigned wave
  • Follows comprehensive best practices
  • Reports results for aggregation

βœ… Comprehensive Validation & Review

The Validation Orchestrator ensures code quality before review:

  • Local validation: Unit tests, type checking, linting
  • E2E validation: Integration tests, browser tests
  • Self-validation: AI analyzes results, creates fix plans
  • Auto-fix: Applies fixes when confident, re-validates
  • Configurable: User defines test commands and automation level

The Reviewer Agent then reviews and improves code across ALL domains:

  • Frontend/UI best practices
  • User Experience (UX)
  • Accessibility (a11y)
  • Backend architecture
  • Security
  • Performance
  • Testing
  • Code quality
  • Documentation

With full autonomy - it makes improvements and reports what was done.

Installation

Option 1: Install via npm (Recommended) πŸ“¦

# Install globally
npm install -g @minionhive/core

# Install the plugin
minionhive install --global

# Restart Claude Code and you're ready!

Option 2: Claude Code Marketplace πŸ›’

# Coming soon to Claude Code marketplace!
# One-click installation from within Claude Code

Option 3: Clone from repository

# Clone and install
git clone https://github.com/GuitaristForEver/minion-hive.git
cd minion-hive
npm install
minionhive install --global

Option 4: Manual installation

# Download and copy to Claude plugins directory
cp -r /path/to/minionhive ~/.claude/plugins/minionhive

Verify Installation

# Check installation status
minionhive status

# View version
minionhive version

Usage

Smart Implementation with Safe Parallel Execution

Use /smart-implement for intelligent, parallelized feature development:

/smart-implement Add user profile page with avatar upload

What happens:

  1. βœ… Orchestrator receives your request
  2. βœ… Domain Analyzer determines it's a full-stack feature (frontend + backend)
  3. βœ… NEW: Conflict Detector runs AST analysis to identify safe parallel zones
  4. βœ… API Contract Designer creates zone boundaries and API contracts
  5. βœ… NEW: Parallel Executor spawns concurrent subagents in waves:
    • Wave 1: Define shared types
    • Wave 2: Frontend UI + Backend API (parallel)
  6. βœ… NEW: Validation Orchestrator runs automated tests:
    • Local: Unit tests, type checking, linting
    • E2E: Integration tests (if configured)
    • Auto-fixes issues when confident
  7. βœ… Reviewer Agent reviews and improves
  8. βœ… Complete implementation report with parallel execution metrics

Parallel Execution with Explicit Control

Use /parallel-execute for explicit parallel execution with conflict detection:

/parallel-execute Build analytics dashboard with real-time charts

Benefits over /smart-implement:

  • Explicit parallel execution focus
  • Detailed conflict analysis report
  • Wave-by-wave progress tracking
  • Performance metrics (speedup vs sequential)

Validation of Completed Work

Use /validate-work to validate code with automated testing:

# Validate current work
/validate-work

# Validate specific execution
/validate-work exec-2025-01-10-abc123

# Options
/validate-work --local-only    # Skip E2E tests
/validate-work --auto           # Run everything without prompts
/validate-work --config         # Configure validation

What happens:

  1. Load or create validation configuration (first run)
  2. Run local validation (tests, type checking, linting)
  3. Run E2E validation (integration tests, browser tests)
  4. Self-validate: Analyze results, identify issues
  5. Auto-fix issues when confident
  6. Report comprehensive results

Analyze Code Conflicts

Use /analyze-conflicts to understand dependencies and plan parallel work:

# Analyze entire codebase
/analyze-conflicts

# Analyze specific files
/analyze-conflicts src/components/UserProfile.tsx src/app/api/users/route.ts

# Generate visual graph
/analyze-conflicts --graph

Useful for:

  • Planning refactors
  • Understanding codebase architecture
  • Debugging parallel execution issues
  • Identifying conflict zones

Deep Code Review

Use /improve for comprehensive quality review:

# Review everything
/improve

# Review specific feature
/improve the authentication flow

# Review specific file
/improve src/components/UserProfile.tsx

# Focus on specific domain (but still checks others)
/improve for accessibility

What happens:

  1. βœ… Reviewer Agent analyzes the code
  2. βœ… Reviews across ALL domains (security, UX, a11y, performance, etc.)
  3. βœ… Autonomously makes improvements (no approval needed)
  4. βœ… Reports all changes made with detailed explanations

Direct Agent Invocation

You can also invoke agents directly:

# Use the orchestrator
@orchestrator implement a dashboard with real-time analytics

# Use the reviewer
@reviewer review the changes I just made

# Use domain specialists
@frontend-specialist build a responsive navigation menu
@backend-specialist create an API for user authentication

Agent Hierarchy

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      ORCHESTRATOR                           β”‚
β”‚  (Main coordinator - decides execution strategy)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”
                    β–Ό               β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ DOMAIN ANALYZERβ”‚  β”‚ API CONTRACT     β”‚
        β”‚ (Split analysis)β”‚  β”‚ DESIGNER         β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚               β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                            β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚   PARALLEL EXECUTION          β”‚
            β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
            β–Ό             β–Ό                 β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”
    β”‚  FRONTEND    β”‚ β”‚   BACKEND    β”‚  β”‚  ...  β”‚
    β”‚  SPECIALIST  β”‚ β”‚   SPECIALIST β”‚  β”‚ More  β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
                            β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   REVIEWER   β”‚
                    β”‚ (Auto-review)β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Examples

Example 1: Full-Stack Feature

Request:

/smart-implement Add a comment system to blog posts

Execution:

  1. Domain Analyzer: "Full-stack feature - frontend + backend"
  2. API Contract Designer: Creates comment types and API contracts
  3. Parallel execution:
    • Frontend: Comment form, comment list, real-time updates
    • Backend: Comment API, database schema, validation, moderation
  4. Reviewer: Adds rate limiting, improves accessibility, optimizes queries
  5. Result: Complete, production-ready comment system

Example 2: Frontend-Only Task

Request:

/smart-implement Add dark mode toggle

Execution:

  1. Domain Analyzer: "Frontend-only, no backend needed"
  2. Skip conflict detection (not needed for single domain)
  3. Frontend Specialist: Implements dark mode with persistence
  4. Validation: All tests pass
  5. Reviewer: Improves color contrast, adds keyboard shortcuts
  6. Result: Accessible, polished dark mode feature

Example 3: Deep Review

Request:

/improve the checkout flow

Execution:

  1. Reviewer analyzes checkout code
  2. Finds issues:
    • Missing loading states β†’ Fixed
    • Poor error messages β†’ Improved
    • No keyboard navigation β†’ Added
    • Slow API calls β†’ Optimized
    • Missing ARIA labels β†’ Added
  3. Reports all improvements made

Best Practices Enforced

Frontend

  • βœ… TypeScript strict typing
  • βœ… React hooks best practices
  • βœ… Responsive, mobile-first design
  • βœ… Accessibility (WCAG AA minimum)
  • βœ… Performance optimization
  • βœ… Loading and error states

Backend

  • βœ… Input validation (never trust client)
  • βœ… SQL injection prevention
  • βœ… Authentication & authorization
  • βœ… Proper error handling
  • βœ… Database optimization
  • βœ… Security best practices

User Experience

  • βœ… Clear feedback for all actions
  • βœ… User-friendly error messages
  • βœ… Loading indicators
  • βœ… Empty states with helpful messaging
  • βœ… Smooth transitions

Security

  • βœ… Input sanitization
  • βœ… HTTPS enforcement
  • βœ… Rate limiting
  • βœ… Secret management
  • βœ… CORS configuration

Performance

  • βœ… Code splitting
  • βœ… Lazy loading
  • βœ… Database indexes
  • βœ… Caching strategies
  • βœ… Bundle optimization

Accessibility

  • βœ… Semantic HTML
  • βœ… ARIA labels
  • βœ… Keyboard navigation
  • βœ… Screen reader support
  • βœ… Color contrast (WCAG AA)

Architecture

Plugin Structure

ai-minions/
β”œβ”€β”€ .claude-plugin/
β”‚   └── plugin.json          # Plugin metadata
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ orchestrator.md      # Main coordinator
β”‚   β”œβ”€β”€ domain-analyzer.md   # Task analysis & splitting
β”‚   β”œβ”€β”€ api-contract-designer.md  # Contract definition
β”‚   β”œβ”€β”€ frontend-specialist.md    # Frontend expert
β”‚   β”œβ”€β”€ backend-specialist.md     # Backend expert
β”‚   └── reviewer.md          # Comprehensive reviewer
β”œβ”€β”€ commands/
β”‚   β”œβ”€β”€ improve.md           # /improve command
β”‚   └── smart-implement.md   # /smart-implement command
β”œβ”€β”€ hooks/
β”‚   └── agent-complete.sh    # Auto-review trigger
└── README.md                # This file

How It Works

  1. Request Received: User types /smart-implement [task]
  2. Orchestrator Takes Control: Analyzes the request
  3. Domain Analysis: AI determines optimal execution strategy
  4. Contract Design (if needed): API contracts created first
  5. Parallel Execution: Multiple specialists work simultaneously
  6. Quality Review: Automatic comprehensive review
  7. Results Delivered: Complete implementation with improvements

Configuration

No configuration needed! The plugin works out of the box with intelligent defaults.

Optional: Customize Agents

You can modify agent behavior by editing the markdown files in agents/:

# Edit the reviewer to focus on specific domains
vim agents/reviewer.md

# Customize the orchestrator's decision-making
vim agents/orchestrator.md

Philosophy

Why AI Minions?

Traditional development:

  • ❌ You write frontend, then backend (sequential)
  • ❌ You forget edge cases and best practices
  • ❌ Code review happens manually (if at all)
  • ❌ Quality inconsistent across the codebase

With AI Minions:

  • βœ… Frontend + Backend work in parallel (faster)
  • βœ… AI enforces best practices automatically
  • βœ… Every task gets comprehensive review
  • βœ… Consistent quality across all code

Core Principles

  1. AI-Driven Intelligence: Let AI make smart execution decisions
  2. Contract-First: Define interfaces before parallel work
  3. True Parallelism: Multiple agents working simultaneously
  4. Automatic Quality: Every task reviewed and improved
  5. Full Autonomy: Reviewer makes improvements without approval
  6. Comprehensive Coverage: All domains (frontend, backend, security, UX, a11y, performance)

Limitations

Current Limitations

  1. Hook Integration: The agent-complete hook requires Claude Code native support (currently the orchestrator handles auto-review)
  2. Single Project: Best suited for monorepo or single-project setups
  3. Learning Period: First few uses help the system learn your codebase patterns

Future Enhancements

  • Multi-project support
  • Custom domain specialists (mobile, DevOps, ML, etc.)
  • Configurable review priorities
  • Integration with CI/CD pipelines
  • Performance metrics tracking
  • Team collaboration features

Troubleshooting

Agents not working?

# Check plugin is installed
claude /plugin list

# Reinstall if needed
claude /plugin remove minionhive
claude /plugin add /path/to/minionhive

Review too aggressive?

Edit agents/reviewer.md to adjust the autonomy level or prioritization.

Want faster execution?

The orchestrator already optimizes for speed through parallelism. If you want even faster, you can skip the review:

# Direct specialist invocation (skips review)
@frontend-specialist build a login form

Contributing

Contributions welcome!

Repository: https://github.com/GuitaristForEver/minion-hive

To add a new specialist agent:

  1. Create agents/your-specialist.md
  2. Add to plugin.json agents array
  3. Update orchestrator to invoke your agent
  4. Add documentation to README

Publishing

Publishing to npm

# Bump version
npm version patch  # or minor, or major

# Publish to npm
npm publish --access public

# Users can then install with:
npm install -g @minionhive/core

Claude Code Marketplace

To submit to Claude Code marketplace:

  1. Ensure .claude-plugin/plugin.json is configured
  2. Package includes all required metadata
  3. Submit to Claude Code marketplace (details coming soon)

License

MIT License - feel free to use and modify!

See LICENSE for full details.


MinionHive: Where AI agents swarm together to build your software in parallel. 🐝⚑

About

🐝 MinionHive orchestrates a swarm of AI minions to execute tasks safely in parallel - fast, coordinated, and contract-driven

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published