Loop/Prompt Library / Planning & second-opinion review
๐ Builder and reviewer hand-off
Two agents in separate copies of the code take turns: one builds a small change with a test, the other proves the test really catches the bug.
Use it when: Your repo has reliable tests, build, and lint, and the task suits repeated hand-offs.
๐ Stops when: Each accepted change has a test that fails without the fix and passes with it, and all checks pass.
Copy this loop
Set up two agents in separate git worktrees for [task] in [repository]. Agent 1 (builder) reads a shared state file, makes one small change, and adds a test that fails before and passes after. Agent 2 (reviewer) re-runs tests, build, and lint, and proves the test by undoing the fix and watching it fail. Accept the change only if both pass. Send protected or repeatedly failing work to me. Run at most [8] hand-offs. Report each accepted change and its proof.
Review every change the agent makes before you keep it. Set a budget or round limit โ the prompt includes one.
Idea from Forward Future's Loop Library ยท by @inferencegod. Prompt rewritten in plain English by FixKit AI.
More loops like this
Turn an idea into a clear plan
Interviews you about a rough idea, then writes two files: what to build, and how the AI should build and check it.
Make the plan buildable
Fills gaps in a new project's planning docs until two reviewers would build the same thing from them.
Spec review rounds
Writes a spec for one ticket, has a tough reviewer check it against a rubric, and keeps fixing until it is approved.
Devil's advocate review
Has one AI argue your design is wrong, logs every objection, and makes the builder fix or justify each one with proof.
Two AIs must agree
Takes turns having AIs from two different companies review your work until both approve the exact same version.
Builder + tough reviewer (Claude and Codex)
Claude builds and opens a pull request, Codex reviews it harshly, Claude fixes, and they repeat until it passes.
