Module (04): (GHDR) Introduction to Copilot Spaces #11
MohamedRadwan-DevOps
announced in
Documentation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Module (04): (GHDR) Introduction to Copilot Spaces
Document Type: GIHR (GitHub Documentation Reference)
Scope: This document provides the official extracted content from GitHub Docs corresponding to Module (03): Introduction to Copilot Spaces. It preserves the original wording exactly as published, extending and complementing the Microsoft Learn module with additional verified information.
About GitHub Copilot Spaces
Understand how organizing and sharing context with Copilot Spaces can improve your Copilot Chat in GitHub results and help your teammates.
Who can use this feature?
Anyone with a Copilot license can use Spaces.
Copilot Spaces let you organize the context that Copilot uses to answer your questions. Spaces can include repositories, code, pull requests, issues, free-text content like transcripts or notes, images, and file uploads. You can ask Copilot questions grounded in that context, or share the space with your team to support collaboration and knowledge sharing.
Why use Copilot Spaces?
Whether you’re working solo or collaborating across a team, Spaces help you make Copilot more useful.
With Copilot Spaces you can:
Your spaces stay in sync as your project evolves. GitHub files and other GitHub-based sources added to a space are automatically updated as they change, making Copilot an evergreen expert in your project.
How are Spaces different from knowledge bases?
Spaces are optimized for specific tasks and grounded conversations. Because context in Spaces is scoped, Copilot's responses are more accurate and relevant.
Who can use Spaces?
Anyone with a Copilot license, including Copilot Free, can create and use Spaces.
Spaces can belong to a personal account or to an organization. Spaces owned by an organization can be shared with other organization members or kept private to the person who created the space.
Where can I use Spaces?
You can use Copilot Spaces in Copilot Chat in GitHub. You can also leverage Copilot Spaces in your IDE, using the GitHub MCP server in your IDE to access context from your spaces.
How does using Spaces affect my usage?
Questions you submit in a space count as Copilot Chat requests.
Source: About GitHub Copilot Spaces
Creating GitHub Copilot Spaces
Create spaces to organize and centralize relevant content that grounds Copilot’s responses in the right context for a specific task.
Who can use this feature?
Anyone with a Copilot license can use Spaces.
For an overview of Copilot Spaces, see About GitHub Copilot Spaces.
Creating a space
To create a space, go to https://github.com/copilot/spaces, and click Create space.
Give your space a name.
Choose whether the space is owned by you or by an organization you belong to. Organization-owned Spaces can be shared using GitHub’s built-in permission model.
Click Create Space.
Optionally, once you are in the space, under the space name, add a description. This does not affect the responses Copilot gives in the space, but it can help others understand the context of the space.
Note
You can change the name and description of your space at any time by hovering over them and clicking .
Adding context to a space
You can add two types of context to your space:
Instructions: Free text that describes what Copilot should focus on within this space. Include its areas of expertise, what kinds of tasks it should help with, and what it should avoid. This helps Copilot give more relevant responses based on your intent.
For example:
You are a SQL generator. Your job is to take the sample queries and data schemas defined in the attached files and generate SQL queries based on the user's goals.
Sources: This context will be used to provide more relevant answers to your questions. Additionally, Spaces will always refer to the latest version of the code on the main branch of the repository.
To add sources, click Add sources, then choose one of the following options:
Source: Creating GitHub Copilot Spaces
Using GitHub Copilot Spaces
Use spaces to ground Copilot’s responses in the right context for a specific task.
Who can use this feature?
Anyone with a Copilot license can use Spaces.
For information on creating Copilot Spaces, see Creating GitHub Copilot Spaces.
Using Copilot Spaces in GitHub
Once you've added context to your space, you can ask Copilot questions in the space's chat interface in GitHub. Your chat will be grounded in the context you've added. You can view all conversations you have had in the space's "Conversations" tab.
You can also change the large language model (LLM) used for your space by selecting the CURRENT-MODEL dropdown menu, then clicking the AI model of your choice. For more information, see AI model comparison.
To star your favorite spaces so that you can easily find them later, you can click in the top right corner of the space. To view all spaces available to you, including starred spaces, go to https://github.com/copilot/spaces.
Using Copilot Spaces in your IDE
You can also access the information and context from Spaces directly in your IDE using the GitHub MCP server. This allows you to leverage your curated context while coding without switching between your IDE and the web interface.
This functionality is available in any IDE that supports the GitHub Copilot extension and the GitHub MCP server.
Note
When using Spaces in your IDE, repository context is not supported. You will have access to all other sources and instructions from the space.
Once you've accessed space context from your IDE:
Prerequisites
To use Spaces in your IDE, you need to install the GitHub MCP server. For setup instructions, see Using the GitHub MCP Server.
Accessing space context from your IDE
For more detailed information on using the GitHub MCP server in a specific IDE, see Using the GitHub MCP Server.
Note that Spaces can only be used in agent mode in your IDE, since spaces are accessed via the GitHub MCP server.
In your IDE, open Copilot Chat and select Agent from the mode dropdown or select the Agent tab.
To confirm that the Spaces tools are enabled, in the Copilot Chat box, click the tools icon. In the dropdown, expand the list of available tools for MCP Server: github, and confirm that the get_copilot_space and list_copilot_spaces tools are enabled.
In the Copilot Chat box, enter a prompt that references the space that you want to use as context. If you know the exact name of the space and the name of the user or organization that owns the space, you can provide that. Otherwise, Copilot will automatically use the list_copilot_spaces tool to find spaces that match the name or text you provide and access the context from those spaces.
For example, you could use either of these two prompts:
Using the Copilot space 'Checkout Flow Redesign' owned by myorganization, summarize the implementation plan.
Summarize the implementation plan from the Copilot space for the checkout flow redesign.
Follow-up prompts in the same chat conversation will have access to the same spaces, without you having to reference it explicitly.
Source: Using GitHub Copilot Spaces
Collaborating with your team using GitHub Copilot Spaces
Learn how to share Copilot Spaces with your team to support collaboration and knowledge sharing.
Who can use this feature?
Anyone with a Copilot license can use Spaces.
Copilot Spaces let you organize the context that Copilot uses to answer your questions. Sharing Copilot Spaces helps your team:
Use cases for team collaboration
For example, a subject matter expert creates a space called “Accessibility Reviews” that includes your team’s internal accessibility checklist, product guidelines, and WCAG documentation. Developers can ask Copilot questions directly in the space to ensure they're following the latest guidelines in their work.
Sharing Spaces
When you create a space, you can choose whether it’s owned by you or by one of your organizations. If you choose an organization:
If you choose to create a personal space, you can't share it with others.
To share a space with others:
In the top right corner of the space, click .
To add specific users or teams, search for them with the search bar, then choose a role for the people you added.
Optionally, next to your organization's name, choose a base role for all other organization members.
Role summary
Optionally, click Copy link to copy the link to the space and share it with others.
Accessing shared Spaces
If you’re part of an organization that has shared spaces, you can access them in the Organizations tab on https://github.com/copilot/spaces.
You can also use organization spaces directly in your IDE by specifying the organization as the owner when accessing the space. For more information, see Using GitHub Copilot Spaces.
Source: Collaborating with your team using GitHub Copilot Spaces
Responsible use of GitHub Copilot Spaces
Learn how to use GitHub Copilot Spaces responsibly by understanding its purposes, capabilities, and limitations.
About GitHub Copilot Spaces
Copilot Spaces let you organize the context that Copilot Chat uses to answer your questions. Spaces can include repositories, code, pull requests, issues, free-text content like transcripts or notes, images, and file uploads. You can ask Copilot questions grounded in that context, or share the space with your team to support collaboration and knowledge sharing. Spaces can also be accessed directly from the IDE via the remote GitHub MCP server.
Input processing
When you submit a question in a space, Copilot Chat augments your request with relevant context from that space. Included context can be:
The input prompt from the user is pre-processed by the Copilot Chat system, combined with additional contextual information (for example, the current date and time), and sent to a large language model. User input can take the form of code snippets or plain language.
The large language model will take the prompt, gather additional context (for example repository data stored on GitHub or search results from Bing), and provide a response based on the prompt. English is the preferred language for submitted prompts.
Language model analysis
The pre-processed prompt is then passed through the Copilot Chat language model, which is a neural network that has been trained on a large body of text data. The language model analyzes the input prompt.
Response generation
The language model generates a response based on its analysis of the input prompt and the context provided to it. The language model can gather additional context (for example repository data stored on GitHub or search results from Bing), and provide a response based on the prompt.
Output formatting
The response generated by Copilot Chat is formatted and presented to the user. Copilot may use syntax highlighting, indentation, and other formatting features to add clarity to the generated response. Depending upon the type of question from the user, links to context that the model used when generating a response, such as source code files, issues, Bing search results, or documentation, may also be provided.
Copilot Chat is intended to provide you with the most relevant answer to your question. However, it may not always provide the answer you are looking for. Users of Copilot Chat are responsible for reviewing and validating responses generated by the system to ensure they are accurate and appropriate. Additionally, as part of our product development process, we undertake red teaming to understand and improve the safety of Copilot Chat. Input prompts and output completions are run through content filters. The content filtering system detects and prevents the output on specific categories of content including harmful, offensive, or off-topic content. For more information on improving the performance of Copilot Chat, see Improving performance for Copilot Chat.
Use cases for Spaces
Developing a new feature
Defining the logic for a small, frequent task
Sharing knowledge with teammates
Improving performance for Spaces
Spaces can be used in a wide variety of development and collaboration workflows, from generating code to sharing knowledge across a team. To improve performance and get more relevant responses, there are several best practices you can adopt. For details on system constraints, see Limitations of GitHub Copilot Spaces.
Limitations of GitHub Copilot Spaces
Interpretation of user intent
Context limits
Limited scope
Inaccurate responses
Security limitations
Legal and regulatory considerations
Offensive content
Source: Responsible use of GitHub Copilot Spaces
Speeding up development work with GitHub Copilot Spaces
Learn how to use Copilot Spaces to help you with development work.
Who can use this feature?
Anyone with a Copilot license can use Spaces.
If you're starting a new feature, trying to understand a system, or picking up a task in a codebase you’re still learning, Copilot Spaces can help you:
To create a space, go to https://github.com/copilot/spaces, and click Create space.
Examples of how to use Spaces
Developing a new feature
When working on a specific feature, you can save time and produce higher-quality results by using a space. Add the relevant code, a product spec, and any supporting materials—like notes from a design review or mockup images. Copilot can help you:
Instructions:
This space contains the new user registration form for a healthcare nonprofit providing low-cost testing. It is built using React and Tailwind.
Suggested prompt:
How should I add support for 2FA?
Defining the logic for a small, frequent task
When working on repetitive tasks like tracking telemetry events or handling event emissions, it’s useful to document the logic once and share it with others through Spaces. This allows everyone to stay consistent and saves time when performing the task. If you have a process flowchart for a task, you can upload this to your space for reference. Copilot can assist by:
Instructions:
You help developers implement telemetry events. You should (1) validate what the user's goals are for the event, (2) propose a new event structure based on examples of existing events (and using the common telemetry schema), and (3) create a new version of the telemetry config file.
Suggested prompt:
Help me log when a user clicks on an in-app notification.
Sharing knowledge with teammates
In situations where people tend to ask similar questions, such as how authentication or search works in your project, Copilot can help:
Instructions:
You contain the code and documentation associated with our authentication system.
Suggested prompt:
How does SSO work?
Hands-on practice
Try the Scale institutional knowledge using Copilot Spaces Skills exercise for practical experience to do the following:
Source: Speeding up development work with GitHub Copilot Spaces
Beta Was this translation helpful? Give feedback.
All reactions