Skip to content

0010: Require a reason and an Effect in every commit ​

Status: accepted

Date: 2026-12-04

PR: #10

Context ​

The pull request description and the risk scan read the commit messages. They need each commit to say why it matters and what it does to the behavior of the repository. Before this decision, scopes such as chore(deps) were already banned.

Options considered ​

  • Allow scopes as well as trailers: the repository had already banned scopes.

Decision ​

Each commit message uses a Conventional Commits type with no scope, and it has a body that says why. The types include instruction. Each commit ends with exactly one Effect: trailer: none, additive, modify or remove. The type limits the Effect, and commitlint checks both. commitlint allows only the trailers in tools/prisk/message.ts. The risk scan finds a dependency commit by its files, not by a scope.

Consequences ​

Each commit says what it does to behavior, so the risk scan can verify the claim. A commit with the wrong label fails on the computer of the author, before CI runs the slower checks. The reason for a change stays next to it, for reviewers and future readers.

Code ​