Skip to content
Development
Command

/orchestrate

Orchestrate multi-PRD workflow with dependency management

From plugin
claude-plugin-prd-workflow
1227 skills17 agents27 commands

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/orchestrate

Context preview

What this command does when you run it.

Orchestrate multi-PRD workflow with dependency management

Command definition

orchestrate.md
name: orchestrate
description: Orchestrate multi-PRD workflow with dependency management
category: Workflow Orchestration

Orchestrate Command

Coordinate parallel development of multiple PRDs with automatic dependency resolution and conflict prevention.

Purpose

Enable efficient multi-feature development:

  • Visualize PRD dependencies
  • Suggest optimal development order
  • Coordinate parallel work (using worktrees)
  • Prevent merge conflicts
  • Track cross-PRD blockers
  • Automate sequential merges

Workflow

Step 1: Analyze PRD Landscape (Parallel Execution)

**NEW: Parallel Analysis for Speed**

Instead of analyzing PRDs sequentially (slow), analyze all in parallel:

// OLD (Sequential - SLOW):
for (const prd of allPRDs) {
  await analyzePRD(prd);  // 10s per PRD × 10 PRDs = 100s total
}

// NEW (Parallel - FAST):
await Promise.all(
  allPRDs.map(prd => analyzePRD(prd))  // All at once = 10s total
);

**Performance Impact**:

  • 10 PRDs: 100s → 10s (-90%)
  • 20 PRDs: 200s → 10s (-95%)

Scan all PRDs across statuses and extract (in parallel):

  • PRD dependencies (declared in PRDs)
  • File overlap (potential conflicts)
  • Priority levels
  • Current status (draft/review/ready/in-progress)
  • Developer assignments (if tracked)
🔍 Analyzing PRDs...

⚡ Parallel analysis of 10 PRDs:
  [████████████████████] PRD-001 ✓
  [████████████████████] PRD-002 ✓
  [████████████████████] PRD-003 ✓
  [████████████████████] PRD-004 ✓
  [████████████████████] PRD-005 ✓
  [████████████████████] PRD-006 ✓
  [████████████████████] PRD-007 ✓
  [████████████████████] PRD-008 ✓
  [████████████████████] PRD-009 ✓
  [████████████████████] PRD-010 ✓

✅ Analysis complete in 12s (vs 120s sequential)

Step 2: Build Dependency Graph

Create directed graph:

  • Nodes = PRDs
  • Edges = dependencies
  • Edge labels = dependency type (hard/soft)

Detect:

  • ✅ Valid linear chains (A → B → C)
  • ✅ Parallel branches (A → C, B → C)
  • ⚠️ Circular dependencies (A → B → A)
  • ⚠️ Missing dependencies

Step 3: Identify Conflicts (Parallel Execution)

**NEW: Parallel Conflict Detection**

Analyze all PRD pairs in parallel instead of sequentially:

// Generate all pairs of in-progress PRDs
const prdPairs = [];
for (let i = 0; i < inProgressPRDs.length; i++) {
  for (let j = i + 1; j < inProgressPRDs.length; j++) {
    prdPairs.push([inProgressPRDs[i], inProgressPRDs[j]]);
  }
}

// Check all pairs in parallel
const conflicts = await Promise.all(
  prdPairs.map(([prdA, prdB]) => detectConflicts(prdA, prdB))
);

Analyze file overlap:

# For each pair of in-progress PRDs (in parallel)
git diff main...feat/PRD-003 --name-only &
git diff main...feat/PRD-008 --name-only &
wait  # Wait for all parallel git commands
# Find intersection

Classify conflicts:

  • 🔴 High risk: Same file, same lines
  • 🟡 Medium risk: Same file, different sections
  • 🔵 Low risk: Same directory, different files

**Performance**:

  • 5 in-progress PRDs = 10 pairs
  • Sequential: 10 pairs × 2s = 20s
  • Parallel: All pairs at once = 2s (-90%)

Step 4: Generate Orchestration Plan

🎼 **Workflow Orchestration Plan**

**Context**: 12 active PRDs, 2 in progress, 5 ready, 3 under review, 2 draft

---

## 📊 Dependency Graph

┌─────────────┐ │ PRD-003 │ P0: Design System (in progress, day 2) │ Design │ ├─ Provides: Component library │ System │ └─ Blocks: PRD-004, PRD-007, PRD-010 └─────────────┘ │ ├──────────────┬──────────────┬──────────────┐ │ │ │ │ v v v v ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ PRD-004 │ │ PRD-007 │ │ PRD-010 │ │ PRD-012 │ │ Landing │ │ Auth UI │ │ Dashboard│ │ Settings │ │ Page │ │ (ready) │ │ (review) │ │ (draft) │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ (ready)

┌─────────────┐ │ PRD-008 │ P0: RSS Monitoring (in progress, day 1) │ RSS │ ├─ No dependencies │ Monitor │ └─ Blocks: PRD-009 └─────────────┘ │ v ┌──────────┐ │ PRD-009 │ │ Analytics│ │ Dashboard│ └──────────┘ (ready)


---

## 🚦 Current Bottlenecks

### Critical Path: PRD-003 (Design System)
- **Blocking**: 3 ready PRDs, 1 under review
- **Status**: 36% complete (~2 more days)
- **Impact**: Landing page, Auth UI, Dashboard waiting
- **Recommendation**: Focus on completing PRD-003 first

### Parallel Opportunity: PRD-008 (RSS Monitoring)
- **Independent**: No shared files with PRD-003
- **Status**: 20% complete (~3 more days)
- **Can run**: Fully parallel in worktree

---

## 🎯 Recommended Development Strategy

### Phase 1: Complete Active Work (Now - Day 3)
**Parallel execution** (using worktrees):

```bash
# Worktree 1 (main repo): PRD-003
cd acmecorp/
git worktree list  # feat/PRD-003-design-system

# Worktree 2: PRD-008
cd ../acmecorp-rss/
git worktree list  # feat/PRD-008-rss-monitoring

**Action**: Continue both PRDs in parallel

  • No file conflicts detected ✅
  • Different tech areas (UI vs backend)
  • Can merge independently

**ETA**: Day 3 (both complete)

---

Phase 2: Merge & Unblock (Day 3)

**Merge order** (automated by orchestrator):

1. ✅ Merge PRD-008 first (no dependencies)

  • `gh pr merge #XX --squash`
  • Clean up worktree: `git worktree remove ../acmecorp-rss`

2. ✅ Merge PRD-003 second (unblocks 3 PRDs)

  • `gh pr merge #YY --squash`
  • Clean up worktree: `git worktree remove ../acmecorp-design-system`

---

Phase 3: Start Next Wave (Day 4)

**Parallel batch** (3 worktrees):

Since PRD-003 (Design System) is merged:

# Start 3 PRDs in parallel (config: max 3)
/code-prd PRD-004  # Landing Page (worktree 1)
/code-prd PRD-007  # Auth UI (worktree 2)
/code-prd PRD-009  # Analytics Dashboard (worktree 3)

**Conflict Analysis**:

  • 🟢 PRD-004 ↔ PRD-007: Low risk (different pages)
  • 🟡 PRD-004 ↔ PRD-009: Medium risk (shared header component)
  • 🟢 PRD-007 ↔ PR
Read more
Ships withclaude-plugin-prd-workflow

The complete Claude Code plugin for Product-Driven Development Transform PRDs from ideas to shipped features with AI-powered review, guided implementation, and automated quality gates. Never ship unclear requirements again.

Get the whole plugin

Other commands on claude-plugin-prd-workflow.