Skip to main content

Commit message specification

Commit format for superbuild-workflow, aligned with LibesSys repository policy (adapted from esysdox-ops). Enforced locally via gitlint and pre-commit (commit-msg hook).

Goals

  • Readable history (git log --oneline)
  • Consistent intent via type and optional scope
  • Explicit AI assistance and breaking changes
  • Block policy-breaking messages before they land on protected branches

Message structure

<title line>

<optional body>

<optional footers>
  • Blank line between title and body
  • Blank line between body and footers
  • Title ≤ 72 characters
  • Body/footer lines ≤ 100 characters

Title line

[WIP: ]<type>[<scope>][!]: <subject>

Allowed types

TypeUse for
buildBuild or toolchain policy docs (CMake/Conan workflow)
choreRepo hygiene, hooks, submodule pointers
ciGitLab CI or automation
docsDocumentation and templates
featNew policy, templates, or workflow capability
fixCorrections to policy, adapters, or docs
perfPerformance-related policy (rare)
refactorRestructure without semantic policy change
revertRevert a prior commit
styleFormatting only
testTests only (rare in this repo)

docs, cursor, templates, repo, migration, governance, hooks

Rules: lowercase; characters a-z, 0-9, ., _, /, -.

Subject style

  • Imperative mood: Add migration checklist, not Added…
  • Start with uppercase after :
  • No trailing period

Examples:

feat(migration): Add legacy superbuild migration specification
docs: Record confirmed migration decisions (Conan 2, macOS)
fix(cursor): Align repo-layout adapter with repository-layout doc
chore(hooks): Add pre-commit and gitlint for commit messages

Footers

AI: (optional)

ValueMeaning
yesAI-assisted
noNo AI assistance
perplexityPrimarily Perplexity
copilotPrimarily GitHub Copilot
mixedMultiple tools or substantial human edit

At most one AI: footer per commit.

BREAKING CHANGE:

Required when the title includes ! after type/scope.

Co-authored-by:

Standard Git trailer when appropriate.

WIP commits

WIP: prefix allowed on topic branches only — not on develop, master, main, release/*, or hotfix/*.

Git author

Commits must list the human operator as author, even when Cursor or other AI helped. Record AI help via AI: footer and/or Co-authored-by: Cursor <cursoragent@cursor.com>. Do not use a bot address as sole Author:.

Validation

RuleValue
Title max length72
Body line max length100
Title regexSee .gitlint
AI: valuesyes, no, perplexity, copilot, mixed
WIP: on protected branchesForbidden

Setup

pip install pre-commit
pre-commit install
pre-commit install --hook-type commit-msg

See development-workflow.md and commit-checklist.md.