●  Agent loops \u00b7 plan then execute \u00b7 copy-paste playbook
EST. 20241 makerBuilt in public
Agent loop \u00b7 Strategy loop \u00b7 7 steps

Plan Then Execute
plan first, then build.

For work too big to hold in one prompt. You agree on a written plan with visible checkpoints, then the agent executes one step at a time — and stops for review whenever reality differs from the plan.

Typical run: 30 min–2 hr typical \u00b7 Copy any prompt box and hand it to your agent as-is.

Loops / Plan Then Execute

\u00a7 01

When to use

7 steps30 min–2 hr typical
  • The task spans several files or systems and one giant prompt keeps drifting off track.
  • You want review points before irreversible actions (migrations, deploys, bulk edits).
  • Previous agent runs finished fast but solved the wrong problem — alignment is the bottleneck.
  • You can spare ten minutes up front to approve a plan that saves an hour of rework.
\u00a7 02

The steps

one prompt per stepcopy \u00b7 paste \u00b7 run
01State the done-line
Write the goal as one verifiable sentence plus 3 acceptance checks. Example: "Done means X. Accept when: (1) ... (2) ... (3) ..." Ask two clarifying questions at most, then stop for approval. Do not plan yet.
Why: If done is vague, every step will be vaguely right and concretely wrong.
02Draft the stepwise plan
Draft a plan of 4–7 numbered steps. Each step states: what changes, which files, how to verify, and what needs human approval. Mark irreversible steps explicitly. Stop and wait for approval — do not execute.
Why: A plan you can point at is a plan you can correct.
03Freeze scope and order
Restate the approved plan verbatim with step numbers frozen. List anything explicitly OUT of scope. Declare the checkpoint rule: stop after each step and report. Then stop.
Why: Approved plans beat brilliant improvisation — lock what was agreed.
04Execute one step, then report
Execute ONLY the next approved step. Then report: what changed (files + lines), the verification output quoted, and any deviation from the plan. Stop and wait — do not start the next step.
Why: One step per turn keeps review cheap and reversals small.
05Verify at each checkpoint
For the step just executed, run its stated verification (test, build, query, screenshot — whatever the plan named). Paste the raw result plus PASS/FAIL. If FAIL, propose one correction without applying it, then stop.
Why: Evidence per step compounds into trust at the end.
06Re-plan on deviation
If verification failed or new information appeared, propose a revised plan for the REMAINING steps only. Mark what changed and why in under 80 words. Stop and wait for approval before continuing.
Why: Plans meet reality; the loop survives by rewriting the plan, not ignoring it.
07Close with the acceptance run
Run all acceptance checks from step 1 in order. Quote each result. If all pass, write a closing note under 120 words: goal, steps taken, files changed, checks passed. Then stop.
Why: The done-line from step 1 is the final judge, not momentum.
\u00a7 03

Stop conditions

exit criteria
  • Every acceptance check from the done-line passes with quoted evidence.
  • All executed steps match the approved plan (deviations were re-approved in writing).
  • The closing note lists goal, files changed, and check results.
\u00a7 04

Failure modes

what goes wrong + guardrail

Executing before approval

Symptom: the agent plans and immediately runs all steps. Guardrail: the plan turn must end with a stop — execution without written approval restarts the loop.

Checkpoints get skipped

Symptom: three steps land in one reply with one vague “works”. Guardrail: enforce one step per turn; any multi-step reply is rejected and redone.

The plan never fits reality

Symptom: every step deviates and re-plans eat the clock. Guardrail: two re-plans maximum — the third deviation stops the loop and asks a human to re-scope.

\u00a7 05

More loops

5 playbooks
\u2190 All loopsmosaic/lab \u00b7 agent loops