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.
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
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.