bridge-worktreelisted
Install: claude install-skill ainurdev/mystical-assistant
# Feature work happens in a worktree
`master` is the checkout the live bridge runs from. Work there and a half-built
feature is one `mystical restart` away from being the thing the user is talking
to. One-file fix or doc tweak: master is fine. Anything else: worktree.
## Create it where the dashboard can see it
```sh
git worktree add -b feat/x ~/projects/.worktrees/mystical-assistant/feat-x
```
**Inside `BASE_PATH` is the load-bearing part** — `_abs_within()` drops any tree
outside `~/projects`, so a worktree in `/tmp` is invisible to every surface and no
session can start in it. Git resolves branch→tree, so a hand-made `git worktree
add` elsewhere under `~/projects` still attaches; `.worktrees/<repo>/<branch>`
(slashes to dashes, `_worktree_path()` in `bridge/dashboard/server.py`) is the
convention that keeps it out of the project browser.
## What isn't in there
`git worktree add` checks out tracked files only, so everything git-ignored is
missing:
- **`.env`** — `cp ~/projects/mystical-assistant/.env <wt>/.env`. Without it
`bin/mystical` dies on any command except `build`/`doctor`.
- **`node_modules`** — only if you must build web *in* the worktree:
`cd <wt>/bridge/dashboard/web && npm ci`. Usually you don't; build from master
at ship time instead.
## New data goes in a scratch DB
`config.BRIDGE_DB` defaults to `~/.bridge_state/bridge.db` — the live bridge's
sessions, turns and events. A worktree that migrates it or writes new-shape rows
damages the thing the