Enforce Source Import Boundaries
- Define canonical package/service roots, public entry points, allowed dependencies, and mirrored contract pairs.
- Scan supported source files without following symlinks or entering generated/vendor roots.
- Normalize each relative or aliased import to its resolved owner.
- Reject package-relative escapes, private deep imports, undeclared cross-service imports, and cycles forbidden by policy.
- Hash mirrored contracts and fail when parity cannot be proven.
- Report exact source location, resolved owner, violated rule, and suggested public boundary.
- Distinguish type-only, test-only, generated, and runtime imports without silently exempting them.
- Re-run after generators/builds so derived imports cannot reintroduce drift.
Use scripts/audit_import_boundaries.py with a project-owned JSON policy. The script is read-only and does not rewrite imports.