Thank you for your interest in contributing to DevTeam! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- Project Structure
- Contributing Guidelines
- Creating Agents
- Adding Commands
- Writing Tests
- Pull Request Process
- Style Guide
Be respectful, inclusive, and constructive. We're all here to build something great together.
- Bash 4.0+ (macOS users:
brew install bash) - SQLite3 (
brew install sqlite3orapt-get install sqlite3) - Claude Code CLI installed and configured
- Git for version control
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/devteam.git
cd devteam# Create the .devteam directory structure
mkdir -p .devteam/memory
# Initialize the database (auto-created on first use, or manually):
# Linux/macOS
./scripts/db-init.sh
# Windows
# powershell ./scripts/db-init.ps1
# Run the test suite to verify setup
./tests/run-tests.sh# Set log level for verbose output
export DEVTEAM_LOG_LEVEL=debug# Source the scripts and test
source ./scripts/state.sh
generate_session_id # Should output: session-YYYYMMDD-HHMMSS-hexcharsdevteam/
├── agents/ # AI agent definitions (91 agents)
│ ├── core/ # Core orchestration agents
│ ├── specialized/ # Domain-specific agents
│ ├── quality/ # Quality assurance agents
│ └── ...
├── commands/ # Slash command implementations
├── skills/ # Capability modules
├── hooks/ # Git and system hooks
├── scripts/ # Shell scripts for state management
│ ├── lib/ # Shared libraries
│ ├── state.sh # Session state management
│ ├── events.sh # Event logging
│ └── db-init.sh # Database initialization
├── tests/ # Test suite
├── docs/ # Documentation
└── .devteam/ # Runtime data (gitignored)
- Bug fixes with test coverage
- New agents for specialized domains
- Documentation improvements
- Performance optimizations
- Security enhancements
- Breaking changes to existing APIs
- Changes without tests
- Large PRs without discussion
- Commits with sensitive data
Agents are the core of DevTeam. Here's how to create a new one:
| Category | Purpose |
|---|---|
core/ |
Orchestration, planning, execution |
specialized/ |
Domain-specific expertise |
quality/ |
Testing, verification, review |
language/ |
Language-specific implementations |
framework/ |
Framework-specific knowledge |
# Copy the template
cp agents/templates/base-agent.md agents/specialized/my-new-agent.mdEvery agent must include these sections:
# Agent Name
## Role
Brief description of what this agent does.
## Capabilities
- Capability 1
- Capability 2
## When to Use
Describe scenarios when this agent should be selected.
## Instructions
Detailed instructions for the agent's behavior.
## Output Format
Expected output structure.
## Examples
Concrete examples of agent behavior.Add your agent to agent-registry.json:
{
"agents": [
{
"id": "specialized:my-new-agent",
"name": "My New Agent",
"description": "Brief description of what this agent does",
"file": "agents/specialized/my-new-agent.md",
"model": "sonnet",
"category": "specialized"
}
]
}Agent schema fields:
| Field | Required | Description |
|---|---|---|
id |
Yes | Unique identifier (format: category:name) |
name |
Yes | Human-readable name |
description |
Yes | Brief description of capabilities |
file |
Yes | Path to agent markdown file |
model |
No | Model tier: opus, sonnet, or haiku (default: sonnet) |
category |
Yes | Agent category for organization |
# Run agent-specific tests
./tests/test-agent.sh my-new-agentCommands are user-facing slash commands.
# Create in commands directory
touch commands/my-command.md# /devteam:my-command
## Description
What this command does.
## Usage/devteam:my-command [options]
## Options
- `--flag`: Description
## Examples
/devteam:my-command --flag value
## Implementation
[Agent instructions for executing this command]
Add to agent-registry.json:
{
"commands": [
{
"name": "my-command",
"description": "Brief description",
"path": "commands/my-command.md"
}
]
}All contributions should include tests.
tests/
├── run-tests.sh # Main test runner
├── test-state.sh # State management tests
├── test-events.sh # Event logging tests
├── test-validation.sh # Input validation tests
└── test-agents/ # Agent-specific tests#!/bin/bash
# tests/test-my-feature.sh
source "$(dirname "$0")/../scripts/lib/common.sh"
source "$(dirname "$0")/test-helpers.sh"
test_my_feature() {
# Arrange
local input="test value"
# Act
local result=$(my_function "$input")
# Assert
assert_equals "expected" "$result" "my_function should return expected"
}
# Run tests
run_test test_my_feature# Run all tests
./tests/run-tests.sh
# Run specific test file
./tests/test-state.sh
# Run with verbose output
DEVTEAM_LOG_LEVEL=debug ./tests/run-tests.shgit checkout -b feature/my-feature- Write code
- Add tests
- Update documentation
# Run all tests
./tests/run-tests.sh
# Check shell scripts with shellcheck (if available)
shellcheck scripts/*.sh scripts/lib/*.shgit commit -m "feat: Add new agent for X functionality
- Add agent definition in agents/specialized/
- Register in plugin.json
- Add tests for agent selection
- Update documentation"git push -u origin feature/my-feature
# Then create PR on GitHub## Summary
Brief description of changes.
## Changes
- Change 1
- Change 2
## Testing
- [ ] Added unit tests
- [ ] Ran full test suite
- [ ] Tested manually
## Documentation
- [ ] Updated relevant docs
- [ ] Added inline comments where needed#!/bin/bash
# Script description
# Usage: script.sh [options]
set -euo pipefail
# Constants in UPPER_SNAKE_CASE
readonly MY_CONSTANT="value"
# Functions in lower_snake_case with documentation
# Args: param1 - description
# Returns: description
my_function() {
local param1="$1"
# Validate inputs
if [ -z "$param1" ]; then
log_error "param1 required"
return 1
fi
# Implementation
echo "$param1"
}- Always use
set -euo pipefailfor error handling - Validate all inputs before use
- Use
localfor function variables - Document function parameters and return values
- Escape SQL values using
sql_escape()function - Use structured logging via
log_info(),log_error(), etc.
- Use clear, imperative language
- Include concrete examples
- Define output format precisely
- List all capabilities explicitly
| Type | Convention | Example |
|---|---|---|
| Agents | kebab-case | code-reviewer.md |
| Commands | kebab-case | run-tests.md |
| Scripts | kebab-case | db-init.sh |
| Functions | snake_case | get_current_session() |
| Constants | UPPER_SNAKE | MAX_ITERATIONS |
| Variables | snake_case | session_id |
- Never commit secrets - Use environment variables
- Validate all user input - Use validation functions
- Escape SQL values - Use
sql_escape()always - Check file paths - Validate before operations
- Use shellcheck - Lint your shell scripts
- Issues: Open a GitHub issue for bugs or features
- Discussions: Use GitHub Discussions for questions
- Documentation: Check
/docsfor detailed guides
Contributors will be recognized in:
- The CONTRIBUTORS.md file
- Release notes for significant contributions
- The project README for major features
Thank you for contributing to DevTeam!