35 loops that keep a product alive after it ships. A loop finds its own work, hands it to an agent, checks the result, and writes down what it learned. You build it once. It runs without you after that.
git clone https://github.com/fakiolinho/From-Prompt-to-Loop.git && cd From-Prompt-to-Loop && ./run-all-demos.sh
./install.sh ~/code/my-app 02
Every loop starts with one question, and how it answers decides what you pay. The third answer is the one most people leave out, and it is the expensive one: a check with only two will say “there is work” when it means “I cannot tell”.
WIRING.md lists every setting all thirty five loops read. Anything you leave unset simply exits 2 and tells you what it wanted, so you can install everything and wire it up over weeks.
Most of this costs nothing. The part that spends money is one step, and it is fenced on four sides.
| Needs | Costs | |
|---|---|---|
./run-all-demos.sh and every check | Node 18 and bash | nothing, ever |
./run-loop.sh 02 on your machine | your existing Claude Code or Codex login | whatever that run costs you |
| The GitHub Actions runner | an API key in repo secrets | per token, metered |
Locally you do not need an API key. If you are already signed in to Claude Code, a subscription included, the runner uses that. There is nothing to buy to try this. A runner in CI has no login, so that one does need a key, and it is metered per token whatever your interactive plan says.
Every agent run is capped at --max-budget-usd 2 and
--max-turns 30, with a 20 minute timeout. And the check runs first, so a loop with
nothing to do never wakes an agent. A quiet night costs nothing.
Eight short pages. None longer than a screen or two. Read them in order the first time, then come back to whichever one you need.
Real checks, on a real project, finding real problems. Nothing mocked for the screenshot. A demo that exits non zero has not failed: that is the check saying there is work.
================= ENGINEERING (loops 2, 4, 5, 6, 7) =================
Loop 2. Dependency upgrades (pack check: `npm outdated`)
Package Current Wanted Latest Location Depended by
is-odd 1.0.0 1.0.0 3.0.1 node_modules/is-odd demo-app
ms 2.0.0 2.1.3 2.1.3 node_modules/ms demo-app
^ ms can move inside its range (Wanted 2.1.3), so the loop bumps it, runs the
verify command, and opens a PR. is-odd can only go to a major, so the loop
leaves it alone and opens an issue. Latest is not always safe, or even newer.
Loop 4. Test backfill on changed code (pack check: git diff for untested changes)
NO TEST src/discount.js (live code, imported, but no src/discount.test.js)
The loop would write a focused test that passes against current behaviour.
Loop 5. Dead code and unused dependencies (pack check: `knip`)
DEAD FILE src/unused.js (exported but nothing imports it)
UNUSED DEP is-odd (in package.json, never imported)
The loop lists these for a human and opens an issue. It never deletes.
A green build does not prove a cut was safe, and deleting a test makes the
suite pass more easily. That is why loop 5 flags rather than ships.
Loop 6. Lint, format, and type fixes (pack check: eslint + prettier + tsc)
src/messy.js: uses == (should be ===); uses var (should be const/let); unused variable "unusedTax"
The loop would auto-fix the mechanical issues; a type error it cannot fix safely it flags.
Loop 7. Release notes and changelog (pack check: git log since last tag)
BEHIND package.json is 1.1.0 but the changelog tops out at 1.0.0.
The loop would write the entries for the new version from the commit log.
Ships on green opens a PR and merges once the check passes, and a bad one is one click back. Flags, you decide stops and hands you the call. Nothing irreversible happens without a person. ★ marks the three easiest first builds.