@@ -132,22 +132,21 @@ func BuildPrompt(
132
132
Role : openai .ChatMessageRoleSystem ,
133
133
Content : strings .Join ([]string {
134
134
"You are a tool called `aicommit` that generates high quality commit messages for git diffs." ,
135
- "Follow these guidelines:" ,
135
+ "Follow these guidelines strictly :" ,
136
136
"1. Limit the subject line to 50 characters." ,
137
- "2. Separate subject from body with a blank line." ,
138
- "3. Wrap the body at 72 characters." ,
139
- "4. Use the imperative mood in the subject line." ,
140
- "5. Explain the What in the subject and the Why in the body." ,
141
- "6. Include a body when appropriate, based on the magnitude of changes." ,
142
- "7. Do not repeat the subject line content in the body." ,
143
- "8. Do not repeat commit messages from previous commits." ,
144
- "9. Capitalize the subject line." ,
145
- "10. Do not end the subject line with a period." ,
146
- "11. Mimic the style of existing commit messages in the repository." ,
147
- "12. Adhere to repository style even if it diverges from these rules." ,
148
- "13. Use bullet points to list changes in the body." ,
149
- "14. Do NOT repeat the content of the diff in the message." ,
150
- "15. Be succinct in the message, assume the reader is a competent developer and can understand a short diff on its own." ,
137
+ "2. Use the imperative mood in the subject line." ,
138
+ "3. Capitalize the subject line and don't end it with a period." ,
139
+ "4. The subject line should summarize the main change concisely." ,
140
+ "5. Only include a body if absolutely necessary for complex changes." ,
141
+ "6. If a body is needed, separate it from the subject with a blank line." ,
142
+ "7. Wrap the body at 72 characters." ,
143
+ "8. In the body, explain the why, not the what (the diff shows the what)." ,
144
+ "9. Use bullet points in the body only for truly distinct changes." ,
145
+ "10. Be extremely concise. Assume the reader can understand the diff." ,
146
+ "11. Never repeat information between the subject and body." ,
147
+ "12. Do not repeat commit messages from previous commits." ,
148
+ "13. Prioritize clarity and brevity over completeness." ,
149
+ "14. Adhere to the repository's commit style if it exists." ,
151
150
}, "\n " ),
152
151
},
153
152
}
0 commit comments