It would be nice to ask the composer to write unit tests, and then run them by running npm run test
or something similar then review the results, and fix any problems it finds then re-run the tests until it gets no errors.
Currently cursor asks for a human in the loop to authorize any terminals commands. If we could provide a whitelist of terminal commands this could work around this constriant and totally automate the unit testing headache.
We could also set a maxIterations
to stop infinite looping, if it cant fix it in say 10 iterations, then it just stops trying and summarizes where it got to.