Multi-repository workspace setup for coordinated development across multiple codebases.
A workspace containing multiple repositories with shared specifications and development standards.
Key features:
- Each repo maintains own code and git history
- Specs shared across all repos
- Single source of truth for cross-repo features
- Coordinated changes span multiple repos
Good for:
- Multiple teams collaborating on specs
- Features spanning frontend, backend, microservices
- Separate specs repository from implementation
- Cross-repo refactorings
- Shared standards across projects
Not needed for:
- Single repository projects (use embedded specs)
- Solo developers
- Simple projects
your-specs-repo/ # Specs repository (tracked)
├── .mcp.json # MCP server config
├── .gitignore # Contains "workspace/"
├── devorch.config.yml
├── specs/ # Shared specifications
│ └── 2025-10-30-payment-flow/
└── workspace/ # Git-ignored
├── frontend-app/ # Implementation repos (untracked)
├── backend-api/
├── payment-service/
└── mobile-app/
Benefits over git submodules:
- No submodule complexity
- Independent git operations
- Simpler workflow
- Easy to manage
git clone https://github.com/company/specs-repo.git
cd specs-repomkdir workspace
echo "workspace/" >> .gitignore
git add .gitignore
git commit -m "Add workspace/ to gitignore"cd workspace
git clone https://github.com/company/frontend-app.git
git clone https://github.com/company/backend-api.git
git clone https://github.com/company/payment-service.git
git clone https://github.com/company/mobile-app.git
cd ..Create .mcp.json in specs repo root:
{
"mcpServers": {
"mobile-mcp": {
"command": "npx",
"args": ["-y", "@mobilenext/mobile-mcp@latest"]
},
"chrome-devtools": {
"command": "npx",
"args": ["chrome-devtools-mcp@latest"]
},
"figma-dev-mode": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-figma"]
}
}
}See Workflows for MCP server details.
devorch installUse @ to reference files across repos:
@workspace/frontend-app/src/components/Button.tsx update styling
@workspace/backend-api/src/routes/auth.ts add new endpoint
@workspace/payment-service/src/processors/stripe.ts review integration
Benefits:
- AI focuses on exact files
- No grep cycles
- Clear context
- Faster responses
Example: Payment flow feature
- Research:
/new-spec
> Feature: Payment flow
> Repos: frontend-app, backend-api, payment-service
- Create spec:
/create-spec
Spec spans all three repos:
## Frontend
- Payment form component
- Success/error screens
- State management
## Backend
- Payment API endpoints
- Webhook handlers
- Database migrations
## Payment Service
- Stripe integration
- Transaction logging
- Retry logic- Implement:
/implement-spec
AI coordinates across all repos:
- Frontend: Implements UI
- Backend: Adds endpoints
- Payment service: Integrates Stripe
- Verifiers: Test entire flow
Pull latest changes from all repos:
cd workspace
for dir in */; do
echo "Updating $dir"
cd "$dir" && git pull origin main && cd ..
done
cd ..Or create a script sync-workspace.sh:
#!/bin/bash
cd workspace
for dir in */; do
echo "📦 Updating $dir..."
(cd "$dir" && git fetch && git pull)
done
echo "✅ All repos synced"Usage:
chmod +x sync-workspace.sh
./sync-workspace.shCreate matching branches across repos:
#!/bin/bash
BRANCH="feature/payment-flow"
cd workspace
for dir in frontend-app backend-api payment-service; do
echo "Creating branch in $dir"
(cd "$dir" && git checkout -b $BRANCH)
doneScenario: New payment feature spanning 3 repos
- PM creates spec
# In specs repo
/new-spec
/create-spec- Team reviews spec
# Review specs/2025-10-30-payment-flow/spec.md
# Comment, iterate, finalize- Developer implements
# Create branches
./create-branches.sh feature/payment-flow
# Run implementation
/implement-spec
# Work happens across:
# - workspace/frontend-app
# - workspace/backend-api
# - workspace/payment-service- Verification
# Verifier tests full flow
# Uses MCP servers to test E2E
# Creates verification report- Team creates PRs
# In each repo
cd workspace/frontend-app
git push -u origin feature/payment-flow
gh pr create --title "Payment flow: Frontend"
cd ../backend-api
git push -u origin feature/payment-flow
gh pr create --title "Payment flow: Backend"
# etc.Group specs by feature:
specs/
├── 2025-10-30-payment-flow/
│ ├── spec.md
│ ├── tasks.md
│ ├── implementation/
│ └── verification/
├── 2025-11-01-user-profile/
└── 2025-11-05-analytics-dashboard/
Link between repos in specs:
## Dependencies
- Frontend: `workspace/frontend-app/src/api/payments.ts`
- Backend: `workspace/backend-api/src/routes/payments.ts`
- Service: `workspace/payment-service/src/stripe.ts`Keep workspace clean:
# Remove merged branches
cd workspace
for dir in */; do
(cd "$dir" && git branch --merged | grep -v "\*" | xargs -n 1 git branch -d)
doneSpecs repo as source of truth:
- Commit all specs
- Track implementation progress
- Document decisions
- Link to PRs
Implementation repos:
- Reference spec in PR descriptions
- Link back to spec repo
- Keep branches synced
cd workspace/frontend-app
git status
git pull origin mainUpdate references in spec.md:
- ❌ `src/components/Button.tsx`
- ✅ `workspace/frontend-app/src/components/Button.tsx`Verify .mcp.json in specs repo root:
cat .mcp.json
# Restart Claude Code to reload config| Feature | Embedded Specs | Polyrepo |
|---|---|---|
| Setup | Simple | Moderate |
| Use case | Single repo | Multiple repos |
| Specs location | Inside repo | Separate repo |
| Cross-repo features | Not supported | Primary use case |
| Team coordination | Per-repo | Centralized |
| Complexity | Low | Medium |
Choose embedded for single repo projects. Choose polyrepo for multi-repo coordination.
- Workflows - Using commands across repos
- Configuration - Configure your setup
- Concepts - Understanding the architecture