When I got it, one part of it was a single Perl file with about 5k lines of code, with 20+ variables visible in the whole file, with 10+ levels of nested loops, basically all of them with seemingly random "next LABEL" and "last LABEL" statements, which are basically slightly-constrained GOTOs. Oh, and the variable names very mostly meaningless to me (one or two letters).
This was only a small part of my job, over the years I've managed to reduce this mess, broke out some parts into smaller functions, reduced the scope of some variables etc. but a core remains that I still don't really understand. There's some mental model deep in the original programmer's mind that I simply cannot seem to grasp and that the code structure is based on.
(We're now replacing this whole thing by cleaner re-implementation, with unit tests, a less idiosyncratic structure, and more maintainers).
Now imagine what it must feel like if the original programmer wasn't human, but some alien mind that we're even further from understanding.
If you want the highest chance of success, use a reasoning model (o3-mini high, o1 pro, r1, grok 3 thinking mode) to create a detailed outline of how to implement the feature you want, then copy paste that into composer.
It one shots a lot of greenfield stuff.
If you get stuck in a loop on an issue, this prompt I got from twitter tends to work quite well to get you unstuck: "Reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions before we move onto implementing the actual code fix."
Just doing the above gets me through 95% of stuff I try, and then occasionally hopping back out to a reasoning model with the current state of the code, errors, and logs gets me through the last 5%.
But please: would you prefer something else?