Skip to content

Commit 537d753

Browse files
authored
Create new reference article for custom instructions support (#59040)
1 parent a1c7efa commit 537d753

14 files changed

Lines changed: 295 additions & 47 deletions

content/copilot/concepts/prompting/response-customization.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ You can use three types of repository custom instructions in {% data variables.p
4848

4949
{% data reusables.copilot.custom-instructions-about %}
5050

51-
{% data reusables.copilot.repository-custom-instructions-support %}
52-
5351
## About organization custom instructions
5452

5553
{% data reusables.copilot.custom-instructions-org-support %}
@@ -71,7 +69,7 @@ The following list shows the complete order of precedence, with instructions hig
7169

7270
* **Personal** instructions
7371
* **Repository** custom instructions:
74-
* **Path-specific** instructions in any applicable `.github/instructions/**/NAME.instructions.md` file
72+
* **Path-specific** instructions in any applicable `.github/instructions/**/*.instructions.md` file
7573
* **Repository-wide** instructions in the `.github/copilot-instructions.md` file
7674
* **Agent** instructions (for example, in an `AGENTS.md` file)
7775
* **Organization** custom instructions
@@ -132,8 +130,6 @@ You can use three types of repository custom instructions in {% data variables.p
132130

133131
{% data reusables.copilot.custom-instructions-about %}
134132

135-
{% data reusables.copilot.repository-custom-instructions-support %}
136-
137133
## About prompt files
138134

139135
> [!NOTE] Prompt files are {% data variables.release-phases.public_preview %} and subject to change.
@@ -225,16 +221,14 @@ You can use two types of repository custom instructions in {% data variables.pro
225221

226222
* **Path-specific custom instructions**, which apply to requests made in the context of files that match a specified path.
227223

228-
These are specified in one or more `NAME.instructions.md` files within the `.github/instructions` directory in the repository.
224+
These are specified in one or more `NAME.instructions.md` files within or below the `.github/instructions` directory in the repository.
229225

230226
By using path-specific instructions you can avoid overloading your repository-wide instructions with information that only applies to files of certain types, or in certain directories.
231227

232-
See the table below for details of support for each of these types of repository custom instructions across different {% data variables.product.prodname_copilot_short %} features.
228+
For details of support for each of these types of repository custom instructions across different {% data variables.product.prodname_copilot_short %} features, see [AUTOTITLE](/copilot/reference/custom-instructions-support).
233229

234230
For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customization-library/custom-instructions).
235231

236-
{% data reusables.copilot.repository-custom-instructions-support %}
237-
238232
## About prompt files
239233

240234
Prompt files let you build and share reusable prompt instructions with additional context. A prompt file is a Markdown file, stored in your workspace, that mimics the existing format of writing prompts in {% data variables.copilot.copilot_chat_short %} (for example, `Rewrite #file:x.ts`). This allows blending natural language instructions, additional context, and even linking to other prompt files as dependencies.
@@ -317,7 +311,9 @@ While custom instructions help to add codebase-wide context to each AI workflow,
317311

318312
In JetBrains IDEs, repository custom instructions consist of a single file, `.github/copilot-instructions.md`, that you create in a repository. The instructions you add to the file should be short, self-contained statements that add context or relevant information to supplement a {% data variables.product.prodname_copilot_short %} prompt.
319313

320-
{% data reusables.copilot.repository-custom-instructions-support %}
314+
### Support for repository custom instructions
315+
316+
For details of which types of custom instructions are supported across various environments, see [AUTOTITLE](/copilot/reference/custom-instructions-support).
321317

322318
### Use cases for custom instructions
323319

@@ -411,7 +407,9 @@ For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customi
411407

412408
In Xcode, repository custom instructions consist of a single file, `.github/copilot-instructions.md`, that you create in a repository. The instructions you add to the file should be short, self-contained statements that add context or relevant information to supplement a {% data variables.product.prodname_copilot_short %} prompt.
413409

414-
{% data reusables.copilot.repository-custom-instructions-support %}
410+
### Support for repository custom instructions
411+
412+
For details of which types of custom instructions are supported across various environments, see [AUTOTITLE](/copilot/reference/custom-instructions-support).
415413

416414
### Use cases for custom instructions
417415

content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Once saved, these instructions will apply to the current project in Eclipse that
217217

218218
* **Path-specific custom instructions**, which apply to requests made in the context of files that match a specified path.
219219

220-
These are specified in one or more `NAME.instructions.md` files within the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions).
220+
These are specified in one or more `NAME.instructions.md` files within or below the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions).
221221

222222
If the path you specify matches a file that {% data variables.product.prodname_copilot_short %} is working on, and a repository-wide custom instructions file also exists, then the instructions from both files are used. You should avoid potential conflicts between instructions as {% data variables.product.prodname_copilot_short %}'s choice between conflicting instructions is non-deterministic.
223223

@@ -253,7 +253,7 @@ Once saved, these instructions will apply to the current project in Eclipse that
253253

254254
* **Path-specific custom instructions**, which apply to requests made in the context of files that match a specified path.
255255

256-
These are specified in one or more `NAME.instructions.md` files within the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions-1).
256+
These are specified in one or more `NAME.instructions.md` files within or below the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions-1).
257257

