Recipe catalog / commit-message-fit
Check commit message accuracy
commit-message-fit is a Jev recipe from the jev-recipes TypeScript package. Does message accurately describe change, neither omitting a material part nor claiming work not present? Use it when you need to flag commit or pull request titles that understate, overstate, or misdescribe the change they accompany before merge or changelog generation.
Last updated .
Explore this recipe interactively · Source and implementation guide · Markdown version
How do I use commit-message-fit in TypeScript?
Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.
import { commitMessageFit } from 'jev-recipes/commit-message-fit';
const result = await commitMessageFit({
"message": "Fix off-by-one in pagination cursor and add regression test",
"change": "In paginate() in src/api/list.ts, changed the end index from offset + limit to offset + limit - 1 so the last page no longer repeats the first row of the next page. Added the test 'returns the last page without a duplicate row' to tests/list.test.ts.",
"minConfidence": 0.8
});
console.log(result);
What input does commit-message-fit take?
| Field | Type | Needed |
|---|---|---|
| message | string | Required |
| change | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"change": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"message",
"change"
]
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"model": {
"type": "string"
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"input_tokens",
"output_tokens"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"probability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"verdict": {
"type": "string",
"enum": [
"fits",
"mismatched"
]
}
},
"required": [
"model",
"usage",
"status",
"probability",
"confidence",
"verdict"
],
"additionalProperties": false
}
}What does a commit-message-fit result look like?
This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo commit-message-fit.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"probability": 0.93,
"confidence": 0.93,
"verdict": "fits"
}
Input
See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas.
Result
verdict is fits when Jev's yes probability is at least 0.5 and mismatched otherwise. probability is that yes probability. confidence is the probability of the chosen side, so a 0.1 yes probability yields mismatched with 0.9 confidence.
A result is ready when confidence meets minConfidence. Otherwise it is review. Treat a review result as unknown and fall back to asking the author to confirm the description.
Reuse and calls
Uses the shared gate helper, a single yes/no question. This folder owns the question wording, the outcome descriptions, and the review policy. A live invocation makes one logical Jev request.
Limits
The recipe compares the message with the change as described, not with the repository, so it inherits any gaps in the supplied change summary. It judges material coverage and honesty only: a terse but accurate message grades fits, and a well-formatted message that mentions a refactor the change does not include grades mismatched. Style rules, ticket references, and commit conventions belong in a linter or application policy.
Example input
demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo commit-message-fit shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe commit-message-fit to inspect the input and result schemas.
How accurate is commit-message-fit?
No verified live accuracy measurement is available. Evaluate representative cases before using this decision in your workflow.
Use the evaluation guide to measure this decision on your own labeled cases.
What are the limits of commit-message-fit?
- Compares the message against the supplied change description, not the repository. A misleading change summary produces a misleading verdict.
- Does not judge message style, ticket references, or conventional-commit formatting.
Which recipes are related to commit-message-fit?
- summary-coverage: Use summary-coverage to check whether a longer description preserves each specific point of a change.
- change-meaning: Use change-meaning to decide whether an edit to text alters its meaning or is editorial only.