Development setup
Prerequisites
- Go 1.26 or higher
- Task 3.44 or higher
- golangci-lint
- An API key for at least one AI provider
macOS and Linux are fully supported for development. On Windows, use
task build-local to build via Docker instead of building natively.Build from source
Development commands
| Command | Description |
|---|---|
task build | Build the binary to ./bin/docker-agent |
task test | Run all tests (clears API keys for determinism) |
task lint | Run golangci-lint |
task format | Format code |
task dev | Run lint, test, and build in sequence |
task build-local | Build for local platform via Docker |
task cross | Cross-platform builds (linux, darwin, windows — amd64 and arm64) |
task build-image | Build the Docker image |
Dogfooding
docker-agent can help you work on docker-agent itself. The repository includes a specialized Go developer agent:Code style
The project usesgolangci-lint with a strict configuration. If task lint passes, your code meets the project’s style requirements.
Key conventions:
- Wrap errors with context:
fmt.Errorf("context: %w", err) - Pass
context.Contextas the first parameter in all functions that may block - Use
slogfor structured logging - Use the functional options pattern for constructors
- In tests: use
t.Context(),t.TempDir(),t.Setenv(), andt.Parallel()
Config schema
Agent configs follow a strict versioned JSON schema (agent-schema.json). When adding new config fields:
- Add them only to
pkg/config/latest— older version packages are frozen - Update
agent-schema.jsonaccordingly - Create an example YAML that demonstrates the new feature
Submitting a pull request
Write and test your changes
Follow the code style guidelines above. Run
task lint and task test before committing.Sign your commits (DCO required)
All contributions require a Developer Certificate of Origin sign-off:
Opening issues
File issues on the GitHub issue tracker.- Use the included issue template
- Search for existing issues before opening a new one
- Issues are for bugs and feature requests only — not general support questions
Community
Join the conversation on Slack for questions and discussion.Code of conduct
- Be courteous — No abuse of any kind is tolerated.
- Encourage diversity — Make everyone feel welcome regardless of background.
- Stay on topic — Post in the right channel and keep discussions focused.
- Keep it legal — Share only content you own.