Expand description
open-loops: recupera contexto de trabalhos pausados. Architecture: docs/architecture/ (start at 00-overview.md)
Modules§
- cache
- Distillation cache at
/cache/ / @ .md. Keying by the HEAD SHA makes the cache self-invalidate when the branch advances. - cli
- Command definitions and module orchestration.
- config
- Config persisted at
/config.toml. The base path comes from outside (main resolves OPEN_LOOPS_HOME or ~/.open-loops) so tests can inject a tempdir — nothing here reads environment variables. - distill
- Distillation: builds the prompt with evidence (git + sessions) and calls the
LLM via a configurable command (default “claude -p”). Injectable command means
tests use
catand users can swap LLMs without changing code. - ignores
- Loops discarded by the user (“not worth continuing”).
Persisted at
/ignores.toml, keys in “repo/branch” format. - index
- SQLite-backed disposable index for cached scan and session data.
- inventory
- SHA-validated ahead/behind memo store.
- output
- Terminal rendering: loop inventory table and human-readable ages.
- query
- Query parsing and in-memory evaluation. Pure: no git, no I/O.
Grammar lives in ADR 0003. This module turns a query string into a
ScanPlanand decides whether a candidate loop matches it. - scanner
- Repository and unmerged-branch discovery via git shell-out. Design decision: shell-out (not git2/gix) — simple and debuggable; the product performance bottleneck is the LLM, not git.
- sessions
- AI session sources. Each harness (Claude Code, and future ones like Codex, OpenCode) becomes an adapter of this trait — the rest of the code does not know the session format or location.
- state
- Runtime state at
<base>/state.toml(separate from declarativeconfig.toml). Holds the active@contextchosen via the CLI. - worktrees
- Worktree inventory: joins
git worktree listwith merged/idle/state signals.