agentleFS
receptronreceptron/mulmoterminal/.claude/skills/verify-mulmoterminal/SKILL.md

verify-mulmoterminal

Skill282 starsChanged 6 days agoMITView on GitHub

Start a MulmoTerminal from THIS checkout on a scratch HOME, drive it in a real browser and tmux, collect evidence, and stop it without touching the maintainer's live tmux server. Use whenever a change in this repo has to be seen working in the running app rather than only in the specs — a UI change, a route or middleware every request passes through, a GUI MCP tool, anything CLAUDE.md's "wide blast radius" rule covers.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not start an agent (claude, codex) in a cell on this server.

    line 43
  2. Distinctive:

    Do every check in the SAME browser session that opened the cell: a new browser starts on an empty grid.

    line 85
  3. Very specific:

    If start gives up waiting for the server, it stops what it spawned before exiting.

    line 130
  4. Very specific:

    Never clean up by hand with tmux kill-server, tmux -L mulmoterminal …, or TMUX_TMPDIR=… tmux -L mulmoterminal ….

    line 135
  5. Distinctive:

    When a run here fails for a reason the skill did not predict, fix the skill in the same PR as the change you were verifying:

    line 141

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Verify a change in a running MulmoTerminal

You are almost certainly running INSIDE a MulmoTerminal cell. The maintainer's live server holds your own session and every cell they have open, under the tmux socket -L mulmoterminal. Stopping it drops every cell to its not-started screen. Everything below exists so that the server you start is a different one, and the one you stop is the one you started.

The helper scripts/verify-scratch.ts does the parts that can go wrong. Use it rather than typing the commands it wraps: it refuses what the prose here would only warn about.

Pick a scratch HOME outside the repo (your scratchpad is right) and a free port, then keep both for the whole run:

H=<scratch dir>/verify-home      # never the account's own home; the helper refuses it
P=47411                          # any free port; never 34567, the dev server's

1. Launch

yarn build                                   # the launcher serves dist/; start refuses a stale one
node --import tsx scripts/verify-scratch.ts start --home "$H" --port "$P"

It prints the URL, the launcher pid, the server log, and socketPath. That is the tmux socket this server will create, computed from $H the same way the server does (server/config/home-scope.ts). To keep the two in step, the server is given $H as an absolute real path and does NOT inherit TMUX_TMPDIR, so its sockets land under the real /tmp. The helper runs on macOS and Linux only. It refuses to start when:

  • dist/ is older than src/. The page would be the previous build's, and "it works" would be about code you did not change.
  • something already answers on the port. That process is not evidence about this checkout.

It also writes $H/.zshrc with a short prompt, so the account name and host stay out of screenshots.

Do not start an agent (claude, codex) in a cell on this server. Under a scratch HOME, codex has opened its update screen and started brew upgrade by itself, and claude cannot log in. A Shell cell covers terminal, pane and MCP checks.

2. Doctor

node --import tsx scripts/verify-scratch.ts doctor --home "$H"

It exits non-zero unless all of these hold:

  • the server answers;
  • the launcher is the one start spawned (launcherIsThisCheckouts);
  • the server is identified as this scratch HOME's (serverIsThisScratchHomes);
  • the client build is fresh.

scratchTmuxRunning stays false until the first cell opens. Run it again after anything that could have restarted the server.

"Identified" is not "something answers on the port". Both processes must write to $H/server.log, which start opened for them; the live server writes to its terminal. The launcher must also have the start time recorded at spawn. The server must be in an entry it wrote under $H/.mulmoterminal/instances/, and in the launcher's process group.

3. Drive

Open a Shell cell and type into it. This repo has no Playwright dependency. Use any installed copy: the Playwright MCP when it can launch a browser, or another checkout's node_modules.

node .claude/skills/verify-mulmoterminal/drive-shell.mjs <dir holding node_modules/playwright> "$H" "$H/shell.png"

It runs doctor first and takes the port and socket from it, never from the state file. It refuses to drive unless doctor identifies this scratch server, so a stale or edited state file cannot aim it at the live server. It clicks [data-testid=agent-picker-shell] and then [data-testid=cell-dir-go], types echo VERIFY_MARKER_3593, and saves a screenshot. Copy it as the start of your own drive script.

The terminal is drawn on a canvas, so the page has no text to wait on. Wait on tmux instead — the session appearing, the output reaching capture-pane — never on a fixed delay. Do every check in the SAME browser session that opened the cell: a new browser starts on an empty grid.

Text typed into a Shell cell RUNS, so keep payloads harmless (echo <marker>).

Call a GUI MCP tool without an agent. The cell's session id is the mt-<id> from tmux -S <socketPath> ls. POST JSON-RPC to /api/mcp/<id> in this order:

  1. initialize
  2. notifications/initialized
  3. tools/call

Send accept: application/json, text/event-stream, and send back the mcp-session-id header the first answer hands you. The pane opens with the result in the browser that has the cell open.

4. Evidence

Diff against what the system itself reports, not against another output of yours:

  • The terminal screen — tmux -S <socketPath> capture-pane -p -t mt-<id>. Use the ABSOLUTE socketPath from start, never -L.
  • The page — a screenshot from the drive script.
  • The server's side — $H/server.log, and curl -sD - http://127.0.0.1:$P/<route> for headers, such as a presented page's CSP.

In the PR, say what you drove and what you could NOT exercise here, and why. Leaving it out reads as "the run covered everything". Mask paths and names before posting a screenshot.

5. Cleanup

node --import tsx scripts/verify-scratch.ts stop --home "$H"
tmux -S "$(dirname <socketPath>)/mulmoterminal" ls | wc -l   # read-only: the live sessions are all still there

stop signals the launcher's process group only when the launcher or its server is identified as in §2. If neither is, it signals nothing: a stale or edited state file cannot aim it elsewhere. It sends SIGTERM, and SIGKILL if the port still answers after a grace period.

It stops tmux only once nothing answers on the port, and only through the socket computed from $H. Any other socket — the live one, another scratch HOME's, a bare -L name — is refused. Every one of these decisions is in scripts/verify-scratch-plan.ts, pinned by test/scripts/verify-scratch-plan.spec.ts. It exits non-zero while the server still answers or its tmux still runs.

If start gives up waiting for the server, it stops what it spawned before exiting.

A socket FILE can outlive its server, so "the file is gone" is not the test. stop reports scratchTmuxRunning, from asking tmux.

Never clean up by hand with tmux kill-server, tmux -L mulmoterminal …, or TMUX_TMPDIR=… tmux -L mulmoterminal …. Each of these has stopped the live server (CLAUDE.md, "Never stop a tmux server you did not name by absolute path").

Keeping this skill true

When a run here fails for a reason the skill did not predict, fix the skill in the same PR as the change you were verifying:

  • a selector that moved;
  • a new precondition;
  • a check doctor should have made.

A step that only works from memory is not in the skill yet.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.