Change coupling
change_couplingFind file pairs that frequently change in the same commits within a time window, revealing hidden dependencies imports miss. Focus on one file to see what it changes with.
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 | Size of the time window in days. | |
| file | No | Only pairs that include this repository-relative file. | |
| path | No | Restrict to this file or directory. | |
| repo | No | Repository name or absolute path from the allowlist. Defaults to the first configured repo. | |
| limit | No | Maximum number of results (1-100). | |
| exclude | No | Glob patterns for files to leave out, same syntax 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. |