Loop/Prompt Library / Running AI agents well
๐ Predict, act, check
Before every meaningful action, the agent writes what it expects to happen, then checks if that is what really happened.
Use it when: An agent is about to change code, files, or systems where wrong assumptions could cause damage.
๐ Stops when: The goal is reached, a prediction fails badly, or there is no good next step.
Copy this loop
Before each meaningful action on [task], write a short snapshot: known facts, unknowns, constraints, my goal, and your permissions. Name the risky assumption you are tempted to make. Propose the smallest useful next step and predict what should change, what should not, and how you will confirm it. Act only if it is in scope. Then compare prediction vs reality and log it. Continue only if the picture still holds. Stop after [10] actions, a big surprise, or my approval is needed.
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 Nishant Dodiya (@NishantDodiya4). Prompt rewritten in plain English by FixKit AI.
More loops like this
Agent workspace health check
Reads a project's notes and state, without changing anything, and grades whether a new agent could safely pick up the work.
Stop and check before continuing
After an agent finishes a task, it reports what is done and whether the next step is safe, then waits for you.
Clean handoff note
Before a session ends, writes a note so the next person or agent can continue without guessing.
Lessons that stick
Keeps a playbook of lessons from repeated runs, tests one lesson at a time, and only keeps lessons that keep working.
Fair-test experiments
Improves a prompt or piece of code through saved, fairly compared experiments that can pick up again later.
Champion vs challenger
Keeps the current best prompt as champion, and a new version only replaces it if it wins on fresh test cases it never saw.
