factory-worktree

Create isolated jj or git worktrees for parallel agent development.

Updated Jun 22, 2024
One-click install
npx skills add https://github.com/Dyrean/dotfiles --skill factory-worktree-dyrean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: factory-worktree
Source: https://github.com/Dyrean/dotfiles/tree/main/pi/.pi/agent/extensions/pi-factory/skills/factory-worktree
Command: npx skills add https://github.com/Dyrean/dotfiles --skill factory-worktree-dyrean

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Worktree-based parallel development solves conflicts when multiple agents need to edit files simultaneously by giving each agent its own working directory that shares the repository.

Core Features & Use Cases

  • Isolation: each worktree has its own copy of files and state
  • Independent toolchains: run servers, tests, and linters per worktree
  • Safe merges: merge results back with minimal conflicts
  • Use cases: parallel feature work, refactoring without overlaps, experimental experiments

Quick Start

Create separate worktrees for each task, then run your agents in their own directories.

Frequently Asked Questions about factory-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run parallel development without causing file conflicts in a shared repository?

You can achieve conflict-free parallel development by assigning each agent its own isolated git worktree. This provides separate working directories sharing the repository, allowing concurrent edits and independent testing without overwriting files.

How do I set up git worktrees for concurrent agents and merge their results?

Create separate worktrees for each task, run agents in their own directories, and then merge results back. The system handles installing dependencies per workspace, dispatching parallel agents, and cleaning up worktrees after the safe merge.

Does this parallel worktree approach work with both git and jj?

Yes, this parallel worktree coordination works with both git worktree and jj. It supports environments where multiple agents develop concurrently, test, and merge changes in a shared repository using either version control backend.

Can I run independent toolchains and tests in separate worktrees?

Yes, each worktree maintains its own copy of files and state, allowing you to run independent toolchains, servers, tests, and linters per workspace. This isolation ensures concurrent toolchain execution does not cause state conflicts.

What are the best use cases for isolated git worktrees in multi-agent development?

Isolated git worktrees are best for parallel feature work, refactoring without overlaps, and running experimental branches. These scenarios benefit from independent toolchains, safe merges, and clean cleanup after concurrent development finishes.