Skip to content

Show co-change breadth so hub files stand out #6

Closed

Description

@typeweaver

Context

A barrel that changes in almost every commit (seen on a real monorepo: 74 of 97 commits) co-changes with many different files, but with none of them often enough to cross the coupling thresholds. inspect then reports "no change coupling above the thresholds", although the file is a hub that every change passes through — a strong modularization signal.

Goal

The report exposes a file's co-change breadth (how many distinct files it changed together with in the window), so hubs are visible in inspect, the JSON, and the treemap panel even when no single partner is strong.

Acceptance criteria

  • FileStats gains an additive field (schemaVersion stays 1) with the number of distinct co-changed files, documented in packages/engine/src/report/report.ts and GLOSSARY.md.
  • A file whose breadth is in the top few percent gets a reasons line such as "changes together with 41 different files".
  • An engine test with a hand-built history proves the count, including that commits above maxCommitFiles are ignored.

References

  • packages/engine/src/coupling/, packages/engine/src/hotspots/reasons.ts

Activity

  1. typeweaver commented on Sep 30, 2026

    @typeweaver
    MemberAuthor

    Related: #15 adds the module-level view of the same question (cohesion and cross-module coupling); hub files are its file-level counterpart. Roadmap: #20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions