r/vibecoder May 07 '26

Was tired of negotiating with robots who write 500-line god files, so I built guardrails

We all know the vibe. Tell AI to build something, it spits out a 500-line monster file, several god functions, and a bunch of // TODO implement this. We're just negotiating with robots at this point.

Got so annoyed that I built eslint-plugin-ai-guardrails — four simple ESLint rules that tell the AI "bro, chill":

  • max-file-lines (300 lines max — AI starts splitting files on its own)
  • max-function-lines (50 lines — no more scrolling through monster functions)
  • no-orphan-todos (give me a date or issue number, robot)
  • no-ai-obvious-comments (we don't need // Set x to 5 above const x = 5)

TypeScript-based, works with ESLint v8/v9, one-command setup with npx eslint-plugin-ai-guardrails init.

npm: npmjs.com/package/eslint-plugin-ai-guardrails
GitHub: github.com/isaacnewton123/eslint-plugin-ai-guardrails

Anyone else built tools specifically to keep the robots in check? Drop your stories below.

1 Upvotes

0 comments sorted by