Modules and imports
A module is a file that shares some of what it defines using export. Another file pulls those parts in using import. Anything not exported stays private, so a module's insides can change without breaking the files that use it.
The import lines at the top are the quickest map of a file: they say what it depends on. They are also where agents go wrong in a way you can check, by importing a function that doesn't exist or a package nobody ever published.
Say it to your agent
“Run bun run typecheck after adding imports. For every new package in package.json, show me its page on npmjs.com and how many weekly downloads it has before you install it.”