Although a hard line-count limit is not normally a good rule, telling the agent to refactor when files exceed 200-300 lines is appropriate for AI, because agents frequently produce massive files and refactoring them after the fact tends to break all the tests.

normativepending

Speaker

Unknown Speaker

Evidence Quote

“by the time I noticed it the refactoring would break all the tests and it would just take a long time so just get ahead of it”

Source

Vibe Coding Tutorial and Best Practices (Cursor / Windsurf)— Matthew Berman
Created: 6/18/2026, 2:17:59 PM

Your notes

Loading notes...