Code age
code_ageFind stale code and knowledge loss: see how long ago each file last changed, its last author, and whether that author still commits; includes age histogram and departed-author counts.
Instructions
How long ago each file on HEAD last changed, oldest first, with its last author and whether that author still commits to the repository. Also returns an age histogram, the median age per directory and how many files were last touched by someone who has left. Useful for "which parts of the code nobody touches any more?" and "where are we losing knowledge?".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Restrict to this file or directory. | |
| repo | No | Repo name or path; defaults to the first configured repo. | |
| limit | No | Maximum number of results. | |
| exclude | No | Globs to leave out, as in file_hotspots. | |
| minAgeDays | No | Only list files at least this many days old (the summary covers all files). | |
| inactiveDays | No | An author with no commit in this many days counts as inactive. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The requested file or directory, or null for the whole repo. | |
| repo | Yes | Name of the repository that was queried. | |
| files | Yes | Oldest first, at least minAgeDays old. | |
| ageBuckets | Yes | ||
| directories | Yes | Oldest (highest median age) first. | |
| filesOnHead | Yes | Files on HEAD in the area, after exclude. | |
| inactiveDays | Yes | ||
| medianAgeDays | Yes | ||
| scanTruncated | Yes | True if history was cut off; files last changed before the cut-off are missing. | |
| commitsScanned | Yes | ||
| inactiveAuthorFiles | Yes | Files whose last author has not committed anywhere in the last inactiveDays. |