How it works
The pipeline, the type rules and how the model is used.
staged diff
│
▼
[1] Parse files, hunks, renames, binary files, permission changes
[2] Classify source, test, docs, CI, config, lockfile, generated, ...
[3] Detect type rules decide when they can (only docs changed → docs)
[4] Infer scope from paths and your scopeFromPaths
[5] Summarize bounded size; noise listed but never included
[6] Secret scan before any remote call; abort or redact
[7] Generate the model writes descriptions as structured JSON
[8] Validate type, scope, length, ticket, commitlint; regenerate on failure
│
▼
suggestions
Type detection
When the rules are certain, the model must use their answer:
| Staged changes | Type |
|---|---|
| Only tests | test |
Only docs (including examples/) | docs |
| Only CI config | ci |
| Only package manifests or lockfiles | chore |
| Version bump plus changelog | chore |
| Only tooling config (tsconfig, eslint, Docker, ...) | chore |
| Only file permissions | chore |
| Only whitespace or formatting | style |
| Files moved or renamed without edits | refactor |
Otherwise the rules make a best guess (for example feat for new exported functions, or fix for a small edit mentioning a null check or crash), and the model may override it based on what the code actually does.
Talking to the model
- OpenAI and Anthropic are called through their official SDKs with structured outputs, so replies always match the expected JSON format.
- Anthropic requests use low effort, since commit messages are a simple task. On supported models, Anthropic's server-side fallback is enabled, so a declined request is retried on a backup model.
- Retries: requests time out after 60 seconds (120 for Ollama). Rate limits, server errors and network failures are retried twice with backoff.
- Invalid suggestions (wrong type, too long, failing commitlint) go back to the model with the reasons, for up to 3 attempts in total.