Metadata-Version: 2.4
Name: oxi-adapter-contably
Version: 0.1.0b1
Summary: Adapter for the Contably autonomous engineering instance.
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: oxi-core>=0.1.0b3
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: pytest-timeout>=0.5; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"

# oxi-adapter-contably

Adapter for the Contably autonomous engineering instance.

This adapter wires the [oxi](https://github.com/escotilha/oxi) engine to
the Contably codebase: the GitHub repo it ships PRs against, the budget
caps it enforces, the dispatch host it spawns workers on, the scope
policy that defines where workers may write, and the promote recipe
that staging→production automation will eventually use.

## Topology

- **Engine + ledger + dashboard + killswitch:** Contabo VPS in
  `/opt/oxi/`. The engine runs every oxi systemd timer (tick,
  pr-watcher, ship-recovery, deadman, seed, branch-janitor,
  oauth-watch).
- **Worker dispatch:** the VPS SSHs into a Mac Mini (Tailscale alias
  `mini`) and fires `claude -p` there. Worktrees live on the Mini under
  `/Volumes/AI/Code/<project>-<session-tag>`.
- **Single host on day one.** The engine ships with `mini` as the only
  dispatch host, concurrency 20. A second host can be added after the
  parallel-run window passes acceptance criteria.

## Install

```bash
# On the VPS, into oxi's venv:
pip install --pre oxi-adapter-contably
```

Or for development:

```bash
git clone https://github.com/escotilha/oxi
cd oxi/adapters/contably
pip install -e .
```

## Verify

```bash
oxi status
# → ✓ adapter loaded (contably)
```

## Operational notes

- **Auto-merge is on**, gated by the critic. A failing critic blocks
  merge; an approving critic merges automatically. Sensitive paths
  listed in `scope_policy().sensitive_for_critic` always require a
  human review even when the critic approves.
- **Budget caps:** $500 soft warn, $1000 hard cap per day. A runaway
  loop halts the engine and emits one `budget_hard_stop` event.
- **Killswitch:** `/opt/oxi/KILLSWITCH` (file presence). All engine
  modules respect it. Run `oxi v3 kill --reason "..."` to set;
  `oxi v3 unkill` to lift.
- **Promote recipe** (`promote_recipe()`) is wired but the engine-side
  `daily_promote.run()` is currently dormant. Staging→production stays
  on the manual `/deploy-conta-production` path until the post-cutover
  observation period.

See `docs/contably-os-cutover-spec.md` in the oxi repo for the
end-to-end cutover plan.
