I routinely see Astra extract related functionality into it's own file after it gets past a certain size, unprompted.
And prompted it can extract the black boxes if you tell it what the boxes are or what to look for.
Same for cleaning up tech debt after organic development, it's suggestions on how to simplify and modularize are good, but you need to prompt.
Given that the prompts are quite generic, "look for technical debt, suggest simpler architectures, what could be extracted in a separate module", it won't be long till it will do it on it's own.