Contributing
Thank you for your interest in contributing to event-spec!
Development setup
Prerequisites
| Tool | Version | Purpose |
|---|---|---|
| Go | 1.26+ | Core runtime and CLI |
| golangci-lint | latest | Go linting |
| lefthook | latest | Git hooks |
| Node.js | 18+ | TypeScript SDK |
| pnpm | 8+ | TypeScript package manager |
Setup
git clone https://github.com/dejanradmanovic/event-spec.git
cd event-spec
# Download Go dependencies and install dev tools (golangci-lint, lefthook, pnpm + TypeScript deps)
go mod download
make install-tools
# Install git hooks
make hooks
Makefile targets
| Target | Description |
|---|---|
make build | Compile the CLI binary |
make test | Run all Go tests |
make test-cover | Run tests with HTML coverage report |
make lint | Run golangci-lint |
make fmt | Format Go source files |
make vet | Run go vet |
make tidy | Tidy and verify Go modules |
Git hooks (lefthook)
- pre-commit — runs
go fmtandgo veton staged files - pre-push — runs the full test suite and linter
If a hook blocks you unexpectedly, investigate the root cause rather than bypassing with --no-verify.
Code conventions
- Follow standard Go idioms (the linter enforces most of this)
- No comments explaining what the code does — only why when it's non-obvious
- No error handling for impossible cases — trust internal invariants
- Tests should use
testutil.CaptureProviderfor integration tests, not mocks
Pull request process
- Fork the repository and create a branch from
main - Write tests for any new functionality
- Ensure
make test && make lintpasses - Open a PR with a clear description of what changed and why
Areas to contribute
- New providers — See Adding Providers
- New SDK languages — See Adding SDKs
- Hook implementations —
hooks/loggingandhooks/otelare planned but not implemented - Documentation — improvements to this site are always welcome
License
event-spec uses a split license model: AGPL-3.0 for the platform (CLI, registry server,
codegen engine) and Apache-2.0 for the client libraries (analytics/, provider/,
hooks/, sdk/). See the License page for the full breakdown and rationale.
By submitting a pull request you agree that your contribution will be licensed under whichever license applies to the directory you are contributing to. You retain copyright on your own work.