Do you make your AI reuse existing dependencies instead of installing new ones?
by•
The easiest way I found to stop my workspace from bloating with duplicate tools was adding a strict rule to my instructions: check what's already installed before running npm install.
Before that, every little UI tweak resulted in a brand new package being pulled in, leaving behind a massive mess of dead code and potential security gaps.
If you're building with AI agents daily, how do you keep your node_modules from getting completely out of hand?
14 views
p/meridian-16
p/google-cloud-platform
p/producthunt
p/reso
p/zush
p/kodlo
p/neoagent
p/beamfy
p/runevr
p/netclicker
p/expert-chase-deleted-1107920
p/faraday-4
p/gatrends
p/kanbanq
p/truedraft-cad
p/findergit
p/thebold
p/orbit-app-blocker
p/cleared-quit-nicotine
p/murror
Replies
I write those rules once and share them. There's one global instruction file in git, plus shared docs on coding standards, DB, mail and security that every project links to, so a rule I add today applies everywhere tomorrow. The ones that keep getting broken get promoted to hooks, which block the command before it runs. A rule an agent can forget is a suggestion.
@hisashispace i like the idea of turning repeated mistakes into hooks. it makes the rules much easier to follow and saves time across projects. having one shared place for instructions is a smart way to keep things consistent.
@akhilesh35602 Thanks! The rule of thumb I ended up with: if the agent breaks the same rule twice, it gets a hook.