Development
Developing Muteki with Muteki
Using the installed macOS desktop app to drive development conversations bound to your local checkout, verifying changes in isolated dev windows, and updating the installed app on demand.
On this page
The recommended self-hosting workflow uses your installed /Applications/Muteki.app to host development conversations pointed directly at your working checkout, then launches isolated dev instances from that directory for verification without creating extra worktrees or duplicate credential stores.
Base build flags and data rules are in Development, build, and packaging.
1. Bind the repository directory in Muteki.app#
Open /Applications/Muteki.app, create or pick a project in Local runtime pointing to the absolute path of your checkout (for example /Users/you/src/muteki), select a working agent CLI and model, and instruct the agent to verify cwd and read AGENTS.md before editing:
| Path | Role |
|---|---|
/Applications/Muteki.app | Installed desktop app hosting your ongoing dev conversation |
| Current checkout directory | Source tree edited, built, and run by dev commands |
<checkout>/.state | Default runtime data directory used by dev instances (check symlinks first) |
The installed app's own data remains under ~/Library/Application Support/Muteki/data; do not force-pass that path into dev runs.
2. Task dispatch template#
Modify Muteki inside the bound repository directory <ABSOLUTE_PATH>.
Goal: <user-visible behavior and reproduction steps>.
Allowed scope: <modules>.
First confirm actual cwd, read root AGENTS.md and affected module AGENTS.md files, and preserve existing uncommitted edits.
Work directly in the current checkout and environment without creating separate worktrees, containers, or duplicate setups.
After implementation, complete local verification before PR:
1. Run `node scripts/verify/run.mjs --doctor` to verify `.state` symlink and port 8100 ownership; use explicit `MUTEKI_STATE_DIR` for clean-state tests.
2. Run `node scripts/verify/run.mjs` for custom lints and property tests.
3. Verify live behavior from the current checkout (Web via `kimi-webbridge`, never Playwright; Desktop via `cua-driver` locked to the dev window PID, never operating on `/Applications/Muteki.app`).
Restart only dev processes started by this task; keep `/Applications/Muteki.app` running untouched.
Report exact code diffs, observed verification results, and any unverified items.
Do not replace /Applications/Muteki.app, push upstream, or publish releases unless explicitly asked.3. Launching dev instances#
From the repository root:
# Full dev build (Rust local profile + Next production build) and launch NSH dev desktop window
node scripts/dev.mjs
# Frontend hot-reload preview (port 3103 / .next-dev) + dev window reusing existing Rust binary
node scripts/dev.mjs --hotAdd --web when testing Web-specific behavior. Always confirm whether port 8100 belongs to the intended checkout and state directory before running E2E checks, and stop only the dev process you started with Ctrl+C.
4. Verification & handoff#
Run node scripts/verify/run.mjs --doctor and node scripts/verify/run.mjs, record the exact startup command, source checkout, and state directory (default .state vs. isolated MUTEKI_STATE_DIR), then verify the exact user workflow with real models when agent behavior changed (or verify links/commands/facts for docs-only updates).
5. Updating the installed app on demand#
Only when you explicitly want to replace /Applications/Muteki.app with your verified build:
- Quit
/Applications/Muteki.appcleanly (or schedule an independent installer that waits until all chats/queues are idle). - Run
node scripts/install-macos.mjs --build --openfrom the checkout root (localprofile package, replace, and relaunch). - Verify the relaunched app directly, since dev verification does not substitute for validating the packaged app bundle. User data outside the bundle stays intact; rollback backups are not retained once replacement succeeds.

