Skip to content

Commit b1c872e

Browse files
ria-gopuCopilotjc-clark
authored
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>
1 parent cd2b59c commit b1c872e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

data/reusables/copilot/custom-instructions-path.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@
2020
---
2121
```
2222

23-
To apply the instructions to all files, use `applyTo: "**"`.
23+
To apply the instructions to all files, use `applyTo: "**"`, `applyTo: "*"`, or `applyTo: "**/*"`.
24+
25+
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"`.
26+
27+
For example, the following file will only be read by {% data variables.copilot.copilot_coding_agent %}.
28+
29+
```markdown
30+
---
31+
applyTo: "**"
32+
excludeAgent: "code-review"
33+
---
34+
```
35+
36+
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.
2437

2538
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.

0 commit comments

Comments
 (0)