← ClaudeAtlas

dogfood-worktreelisted

Procedure for dogfooding Myco changes inside a git worktree so capture, MCP, and CLI route to the worktree's own build instead of the production binary. Use when developing Myco in a git worktree, when capture/MCP in a worktree behaves like production or points at the wrong build, or when wiring up `make dev-link-worktree` / `make dev-unlink-worktree`. Covers why `.myco/runtime.command` does not travel with `git worktree add`, why a build must happen first, the direct-CLI `MYCO_HOME` gotcha, the shared-vault schema rollup hazard across worktrees, and the vendor-asset build gotcha.
goondocks-co/myco · ★ 13 · AI & Automation · score 73
Install: claude install-skill goondocks-co/myco
# Dogfooding Myco in a Git Worktree This is a **dogfood-only** concern — myco using myco to build myco. A regular user just has one `myco` installed; their own worktrees "just work" because everything resolves to that single binary. The complexity here exists only because we run a **dev** binary (`myco-dev`) alongside the **prod** binary (`myco`) and need capture to keep working while we change Myco itself. ## The core gotcha: a fresh worktree is not myco-dev aware Binary resolution (global launcher `~/.myco/launcher.cjs` and `bin/myco-run`) walks **up from the working directory** looking for `<dir>/.myco/runtime.command`, then the machine pin, then the vendored binary, then PATH `myco`. `.myco/runtime.command` is **gitignored** (`.myco/.gitignore`). `git worktree add` only materializes *tracked* files, so a new worktree starts with **no pin**. With no pin: - A worktree **nested** under the main checkout (e.g. `.worktrees/foo`) walks up and finds the *main checkout's* pin → runs **main's `myco-dev`** (stale vs. the worktree's changes). - A **sibling** worktree (e.g. `../myco-foo`) finds nothing → hooks fall through to PATH `myco` = the **production** binary. Capture then hits the prod daemon/vault. Unacceptable for dogfooding. Either way a fresh worktree never uses **its own** build until you pin it. ## Procedure 1. **Create the worktree** off the branch you're developing: ```bash git worktree add ../myco-<feature> <branch> cd ../myco-<feature> ```