LLMs can't write particularly large amounts of code before they start getting confused.
They can do maybe 1k lines of code before they start losing track of how the whole thing wires together.
This will presumably get better as larger context windows get more resilient, but presumably LLMs will always have a steeper dropoff in ability for large code bases.
But you can set up the system to still get maximum leverage out of that ability.
For example, instead of having it write components from scratch, give it high-quality, useful components to wire together in novel ways.
And define clear interfaces where other code can magically supply the necessary inputs from elsewhere in the system.