Currently it doesn't use the spec / plan phase at all. When you iterate we just look at the new prompt + the code + the schema instead of the previous plan and iterating on that to produce a new plan before starting to code.
This came up alongside #870 while talking to @seefeldb since we can now see the silly spec that would be generated in its current form.
e.g.
There's also plenty of room for improvement in the prompting here.