HeadlinesBriefing favicon HeadlinesBriefing.com

Contextual Commits: Open Standard for AI Agent Context

Hacker News •
×

A developer working with coding agents daily has introduced Contextual Commits, an open standard for capturing the reasoning behind code changes in Git history. The system addresses a persistent problem: AI agents struggle to understand project context and past decisions without manual intervention. Traditional commit messages only explain what changed, not why.

After months of experimentation with various approaches—from custom rules to MCP tools—the creator realized the solution was already built into Git. The commit body, long underutilized, could capture the reasoning that disappears when developers finish sessions. Inspired by Conventional Commits, Contextual Commits adds action lines to commit messages that document intent, decisions, constraints, and learning.

For example, a commit might include lines like `intent(auth): users need social login` and `decision(oauth-library): passport.js over auth0-sdk — better multi-provider flexibility`. The creator developed a simple utility skill that automatically generates these contextual commits when developers use the standard `commit` command. A `recall` skill allows searching through this enriched commit history. The approach eliminates context decay, merge conflicts from shared context files, and the discipline dependency of manual documentation—while scaling with Git's existing infrastructure.