Repository navigation
feat: build tangles from files by default - #44
Merged
Merged
Conversation
`--granularity` now defaults to `file`, so a tangle is a set of files and the move search applies. On four public repositories the old default found 11 directory tangles and fixed 1. The new default gives 40 tangles each, and 109 of 160 get a move. Eight blind judges picked the file section every time. Duplication ranking and placement keep the `auto` grouping, because their spread weights were fitted on it. Their output is byte-identical to the old default on all four repositories. A test pins this on a fixture where the two groupings rank differently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S7cyneSpBhH5XCwE3t8w1Y
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes for the reader
The
## Module tanglesection now lists cycles between files, not directories, unless you pass--granularity. At file level, thicket can say which declaration to move and where. At directory level it mostly could not.Example (the
movestest fixture, 22 files):Before, with directories as modules:
Every cycle sat inside one directory, so grouping by directory hid all of them.
After:
On the four public repositories:
Blind judges compared the two sections, one judge per order on each repository. The brief asked which section to hand an agent that must reduce the cycles.
What does not change. The duplication sections are byte-identical to the old default on all four repositories.
--granularity autostill gives the old tangle view.How it works
--granularitynow sets only the dependency graph: the tangles, propagation cost and the header. It defaults tofile.auto. A copy that spans modules weighs more. Atfile, every multi-file copy would span modules, which changed 7 to 15 of 45 duplication findings per repository. Those weights were fitted on judged data underauto.Tests
callsitefixture, where the two groupings rank differently. It checks that the default ranks duplication the same asauto. Pointing the ranking at the file graph fails it.autosizing now passgranularity: "auto".check:boundaryare clean.Known, not fixed here
At file level an edge can show weight
0. It is a dynamicimport()or a side-effect import, which binds no name. One repository has 134 of them. This predates the change, but more readers will now see it.🤖 Generated with Claude Code
https://claude.ai/code/session_01S7cyneSpBhH5XCwE3t8w1Y