Adaptive Loop Budgeting
Use this when a loop could keep consuming time, tokens, money, tool calls, or
risk without a natural stopping point. The goal is to spend effort where it
reduces uncertainty, stop when confidence is high enough, and escalate when the
next iteration would be expensive or unsafe.
This skill applies to coding loops, research loops, product feedback loops,
self-improving experiments, debugging sessions, and long-running verification.
Budget Contract
Before starting or continuing the loop, name:
- Objective: what the loop is trying to improve, prove, or decide.
- Budget: allowed attempts, time, cost, tool calls, external requests, or
verification depth.
- Confidence target: what evidence is enough for this risk level.
- Risk tier: low, medium, or high based on reversibility, user impact,
money, data sensitivity, and production exposure.
- Escalation trigger: the condition that requires a human decision or a
different plan.
If the task already has an explicit user budget, honor it. If no budget exists,
choose the smallest budget that can produce useful evidence and state it before
looping.
Cheap-To-Expensive Ladder
Run the cheapest check that can reduce the current uncertainty:
| Uncertainty |
Start with |
Escalate to |
| Is the task understood? |
Restate goal and acceptance criteria |
Ask for a decision |
| Is the code shape plausible? |
Static read, type check, unit test |
Integration or browser check |
| Is the user path working? |
Local browser/API check |
Target-environment verification |
| Is feedback actionable? |
Cluster and confidence score |
Experiment, metric, or user research |
| Is a fix durable? |
Regression test or fixture |
Monitor, alert, or policy gate |
| Is a claim real? |
Direct artifact check |
Independent system-of-record check |
Do not jump to expensive verification because it feels thorough. Escalate when
the cheaper layer cannot prove the claim or when the risk tier requires it.
Loop Decision
At each iteration boundary, choose one:
- Continue: the latest evidence changed the hypothesis, the budget remains
healthy, and the next step is likely to reduce uncertainty.
- Stop succeeded: the confidence target is met with evidence at the right
layer.
- Stop partial: the loop produced useful work, but remaining uncertainty is
explicit and bounded.
- Yield: progress is waiting on slow external state; checkpoint and switch
work using [[yield-on-wait]].
- Escalate: the next step crosses budget, authority, risk, or decision
boundaries.
Continuing requires a changed hypothesis. Repeating the same action because the
last result was inconvenient is not iteration.
Adaptive Signals
Tighten or stop the loop when:
- the same failure repeats after distinct hypotheses;
- each iteration changes less than the one before;
- verification cost is rising faster than confidence;
- the diff, plan, or artifact is growing beyond the original objective;
- tool output is noisy enough that more calls would not clarify it; or
- the next action has irreversible or high-impact consequences.
Expand the budget only when:
- the loop is still reducing a named uncertainty;
- the remaining risk justifies the extra cost;
- the next step has a clear expected signal;
- no cheaper check can answer the question; and
- the user or governing policy permits the expansion.
Confidence Targets
Match confidence to risk:
- Low risk: relevant local check, clear reasoning, and no known conflicting
signal may be enough.
- Medium risk: automated checks plus direct artifact verification.
- High risk: independent verification, source-of-record readback, rollback
plan, and human decision before irreversible action.
Use [[process-aware-done]] for completion claims and [[verify-real-artifact]]
when the result matters outside the local checkout.
Output Shape
Objective: <what the loop is optimizing or proving>
Budget: <attempts/time/cost/tool calls/risk limit>
Evidence so far: <strongest signal>
Decision: <continue, succeeded, partial, yield, or escalate>
Reason: <why this is the right boundary decision>
Next step: <only if continuing or escalating>
Anti-Patterns
- Looping because no one chose a stopping condition.
- Spending expensive checks on low-risk uncertainty.
- Stopping because of fatigue while claiming confidence.
- Expanding scope instead of escalating for a product decision.
- Ignoring repeated failures because each one looks slightly different.
- Reporting "done" when the budget ended but the evidence did not close the
claim.
1---2name: adaptive-loop-budgeting3description: Use when an autonomous loop needs explicit limits on attempts, time, cost, tool calls, verification depth, or risk, and a clear stop, continue, yield, or escalate decision.4---56# Adaptive Loop Budgeting78Use this when a loop could keep consuming time, tokens, money, tool calls, or9risk without a natural stopping point. The goal is to spend effort where it10reduces uncertainty, stop when confidence is high enough, and escalate when the11next iteration would be expensive or unsafe.1213This skill applies to coding loops, research loops, product feedback loops,14self-improving experiments, debugging sessions, and long-running verification.1516## Budget Contract1718Before starting or continuing the loop, name:1920- **Objective:** what the loop is trying to improve, prove, or decide.21- **Budget:** allowed attempts, time, cost, tool calls, external requests, or22 verification depth.23- **Confidence target:** what evidence is enough for this risk level.24- **Risk tier:** low, medium, or high based on reversibility, user impact,25 money, data sensitivity, and production exposure.26- **Escalation trigger:** the condition that requires a human decision or a27 different plan.2829If the task already has an explicit user budget, honor it. If no budget exists,30choose the smallest budget that can produce useful evidence and state it before31looping.3233## Cheap-To-Expensive Ladder3435Run the cheapest check that can reduce the current uncertainty:3637| Uncertainty | Start with | Escalate to |38| --- | --- | --- |39| Is the task understood? | Restate goal and acceptance criteria | Ask for a decision |40| Is the code shape plausible? | Static read, type check, unit test | Integration or browser check |41| Is the user path working? | Local browser/API check | Target-environment verification |42| Is feedback actionable? | Cluster and confidence score | Experiment, metric, or user research |43| Is a fix durable? | Regression test or fixture | Monitor, alert, or policy gate |44| Is a claim real? | Direct artifact check | Independent system-of-record check |4546Do not jump to expensive verification because it feels thorough. Escalate when47the cheaper layer cannot prove the claim or when the risk tier requires it.4849## Loop Decision5051At each iteration boundary, choose one:5253- **Continue:** the latest evidence changed the hypothesis, the budget remains54 healthy, and the next step is likely to reduce uncertainty.55- **Stop succeeded:** the confidence target is met with evidence at the right56 layer.57- **Stop partial:** the loop produced useful work, but remaining uncertainty is58 explicit and bounded.59- **Yield:** progress is waiting on slow external state; checkpoint and switch60 work using [[yield-on-wait]].61- **Escalate:** the next step crosses budget, authority, risk, or decision62 boundaries.6364Continuing requires a changed hypothesis. Repeating the same action because the65last result was inconvenient is not iteration.6667## Adaptive Signals6869Tighten or stop the loop when:7071- the same failure repeats after distinct hypotheses;72- each iteration changes less than the one before;73- verification cost is rising faster than confidence;74- the diff, plan, or artifact is growing beyond the original objective;75- tool output is noisy enough that more calls would not clarify it; or76- the next action has irreversible or high-impact consequences.7778Expand the budget only when:7980- the loop is still reducing a named uncertainty;81- the remaining risk justifies the extra cost;82- the next step has a clear expected signal;83- no cheaper check can answer the question; and84- the user or governing policy permits the expansion.8586## Confidence Targets8788Match confidence to risk:8990- **Low risk:** relevant local check, clear reasoning, and no known conflicting91 signal may be enough.92- **Medium risk:** automated checks plus direct artifact verification.93- **High risk:** independent verification, source-of-record readback, rollback94 plan, and human decision before irreversible action.9596Use [[process-aware-done]] for completion claims and [[verify-real-artifact]]97when the result matters outside the local checkout.9899## Output Shape100101```text102Objective: <what the loop is optimizing or proving>103Budget: <attempts/time/cost/tool calls/risk limit>104Evidence so far: <strongest signal>105Decision: <continue, succeeded, partial, yield, or escalate>106Reason: <why this is the right boundary decision>107Next step: <only if continuing or escalating>108```109110## Anti-Patterns111112- Looping because no one chose a stopping condition.113- Spending expensive checks on low-risk uncertainty.114- Stopping because of fatigue while claiming confidence.115- Expanding scope instead of escalating for a product decision.116- Ignoring repeated failures because each one looks slightly different.117- Reporting "done" when the budget ended but the evidence did not close the118 claim.