Skip to content

Add support for organization custom instructions#2310

Merged
pwang347 merged 52 commits intomainfrom
pawang/customAgentProviderFollowups
Jan 22, 2026
Merged

Add support for organization custom instructions#2310
pwang347 merged 52 commits intomainfrom
pawang/customAgentProviderFollowups

Conversation

@pwang347
Copy link
Member

@pwang347 pwang347 commented Dec 1, 2025

@pwang347 pwang347 requested a review from aeschli December 1, 2025 23:04
@pwang347 pwang347 marked this pull request as ready for review December 1, 2025 23:08
Copilot AI review requested due to automatic review settings December 1, 2025 23:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for organization-level custom instructions in GitHub Copilot, allowing organizations to provide centralized instruction prompts that can be used across their repositories. The implementation follows a similar pattern to the existing organization/enterprise custom agents feature.

Key Changes

  • Added a new VS Code API for instructions providers (InstructionsProvider interface)
  • Implemented OrganizationInstructionsProvider that fetches and caches organization-level custom instructions from GitHub
  • Added configuration setting github.copilot.chat.customInstructions.showOrganizationInstructions to enable/disable the feature

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/extension/vscode.proposed.chatParticipantPrivate.d.ts Added InstructionsProvider interface and registerInstructionsProvider API
src/platform/github/common/githubService.ts Added getOrgCustomInstructions method to IOctoKitService interface
src/platform/github/common/octoKitServiceImpl.ts Implemented getOrgCustomInstructions to fetch instructions from GitHub API
src/extension/agents/vscode-node/organizationInstructionsProvider.ts New provider implementation that manages caching and retrieval of org instructions
src/extension/agents/vscode-node/organizationInstructionsContrib.ts New contribution that registers the instructions provider when enabled
src/extension/extension/vscode-node/contributions.ts Registered the new OrganizationInstructionsContribution
src/platform/configuration/common/configurationService.ts Added ShowOrganizationInstructions configuration key
package.json Added activation event, configuration setting definition
package.nls.json Added localization string for the new setting
src/extension/agents/vscode-node/test/organizationAndEnterpriseAgentProvider.spec.ts Updated mock to include getOrgCustomInstructions method (with type mismatch issue)

pwang347 and others added 6 commits December 1, 2025 15:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…der.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pwang347 pwang347 added this to the December / January 2026 milestone Dec 3, 2025
@pwang347 pwang347 marked this pull request as draft December 31, 2025 20:42
@joaomorenoalt joaomorenoalt removed this from the December / January 2026 milestone Jan 5, 2026
@pwang347 pwang347 marked this pull request as ready for review January 22, 2026 02:45
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 22, 2026
@pwang347 pwang347 enabled auto-merge January 22, 2026 20:03
@pwang347 pwang347 added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit c8c1422 Jan 22, 2026
19 checks passed
@pwang347 pwang347 deleted the pawang/customAgentProviderFollowups branch January 22, 2026 20:37
eleanorjboyd pushed a commit to eleanorjboyd/vscode-copilot-chat that referenced this pull request Jan 23, 2026
* PR

* activation

* fix test

* wip

* update

* tests

* Update src/platform/github/common/githubService.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/extension/agents/vscode-node/organizationInstructionsProvider.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/platform/github/common/octoKitServiceImpl.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update

* update setting name

* wip

* fix

* use enum

* PR

* nit

* add polling

* tests

* cleanup

* use helper

* remove instructions

* clean

* Revert "clean"

This reverts commit d00db38.

* Revert "remove instructions"

This reverts commit 24f3e2e.

* update

* update per discussion

* clean

* update

* update

* Update

* update

* update

* clean

* test

* test

* fixes

* fixes

* fix tests

* update test

* yaml

* fix

* config update

* clean

* fix

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support GitHub's organization custom instructions

4 participants