refactor(skills): rename tmux-agent-orchestrate-delete -> stop (step 1)

User decision: 2-step approach (Step 1 = simple rename, Step 2 = option
redefinition in a separate round).

Changes (mechanical, history preserved):
- skills/tmux-agent-orchestrate-delete/ -> skills/tmux-agent-orchestrate-stop/ (git mv)
- scripts/delete_session.sh -> scripts/stop_session.sh (git mv)
- sed s/orchestrate-delete/orchestrate-stop/g + delete_session.sh->stop_session.sh
  across 7 files (0 residual of either pattern)
- SKILL.md frontmatter 'name' -> tmux-agent-orchestrate-stop
- related_skills / companion refs in create/status/monitor/resume SKILL.md updated

NOT in this commit (deferred to step 2):
- Option redefinition (--purge-conversation, --mode soft clarification)
- Deprecation shim (external consumers = 0, no need)

6-route surface preserved (create/resume/stop/status/monitor + delegate-job).

Verified on isolated server -L claude-rename-step1-test (kill-server after):
- syntax PASS (all .sh + py_compile)
- E2E via renamed stop_session.sh: capture-id records id + status=stopped,
  status.sh renders it (DRIFT=-), idempotency exit 0
- 0 stale 'tmux-agent-orchestrate-delete' / 'delete_session' references
- git history preserved (rename detected as R)
- Global skill untouched; real YAML + main canary -L multi-agent-canary untouched

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 15:48:27 +00:00
parent a2d4f80608
commit 50b2b201b8
7 changed files with 30 additions and 30 deletions
@@ -9,13 +9,13 @@ environments: [kanban, terminal, tmux]
metadata:
hermes:
tags: [agent, tmux, claude, antigravity, agy, monitor, kanban, observation, reconciliation]
related_skills: [tmux-agent-orchestrate-create, tmux-agent-orchestrate-resume, tmux-agent-orchestrate-delete, kanban-orchestrator]
related_skills: [tmux-agent-orchestrate-create, tmux-agent-orchestrate-resume, tmux-agent-orchestrate-stop, kanban-orchestrator]
prereq_skills: [kanban-worker, tmux-agent-orchestrate-create]
---
# Agent Sessions Monitor — Live Reconciliation via Kanban Worker
> **Companion skills**: `tmux-agent-orchestrate-create` / `tmux-agent-orchestrate-resume` / `tmux-agent-orchestrate-delete` (mutators); this skill is the **observer**.
> **Companion skills**: `tmux-agent-orchestrate-create` / `tmux-agent-orchestrate-resume` / `tmux-agent-orchestrate-stop` (mutators); this skill is the **observer**.
> **Single source of truth**: `./.hermes/agent-sessions.yaml`.
## What this skill does
@@ -122,7 +122,7 @@ tmux: no session
**Skip-set**: the auto-terminate only fires for sessions whose status is `running`.
Rows already in a deliberate end state — `terminated`, `archived`, or **`stopped`**
(set by `tmux-agent-orchestrate-delete --capture-id/--reason/--graceful`) — are
(set by `tmux-agent-orchestrate-stop --capture-id/--reason/--graceful`) — are
left untouched. This is critical: a `stopped` row keeps its `resumable: true` and
captured `*_session_id_own`, so the monitor must **not** overwrite it with
`terminated ("auto-detected")` when its tmux is (expectedly) gone.
@@ -162,7 +162,7 @@ disk: ~/.claude/projects/.../87dc548e-...jsonl: missing
- **Don't run the monitor without `--goal`** — without goal mode, a single turn will spawn, do one reconcile, and complete. Goal mode keeps the worker alive across many turns.
- **The 30s poll is a default** — workers may override if they detect heavy churn. A workspace with 5+ agent sessions should bump to 60s to avoid noise.
- **`kanban_comment` rate limits** — Kanban may throttle if you comment too fast. Coalesce: only comment when the diff is *new* (not the same drift on every poll). The script tracks a state file at `.cache/tmux-agent-orchestrate-monitor/<workspace>.state` in the workspace root for this (overridable via `AGENT_SESSIONS_STATE_DIR`).
- **Don't fight the user's explicit action** — if `tmux-agent-orchestrate-delete` is mid-flight and the monitor sees the same session in two states within 5s, prefer the user's most recent action. The monitor should not auto-revert a fresh `terminated` to `running` because of a stale `tmux has-session` check.
- **Don't fight the user's explicit action** — if `tmux-agent-orchestrate-stop` is mid-flight and the monitor sees the same session in two states within 5s, prefer the user's most recent action. The monitor should not auto-revert a fresh `terminated` to `running` because of a stale `tmux has-session` check.
- **The monitor should never modify the conversation artifacts** (jsonl, db) — only the YAML. If you see a stale UUID, comment about it but don't delete the file.
- **TUI capture-pane is expensive** — only capture when you need to update `last_visible_status`, not every poll.
@@ -199,7 +199,7 @@ If `$HERMES_KANBAN_TASK` card has any comment containing "stop" or "stop monitor
- Do NOT modify conversation artifacts (jsonl, db, brain/)
- Do NOT spawn/delete tmux sessions — that's the create/delete skills' job
- Do NOT call tmux-agent-orchestrate-create or tmux-agent-orchestrate-delete — only the user initiates those
- Do NOT call tmux-agent-orchestrate-create or tmux-agent-orchestrate-stop — only the user initiates those
- Do NOT call `git commit` / `git push`
```