Skip to content
sarj/graph/shared-imports-product

Keep shared code product-neutral

Shared components do not depend on product implementation.

error

Examples

FlaggedFails
shared library --package-dependency--> beta library
PassesClean
beta application --package-dependency--> shared library

Why it matters

A shared dependency on one product reverses the intended ownership direction.

How detection works

A shared component has a code dependency on a product-owned component.

What is inspected

  • ownership and declared code dependencies

How to fix it

Replace implementation coupling with an owned library or runtime contract.

  1. Move the dependency behind a shared contract or reverse its direction.

Verify

  • Run repo-lint again and confirm the rule passes.