# open-loops
[](https://github.com/carvalhosauro/open-loops/actions/workflows/ci.yml)
[](https://crates.io/crates/open-loops)
[](rust-toolchain.toml)
[](LICENSE)
> What did I start and not finish? Where did I leave off? What's the next step?
`loops` lists your paused work (unmerged branches across all your repos) and
reconstructs resume context from your AI sessions and git — without you
documenting anything.
All user-facing output is in English: CLI messages, errors, resume sections,
and docs.
## Install
```bash
# via cargo
cargo install open-loops
# via script (Linux/macOS)
# via Homebrew (requires carvalhosauro/homebrew-tap — see docs/distribution.md)
brew install carvalhosauro/tap/open-loops
```
## Quickstart
```bash
# 1. register where your repos live
loops init ~/repo
# 2. inventory — open loops, most idle first (<5s, no LLM)
loops
# scanning git repositories…
# LOOP IDLE FOR AHEAD BEHIND
# my-app/feat/login 12d 3 1
# api/fix/timeout 2d 1 0
# 3. audit evidence before distilling (no LLM call)
loops resume feat/login --dry-run
# scanning git…
# matching AI sessions…
#
# # my-app/feat/login
#
# **Confidence:** medium — AI sessions found but alignment uncertain — audit Sources before trusting
#
# ## Git
# ...
# ## AI sessions
# - abc123.jsonl (modified 2026-06-18) [in commit window, mentions branch]
#
# ---
# Dry run — LLM not invoked. Run without `--dry-run` to distill.
# 4. resume: why, done, remaining, next step + auditable sources
loops resume feat/login
# scanning git…
# matching AI sessions…
# distilling…
#
# # my-app/feat/login
#
# **Confidence:** medium — AI sessions found but alignment uncertain — audit Sources before trusting
#
# ## Why
# Adding OAuth login to unblock the onboarding flow.
#
# ## Done
# - Token validation middleware
# - Login form wired to `/auth/login`
#
# ## Remaining
# - Refresh token rotation
# - Error states on the form
#
# ## Next step
# Implement refresh token rotation in `auth/refresh.rs` and add a test for expiry.
#
# ## Sources
# - git: branch feat/login (HEAD a1b2c3d)
# - AI session: abc123.jsonl (modified 2026-06-18)
```
Progress lines go to **stderr** so you can pipe or redirect stdout without
losing the distilled document. Long steps (`distilling…`) can take ~30–60s on
a cold run; repeat calls are instant from cache.
State lives in `~/.open-loops/` — nothing is written inside your repos.
## Audit before you trust
Every resume ships a **confidence score** and a **`## Sources`** section — not
metadata for debugging, but the audit trail you use to decide whether to trust
the distillation.
| `high` | AI sessions overlap branch commits and mention the branch name | Usually safe to continue |
| `medium` | Sessions matched heuristically | Read **Sources**; confirm sessions match this branch |
| `low` | No AI sessions matched — context from git only | Treat as a draft; verify **Sources** and diff yourself |
Recommended flow when confidence is not `high`:
1. `loops resume <branch> --dry-run` — inspect matched commits and sessions (no LLM).
2. Check **`## Sources`** in the full output — do those commits and sessions belong to this work?
3. Run `loops resume <branch>` only when the evidence looks right.
## Demo
Record or replay locally:
```bash
cargo build --release
./scripts/demo.sh # runs the quickstart flow in a temp dir
asciinema play docs/demo.cast # replay the bundled recording
```
## Docs
Full reference in [`docs/`](docs/): [setup](docs/setup.md) ·
[features](docs/features.md) · [configuration](docs/configuration.md).
## License
MIT OR Apache-2.0.