Agent Plugins 1.0: `.instructions.md` files and `applyTo` frontmatter in `com.github.copilot/rules/` are silently ignored
Describe the bug
When packaging a plugin using the Agent Plugins 1.0.0 format ("$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"), Copilot CLI loads skills (skills/), MCP servers (mcp.json), custom agents (com.github.copilot/agents/), hooks (com.github.copilot/hooks/hooks.json), and LSP servers (com.github.copilot/lsp.json), but silently ignores standard GitHub Copilot .instructions.md files placed in com.github.copilot/rules/.
According to the CLI plugin reference and the VS Code Agent plugin authoring reference, com.github.copilot/rules/ is the Copilot-specific extension directory for plugin rules/instructions. Across the Copilot ecosystem (.github/instructions/*.instructions.md, ~/.copilot/instructions/*.instructions.md, and VS Code Agent Plugins), the standard Copilot rule format is *.instructions.md with YAML frontmatter (description, applyTo).
Through black-box testing on Copilot CLI 1.0.109, two cumulative issues prevent .instructions.md plugin rules from working across VS Code and Copilot CLI:
.instructions.md(and.md) files incom.github.copilot/rules/are completely ignored. Copilot CLI only discovers files ending in.mdcinsidecom.github.copilot/rules/. Files ending in.instructions.mdor.mddo not appear in/env,/instructions, orcopilot instruction list, are never injected into the prompt, and produce no warning even with--log-level debug. Meanwhile, VS Code loads.instructions.mdfrom the exact samecom.github.copilot/rules/folder.- Copilot frontmatter (
applyTo) is ignored in plugin rules, andalwaysApplysemantics are inverted for glob-scoped rules. Even after renaming a file from.instructions.mdto.mdc:applyTois ignored; Copilot CLI only parsesglobs(and requires a non-emptydescription), whereas VS Code parsesapplyToand ignoresglobs.- Omitting
alwaysApplyor settingalwaysApply: falseon a glob-scoped rule (e.g.,globs: ["**/*.yaml"]) causescopilot instruction list --jsonto report"defaultDisabled": true(0/1 enabledin/instructions). As a result, glob-scoped rules withalwaysApply: false(or omitted) never fire out of the box when matching files are read unless the user manually enables them in/instructionsin every session. - Counter-intuitively, a rule must set both
alwaysApply: trueandglobs: [...]to be enabled by default ("defaultDisabled": false) while still scoping activation to matching files rather than injecting globally at startup.
Also, it seems there is another issue with instructions on command like : copilot --plugin-dir <dir> instruction list ignores --plugin-dir.
Unlike copilot --plugin-dir <dir> skill list (and interactive /env / /instructions), the instruction list subcommand ignores --plugin-dir and always prints No instruction sources found. unless the plugin is installed into $COPILOT_HOME.
Affected version
GitHub Copilot CLI 1.0.109
Steps to reproduce the behavior
Run the following self-contained reproduction script in an isolated COPILOT_HOME:
rm -rf /tmp/repro-plugin /tmp/repro-copilot-home
mkdir -p /tmp/repro-plugin/com.github.copilot/rules /tmp/repro-copilot-home
cat << 'EOF' > /tmp/repro-plugin/plugin.json
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "repro-plugin",
"version": "0.1.0",
"description": "Minimal reproducer for plugin instructions"
}
EOF
# 1. Standard Copilot .instructions.md file -> SILENTLY IGNORED
cat << 'EOF' > /tmp/repro-plugin/com.github.copilot/rules/standard-copilot.instructions.md
---
name: "Standard Copilot Rule"
description: "Standard Copilot instruction file using applyTo"
applyTo: "**/*.yaml"
---
Follow standard YAML conventions.
EOF
# 2. .mdc with globs and alwaysApply: false -> DISCOVERED, BUT DISABLED BY DEFAULT
cat << 'EOF' > /tmp/repro-plugin/com.github.copilot/rules/mdc-glob-disabled.mdc
---
description: "MDC rule with globs and alwaysApply false"
globs: ["**/*.yaml"]
alwaysApply: false
---
Follow MDC YAML conventions (disabled by default).
EOF
# 3. .mdc with globs and alwaysApply: true -> ENABLED BY DEFAULT & SCOPED TO GLOBS
cat << 'EOF' > /tmp/repro-plugin/com.github.copilot/rules/mdc-glob-enabled.mdc
---
description: "MDC rule with globs and alwaysApply true"
globs: ["**/*.yaml"]
alwaysApply: true
---
Follow MDC YAML conventions (enabled).
EOF
Step A — Test instruction list with --plugin-dir (Bug 4)
COPILOT_HOME=/tmp/repro-copilot-home copilot --plugin-dir /tmp/repro-plugin instruction list
Actual output:
No instruction sources found.
(Whereas launching interactively with copilot --plugin-dir /tmp/repro-plugin and running /env or /instructions does find the .mdc files, and copilot --plugin-dir <dir> skill list honors --plugin-dir.)
Step B — Install the plugin and inspect copilot instruction list --json (Bugs 1 & 2)
COPILOT_HOME=/tmp/repro-copilot-home copilot plugin install /tmp/repro-plugin
COPILOT_HOME=/tmp/repro-copilot-home copilot instruction list --json
Actual output:
[
{
"id": "plugin-rule/repro-plugin:mdc-glob-disabled",
"label": "repro-plugin: mdc-glob-disabled",
"description": "MDC rule with globs and alwaysApply false",
"location": "plugin",
"type": "plugin",
"sourcePath": "/tmp/repro-copilot-home/installed-plugins/_direct/repro-plugin-xxxx/com.github.copilot/rules/mdc-glob-disabled.mdc",
"defaultDisabled": true,
"applyTo": [
"**/*.yaml"
]
},
{
"id": "plugin-rule/repro-plugin:mdc-glob-enabled",
"label": "repro-plugin: mdc-glob-enabled",
"description": "MDC rule with globs and alwaysApply true",
"location": "plugin",
"type": "plugin",
"sourcePath": "/tmp/repro-copilot-home/installed-plugins/_direct/repro-plugin-xxxx/com.github.copilot/rules/mdc-glob-enabled.mdc",
"defaultDisabled": false,
"applyTo": [
"**/*.yaml"
]
}
]
Notice that:
standard-copilot.instructions.mdis completely missing from the discovered sources.mdc-glob-disabled.mdchas"defaultDisabled": true, so in a session (/instructions) it starts unchecked (•) and does not trigger when reading a.yamlfile.mdc-glob-enabled.mdchas"defaultDisabled": falseand"applyTo": ["**/*.yaml"](mapped fromglobs, while an actualapplyTokey in frontmatter is ignored).
Summary of observed behavior matrix
File in com.github.copilot/rules/ |
Frontmatter | VS Code behavior | Copilot CLI 1.0.109 behavior |
|---|---|---|---|
rule.instructions.md |
description + applyTo: "**" |
Loaded (global) | Silently ignored |
rule.instructions.md |
description + applyTo: "**/*.yaml" |
Loaded (glob-scoped) | Silently ignored |
rule.mdc |
description + applyTo: "**/*.yaml" |
Loaded (glob-scoped) | Discovered, applyTo ignored, disabled by default (defaultDisabled: true) |
rule.mdc |
description + globs: ["**/*.yaml"] + alwaysApply: false (or omitted) |
Loaded, globs ignored |
Discovered, disabled by default (0/1 enabled in /instructions; never triggers unless manually toggled per session) |
Expected behavior
- Support
.instructions.mdnatively incom.github.copilot/rules/: Sincecom.github.copilot/is GitHub Copilot's own client extension namespace in Agent Plugins 1.0, Copilot CLI should discover*.instructions.mdfiles alongside*.mdc(matching.github/instructions/*.instructions.md,~/.copilot/instructions/*.instructions.md, and VS Code's plugin loader). - Support Copilot frontmatter (
applyTo) and intuitive activation defaults:- Accept
applyTo(string or array) in addition toglobsso a single.instructions.mdfile works identically in both VS Code and Copilot CLI without duplicating metadata. - Treat glob-scoped rules (
applyTo/globswithoutalwaysApply: false) as enabled for pattern-matching by default, rather than disabled for the whole session unlessalwaysApply: trueis also set. WhenapplyTois"**"or"*", treat the rule as session-wide.
- Accept
- Honor
--plugin-dirincopilot instruction list: Matchcopilot skill listand interactive sessions so plugin authors can validatecom.github.copilot/rules/during local development without reinstalling the plugin on every edit. - Document the
com.github.copilot/rules/file format and frontmatter contract in the CLI plugin reference.
Additional context
- OS: Linux (
x86_64, Ubuntu / WSL2) - Shell:
bash - Impact & current workaround: As VS Code deprecates its legacy Local harness in favor of the shared Copilot harness, organizations migrating shared engineering harnesses to Agent Plugins 1.0 need a single plugin package to deliver skills, MCP servers, agents, hooks, LSPs, and
.instructions.mdrules across both VS Code and Copilot CLI. Currently, the only way to avoid duplicating every rule file incom.github.copilot/rules/is to include bothapplyToandglobs+alwaysApply: truein each.instructions.mdfrontmatter and commit relative<name>.mdc -> <name>.instructions.mdsymlinks alongside them (which breaks on Windows checkouts whencore.symlinks=false).
Dear MSFT,
Please for the love of God fix this bloody mess by internally properly standardizing AND TESTING.
Thank you.
Best,
One of your most "devoted" SMEs
I am seeing this as well
Additional findings on Windows with CLI runtime 1.0.116-1:
• With alwaysApply: true, omitting globs includes global rule bodies in the initial model input. Adding globs: [] delays those same bodies until the first file read. • .mdc + nonempty globs + alwaysApply: true worked: rules were enabled by default and activated only for matching C++/PowerShell file reads. Nonmatching paths did not activate them. • copilot instruction list --json omitted plugin rules even though live sessions reported them enabled and their model inputs confirmed activation. An empty list is therefore not evidence of a loading failure.
Can confirm as well. I thought you had finally solved shipping Rules in plugins, but alas, no
Still reproducible on Copilot CLI 1.0.118-3 (Windows). Workaround and extra findings:
Workaround (verified): rename the rule to .mdc and give it a non-empty description:
com.github.copilot/rules/core.mdc
---
description: Core team rules
alwaysApply: true
---
<rule text>
For file-scoped rules, use globs: ["**/*.ext"] together with alwaysApply: true. applyTo is ignored.
Verification: I put a probe word in the rule, ran copilot --plugin-dir <plugin> -p "What is the probe word in your instructions?" and compared the answers:
core.md(alwaysApply: true, no description): the answer wasnone.core.mdcwith adescription: the answer was the probe word.
Extra finding: on 1.0.118-3, copilot instruction list (with or without --json) also failed to list a .mdc rule from a plugin that was installed with copilot plugin install, in a clean COPILOT_HOME. I tested the minimal repro from this issue and it returned []. The rule was still loaded into the prompt. So instruction list currently can't be used to check plugin rules, and a prompt-based check is the only reliable test.
Additional results on Copilot CLI 1.0.117 (Linux), each run in a fresh COPILOT_HOME. Rules were checked with copilot instruction list --json and in real copilot -p sessions with marker lines.
Agent Plugins 1.0 ($schema set), com.github.copilot/rules/
- With the reproduction script above and
copilot plugin install <dir>,copilot instruction list --jsonnow returns[]. On 1.0.117 even the.mdcrules, includingglobs: ["**/*.yaml"]+alwaysApply: true, are not discovered. - In sessions none of the rules are injected, and the glob-scoped rule is not applied when the agent edits a
.yamlfile. The plugin's skills load in the same setup, so the plugin itself loads. - When installed from a
directorymarketplace and enabled through the repository's.github/copilot/settings.json(enabledPlugins), the CLI reads the plugin in place rather than copying it intoinstalled-plugins/.com.github.copilot/rules/*.mdcis still not discovered, while a legacy-format plugin'srules/*.mdcin the same marketplace is listed bycopilot instruction list.
Legacy plugin format (no $schema), rules/ at the plugin root
.instructions.mdis ignored;.mdcis discovered..mdcwithalwaysApply: trueand noglobsis injected into every session..mdcwithglobs: ["**/*.yaml"]+alwaysApply: trueis listed (defaultDisabled: false,applyTo: ["**/*.yaml"]). In one-prun that edited a.yamlfile, its instruction wasn't followed..mdcwithglobs: "**/*"(a string) +alwaysApply: trueis listed but not injected in a session with no file in context.
Controls: a repository AGENTS.md marker loads in the same setup.
So on 1.0.117 the documented Agent Plugins location com.github.copilot/rules/ provides no rules to the CLI. The only plugin rule that reliably reaches the prompt is a legacy-format .mdc with alwaysApply: true and no globs. It would help to have .instructions.md with applyTo supported in com.github.copilot/rules/, matching VS Code and the repository format.
im getting pop ups for depreciation on the way i was doing things which was just linking agents/instructions/skills to a repo i maintained on the file system but because this is being depreciated i am running out of options without this part of the plugin working.