as part of the prompt, have a test suite with test files. Its still fully automated by the LLM but adds confidence
ultimately you are right, the buck needs to stop somewhere, but at least in my experience, the more you add quality/test checks as LLM workflows, the higher the rate of success.