跳到正文
DEV Community· Raghuraj Pratap Singh·· 2 小時前AI 評分40

AFTERLIGHT:以開放權重 AI 讓被遺忘的軟件重獲新生

AFTERLIGHT: Giving Forgotten Software a Second Life with Open-Weight AI

AI 導讀

AFTERLIGHT 結合靜態分析、Git 歷史、證據檢索及開放權重 AI,協助開發者調查陌生或被遺棄的軟件專案。它設計為在本機透過 Ollama 使用 Gemma,並以來源檔案和提交記錄作為解釋依據。合成數據集測試的精確率為 91.7%、召回率為 73.3%、F1 分數為 0.815;這些結果並非真實專案的代表性基準。

正文

AFTERLIGHT: Bringing Forgotten Software Back to Life with Open-Weight AI

Some code deserves a second life.

Software projects are created every day. Some become successful products. Others are abandoned when developers move on, documentation disappears, dependencies become outdated, and the people who understood the architecture are no longer available.

But the code remains.

What if we could reconstruct the story behind forgotten software—not just understand what the code does today, but investigate what it was originally designed to do?

That question inspired AFTERLIGHT — The Digital Archaeologist, my project for the Hacktoberfest 2026 Open-Source AI Challenge: Ghost in the Machine.

The idea: Software archaeology

AFTERLIGHT investigates software repositories as digital archives. It combines static analysis, Git history, evidence-based retrieval, and open-weight AI to help developers understand unfamiliar or abandoned projects.

Instead of returning a generic AI-generated explanation, the goal is to connect discoveries to source files, line numbers, and historical commits that developers can inspect.

The guiding principle is simple:

An AI explanation is more useful when you can inspect the evidence behind it.

How AFTERLIGHT works

1. Investigate a repository

Users can investigate a supported repository or upload a ZIP archive.

The analysis pipeline examines repository structure, programming languages, dependency manifests, documentation, and Git history.

2. Discover forgotten code

AFTERLIGHT aims to identify potential issues such as undocumented functions, unused-import candidates, unresolved TODOs, outdated dependencies, and missing tests.

Findings should include the relevant file, line number where available, supporting evidence, and a recommended next step.

These are investigation leads, not automatic proof that code is unnecessary. Static analysis has limitations, particularly when code is referenced dynamically.

3. Reconstruct the project's history

The Digital Time Machine presents Git commits, timestamps, messages, authors, and changed files.

This historical context helps developers understand how a repository evolved. Verified commit information should remain distinct from AI-generated interpretations of why a change happened.

4. Ask an open-weight model

The AI Explorer is designed to use Gemma through Ollama when the local model is configured and available.

For example:

What was this project originally designed to do?

The intended workflow retrieves relevant source-code chunks and historical context, then generates an explanation grounded in that evidence.

Citations help users inspect the underlying files. When evidence is incomplete, the system should communicate uncertainty rather than invent a convincing story.

5. Create a resurrection roadmap

After the investigation, AFTERLIGHT organizes possible improvements into a prioritized roadmap covering maintenance, dependencies, testing, documentation, and architecture.

Recommendations are intended for human review. Original repository files should not be overwritten automatically.

Why open-weight AI matters

The Ghost in the Machine theme encouraged me to think about what happens to software knowledge when its original maintainers disappear.

Open-weight AI makes this idea more practical in several ways.

Local inference: With a compatible model and runtime installed, repository questions can be processed on the developer's own machine.

Privacy: Local inference can help keep private source code on the machine, provided the rest of the application also avoids external transmission.

Flexibility: Developers can inspect the integration, change models, modify retrieval logic, and adapt the system to their needs.

Accessibility: A local-first workflow can reduce dependence on paid inference APIs, although hardware, electricity, and setup still have costs.

Open models do not automatically guarantee privacy or unrestricted licensing. The actual data flow, model license, and deployment configuration matter.

Making the results measurable

AFTERLIGHT includes a synthetic demonstration repository, GHOST_ARCHIVE_DEMO, intended to exercise the analysis pipeline against known findings.

The project's reported benchmark results are:

  • Precision: 91.7%
  • Recall: 73.3%
  • F1 score: 0.815
  • Citation coverage: 100%
  • Reported analysis latency: approximately 396 ms

These figures relate to the synthetic evaluation dataset, not a representative benchmark of real-world repositories. They should be interpreted alongside the dataset size, evaluation methodology, and limitations.

Citation coverage also does not establish that every AI-generated claim is correct. Evidence validity and answer quality require separate evaluation.

Built with

The project is designed around a modular architecture using:

  • React, TypeScript, and Tailwind CSS for the interface
  • FastAPI and Python for the backend
  • Python AST-based analysis for source-code inspection
  • Git history extraction for repository archaeology
  • Gemma and Ollama for configurable local inference
  • Retrieval-augmented generation (RAG) for repository-grounded questions
  • Local persistence, with optional database integration

Feature availability depends on the implemented code, installed dependencies, and runtime configuration.

What I learned

Building AFTERLIGHT reinforced an important lesson: adding an AI model to an application is not enough.

A useful AI developer tool needs reliable input processing, evidence retrieval, traceable conclusions, clear failure states, and a way to evaluate whether its output is correct.

The interface can create curiosity, but the evidence is what makes the experience trustworthy.

There is still room to improve retrieval quality, increase recall, evaluate more programming languages, and test the system against larger and more diverse repositories.

Try AFTERLIGHT

🌐 Live Demo: Explore AFTERLIGHT

💻 GitHub Repository: View the source code

Start with the live demonstration, then explore the repository to inspect the implementation and setup instructions. If the backend or local model is required for a feature, follow the repository's setup instructions to run that functionality.

Closing thought

Software does not need to remain a mystery simply because its original developers have moved on.

Its source code, commit history, and architectural clues may still preserve fragments of the knowledge needed to understand it.

AFTERLIGHT is an attempt to recover those fragments with open-weight AI and verifiable evidence.

AFTERLIGHT — Some code deserves a second life.

Built for the Hacktoberfest 2026 Open-Source AI Challenge — Week 4: Ghost in the Machine.

devchallenge #hf26challenge

來源:DEV Community · dev.to