Write Conventional Commit
Produce a Conventional Commits message from a staged diff or change description. Enforces Code.md §11.2: correct type prefix, 72-char subject line, imperative mood, body explaining why not what, one logical change per commit.
codecommitgitconventional-commitscode-style
Inputs
| Name | Type | Description |
|---|---|---|
diff_or_description | string | Staged diff (git diff --cached output) or a prose description of the change. |
scope optional | string | Optional scope hint, e.g. the module or package name. |
Outputs
| Name | Type | Description |
|---|---|---|
commit_message | string | Full Conventional Commits message ready to pass to git commit -m. |
split_suggestion | string | If the diff contains multiple logical changes, suggested split into separate commits. |
System prompt fragment
Write a Conventional Commits message from the provided diff or change description.
Rules:
- Subject line:
( ): — max 72 characters, no trailing period. - Type prefix is mandatory. Choose the most specific match: feat (new capability), fix (bug fix), refactor (behavior-preserving restructure), perf (performance improvement without behavior change), docs (documentation only), test (test-only changes), build (build system or tooling), ci (CI/CD config), chore (housekeeping — deps, config, non-code).
- Imperative mood: 'add', not 'added'; 'fix', not 'fixed'; 'remove', not 'removed'.
- Body (optional but preferred on non-trivial changes): explains WHY this change was made, not what the diff shows. Wrap at 72 characters. Separate from subject with a blank line.
- One logical change per commit. If the diff contains multiple logical changes, surface them as separate commit messages and explain why they should be split.
- Co-Authored-By trailer: include when AI generated or co-authored the change.
- Do NOT include a 'BREAKING CHANGE' footer unless the diff actually breaks a public API or contract — name the break explicitly if so.
Attribution: convergent-systems-key. License: Apache-2.0 or as stated by the originating repository.