Skip to content

Commit 528fb9f

Browse files
authored
docs: sync agent + contributor docs to current architecture (#1846)
* docs(agents): refresh CLAUDE.md/AGENTS.md and skills - Crate table now lists 21 crates (was 17); added runt-mcp-proxy, nteract-predicate, sift-wasm, mcpb-runt; renamed runt → runt-cli to match the actual package name. - MCP tool table corrected: 26 tools (was 27), launch_app replaces show_notebook, clear_outputs is a CRUD tool, join_notebook flagged as backward-compat alias. - Replaced "supervisor" terminology in user-facing docs with nteract-dev (the registered MCP server name) or the specific tool names (up/down/status/logs/vite_logs). The literal mcp-supervisor crate name is retained where it refers to the actual package. * docs(codex): drop "supervisor" terminology in codex skill references * docs: socket-first daemon discovery, blob-ref save scope, Sift framing - contributing/runtimed.md, contributing/protocol.md: clarify that daemon.json is a legacy fallback for pre-GetDaemonInfo daemons; the socket is the source of truth. Add frame type 0x06 PoolStateSync to the protocol frame table. - contributing/architecture.md: nuance the isBinaryMime story — the TS looksLikeBinaryMime() helper is a cold-start safety net, not a parallel implementation. Document that .ipynb save inlines most outputs as base64 (vanilla Jupyter compat) and only externalizes a small whitelist (parquet) as BLOB_REF_MIME entries. - contributing/frontend-architecture.md: note Lezer parsers replaced Prism for static highlighting in #1742. - contributing/releasing.md: add Local Validation section pointing at cargo xtask build-app / build-dmg; do not surface install-daemon here (release flow is via the auto-updater, not manual installs). - docs/python-bindings.md: position runt mcp as canonical MCP path so agents do not assume Python is required. - docs/sharing.md, docs/environments.md: explain HMAC-SHA256 trust signing and key location, document the new ipynb save shape (mostly base64, parquet externalized for the Sift dataframe viewer). - Brand correction: dataframe viewer is "Sift" / nteract dataframe viewer; the nteract/dx Python package is the helper that produces parquet payloads consumed by it.
1 parent 7b89459 commit 528fb9f

File tree

20 files changed

+148
-128
lines changed

20 files changed

+148
-128
lines changed

.claude/rules/mcp-servers.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,32 @@ Three nteract MCP servers may be available. Always use the right one:
1010

1111
| Server | What it is | When to use |
1212
|--------|-----------|-------------|
13-
| `nteract-dev` | Dev MCP server with supervisor tools (`up`, `down`, `status`, `logs`, `vite_logs`). Manages a per-worktree dev daemon, hot-reloads on code changes. | **Default for all development work.** Use this for notebook interaction, daemon lifecycle, building, and testing. |
13+
| `nteract-dev` | Dev MCP server. Adds dev tools (`up`, `down`, `status`, `logs`, `vite_logs`) on top of the proxied `runt mcp` toolset. Manages a per-worktree dev daemon, hot-reloads on code changes. | **Default for all development work.** Use this for notebook interaction, daemon lifecycle, building, and testing. |
1414
| `nteract-nightly` | System-installed nightly release daemon | Diagnostics and inspection of the installed nightly app. Do NOT use for development. |
1515
| `nteract` | System-installed stable release daemon (nteract.app) | Diagnostics and inspection of the installed stable app. Do NOT use for development. |
1616

1717
**Rules:**
1818

19-
1. **Always prefer `nteract-dev`** (`mcp__nteract-dev__*` tools) for development work in this repo. It connects to the per-worktree dev daemon and includes supervisor tools for managing the build/daemon lifecycle.
19+
1. **Always prefer `nteract-dev`** (`mcp__nteract-dev__*` tools) for development work in this repo. It connects to the per-worktree dev daemon and includes the dev tools for managing the build/daemon lifecycle.
2020
2. **Never use `nteract-nightly` or `nteract` for development.** They connect to system-installed daemons and will not reflect your source changes.
2121
3. If `nteract-dev` tools are not available, fall back to `cargo xtask` commands — not to the system MCP servers.
22-
4. The supervisor tools are part of the `nteract-dev` server. They manage the dev daemon and build pipeline — prefer them over manual terminal commands.
22+
4. The dev tools (`up`, `down`, `status`, `logs`, `vite_logs`) live on the `nteract-dev` server. They manage the dev daemon and build pipeline — prefer them over manual terminal commands.
2323

24-
## Supervisor tool surface (nteract-dev)
24+
## nteract-dev tool surface
2525

26-
Consolidated around two verbs plus three read-only tools:
26+
Two verbs plus three read-only tools, layered on top of the proxied `runt mcp` toolset:
2727

2828
| Tool | Purpose |
2929
|------|---------|
3030
| `up` | Idempotent "bring the dev environment to a working state." Sweeps zombie Vite processes, ensures the daemon is running, ensures the MCP child is healthy. Optional args: `vite=true` to also start Vite, `rebuild=true` to rebuild daemon + Python bindings first, `mode='debug'\|'release'` to switch build mode. Safe to call repeatedly — this is the first thing to reach for when things feel off. |
3131
| `down` | Stop the managed Vite dev server. Leaves the daemon running by default (launchd / the installed app may own it). Pass `daemon=true` to also stop the managed daemon process. |
32-
| `status` | Read-only report of supervisor, child, daemon, and managed-process state. |
32+
| `status` | Read-only report of `nteract-dev`, child, daemon, and managed-process state. |
3333
| `logs` | Tail the daemon log. Arg: `lines` (default 50). |
3434
| `vite_logs` | Tail the Vite dev server log. Arg: `lines` (default 50). |
3535

36-
The older `supervisor_*` names (`supervisor_status`, `supervisor_restart`, `supervisor_rebuild`, `supervisor_logs`, `supervisor_vite_logs`, `supervisor_start_vite`, `supervisor_stop`, `supervisor_set_mode`) still work as aliases. Prefer the new names.
37-
3836
## MCP Server
3937

40-
The supervisor always uses `runt mcp` (Rust-native, direct Automerge access, no Python overhead). It auto-builds `runt-cli` on startup and watches `crates/runt-mcp/src/` for hot reload. For the installed app, `runt mcp` ships as a sidecar binary — no Python or uv required.
38+
`nteract-dev` proxies `runt mcp` (Rust-native, direct Automerge access, no Python overhead). It auto-builds `runt-cli` on startup and watches `crates/runt-mcp/src/` for hot reload. For the installed app, `runt mcp` ships as a sidecar binary — no Python or uv required.
4139

4240
## System daemon CLI (`runt` / `runt-nightly`)
4341

@@ -62,7 +60,7 @@ For the dev daemon, use `./target/debug/runt` directly (no `env -i` needed — d
6260
After setting up direnv, verify that the three MCP servers connect to the correct daemons:
6361

6462
```bash
65-
# 1. Check nteract-dev supervisor status (should show worktrees/ socket)
63+
# 1. Check nteract-dev status (should show worktrees/ socket)
6664
status
6765
# Expected socket: ~/.cache/runt-nightly/worktrees/{hash}/runtimed.sock
6866

.claude/skills/architecture-review/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ Python packages. The major architectural seams are:
7979
- `runt-workspace`: Per-worktree daemon socket isolation
8080
- `runt`: CLI binary (daemon management, kernel control, notebook launching, MCP server)
8181
- `runtimed-client`: Shared client library (output resolution, daemon paths, pool client)
82-
- `runt-mcp`: Rust-native MCP server (27 tools for notebook interaction)
83-
- `mcp-supervisor`: nteract-dev MCP supervisor proxy, daemon/vite lifecycle
82+
- `runt-mcp`: Rust-native MCP server (26 tools for notebook interaction)
83+
- `mcp-supervisor`: `nteract-dev` MCP server (proxies `runt mcp`, manages daemon/vite lifecycle)
8484
- `repr-llm`: LLM-friendly text summaries of visualization specs
8585
- `notebook`: Tauri desktop app (main GUI, bundles daemon+CLI as sidecars)
8686

.claude/skills/diagnostics/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Collect and analyze nteract diagnostic logs. Use when debugging iss
77

88
## Why `env -i`?
99

10-
In the dev environment, `RUNTIMED_DEV` and `RUNTIMED_WORKSPACE_PATH` are set (by direnv, xtask, or the supervisor). These cause `runt` to target the per-worktree dev daemon. System diagnostics need to target the **system-installed** daemon, so we use `env -i` to strip all env vars except `PATH` and `HOME`.
10+
In the dev environment, `RUNTIMED_DEV` and `RUNTIMED_WORKSPACE_PATH` are set (by direnv, xtask, or `nteract-dev`). These cause `runt` to target the per-worktree dev daemon. System diagnostics need to target the **system-installed** daemon, so we use `env -i` to strip all env vars except `PATH` and `HOME`.
1111

1212
The repo-local `bin/runt` wrapper is first in `$PATH` — it runs `./target/debug/runt`, which is the dev build. That's fine for quick checks, but for true system diagnostics, call the system binary by its channel-specific name (`runt` for stable, `runt-nightly` for nightly) via `env -i` so dev env vars don't leak through.
1313

.claude/skills/frontend-dev/SKILL.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ description: Run the notebook app in dev mode with hot reload. Use when starting
1717
| Run bundled binary | `cargo xtask run` |
1818
| One-shot setup | `cargo xtask dev` |
1919
| Lint/format | `cargo xtask lint --fix` |
20-
| MCP supervisor | `cargo xtask run-mcp` |
20+
| nteract-dev MCP server | `cargo xtask run-mcp` |
2121

2222
## `cargo xtask notebook` — Hot Reload
2323

@@ -118,13 +118,13 @@ RUNTIMED_DEV=1 cargo xtask notebook # Terminal 2
118118

119119
## MCP Server Development
120120

121-
### nteract-dev Supervisor (recommended)
121+
### nteract-dev (recommended)
122122

123123
```bash
124124
cargo xtask run-mcp
125125
```
126126

127-
Starts the dev daemon, launches the dev-only `nteract-dev` supervisor, spawns a child `runt mcp`, proxies notebook tool calls, watches for file changes, and hot-reloads. Python bindings are rebuilt when the watched Rust paths require it.
127+
Starts the dev daemon, launches `nteract-dev` (the dev-only MCP server for this source tree), spawns a child `runt mcp`, proxies notebook tool calls, watches for file changes, and hot-reloads. Python bindings are rebuilt when the watched Rust paths require it.
128128

129129
For editor config:
130130

@@ -150,7 +150,7 @@ Use `nteract-dev` as the repo-local MCP server name so it stays distinct from an
150150
}
151151
```
152152

153-
### Direct Mode (no supervisor)
153+
### Direct Mode (no proxy)
154154

155155
```bash
156156
# Terminal 1: start dev daemon
@@ -160,7 +160,7 @@ cargo xtask dev-daemon
160160
cargo xtask dev-mcp
161161
```
162162

163-
### Supervisor Tools
163+
### nteract-dev Tools
164164

165165
| Tool | Purpose |
166166
|------|---------|
@@ -170,8 +170,6 @@ cargo xtask dev-mcp
170170
| `logs` | Tail daemon log file |
171171
| `vite_logs` | Tail Vite dev server log file |
172172

173-
The older `supervisor_*` names (`supervisor_status`, `supervisor_restart`, `supervisor_rebuild`, `supervisor_logs`, `supervisor_vite_logs`, `supervisor_start_vite`, `supervisor_stop`, `supervisor_set_mode`) still work as aliases.
174-
175173
### Hot Reload
176174

177175
Watches `python/nteract/src/`, `python/runtimed/src/`, `crates/runtimed-py/src/`, `crates/runtimed/src/`:

.claude/skills/python-bindings/SKILL.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,21 +185,23 @@ runt mcp
185185
# Or via the Python wrapper
186186
uv run nteract
187187

188-
# Via nteract-dev supervisor (recommended for development, handles lifecycle)
188+
# Via nteract-dev (recommended for development, handles lifecycle)
189189
cargo xtask run-mcp
190190
```
191191

192-
### nteract MCP Tools (27 tools)
192+
### nteract MCP Tools (26 tools)
193193

194194
| Category | Tools |
195195
|----------|-------|
196-
| Session | `list_active_notebooks`, `show_notebook`, `join_notebook`, `open_notebook`, `create_notebook`, `save_notebook` |
196+
| Session | `list_active_notebooks`, `open_notebook`, `create_notebook`, `save_notebook`, `launch_app` |
197197
| Kernel | `interrupt_kernel`, `restart_kernel` |
198198
| Dependencies | `add_dependency`, `remove_dependency`, `get_dependencies`, `sync_environment` |
199-
| Cell CRUD | `create_cell`, `get_cell`, `get_all_cells`, `set_cell`, `delete_cell`, `move_cell` |
199+
| Cell CRUD | `create_cell`, `get_cell`, `get_all_cells`, `set_cell`, `delete_cell`, `move_cell`, `clear_outputs` |
200200
| Cell metadata | `set_cells_source_hidden`, `set_cells_outputs_hidden`, `add_cell_tags`, `remove_cell_tags` |
201-
| Find/Replace | `replace_match`, `replace_regex` |
202-
| Execution | `execute_cell`, `run_all_cells`, `clear_outputs` |
201+
| Editing | `replace_match`, `replace_regex` |
202+
| Execution | `execute_cell`, `run_all_cells` |
203+
204+
`join_notebook` is accepted as a backward-compat alias for `open_notebook`.
203205

204206
Three packages are workspace members:
205207

@@ -230,4 +232,4 @@ cd crates/runtimed-py
230232
VIRTUAL_ENV=../../.venv uv run --directory ../../python/runtimed maturin develop
231233
```
232234

233-
Or if using nteract-dev supervisor, call `up rebuild=true`.
235+
Or if using nteract-dev, call `up rebuild=true`.

.claude/skills/verify-changes/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ Run `git diff --name-only` to see changed files and match them to the table belo
2424
| `crates/runt/src/**` | `cargo test -p runt` |
2525
| `crates/runt-workspace/src/**` | `cargo test -p runt-workspace` |
2626
| `crates/runtimed-py/src/**` | `up rebuild=true` (rebuilds Python bindings) |
27-
| `python/nteract/src/**` | Supervisor auto-restarts; no explicit test needed |
28-
| `python/runtimed/src/**` | Supervisor auto-restarts; run `pytest python/runtimed/tests/test_session_unit.py -v` |
27+
| `python/nteract/src/**` | `nteract-dev` auto-restarts; no explicit test needed |
28+
| `python/runtimed/src/**` | `nteract-dev` auto-restarts; run `pytest python/runtimed/tests/test_session_unit.py -v` |
2929
| `apps/notebook/src/**` | `pnpm test:run` |
3030
| `crates/runtimed-wasm/**` | `cargo xtask wasm` then `deno test --allow-read --allow-env --no-check` |
3131

3232
If multiple crates changed, run tests for each: `cargo test -p runtimed -p notebook-doc`.
3333

34-
## Step 3: MCP Live Verification (when supervisor tools are available)
34+
## Step 3: MCP Live Verification (when nteract-dev tools are available)
3535

36-
If narrow tests pass and you have the nteract-dev supervisor (`up`/`down`/`status`) and `open_notebook`/`execute_cell` tools, do a live check:
36+
If narrow tests pass and you have `nteract-dev` (`up`/`down`/`status`) and `open_notebook`/`execute_cell` tools, do a live check:
3737

3838
### For daemon/kernel changes (`crates/runtimed/`, `crates/runtimed-py/`):
3939

@@ -79,7 +79,7 @@ Run the setup cell first, then run any metric cell. Each metric cell is self-con
7979
- Uses the **project venv** (no inline dependencies) — `runtimed` and `matplotlib` are both project dev deps
8080
- Imports `runtimed.Client` directly for inline async measurements (no subprocess needed)
8181
- Loads `baseline.json` from the notebook's own directory (`scripts/metrics/`)
82-
- The daemon socket is discovered automatically via `RUNTIMED_SOCKET_PATH` env var (set by the daemon/supervisor)
82+
- The daemon socket is discovered automatically via `RUNTIMED_SOCKET_PATH` env var (set by the daemon or `nteract-dev`)
8383

8484
**Three measurement cells:**
8585
- **Execution latency** — cold start + warm p50/p95 distribution, compared to baseline

.codex/skills/nteract-daemon-dev/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: nteract-daemon-dev
3-
description: Work with the per-worktree runtimed daemon in the nteract desktop repo. Use when changing `crates/runtimed/**`, debugging daemon-backed notebook behavior, deriving `RUNTIMED_SOCKET_PATH`, checking daemon logs/status, running daemon-backed tests or reviews, or deciding whether to use `supervisor_*` tools versus manual `cargo xtask dev-daemon` commands.
3+
description: Work with the per-worktree runtimed daemon in the nteract desktop repo. Use when changing `crates/runtimed/**`, debugging daemon-backed notebook behavior, deriving `RUNTIMED_SOCKET_PATH`, checking daemon logs/status, running daemon-backed tests or reviews, or deciding whether to use the `nteract-dev` MCP tools (`up`/`down`/`status`/`logs`/`vite_logs`) versus manual `cargo xtask dev-daemon` commands.
44
---
55

66
# nteract Daemon Dev
@@ -9,7 +9,7 @@ Use this skill to avoid talking to the wrong daemon and to keep daemon-backed ve
99

1010
## Workflow
1111

12-
1. Prefer `supervisor_*` tools when they are available.
12+
1. Prefer the `nteract-dev` MCP tools (`up`, `down`, `status`, `logs`, `vite_logs`) when they are available.
1313
2. Decide whether you are validating the default nightly source flow or an explicit stable flow. Source builds are nightly unless `RUNT_BUILD_CHANNEL=stable`.
1414
3. Otherwise, treat the worktree daemon as mandatory for daemon-backed verification.
1515
4. Export `RUNTIMED_DEV=1` and `RUNTIMED_WORKSPACE_PATH="$(pwd)"` before any manual `runt` command.
@@ -27,6 +27,6 @@ Use this skill to avoid talking to the wrong daemon and to keep daemon-backed ve
2727

2828
## Quick Start
2929

30-
If you have supervisor tools, use them for daemon lifecycle and logs.
30+
If you have `nteract-dev` tools, use them for daemon lifecycle and logs.
3131

3232
If you do not, read [references/daemon-workflows.md](references/daemon-workflows.md) and follow the manual command sequence there.

.codex/skills/nteract-daemon-dev/references/daemon-workflows.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ Start or restart the worktree daemon when:
5858
- You are verifying MCP server behavior against local Rust changes
5959
- You are comparing behavior across worktrees and need isolation
6060

61-
## Prefer supervisor tools when available
61+
## Prefer nteract-dev tools when available
6262

63-
If the nteract-dev MCP supervisor is available, prefer:
63+
If `nteract-dev` is available, prefer:
6464

6565
- `up` — idempotent "bring the dev environment up". Ensures daemon + child are healthy. Args: `vite=true`, `rebuild=true`, `mode="debug"|"release"`
6666
- `down` — stop the managed Vite dev server. `daemon=true` also stops the daemon
6767
- `status` — read-only report
6868
- `logs` — tail daemon logs
6969
- `vite_logs` — tail Vite dev server logs when you need the Vite side of a hot-reload session
7070

71-
These avoid manual env-var mistakes. The older `supervisor_*` names (`supervisor_restart`, `supervisor_rebuild`, `supervisor_start_vite`, `supervisor_stop`, `supervisor_set_mode`, `supervisor_status`, `supervisor_logs`, `supervisor_vite_logs`) still work as aliases.
71+
These avoid manual env-var mistakes.
7272

7373
## Safety rules
7474

.codex/skills/nteract-python-bindings/references/bindings-workflows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The MCP server is `runt mcp` (Rust, shipped with the desktop app). For developme
5858
uv run nteract
5959
```
6060

61-
If the MCP supervisor is available, prefer `cargo xtask run-mcp` or the supervisor tools instead of a manual launch.
61+
If `nteract-dev` is available, prefer `cargo xtask run-mcp` or its tools (`up`, `down`, `status`, `logs`, `vite_logs`) instead of a manual launch.
6262

6363
Use `default_socket_path()` for current-process resolution. Use `socket_path_for_channel("stable"|"nightly")` only when you need an explicit channel path that ignores `RUNTIMED_SOCKET_PATH`.
6464

0 commit comments

Comments
 (0)