Skip to main content

Commit message specification

Commit format for docs-portal, aligned with LibESys repository policy (adapted from esysdox-ops and superbuild-workflow). 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
buildDocusaurus build config, site packaging, deploy prep
choreRepo hygiene, hooks, dependency bumps
ciGitLab CI or publish automation
docsPortal or common documentation
featNew workflow section, sync tooling, site capability
fixCorrections to portal config, sync, or published docs
perfBuild or site performance (rare)
refactorRestructure without semantic change
revertRevert a prior commit
styleFormatting only
testTests only (rare in this repo)

portal, docusaurus, sync, superbuild, common, hooks, ci, repo

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

Subject style

  • Imperative mood: Bootstrap docs portal, not Bootstrapped…
  • Start with uppercase after :
  • No trailing period

Examples:

feat: Bootstrap ai workflows docs portal
docs(portal): Document sync and publishing model
feat(superbuild): Sync workflow docs and extend sidebar
chore(hooks): Add pre-commit and gitlint for commit messages
ci: Add GitLab Pages build job

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

./scripts/setup-dev.sh
# Windows:
# .\scripts\setup-dev.ps1

Or manually:

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

See Development workflow and Commit checklist.