[llvm] [GitHub] Move Copilot instructions for LLVM (PR #165763)

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 11:31:07 PDT 2025


https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/165763

GitHub allows specifying custom instructions for the GitHub Copilot reviewer [1]. Currently, we have a top level file, but GitHub supports having different instructions for different files, which requires creating an `instructions` subdirectory with multiple files and a patch it applies to.

This PR moves the top level file into a new `instructions` directory, and make it apply to the `llvm/` subdirectory. I spoke with Mircea at the Dev Meeting and that should match his original intent.

[1] https://docs.github.com/en/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review#customizing-copilots-reviews-with-custom-instructions

>From 344ad3e2c1a9fc2ab286151c1e4d9a6a82c99e95 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Thu, 30 Oct 2025 11:23:34 -0700
Subject: [PATCH] [GitHub] Move Copilot instructions for LLVM

GitHub allows specifying custom instructions for the GitHub Copilot
reviewer [1]. Currently, we have a top level file, but GitHub supports
having different instructions for different files, which requires
creating an `instructions` subdirectory with multiple files and a patch
it applies to.

This PR moves the top level file into a new `instructions` directory,
and make it apply to the `llvm/` subdirectory. I spoke with Mircea at
the Dev Meeting and that should match his original intent.

[1] https://docs.github.com/en/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review#customizing-copilots-reviews-with-custom-instructions
---
 .../llvm.instructions.md}                                     | 4 ++++
 1 file changed, 4 insertions(+)
 rename .github/{copilot-instructions.md => instructions/llvm.instructions.md} (90%)

diff --git a/.github/copilot-instructions.md b/.github/instructions/llvm.instructions.md
similarity index 90%
rename from .github/copilot-instructions.md
rename to .github/instructions/llvm.instructions.md
index 03748938700e3..3f1308f51e676 100644
--- a/.github/copilot-instructions.md
+++ b/.github/instructions/llvm.instructions.md
@@ -1,3 +1,7 @@
+---
+applyTo: llvm/**/*
+---
+
 When performing a code review, pay close attention to code modifying a function's
 control flow. Could the change result in the corruption of performance profile
 data? Could the change result in invalid debug information, in particular for



More information about the llvm-commits mailing list