# ops CLI Cleanup — Design

**Date**: 2026-03-01
**Status**: Approved

## Problem

`ops` is a junk drawer mixing server management with session intelligence and terminal shortcuts. Three distinct responsibilities live in one CLI.

## Design

Clean break — move commands to canonical homes, remove from ops entirely. No deprecation shims.

### Moves

| Command(s) | From | To | Strategy |
|------------|------|----|----------|
| `list`, `inspect`, `observe`, `grep`, `idle`, `restart-cc`, `cycle-warm` | `ops/sessions.py` | `helm/cli.py` | Extract to `helm/sessions.py`, add Click commands |
| `pool` subgroup | `ops/pool.py` | `helm/pool.py` | Move file, register as helm subgroup |
| `corpus` subgroup | `ops/corpus.py` | `helm/corpus.py` | Move file, register as helm subgroup |
| `badge`, `color`, `activate` | `ops/sessions.py` | **Delete** | it2 already has these (Go CLI) |
| `panes`, `attach` | `ops/sessions.py` | **Delete** | it2 has `tmux` subcommand |
| `backup` | `ops/sessions.py` | `inv infra.backup` | Add task to `infra/tasks.py` |
| `push` | `ops/sessions.py` | **Delete** | `lib/notify` + `/notify` skill covers this |

### What stays in ops

- `servers`, `start`, `stop`, `restart`, `reload`, `logs`, `free-port` — server lifecycle
- `resmon` subgroup — system resource monitoring

### Shared dependencies

- `Session` dataclass and `discover_sessions()` live in `lib/sessions/` — already shared
- `iterm2d` client (`ops/devtools/client.py`) — used by session commands, stays in ops but importable
- Color presets (`ops/colors.py`) — used by color command (deleting) and potentially others

### After cleanup

- Update `CLAUDE.md`: remove "Known overlap" section, update CLI Tools table
- Rebuild completions: `cd tools/cli && make completions`
