Documentation
README
Loop Budget Guard
Run at the start and end of every loop iteration.
Start of run
- Read
loop-budget.mdfor daily caps and kill-switch flags. - Read recent entries in
loop-run-log.md(last 24h). - Sum
tokens_estimatefor the active pattern today. - If spend ≥ 80% of the pattern's daily cap → report-only mode (no sub-agents, no auto-fix).
- If spend ≥ 90% and High Priority items remain in
STATE.md, yield to the budget-negotiator skill (if installed). Otherwise, if spend ≥ 100% orloop-pause-allis set → exit immediately with a one-line note in STATE.md. - If watchlist/state has no actionable items → exit in <5k tokens (do not spawn sub-agents).
End of run
Append one JSON object to loop-run-log.md:
This is the opening of the README. Read the full README on GitHub.