In short
Say three feature modules should never import each other. Today you'd write a separate rule for every pair. This lets you say it once: 'these modules are mutually independent.'
Problem
Enforcing that a group of sibling modules stay decoupled is a common need; expressing it today requires N×(N-1) pairwise should_not().depend_on_files() rules that are easy to get wrong or leave incomplete. A single independence assertion is declarative and complete.
Proposal
Add a mutual-independence assertion to the existing slices API, e.g. project_slices("src/").defined_by("src.features.(*)").should_not().depend_on_each_other() — one rule instead of N×(N-1) pairwise file rules.
Acceptance criteria
In short
Say three feature modules should never import each other. Today you'd write a separate rule for every pair. This lets you say it once: 'these modules are mutually independent.'
Problem
Enforcing that a group of sibling modules stay decoupled is a common need; expressing it today requires N×(N-1) pairwise
should_not().depend_on_files()rules that are easy to get wrong or leave incomplete. A single independence assertion is declarative and complete.Proposal
Add a mutual-independence assertion to the existing slices API, e.g.
project_slices("src/").defined_by("src.features.(*)").should_not().depend_on_each_other()— one rule instead of N×(N-1) pairwise file rules.Acceptance criteria
project_slices("src/").defined_by("src.features.(*)").should_not().depend_on_each_other()fails if any slice imports another, naming the edge.defined_by/defined_by_regexslice definitions.