How it works
The path from your history and staged diff to one message.
The pipeline
- Read gitThe log, the branch name and
git diff --staged, through thegitbinary so your git config applies. - Infer the styleConvention, types, scopes, ticket format and examples, from the commit subjects. Messages are always in English.
- Compact the diffFiles are classified and fitted into a token budget, by priority.
- Build the promptA system and a user message, within the device's prompt limit.
- Ask the modelOn the chosen device, with greedy decoding and explicit parameters.
- SanitizeFences, quotes, preambles and long subjects are cleaned up; bad replies are rejected.
Failures and fallbacks
A bad reply gets one retry, then a message built from the file list. A merge, a revert or a cherry-pick keeps the message git prepared, and a commit of lockfiles only is written from the file list. Neither loads the model. An error in the hook becomes a warning, and the commit goes on.
The full description is in the architecture guide.