Most people use AI coding agents as one-shot tools: describe a task, get a result, move on. I wanted the opposite — an agent running as a standing daily process, pointed at a real business metric, shipping unsupervised.
Call it loop engineering. The skill isn't writing a prompt for a task. It's designing the standing instruction that keeps an agent useful day after day with no human driving each step.
One metric, near zero
My side project, FindHYROXPartner, matches HYROX athletes for doubles races. Exactly one number matters: confirmed matches, where both people say yes. Signups were healthy. Confirmations were near zero.
So I gave Claude Code a daily loop, a memory file, and left it alone.
The prompt
The whole mandate it wakes up to every morning:
DAILY KPI LOOP — maximize CONFIRMED (both-sides) matches.
(1) Read the funnel (proposed, YES, confirmed, expired, reject reasons, supply gaps).
(2) Identify the SINGLE binding constraint today: scarce-side supply,
response-rate/expiries, or match quality.
(3) Take ONE high-leverage, SAFE, reversible action toward the KPI —
then deploy and verify it's live.
(4) Do NOT autonomously do risky things (bulk emails, matching-logic
changes, targeting a person, spending money). Flag those for approval.
(5) Append the action + result to memory, note the KPI trend.
Be decisive; ship one real thing per day. If nothing useful, say so
instead of busywork.The design choices are the product:
- One KPI, not a vague goal. "Maximize confirmed matches" gives it something to diagnose against.
- Diagnose before you act. Naming the binding constraint first stopped it from doing random work.
- One reversible action a day. Small, safe, undoable — an unsupervised agent can't blow anything up.
- Hard guardrails. The list of what not to do autonomously is what makes it safe to leave alone.
- A memory file. So each day compounds instead of starting cold.
What it did
Over about eight daily runs it read the live funnel, named the constraint, and shipped one lever each time. The instructive ones:
- Found that email response rate was literally unmeasurable — so it built the open/click instrumentation first, before trying to optimize anything.
- Added a day-before-expiry nudge to a 4-day silent gap where half the proposals were dying with no reply.
- Built a recruitment page for the scarce side of the market (women run ~4:1 short in mixed doubles).
- Added a referral ask at the moment two people match — turning happy users into supply.
Confirmed matches moved 0 → 1 → 2 → 3 across the windows, and rejection rate among people who responded fell from ~70% to ~36%.
The caveats (I'm a PM; I don't skip these)
The samples are tiny — a dozen matches a week. SEO levers won't show for weeks. This is correlation, not proven causation; some of the lift is noise or the season. The real story isn't "line went up 3×." It's that a loop found and fixed the right things in the right order without me steering each move.
The moment that got me: it eventually called a "diminishing returns" day and stopped shipping — telling me the remaining high-value moves were blocked on me (approve a webhook, approve a paid campaign), instead of manufacturing busywork to look productive. That restraint was in the prompt. It actually held to it.
The takeaway
The unit of work is quietly shifting from prompt to loop. Writing a good one-shot prompt is a skill. Designing a process an agent can run against a metric — clear objective, a diagnosis step, a bias toward small reversible actions, hard guardrails, and a memory that compounds — is a different one. And, I think, a more valuable one.
I don't know where the ceiling is yet, or the right human-in-the-loop cadence. But "give the agent a KPI and a cron job" turned out to be a genuinely different way to work — and a more disciplined one than I expected.