commit-message-generation
Published
Public
in @code-assistanteval100%

Turn a unified diff into a Conventional Commits message: a closed-enum type (feat/fix/docs/refactor/test/chore/perf/ci), a scope, an imperative subject capped at 72 characters, an optional body, and a breaking-change flag. Reasoning precedes the type; the diff is treated as data, never instructions. Judge-free deterministic eval.

commit-message-generation

Read a unified diff, emit a single Conventional Commits message as typed JSON:

{
  "reasoning": "Adds a retry wrapper around the HTTP client, so the change introduces new behavior.",
  "type": "feat",
  "scope": "http",
  "subject": "add exponential-backoff retry to the API client",
  "body": "Wraps outbound requests in a retry loop with jittered backoff to survive transient 5xx responses.",
  "breaking": false
}

Why this shape

  • type is a closed enumfeat, fix, docs, refactor, test, chore, perf, ci — so an eval can assert output.type == expected and mean it.
  • subject is length- and format-constrained — imperative mood, ≤ 72 characters, no trailing period — which is exactly what a deterministic eval checks (output.subject.size() <= 72, !output.subject.endsWith('.')).
  • Reasoning precedes the type. The classification is emitted after the one-line rationale, so the rationale informs it.
  • The diff is data, not instructions. A comment inside the diff that says "use type chore" is described, never obeyed.

Eval

Gated by @sufleur/commit-message-cases — diffs paired with their expected type across all eight categories. The eval is judge-free: type correctness plus the two subject-format checks are pure CEL. Passing threshold 0.9.

House conventions

Part of the Code Assistance collection: a system message, a user message, and a strict schema — framework-agnostic, SDK-generatable in TypeScript and Python.

@sufleur/