Enforce TypeScript Module Boundaries
Inspect and enforce TypeScript module boundaries so consumers import through declared entry points while internals remain local. Use when deep imports, package cycles, or test access make contracts and refactors unreliable.
Runs on
What it does
Detect and enforce TypeScript package entry-point boundaries without assuming one repository layout.
When it fires
- design
- setup
- review
How it behaves
Scan static TypeScript import forms for cross-package deep imports under a caller-supplied directory whose immediate children are packages.
It does not install or overwrite a dependency-analysis tool before inspecting existing configuration.
It does not treat unresolved aliases or generated imports as proven violations.
It does not create a giant barrel, break environment-specific exports, or claim architecture quality from path depth alone.
Configuration
scripts/inspect-module-boundaries.mjs
- Version
- 1.3.0
- Requires
- node
- Licence
- RiskThis skill detects and enforce TypeScript package entry-point boundaries without assuming one repository layout; it does not treat unresolved aliases or generated imports as proven violations.
- Medium
- ModeHow it works: fixed rules, model instructions, or both.
- Deterministic and prompt
- Behaviour
- Advises, never blocks
- On failure
- Stops and reports
- LatencyThe skill detects and enforce TypeScript package entry-point boundaries without assuming one repository layout, using sequential evidence and verification steps.
- Bounded
- Data retentionWhether data remains after use and who manages its storage.
- Managed by the runtime
Often used with
All in Development