Change coupling
change_couplingAnalyze git history to find files frequently changed together, revealing hidden dependencies imports miss. Filter by repo, path, time window, or a single file.
Instructions
Find pairs of files that are often changed in the same commits in the last N days (merge commits excluded), most shared commits first. Reveals hidden dependencies that imports do not show, e.g. code and the config or test it always drags along. Pass "file" to see what usually changes together with one file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Time window in days. | |
| file | No | Only pairs that include this repository-relative file. | |
| 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. | |
| minShared | No | Minimum number of shared commits for a pair to be listed. | |
| maxFilesPerCommit | No | Skip commits touching more files than this (bulk renames, formatting). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Name of the repository that was queried. | |
| pairs | Yes | ||
| pairCount | Yes | All pairs with at least minShared shared commits. | |
| windowDays | Yes | ||
| scanTruncated | Yes | ||
| commitsScanned | Yes | ||
| commitsSkipped | Yes | Commits ignored for touching more than maxFilesPerCommit. |