← ClaudeAtlas

looplisted

Execute a planned change with the Rein loop: bounded fresh-agent implementation steps, then an independent review gate, driven by this project's flow.config.json. Use when the user asks to implement, execute or run an already-planned change, or invokes /rein:loop.
luisfarfan/rein-agentic-kit · ★ 0 · AI & Automation · score 73
Install: claude install-skill luisfarfan/rein-agentic-kit
# /rein:loop Executes a plan as a **bounded loop of fresh, short agents**, then an independent review gate. Implements only what the plan says; it does not decide scope. ## Why it is shaped this way Measured on real transcripts: ~90% of an agent run's spend is `cache_read` — every turn re-reads the whole accumulated context, so **cost ≈ turns × context size**. Output is ~0.3%. One agent that ran 241 turns re-reading ~234k each turn was most of a 112M-token run. Claude Code has **no native eviction of stale tool results**, so a long agent's context only grows. The fix is structural: cut at a boundary and hand the next agent a **compact ledger** (`progress` / `remaining` / `filesTouched` / `verification`) instead of a transcript. Measured effect: **241 turns → 26**, Opus **100% → 0%**, ~7× less context per turn. ## Steps 1. **Record this invocation, then resolve the plan — in one call** (shell state does not persist between tool calls, so `$R` must be resolved and used in the same bash block): ```bash R=$(command -v rein || ls -d ~/.claude/plugins/cache/*/rein/*/bin/rein 2>/dev/null | sort -V | tail -1); echo "$R"; "$R" event loop; "$R" context . ``` The event records first and never blocks. Keep `$R` — later steps reuse it literally (it was printed above). If the plan does not exist, stop and point at `/rein:plan`. If commands are missing, say which and that they belong in `flow.config.json`; do not invent them. 2. **Show the user what will