Commit Description as a Thinking Tool
4 hours ago
- Before AI, the author wrote detailed commit descriptions for major changes, taking time to explain both 'what' and especially 'why' to provide context and avoid hunting for information.
- The writing process itself served as a reflective exercise, helping the author re-evaluate and sometimes improve the code before finalizing.
- In the AI era, AI-generated commit descriptions are a concern because agents may lack full context and fabricate reasoning, leading to misleading or meaningless explanations.
- Providing the agent with full context via chat or tools can help it explain 'why' more accurately, but it still doesn't solve the verification problem.
- The author's solution is to write the commit message and description themselves, even when AI writes the code, because explaining the change forces them to understand and verify the code's intent.
- Commit descriptions act as a thinking tool, especially for temporary decisions with exit criteria that AI cannot infer from code or tools alone.
- Ultimately, writing the 'why' is a way to confirm you truly understand what you are shipping.