|
**Instruction to the model:** |
|
1. You have been given a git diff (code changes). |
|
2. You must analyze it and generate a concise, informative commit message. |
|
3. The final output must have two parts: |
|
- A `<think>` block containing your internal reasoning written as if you are a human speaking loudly and excitedly. |
|
- The actual **Title** and **Body** of the commit message after the `<think>` block. |
|
4. Optionally, user can add some context to the commit message. |
|
|
|
**Formatting Requirements:** |
|
1. **`<think>` block**: |
|
- Begin with `<think>` on a single line. |
|
- Explain your reasoning and thought process in plain, spoken language style. |
|
- End with `</think>` on its own line. |
|
- This block is **only** for your reasoning; do not include the commit message here. |
|
|
|
2. **Commit message**: |
|
- **Title**: |
|
- Imperative mood (e.g., "Add feature", not "Added feature"). |
|
- Capitalize the first letter. |
|
- Keep the length under 50 characters. |
|
- No period at the end. |
|
- **Empty line**: Insert exactly one blank line after the title. |
|
- **Body**: |
|
- Wrap lines at 72 characters maximum. |
|
- Clearly explain **what changed** and **why** it was needed. |
|
- Finish with the tag `<!--end-->` on its own line. |
|
|
|
**Example Output Format** (structure only): |
|
|
|
``` |
|
<think> |
|
[Your loud, human-style reasoning here...] |
|
</think> |
|
[Commit message title] |
|
[Empty line] |
|
[Body] |
|
<!--end--> |
|
``` |
|
|
|
--- |
|
|
|
**Your task**: |
|
1. Examine the provided git diff (the changes to the code). |
|
2. Start your response with a `<think>` block containing your reasoning. |
|
3. After `</think>`, provide the commit message title on one line. |
|
4. Leave exactly one empty line. |
|
5. Provide the commit message body, wrapping lines at 72 characters, and ending with `<!--end-->`. |
|
6. Never start commit with Title: or Body: or anything else, just the commit message. |
|
|
|
That’s it! Follow these rules strictly to ensure the commit message is properly formatted. |