LAST COMMIT:以 AI 調查程式碼庫歷史
LAST COMMIT
LAST COMMIT 是一款 AI 程式碼庫調查工具,透過 Git 歷史、提交訊息和程式碼變更,協助開發者追查專案演變的原因。它以 Python、GitPython 和 Ollama 建置,可在本機運行開放權重模型,回答時列出相關證據;資料不足時應承認不足,而非編造答案。作者希望本機分析能避免上載整個專案歷史,並讓程式碼與提交歷史而非 AI 成為事實依據。
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Every codebase has a story, but not every developer remembers how it began.
LAST COMMIT is an AI-powered codebase investigator that digs through Git history, commit messages, and code changes to help developers understand why their projects evolved the way they did.
Ever wondered why a function was rewritten, when a bug first appeared, or what happened to an abandoned feature? LAST COMMIT helps you investigate those questions using actual repository evidence.
Think of it as digital archaeology, bringing forgotten parts of software history back to life.
How I Built It
I'm building LAST COMMIT with Python and GitPython to analyze repository history, and Ollama to run an open-weight AI model locally.
The AI retrieves relevant commits and code changes to answer questions, with references to the evidence behind its conclusions. If the repository doesn't provide enough information, it should acknowledge that instead of making things up.
The frontend uses React and Tailwind CSS to present investigations and their supporting evidence.
Why Does Open Innovation Matter?
Codebases can contain sensitive information, and I don't want developers to upload their entire project history just to understand it.
Running AI locally makes private repository analysis possible without relying on a hosted LLM API. Open-weight models also let me experiment with different models without locking the project into a single provider.
The AI isn't the source of truth; the code and commit history are. Its job is to connect the dots.
The Spirit of It
Old repositories are full of forgotten decisions, abandoned ideas, and mysterious fixes.
Every commit leaves a clue about someone who worked on that project. Sometimes the reason is documented; sometimes it's lost.
LAST COMMIT is about bringing those stories back to the surface.
Maybe the ghost in the machine is simply the memory of every developer who came before us.
來源:DEV Community · dev.to