Contextual commits – An open standard for capturing the why in Git history
2 days ago
- #Workflow Optimization
- #Software Development
- #Git
- The author discusses the challenge of making coding agents understand project context and conventions without manual input.
- Initial attempts to provide context via extensive prompts were effective but not scalable.
- Various methods were tried to capture context, including rules, artifacts, and skills, but maintaining context capture was inconsistent.
- Automation attempts, like using Git hooks, degraded the quality of captured context.
- The realization that commit bodies in Git are underutilized for capturing the 'why' behind changes led to the creation of Contextual Commits.
- Contextual Commits extend Conventional Commits by adding structured action lines in the commit body to document intent, decisions, constraints, and learnings.
- A utility skill named 'recall' was developed to search through contextual commit history, enhancing workflow without significant changes.
- The solution addresses context decay, merge conflicts, and discipline dependency by leveraging Git's existing infrastructure.
- Contextual Commits are proposed as an open standard, with a reference implementation available for easy installation.
- The approach is scalable, privacy-conscious, and avoids vendor lock-in, fitting seamlessly into existing Git workflows.