đź§  Inspiration

Every software project tells a story—but Git only remembers what changed, not why.

Anyone who has returned to an old project after a few months has probably experienced the same frustration: commit messages like "fixed bug", "updated auth", or "final changes" provide almost no context. The reasoning behind architectural decisions, trade-offs, and implementation choices slowly disappears over time, making onboarding, maintenance, and debugging increasingly difficult.

I wanted to build a tool that acts as a repository's memory rather than just its history. Instead of simply displaying commit logs, Memory Detective reconstructs the thought process behind code changes, helping developers understand not only what happened, but why it happened.

The goal was to transform Git repositories into living engineering documentation.


🏗️ How We Built It

Memory Detective is a full-stack application built with Next.js 15, FastAPI, PostgreSQL, and pgvector.

The workflow is straightforward:

  1. A user imports a Git repository.
  2. GitPython extracts commit history, changed files, and patch diffs.
  3. Each commit is analyzed using GPT-5.6 through the OpenAI Responses API.
  4. The AI generates structured insights including:
    • Summary
    • Reason behind the change
    • Architectural impact
    • Risks
    • Recommendations
  5. These analyses are stored alongside vector embeddings using pgvector, enabling semantic search across the repository.
  6. The frontend visualizes repository evolution through dashboards, timelines, and an AI-powered Architect's Journal.

In addition to AI reasoning, Memory Detective performs static code analysis to identify oversized functions, circular dependencies, documentation gaps, and technical debt hotspots, combining traditional software metrics with LLM-generated insights.


🤖 Using Codex

This project was intentionally built around OpenAI Codex as a collaborative development partner rather than just a code generator.

Instead of asking Codex to generate isolated snippets, I used it to iteratively develop the project architecture—from scaffolding the full-stack application and implementing Git repository synchronization to building the AI commit analyzer, REST API endpoints, and dashboard components.

By breaking development into focused milestones, Codex accelerated implementation while still allowing architectural decisions and feature direction to remain developer-driven.

GPT-5.6 powers the repository intelligence itself, while Codex accelerated the engineering process used to build the application.


đźš§ Challenges

One of the biggest challenges was determining how to infer developer intent from a Git commit.

A commit diff only shows the code that changed—it doesn't explain the motivation behind the change. Designing prompts that consistently extract meaningful architectural reasoning while remaining grounded in the available code context required careful iteration.

Another challenge was combining several independent systems into a cohesive workflow:

  • Git repository parsing
  • AI-powered reasoning
  • Vector embeddings
  • Semantic search
  • Static code analysis
  • Interactive visualizations

The project also needed to function even without an OpenAI API key, so seeded demonstration data was included to ensure judges could immediately explore the application without additional setup.


📚 What I Learned

This project reinforced that AI is most valuable when it augments developer understanding rather than simply generating code.

Working with Git history highlighted how much engineering knowledge is lost over time, and building Memory Detective demonstrated how LLMs can help preserve that knowledge by turning commit histories into meaningful documentation.

I also gained practical experience integrating GPT-5.6 with FastAPI services, designing retrieval workflows using pgvector, structuring full-stack applications with Next.js, and using Codex as an iterative software engineering partner throughout development.


🚀 What's Next

Memory Detective has the potential to become much more than a hackathon project.

Future plans include:

  • GitHub OAuth integration
  • Pull Request analysis
  • IDE extensions
  • CI/CD integration
  • Team collaboration features
  • Automatic architecture drift detection
  • Organization-wide repository knowledge graphs
  • Multi-repository semantic search

Ultimately, the vision is to make software repositories self-documenting—preserving not only the code, but the engineering decisions that shaped it.

Built With

  • ai
  • analysis
  • code
  • codex
  • developertools
  • engineering
  • github
  • gpt-5.6
  • knowledge
  • llm
  • openai
  • semantic
  • software
Share this project:

Updates