Use appium or XCTest or swift testing; generate the tests first (failing) from the spec.

The loop is basically then a while loop:

While (tests fail) { trigger agent: spec, failures list }

for bugs, write failing tests.

Its basically TDD.

Loops do nothing useful beyond making the “spec -> code” step more “hands off” and let you be confident that the code you write does what is intended.

Obviously you see the issue: writing the loop harness is > effort than not having it…

…but the idea is that you run “spec first” and are totally hands off on the code, just updating the validation step and then waiting while the agent iterates over and over to solve for some solution that passes the loop harness.

People suggest that it is possible to go, eg. directly figma/jira to harness via (random tool here), saving even more time and invoking even fewer humans, but thats currently, as far as I can tell, actually just hype.

No one is actually doing that effectively.

Loops are currently carefully hand crafted, which makes them tedious and of questionable value imo.