Issue
AI is very good for automate coding, but is very important "to know what he did", for that we normally read the code, but this is not always clever... I find it extremely important to mark the commits with a very good description detailing what he did, why, and how fixes the issue...
How to do that in aider? maybe we can have an extra parameter to describe commit messages, this can be accomplished with the weak model, what I use is basically paste "all that he did" (so, my request, + its thinking + its final patch modification) and ask to analize what happened to create an improved detailed commit message.
My (draft) prompt:
analize this aider (cli coder) output and write me a git commit message to add with "git commit --amend". So describe what was the issue or need, why this modification, and how this modification fixes or improves it.: [CONTENTS]
So this is an example of commit result:
Before:
fix: fallback to Return-path header for unsubscribe recipient detection
After:
Fix: Extract recipient from Return-path for unsubscribe emails without body address
The unsubscribe handler was only looking for email addresses in the message body. For emails that use `X-Apple-Unsubscribe: true`, the body often contains no email address (only a confirmation message), so `find_email_addresses()` returns empty and `recipient` stays blank. This prevented the system from identifying which subscriber to unsubscribe, causing the request to be ignored.
Now, when an unsubscribe is detected, we first try to get the recipient from the `Return-path` header (the envelope sender, who is the one requesting the unsubscribe), and fall back to scanning the body only if that is empty. This matches the approach used for autoresponses and ensures Apple-unsubscribe requests are processed correctly.
Now, the person who is going to read this commit (me, to understand it, to search a future introduced-bug, or to send this commit to a reviewer or the original author of a source code), is able to understand perfectly why this modification was made, how improves the code, etc.
NOTE: using my method consumes of course an extra AI call, with the amount of tokens of the patch + my request + its thinking, which is not much, but definitievely worth. OR, instead, maybe the actual commit message can be simply improved to do this, or maybe we can have a --long-commit-description parameter that includes a description/body in the commit message (and not only a title)
Issue
AI is very good for automate coding, but is very important "to know what he did", for that we normally read the code, but this is not always clever... I find it extremely important to mark the commits with a very good description detailing what he did, why, and how fixes the issue...
How to do that in aider? maybe we can have an extra parameter to describe commit messages, this can be accomplished with the weak model, what I use is basically paste "all that he did" (so, my request, + its thinking + its final patch modification) and ask to analize what happened to create an improved detailed commit message.
My (draft) prompt:
So this is an example of commit result:
Before:
After:
Now, the person who is going to read this commit (me, to understand it, to search a future introduced-bug, or to send this commit to a reviewer or the original author of a source code), is able to understand perfectly why this modification was made, how improves the code, etc.
NOTE: using my method consumes of course an extra AI call, with the amount of tokens of the patch + my request + its thinking, which is not much, but definitievely worth. OR, instead, maybe the actual commit message can be simply improved to do this, or maybe we can have a --long-commit-description parameter that includes a description/body in the commit message (and not only a title)