Architecture & ownership
17 rules
Dependency boundaries
Avoid cross-product code dependencies Product code does not depend on another product's implementation.
sarj/graph/cross-product-import error Follow the code dependency matrix Production code dependencies follow the closed component-kind matrix. sarj/graph/disallowed-code-dependency error Keep applications independent Applications do not depend on another application's implementation. sarj/graph/application-imports-application error Keep code dependencies acyclic Boundary-clean production code dependencies are acyclic. sarj/graph/code-cycle warning Keep contracts implementation-free Contracts depend only on other contracts. sarj/graph/contract-imports-implementation error Keep libraries below applications Libraries do not depend on application implementation. sarj/graph/library-imports-application error Keep shared code product-neutral Shared components do not depend on product implementation. sarj/graph/shared-imports-product error Remove self-dependencies Components do not declare dependencies on themselves. sarj/graph/self-dependency error Use compatible edge endpoints Constrained non-code edges connect compatible component kinds. sarj/graph/edge-endpoints error Repository layout
Keep component roots disjoint Each tracked path has one declared component owner.
core/layout/non-overlapping-root error Use canonical component paths Component paths match their declared ownership kind. sarj/layout/component-path error Use canonical operational paths Operational components use canonical deployment paths. sarj/layout/operational-path warning Naming
Align IDs with ownership Stable component IDs include their declared ownership namespace.
sarj/naming/component-id error Name the application role Application names end in a controlled deployable role. sarj/naming/application-role warning Use kebab-case capabilities Capabilities use one lowercase ASCII kebab-case token. sarj/naming/capability-token error