All articles
how-to · 8 min read

How to Design Your Own Loop in 15 Minutes

A repeatable template for inventing loops that survive - and the three failure modes that doom most new loops.

By Simple AI Prompt
How to Design Your Own Loop in 15 Minutes

The five-part loop template

Every loop that works has the same shape:

  1. Trigger - the short slash command (/skeptic)
  2. Role - what mode the model enters ("You are now in Skeptic mode")
  3. Operation - the specific transformation ("list three weakest assumptions")
  4. Constraint - what shape the output must take ("be specific, avoid hedging")
  5. Exit - when to stop ("end with one concrete way the conclusion could be wrong")

Miss any one and the loop drifts.

The three failure modes

Failure 1: Too vague

"Make the answer better" is not a loop. The model interprets "better" twelve different ways. Always name the transformation precisely.

Failure 2: Too long

If your loop is over 100 words, it's a prompt, not a loop. Loops live in muscle memory. Cut ruthlessly.

Failure 3: No exit

Loops without a stopping rule drift into 2,000-word essays. Always specify the end: a sentence count, a numbered list length, or an explicit "stop here".

A worked example

Let's build /audit - a loop to audit any code for security issues.

  • Trigger: /audit
  • Role: "Act as a senior security engineer reviewing the code above for production."
  • Operation: "List up to five security risks. For each, give the line number, the attack scenario, and the one-line fix."
  • Constraint: "Skip stylistic issues. Only flag real exploits."
  • Exit: "End with the single most urgent risk."

Test it on three different code snippets. If it produces consistent, useful output, you've got a loop. If not, tighten the operation and try again.

The publication test

Before adding a loop to your personal library, ask: would I describe this in one sentence to a colleague? If yes, it's a loop. If you need three sentences, it's a prompt - keep iterating.