Thank you for your interest in contributing. This document explains how to get involved, what we expect, and how to get your changes merged.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Commit Conventions
- Pull Request Process
- Code Style
- Testing
- Documentation
This project follows the Contributor Covenant Code of Conduct. By participating, you agree to uphold these standards.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/dot.git cd dot - Add the upstream remote:
git remote add upstream https://github.com/version14/dot.git
- Follow the Development Setup section below and docs/contributor/getting-started.md.
- Go 1.26+ (
go version) giton$PATHgolangci-lint(for linting):brew install golangci-lintor see golangci-lint docs
make build # produces bin/dot
./bin/dot versionmake validate # fmt → vet → lint → testmake test-flows # runs test-flow against all testdata fixtures (skips test commands)See docs/contributor/test-flow.md for the full guide.
Before opening an issue:
- Search existing issues to avoid duplicates.
- Make sure you are on the latest version (
git pull upstream main).
When opening a bug report, include:
- Steps to reproduce
- Expected vs actual behavior
- Your environment (OS, Go version,
dot version) - Relevant logs or error output
Open a Feature Request issue with:
- A clear description of the problem the feature solves
- Your proposed solution
- Alternatives you considered
Features that align with the project architecture and roadmap are more likely to be accepted.
Git hooks validate commit messages locally before they are created. Activate them once after cloning:
make hooksOr manually:
git config core.hooksPath .githooks
chmod +x .githooks/commit-msg-
Create a branch from
main:git checkout main git pull upstream main git checkout -b feat/your-feature-name
-
Make your changes following the Code Style guidelines.
-
Write or update tests — every new behavior needs a test. If you changed a flow or generator, add or update a
test-flowfixture (see docs/contributor/test-flow.md). -
Update documentation — see Documentation for the rules.
-
Run validation locally:
make validate make test-flows
-
Commit following Commit Conventions.
-
Push and open a Pull Request:
git push origin feat/your-feature-name
Before submitting the PR, verify:
- All validations pass (
make validate) - Commits follow Conventional Commits
- Tests pass (
make test) -
test-flowsfixtures pass (make test-flows) - Documentation is updated (see Documentation rules)
We follow Conventional Commits format. Messages are validated both locally (via git hook) and in CI.
<type>(<scope>): <description>
[optional body]
[optional footer]
| Type | When to use |
|---|---|
feat |
New feature or behavior |
fix |
Bug fix |
docs |
Documentation only |
style |
Code style (formatting, semicolons) |
refactor |
Code change with no behavior change |
perf |
Performance improvement |
test |
Adding or updating tests |
chore |
Tooling, dependencies, config |
ci |
CI/CD changes |
revert |
Revert a previous commit |
Scope (optional): the area affected, e.g. flow, generator, cli, plugin, spec.
feat(flow): add IfQuestion conditional node
fix(resolver): preserve loop iteration invocations after dedup
docs(test-flow): document loop fixture schema
refactor(cli): extract Scaffold into ScaffoldOptions struct
test(generator): add validator round-trip tests
chore: upgrade huh to v1.0.1
- Type is required (lowercase)
- Scope is optional (lowercase)
- Description starts with lowercase, no period at end
- Max 100 characters for the subject line
- Use imperative mood ("add" not "adds")
- Reference issues in the footer:
Closes #42
- One PR per concern — don't mix unrelated changes
- Fill the PR template — describe what changed and why
- Keep diffs small — large PRs are hard to review; split if needed
- All CI checks must pass before merging
- Address review comments — iterate on feedback
PRs are merged by maintainers once they have one approving review and all checks are green.
- Standard Go style:
gofmt-formatted, idiomatic. - No
internal/*imports frompkg/orplugins/— usepkg/dotapiandpkg/dotplugin. - Error messages: lowercase, no trailing period, wrap with
%wfor context. - No
panicin library code (only inmainor test setup). - Keep functions short. If a function needs a comment to explain what it does, consider splitting it.
Run make fmt and make lint before committing.
Every PR should maintain or improve existing test coverage.
make test # go test -race ./...Critical areas that require table-driven tests:
internal/flow/— question branching, engine traversalinternal/generator/— resolver dedup, topo-sort, validatorinternal/versioning/— semver parsing and constraint matchinginternal/spec/— spec serialization round-trips
make test-flows # go run ./tools/test-flow -skip-testEvery flow change needs a matching fixture. See docs/contributor/test-flow.md.
The docs/ directory is the single source of truth. Read docs/README.md for the full documentation rules.
Summary of when to update docs in a PR:
| Change | Required update |
|---|---|
| New CLI command or flag | docs/user/cli-reference.md |
| New flow | docs/contributor/authoring-flows.md + test fixture |
| New question type | docs/contributor/authoring-flows.md + docs/contributor/architecture.md |
| New injection kind | docs/contributor/authoring-plugins.md |
New exported type in pkg/dotapi or pkg/dotplugin |
docs/contributor/authoring-generators.md or docs/contributor/authoring-plugins.md |
| New generator | Create docs/contributor/generators/<name>.md (copy docs/contributor/generators/_template.md) + update docs/README.md |
| New plugin | Create docs/contributor/plugins/<name>.md (copy docs/contributor/plugins/_template.md) + update docs/README.md |
| New flow | Create docs/contributor/flows/<id>.md (copy docs/contributor/flows/_template.md) + update docs/README.md |
| Generator manifest fields change | docs/contributor/generators/<name>.md |
| Plugin injection IDs change | docs/contributor/plugins/<name>.md + affected test fixtures |
| Pipeline step change | docs/contributor/architecture.md |
.dot/ schema change |
docs/contributor/architecture.md |
New test-flow flag |
docs/contributor/test-flow.md |
| Install mechanism change | docs/user/getting-started.md |
Documentation updates use the docs commit type:
docs(authoring-flows): document IfQuestion conditional node
Open a Discussion or read the docs/.