Skip to content

Git strategy

Terminal window
kaddo add git-strategy

Installs two files:

  • architecture/git-strategy.md — the human-readable strategy.
  • .kaddo/git.yml — the machine-readable descriptor.

Default strategy

GitHub Flow + Conventional Commits + SemVer.

feature/<work-item-id>-<slug> feat(scope): message vMAJOR.MINOR.PATCH
bugfix/<work-item-id>-<slug> fix(scope): message
hotfix/<work-item-id>-<slug> docs(scope): message
spike/<work-item-id>-<slug> chore(scope): message

Release notes are sourced from Kaddo Work Items + Conventional Commits.

Customization

The default is a recommendation, not a rule. Edit .kaddo/git.yml to switch strategy — github-flow, gitflow, trunk-based or custom — and adjust branch naming, commit convention and tag pattern.

strategy: github-flow
branchNaming:
pattern: "{type}/{workItemId}-{slug}"
commits:
convention: conventional-commits
requireWorkItemReference: true
tags:
strategy: semver
pattern: "v{version}"

Other strategies

Copy one of these into .kaddo/git.yml as a starting point and adjust the patterns to match how your team actually works. All fields are descriptive — Kaddo reads them as documentation, it does not act on them.

Git Flow

Long-lived main/develop with release/* and hotfix/* branches.

strategy: gitflow
branchNaming:
pattern: "{type}/{workItemId}-{slug}"
mainBranch: main
developBranch: develop
releasePrefix: release/
hotfixPrefix: hotfix/
commits:
convention: conventional-commits
requireWorkItemReference: true
tags:
strategy: semver
pattern: "v{version}"
release:
notesFrom:
- work-items
- conventional-commits

Trunk-based

Short-lived branches merged into a single trunk; releases are tagged off the trunk.

strategy: trunk-based
branchNaming:
pattern: "{workItemId}-{slug}"
mainBranch: main
maxBranchLifetimeDays: 2
commits:
convention: conventional-commits
requireWorkItemReference: true
tags:
strategy: semver
pattern: "v{version}"
release:
notesFrom:
- conventional-commits

Custom

Bring your own conventions — for teams that do not follow a named model.

strategy: custom
branchNaming:
pattern: "{team}/{workItemId}-{slug}"
commits:
convention: custom
requireWorkItemReference: false
tags:
strategy: calver
pattern: "{YYYY}.{MM}.{patch}"
release:
notesFrom:
- work-items

Kaddo does not enforce the strategy in CI, and never creates branches or tags for you. Refine the strategy with the git-strategy-agent in your LLM.