The Problem
Software projects change over time. Repositories can live for decades as developers leave and architectures shift, which makes it hard to track codebase churn and see if any original code survives.
This project is a visualization engine that measures codebase entropy using the Ship of Theseus paradox. It tracks when lines of code were written and how long they survive.
The visualization shows teams their codebase health. It helps them find "fossils" (the oldest surviving lines of code) and see the actual timeline of major rewrites.
Architecture
The system separates data generation in Python from the Vanilla JS frontend. They communicate through static JSON files, which means the entire dashboard can be hosted for free on GitHub Pages without a backend server.
1. Data Pipeline
The pipeline calls the native git binary directly instead of using Python wrappers to improve speed. The extraction runs incrementally, skipping months the system has already analyzed.
It uses ThreadPools to run git blame --line-porcelain concurrently across all tracked files and extracts line ages with regular expressions.
2. Fossil Extraction
The system calculates fossils (pointers to the oldest surviving code) independently from the main timeline. The Genesis protocol finds the first line of code pushed to the repository. The Survivor protocol recursively blames HEAD to find the oldest line that is still in use today.
3. UI and Data Delivery
The frontend fetches the configuration file and builds the repository selection grid. When you click a repository, the app fetches that dataset and renders the D3.js chart.
Automation
GitHub Actions runs monthly updates on the configured repositories. The workflow generates incremental JSON snapshots and commits the new data back to the repository.
The pipeline runs in three steps. First, it clones the repo and loads the configuration. Second, it runs the incremental analysis and updates the survivor fossils. Finally, it minifies the data payloads and commits the changes back to the origin.
The pipeline only evaluates missing months and updates the "Living Fossil" pointer. It skips re-evaluating the entire history to save time in CI environments. A bot then pushes the updated payloads to the main branch.
Source Code & Documentation
To see the code, read the full API documentation, or run this project locally, head over to the GitHub Repository.
What's Next
I plan to integrate the tool more deeply into CI/CD pipelines so it can track fossils on every major release. I also want to add support for tracking architecture changes across multiple repositories at once.