From d29f11b5b2605a69f8abf7fb9629ebf6435e6ee8 Mon Sep 17 00:00:00 2001 From: hubwriter Date: Mon, 17 Nov 2025 15:51:59 +0000 Subject: [PATCH 1/6] Add note about custom instructions varying behavior (#58511) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../concepts/prompting/response-customization.md | 12 ++++++++++++ .../copilot/custom-insts-nondeterministic.md | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 data/reusables/copilot/custom-insts-nondeterministic.md diff --git a/content/copilot/concepts/prompting/response-customization.md b/content/copilot/concepts/prompting/response-customization.md index 490d6bc86bab..88569d2c8fc4 100644 --- a/content/copilot/concepts/prompting/response-customization.md +++ b/content/copilot/concepts/prompting/response-customization.md @@ -26,6 +26,8 @@ category: {% data variables.product.prodname_copilot %} can provide responses that are tailored to your personal preferences, the way your team works, the tools you use, or the specifics of your project, if you provide it with enough context to do so. Instead of repeatedly adding this contextual detail to your prompts, you can create custom instructions that automatically add this information for you. The additional information is not displayed, but is available to {% data variables.product.prodname_copilot_short %} to allow it to generate higher quality responses. +{% data reusables.copilot.custom-insts-nondeterministic %} + ## Types of custom instructions There are three main types of custom instructions that you can use to customize {% data variables.product.prodname_copilot_short %} responses on the {% data variables.product.github %} website: @@ -122,6 +124,8 @@ There are two types of files you can use to provide context and instructions to While custom instructions help to add codebase-wide context to each AI workflow, prompt files let you add instructions to a specific chat interaction. +{% data reusables.copilot.custom-insts-nondeterministic %} + ## About repository custom instructions You can use three types of repository custom instructions in {% data variables.product.prodname_vscode_shortname %}: @@ -199,6 +203,8 @@ The following examples demonstrate how to use prompt files. {% data variables.product.prodname_copilot %} can provide responses that are tailored to the way your team works, the tools you use, or the specifics of your project, if you provide it with enough context to do so. Instead of repeatedly adding this contextual detail to your prompts, you can create a custom instructions file in your repository that automatically adds this information for you. The additional information is not displayed in the chat input box, but is available to {% data variables.product.prodname_copilot_short %} to allow it to generate higher quality responses. +{% data reusables.copilot.custom-insts-nondeterministic %} + ## About repository custom instructions In {% data variables.product.prodname_vs %}, 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. @@ -246,6 +252,8 @@ There are two types of files you can use to provide context and instructions to While custom instructions help to add codebase-wide context to each AI workflow, prompt files let you add instructions to a specific chat interaction. +{% data reusables.copilot.custom-insts-nondeterministic %} + ## About repository custom instructions 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. @@ -337,6 +345,8 @@ For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customi {% data variables.product.prodname_copilot %} can provide responses that are tailored to the way your team works, the tools you use, or the specifics of your project, if you provide it with enough context to do so. Instead of repeatedly adding this contextual detail to your prompts, you can create a custom instructions file in your repository that automatically adds this information for you. The additional information is not displayed in the chat input box, but is available to {% data variables.product.prodname_copilot_short %} to allow it to generate higher quality responses. +{% data reusables.copilot.custom-insts-nondeterministic %} + ## About repository custom instructions 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. @@ -382,6 +392,8 @@ There are two types of repository custom instructions you can use to provide con * **Workspace custom instructions** which apply to all projects in a workspace, and allow you to specify workspace-wide instructions and preferences, in a single file. * **Project custom instructions** which apply to a specific project. +{% data reusables.copilot.custom-insts-nondeterministic %} + ## About repository custom instructions **Workspace custom instructions** apply to all projects in a workspace, and allow you to specify workspace-wide instructions and preferences. You can use workspace custom instructions to provide context and instructions to {% data variables.product.prodname_copilot_short %} in Eclipse. diff --git a/data/reusables/copilot/custom-insts-nondeterministic.md b/data/reusables/copilot/custom-insts-nondeterministic.md new file mode 100644 index 000000000000..64984ae4d262 --- /dev/null +++ b/data/reusables/copilot/custom-insts-nondeterministic.md @@ -0,0 +1,2 @@ +> [!NOTE] +> Due to the non-deterministic nature of AI, {% data variables.product.prodname_copilot_short %} may not always follow your custom instructions in exactly the same way every time they are used. From cfd3bc5a2c6d044fee871430fada690c40b90466 Mon Sep 17 00:00:00 2001 From: hubwriter Date: Mon, 17 Nov 2025 15:57:16 +0000 Subject: [PATCH 2/6] Fix incorrect statement about premium request usage for code selection review in VSC for Copilot Free users (#58508) --- content/copilot/concepts/agents/code-review.md | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/content/copilot/concepts/agents/code-review.md b/content/copilot/concepts/agents/code-review.md index 79f705f0beef..0dacdab458de 100644 --- a/content/copilot/concepts/agents/code-review.md +++ b/content/copilot/concepts/agents/code-review.md @@ -61,15 +61,13 @@ In the event that {% data variables.product.prodname_actions %} is unavailable o * Xcode * JetBrains IDEs -{% data variables.copilot.copilot_code-review_short %} is—with one exception—a premium feature, available with the {% data variables.copilot.copilot_pro_short %}, {% data variables.copilot.copilot_pro_plus_short %}, {% data variables.copilot.copilot_business_short %}, and {% data variables.copilot.copilot_enterprise_short %} plans. See [Copilot plans](https://github.com/features/copilot/plans?ref_product=copilot&ref_type=purchase&ref_style=text&utm_source=docs-signup-copilot&utm_medium=docs&utm_campaign=universe25post). - -The exception is the review of a selection of code within a file in {% data variables.product.prodname_vscode %}. This is a standard feature available to all {% data variables.product.prodname_copilot_short %} users in {% data variables.product.prodname_vscode_shortname %}. +{% data variables.copilot.copilot_code-review_short %} is a premium feature, available with the {% data variables.copilot.copilot_pro_short %}, {% data variables.copilot.copilot_pro_plus_short %}, {% data variables.copilot.copilot_business_short %}, and {% data variables.copilot.copilot_enterprise_short %} plans. See [Copilot plans](https://github.com/features/copilot/plans?ref_product=copilot&ref_type=purchase&ref_style=text&utm_source=docs-signup-copilot&utm_medium=docs&utm_campaign=universe25post). If you receive {% data variables.product.prodname_copilot_short %} from an organization then, to be able to request a pull request review from {% data variables.product.prodname_copilot_short %} on {% data variables.product.prodname_dotcom_the_website %} or in {% data variables.product.prodname_mobile %}, the **{% data variables.copilot.copilot_code-review_short %}** option must be enabled in the {% data variables.product.prodname_copilot_short %} policy settings for the organization. See [AUTOTITLE](/copilot/how-tos/administer/organizations/managing-policies-for-copilot-in-your-organization). ## Code review monthly quota -Each time {% data variables.product.prodname_copilot_short %} reviews a pull request, or reviews files in your IDE that contain uncommitted changes, your monthly quota of Copilot premium requests is reduced by one. Code review for currently selected text in {% data variables.product.prodname_vscode_shortname %} does not consume a premium request. For information about premium requests, see [AUTOTITLE](/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests). +Each time {% data variables.product.prodname_copilot_short %} reviews a pull request, or reviews code in your IDE, your monthly quota of Copilot premium requests is reduced by one. If a repository is configured to automatically request a code review from {% data variables.product.prodname_copilot_short %} for all new pull requests, the premium request usage is applied to the quota of the pull request author. If a pull request is created by {% data variables.product.prodname_actions %} or by a bot, the usage will apply to the user who triggered the workflow (if identifiable), or to a designated billing owner. @@ -81,17 +79,6 @@ When you reach your monthly quota you will not be able to get a code review from {% data reusables.copilot.ccr-model-settings %} -## {% data variables.copilot.copilot_code-review_short %} in {% data variables.product.prodname_vscode %} - -{% data variables.copilot.copilot_code-review_short %} in {% data variables.product.prodname_vscode %} supports two types of review: - -* **Review selection:** - * Highlight code and ask for an initial review. - * Standard {% data variables.product.prodname_copilot_short %} feature. No premium requests used. -* **Review changes:** - * Request a deeper review of all of your uncommitted changes. - * Premium feature. Uses one premium request from your monthly quota per review. - ## Providing instructions for {% data variables.product.prodname_copilot_short %} code reviews You can tailor the reviews that {% data variables.product.prodname_copilot_short %} generates by providing custom instructions. This helps {% data variables.product.prodname_copilot_short %} to review the code in a way that matches your team's coding standards, tools, and practices. See [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions?tool=webui) and [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-organization-instructions). From 6c632ed074c246adeb9c28dd53adf045e3ebafee Mon Sep 17 00:00:00 2001 From: hubwriter Date: Mon, 17 Nov 2025 15:57:38 +0000 Subject: [PATCH 3/6] Add link to a couple of Further reading/Next steps sections (#58507) --- content/copilot/concepts/prompting/response-customization.md | 4 ++++ .../add-repository-instructions.md | 1 + 2 files changed, 5 insertions(+) diff --git a/content/copilot/concepts/prompting/response-customization.md b/content/copilot/concepts/prompting/response-customization.md index 88569d2c8fc4..f9b2160ac431 100644 --- a/content/copilot/concepts/prompting/response-customization.md +++ b/content/copilot/concepts/prompting/response-customization.md @@ -188,6 +188,7 @@ The following examples demonstrate how to use prompt files. ## Next steps * [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot) +* [AUTOTITLE](/copilot/tutorials/use-custom-instructions) {% endvscode %} @@ -330,6 +331,7 @@ For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customi ## Next steps * [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot) +* [AUTOTITLE](/copilot/tutorials/use-custom-instructions) {% endjetbrains %} @@ -372,6 +374,7 @@ For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customi ## Next steps * [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot) +* [AUTOTITLE](/copilot/tutorials/use-custom-instructions) {% endxcode %} @@ -417,6 +420,7 @@ For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customi ## Next steps * [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot) +* [AUTOTITLE](/copilot/tutorials/use-custom-instructions) {% endeclipse %} diff --git a/content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md b/content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md index 6e09733b4e41..86046517b33d 100644 --- a/content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md +++ b/content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md @@ -645,6 +645,7 @@ Once prompt files are saved, their instructions will apply to the current worksp ## Further reading +* [AUTOTITLE](/copilot/tutorials/use-custom-instructions) * [AUTOTITLE](/copilot/tutorials/customization-library/custom-instructions)—a curated collection of examples {% endcopilotcli %} From 598e32b888969aa8c068dffa150b2b1709b350cb Mon Sep 17 00:00:00 2001 From: hubwriter Date: Mon, 17 Nov 2025 15:59:30 +0000 Subject: [PATCH 4/6] Add glob examples for path-specific custom instructions doc (#58509) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- data/reusables/copilot/custom-instructions-path.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/data/reusables/copilot/custom-instructions-path.md b/data/reusables/copilot/custom-instructions-path.md index 55d221853629..526d6c36d281 100644 --- a/data/reusables/copilot/custom-instructions-path.md +++ b/data/reusables/copilot/custom-instructions-path.md @@ -20,12 +20,20 @@ --- ``` - To apply the instructions to all files, use `applyTo: "**"`, `applyTo: "*"`, or `applyTo: "**/*"`. + Glob examples: + + * `*` - will all match all files in the current directory. + * `**` or `**/*` - will all match all files in all directories. + * `*.py` - will match all `.py` files in the current directory. + * `**/*.py` - will recursively match all `.py` files in all directories. + * `src/*.py` - will match all `.py` files in the `src` directory. For example, `src/foo.py` and `src/bar.py` but _not_ `src/foo/bar.py`. + * `src/**/*.py` - will recursively match all `.py` files in the `src` directory. For example, `src/foo.py`, `src/foo/bar.py`, and `src/foo/bar/baz.py`. + * `**/subdir/**/*.py` - will recursively match all `.py` files in any `subdir` directory at any depth. For example, `subdir/foo.py`, `subdir/nested/bar.py`, `parent/subdir/baz.py`, and `deep/parent/subdir/nested/qux.py`, but _not_ `foo.py` at a path that does not contain a `subdir` directory. 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: "**" From 41ae045258fc6ff7602d9b8d83a6f6caf522d6d4 Mon Sep 17 00:00:00 2001 From: hubwriter Date: Mon, 17 Nov 2025 15:59:49 +0000 Subject: [PATCH 5/6] Update response-customization.md with prompt file info (#58510) --- content/copilot/concepts/prompting/response-customization.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/copilot/concepts/prompting/response-customization.md b/content/copilot/concepts/prompting/response-customization.md index f9b2160ac431..17c180e1154e 100644 --- a/content/copilot/concepts/prompting/response-customization.md +++ b/content/copilot/concepts/prompting/response-customization.md @@ -183,6 +183,8 @@ The following examples demonstrate how to use prompt files. … ``` +For information on how to enable, create, and use prompt files, see [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions?tool=vscode#enabling-and-using-prompt-files). + {% data reusables.copilot.custom-instructions-effective %} ## Next steps From 8251ba89e880b30f80446c82ab81b743f2e944a6 Mon Sep 17 00:00:00 2001 From: "github-service-catalog[bot]" <66641770+github-service-catalog[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 09:26:08 -0800 Subject: [PATCH 6/6] Remove ownership.yaml (moved to central directory) (#58451) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>