Skip to content

A Claude Code skill for managing parallel story development using Git worktrees, enabling multiple isolated Claude Code sessions to implement stories simultaneously without merge conflicts. Part of the BMAD (Breakthrough Method for Agile Development) framework with an 8-phase workflow and automated worktree management.

License

Notifications You must be signed in to change notification settings

thbst16/bmad-parallel-development

BMAD Parallel Development Skill

A Claude skill for managing parallel story development using Git worktrees with multiple Claude Code sessions. Part of the BMAD (Breakthrough Method for Agile Development) framework.

What It Does

Enables parallel implementation of multiple stories by:

  • Isolating each story in its own Git worktree
  • Running separate Claude Code sessions per story
  • Preventing merge conflicts through module boundary separation
  • Automating worktree and branch management

Installation

As a Claude Skill (Recommended)

Copy the skill folder to your Claude skills directory:

# Clone this repo
git clone https://github.com/bmad-method/bmad-parallel-development.git

# Copy skill to your skills directory
cp -r bmad-parallel-development/skill/parallel-development /mnt/skills/user/

Standalone Script Only

If you just want the bash script:

# Copy script to your project
cp bmad-parallel-dev/skill/parallel-development/scripts/parallel-dev.sh ./scripts/

# Make executable
chmod +x ./scripts/parallel-dev.sh

Quick Start

1. Configure Your Project

Create a config file at scripts/parallel-dev.config.sh:

PROJECT_PREFIX="myproject"
REPO_PATH="/path/to/your/repo"

PARALLEL_SET_1=(
  "E2-S1:feature/user-auth"
  "E2-S2:feature/user-profile"
  "E3-S1:feature/dashboard"
)

2. Generate Parallelization Plan

Use the included prompt with your SM agent:

claude
# Paste the prompt from references/create-stories-prompt.md

3. Execute Parallel Development

# Setup worktrees for parallel set 1
./scripts/parallel-dev.sh setup 1

# Open terminals for each worktree
# Terminal 1: cd ../myproject-E2-S1 && claude
# Terminal 2: cd ../myproject-E2-S2 && claude
# Terminal 3: cd ../myproject-E3-S1 && claude

# After all stories complete, integrate
./scripts/parallel-dev.sh integrate 1

# After PR merged, cleanup
./scripts/parallel-dev.sh cleanup 1

Workflow Overview

The skill implements an 8-phase workflow:

Phase Description
0 Prerequisites - Foundation stories complete
1 Prepare Stories - Create story files on main
2 Create Worktrees - Branch per story
3 Parallel Implementation - One Claude Code per worktree
4 Per-Story Code Review
5 Integration Branch - Merge all features
6 Integration Review - Full test suite
7 Pull Request - Merge to main
8 Cleanup - Remove worktrees and branches

File Structure

parallel-development/
├── SKILL.md                         # Main skill entry point
├── scripts/
│   └── parallel-dev.sh              # Worktree management script
└── references/
    ├── workflow.md                  # Complete 8-phase workflow
    ├── workplan-template.md         # Template for parallel sets
    └── create-stories-prompt.md     # Prompt for generating plan

Requirements

  • Git 2.15+ (worktree support)
  • Bash 4.0+
  • Claude Code CLI
  • GitHub CLI (optional, for PR creation)

BMAD Integration

This skill integrates with BMAD workflows:

  • /bmad:bmm:workflows:create-story - Generate story files
  • /bmad:bmm:workflows:dev-story - Implement a story
  • /bmad:bmm:workflows:code-review - Review implementation

Critical Rules

  1. ONE AGENT = ONE STORY - Never work on multiple stories in a single session
  2. PHASES ARE SEQUENTIAL - Complete each phase before proceeding
  3. PHASE 1 ON MAIN - Story files must be created on main before worktrees
  4. CLEANUP IS MANDATORY - Phase 8 must complete before next parallel set

Examples

See the examples/ directory for:

  • Filled workplan example
  • Sample parallel set configurations

License

MIT

About

A Claude Code skill for managing parallel story development using Git worktrees, enabling multiple isolated Claude Code sessions to implement stories simultaneously without merge conflicts. Part of the BMAD (Breakthrough Method for Agile Development) framework with an 8-phase workflow and automated worktree management.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages