Validation Rules#
This reference describes the exact validation checks gmuse performs on generated commit messages, the canonical error messages produced when checks fail, and minimal examples.
Purpose#
Validation ensures generated messages conform to configured formats and constraints before being accepted as commit messages.
Validation checks#
Check |
Rule |
Canonical error message |
|---|---|---|
Empty |
Message must not be empty or whitespace-only |
|
Length |
Message length must be <= 1000 characters |
|
Conventional |
Must match the regex `^(feat |
fix |
Gitmoji |
Message must start with an emoji followed by a space (e.g. |
|
Note: The Conventional regex above is enforced when
--format conventional(or equivalent config) is selected. When using--format freeform, the Conventional check is skipped.
Examples#
Passing examples:
Conventional:
feat(api): add token exchange endpoint
Gitmoji:
✨ add token exchange endpoint
Failing examples:
Empty message:
Too long (example snippet):
<Message with 1200 characters...>
Conventional mismatch:
Added new feature without type prefix
# Error: Message does not match Conventional Commits format
Gitmoji missing:
add new feature
# Error: Message does not start with an emoji
Configurable limits#
Max length: 1000 characters (not currently configurable via CLI; see configuration docs for any provider-level limits and future extension notes).
Troubleshooting & Fixes#
For step-by-step fixes, examples, and guidance on how to adjust prompts or use --hint to guide the model toward a valid message, see Validation failures.
See also#
Troubleshooting: Troubleshooting
Explain: How it Works
Configuration: Configuration