anshss/shiploop
5 stars · Last commit 2026-08-03
Lightweight orchestration layer that makes Claude Code faster and more token-efficient — model orchestration, subagent delegation, and worker branching. Adds capability, not bloat.
README preview
# shiploop <p align="center"> <img src="assets/shiploop.png" width="880" alt="Shiploop, the harness loop, after Karpathy: a manager delegates each ticket to right-sized workers (haiku, sonnet, opus) through an objective gate; learnings feed back into the manager. Self-improving."> </p> <p align="center"> <a href="https://github.com/anshss/shiploop/actions/workflows/ci.yml"><img src="https://github.com/anshss/shiploop/actions/workflows/ci.yml/badge.svg" alt="CI"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License: Apache 2.0"></a> </p> A self-improving multi-agent harness for Interactive Coding Agents. It grinds a ticket backlog across every repo in your product: a fresh headless agent per ticket, guarded auto-merge on green CI, and a durable lesson written into your tracked `CLAUDE.md` after every resolved ticket. ### Built to spend fewer tokens One goal: the fewest tokens per shipped ticket. This section lists only the levers that move that number by **multiples**. Dozens of smaller economies exist in the code — cached lookups, retired validations, cleanup of abandoned resources — and they're real, but they're rounding errors next to these five. - **Model orchestration.** The dominant cost variable is which model runs a ticket, and the spread is wide: on this maintainer's backlog a resolved ticket costs roughly **$0.59 on haiku, $2.22 on sonnet, $8.94 on opus**. So the harness does not try to *predict* the right tier — it bets cheap and pays for the expensive model only when the cheap one has already demonstrably failed. Every ticket starts at a floor (`GOVERN_WORKER_MODEL`, default `sonnet`) and a classified failure escalates it **once** to a ceiling (`GOVERN_WORKER_ESCALATION_MODEL`, default `opus`), never further. That asymmetry is the whole trade: failed attempts die early and cheap (they average a fifth of the tokens of a successful one), so a wrong cheap guess costs far less than a right expensive one. Escalation is also classified rather than reflexive — an infrastructure or CI failure retries at the *same* tier with the log attached, running out of budget raises the tier, and only a genuine judgment failure buys both a bigger model and more thinking. This replaced an earlier design where a cheap scout pass scored each ticket into a tier. It was removed because it was measured and didn't work: 4 of the 5 verdicts it ever produced were `opus/high`, and 3 tickets it sized `opus` then succeeded at `sonnet` on the first attempt. It was a rubber stamp, not arbitrage. The scout still runs — it just surveys now, and doesn't size.