jevsnes.git / tools / README.md

Chapter 24: tools, programs about the build, not the game

Everything in apps/ plays or tests the game. Everything here is for the person (or agent) working on it: getting an MCP client connected to the window in milliseconds, checking from a cron job that Jev is still being asked, and swapping new code into a running window without losing the game.

They have one thing in common: they talk to the window from outside, over its MCP endpoint (http://127.0.0.1:7637/mcp, chapter 8) or, for the MCP launcher, by starting the stdio proxy that talks to it.

flowchart LR
  client["MCP client (Claude Code)"] -->|"stdio"| launch["tools/mcp/launch.sh"]
  launch -->|"execs"| proxy["run/bin/native mcp"]
  proxy -->|"HTTP"| window["the window, :7637"]
  watch["tools/watch/budget.sh"] -->|"HTTP"| window
  patch["tools/hotpatch/patch.sh"] -->|"HTTP: dev_mode, hot_patch"| window

Aside: shell where it is small, Rust where it is not. tools/mcp and tools/watch are bash, kept shellcheck-clean, and budget.sh keeps every piece of parsing in a small function its self-test can call. When something outgrows that (building an ELF shared object from object files, say), it is Rust, as tools/hotpatch is.

Try it. nix develop -c shellcheck tools/mcp/*.sh tools/watch/*.sh prints nothing: both are kept clean. (tools/hotpatch/patch.sh has one info-level note about ls, as of 2026-10-02.)

For the people who maintain it

In this folder

PathChapterWhat
mcp/25What .mcp.json starts: a launcher that execs a kept copy of native as the stdio MCP proxy, never building, and the script that refreshes the copy.
watch/26A one-line status from the running window (task, mode, position, questions in the last minute, what is stopping questions), with exit codes for a watchdog.
hotpatch/27Builds a Dioxus-subsecond patch from objects buck2 just rebuilt, and the script that drives the whole rebuild-and-patch cycle.
README.mdThis chapter.
CLAUDE.mdHow to build and run tools here, for agents.

← Previous: Chapter 23, fixtures/ · Up: jevsnes · Next: Chapter 25, mcp/ →