Spaces: Your AI-Powered On-Call Copilot
Note: This extension is designed for enterprise environments using Azure DevOps and Kusto.
Spaces transforms how you handle on-call incidents and development tasks by leveraging GitHub Copilot and the Model Context Protocol (MCP). It creates isolated, AI-enhanced workspaces that automate context gathering, investigation, and resolution workflows.
🌟 Why Spaces?
🚀 Accelerated Velocity
Supercharge your development and on-call efficiency.
- Fast-Track IcM Resolution: AI-driven root cause analysis, automated diagnostics, and fix proposals to slash MTTF/MTTR.
- Automated Coding: From planning to PR creation in minutes.
- Focus on Solving: Skip the boilerplate, focus on the fix.
🏗️ How Spaces Achieves This
⚙️ True Parallelism
- Isolated Workspaces: Dedicated environment for each incident/task.
- Context Preservation: Switch tasks without losing state or history.
- Visual Clarity: Color-coded windows for instant recognition.
🤖 Instant AI Context & Automation
- Zero Setup: Auto-fetches incident details, logs, and documentation.
- Pre-Configured: Copilot ready with custom instructions and MCP tools.
- Auto-Diagnostics: Runs initial log analysis and repro queries instantly.
🚀 Quick Start
1. Prerequisites (Auto-Installed)
This extension relies on several external tools to function correctly. Good news: The extension will attempt to automatically install these tools for you on startup.
When you launch Spaces for the first time, it checks for the following tools. If any are missing, it will try to install them using Homebrew (macOS) or WinGet (Windows).
| Tool |
Version |
Required For |
Detection |
| Git |
Any |
Cloning repositories, managing source control. |
git --version |
| Node.js |
v18+ |
Runtime for scripts and tools. |
node --version |
| npm |
Any |
Installing dependencies. |
npm --version |
| .NET SDK |
Any |
Running backend tools. |
dotnet --version |
| Azure CLI |
Any |
Authenticating with Azure DevOps. |
az --version |
Setup Flow:
- Usage: Just open VS Code. The extension runs a check in the background.
- Auto-Install: If tools are missing, you'll see a notification offering to install them.
- Manual Step: The only manual step is logging in. Once the Azure CLI is installed, you must run
az login in your terminal to enable Azure DevOps integration.
- Peacock: Peacock extension is recommended for automatically color-coding your workspaces.
2. Configuration
It is highly recommended to review the extension settings to ensure everything is configured correctly for your environment.
- Access the Spaces Dashboard in VS Code.
- Navigate to the Settings tab (gear icon).
- Review and configure the following:
Azure DevOps Settings
These settings connect Spaces to your team's engineering system.
- Organization: Your ADO Organization (e.g.,
microsoft).
- Project: Your ADO Project (e.g.,
MyProject).
- Team: Your ADO Team name (e.g.,
MyTeam).
- Repo Project: (Optional) If your git repositories live in a different project than your work items, specify it here.
Knowledge Base Wikis
Spaces can clone wiki repositories into your workspace to provide context for AI agents.
To add a wiki:
- Go to Settings > Knowledge Base Wikis.
- Add a new entry with:
- name: Display name (e.g., "Service Docs").
- url: The HTTPS clone URL of the wiki git repository (e.g.,
https://dev.azure.com/myorg/myproject/_git/MyService.Wiki).
- folderName: Target folder name (e.g.,
knowledge-base/service-wiki).
- enabled: Check to enable cloning.
How to find the Wiki URL:
- Navigate to your Wiki in Azure DevOps.
- Click "Clone Wiki" (usually in the top right "More" menu).
- Copy the HTTPS URL.
3. Knowledge Base Configuration
Spaces supports cloning multiple wiki repositories into a centralized knowledge-base/ folder within each workspace. This provides AI agents with access to documentation, TSGs (TroubleShooting Guides), and operational knowledge.
Structure
All wikis are organized under a single knowledge-base/ folder:
knowledge-base/
├── wiki-1/ # First wiki repository
├── wiki-2/ # Second wiki repository
├── wiki-3/ # Third wiki repository
└── ... # Additional wikis as needed
Configuration in Settings
Configure wikis in the spaces.knowledgeBaseWikis array. Each entry requires:
- name: Display name of the wiki
- url: Git repository URL
- folderName: Target folder under
knowledge-base/ (e.g., knowledge-base/wiki-name)
- enabled: Whether the wiki should be cloned/updated
Example:
"spaces.knowledgeBaseWikis": [
{
"name": "Service Documentation Wiki",
"url": "https://dev.azure.com/org/project/_git/docs-wiki",
"folderName": "knowledge-base/service-docs.wiki",
"enabled": true
},
{
"name": "TSG Repository",
"url": "https://dev.azure.com/org/project/_git/tsg-wiki",
"folderName": "knowledge-base/tsgs.wiki",
"enabled": true
}
]
How Agents Use It
- IcmAgent: Searches
knowledge-base/ for relevant TSGs based on incident keywords
- CodeDetective: References architecture documentation and deployment guides
- All Agents: Recursively search through all cloned wikis to find relevant information
The centralized structure ensures agents have a consistent, predictable location to find documentation regardless of how many wikis are configured or what they're named.
💡 Sample Use Cases
1. Automated ICM Investigation
Scenario: You receive a high-severity alert.
Action:
- Open the Spaces Dashboard.
- Click Create Investigation (or use the command
Spaces: Create Investigation).
- Enter the ICM ID.
Result:
- A new, color-coded workspace opens.
- Copilot reads the incident details, checks service health, and runs initial Kusto queries.
- It analyzes logs, identifies the root cause, and suggests a fix or mitigation.
2. Feature Implementation & Bug Fixing
Scenario: You need to implement a new feature or fix a bug from an ADO task.
Action:
- Open the Spaces Dashboard.
- Click Create Task (or use the command
Spaces: Create Task).
- Enter the ADO Task ID.
Result:
- Spaces creates a dedicated workspace.
- PlannerAgent can analyze the codebase and create an implementation plan.
- CodeDetective can write the code and update files (via Copilot Chat).
3. Contextual Code Exploration
Scenario: You're debugging a complex issue and need to understand a specific flow.
Action:
- In an investigation/task workspace, ask Copilot: "Clone the payment-service repo and trace the transaction flow."
Result:
- Copilot clones the repository into the isolated workspace.
- It analyzes the code in the context of the active incident/task, linking code paths to logs.
🏗️ Solution Overview
Spaces employs a Manager-Worker Architecture to ensure scalability and isolation.
The Manager (Dashboard)
- Central Hub: Tracks all active investigations and tasks.
- Orchestrator: Manages the lifecycle of workspaces and global configurations.
- Status Tracking: Provides a real-time view of the state of every ongoing item (e.g.,
Investigating, Fix Proposed, Waiting for User).
The Workers (Isolated Workspaces)
Each investigation or task runs in a self-contained environment:
- Dedicated Folder: Contains all relevant files, logs, and cloned repositories.
- Custom Context:
START_HERE.md and .github/copilot-instructions.md guide Copilot specifically for that workspace's goal.
- State Management:
workspace_status.json tracks progress, ensuring you can pick up exactly where you left off.
📄 License
Copyright (c) Microsoft Corporation. All rights reserved.