--- description: Start or be the operator, the one session on a Mac that stays open, waits for Local CI, release and friction events, and hands each one to a fresh agent. It starts a fix for each red or flaky step, a release agent for each beta that is due and a judge for each friction line zbot's sessions write. Use for /operator, "keep watching", "start the operator", "release a beta now", being the operator, the old name "Local CI watcher", and when a release or friction event or a local-ci task names a step. argument-hint: '[watch | release]' --- # Operator The operator is the session titled `operator` on a Mac that installed Local CI. It waits for the events that Local CI, the beta release lane and zbot write to `events.jsonl` in `plate-local-ci/` in the git common directory, and hands each one to a fresh agent. zbot, the team's Discord bot, queues a friction report with `local-ci.mjs friction add` for each of its sessions that ended with `[[friction: | ]]` lines. The friction queue lives in the same events file, so `local-ci.mjs friction list` reads it back after a restart or a compaction. Every friction command runs the main checkout's copy of `local-ci.mjs`, as zbot does, because Local CI's copy moves to older commits while it searches for a first bad one. It never edits, lands or fixes code itself, and it keeps each turn short. The `local-ci` skill owns the runner and its `status`, `rerun` and `install` commands. `beta-release.mjs wake`, which Local CI runs after each green run on next, adds a `release` event when a daily beta is due and no release event came in the last 12 hours. A public fix ships in that daily beta. Only the `release` mode below starts a beta before Local CI passes next's tip (owner's word, 2026-11-24). A beta from `next` publishes without asking, as `AGENTS.md`'s Git and publication says. Run every command below from the main checkout. Each runs the Local CI worktree's copy of the script, because every Local CI run moves that copy to the newest next. Pick the mode from $ARGUMENTS. With none, or with `supervise`, run Keep watching. With `release`, run the Release brief below in this session and skip the due check in its step 1, because the owner asked for this beta. ## Keep watching Make sure one operator is running on this Mac. Run this after the app quits or the Claude account changes, because the operator's background wait ends with the app. The owner chose Sonnet at medium for the operator, as `AGENTS.md`'s Plate overrides say. The operator runs in a worktree of its own and runs each command from the main checkout, which can lag next, so its prompt is "Read `
/.claude/worktrees/local-ci/.agents/skills/operator/SKILL.md` in full and run its watch mode. Run each command it says to run from the main checkout as one Bash call that starts with `cd
&& `.", with the main checkout's absolute path. That copy moves with every Local CI run. 1. Call `mcp__ccd_session_mgmt__get_session` with `"self"`. When this session's title is `operator`, run `watch` here and stop. 2. Call `mcp__ccd_session_mgmt__list_sessions` and look for an unarchived session titled `operator`, or titled "Local CI", the operator's old title. Retitle a "Local CI" session `operator` with `mcp__ccd_session_mgmt__set_session_title`. When the session is mid-turn, report it and stop. When it is idle, send it the operator prompt with `SendMessage` (`to`: its session id), which restarts its loop unless its wait still runs, report it and stop. 3. Otherwise start it with `mcp__ccd_session__start_session`: `initiation: "user_asked"`, `context: "fresh"`, `title: "operator"`, `model: "claude-sonnet-5-5"`, `effort: "medium"`, `use_worktree: true` and the operator prompt. Then move it to top level with `mcp__ccd_session_mgmt__detach_session`, because a session nested under the one that started it wakes that session at the end of each of its turns. The app refuses to detach a session that shares its starter's checkout, the main checkout included, so the operator needs a worktree of its own. Pin it with `mcp__ccd_sidebar__set_pinned`, so automatic archiving keeps it. ## watch The operator's loop. It runs up to three fix subagents at once, each for a red step or a friction item and at most one on a heavy step, one release agent at a time and one friction judge at a time. It spawns each agent with the `Agent` tool: `subagent_type: "pstack:poteto-agent"`, `model: "opus"`, `effort: "high"`, `run_in_background: true`, and its brief below filled in. `` stands for `node .claude/worktrees/local-ci/tooling/scripts/local-ci.mjs`, and `` for `node tooling/scripts/local-ci.mjs friction`. 1. On the first loop, note the current time in ISO form, then run step 3 before you wait, so friction that came in while no operator ran gets judged and fixed. Then, unless a wait this session started is still running, run ` wait --after