What is the `public-api` rule in Steiger?
masterThe public-api rule enforces that every slice (and segments on layers that do not have slices) must contain a public API definition. This definition serves as the sole entry point into that slice or segment.
By requiring a public API (typically an index.ts file), you ensure that modules outside of the slice can only reference the public API and cannot depend on the internal file structure. This provides stability during refactors, allowing you to change internal implementation details without breaking external consumers.