Skip to content

Reduce duplicate dependency installation across local worktrees #3234

Description

@nighca

Background

When using AI-assisted development, we often create more than one local worktree to improve parallel development efficiency. In that setup, each worktree ends up reinstalling the same dependencies, including node_modules and additional assets such as SPX- and SPXLS-related WASM files. This leads to repeated installation work and unnecessary disk usage.

We need a solution that allows different worktrees to reuse dependencies as much as possible, or at least reuse them efficiently at the disk level.

What this issue is about

Explore and implement a dependency management strategy that reduces duplicated installation cost across multiple local worktrees in the Builder development workflow. The solution should consider both package-manager-managed dependencies and extra installed artifacts such as SPX-related WASM assets.

Plan

  • Review the current local installation flow for Builder worktrees, including node_modules and extra installed assets such as SPX and SPXLS WASM files.
  • Evaluate candidate approaches for reuse across worktrees, including switching from npm to pnpm or adopting another shared-storage strategy.
  • Check whether the chosen approach can also cover non-package.json artifacts, or define an additional mechanism for those assets.
  • Propose or implement a workflow that reduces repeated installs and disk duplication for multi-worktree development.

Notes

  • Switching from npm to pnpm is one possible direction, but it may only solve dependencies declared in package.json.
  • The final solution should also consider assets installed outside the package manager flow, especially SPX-related WASM files.
  • The goal is both faster setup for additional worktrees and better disk reuse.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions