It seems AI is about to avenge me for years of preaching against the evils of code complexity and against high LOC count falling on deaf ears.

AI has humbled most software devs, myself included, but at least with a low LOC count, a small number of dependencies and good separation of concerns, rectifying the issues is trivial. Can be done for the entire project in a couple of days.

For my own projects, each module has a clear attack surface and comfortably fits in the context window.

The scenario you want to avoid now is multiple modules interacting together in a complex way where each module is secure independently, but their shared responsibilities (improper separation of concerns) creates a gap which can be exploited. This was one of the key points from the recent Anthropic security article which stood out to me. The reason it's so dangerous is because it's difficult to get the AI to reliably analyze complex interactions between different modules as there can be many permutations. The boundaries are much simpler, more auditable and easier to patch if the module has clear responsibilities.