DEV Community

Cover image for Slow and Steady with CommitSloth: Automating Developer Paperwork with Local Google Gemma
Babin Bid
Babin Bid

Posted on

Slow and Steady with CommitSloth: Automating Developer Paperwork with Local Google Gemma

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission πŸ¦₯

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

Writing code is exhilarating. Writing Pull Request descriptions, technical changelogs, testing instructions, and release notes is… exhausting.

During Hacktoberfest, developers are eager to ship contributions, but writing thorough PR documentation often turns into an afterthoughtβ€”or a rushed, one-line summary ("fixed stuff").

CommitSloth πŸ¦₯ is an offline-first, privacy-guaranteed CLI assistant that automates developer paperwork using open-weight AI. It analyzes your local git repository (working directory, staged changes, branches, or specific commits), automatically strips noisy lockfiles and binary assets, and prompts a local Google Gemma model via Ollama to generate:

  1. 🎯 Conventional Commits PR Title (e.g., feat(parser): add lockfile filtering and token guardrails)
  2. πŸ“‹ Bulleted Technical Changelog categorizing functional codebase modifications
  3. πŸ§ͺ Step-by-Step Testing Instructions with actionable reproduction and verification commands
  4. πŸš€ Release Notes Summary ready for changelog logs or version tag notes

Who Gets to Be Lazier?

Every developer who writes code! Instead of spending 15–20 minutes context-switching to write PR descriptions and markdown paperwork, you simply run commitsloth and get coffee. CommitSloth does the slow and steady documentation for you.


Demo

CommitSloth runs seamlessly in your terminal with live token streaming and formatted terminal tables:

# Analyze uncommitted changes and stream Gemma's output live
python commitsloth.py --stream

# Or export polished documentation straight to a Markdown file
python commitsloth.py -o PULL_REQUEST.md
Enter fullscreen mode Exit fullscreen mode

Example Generated PR Output

# feat(git): implement offline git diff parsing and local gemma integration

## πŸ“‹ Changelog & Key Changes
- **`commitsloth/git_parser.py`**: Added safe subprocess invocation with automatic lockfile and artifact filtering.
- **`commitsloth/agent_core.py`**: Implemented local Ollama loopback client with zero-cloud-leakage guardrails.
- **`commitsloth/cli.py`**: Created terminal interface with Rich styling and Markdown file export.

## πŸ§ͺ Testing Instructions
1. Run automated test suite:
   ```bash
   pytest tests/ -v
   ```
2. Verify diff extraction on local changes:
   ```bash
   python commitsloth.py --diff-only
   ```
3. Test local Ollama endpoint connection:
   ```bash
   python commitsloth.py --mock
   ```

## πŸš€ Release Summary
CommitSloth provides a 100% offline developer productivity CLI that automates Pull Request and release notes generation using local Google Gemma models.
Enter fullscreen mode Exit fullscreen mode

Code

CommitSloth πŸ¦₯

"Slow and Steady" developer paperwork using local, open-weight AI.
Built for the Hacktoberfest 2026 Open-Source AI Challenge.

License: MIT Python: 3.10+ AI: Google Gemma Engine: Ollama Privacy: Zero Cloud Leakage


🌟 Why CommitSloth?

Developers love writing code, but writing Pull Request descriptions, changelogs, and release paperwork is tedious and easy to rush. During Hacktoberfest's "Slow and Steady" week, CommitSloth encourages developers to take a breath, slow down, and let a thoughtful local AI assistant craft professional documentationβ€”without sending proprietary code to the cloud.

CommitSloth runs entirely on your machine. It analyzes your local git repository, filters out irrelevant build noise and lockfiles, and prompts Google's open-weight Gemma model via Ollama (http://localhost:11434) to produce:

  • 🎯 Conventional Commits PR Title (e.g. feat(auth): implement offline token verification)
  • πŸ“‹ Bulleted Technical Changelog categorizing functional code changes
  • πŸ§ͺ Reviewer Testing Instructions with actionable verification steps
  • πŸš€ Release Notes Summary for version tags and changelog logs

