Tutorial 7: Parallel Development with Intelligent Coordination
Learn how Orchestre's prompts help coordinate parallel development efforts, leveraging Claude Code's native "sub-agents" capability for dramatically faster development.
Learning Objectives
By the end of this tutorial, you'll:
- ✅ Understand Claude Code's native parallel capabilities
- ✅ Use Orchestre prompts to coordinate complex work
- ✅ Design parallelizable architectures
- ✅ Handle dependencies intelligently
- ✅ Leverage memory for coordination
Prerequisites
- Completed previous tutorials
- Understanding of v5 prompts
- 60 minutes of time
Understanding Parallel Development in v5
With v5, parallel development becomes more natural:
Claude Code's Native Capability
- Simply include "use sub-agents" in your prompts
- Claude automatically spawns parallel instances
- Each sub-agent works independently
- Results merge automatically
Orchestre's Coordination Role
- Prompts help plan parallelizable work
- Memory system shares context between agents
- Discovery patterns find optimal splitting points
- Adaptive coordination based on progress
Scenario: Building a Chat Feature
We'll build a real-time chat feature with:
- Backend WebSocket server
- Web frontend interface
- Mobile app integration
- Shared data models
Part 1: Intelligent Planning for Parallelization
Initialize the Project
/create team-chat cloudflare-hono
cd team-chatLet Orchestre Discover Parallelization Opportunities
/orchestrate "Build a real-time team chat with channels, direct messages, and file sharing. Analyze how to parallelize development for maximum efficiency."Orchestre will:
- Analyze dependencies between components
- Identify independent work streams
- Create shared interfaces documentation
- Prepare memory structures for coordination
The Magic: Native Parallel Execution
/execute-task "Build the complete chat system with:
1. Backend WebSocket server with Durable Objects
2. React frontend with real-time updates
3. React Native mobile app
Use sub-agents to develop these three components in parallel.
Ensure shared types are defined first.
Coordinate through CLAUDE.md updates."Claude will automatically:
- Spawn three sub-agents
- Each works on their component
- Share progress through memory
- Merge results seamlessly
Part 2: How Orchestre Prompts Enable Parallelization
Discovery-Based Dependency Analysis
Orchestre prompts analyze your project to find:
/discover-context "Analyze architecture for parallel development opportunities"The prompt will:
📊 Parallel Development Analysis
Discovered Structure:
- Shared types in src/shared/
- Independent service boundaries
- Clear API contracts
- Minimal coupling points
Parallelization Strategy:
1. Shared contracts first (30 min)
2. Three parallel streams (independent)
3. Integration tests (convergence)
4. Performance optimization (iterative)
Memory Coordination:
- .orchestre/parallel/shared-types.md
- .orchestre/parallel/api-contracts.md
- Component-specific CLAUDE.md filesIntelligent Work Distribution
Instead of manual task lists, use intelligent discovery:
/execute-task "Implement chat feature across all platforms.
Use sub-agents for parallel development:
1. Backend: Cloudflare Workers + Durable Objects
2. Frontend: React with real-time updates
3. Mobile: React Native with offline support
Each sub-agent should:
- Discover existing patterns in codebase
- Follow established conventions
- Update their component's CLAUDE.md
- Test independently before integration"Part 3: Memory-Driven Parallel Execution
How Sub-Agents Coordinate Through Memory
When you request parallel execution, each sub-agent:
Reads Shared Context
.orchestre/ ├── parallel/ │ ├── shared-types.md # Contract definitions │ ├── api-spec.md # API agreements │ └── progress.md # Real-time updates ├── patterns/ │ └── discovered/ # Shared patterns └── CLAUDE.md # Project philosophyUpdates Component Memory
src/backend/CLAUDE.md # Backend decisions src/frontend/CLAUDE.md # UI patterns src/mobile/CLAUDE.md # Mobile specificsDiscovers and Adapts
- Each agent explores independently
- Finds existing patterns
- Adapts to project style
- Documents decisions
Example: Smart Parallel Request
/compose-prompt "Create a prompt that builds our chat feature using parallel sub-agents, ensuring they coordinate through our memory system"This generates an intelligent prompt that:
- Defines clear boundaries
- Sets up memory coordination
- Specifies integration points
- Includes validation steps
The Power of Discovery
Each sub-agent independently discovers:
// Sub-Agent 1 discovers and documents:
// "Project uses typed EventEmitter pattern for WebSocket events"
// Updates: .orchestre/patterns/websocket-events.md
// Sub-Agent 2 reads this and adapts:
// "Following discovered EventEmitter pattern for frontend"
// Reuses: Same event types and patterns
// Sub-Agent 3 benefits:
// "Mobile app uses identical event system"
// Result: Perfect compatibilityPart 4: Intelligent Coordination Patterns
Memory-Based Coordination
Orchestre prompts create natural coordination through memory:
/discover-context "Show parallel development progress and coordination points"The prompt discovers:
📊 Parallel Development Status
Progress (via CLAUDE.md analysis):
✅ Backend: WebSocket server complete
🔄 Frontend: 70% - awaiting file upload API
🔄 Mobile: 60% - implementing offline queue
Coordination Achieved:
- Shared types defined in src/shared/types.ts
- API contracts documented in api-spec.md
- WebSocket events standardized
Next Coordination Points:
- File upload interface definition
- Push notification payload format
- Error handling patternsAdaptive Problem Solving
When issues arise, prompts adapt:
/execute-task "Frontend needs file upload API but backend hasn't implemented it yet. Find a solution that doesn't block progress."Orchestre suggests:
- Mock API implementation
- Contract-first development
- Parallel interface design
- Progressive integration
Pattern Propagation
Discovered patterns spread naturally:
/extract-patterns "Identify successful patterns from parallel development"Creates .orchestre/patterns/parallel-success.md:
- Effective coordination techniques
- Reusable interface patterns
- Testing strategies
- Memory organization
Part 5: Advanced v5 Patterns
Pattern 1: Prompt-Driven Architecture
Design systems for optimal parallelization:
/compose-prompt "Design a microservices architecture that maximizes parallel development efficiency"The prompt will:
- Analyze your domain
- Suggest service boundaries
- Create interface contracts
- Design coordination patterns
- Document in
.orchestre/architecture/
Pattern 2: Intelligent Mock Generation
Let prompts create smart mocks:
/execute-task "Analyze the backend API contracts and create intelligent mocks that:
1. Support parallel frontend development
2. Simulate realistic data and timing
3. Include error scenarios
4. Update automatically as contracts change"Result: Self-updating mocks that evolve with your API
Pattern 3: Memory-Based Integration Testing
/execute-task "Create integration tests by:
1. Discovering all component interfaces (use sub-agents)
2. Generating comprehensive test scenarios
3. Building a test harness that validates parallel work
4. Document patterns for future features"Each sub-agent:
- Discovers its component's interface
- Contributes to shared test suite
- Validates against other components
- Updates test patterns
Part 6: Convergence and Integration
Natural Convergence Through Memory
With v5's approach, merging happens naturally:
/discover-context "Analyze parallel development results and prepare integration"The prompt will:
📊 Integration Analysis
Components Ready:
✅ Backend: All APIs implemented
✅ Frontend: UI complete
✅ Mobile: Core features done
Automatic Convergence:
- Shared types kept all components in sync
- Memory updates prevented divergence
- Patterns ensured consistency
Integration Steps Generated:
1. Run cross-component tests
2. Validate API contracts
3. Performance benchmarks
4. Deploy strategyIntelligent Integration Testing
/execute-task "Create comprehensive integration tests that:
1. Validate all parallel work integrates correctly
2. Use sub-agents to test different user flows simultaneously
3. Document any integration patterns discovered
4. Generate performance benchmarks"Learning from Parallel Success
/learn "Analyze this parallel development cycle and extract reusable patterns"Creates .orchestre/knowledge/parallel-insights.md:
- What worked well
- Coordination patterns
- Memory organization
- Prompt strategies
Real-World Example: How v5 Orchestrates Parallel Development
The Single Prompt That Does It All
/generate-implementation-tutorial "Real-time team chat with:
- WebSocket communication using Cloudflare Durable Objects
- React web interface with live updates
- React Native mobile app with offline support
- File sharing and reactions
- Channel-based organization
Optimize for parallel development using sub-agents."What Happens Behind the Scenes
Orchestre Analyzes and Plans
- Creates
.orchestre/parallel/chat-architecture.md - Defines shared interfaces
- Identifies parallel opportunities
- Sets up memory coordination
- Creates
Claude Spawns Sub-Agents
Main: "I'll coordinate three sub-agents for parallel development..." Sub-Agent 1: "Building Durable Object chat server..." Sub-Agent 2: "Creating React UI with real-time hooks..." Sub-Agent 3: "Implementing React Native with offline..."Memory Keeps Everything in Sync
.orchestre/parallel/shared-types.ts src/backend/CLAUDE.md src/frontend/CLAUDE.md src/mobile/CLAUDE.md
The Result: Perfectly Integrated System
Each component:
- Follows discovered patterns
- Uses shared types and contracts
- Implements consistent error handling
- Documents decisions in CLAUDE.md
- Tests work independently
- Integrates seamlessly
Time Comparison
Traditional Sequential: 12-16 hours Manual Parallel (v4): 6-8 hours
Intelligent Parallel (v5): 2-3 hours
The efficiency comes from:
- No coordination overhead
- Automatic pattern propagation
- Intelligent dependency handling
- Memory-based synchronization
Common Patterns and Solutions
1. Dependency Deadlocks
Problem: Components waiting for each other v5 Solution: Prompts detect and resolve automatically
/execute-task "Frontend and backend have circular dependency on auth flow. Resolve using contract-first approach with sub-agents."Orchestre will:
- Detect the circular dependency
- Create interface contract first
- Have both teams implement against contract
- Validate integration automatically
2. Pattern Drift
Problem: Different components evolving different patterns v5 Solution: Memory-based pattern propagation
/extract-patterns "Analyze all parallel components and standardize patterns"Creates .orchestre/patterns/standardized.md
3. Integration Surprises
Problem: Components don't work together as expected v5 Solution: Continuous integration through memory
/discover-context "Monitor parallel development for integration issues"Prompts will:
- Detect integration risks early
- Suggest preventive measures
- Create integration tests proactively
- Update coordination patterns
Best Practices for v5 Parallel Development
1. Leverage Native Sub-Agents
# Always include this magic phrase:
"Use sub-agents to develop these components in parallel"2. Design for Discovery
- Structure code for easy pattern discovery
- Use consistent naming conventions
- Document decisions in CLAUDE.md files
- Create clear module boundaries
3. Memory-First Coordination
.orchestre/parallel/ # Coordination hub
├── contracts/ # Shared agreements
├── patterns/ # Discovered patterns
├── progress/ # Real-time updates
└── decisions/ # Architectural choices4. Trust the Intelligence
- Let prompts discover optimal parallelization
- Don't over-specify task distribution
- Allow adaptive problem solving
- Embrace emergent patterns
5. Continuous Learning
/learn "Extract insights from this parallel development cycle"Advanced v5 Techniques
Technique 1: Recursive Parallelization
/execute-task "Build a plugin system where each plugin is developed by sub-agents in parallel. Each plugin sub-agent should spawn its own sub-agents for frontend and backend components."Creates nested parallel development!
Technique 2: Intelligent Architecture Evolution
/compose-prompt "Create a prompt that:
1. Analyzes our monolith
2. Suggests microservice boundaries
3. Plans parallel extraction
4. Uses sub-agents to extract each service
5. Maintains system integrity throughout"Technique 3: Pattern-Driven Development
/discover-context "Find all parallel development patterns in our codebase and create a prompt template for future parallel features"Builds institutional knowledge!
Practice Exercise: v5 Parallel Development
Build a complete video calling feature using v5 patterns:
The Intelligent Approach
/generate-implementation-tutorial "Add video calling to our chat app:
- WebRTC peer-to-peer video
- Screen sharing capabilities
- Virtual backgrounds
- Recording with cloud storage
- Mobile optimization
Use sub-agents for parallel development of:
1. Signaling server (Cloudflare Durable Objects)
2. Web video UI (React)
3. Mobile video (React Native)
4. Recording service (Cloudflare R2)
Ensure all components discover and follow existing patterns."What to Observe
Automatic Coordination
- Watch how sub-agents share discoveries
- Notice pattern propagation
- See interface evolution
Memory Updates
- Check
.orchestre/parallel/ - Review component CLAUDE.md files
- Observe decision documentation
- Check
Integration Magic
- Components just work together
- Consistent patterns throughout
- No manual coordination needed
Challenge Extension
/execute-task "Now add AI-powered features:
1. Background blur using TensorFlow.js
2. Real-time transcription
3. Automatic meeting summaries
4. Gesture recognition
Use sub-agents and ensure they discover our video architecture."What You've Learned
✅ Claude Code's native "sub-agents" capability ✅ How Orchestre prompts enable intelligent parallelization ✅ Memory-based coordination patterns ✅ Discovery-driven development ✅ Natural convergence through shared context
Key Insights for v5
Prompts Orchestrate, Claude Executes
- Orchestre provides intelligent planning
- Claude handles the parallel execution
- Memory keeps everything synchronized
Discovery Over Prescription
- Let agents find optimal patterns
- Trust emergent coordination
- Document learnings automatically
Intelligence Over Process
- No rigid workflows needed
- Adaptive problem solving
- Continuous improvement
Next Steps
You've seen the power of v5's intelligent parallelization!
Continue to: Generate Implementation Tutorial →
Try these challenges:
- Build a real-time collaborative editor with 5+ sub-agents
- Create a marketplace with parallel vendor/customer development
- Implement a game with parallel client/server/AI development
Remember: In v5, parallelization is about intelligence, not process. Let the prompts discover optimal coordination patterns while Claude's sub-agents do the work!
The v5 Difference
v4: You coordinate manually
v5: Prompts coordinate intelligently
v4: Fixed parallel workflows
v5: Adaptive parallel discovery
v4: Process-driven
v5: Intelligence-drivenWelcome to the future of parallel development!
