For more complex projects I find this pattern very helpful. The last two gens of SOTA models have become rather good at following existing code patterns.
If you have a solid architecture they can be almost prescient in their ability to modify things. However they're a bit like Taylor series expansions. They only accurate out so far from the known basis. Hmm, or control theory where you have stable and unstable regimes.