πŸ“ Architecture

flowchart TD
    subgraph Local Repository
…

How I Built It

CommitSloth is written in Python (3.10+) and architected into modular components:

CommitSloth Architecture:
[Git Working Tree] ──> [Safe Subprocess] ──> [GitParser & Noise Filter]
                                                        β”‚
                                                        β–Ό
[Rich Terminal / Output] <── [AgentCore] <── [Gemma Prompt Constructor]
                                  β”‚
                       (Local Loopback HTTP)
                                  β–Ό
                   [Ollama Daemon: localhost:11434]
                                  β”‚
                       [Google Gemma (2B / 7B)]
Enter fullscreen mode Exit fullscreen mode

Key Technical Pillars

  1. Local Open-Weight Model (Google Gemma): Powered by Google's open-weight gemma:2b (ultra-fast for quick local loops) and gemma:7b (high-depth analysis) running locally via Ollama.
  2. Zero-Cloud-Leakage Guardrails: Enterprise teams frequently ban cloud AI tools because proprietary diffs cannot leave the machine. AgentCore validates that every outbound request resolves strictly to a loopback interface (localhost, 127.0.0.1, ::1). If an external URL is passed, it halts execution immediately with a SecurityViolationError.
  3. Smart Noise & Lockfile Truncation: Large diffs from package managers (like a 3,000-line package-lock.json or Cargo.lock) choke local LLM context windows. CommitSloth's GitParser automatically strips lockfiles, minified assets (*.min.js), and binaries, compressing the git diff down to meaningful code logic within a 14,000-character budget.
  4. Rich Terminal Experience: Built with rich for live progress spinners, diff statistics tables (+ additions / - deletions), and real-time token streaming.

Why Does Open Innovation Matter?

Open innovation is what made CommitSloth possible.

With closed, proprietary APIs:

  • Data Privacy & IP Exposure: Developers working on proprietary software, private client work, or air-gapped systems cannot send raw code diffs across the public internet.
  • Cost & Rate Limits: Using cloud tokens for repetitive git diff analysis quickly accumulates subscription costs and rate limit bottlenecks.
  • Portability & Longevity: With open-weight models like Google Gemma, developers have full ownership over their inference stack. Gemma runs entirely offline on consumer laptops without an active internet connection, API keys, or fear of deprecation.

Open-weight AI turns the developer workstation into an autonomous, private documentation engine.


My Agent Session

Developing CommitSloth involved iterative prompt engineering, subprocess security testing, test-driven validation with pytest, and lint formatting. You can review the development session transcript and workflow via the CommitSloth GitHub repository.


The Lazy Payoff

The Math of Slothful Productivity

  • Average time to review diffs and write a structured PR description manually: ~10 to 15 minutes per PR.
  • Time spent with CommitSloth: ~4 seconds (python commitsloth.py -o PULL_REQUEST.md).
  • Time saved across a typical 4-PR Hacktoberfest sprint: ~1 hour of pure developer paperwork eliminated.

Reviewers get clean, Conventional-Commits-compliant PRs with actionable reproduction steps, and authors never have to type "fixes and updates" as a PR title ever again.


Wrapping Up πŸ¦₯

Developer documentation shouldn't be an afterthought or a rushed chore. The spirit of "Slow and Steady" isn't about sluggish progressβ€”it's about taking pride in thoughtful engineering while letting local, privacy-first AI take care of the repetitive paperwork.

If you are participating in Hacktoberfest or simply want cleaner, more descriptive Pull Requests without sending proprietary diffs to third-party clouds, give CommitSloth a spin:

git clone https://github.com/Babin123456/CommitSloth.git
cd CommitSloth
pip install -r requirements.txt
python commitsloth.py
Enter fullscreen mode Exit fullscreen mode

Slow down, write great code, and let the sloth handle the paperwork. πŸ¦₯✨

Feedback, ideas, and contributions are warmly welcome on GitHub. Happy Hacktoberfest!

Top comments (0)