Multiroot Workspace Support
Sypha's Multiroot feature integrates seamlessly with VSCode's multi-root workspaces, enabling you to handle multiple project folders within a single workspace.
Important: Multi-root workspaces are currently an experimental feature and have the following limitations:
- Sypha rules only work in the first workspace folder
- Checkpoints are automatically disabled with a warning message
- Both features are restored when you return to a single-folder workspace
What is multiroot workspace support?
Rather than being restricted to a single project folder, Sypha can access files, generate code, and execute commands across all folders within your VSCode workspace. This proves beneficial when managing monorepos, microservices, or when handling related projects concurrently.
How it works
Upon opening multiple workspace folders in VSCode, Sypha automatically:
- Assigns one folder as the primary workspace (usually the first folder added)
- Monitors all workspace folders and their paths
- Intelligently resolves file paths across workspaces
- Shows workspace information in the environment details for each API request
Getting Started
Setting Up Multi-Root Workspaces
-
Add folders to your workspace:
- Access
File > Add Folder to Workspacein VSCode - Alternatively, create a
.code-workspacefile containing multiple folder paths - Drag and drop folders into the File Explorer
- Choose multiple folders when launching a new workspace
- Access
-
Start using Sypha - Sypha will automatically identify all your workspace folders and engage with them as required.
For comprehensive instructions on configuring multi-root workspaces in VS Code, consult Microsoft's official guide.
Technical behavior
Workspace detection
- Sypha identifies all workspace folders at task initialization
- The first workspace folder defaults to being the primary workspace
- Each workspace may utilize its own VCS (Git, SVN, etc.)
Path resolution
- Relative paths resolve relative to the primary workspace
- Workspace hints can target specific workspaces:
@workspaceName:path/to/file - Sypha intelligently attempts to determine which workspace a file belongs to
Command execution
- Commands run in the appropriate workspace context
- The working directory gets set according to where files are being accessed
Working across workspaces
Referencing specific workspaces
You can reference different workspaces organically in your prompts:
"Read the package.json in my frontend folder and compare it with the backend dependencies""Create a shared utility function and update both the client and server to use it""Search for TODO comments across all my workspace folders"Workspace hints
Employ workspace hints to explicitly reference files in particular workspaces:
@frontend:src/App.tsx
@backend:server.tsThis syntax assists Sypha in resolving ambiguity when multiple workspaces contain files with similar names.
Common use cases
Monorepo Development
Ideal for scenarios where you have related projects within one repository:
my-app.code-workspace
├── web/ (React frontend)
├── api/ (Node.js backend)
├── mobile/ (React Native)
└── shared/ (Common utilities)Ask Sypha: "Update the API endpoint in both web and mobile apps to match the new backend route"
Microservices Architecture
Handle multiple services from a unified workspace:
services.code-workspace
├── user-service/
├── payment-service/
├── notifications/
└── infrastructure/Full-Stack Development
Consolidate everything while preserving separation:
fullstack.code-workspace
├── client/ (Frontend)
├── server/ (Backend API)
├── docs/ (Documentation)
└── deploy/ (Scripts & config)Auto-Approve Integration
Multiroot workspaces integrate with Auto Approve:
- Grant permissions for operations within workspace folders
- Limit auto-approve for files beyond your workspace(s)
- Set different levels for different workspace folders
Cross-Workspace Operations
Sypha can execute tasks spanning multiple workspaces:
- Refactoring: Modify imports and references across projects
- Feature development: Implement features necessitating changes in multiple services
- Documentation: Create docs referencing code from multiple folders
- Testing: Execute tests across all workspaces and evaluate results
When managing large multiroot workspaces, begin in Plan mode to allow Sypha to comprehend your project structure before implementing changes.
Best Practices
Organizing Your Workspaces
- Group related projects that frequently require coordinated changes
- Use consistent folder structures across workspaces where feasible
- Name folders clearly to enable Sypha to comprehend your project structure
Effective Prompting & Tips
When operating with multiroot workspaces, these strategies work optimally:
- Be specific about which workspace when relevant: "Update the user model in the backend workspace"
- Reference relationships: "The frontend uses the API types from the shared workspace"
- Describe cross-workspace operations: "This change needs to be reflected in both the web and mobile apps"
- Scope your searches when managing large codebases: "Search for 'TODO' in just the frontend workspace"
- Break down large tasks into workspace-specific operations where feasible
- Consider excluding large folders like
node_modulesfrom your workspace search Scope