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 changesType
Only teststest
Only docs (including examples/)docs
Only CI configci
Only package manifests or lockfileschore
Version bump plus changelogchore
Only tooling config (tsconfig, eslint, Docker, ...)chore
Only file permissionschore
Only whitespace or formattingstyle
Files moved or renamed without editsrefactor

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.