You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
farm: no per-worktree dependency setup hook (JS/TS node_modules absent in worktrees) #92
Found during the docs-site-mvp/ca:sprint --farm run (2026-06-18).
git worktree add checks out only tracked files, so a JS/TS project's node_modules (gitignored) is absent in each task worktree. Gate commands like npx vitest / npx tsc then fail because the toolchain can't be resolved, and gate commands[0] must stay the narrow test (the mutation guard re-runs it many times), so npm ci cannot live there.
Workaround used: install the toolchain at the project rootnode_modules (already gitignored). Because worktrees live under .farm/worktrees/<id>/, Node resolves vitest/tsc by walking up to the project-root node_modules. Confirmed working, but it's an undocumented hack.
Perma-fix candidates:
A one-time-per-worktree setup hook: plan.meta.setup or FARM_SETUP (e.g. npm ci --prefer-offline) run once after worktree add, before gates, and NOT counted in mutation re-runs.
Or an opt-in "link node_modules from the integration checkout" step for JS/TS plans.
Document the project-root-node_modules resolution trick in includes/farm.md as the interim pattern.
Activity
feat(farm): per-worktree dependency setup hook (#92) (#96)