Skip to content

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:

markdown
<!-- 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 mode

2. Command Usage Guidelines

Document which commands to use when:

markdown
## 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-task with clear description

Code Review

Run before every PR:

bash
/review --comprehensive
/security-audit

Documentation

Update docs after implementation:

bash
/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-implementation

2. Coordinated Parallel Work

For large features with multiple developers:

bash
# 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

bash
# Before merging parallel work
/merge-work --validate

# After merge
/review --integration
/performance-check

Knowledge 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 maintains

2. Pattern Library

Build a shared pattern library:

bash
# 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.md

3. Learning Sessions

Regular knowledge sharing:

bash
# 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:

bash
# 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

markdown
## 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 needed

3. Review Feedback Integration

bash
# 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:

markdown
<!-- 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:

bash
/update-state "Team decided to use PostgreSQL over MongoDB for ACID compliance"

3. Progress Tracking

Use Orchestre's state tracking:

bash
# Update progress
/update-state "Authentication: 80% complete, remaining: email verification"

# Check status
/status

Conflict Resolution

1. Code Conflicts

When Git conflicts arise:

bash
# After resolving conflicts
/review --focus "merged sections"
/validate-implementation

2. Pattern Conflicts

When team members implement differently:

bash
# 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:

bash
# 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:

bash
# 1. Read project documentation
cat CLAUDE.md

# 2. Understand architecture
/status
/interpret-state

# 3. Learn patterns
/discover-context

# 4. Review recent changes
/learn

2. Ramp-up Tasks

Start with guided tasks:

bash
# 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:

bash
# 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 feedback

Continuous Improvement

1. Sprint Retrospectives

After each sprint:

bash
# 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:

bash
# Weekly quality check
/review --comprehensive --save-report

# Compare with previous
/review --compare-to "last-week"

# Track trends
/performance-check --trend

3. Knowledge Base Growth

Monitor documentation health:

bash
# Find undocumented areas
/discover-context --missing-docs

# Update stale docs
/document-feature --update-existing

Tool Integration

1. CI/CD Integration

yaml
# .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-implementation

2. Git Hooks

bash
# .husky/pre-commit
#!/bin/sh
npx orchestre review --changed-files

3. IDE Integration

json
// .vscode/settings.json
{
  "orchestreCode.enableAutoReview": true,
  "orchestreCode.reviewOnSave": true,
  "orchestreCode.commands": {
    "beforeCommit": ["/review --changed"],
    "afterPull": ["/discover-context"]
  }
}

Team Workflows

1. Daily Standup

bash
# Each team member runs
/status --my-tasks
/update-state "Working on: X, Blocked by: Y"

2. Code Handoffs

When passing work to another developer:

bash
# 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:

bash
# 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 /review before committing
  • ✅ Use /orchestrate for 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:

bash
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.md

Shared Commands

Build team-specific commands:

bash
# .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

Built with ❤️ for the AI Coding community, by Praney Behl