This repo follows Conventional Commits to keep history readable and make changelogs/releases easier.
git config core.hooksPath .githooks<type>(<scope>): <short summary>
<body: what/why/how (optional, but recommended for non-trivial changes)>
<footer: references/issues/breaking changes (optional)>
- type: what kind of change this is (required)
- scope: area/module affected (optional, but recommended)
- short summary: imperative, present tense (required)
- body: explain context, motivation, and how to test (optional)
- footer: references like issue IDs, or breaking changes (optional)
Use one of these types:
feat: new feature / new template capabilityfix: bug fixchore: tooling, housekeeping, dependency bumps (no functional change)refactor: code change that neither fixes a bug nor adds a featuredocs: documentation onlytest: add/update testsci: CI/CD changesperf: performance improvementsbuild: build system changes (Makefile, build scripts)
Use when you add new functionality or a new template capability.
Examples:
feat(hexagonal): add health check endpoint templatefeat(hooks): add root pre-commit runner for templatesfeat(car-parking-system): add docker compose for local postgres
Example with body:
feat(hooks): add root pre-commit runner for templates
Runs template hooks once per folder based on staged paths.
How to test: stage a file under go/hexagonal/car-parking-system and run .githooks/pre-commit.
Use when you correct behavior that was wrong.
Examples:
fix(hooks): handle filenames with spaces in staged pathsfix(make): use 'makefile' when Makefile is lowercasefix(car-parking-system): correct module path in go.mod
Use for housekeeping changes that don’t add features or fix bugs.
Examples:
chore(deps): bump Go version in templateschore(make): simplify local dev targets
Use when you restructure code/scripts without changing behavior.
Examples:
refactor(hooks): extract run_hook_if_exists into helperrefactor(car-parking-system): reorganize internal packages
Use when you change only docs.
Examples:
docs(readme): document commit message rulesdocs(car-parking-system): add local setup steps
Use when you add/update tests only.
Examples:
test(car-parking-system): add handler tests for parking flowtest: add hook runner tests
Use for changes to GitHub Actions/workflows/pipelines.
Examples:
ci: add golangci-lint workflowci: run hooks on pull requests
Use when you improve performance.
Examples:
perf(hooks): skip scan when no staged filesperf(make): parallelize lint targets
Use for changes to build tooling (Makefile, build scripts, docker build).
Examples:
build(make): add pre-commit target for lint and testbuild(docker): update build args
Scopes are optional, but recommended. Examples:
hooks,make,docs,hexagonal,car-parking-system,docker,config
- Keep the subject line under ~72 characters when possible.
- Use the imperative mood (e.g., "add", "fix", "update").
- For breaking changes, add a footer like:
BREAKING CHANGE: <describe what changed and migration steps>