/setup-parallel
Set up parallel development workflows using Git worktrees for efficient multi-stream development.
Overview
The /setup-parallel prompt helps you work on multiple features simultaneously by setting up Git worktrees. This allows you to have multiple working directories from the same repository, enabling true parallel development without the context-switching overhead of stashing and branching.
When to Use
Use /setup-parallel when you need to:
- Work on multiple features simultaneously
- Separate frontend and backend development
- Handle urgent fixes while working on features
- Collaborate on different parts of the system
- Test integration between multiple changes
- Maximize development throughput
Syntax
/setup-parallel <task1,task2,task3...>Arguments
- tasks (required): Comma-separated list of parallel tasks or features
Examples
Feature-based Parallelization
/setup-parallel auth-system,payment-integration,user-dashboard
/setup-parallel frontend-redesign,api-v2,database-migrationLayer-based Parallelization
/setup-parallel frontend,backend,infrastructure
/setup-parallel mobile-app,web-app,shared-apiTeam-based Parallelization
/setup-parallel team-a-feature,team-b-feature,integration-testingWhat It Does
- Analyzes Tasks: Evaluates dependencies between tasks
- Creates Worktrees: Sets up separate working directories:
project/ ├── main/ (original) ├── worktree-auth-system/ ├── worktree-payment/ └── worktree-dashboard/ - Sets Up Branches: Creates feature branches for each task
- Configures Environment: Ensures each worktree has proper setup
- Creates Task Tracking: Generates task lists for each stream
- Provides Instructions: Clear guidance for working in parallel
Parallel Workflow Structure
Directory Layout
your-project/
├── .git/ # Shared repository
├── main/ # Main development
│ └── [original project]
├── worktree-<task1>/ # First parallel task
│ └── [full project copy]
├── worktree-<task2>/ # Second parallel task
│ └── [full project copy]
└── .orchestre/
└── parallel-tasks/ # Coordination filesBranch Strategy
- Each worktree has its own feature branch
- All worktrees share the same Git repository
- Changes are isolated until merged
- Can cherry-pick between worktrees
Benefits of Parallel Development
No Context Switching
- Each feature has its own directory
- No need to stash/unstash changes
- IDE windows can stay open
Faster Development
- Work on multiple features simultaneously
- Test integration locally
- Reduce blocking dependencies
Better Testing
- Run different versions side-by-side
- Test feature interactions
- Parallel CI/CD pipelines
Coordination Strategies
Task Distribution
The prompt helps distribute tasks based on:
- Independence: Tasks that don't conflict
- Dependencies: Proper ordering when needed
- Resources: Balancing workload
- Skills: Matching tasks to expertise
Integration Points
Identifies where tasks will merge:
- Shared interfaces
- Database schemas
- API contracts
- Configuration files
Working with Worktrees
Basic Commands
# List all worktrees
git worktree list
# Switch between worktrees
cd ../worktree-auth-system
# Remove completed worktree
git worktree remove worktree-paymentSharing Changes
# Cherry-pick from another worktree
git cherry-pick <commit-from-other-worktree>
# Merge another worktree's branch
git merge feature/payment-integrationTask Management
Creates task tracking in each worktree:
worktree-auth/.orchestre/tasks/
├── setup-tasks.md
├── implementation-tasks.md
└── integration-tasks.mdBest Practices
- Keep Tasks Independent: Minimize merge conflicts
- Regular Integration: Merge completed work frequently
- Communicate Changes: Update team on progress
- Clean Up: Remove worktrees after merging
- Use CI/CD: Each worktree can have its own pipeline
Common Patterns
Frontend/Backend Split
/setup-parallel frontend-ui,backend-api,shared-typesAllows UI and API development in parallel with shared type definitions.
Feature Team Setup
/setup-parallel feature-a,feature-b,feature-c,integrationMultiple features with dedicated integration testing.
Hotfix Workflow
/setup-parallel hotfix,current-feature,next-releaseHandle urgent fixes without disrupting ongoing work.
Integration Strategies
Daily Integration
- Each worktree commits to its branch
- Integration worktree pulls all changes
- Resolve conflicts in integration worktree
- Merge back to main when stable
Feature Flags
Use feature flags to merge incomplete features:
- All worktrees can merge to main
- Features hidden behind flags
- Progressive rollout when ready
Troubleshooting
Merge Conflicts
- Use integration worktree for resolution
- Keep changes small and focused
- Communicate about shared files
Worktree Issues
# If worktree is locked
git worktree prune
# If path issues occur
git worktree repairCleanup
After completing parallel work:
# Remove worktree
git worktree remove worktree-name
# Clean up branches
git branch -d feature/task-nameRelated Commands
/orchestrate- Plan before parallelizing/execute-task- Work within each parallel stream/generate-implementation-tutorial- Coordinate complex parallel work/review- Review integration points
