Two rules from this chapter, worth enforcing with a lint rule rather than a README: dependencies flow app → features → shared, never backwards; and a feature may import shared/ or its own files, but never another feature's internals — only that feature's public index.ts. Write validateImports(modules, imports). Each module is { path, layer, feature } (layer is "app" | "features" | "shared"; feature is that feature's name when layer is "features", else null). Each import is { from, to }, both module paths. Return the violating imports as { from, to, reason }, where reason is "wrong direction" or "cross-feature import".