Copilot AH customizations: support agent instructions#319639
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for discovering “agent instruction” markdown files as part of Agent Host customizations, so they can be surfaced to Copilot (as rules) with special handling (e.g. always-apply semantics) while keeping the existing plugin bundling model for agents/skills/instructions.
Changes:
- Extend
SessionCustomizationDiscoveryto scan for supported agent-instruction filenames in workspace/user-home locations and adjust watcher setup. - Update bundling to exclude agent-instruction discoveries from the synthetic plugin tree.
- Mark discovered agent-instruction files as
Rulechildren withalwaysApplyand add discovery/watcher tests.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/test/node/sessionCustomizationDiscovery.test.ts | Adds tests for agent-instruction discovery and watcher expectations. |
| src/vs/platform/agentHost/node/shared/sessionPluginBundler.ts | Skips bundling AgentInstruction discoveries into the plugin layout. |
| src/vs/platform/agentHost/node/copilot/sessionCustomizationDiscovery.ts | Introduces DiscoveredType.AgentInstruction, new instruction filename/root scanning, and refactors watcher registration. |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Treats AgentInstruction as rules and flags them alwaysApply. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 4
Comment on lines
103
to
+107
| for (const discoveredDirectory of directories) { | ||
| const dir = pluginDirForType(discoveredDirectory.type); | ||
| if (!dir) { | ||
| continue; // do not bundle agent instructions | ||
| } |
roblourens
previously approved these changes
Jun 3, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
dbaeumer
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.