Parallel Phase Execution
Execute multiple workflow phases concurrently for faster development cycles
Bootspring supports executing multiple workflow phases in parallel, dramatically reducing overall development time for independent tasks.
Overview#
Traditional workflows execute phases sequentially:
Phase 1 → Phase 2 → Phase 3 → Phase 4
[=====] [=====] [=====] [=====]
Total: 4 units
With parallel execution:
Phase 1 → Phase 2 ──┐
[=====] [=====] │
├── Phase 4
Phase 1 → Phase 3 ──┘ [=====]
[=====] [=====]
Total: 3 units
Parallel-Enabled Workflows#
Full Stack Parallel Development#
1{
2 name: 'Full Stack Parallel Development',
3 phases: [
4 { name: 'Design & Contract', agents: ['api-expert', 'ui-ux-expert'] },
5 { name: 'Backend Development', agents: ['backend-expert'], parallel: true },
6 { name: 'Frontend Development', agents: ['frontend-expert'], parallel: true },
7 { name: 'Integration & Testing', agents: ['testing-expert'] },
8 { name: 'Review & Deploy', agents: ['devops-expert'] }
9 ]
10}Comprehensive Audit#
1{
2 name: 'Comprehensive Audit',
3 phases: [
4 { name: 'Preparation', agents: ['architecture-expert'] },
5 { name: 'Security Audit', agents: ['security-expert'], parallel: true },
6 { name: 'Performance Audit', agents: ['performance-expert'], parallel: true },
7 { name: 'Code Quality Audit', agents: ['code-review-expert'], parallel: true },
8 { name: 'Report & Plan', agents: ['architecture-expert'] }
9 ]
10}Using Parallel Execution#
Starting Parallel Phases#
When you advance into a parallel section, Bootspring automatically detects and starts all parallel phases:
1# Start workflow
2bootspring workflow start full-stack-parallel
3
4# Advance to parallel phases
5bootspring workflow next
6
7# Output:
8# Started 2 parallel phases:
9# - Backend Development (index: 1)
10# - Frontend Development (index: 2)
11# Complete each with: bootspring workflow complete-phase <index>Completing Individual Phases#
Each parallel phase must be completed individually:
1# Complete backend phase
2bootspring workflow complete-phase 1
3
4# Output:
5# Phase completed. 1 parallel phase remaining.
6
7# Complete frontend phase
8bootspring workflow complete-phase 2
9
10# Output:
11# All parallel phases complete. Continuing to Integration & Testing.Checking Parallel Status#
1bootspring workflow parallel-status
2
3# Output:
4# Parallel Execution Active: Yes
5# Workflow: full-stack-parallel
6# Phases:
7# - Backend Development: in_progress (started 2h ago)
8# - Frontend Development: completed (finished 30m ago)
9# Progress: 1/2 (50%)API Usage#
1const orchestrator = require('bootspring/intelligence/orchestrator');
2
3// Start parallel phases manually
4const result = orchestrator.startParallelPhases('full-stack-parallel', 1);
5// { success: true, parallelPhases: [...] }
6
7// Complete a phase
8const complete = orchestrator.completeParallelPhase(1);
9// { success: true, allParallelComplete: false, remaining: 1 }
10
11// Get status
12const status = orchestrator.getParallelExecutionStatus();
13// { active: true, phases: [...], progress: { completed: 1, total: 2 } }
14
15// Cancel if needed
16orchestrator.cancelParallelExecution();Best Practices#
Good Candidates for Parallel Execution#
- Frontend and backend development (after API contract)
- Multiple audit types (security, performance, code quality)
- Documentation and testing
- Multi-service deployments
Avoid Parallelizing#
- Phases with data dependencies
- Sequential approval gates
- Database migrations (unless independent)
Creating Custom Parallel Workflows#
1orchestrator.defineWorkflowWithParallel('my-parallel-workflow', {
2 name: 'My Custom Workflow',
3 description: 'Custom workflow with parallel phases',
4 phases: [
5 { name: 'Setup', agents: ['devops-expert'] },
6 { name: 'Service A', agents: ['backend-expert'], parallel: true },
7 { name: 'Service B', agents: ['backend-expert'], parallel: true },
8 { name: 'Service C', agents: ['backend-expert'], parallel: true },
9 { name: 'Integration', agents: ['testing-expert'] }
10 ],
11 completionSignals: ['All services deployed', 'Integration tests passing']
12});