A Code Aging & Decay Tracker - measures software entropy per module using git analysis, dependency drift, churn ratios, and knowledge decay signals.
Project description
Entropy - Code Aging & Decay Tracker
boto/compat.py scores 69. 490 modules depend on it. Every author who wrote it is gone. Its dependencies are years out of date. Nobody flagged this. Until now.
Software does not just accumulate bugs. It ages. The library it depends on evolved. The engineers who wrote it have left. Entropy makes that risk visible — as a number, per module, before production goes down.
Install
pip install entropy-tracker
Requirements: Python 3.10+, Git in your system PATH. No API keys. No telemetry. Code analysis runs entirely locally. Dependency checks query PyPI to detect version drift - no data about your code is sent anywhere.
Quick Start
entropy init ./my-repo # register repo + first scan
entropy report --top 10 # worst modules by decay score
entropy inspect payments/gateway.py # full breakdown + forecast
entropy diff --base main # entropy delta for current branch
First results in under 60 seconds on most repositories.
Sample Output
What It Measures
Four signals combine into one composite score (0–100):
| Signal | What it detects | Weight |
|---|---|---|
| Knowledge Decay | % of this file's authors who are still active in the repo | 35% |
| Dependency Decay | How far behind this module's direct dependencies are | 30% |
| Churn-to-Touch Ratio | Chaotic edits vs intentional refactors | 20% |
| Age Without Refactor | Months since the last deliberate restructure | 15% |
How signals are computed: Knowledge decay checks author activity within a 36-month window. Churn is classified by total lines touched (>200 = churn) vs net line change (<10 with multi-file changes = refactor) - not by commit messages, which are unreliable. Dependency checks query PyPI for current release history and pip-audit for CVE counts.
Weights reflect recovery cost. Knowledge decay has the highest weight because lost institutional knowledge is irreversible on any sprint timescale. You can update a dependency in an afternoon. You cannot rebuild three years of context in a sprint.
Scores above 85 are Critical. Above 70 are High. All weights are configurable via entropy.toml.
Does It Actually Work?
We ran Entropy across Django, boto, and requests. Files scoring above 70 showed significantly more bug-fix and hotfix commits in their history than files below 50. The correlation is not causal - high-entropy files attract bugs and are touched repeatedly to fix them, which compounds the score over time. This is the pattern Entropy is designed to surface before it becomes an incident.
The tool processed Django's 2,903 modules across 2,782 commits in 34 seconds.
CI Integration
entropy diff --base main
# Shows entropy delta for every file changed in the current branch
# .github/workflows/entropy.yml
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history required — do not use fetch-depth: 1
- run: pip install entropy-tracker && entropy diff --base main
Performance
| Repository | Modules | Scan Time |
|---|---|---|
| click | 62 | ~11s |
| Django | 2,903 | ~34s |
| boto (full history) | 938 | ~45s |
Subsequent scans are faster — PyPI responses are cached locally for 24 hours.
Why Not SonarQube / Dependabot / CodeScene?
| Tool | Prevents bugs | Surfaces knowledge loss risk |
|---|---|---|
| SonarQube | ✅ | ❌ |
| Dependabot | ✅ | ❌ |
| CodeScene | Partially | Partially (no dep drift, no CI diff, enterprise pricing) |
| Entropy | — | ✅ |
Entropy's focus is not code quality. It is the risk that comes from a module nobody fully understands anymore — which no other tool in this list measures.
Live Demo
entropy.kwixlab.com - pre-loaded scans of Django, FastAPI, and boto. No login required.
Roadmap
entropy simulate --author-leaves alice@company.com- JavaScript / TypeScript support
- GitHub Actions marketplace integration
- Validation dataset: entropy score vs production incident correlation
Built by Hari om Singh · PyPI · MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file entropy_tracker-1.0.1.tar.gz.
File metadata
- Download URL: entropy_tracker-1.0.1.tar.gz
- Upload date:
- Size: 46.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38bd3ebd6d440b6d11ad31b66840cd8df202586d728ff86239ebb16786b3d559
|
|
| MD5 |
869a8268bdebae9f11b5ba214669be4f
|
|
| BLAKE2b-256 |
885923d54773e0529eebf6d1acab3e1f4bf40029a198b337818cca1bf83ae30d
|
File details
Details for the file entropy_tracker-1.0.1-py3-none-any.whl.
File metadata
- Download URL: entropy_tracker-1.0.1-py3-none-any.whl
- Upload date:
- Size: 50.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ee15f11f9a16282cab26a72a3b89248927892991e9b356b7b507dd54a5e3d3c
|
|
| MD5 |
41e732b80a510f20c307968344051e25
|
|
| BLAKE2b-256 |
7252c276f3df41fa59da20a6bf48f9e1b81e69d4e989c6880eb3b32744187808
|