Skip to content

Contribution guide

We follow a commit style similar to the Go project. Please keep commits:

  • atomic: each commit should represent one logical change
  • descriptive: the commit message should clearly describe what the change does and why it’s needed
<service/top-level directory>/<affected package/directory>: <short summary of change>
Optional longer description can go here, if necessary. Explain what the
change does and why, especially if not obvious. Reference relevant
issues or PRs when applicable. These can be links for now since we don't
auto-link issues/PRs yet.

Here are some examples:

bobbin/xrpc: fix cursor overflow in listIssues
The cursor was parsed as u32, so offsets past 4 billion wrapped
around and returned the first page again.
knot2/knot-ssh: improve error checking in upload-pack
  • PRs get merged “as-is” (fast-forward)—like applying a patch-series using git am. At present, there is no squashing—so please author your commits as they would appear on master, following the above guidelines.
  • If there is a lot of nesting, for example “web: src/lib/components/repo: …”, it can be truncated to “web: repo: …”. If the change affects many subdirectories, you may abbreviate to just the top-level name, e.g. “spindle: …” or “knot2: …”. Use “all:” for tree-wide changes.
  • The prefix must name a real top-level path. Conventional-commit prefixes such as fix: or feat: are rejected by the commit-lint CI check (.tangled/hooks/commit-msg-lint.sh).
  • Keep commits lowercased with no trailing period.
  • Use the imperative mood in the summary line (e.g., “fix bug” not “fixed bug” or “fixes bug”).
  • Keep the summary line under 76 characters.
  • Follow the same formatting for PR titles if filled manually.
  • Don’t include unrelated changes in the same commit.
  • Avoid noisy commit messages like “wip” or “final fix”—rewrite history before submitting if necessary.

Go, Rust and Nix are formatted with treefmt: run nix fmt (or treefmt in the devshell). The web app formats with its own pinned Prettier: run pnpm format in web/.

Small fixes like typos, minor bugs, or trivial refactors can be submitted directly as PRs.

For larger changes—especially those introducing new features, significant refactoring, or altering system behavior—please open a proposal first. This helps us evaluate the scope, design, and potential impact before implementation.

Create a new issue titled:

proposal: <affected scope>: <summary of change>

In the description, explain:

  • What the change is
  • Why it’s needed
  • How you plan to implement it (roughly)
  • Any open questions or tradeoffs

We’ll use the issue thread to discuss and refine the idea before moving forward.

We require all contributors to certify that they have the right to submit the code they’re contributing. To do this, we follow the Developer Certificate of Origin (DCO).

By signing your commits, you’re stating that the contribution is your own work, or that you have the right to submit it under the project’s license. This helps us keep things clean and legally sound.

To sign your commit, just add the -s flag when committing:

git commit -s -m "your commit message"

This appends a line like:

Signed-off-by: Your Name <your.email@example.com>

We won’t merge commits if they aren’t signed off. If you forget, you can amend the last commit like this:

git commit --amend -s

If you’re submitting a PR with multiple commits, make sure each one is signed.

For jj users, you can run the following command to make it sign off commits in the tangled repo:

# Safety check, should say "No matching config key..."
jj config list templates.commit_trailers
# The command below may need to be adjusted if the command above returned something.
jj config set --repo templates.commit_trailers "format_signed_off_by_trailer(self)"

Refer to the jujutsu documentation for more information.