258258
If the path you specify matches a file that {% data variables.product.prodname_copilot_short %} is working on, and a repository-wide custom instructions file also exists, then the instructions from both files are used.
259259

@@ -290,7 +290,7 @@ Once saved, these instructions will apply to the current project in Eclipse that
290290

291291
* **Path-specific custom instructions**, which apply to requests made in the context of files that match a specified path.
292292

293-
These are specified in one or more `NAME.instructions.md` files within the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions-2).
293+
These are specified in one or more `NAME.instructions.md` files within or below the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions-2).
294294

295295
If the path you specify matches a file that {% data variables.product.prodname_copilot_short %} is working on, and a repository-wide custom instructions file also exists, then the instructions from both files are used.
296296

@@ -320,7 +320,7 @@ Once saved, these instructions will apply to the current project in Eclipse that
320320

321321
* **Path-specific custom instructions** apply to requests made in the context of files that match a specified path.
322322

323-
These are specified in one or more `NAME.instructions.md` files within the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions-2).
323+
These are specified in one or more `NAME.instructions.md` files within or below the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions-2).
324324

325325
If the path you specify matches a file that {% data variables.product.prodname_copilot_short %} is working on, and a repository-wide custom instructions file also exists, then the instructions from both files are used.
326326

content/copilot/how-tos/use-copilot-agents/use-copilot-cli.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ topics:
1111
- Copilot
1212
- CLI
1313
contentType: how-tos
14-
category:
14+
category:
1515
- Author and optimize with Copilot
1616
---
1717

@@ -171,7 +171,7 @@ You can enhance {% data variables.product.prodname_copilot_short %}’s performa
171171
{% data variables.copilot.copilot_cli_short %} supports:
172172

173173
* Repository-wide instructions in the `.github/copilot-instructions.md` file.
174-
* Path-specific instructions files: `.github/copilot-instructions/**/*.instructions.md`.
174+
* Path-specific instructions files: `.github/instructions/**/*.instructions.md`.
175175
* Agent files such as `AGENTS.md`.
176176

177177
For more information, see [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions).
@@ -201,11 +201,11 @@ In the case of naming conflicts, a system-level agent overrides a repository-lev
201201
* Calling out to {% data variables.copilot.copilot_custom_agent_short %} directly in a prompt:
202202

203203
```shell
204-
Use the refactoring agent to refactor this code block
204+
Use the refactoring agent to refactor this code block
205205
```
206206

207207
{% data variables.product.prodname_copilot_short %} will automatically infer the agent you want to use.
208-
208+
209209
* Specifying the {% data variables.copilot.copilot_custom_agent_short %} you want to use with the command-line option. For example:
210210

211211
```shell

0 commit comments

Comments
 (0)