before writing a lot of code with agents, first ask your agent to create a lint rule that caps how many lines a single code file can have. i typically go with 1000
this is the easiest win that has a lasting impact on the health of your codebase
and do it as early as possible in your project, because unwinding it is costly later on