Project Info
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: Then open http://127.0.0.1:8000. The local workflow has been verified on macOS and through GitHub Actions on Linux.
AI Time Machine
AI Time Machine turns real Git history into an interactive, evidence-backed timeline explaining why a codebase evolved.
Public demo: https://ai-time-machine-demo.vedheshvit.chatgpt.site
Demo video: https://youtu.be/5LGXtmJNO0U
![]()
This repository contains an OpenAI Build Week developer tool: a generated OrbitCart Git repository, Git ingestion, an evidence timeline, reference-validated GPT-5.6-in-Codex artifacts, Ask the Repo, and a visual Bug Origin Trace.
How Codex and GPT-5.6 were used
Codex supported architecture exploration, implementation, debugging, UI refinement, test development, trust-semantics review, and grounding evaluation.
GPT-5.6 Sol was used through ChatGPT-authenticated Codex to generate the committed OrbitCart causal-analysis and Ask the Repo artifacts from repository evidence. This generation happened at build time.
The hosted application does not call GPT-5.6 live. It replays an artifact only after validating its evidence digest, event IDs, commit references, and affected files. If validation fails, the application uses a clearly labeled deterministic fallback instead of displaying unsupported model output.
Real Repo Mode
Point the local tool at any Git worktree. The required flow uses only Python and Git; it does not require GitHub OAuth, an OpenAI API key, or a paid runtime call.
python3 -m app.cli analyze /path/to/repository
python3 -m app.cli analyze /path/to/repository --branch feature/my-work
python3 -m app.cli serve /path/to/repository
python3 -m app.cli serve --open
python3 -m app.cli context /path/to/repository --base main --head HEAD
analyze prints the normalized timeline JSON and supports --output. serve
opens the existing interface at http://127.0.0.1:8765 with the selected
repository fixed at process start. context reports changed files, commits in
the range, recent commits touching those files, connected incidents or fixes,
and risks that Git actually records.
For ordinary repositories, the Developer Workspace adds a visual Review my
branch report and four adaptive deterministic questions. Their answers cite
clickable commits and same-event files and are labeled Local evidence engine · deterministic; they are not GPT output. serve defaults to the current
worktree, and --open launches the local page automatically.
Ordinary commit subjects and diffs remain confirmed Git evidence. Conventional
commit classifications are marked inferred, while absent rationale and risk are
shown exactly as not recorded. OrbitCart-only Ask the Repo and Bug Origin
artifacts are not exposed for generic repositories.
The workflow is dogfooded on this repository: its M0-M4 commits render in chronological order, shared files connect milestones, and the foundation-to-HEAD context report is grounded in real changed files. See the M4.5 implementation brief.
Quick start
Requirements: Python 3.11+ and Git. No third-party packages are required.
git clone https://github.com/ved-devAI/AI_Time_Machine.git
cd AI_Time_Machine
python3 scripts/create_orbitcart.py
python3 -m app.server
Open http://127.0.0.1:8765.
The local app reads the generated OrbitCart Git repository at request time. The public demo is an API-free snapshot produced from that same repository during deployment. Its timeline and Codex references are checked before publication, and the UI labels hosted evidence as a verified Git snapshot rather than a live model call.
Quick test without rebuilding
Analyze the current Git worktree directly, or open it in Real Repo Mode:
python3 -m app.cli analyze .
python3 -m app.cli serve --open
These commands read the existing repository history and do not regenerate the OrbitCart demo repository.
Verify everything
Run the complete zero-dependency verification suite:
python3 scripts/verify.py
This regenerates OrbitCart, runs all application and repository tests, validates both Codex artifacts, produces a deterministic grounding scorecard, and checks the browser JavaScript and repository whitespace.
Individual commands:
python3 -m unittest discover -s tests -v
PYTHONPATH=.data/orbitcart python3 -m unittest discover -s .data/orbitcart/tests -v
python3 scripts/codex_artifact.py validate
python3 scripts/ask_repo_artifact.py validate
python3 scripts/evaluate_grounding.py
How it works
scripts/create_orbitcart.pycreates a genuine 12-commit demo repository.app/git_ingest.pyreads generic commit metadata, changed files, overlap history, and branch/range context using Git.scripts/codex_artifact.pyexports evidence and validates a strict, reproducible GPT-5.6-in-Codex artifact.app/analysis.pyverifies artifact provenance, evidence digest, event IDs, commit hashes, and file references before returning an investigation.app/ask_repo.pyserves three reference-validated, evidence-linked repository answers.app/repo_questions.pyproduces and validates four deterministic answers for ordinary repositories.app/cli.pyselects a local repository for analysis, context, or serving.app/server.pyexposes the selected timeline and branch review while restricting reference-validated OrbitCart artifacts to OrbitCart.frontend/renders the Developer Workspace, Ask the Repo, the timeline, and the Bug Origin Trace.
The default flow makes no paid runtime call. It replays the committed artifact generated by GPT-5.6 Sol through ChatGPT-authenticated Codex. If the artifact is missing or fails validation, the investigation remains runnable using an explicitly labeled local evidence fallback.
Reproduce the Codex artifact
python3 scripts/codex_artifact.py prepare
codex exec -m gpt-5.6-sol -s read-only \
--output-schema artifacts/orbitcart/analysis.schema.json \
-o .data/codex-run/analysis.json \
"Read artifacts/orbitcart/analysis.prompt.md and perform that task."
python3 scripts/codex_artifact.py finalize .data/codex-run/analysis.json \
--model gpt-5.6-sol
python3 scripts/codex_artifact.py validate
Ask the Repo uses the same workflow with artifacts/orbitcart/ask-repo.prompt.md,
scripts/ask_repo_artifact.py, and its own strict output schema. Both committed
artifacts are tied to the same OrbitCart evidence digest.
codex exec reuses ChatGPT-managed Codex authentication. The app does not need
an API key to replay the reference-validated result.
See the analysis design for grounding and fallback details and the evaluation guide for the scorecard.
Public deployment
python3 scripts/create_orbitcart.py
python3 scripts/build_public_demo.py
The build writes a static client and a minimal host worker to dist/. Pushes to
main run the full verification suite; production releases package the same
reference-validated build for the public host. No API key or paid runtime call is required.
Release screenshots
Analysis
View
Metric
- 13
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- OpenAIClaimed
4 of 5 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
286 KB
Source files
39
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
ved-devAI/AI_Time_Machine
55 files · 2.0 MB · @ 5f037c5
Structure
Interface
9 files · 16%Screens, components and styles rendered to the user.
Application logic
11 files · 20%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python46%
- Markdown29%
- CSS12%
- JavaScript9%
- HTML2%
- YAML0%
Share of indexed source by file size. Binary and vendored files are excluded.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.