Team Collaboration Best Practices
Maximize team productivity and code quality when using Orchestre in a collaborative environment. These practices help teams work efficiently while maintaining consistency.
Establishing Team Conventions
1. Project Structure Agreement
Before starting, agree on:
<!-- CLAUDE.md -->
# Team Conventions
## Project Structure
We follow feature-based organization:
- features/ - Business features
- shared/ - Shared components
- infrastructure/ - External integrations
## Naming Conventions
- Components: PascalCase
- Files: camelCase.ts
- CSS: kebab-case
- Database: snake_case
## Code Style
- Prettier for formatting
- ESLint for linting
- TypeScript strict mode2. Command Usage Guidelines
Document which commands to use when:
## Orchestre Command Guidelines
### Starting New Features
Always use orchestration first:
```bash
/orchestrate "Feature description and requirements"Adding Components
- Use template commands when available
- For custom work:
/execute-taskwith clear description
Code Review
Run before every PR:
/review --comprehensive
/security-auditDocumentation
Update docs after implementation:
/document-feature "feature name"
## Parallel Development
### 1. Feature Branch Workflow
```bash
# Start new feature
git checkout -b feature/user-authentication
/orchestrate "Add JWT authentication with refresh tokens"
# Work on feature
/execute-task "Implement login endpoint"
/execute-task "Add authentication middleware"
# Before merging
/review
/validate-implementation2. Coordinated Parallel Work
For large features with multiple developers:
# Lead developer sets up parallel streams
/setup-parallel "frontend" "backend" "mobile"
# Distribute work
/distribute-tasks "
frontend: Alice - Build login/signup UI
backend: Bob - Create auth API endpoints
mobile: Carol - Implement mobile auth flow
"
# Regular coordination
/coordinate-parallel "Daily sync at 10am"3. Merge Strategy
# Before merging parallel work
/merge-work --validate
# After merge
/review --integration
/performance-checkKnowledge Sharing
1. Distributed Documentation
Each team member maintains docs in their area:
src/
├── features/
│ ├── auth/
│ │ ├── CLAUDE.md # Bob maintains
│ ├── billing/
│ │ ├── CLAUDE.md # Alice maintains
│ └── analytics/
│ ├── CLAUDE.md # Carol maintains2. Pattern Library
Build a shared pattern library:
# When discovering patterns
/extract-patterns "error handling"
# Document in .orchestre/patterns/
echo "# Error Handling Pattern
## Standard Format
All errors follow...
## Usage Examples
- auth/login.ts:45
- api/users.ts:78
" > .orchestre/patterns/error-handling.md3. Learning Sessions
Regular knowledge sharing:
# Extract learnings from recent work
/learn
# Share in team meeting
/compose-prompt "Summarize key patterns and decisions from last sprint"Code Review Process
1. Pre-PR Checklist
Before creating a pull request:
# 1. Self-review with AI
/review
# 2. Security check
/security-audit
# 3. Performance check
/performance-check
# 4. Implementation validation
/validate-implementation
# 5. Update documentation
/document-feature "feature-name"2. PR Description Template
## Description
Brief description of changes
## Orchestre Analysis
- Review score: X/100
- Security issues: None found
- Performance impact: Minimal
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Documentation
- [ ] CLAUDE.md updated
- [ ] API docs updated
- [ ] README updated if needed3. Review Feedback Integration
# After receiving feedback
/execute-task "Address PR feedback: improve error handling"
# Verify fixes
/review --focus "error handling"Communication Patterns
1. Async Communication
Use CLAUDE.md files for async updates:
<!-- features/auth/CLAUDE.md -->
## Updates
### 2024-03-15 - @alice
Implemented OAuth flow. Note: Google requires special handling
for refresh tokens. See `oauth-provider.ts:45`
### 2024-03-16 - @bob
Added rate limiting to auth endpoints. Currently set to 5
attempts per 15 minutes. Can be configured in env vars.2. Decision Documentation
Record important decisions:
/update-state "Team decided to use PostgreSQL over MongoDB for ACID compliance"3. Progress Tracking
Use Orchestre's state tracking:
# Update progress
/update-state "Authentication: 80% complete, remaining: email verification"
# Check status
/statusConflict Resolution
1. Code Conflicts
When Git conflicts arise:
# After resolving conflicts
/review --focus "merged sections"
/validate-implementation2. Pattern Conflicts
When team members implement differently:
# Analyze both approaches
/review feature/approach-1
/review feature/approach-2
# Get AI recommendation
/orchestrate "Compare two implementation approaches and recommend best option"3. Architecture Decisions
For major decisions:
# Document options
/compose-prompt "Create ADR for choosing between REST and GraphQL"
# Get team input
/research "REST vs GraphQL for our use case"Onboarding New Team Members
1. Project Overview
New members should:
# 1. Read project documentation
cat CLAUDE.md
# 2. Understand architecture
/status
/interpret-state
# 3. Learn patterns
/discover-context
# 4. Review recent changes
/learn2. Ramp-up Tasks
Start with guided tasks:
# Orchestrate a simple feature
/orchestrate "Add user profile avatar upload"
# Review existing code
/review src/features/user
# Make first contribution
/execute-task "Add avatar field to user model"3. Mentorship
Pair programming with Orchestre:
# Senior dev sets up task
/orchestrate "Implement password reset flow"
# Junior dev executes with guidance
/execute-task "Create password reset request endpoint"
/review --educational # Detailed feedbackContinuous Improvement
1. Sprint Retrospectives
After each sprint:
# Analyze what worked
/learn
/extract-patterns
# Identify improvements
/suggest-improvements
# Update conventions
/update-state "Team agreed to new testing standards"2. Code Quality Metrics
Track quality over time:
# Weekly quality check
/review --comprehensive --save-report
# Compare with previous
/review --compare-to "last-week"
# Track trends
/performance-check --trend3. Knowledge Base Growth
Monitor documentation health:
# Find undocumented areas
/discover-context --missing-docs
# Update stale docs
/document-feature --update-existingTool Integration
1. CI/CD Integration
# .github/workflows/pr-check.yml
name: PR Check
on: [pull_request]
jobs:
orchestre-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Orchestre Review
run: |
npx orchestre review --comprehensive
npx orchestre security-audit
npx orchestre validate-implementation2. Git Hooks
# .husky/pre-commit
#!/bin/sh
npx orchestre review --changed-files3. IDE Integration
// .vscode/settings.json
{
"orchestreCode.enableAutoReview": true,
"orchestreCode.reviewOnSave": true,
"orchestreCode.commands": {
"beforeCommit": ["/review --changed"],
"afterPull": ["/discover-context"]
}
}Team Workflows
1. Daily Standup
# Each team member runs
/status --my-tasks
/update-state "Working on: X, Blocked by: Y"2. Code Handoffs
When passing work to another developer:
# Document current state
/document-feature "partial implementation"
/update-state "Completed: API endpoints, Remaining: UI integration"
# Create handoff guide
/compose-prompt "Create handoff documentation for authentication feature"3. Emergency Response
For production issues:
# Quick diagnosis
/orchestrate "Production API returning 500 errors"
/security-audit --emergency
/performance-check --critical-paths
# Coordinate fix
/setup-parallel "investigation" "fix" "communication"Best Practices Summary
Do's
- ✅ Document decisions in CLAUDE.md
- ✅ Run
/reviewbefore committing - ✅ Use
/orchestratefor planning - ✅ Keep patterns up to date
- ✅ Share learnings with team
Don'ts
- ❌ Skip documentation updates
- ❌ Ignore AI suggestions without consideration
- ❌ Work in isolation without coordination
- ❌ Override team conventions without discussion
- ❌ Commit without running security checks
Team Resources
Templates
Create team-specific templates:
mkdir .orchestre/team-templates
# Feature template
echo "# Feature: {NAME}
## Owner: {DEVELOPER}
## Status: {STATUS}
## Dependencies: {DEPS}
## Implementation Notes
{NOTES}
## Testing Strategy
{TESTING}
" > .orchestre/team-templates/feature.mdShared Commands
Build team-specific commands:
# .orchestre/commands/team-deploy.md
/team-deploy "Deploy with our specific checks and notifications"Next Steps
- Set up team conventions in CLAUDE.md
- Create your first parallel workflow
- Implement code review process
- Build team pattern library
- Schedule regular improvement sessions
