The Four Step Process to Loop Engineer ANYTHING (+ Why Prompt Engineering Isn't Dead)

Study Guide

Overview

Chase AI argues that the popular framing of "loop engineering" has lost the plot. The claim that prompt engineering is dead and that you should only do loop engineering is, in his view, backwards. A loop is still a prompt. It is just a prompt repeated over and over with some additional scaffolding and a defined success criteria. Loops and prompts are both tools, and the discipline is knowing when each one fits the job.

The video defines loop engineering as giving an agentic coder (Claude Code, Codex, or similar) a task and setting it up to complete that task by iterating repeatedly until it hits a defined success criteria, in a way that is efficient, effective, and sensible. It then breaks down the four phases of any loop and a four-step journey for turning a one-off prompt into a self-improving system.

What Loop Engineering Actually Is

Instead of saying "here is the prompt, go do it," you set the task up so the agent loops iteratively until it meets a success criteria you define ("here is how you know you've done it right"). At its core it is prompts stacked on top of prompts, run over and over until the task is complete. That is why "prompt engineering is dead" is a misnomer: the loop is built out of prompts. It is also not a one-size-fits-all tool. You do not need a loop for everything, but sometimes you do, so it is worth knowing how to build one.

The Four Phases of Every Loop

Every loop has four phases, plus a stop condition.

Phase 1: Trigger

How the loop gets kicked off and started. Options include scheduled tasks or routines inside Claude Code, a cron job, or a webhook. The mechanism does not matter much; you just need some way to start it, ideally automatically.

Phase 2: Execution

Where the AI actually does the work, usually in a coding manner. This should typically be a skill, because skills are perfect for telling Claude Code to do a specific thing in a specific way to get a specific output, which is exactly what a loop is aiming for.

Phase 3: Verification

This is all about success criteria: how do you know you actually completed the task? Sometimes this is very clear. For a Python application where the goal is to run faster, the success criteria is obviously runtime, an objective, measurable target. But not everything is like that. A loop that finds AI news and writes LinkedIn articles, aiming to create "better" articles over time, has fuzzy success criteria. Is success engagement? Is engagement even tied to quality? You can run a loop with fuzzy criteria, but understand that it reduces the loop's effectiveness.

Phase 4: State

Output and memory. The real value of loop engineering is that the system can improve on itself every run. For that, each loop needs a document or database it can read to see the previous result, what was tried, what worked, and what didn't. Without state, every loop runs in isolation and just tries different things blindly. This echoes the Ralph loop concept: record your output, then have the next execution read it to decide what to try next. That is the only way the loop becomes self-improving.

Stop Criteria

Not strictly a phase, but essential: when do you stop looping? Sometimes you stop when the goal is verified. But you should not run forever, because AI isn't free. Build in a hard stop, such as "we're no longer making progress" (the Python runtime stops dropping) or a fixed cap like eight iterations.

The One Thing to Remember: Success Criteria

If you take nothing else away, focus on success criteria. It also determines whether a task even belongs in a loop. If the task has very clear, ideally objective success criteria like a number, loops are great. If it is fuzzy (the LinkedIn example), maybe it still makes sense, but you may need a human in the loop or a hybrid approach. Without a strong goal and clear success criteria, the whole thing is pointless; you will just spin your wheels and burn tokens.

Loops vs Auto Research vs /goals

  • Auto research does much of what loop engineering does automatically, but it explicitly needs defined, hard success criteria. It cannot handle fuzzy goals. The Python "make it faster" case is a perfect fit; the fuzzy LinkedIn case is not.
  • /goals (in Claude Code, and the equivalent in Codex) is loop engineering in a single session: iterate until you reach a condition, then you're done. Loop engineering at large is meant to have an infinite horizon, almost like running /goals all the time with a self-improvement aspect. You cannot tell /goals to "make me better LinkedIn articles forever"; it can write one now, in a silo, but not run every week and improve.

The Four-Step Journey to a Loop

  1. Do it manually. Pull up Claude Code and literally ask it to "research AI stuff and make a LinkedIn article." This is not a joke; it has to be the first step, because you need to verify the task is even possible. Many people get stuck here forever.
  2. Codify it into a skill. Once you've confirmed it works and is worth repeating, turn the process into a skill so you do not re-explain steps A, B, and C every time.
  3. Automate the skill. Set up a routine (for example in Claude Code) whose instruction is simply "run the LinkedIn article skill," scheduled daily at 9am. This already handles the trigger and part of the execution before you've even reached true loop engineering.
  4. Add success criteria and state logging. To go from an automated skill to a real loop, add the success definition and state logging. Where does the information go? You posted to LinkedIn, but can you scrape the engagement (say, likes), record it, and use it to improve, noting which hook was good, which CTA worked, and so on?

If you can define success in some way (even fuzzily) and you have a way to record state, you are in good shape, and you may not even strictly need a separate "step four" beyond these additions.

Tiers of Verification and Judging Quality

There are roughly five tiers of verification. The first three are where you want to live: clear success criteria, ideally deterministic (a yes/no), or a rule/constraint to improve upon (like Python runtime). A number like likes lands around tier three. The fuzzier tiers (three through five) force the question: how do I judge success?

  • LLM as judge: If Claude Code wrote the articles, you probably do not want Claude Code judging them, because AI systems tend to like their own work. Consider having a different model (for example Codex) judge Claude Code's output. Be careful any time the AI judges something subjective in its own loop.
  • Human in the loop: Bringing yourself in makes the loop less autonomous and raises the question of whether it should be a loop at all, but it can be the most powerful option. Engagement can be high for reasons unrelated to article quality (timing, subject), so a human can judge whether the result is genuinely a gold standard worth learning from.

There is no perfect answer; this is case by case and requires experimentation. These decisions are what determine whether your loop is engineered correctly.

Putting the Loop Together

For the LinkedIn example, settle on "likes" as good enough: trigger at 9am, execution via a skill, goal of maximizing likes, verification via a scraper, and state stored in a database that records each article with its like count. The loop runs daily at 9am.

Reality adds nuance. There is a delay between writing an article and getting likes, so in practice you run a second loop that scrapes likes every 24 hours and keeps the database updated. Once you've accumulated a month of data, each 9am run does more than fetch AI news: the skill also reads the database of past articles and likes, analyzes what's been trending, which hooks and CTAs were used, and feeds that back into execution. That feedback is the self-improvement.

By contrast, the Python "make it faster" loop is simple: trigger every 10 minutes, run the app, check the time, keep a handoff doc of times and code diffs, and keep changing the code to see which diffs lower the runtime. The lesson: clear success criteria make loop engineering much easier; fuzzy criteria add real complexity.

Key Takeaways

  • A loop is just a prompt repeated with scaffolding and a success criteria, so prompt engineering is not dead.
  • Loops and prompts are tools; not every task needs a loop.
  • Every loop has four phases: trigger, execution, verification, and state, plus a stop condition.
  • Success criteria is the single most important thing, and it dictates whether a task even belongs in a loop.
  • Build execution as a skill so it is specific and reusable.
  • State and memory are what make a loop self-improving; record what worked and what didn't (Ralph loop style).
  • Add a hard stop so you don't burn tokens forever.
  • Auto research needs hard criteria; /goals is single-session; loop engineering is the infinite-horizon, self-improving version.
  • Follow the four-step journey: manual, then skill, then automation, then success criteria plus state logging.
  • For fuzzy goals, consider a different model as judge or a human in the loop, and expect to experiment.
YouTube