Skip to content

Conventional Commits

twig's save command follows the Conventional Commits specification. This page explains the format and how twig assembles commit messages.

Format

<emoji> <type>(<scope>:<ticket>): <message>

All parts except <type> and <message> are optional:

1
2
3
๐ŸŽ‰ feat(api:SHIP-2416): add user authentication endpoint
๐Ÿ› fix(api): handle null response from auth service
๐Ÿงน chore: bump dependencies

Types

Type Emoji Meaning
feat ๐ŸŽ‰ New behaviour or capability
fix ๐Ÿ› Something broken is now fixed
chore ๐Ÿงน Maintenance, config, deps, refactor, CI
test ๐Ÿงช Adding or updating tests
docs ๐Ÿ“š Documentation only

Scopes

The scope identifies what part of the codebase the commit touches. It's project-specific โ€” twig doesn't enforce any particular scopes. Examples: api, infra, ci, auth, db.

Configure frequently-used scopes as pinned so they always appear at the top of the picker:

[save.scopes]
pinned = ["api", "infra", "ci", "docs"]

Why conventional commits

  • Machine-readable โ€” tools like goreleaser use commit types to generate changelogs and determine version bumps automatically
  • Scannable โ€” git log becomes useful at a glance
  • Self-documenting โ€” the type and scope explain intent without reading the diff