Thank you for your interest in contributing to Hivemind! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
- Check existing issues to avoid duplicates.
- Use the Bug Report issue template.
- Include steps to reproduce, expected behavior, and actual behavior.
- Include your OS, Python version, and Node.js version.
- Open a Feature Request issue.
- Describe the use case and why it would be valuable.
- If possible, suggest an implementation approach.
- Fork the repository.
- Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes following the code style guidelines below.
- Test your changes thoroughly locally.
- Commit with clear, descriptive messages following Conventional Commits:
git commit -m "feat: add project health monitoring endpoint" - Push and open a Pull Request against
main.
- Continuous Integration: Once you open a PR, our CI pipeline will automatically run linting and tests. Ensure all checks pass.
- Review Process: Every PR requires at least one approval from a maintainer before it can be merged.
- Addressing Feedback: Be open to feedback and ready to make adjustments. We value constructive code reviews!
- Merging: Once approved and all checks pass, a maintainer will merge your PR (usually via Squash and Merge).
- Python 3.11+
- Node.js 18+
- Claude Code CLI (
claudecommand available)
# Clone your fork
git clone https://github.com/YOUR_USERNAME/hivemind.git
cd hivemind
# Run the setup script (installs everything)
chmod +x setup.sh
./setup.sh
# Copy and configure environment
cp .env.example .env
# Edit .env with your settings
# Start the development server
./restart.shhivemind/
├── server.py # Main entry point, HTTP server, tunnel setup
├── orchestrator.py # Core orchestration engine (multi-agent coordination)
├── dag_executor.py # DAG-based parallel task execution
├── pm_agent.py # Project Manager agent (task planning)
├── config.py # Configuration, prompts, agent registry
├── contracts.py # Data contracts (TaskInput, Artifact, etc.)
├── device_auth.py # Device token authentication system
├── project_context.py # Project context builder and isolation
├── state.py # State management
├── sdk_client.py # Claude Code SDK client
├── dashboard/
│ └── api.py # FastAPI dashboard API endpoints
├── frontend/
│ ├── src/
│ │ ├── App.tsx # Main app with auth gate
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components (Dashboard, ProjectView, Settings)
│ │ └── types.ts # TypeScript type definitions
│ └── vite.config.ts # Vite build configuration
├── tests/ # Test suite
├── docs/ # Internal documentation
└── setup.sh # One-click installation script
# Run all tests
python3 -m pytest tests/ -v
# Run specific test file
python3 -m pytest tests/test_contracts.py -v
# Run with coverage
python3 -m pytest tests/ --cov=. --cov-report=htmlcd frontend
# Install dependencies
npm install
# Development mode (hot reload)
npm run dev
# Type checking
npx tsc --noEmit
# Production build
npx vite build- Follow PEP 8 conventions.
- Use type hints for function signatures.
- Add docstrings to public functions and classes.
- Keep functions focused and under 50 lines when possible.
- Use
async/awaitfor I/O-bound operations.
- Use functional components with hooks.
- Define types in
types.tsfor shared interfaces. - Use descriptive variable and component names.
- Keep components focused on a single responsibility.
Follow Conventional Commits:
| Prefix | Use |
|---|---|
feat: |
New feature |
fix: |
Bug fix |
docs: |
Documentation changes |
refactor: |
Code refactoring |
test: |
Adding or updating tests |
chore: |
Build, CI, or tooling changes |
Hivemind uses a multi-agent DAG architecture:
- User Request arrives via the web dashboard.
- PM Agent analyzes the request and creates a task DAG (Directed Acyclic Graph).
- DAG Executor runs tasks in parallel where possible, using specialist agents.
- Specialist Agents (coder, reviewer, architect, etc.) execute individual tasks via Claude Code.
- Orchestrator coordinates everything, manages state, and reports progress back to the dashboard.
Each project has strict file scope isolation — agents can only read/write files within their assigned project directory.
We welcome contributions that use AI tools (GitHub Copilot, Claude, ChatGPT, etc.) to assist with development. However, we require full transparency:
- Disclosure Required. If your PR was substantially generated by AI, you must disclose this in the PR description. Use the label
ai-generatedorai-assisted. - You Own It. Submitting a PR means you have reviewed, tested, and take responsibility for the code — regardless of how it was produced.
- No Bulk AI PRs. Do not submit large, untested, AI-generated PRs that dump code without context. Every PR must include a clear description of what it does and why.
- Quality Standards Apply. AI-generated code must meet the same code style, testing, and review standards as human-written code.
- Automated Bot PRs. Fully automated PRs from bots (without human review) will be closed immediately.
We believe AI is a powerful tool for developers. We just ask that you use it responsibly and transparently.
- Add the agent to
AGENT_REGISTRYinconfig.py:
"my_agent": AgentConfig(
timeout=900,
turns=100,
budget=50.0,
layer="execution", # or "quality"
emoji="\U0001f4a1",
label="My Agent",
tw_color="blue",
accent="#638cff",
),- Add the role to
AgentRoleenum incontracts.py - Add a specialist prompt in
config.py→SPECIALIST_PROMPTS - Add a description in
pm_agent.py→_ROLE_DESCRIPTIONS - Update the org hierarchy in
org_hierarchy.pyif needed
See agent_runtime.py for the runtime abstraction layer. Hivemind supports multiple runtimes:
| Runtime | Description |
|---|---|
| Claude Code | Default — Anthropic Claude Code SDK |
| OpenClaw | Open-source AI agent framework |
| Bash | Direct shell command execution |
| HTTP | External API calls |
To add a new runtime, implement the AgentRuntime interface and register it in RuntimeRegistry.
Each project has a corporate management structure:
CEO (Orchestrator)
├── CTO (PM)
│ ├── VP Engineering → Frontend, Backend, Database
│ ├── VP Quality → Tester, Security, Reviewer
│ └── VP Research → Researcher, UX
└── VP Operations → DevOps
See org_hierarchy.py for the full implementation.
- Agent Runtimes: Adding support for more AI providers (Gemini, GPT, local models)
- Project Templates: New templates (e-commerce, blog, mobile app, CLI tool)
- Testing: Expanding test coverage, especially for the DAG executor and orchestrator
- Documentation: Improving inline code documentation and user guides
- Frontend: UI/UX improvements, accessibility, mobile responsiveness
- Dashboard: New visualizations, org chart improvements, analytics
- Performance: Optimizing the orchestrator for large projects with many parallel tasks
Open a Discussion or reach out via Issues.
Thank you for helping make Hivemind better!