P

Parallel Feature Build Command

Accelerates feature development by breaking work into independent sub-tasks and executing them in parallel using Claude Code subagents. Coordinates merging and conflict resolution automatically.

CommandCommunitydevelopmentv1.0.0MIT
0 views0 copies

Command

/parallel-build

Description

Breaks a feature into independent sub-tasks and dispatches them to parallel subagents for simultaneous development. Each subagent works in isolation, and results are merged with automatic conflict resolution.

Behavior

Phase 1: Task Decomposition

Analyze the feature request and break it into independent, parallelizable units:

## Feature: User Dashboard ### Parallel Tasks Identified: 1. **API Routes** — Create /api/dashboard/stats, /api/dashboard/activity 2. **Database Layer** — Add dashboard_preferences table, migration, queries 3. **UI Components** — DashboardCard, ActivityFeed, StatsGrid components 4. **State Management** — Dashboard store, API hooks, cache invalidation 5. **Tests** — Unit tests for API, component tests for UI

Phase 2: Dependency Analysis

Identify shared interfaces/types that must be defined first:

// Shared types created BEFORE parallel execution export interface DashboardStats { totalUsers: number; activeToday: number; revenue: number; } export interface ActivityEvent { id: string; type: 'login' | 'purchase' | 'signup'; timestamp: Date; userId: string; }

Phase 3: Parallel Execution

Dispatch each independent task to a subagent:

[Agent 1: API] ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘ 80%  — Routes complete, adding validation
[Agent 2: DB]  ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ 100% — Migration and queries done
[Agent 3: UI]  ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘ā–‘ā–‘ 70%  — Components rendering, adding styles
[Agent 4: State]ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘ 85%  — Store done, finishing hooks
[Agent 5: Tests]ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ 45%  — Unit tests in progress

Phase 4: Integration & Merge

  • Collect all subagent outputs
  • Resolve any file conflicts (same file modified by multiple agents)
  • Run the full test suite
  • Create a single cohesive commit or PR

Output Format

## Parallel Build Complete ### Tasks: 5/5 completed ### Files Created: 14 ### Files Modified: 3 ### Conflicts Resolved: 1 (both agents modified src/types/index.ts — merged) ### Tests: 23 passing, 0 failing ### Subagent Summary: | Agent | Task | Duration | Files | Status | |-------|------|----------|-------|---------| | 1 | API Routes | 45s | 4 | Done | | 2 | Database | 30s | 3 | Done | | 3 | UI Components | 60s | 5 | Done | | 4 | State Mgmt | 35s | 3 | Done | | 5 | Tests | 50s | 2 | Done |

Rules

  • Define shared types/interfaces BEFORE dispatching parallel tasks
  • Each subagent must work on different files when possible
  • If two tasks must modify the same file, sequence them (not parallel)
  • Always run tests after merging all subagent outputs
  • Create a feature branch before starting parallel work
  • If any subagent fails, retry that specific task — do not restart everything
  • Maximum 5 parallel subagents to avoid resource contention

Examples

# Build a feature from a description /parallel-build Add user dashboard with stats, activity feed, and preferences # Build from a GitHub issue /parallel-build --issue 42 # Limit parallelism /parallel-build --max-agents 3 Add authentication flow
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates