3-agent architecture
Archaeologist (indexes + enriches), Knowledge (RAG + citations), Insight (SQL analytics). Explicit inter-agent communication via SQLite — testable, persistent, team-shareable.
Every developer wastes hours re-deriving why a codebase looks the way it does. The answers live in git history, but commit messages are usually unhelpful (fix, wip, major update) and on-demand AI editors re-pay the analysis cost every session. GitWhy indexes your repository’s history once, uses an LLM to reverse-engineer intent from actual code diffs, and exposes the result over MCP — so any compatible editor (Cursor, Claude Code, Windsurf) gets fast, citation-backed historical context as a native tool call.
3-agent architecture
Archaeologist (indexes + enriches), Knowledge (RAG + citations), Insight (SQL analytics). Explicit inter-agent communication via SQLite — testable, persistent, team-shareable.
9 MCP tools
gitwhy.why, gitwhy.history, gitwhy.risk, gitwhy.related, gitwhy.context_for_pr,
gitwhy.catchup, gitwhy.search, gitwhy.suggest_commit_message, gitwhy.ping.
Multi-provider LLM
OpenAI (gpt-4o, gpt-4o-mini), Google Gemini (2.5-flash + gemini-embedding-001), deterministic mock for tests. Auto-detected from env vars.
Adversarial-tested
280+ tests across 33 files. Dedicated suite for prompt injection, secrets in diffs, unicode hazards, SQL-injection-shaped inputs, concurrent queries.
| Tool | What it does | What GitWhy adds |
|---|---|---|
git log -p + naked AI editor | Explains a diff on demand | Pre-indexed, persistent, citation-backed; 100× faster per query, no re-analysis cost |
| Repowise / CodeScene | Static git analytics (hotspots, ownership) | AI-inferred intent from diffs, not just metrics; MCP-native; conversational Q&A |
| Lore Protocol | Improves future commit message hygiene | Understands existing messy history retroactively |
GitWhy was built as a capstone for the EPAM Generative AI for Software Development program. The deliverables — architecture blueprint, executive summary, self-review — are rendered as proper pages here rather than left as raw Markdown.
Executive Summary
Architecture Blueprint
Self-Review