Skip to content

Commit f1a8814

Browse files
committed
feat: add breaking_change instruction and field to user prompt template
Extends the user prompt in to_prompt() to include breaking change detection guidance and adds the breaking_change field to the output format template, aligning it with the updated SYSTEM_PROMPT schema.
1 parent 547a962 commit f1a8814

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/domain/context.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ DIFF:
3232
Write a JSON commit message describing the changes shown in the diff.
3333
The subject must be specific - describe WHAT was changed (e.g., "add system prompt to ollama provider", "update dependency versions").
3434
For the body: if the change is trivial (single rename, typo fix), use null. Otherwise write a short body (1-3 sentences) explaining WHY the change was made or what it enables.
35+
For breaking_change: only set this if existing users or dependents must change their code, config, or scripts to keep working — e.g., a public function/endpoint removed or renamed, a required parameter or field added, a config key changed. New optional features, bug fixes, and internal refactors are NOT breaking. Default to null.
3536
3637
Output format:
37-
{{"type": "{commit_type}", "scope": {scope_json}, "subject": "<imperative verb + what changed>", "body": "<why this change was made, or null if trivial>"}}"#,
38+
{{"type": "{commit_type}", "scope": {scope_json}, "subject": "<imperative verb + what changed>", "body": "<why this change was made, or null if trivial>", "breaking_change": null}}"#,
3839
summary = self.change_summary,
3940
files = self.file_breakdown.trim(),
4041
commit_type = self.suggested_type.as_str(),

0 commit comments

Comments
 (0)