/initialize - Add Orchestre to Existing Projects
Purpose
The /initialize prompt adds Orchestre capabilities to existing projects without disruption. Unlike /create which starts new projects, this command retrofits Orchestre into your current codebase, preserving all existing code and configurations.
How It Actually Works
- Project Discovery: Identifies project type (Node.js, Python, Go, etc.)
- Calls MCP Tool: Invokes
mcp__orchestre__initialize_projectwithtemplate: "custom" - Creates Infrastructure: Sets up
.orchestre/directory structure - Installs Prompts: Makes all 20 essential prompts available
- Preserves Existing: Doesn't modify any existing code or configs
Key Difference from /create
/create: For NEW projects with templates or repositories/initialize: For EXISTING projects, adds Orchestre without disruption
Use Cases
- Legacy Project Enhancement: Add Orchestre to established codebases
- Team Onboarding: Set up Orchestre for team members
- Project Standardization: Apply Orchestre patterns to existing work
- Tool Migration: Move from other tools to Orchestre
- Incremental Adoption: Gradually introduce Orchestre features
Argument Structure
/initialize [project-path]Arguments
- project-path (optional)
- Path to existing project
- Defaults to current directory (".")
- Can be relative or absolute
Examples
# Initialize current directory
/initialize
# Initialize specific project
/initialize ../my-existing-app
# With path
/initialize /Users/me/projects/my-appTechnical Details
MCP Tool Integration
Calls mcp__orchestre__initialize_project with:
projectName: "." (uses existing directory)template: "custom" (for existing projects)targetPath: Specified path or current directorydescription: Brief project description
What Gets Created
existing-project/
├── .orchestre/ # NEW: Orchestration directory
│ ├── CLAUDE.md # Orchestration memory
│ ├── prompts.json # Available prompts configuration
│ ├── templates/ # Memory templates
│ ├── knowledge/ # Discovery insights
│ ├── plans/ # Development plans
│ ├── tasks/ # Task tracking
│ └── sessions/ # Session history
└── CLAUDE.md # NEW: Project context (if missing)Available Prompts After Initialization
All 20 essential prompts become available:
/orchestrate- Analyze and plan from requirements/execute-task- Implement with context awareness/compose-saas-mvp- Rapid prototyping/generate-implementation-tutorial- Comprehensive implementation guides/add-enterprise-feature- Production features/migrate-to-teams- Multi-tenancy/security-audit- Vulnerability scanning/document-feature- Contextual documentation/discover-context- Codebase analysis/review- Multi-LLM code review/create- New project creation/initialize- (Already used)
## Adaptation Strategies
### Project Discovery
The prompt analyzes:
1. **Technology Stack**
- Package.json dependencies
- Framework configurations
- Build tool setup
- Language preferences
2. **Project Structure**
- Directory organization
- File naming conventions
- Module patterns
- Architecture style
3. **Existing Patterns**
- Code style
- Component structure
- API patterns
- Testing approach
4. **Team Practices**
- Git workflow
- Documentation style
- Development scripts
- CI/CD configuration
### Intelligent Configuration
Based on discoveries:
- Selects appropriate command set
- Configures memory templates
- Adapts to existing conventions
- Preserves team workflows
### Non-Invasive Setup
The prompt ensures:
- No overwriting of existing files
- Respect for current structure
- Minimal configuration changes
- Gradual adoption path
## Memory Usage
### Created Memory Structureexisting-project/ ├── CLAUDE.md # Project context (if not exists) ├── .orchestre/ │ ├── CLAUDE.md # Orchestre-specific memory │ ├── discovery/ # Project analysis results │ │ ├── structure.md # Discovered structure │ │ ├── patterns.md # Identified patterns │ │ └── stack.md # Technology analysis │ └── templates/ # Adapted templates └── .claude/ └── commands/ # Carefully selected commands
### Discovery Documentation
```markdown
# Project Discovery: legacy-saas
## Technology Stack
- Framework: Next.js 13 (Pages Router)
- State: Redux Toolkit
- Database: PostgreSQL with Prisma
- Auth: NextAuth.js
- Styling: Styled Components
## Project Patterns
- Feature-based organization
- Container/Component pattern
- Custom hooks for data fetching
- Centralized API client
## Existing Conventions
- TypeScript with strict mode
- ESLint + Prettier configuration
- Jest + React Testing Library
- Conventional commits
## Recommended Adaptations
- Use MakerKit-compatible commands
- Preserve existing auth flow
- Adapt to Redux patterns
- Maintain testing structureWorkflow Examples
Legacy SaaS Enhancement
# 1. Initialize Orchestre
/initialize ./legacy-saas
# 2. Discover existing patterns
/discover-context ./src --depth=comprehensive
# 3. Add modern features
/add-enterprise-feature "audit-logs" "Track all user actions with Redux middleware"
# 4. Improve security
/security-auditMicroservice Setup
# 1. Minimal initialization
/initialize ./user-service --minimal
# 2. Understand service structure
/discover-context ./src/api
# 3. Add observability
/execute-task "Add OpenTelemetry tracing to existing endpoints"Mobile App Migration
# 1. Initialize React Native project
/initialize ./mobile-app "react-native"
# 2. Analyze current implementation
/discover-context ./src/screens
# 3. Modernize gradually
/execute-task "Migrate class components to hooks incrementally"Intelligent Features
Compatibility Detection
- Identifies potential conflicts
- Suggests resolution strategies
- Adapts to existing tools
- Preserves developer experience
Command Selection
Intelligently chooses commands based on:
- Project type (web, mobile, API)
- Technology stack
- Team size indicators
- Existing patterns
Configuration Preservation
- Backs up existing configs
- Merges with Orchestre needs
- Maintains tool compatibility
- Documents all changes
Migration Assistance
For projects using other tools:
- Maps existing commands
- Translates configurations
- Preserves muscle memory
- Provides transition guide
Setup Variations
1. Minimal Setup
/initialize --minimalInstalls only:
- Core orchestration commands
- Basic development commands
- Essential documentation tools
2. Standard Setup
/initializeIncludes:
- Detected relevant commands
- Template-specific tools
- Memory templates
- Integration helpers
3. Full Setup
/initialize --fullProvides:
- All available commands
- Complete template library
- Advanced workflows
- Enterprise features
4. Custom Setup
/initialize ./project "custom-api-framework"Adapts to:
- Unique frameworks
- Custom architectures
- Proprietary patterns
- Special requirements
Integration Points
With Other Prompts
- → /discover-context: Natural next step
- → /orchestrate: Plan enhancements
- → /document-feature: Document existing features
- → /execute-task: Start improvements
With Existing Tools
- Complements existing CLIs
- Works with current build tools
- Respects IDE configurations
- Enhances Git workflows
Best Practices
Start with Discovery
bash# Initialize first /initialize # Then discover deeply /discover-context ./src --depth=comprehensivePreserve Existing Work
bash# Safe initialization /initialize --preserve # Review changes before committing git diffGradual Adoption
bash# Start minimal /initialize --minimal # Add features as needed /install-commands additional-features
Common Scenarios
Monorepo Initialization
# Initialize at root
/initialize ./monorepo
# Set up individual packages
/initialize ./packages/web "nextjs"
/initialize ./packages/api "express"
/initialize ./packages/shared --minimalCI/CD Integration
# Initialize with CI awareness
/initialize
# Add CI-friendly commands
/execute-task "Create Orchestre CI workflow"Team Migration
# Initialize with team focus
/initialize --preserve
# Document for team
/document-feature "Orchestre Setup and Usage"
# Create onboarding guide
/execute-task "Create team onboarding documentation"Troubleshooting
Common Issues
Existing Commands Conflict
- Prompt detects conflicts
- Suggests alternatives
- Offers prefixed versions
- Documents resolution
Complex Project Structure
- Handles nested projects
- Respects workspaces
- Adapts to monorepos
- Supports custom layouts
Permission Issues
- Guides permission fixes
- Suggests alternative locations
- Works with restricted access
- Documents requirements
Tips
- Run from Project Root: Best discovery results
- Review Before Committing: Check all changes
- Use Template Hints: Better command selection
- Document the Setup: Help your team adapt
- Start Small: You can always add more later
