With the new composer agentic functionality, I’ve found that when hitting one of those issues which gets a bit cyclic, I can ask it to write code in a test file (away from my main code) and perform tests to ensure the code is working as expected before implementing it into the main code.
For example Im working on something which visits various web sites and gets certain information. To do this it needs to know what the sites are returing, so within composer I can get it to run some test code, drop the results to a log file and then automatically review that log file and suggest corrections.
This is proving really interesting today and saving me from damaigng working code.