Architecture rules the compiler checks
Code review is a bad place to enforce layering, because a tired reviewer misses an import. I wrote a native Dart analysis-server plugin with 17 rules, so a cross-module import or an off-design-system colour now fails dart analyze. Getting there meant solving a dependency conflict the usual lint packages could not: the plugin runs in its own isolate with its own analyzer version.