The Context Problem in AI-Assisted Development

Large language models excel at pattern recognition, but real engineering work is full of edge cases that no public training data covers. A monorepo mixing modern React with legacy jQuery, organizational knowledge buried in Slack threads, or security guidelines that diverge from upstream documentation — these are the situations where an AI assistant starts guessing instead of knowing.

GitHub Copilot Spaces addresses this by letting developers bundle the specific context Copilot should read — code, documentation, transcripts, sample queries — into a reusable space. Once created on github.com, Copilot chat and command interactions on the GitHub platform ground their responses in that curated knowledge. IDE integration is planned for the future.

What a Space Contains

A Copilot Space is a secure, shareable container that combines two elements: knowledge attachments and behavioral instructions.

What it holdsWhy it matters
AttachmentsCode files, entire folders, Markdown docs, transcripts, or any plain text you addGives Copilot the ground truth for answers
Custom instructionsShort system prompts to set tone, coding style, or reviewer expectationsLets Copilot match your house rules
Sharing & permissionsFollows the same role/visibility model you already use on GitHubNo new access control lists to manage
Live updatesFiles stay in sync with the branch you referencedYour space stays up to date with your codebase

Spaces are available to anyone with a Copilot license (Free, Individual, Business, or Enterprise) while the feature is in public preview. Administrators enable it under Settings > Copilot > Preview features. In short, a space pins your team's collective knowledge to the Copilot sidebar, letting anyone query it in plain language.

Building Your First Space

Creating a space takes only a few minutes. Navigate to github.com/copilot/spaces and click Create space. Give it a clear name like frontend-styleguide, add a description so teammates know when to use it, then attach context:

  • From repositories: pull in folders such as src/components or individual files like eslint.config.js.
  • Free-text content: paste a Slack thread, onboarding checklist, video transcript, or JSON schema into the Text tab — Copilot treats it like any other attachment.

Write a sentence or two of custom instructions (for example, "Respond as a senior React reviewer. Enforce our ESLint rules and tailwind class naming conventions"), save, and test. Asking a question in the Space chat will produce answers that cite the files you attached.

Shaping Behavior with Instructions

Custom instructions act as the personality layer of a space. Because they live alongside the attachments, a single sentence can enforce meaningful constraints:

  • Enforce conventions: "Always prefer Vue 3 script setup syntax and Composition API for examples."
  • Adopt a team tone: "Answer concisely. Include a one-line summary before code blocks."
  • Teach project-specific vocabulary: "Call it 'scenario ID' (SCID), not test case ID."

This combination of curated context and behavioral guidance often produces commit-ready code that matches a team's style guide on the first attempt.

Practical Use Cases

Accessibility Compliance Assistant

Attach markdown documentation on WCAG criteria and your organization's internal "Definition of Done," plus an instruction to cite the relevant doc section and provide a code diff when changes are required. Team members can then ask questions like "What steps are needed for MAS-C compliance on this new modal?" and receive summarized checkpoints with ARIA attribute or color-contrast suggestions — without waiting on the accessibility lead.

Self-Service Data Queries

For teams working with complex schemas, attach YAML schema files for event tables and example KQL snippets saved as .sql files, with the instruction "Generate KQL only, no prose explanations unless asked." Product managers and support engineers who do not know the database structure can then ask for a query like "Average PR review time last 7 days" and get valid KQL with correct joins, iterating on the spot rather than bothering the data science team.

Onboarding Knowledge Hub

Architecture diagrams exported as SVG text, architecture decision records, and design docs from multiple repositories can form a single onboarding space. With an instruction to answer like a mentor and link to deeper documentation, new hires can ask "How does our auth flow handle SAML?" and get a structured answer with references. Since spaces stay in sync with main, updates to the source documents propagate automatically.

Permissions and Sharing

Spaces operate within GitHub's existing permission model. Personal spaces are visible only to you unless shared; organization-owned spaces use repo or team permissions to control access. Administrators can maintain the canonical content while everyone else consumes it in a read-only capacity. Sharing is as simple as sending the space URL or pinning it in a README — anyone with access and a Copilot license can begin chatting immediately.

Roadmap and Getting Started

GitHub is developing several extensions to Spaces: attachments from Issues and pull requests to bring inline discussions into the context bundle, IDE integration for querying Spaces directly in VS Code, and organization-wide discoverability so engineers can browse and search spaces like they browse repositories.

To get started:

  1. Enable the preview toggle under Settings > Copilot > Preview features.
  2. Create a small, high-impact space — a code-review checklist or set of common data queries works well.
  3. Share the link in Slack or a README.
  4. Iterate: prune unused attachments, refine instructions, or split a large space into smaller, focused ones.

Copilot Spaces is free during public preview and does not count against Copilot seat entitlements when using the base model.