commits
Commit messages: a conventional type, an optional scope, a first line of 72 characters or fewer, and a wrapped body.
Selected when
Section titled “Selected when”Always.
Checks
Section titled “Checks”commitlint
Section titled “commitlint”Checks a new commit message for a conventional type, an optional known scope, a first line of 72 characters or fewer, and a wrapped body.
Runs at the message stage, only at the all level.
Release notes, blame, and bisect depend on typed, scoped subjects, and a free-form message hides the change.
What to do
Section titled “What to do”Write <type>: <subject> or <type>(<scope>): <subject> in a first line of 72 characters or fewer, with ! before the colon for a breaking change. Leave a blank line after the first line, and keep each line of the body within the same length. Change the accepted types with gspot set commits.types.
Example
Section titled “Example”The message changed stuff has no type or scope. Write fix(cli): report missing configuration instead.
Turn it off
Section titled “Turn it off”gspot ignore commits/commitlint --paths "<path>" --reason "<why>"gspot ignore commits/commitlint --rule <rule> --reason "<why>"references
Section titled “references”Checks a new commit message for AI session links, finding IDs, plan steps, home folder paths, markers that stop CI, and Refs: or Closes: footers with no issue number.
Runs at the message stage.
A reader of the history cannot open a chat session, a private finding, or a plan step, and a session link shares the chat with everyone who can read the repository.
What to do
Section titled “What to do”Remove the line that the finding names.
Example
Section titled “Example”The trailer Claude-Session: https://claude.ai/code/session_01Abc reports session-link. Remove the line, and describe the change in the message itself.
Lint rules
Section titled “Lint rules”| Rule | What it checks | What to do |
|---|---|---|
session-link |
No line of the commit message links to an AI chat session. | Remove the link, and describe the change in the message itself. |
finding-id |
No line names a finding ID, such as AB12-SEC-3. |
Replace the ID with a description of the change. |
plan-step |
No line names a step of a plan, such as step 2.1. |
Replace the step with a description of the change. |
home-path |
No line names a path inside a home folder, such as /home/<name>/. |
Write the path from the repository root. |
issue-footer |
A Refs: or Closes: footer names an issue number. |
Add the issue number, such as Closes: #42, or delete the footer. |
ci-skip |
No line holds a marker that stops CI, such as [skip ci]. |
Delete the marker, so that CI runs on the commit. |
Turn it off
Section titled “Turn it off”gspot ignore commits/references --paths "<path>" --reason "<why>"gspot ignore commits/references --rule session-link --reason "<why>"commitlint-pushed
Section titled “commitlint-pushed”Checks the message of each commit in a push. A manual run covers every commit from the upstream merge base to HEAD.
Runs at the push stage, only at the all level.
A message written past the hook (--no-verify, a rebase, or a merge) still reaches the shared branch unless the push checks it.
What to do
Section titled “What to do”Reword the commits that fail with git rebase -i, or change the rule with gspot set tools.commitlint.rules. To accept a finding, this check needs its own [[ignore]] record, because one for commits/commitlint does not cover it.
Example
Section titled “Example”A commit with the message changed stuff in the push fails. Reword it as fix(cli): report missing configuration, and coordinate first when others share that history.
Turn it off
Section titled “Turn it off”gspot ignore commits/commitlint-pushed --paths "<path>" --reason "<why>"gspot ignore commits/commitlint-pushed --rule <rule> --reason "<why>"Settings
Section titled “Settings”| Setting | What it sets |
|---|---|
commits.types |
The commit types the type-enum rule allows. |
commits.scopes |
The commit scopes that a message may use. A message may also leave out its scope. When empty, gspot allows the last folder name of each [[scope]] path, or any commit scope when gspot.toml has no [[scope]]. |
tools.commitlint.rules |
Options for active commitlint rules, by rule name: an always/never condition and an optional value, without a severity; the level decides which rules run. Ignore a finding with gspot ignore commits/commitlint --rule <rule> --reason "<why>". |
Rules for coding agents
Section titled “Rules for coding agents”| Rule file | Installed when |
|---|---|
.gspot/rules/GIT.md |
Always |
Tools and versions
Section titled “Tools and versions”| Tool | Version |
|---|---|
| commitlint | 21.2.3 |
Files gspot writes
Section titled “Files gspot writes”.gspot/configurations/commits/commitlint.json