Skip to content

Compare interface churn with implementation churn to spot shallow modules #16

Closed

Description

@typeweaver

Context

A deep module (Ousterhout) hides a lot of implementation behind a small, stable interface. Git history can show this without parsing: if a module's entry points (barrels such as src/index.ts, files named in package.json exports) change about as often as its internals, or internal changes keep dragging the entry points along, the module is shallow or leaky.

Goal

Per module, codeheat reports interface churn against implementation churn and how often an internal change also touches the interface, and flags modules whose interface is as unstable as their internals.

Acceptance criteria

  • Entry points are found from package.json exports/main and index.* conventions, and can be overridden with a glob flag.
  • The Report gains additive per-module fields: interface revisions, implementation revisions, and the share of implementation commits that also changed the interface; documented in the schema and GLOSSARY.md.
  • reasons names modules whose interface changes in most of their commits.
  • Engine tests cover a stable-interface module and a leaky one with hand-computed values.

References

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