Skip to content

/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-migration

Layer-based Parallelization

/setup-parallel frontend,backend,infrastructure
/setup-parallel mobile-app,web-app,shared-api

Team-based Parallelization

/setup-parallel team-a-feature,team-b-feature,integration-testing

What It Does

  1. Analyzes Tasks: Evaluates dependencies between tasks
  2. Creates Worktrees: Sets up separate working directories:
    project/
    ├── main/           (original)
    ├── worktree-auth-system/
    ├── worktree-payment/
    └── worktree-dashboard/
  3. Sets Up Branches: Creates feature branches for each task
  4. Configures Environment: Ensures each worktree has proper setup
  5. Creates Task Tracking: Generates task lists for each stream
  6. 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 files

Branch 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

bash
# List all worktrees
git worktree list

# Switch between worktrees
cd ../worktree-auth-system

# Remove completed worktree
git worktree remove worktree-payment

Sharing Changes

bash
# Cherry-pick from another worktree
git cherry-pick <commit-from-other-worktree>

# Merge another worktree's branch
git merge feature/payment-integration

Task Management

Creates task tracking in each worktree:

worktree-auth/.orchestre/tasks/
├── setup-tasks.md
├── implementation-tasks.md
└── integration-tasks.md

Best Practices

  1. Keep Tasks Independent: Minimize merge conflicts
  2. Regular Integration: Merge completed work frequently
  3. Communicate Changes: Update team on progress
  4. Clean Up: Remove worktrees after merging
  5. Use CI/CD: Each worktree can have its own pipeline

Common Patterns

Frontend/Backend Split

/setup-parallel frontend-ui,backend-api,shared-types

Allows UI and API development in parallel with shared type definitions.

Feature Team Setup

/setup-parallel feature-a,feature-b,feature-c,integration

Multiple features with dedicated integration testing.

Hotfix Workflow

/setup-parallel hotfix,current-feature,next-release

Handle urgent fixes without disrupting ongoing work.

Integration Strategies

Daily Integration

  1. Each worktree commits to its branch
  2. Integration worktree pulls all changes
  3. Resolve conflicts in integration worktree
  4. 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

bash
# If worktree is locked
git worktree prune

# If path issues occur
git worktree repair

Cleanup

After completing parallel work:

bash
# Remove worktree
git worktree remove worktree-name

# Clean up branches
git branch -d feature/task-name
  • /orchestrate - Plan before parallelizing
  • /execute-task - Work within each parallel stream
  • /generate-implementation-tutorial - Coordinate complex parallel work
  • /review - Review integration points

Built with ❤️ for the AI Coding community, by Praney Behl