Inspiration

Git records what changed, but the reasoning behind those changes is often scattered across commit messages, issue references, tests, and source files. When a bug appears, developers can spend hours reconstructing why a risky decision was introduced and how the code evolved afterward.

AI Time Machine was inspired by a simple question:

What if a repository could explain its own history?

What it does

AI Time Machine transforms real Git history into an interactive, evidence-backed story of how a codebase evolved.

Developers can:

  • Explore commits through a visual timeline.
  • Ask questions about the repository in Ask the Repo.
  • Open citations and inspect the exact supporting event, commit, and affected files.
  • Use Bug Origin Trace to follow a problem from its introduction through discovery and resolution.
  • See whether a statement is confirmed evidence, an inference, or information that was not recorded.
  • Analyze another local Git worktree using Real Repo Mode.

The flagship OrbitCart demonstration traces a stale-price checkout bug through its complete history: a latency problem, the introduction of an unsafe cache, issue OC-52, rollback, a catalog-version fix, and the regression test that protected the final solution.

OrbitCart is a synthetic demonstration project, but it is stored as a genuine Git repository with 12 real commits that the application analyzes.

How I built it

The project uses Python 3.11 and Git for repository ingestion. Commit metadata, changed files, issue references, and diffs are normalized into an evidence model consumed by the application.

The interface is built with JavaScript, HTML, and CSS. It provides the timeline, Ask the Repo results, citation navigation, Bug Origin Trace, repository evidence views, and responsive desktop and mobile layouts.

Generated analysis is stored using a strict artifact format. Before an artifact is displayed, the application validates its schema, repository evidence digest, event references, commit references, and affected-file relationships.

The public demonstration is a deterministic, zero-key deployment. It does not require an OpenAI API key or make a paid model call when someone opens the site. Real Repo Mode can also run locally using only Python and Git.

How I used Codex and GPT-5.6

Codex was used throughout the project for architecture exploration, implementation, debugging, test creation, UI refinement, trust-semantics review, and evaluation.

GPT-5.6 Sol was used through ChatGPT-authenticated Codex as a build-time analysis tool. It generated the committed OrbitCart causal-analysis and Ask the Repo artifacts from repository evidence.

The hosted application does not claim that these responses are generated live. It replays the committed artifacts only after their evidence references have been validated. If an artifact is missing or invalid, the product falls back transparently to deterministic repository analysis instead of presenting unsupported model output.

Challenges I faced

The largest challenge was separating causality from correlation. A commit appearing before a bug does not automatically prove that it caused the bug. Every explanation therefore needed to retain its connection to observable Git evidence.

Another challenge was making citations trustworthy. Checking that a commit exists was not sufficient; the application also needed to ensure that referenced events and files belonged to the correct evidence context.

I also wanted the public demo to remain reliable for every reviewer without requiring API credits, authentication, or a network-dependent model response. This led to the build-time artifact and runtime-validation architecture.

Finally, arbitrary repositories often contain incomplete commit messages. AI Time Machine handles that honestly: missing rationale or risk is displayed as not recorded instead of being invented.

Accomplishments that I am proud of

  • Built an interactive evidence timeline from real Git history.
  • Created clickable Ask the Repo citations that open the supporting timeline event.
  • Built a complete visual Bug Origin Trace.
  • Added Real Repo Mode for analyzing other local Git worktrees.
  • Added strict artifact and evidence-reference validation.
  • Kept the hosted experience deterministic and API-key-free.
  • Created 51 application tests plus an OrbitCart regression suite.
  • Achieved 15/15 on the deterministic grounding regression scorecard.
  • Verified the project using automated tests, artifact validators, browser-flow checks, JavaScript validation, and GitHub Actions.

What I learned

The most important lesson was that citations alone do not make an AI explanation trustworthy. The application must validate what those citations point to and communicate the limits of the evidence.

I also learned that uncertainty is part of a useful developer tool. Saying not recorded can be more valuable than generating a confident but unsupported explanation.

Git history provides a strong factual boundary for AI-assisted code archaeology because claims can be linked back to concrete commits, files, and events.

What's next

Future work includes more complete merge, rename, and merge-base handling; bounded diff evidence; stronger semantic validation of generated claims; performance improvements for large repositories; and optional local-first connectivity for teams that want to generate new analysis artifacts.

Try it

Public demo: https://ai-time-machine-demo.vedheshvit.chatgpt.site

Source code: https://github.com/ved-devAI/AI_Time_Machine

The hosted demo works in a modern desktop or mobile browser.

For local testing, install Python 3.11+ and Git, then run:

git clone https://github.com/ved-devAI/AI_Time_Machine.git
cd AI_Time_Machine
python3 scripts/create_orbitcart.py
python3 -m app.server

Then open http://127.0.0.1:8000.

The local workflow has been verified on macOS and through GitHub Actions on Linux.

Built With

Share this project:

Updates