# Synthesis — tide-runtime ⟂ TmuxAI

**Date:** 2026-06-05

## 1. What TmuxAI proves (and tide-runtime should adopt)

| TmuxAI primitive | Source | tide-runtime status | Adopt? |
|---|---|---|---|
| Pane roles: chat / exec / read-only | `manager.go`, `pane_details.go` | absent | **yes** (domain-scoped) |
| Observe loop (capture→model→approve→exec→recapture) | `process_message`, `exec_pane.go` | partial (mode/approval exist; no content capture/exec) | **yes** |
| Prepare mode (prompt markers, completion + exit codes) | README | absent | yes (opt-in) |
| Watch mode (interval ambient assistance) | README | absent | yes |
| Squashing (budget-driven history summary) | `squash.go` | **absent** | **yes** |
| Knowledge bases | `knowledge_base.go` | absent (repo skill system exists) | adapt, reuse |
| Skills (frontmatter, auto-match, lazy load, budgets) | `skill_registry.go` | partial (`04-skill-contract`) | map onto existing |
| Risk scoring + whitelist/blacklist | `risk_scorer.go` | partial (`07`, `08`) | reconcile |
| MCP tools, web search/fetch | `internal/mcp/`, `web_*.go` | out of scope this wave | later |

## 2. Where tide-runtime is *ahead* of TmuxAI

- **Domain/multi-domain scope**: TmuxAI is single-window, one-instance-per-window.
  tide-runtime targets ~120 terminals across ≥3 domains with domain detection
  and a relational domain graph (`10-domain-relational-graph`).
- **Cross-channel continuity** (Telegram bridge, `09`).
- **Explicit mode/safety + threat model** as first-class specs (`07`, `08`).
- **Focus tracking** (`12`) as a capture-scoping signal TmuxAI lacks.

## 3. The gap this wave closes

tide-runtime can *describe* its domains but cannot yet *see pane content* or
*act in an isolated pane under budget*. TmuxAI proves all three are tractable.
The wave imports the harness pattern (RISE spec `13`) without importing TmuxAI's
single-window limits, and routes results to miadi-agent rather than spawning a
second agent loop.

## 4. Other relevant forks (from the 2026 survey)

- **OpenCode** (Go, files-not-buffers, parallel plan/exec) — model for a fast
  capture/exec core; argues terminal agents win by operating on files.
- **Aider / Goose** — candidate *delegated* coding agents tide-runtime/miadi-agent
  could call in an exec pane, not reimplement.
- **WezTerm workspaces + CLI**, **tmuxp/Tmuxinator** — session-layout substrate
  for domain reconstruction (complementary to capture).
- **Warp** — commercial reference for block-based command/output grouping UX.
- Academic vocabulary to adopt: **scaffolding** (prompt + tool schemas) and
  **harness** (runtime orchestration + safety), OpenDev (arXiv 2603.05344).

## 5. Recommended next-wave shape

1. Prove the **observe loop in Python** (`tide_runtime`) for one domain.
2. Add **squash/budget** (chronicle-safe summaries with `trace_id`).
3. Define + emit the **miadi-agent handoff anchors** (`observation`,
   `exec-result`, `squash-summary`).
4. Evaluate the **Rust plugin** for capture latency at scale.
5. Spike **TmuxAI-as-external-provider** only to de-risk, not as the default.

## 6. Risk / caution

- Live pane capture is sensitive (secrets on screen) — bind to `08-threat-model`
  and never auto-execute; approval lifecycle (`07`) is mandatory before exec.
- Squash summaries must remain derived read-models, not authority (miadi-agent
  chronicle/aspiration guardrail).
- Avoid a second agent runtime inside the terminal — keep delegation in
  miadi-agent.
