Write clear Conventional Commit messages, use scopes and breaking-change markers consistently, and understand what a linter can check without reading the code change.

The basic structure

A Conventional Commit starts with a type, optional scope, optional exclamation mark and a short description. For example, feat(auth): add passkey registration describes a feature in the authentication area. A body can explain motivation and a footer can contain issue references or BREAKING CHANGE information. The format helps automated release notes, but clarity for human reviewers remains the main objective.

Choose a type consistently

Common types include feat for a new capability, fix for a defect, docs for documentation and refactor for a code change that neither fixes a bug nor adds a feature. Teams may define additional types. A linter should use the repository’s actual policy rather than assume every project accepts the same list.

Scopes and breaking changes

A scope identifies the affected area and should remain stable enough to search. Use the exclamation mark or a BREAKING CHANGE footer when consumers must change their code or configuration. Do not label a change as breaking merely because it is large internally; explain the external impact and migration path.

What a linter cannot know

A text linter can check structure, length and punctuation. It cannot determine whether the stated type matches the diff, whether an issue was truly fixed or whether the message omits a security impact. Reviewers and automated repository checks should compare the message with the code and tests.

Practical examples

Prefer fix(csv): preserve quoted line breaks over fixed bug. Prefer docs(jwt): clarify decoding warning over update readme. Keep the subject imperative and concise, then use the body for context. TXTNimble can format and flag common structural issues locally, but it deliberately does not claim to understand the underlying Git change.

Final review before relying on the result

Keep the original input, compare important values and use the destination system’s own validator or test environment. Privacy-first processing reduces unnecessary disclosure, but it does not replace access controls, professional review or a documented incident process. Use the related TXTNimble tool as a practical aid and record any limitation that affects the decision.

Use the body for reasoning

The subject should state the change concisely, while the body explains why it was needed, important trade-offs and behaviour that reviewers should verify. Wrap lines according to the repository’s convention and separate the body from the subject with a blank line. Avoid copying a ticket title that does not describe the implemented result.

Footers support automation

Footers can reference issues, co-authors and breaking changes. Keep machine-readable tokens consistent with the project’s release tooling. A BREAKING CHANGE entry should explain the affected interface and migration action. Security-sensitive details should follow the organisation’s disclosure process rather than being exposed in a public commit message.

Squashing and generated releases

Teams that squash pull requests often use the final pull-request title as the commit subject. Validate that title before merge and combine useful reasoning from intermediate commits into the final body. Automated changelog tools depend on consistent types and breaking-change markers, but they should not replace human release notes for operational risk, deprecations and manual steps.

Review examples in context

A message such as fix(parser): preserve quoted CSV line breaks is specific and testable. A message such as update code is not. However, a perfectly formatted message can still misrepresent the diff. A linter should report structural issues and offer formatting help without claiming semantic correctness. Pair it with code review, tests and repository-specific contribution guidance.

Document the team convention

Publish the accepted types, scopes, length limits and examples close to the repository. Configure the same rules in local hooks and continuous integration so contributors receive consistent feedback. Review the convention when the product structure changes instead of forcing obsolete scopes or release categories into new work.