Orchestre v5 Common Patterns Guide
Overview
This guide covers common patterns and workflows for using Orchestre v5 effectively. These patterns have emerged from real-world usage and represent best practices for different scenarios.
Project Initialization Patterns
Pattern 1: Greenfield SaaS Project
Scenario: Starting a new SaaS project from scratch
# 1. Create project with MakerKit template
/orchestre-create makerkit-nextjs acme-saas . claude
# 2. Define and analyze requirements
/orchestre-orchestrate "B2B project management SaaS with:
- Team workspaces
- Kanban boards
- Time tracking
- Stripe subscription billing
- Enterprise SSO"
# 3. Build core features
/orchestre-execute-task "Implement kanban board with drag-and-drop"
/orchestre-execute-task "Add time tracking to tasks"
# 4. Add enterprise features
/orchestre-add-enterprise-feature sso
/orchestre-add-enterprise-feature audit-logsPattern 2: Custom Repository Setup
Scenario: Using a specific boilerplate or private template
# 1. Create from custom repo
/orchestre-create https://github.com/yourorg/custom-template my-app . claude
# 2. Discover existing patterns
/orchestre-discover-context all
# 3. Plan additions
/orchestre-orchestrate "Add multi-language support and Redis caching"Pattern 3: Existing Project Enhancement
Scenario: Adding Orchestre to an established codebase
# 1. Initialize Orchestre
/orchestre-initialize . claude
# 2. Analyze current state
/orchestre-discover-context architecture
# 3. Document key features
/orchestre-document-feature "authentication-system" technical
/orchestre-document-feature "payment-processing" technical
# 4. Plan improvements
/orchestre-orchestrate "Modernize authentication to support OAuth and MFA"Development Workflow Patterns
Pattern 4: Feature Development Cycle
Scenario: Implementing a new feature end-to-end
# 1. Plan the feature
/orchestre-orchestrate "User notification system with:
- In-app notifications
- Email notifications
- Push notifications
- Notification preferences"
# 2. Implement core functionality
/orchestre-execute-task "Create notification service with pluggable providers"
# 3. Add specific providers
/orchestre-execute-task "Implement email notifications with SendGrid"
/orchestre-execute-task "Add push notifications with FCM"
# 4. Document the feature
/orchestre-document-feature "notification-system" technical
# 5. Security review
/orchestre-security-audit codePattern 5: Rapid MVP Development
Scenario: Building an MVP quickly for validation
# 1. Quick SaaS scaffold
/orchestre-compose-saas-mvp "AI-powered resume builder with:
- User accounts
- Resume templates
- AI content generation
- PDF export
- Freemium pricing"
# 2. Deploy and test
/orchestre-execute-task "Deploy MVP to Vercel"
# 3. Add analytics
/orchestre-execute-task "Add Posthog analytics for user behavior tracking"Pattern 6: API-First Development
Scenario: Building a standalone API service
# 1. Create API project
/orchestre-create cloudflare-hono api-service . claude
# 2. Design API structure
/orchestre-orchestrate "RESTful API for inventory management with:
- Product CRUD
- Stock tracking
- Order processing
- Webhook events
- Rate limiting"
# 3. Implement endpoints
/orchestre-execute-task "Implement product management endpoints"
/orchestre-execute-task "Add webhook system for inventory events"
# 4. Add production features
/orchestre-add-enterprise-feature audit-logs
/orchestre-execute-task "Add API versioning and deprecation headers"Production Readiness Patterns
Pattern 7: Security Hardening
Scenario: Preparing application for production
# 1. Comprehensive audit
/orchestre-security-audit full
# 2. Fix critical issues
/orchestre-execute-task "Fix SQL injection vulnerabilities in user queries"
/orchestre-execute-task "Implement rate limiting on authentication endpoints"
# 3. Add security features
/orchestre-add-enterprise-feature rbac
/orchestre-execute-task "Implement CSP headers and security middleware"
# 4. Document security measures
/orchestre-document-feature "security-implementation" technicalPattern 8: Multi-Tenancy Migration
Scenario: Converting single-tenant to multi-tenant
# 1. Analyze current architecture
/orchestre-discover-context architecture
# 2. Plan migration
/orchestre-migrate-to-teams shared-db
# 3. Implement incrementally
/orchestre-execute-task "Add tenant_id to all database tables"
/orchestre-execute-task "Implement row-level security policies"
/orchestre-execute-task "Update API to filter by tenant"
# 4. Add tenant management
/orchestre-execute-task "Create tenant administration dashboard"
/orchestre-add-enterprise-feature rbacPattern 9: Enterprise Feature Rollout
Scenario: Adding enterprise features to existing SaaS
# 1. SSO Implementation
/orchestre-add-enterprise-feature sso
/orchestre-execute-task "Add SAML configuration UI"
/orchestre-execute-task "Implement OIDC provider support"
# 2. Audit and Compliance
/orchestre-add-enterprise-feature audit-logs
/orchestre-add-enterprise-feature data-export
/orchestre-execute-task "Add GDPR compliance features"
# 3. Advanced Access Control
/orchestre-add-enterprise-feature rbac
/orchestre-execute-task "Create role management interface"
/orchestre-execute-task "Implement custom permissions system"Mobile Development Patterns
Pattern 10: Mobile App with Shared Backend
Scenario: Adding mobile app to existing web SaaS
# 1. Create mobile app
/orchestre-create react-native-expo acme-mobile . claude
# 2. Sync with backend
/orchestre-execute-task "Configure Supabase client for shared backend"
/orchestre-execute-task "Implement authentication flow matching web app"
# 3. Mobile-specific features
/orchestre-execute-task "Add biometric authentication"
/orchestre-execute-task "Implement offline sync with background jobs"
/orchestre-execute-task "Add push notifications for key events"
# 4. Prepare for stores
/orchestre-execute-task "Configure EAS Build for App Store"
/orchestre-execute-task "Set up CI/CD for mobile deployments"Knowledge Management Patterns
Pattern 11: Continuous Documentation
Scenario: Maintaining up-to-date documentation
# During development
/orchestre-execute-task "Implement user dashboard"
/orchestre-document-feature "user-dashboard" technical
# After major changes
/orchestre-discover-context patterns
/orchestre-document-feature "refactored-auth-system" technical
# For onboarding
/orchestre-discover-context all
/orchestre-execute-task "Create developer onboarding guide"Pattern 12: Architecture Evolution
Scenario: Documenting architectural decisions
# 1. Before major change
/orchestre-discover-context architecture
# 2. Document decision
/orchestre-execute-task "Create ADR for moving from REST to GraphQL"
# 3. Implement change
/orchestre-orchestrate "Migrate API from REST to GraphQL"
# 4. Update documentation
/orchestre-document-feature "graphql-api" apiAdvanced Orchestration Patterns
Pattern 13: Complex Feature Orchestration
Scenario: Building complex features with multiple components
# 1. Master plan
/orchestre-generate-implementation-tutorial "E-learning platform with:
- Course creation tools
- Video streaming
- Interactive quizzes
- Progress tracking
- Certificates
- Payment processing"
# 2. Phased implementation
/orchestre-execute-task "Phase 1: Course creation and management"
/orchestre-execute-task "Phase 2: Video upload and streaming"
/orchestre-execute-task "Phase 3: Quiz system with auto-grading"Pattern 14: Parallel Development
Scenario: Multiple developers working on different features
# Developer 1: Authentication
/orchestre-execute-task "Implement OAuth providers (Google, GitHub)"
/orchestre-document-feature "oauth-integration" technical
# Developer 2: Payment system
/orchestre-execute-task "Integrate Stripe subscription billing"
/orchestre-document-feature "payment-system" technical
# Developer 3: Admin panel
/orchestre-execute-task "Create admin dashboard with user management"
/orchestre-document-feature "admin-panel" technical
# Integration phase
/orchestre-discover-context all
/orchestre-execute-task "Integrate authentication with payment system"Testing and Quality Patterns
Pattern 15: Test-Driven Feature Development
Scenario: Building features with comprehensive testing
# 1. Plan with testing in mind
/orchestre-orchestrate "Shopping cart feature with full test coverage"
# 2. Implement with tests
/orchestre-execute-task "Write cart service tests first (TDD)"
/orchestre-execute-task "Implement cart service to pass tests"
/orchestre-execute-task "Add integration tests for cart API"
# 3. Security validation
/orchestre-security-audit codeMemory Management Patterns
Pattern 16: Effective Memory Usage
Scenario: Leveraging Orchestre's memory system
# Regular memory updates
After each session:
- Review .orchestre/sessions/
- Consolidate learnings into patterns/
- Update project CLAUDE.md
# Pattern extraction
/orchestre-discover-context patterns
# Review and refine discovered patterns
# Knowledge preservation
/orchestre-document-feature "core-architecture" technical
# Creates permanent documentation from memoryAnti-Patterns to Avoid
Anti-Pattern 1: Over-Planning
❌ Don't: Spend hours creating detailed plans before starting ✅ Do: Start with high-level requirements and iterate
Anti-Pattern 2: Skipping Discovery
❌ Don't: Jump into implementation without understanding context ✅ Do: Use discover-context to understand existing patterns
Anti-Pattern 3: Ignoring Memory
❌ Don't: Treat Orchestre as stateless ✅ Do: Review and maintain memory files for better context
Anti-Pattern 4: Manual Orchestration
❌ Don't: Manually coordinate complex multi-step processes ✅ Do: Use orchestrate commands to handle complexity
Anti-Pattern 5: Delayed Documentation
❌ Don't: Leave documentation until the end ✅ Do: Document features as you build them
Tips for Success
- Start Small: Begin with simple commands and build complexity
- Use Templates: Leverage template-specific features
- Chain Commands: Combine prompts for sophisticated workflows
- Review Output: Always review generated code and documentation
- Maintain Context: Keep memory files updated and accurate
- Iterate Often: Use feedback loops to improve results
- Share Knowledge: Commit memory files to help your team
Troubleshooting Common Issues
Issue: Commands not providing enough context
Solution: Run /orchestre-discover-context all first
Issue: Repeated similar implementations
Solution: Extract patterns and document them
Issue: Lost context between sessions
Solution: Review session memory files before continuing
Issue: Inconsistent implementations
Solution: Document patterns and architectural decisions
Issue: Security vulnerabilities appearing
Solution: Run security audits regularly during development
