1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Update path-specific instructions docs with excludeAgent frontmatter (#58459)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
This commit is contained in:
Ria Gopu
2025-11-12 14:01:51 -08:00
committed by GitHub
parent cd2b59ce80
commit b1c872e5a3

View File

@@ -20,6 +20,19 @@
---
```
To apply the instructions to all files, use `applyTo: "**"`.
To apply the instructions to all files, use `applyTo: "**"`, `applyTo: "*"`, or `applyTo: "**/*"`.
1. Optionally, to prevent the file from being used by either {% data variables.copilot.copilot_coding_agent %} or {% data variables.copilot.copilot_code-review_short %}, add the `excludeAgent` keyword to the frontmatter block. Use either `"code-review"` or `"coding-agent"`.
For example, the following file will only be read by {% data variables.copilot.copilot_coding_agent %}.
```markdown
---
applyTo: "**"
excludeAgent: "code-review"
---
```
If the `excludeAgent` keyword is not included in the front matterblock, both {% data variables.copilot.copilot_code-review_short %} and {% data variables.copilot.copilot_coding_agent %} will use your instructions.
1. Add your custom instructions in natural language, using Markdown format. Whitespace between instructions is ignored, so the instructions can be written as a single paragraph, each on a new line, or separated by blank lines for legibility.