In my experience a legacy codebase is where LLM shines. What would take days to grok is understood and explained almost immediately. There was a bit of job security with being the one whose worked with IIFEs to manage state.
You must know the codebase well if the LLM is slowing you down.