Parallelize work-in-progress by splitting tasks and executing them concurrently via subagents
Split work-in-progress into 2-5 independent tracks and execute them concurrently using multiple subagents. Use when you have parallelizable tasks like implementing separate features, refactoring unrelated modules, or running simultaneous research that don't share files or dependencies.
/plugin marketplace add blogic-cz/blogic-marketplace/plugin install agent-kit@blogic-marketplace[object Object]Split current work-in-progress into independent subtasks and execute them concurrently using multiple subagents.
Use this command to:
✅ Good candidates for parallelization:
❌ NOT suitable for parallelization:
First, understand what work is in progress by analyzing conversation context:
Priority 1: Conversation Context
$ARGUMENTS), use that as primary contextPriority 2: Git Context (Optional)
Only check git if conversation context is unclear:
# Check current branch and changes
git status
git diff --stat
# See recent work
git log -3 --oneline
Analysis approach:
$ARGUMENTS provided: Use that as the task to parallelizeImportant: Work-in-progress is usually in the conversation, not yet in git. Focus on what the user is actively working on NOW, not what's already committed.
Analyze the work and propose splitting it into 2-5 independent parallel tracks.
Current work: Building user authentication system
Parallel tracks:
1. Login UI Components (src/components/auth/)
- LoginForm, PasswordInput, AuthButton components
- No backend dependencies needed yet
2. Authentication API (src/api/auth.ts)
- Login/logout endpoints
- JWT token generation
- Independent of UI implementation
3. User Session Management (src/lib/session.ts)
- Session store implementation
- Token refresh logic
- Independent utility module
4. Auth Tests (tests/auth/)
- Unit tests for API
- Component tests for UI
- Can be written in parallel with implementation
Before proposing, verify:
Show the proposed plan in this format:
## 🔀 Proposed Parallel Execution Plan
I can split this work into **N independent tracks** that can run simultaneously:
### Track 1: [Name]
**Goal:** [Clear objective]
**Files:** [Affected files/directories]
**Deliverable:** [Specific outcome]
**Constraints:** [What this track should NOT touch]
### Track 2: [Name]
**Goal:** [Clear objective]
**Files:** [Affected files/directories]
**Deliverable:** [Specific outcome]
**Constraints:** [What this track should NOT touch]
[... more tracks ...]
---
**Estimated time:**
- Sequential execution: ~X minutes
- Parallel execution: ~Y minutes (Z% faster)
**Potential risks:**
[If any conflicts or dependencies detected, mention them here]
---
**Proceed with parallel execution? (y/n)**
Wait for user confirmation before proceeding.
Once user confirms, launch all tasks in a single message using multiple Task tool calls.
For each parallel track, create a Task tool call with this prompt structure:
Essential components:
Example prompts for parallel tracks:
Track 1 Prompt Template:
Implement Login UI Components
Objective:
Create React components for user login interface with form validation.
Scope:
- Create LoginForm component in src/components/auth/LoginForm.tsx
- Create PasswordInput component in src/components/auth/PasswordInput.tsx
- Create AuthButton component in src/components/auth/AuthButton.tsx
- Add basic form validation
- Include TypeScript types
Important Constraints:
- DO NOT modify API files (another agent is working on those)
- DO NOT modify session management (another agent handling that)
- Focus only on UI components
- Use placeholder API calls for now
Context:
Building authentication system. UI components need to be created independently
of backend implementation to allow parallel development.
Deliverable:
Working UI components with proper types and basic validation.
Return Summary:
When complete, provide:
1. Files created/modified
2. Key functionality implemented
3. Any blockers or issues encountered
4. Integration points needed for backend
Track 2 Prompt Template:
Implement Authentication API
Objective:
Create backend API endpoints for user authentication with JWT tokens.
Scope:
- Create login endpoint in src/api/auth.ts
- Create logout endpoint
- Implement JWT token generation
- Add request validation
- Include error handling
Important Constraints:
- DO NOT modify UI components (another agent working on those)
- DO NOT modify session store (another agent handling that)
- Focus only on API implementation
- Create mock middleware for now if needed
Context:
Building authentication system. API needs to be created independently
of UI to allow parallel development.
Deliverable:
Working API endpoints with proper validation and error handling.
Return Summary:
When complete, provide:
1. Endpoints implemented
2. Key functionality added
3. Any blockers or issues encountered
4. Integration points needed for UI
When launching parallel agents, use this pattern:
Example message structure:
I'm launching N parallel agents now to work on these tracks simultaneously:
[Call Task tool #1]
[Call Task tool #2]
[Call Task tool #3]
[etc.]
Important: Do NOT call Task tools sequentially across multiple messages. This defeats the purpose of parallelization.
After all agents complete:
## ✅ Parallel Execution Complete
**Tracks completed:** N/N
### Track 1: [Name]
**Status:** ✅ Complete
**Files modified:** [list]
**Key deliverables:** [summary]
### Track 2: [Name]
**Status:** ✅ Complete
**Files modified:** [list]
**Key deliverables:** [summary]
[... more tracks ...]
---
### Integration Points
[List any points where tracks need to be connected]
### Next Steps
[Recommended actions to complete the work]
### Issues Encountered
[Any blockers or problems from any track]
Pattern 1: Frontend + Backend
Pattern 2: Multiple Modules
Pattern 3: Refactoring
Pattern 4: Research
Before launching:
git diff --name-only to see modified filesDuring execution:
❌ Magic conflict resolution: If agents modify same files, you'll get conflicts ❌ Dependency handling: If Task B needs Task A's output, they must run sequentially ❌ State coordination: Agents can't share state or communicate during execution ❌ Automatic integration: You may need to manually integrate results ❌ Guaranteed speed-up: Parallel execution adds coordination overhead
Use sequential execution when:
User request:
/parallelize Build a todo app with list view and add task form
Decomposition:
Track 1: TodoList Component
- Display todos
- Mark as complete
- Delete todos
Track 2: AddTodo Form
- Input field
- Submit button
- Validation
Track 3: Todo API
- CRUD endpoints
- Data persistence
User request:
/parallelize Refactor authentication, payments, and notifications modules
Decomposition:
Track 1: Auth Refactoring
- Update auth.ts
- Modernize JWT handling
- Add tests
Track 2: Payments Refactoring
- Update payments.ts
- Modernize Stripe integration
- Add tests
Track 3: Notifications Refactoring
- Update notifications.ts
- Modernize email service
- Add tests
User request:
/parallelize Research best practices for React state management, testing, and deployment
Decomposition:
Track 1: State Management Research
- Compare Redux, Zustand, Jotai
- Find best practices
- Suggest recommendation
Track 2: Testing Research
- Compare Jest, Vitest, Playwright
- Find best patterns
- Suggest recommendation
Track 3: Deployment Research
- Compare Vercel, Netlify, AWS
- Find best practices
- Suggest recommendation
Solution:
Solution:
Solution:
Possible causes:
/code-review - Review parallel changes before merging/check-after-stop - Run quality gates after parallel execution/requirements-start - Gather requirements before parallelizing work