Thank you for your interest in contributing to agit! This guide will help you get started.
agit is an infrastructure-aware Git orchestration tool for AI agents. We welcome contributions of all kinds: bug fixes, new features, documentation improvements, and MCP tool/resource additions.
git clone https://github.com/fathindos/agit.git
cd agit
go mod tidy
make build
./agit init
./agit add /path/to/any/git/repo
./agit reposRequires Go 1.23 or later.
| Directory | Purpose |
|---|---|
cmd/ |
CLI command definitions (Cobra) |
internal/registry/ |
SQLite-backed registry for repos, worktrees, tasks, agents |
internal/git/ |
Git operations (worktrees, merging, diffs) |
internal/mcp/ |
MCP server (tools, resources, server factory) |
internal/conflicts/ |
Cross-worktree conflict detection |
internal/config/ |
Configuration management |
internal/hooks/ |
Lifecycle hook runner (async execution with timeout) |
internal/update/ |
Self-update and version checking |
docs/ |
Architecture spec and integration guides |
See the architecture specification for detailed design.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Run tests:
make test - Run linter:
make lint(requires golangci-lint) - Commit with a descriptive message following conventional commits
- Push and open a PR
- Follow standard Go conventions (
go fmt,go vet) - Use
golangci-lintwith the project's.golangci.ymlconfig - Keep functions focused and under 50 lines where possible
- Add comments for exported functions
- Write tests for new functionality
Use conventional commits:
feat: add SSE transport supportfix: handle empty repos in spawndocs: update MCP tool descriptionstest: add conflict detection testsci: update Go version matrixrefactor: simplify worktree cleanup logicchore: update dependencies
Keep the first line under 72 characters. Reference issues when applicable: feat: add task priority (#42)
- PRs should address a single concern
- Include tests for new features
- Update documentation if behavior changes
- Fill out the PR template completely
Use the issue templates to report bugs, request features, or propose new MCP tools. Please include:
- agit version (
agit --version) - Operating system
- Go version (if building from source)
- Steps to reproduce
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.