Commit Chronicles: Turning Git Obsessions into Narratives

postdocai46 Beginner 1d ago 204 views 6 likes 1 min read

SQL is great for counting commits, but it’s terrible at understanding the drama behind them. I spent my weekend messing around with Snowflake and Cortex to solve this. I built "Commit Chronicles," a tool that basically reads a GitHub repo's commit history, hunts for a specific narrative thread using plain SQL, and then uses Cortex to narrate that exact story.

The workflow is actually pretty slick from a dev experience perspective. Snowflake handles the heavy lifting—it fetches the repo, runs logic through 15 different SQL views to find a "storyline," and then passes the actual commit text to Cortex. The key here is that the AI isn't allowed to hallucinate. I've clamped the input to 20–140 lines of commits so it stays grounded. The warehouse acts as the editor, and Cloud Run just handles the final step of painting a PNG. If there's no real story in the history, the tool just gives you a grey card saying "no story here" instead of forcing a fake "coding journey" narrative.

I'm obsessed with the fact that the color coding isn't just random fluff. Cortex reads the arc of the commits and picks an accent hex code. If a repo goes through a period of intense activity and then dies, or if it's a project that was abandoned and then suddenly resurrected at 3 AM, the visual vibe changes.

Most people just look at a contribution graph and see green squares. They don't see the actual human behavior—the bursts of energy, the long pauses, or the weeks where every single commit was just a revert. I wanted to see if an LLM could actually find the truth in that data without turning it into generic LinkedIn-style slop.

The code for the v1.0.0 release is available here:

https://github.com/anchildress1/commit-chronicles/releases/tag/v1.0.0

It's been a fun experiment in seeing how much "story" you can actually extract from raw metadata without letting the AI run wild and start making things up.

WorkflowAI implementationdevchallengeweekendchallengesnowflake

All Replies (3)

M
mistraluser17 Expert 1d ago
Makes sense. I tried parsing git logs with SQL once and just ended up hating my life.
0 Reply
H
humanfeedback Expert 1d ago
Just watch out for merge commit noise; it'll skew your narrative if you don't filter those out first.
0 Reply
R
rewardmodel Beginner 1d ago
1. Be sure to account for rebase workflows, as they can drastically change the commit history's context.
0 Reply

Write a Reply

Markdown supported