Several things agents were told to do did not match what the machine does.
- Env discovery pointed at .env / .env.local / backend/.env. In a webmux
worktree the real values are in $(git rev-parse --git-dir)/webmux/runtime.env
(BACKEND_PORT, FRONTEND_PORT, DATABASE_URL, CARGO_FEATURES, WM_DB_NAME),
sourced by every pane and undocumented. Reading it is also not blocked by the
Read(**/.env) deny rules, which the old instruction walked straight into.
- The database name rule said branch-with-underscores. worktree-common.sh uses
the worktree directory basename, and Postgres truncates at 63 characters, so
branch hugo/win-2340-… resolves to windmill_win_2340_…_and_eval with no hugo_
prefix and the tail chopped. A wrong DATABASE_URL guts the sqlx cache.
- The restart procedure said "tmux pane 1" and sent keys to an undefined
<pane1>. Pane 1 is the backend under the full profile and the frontend under
frontendOnly. Replaced with finding the pane by pane_current_command,
recovering the live feature set from the running process (CARGO_FEATURES in
runtime.env only records what the pane started with), and restarting in place.
- Added recovery for an orphaned backend holding the port: it reparents to
systemd when its shell dies, so it survives anything that looks like cleanup.
Three checks before killing a single pid, because pkill -f windmill takes out
every sibling worktree.
- Agents spawned their own servers because AGENTS.md opened by telling them to.
Now it checks for the existing panes first; the spawn commands are scoped to
a plain checkout.
- New EE worktrees branched from the EE repo's local main, which nothing
fast-forwards, so they started behind the commit pinned in
backend/ee-repo-ref.txt — the one CI builds against. They now base on the pin,
falling back to main only when it is unreadable.
- Enabled webmux autoPull so local main stays current; new worktrees are
branched from it. Documented what WM_CLONE_DB does, including that it
terminates every connection to the base windmill database.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore: track origin EE branch in worktree setup when absent locally
* chore: pass --track to worktree add so upstream is set regardless of git config
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: guard first worktree arm on local branch to avoid remote-only DWIM
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* chore: remove wm-cursor, add local-review skill, update PR skill for EE
- Remove the unused wm-cursor script and all references to it in
README_WORKMUX_DEV.md and worktree-common.sh
- Add /local-review skill for code review (bugs + CLAUDE.md compliance)
- Add EE companion PR workflow to the /pr skill
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: add wm-ts-nav tree-sitter navigator and fix format hooks
- Add wm-ts-nav: standalone tree-sitter code navigator with SQLite index
for fast symbol search, definition lookup, and file outlines across
Rust, TypeScript, and Svelte files (~12ms warm, ~1s cold for 482 files)
- Fix format hooks: surface errors instead of swallowing with 2>/dev/null,
use direct prettier path with svelte plugin, add success feedback
- Add wm-ts-nav commands to settings allow list
- Document wm-ts-nav usage in CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(wm-ts-nav): add refs command and --parent filter
- refs: find usages of a symbol in code, skipping comments and strings
(tree-sitter AST walk, ~46ms for 482 files vs grep's 4ms but no noise)
- --parent filter on search: find all methods on a type across all files
(e.g. search "%" --kind function --parent ServiceName)
- Update CLAUDE.md with clearer when-to-use guidance
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(wm-ts-nav): index refs in DB with import-path resolution
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(wm-ts-nav): add body, callers, callees commands and refs --file/--caller
- body: extract a symbol's source code from disk using indexed line ranges
- callers: cross-file call graph via SQL join of refs + symbols tables
- callees: list all identifiers referenced within a symbol's body
- refs --file: scope results to files matching a substring
- refs --caller: annotate each ref with the containing function name
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(wm-ts-nav): add auto-rebuilding wrapper script
The `wm-ts-nav/nav` wrapper checks if source files are newer than the
binary and rebuilds automatically. Invoked via `sh wm-ts-nav/nav` to
avoid needing executable permissions after clone.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: tighten CLAUDE.md nav section for actionable guidance
Remove redundant question→command mapping, latency numbers, and
excessive examples. Lead with "prefer wm-ts-nav over Read to save
context window" and keep only the patterns that change behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: revert backend/Cargo.lock to main
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: promote wm-ts-nav in workflow, copy binary to worktrees
- CLAUDE.md: integrate wm-ts-nav into Workflow step 1 and Core
Principles so agents use outline/body before full file reads
- workmux: copy built binary via files.copy
- worktree-common.sh: copy binary in wm_copy_dependencies for webmux
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(wm-ts-nav): fix double indexing, add TSX grammar, remove needless clone
- Reuse index stats from the pre-query update instead of indexing twice
on the Index command
- Add Lang::Tsx variant so .tsx/.jsx files use LANGUAGE_TSX instead of
LANGUAGE_TYPESCRIPT (Svelte stays on TS since script blocks are pure TS)
- Remove source.clone() for non-Svelte files — move directly instead
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(wm-ts-nav): fix svelte line numbers, add class methods, innermost caller
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: optionally enable rust-analyzer plugin in worktree settings
When USE_RUST_PLUGIN env var is set, the worktree-env script now includes
the rust-analyzer-lsp plugin in .claude/settings.local.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: remove rust-analyzer plugin from default settings
The rust-analyzer plugin is now opt-in via USE_RUST_PLUGIN env var
in worktree-env, so it no longer needs to be in the shared settings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: add WM_CLONE_DB and USE_RUST_PLUGIN to wmdev startup envs
Defaults both to false so they can be toggled per-worktree.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use explicit truthy checks for WM_CLONE_DB and USE_RUST_PLUGIN
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Create a dedicated PostgreSQL database for each worktree during
workmux post_create, run sqlx migrations, and drop it on cleanup.
Also auto-trust the worktree directory in ~/.claude.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add CARGO_FEATURES passthrough: backend pane reads from .env.local,
wm-cursor supports --features flag on add/open commands
- Fix node_modules copy in worktrees: use cp -a to preserve .bin/
symlinks that cp -r would dereference (fixes openapi-ts errors)
- Fix EE repo discovery from worktrees: resolve main repo root via
git-common-dir, search multiple candidate paths
- Add cursor session cleanup to worktree-cleanup (pre_remove hook)
- Use workmux -b flag in wmc add, remove npm install from frontend pane
- Change openBrowserOnce for Cursor port forwarding
- Document cargo features usage and fix stale files.symlink reference
in README
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add wm-cursor (wmc) script that bridges workmux with Cursor SSH remote,
giving each worktree its own Cursor window with an independently-focused
grouped tmux session.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add windmill-ee-private worktree support to workmux
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add EE worktree cleanup on remove and parent-dir lookup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>