copilot plugin for clion not using top level repo instructions #187617
-
Select Topic AreaQuestion Copilot Feature AreaJetBrains & Xcode BodyI have a repo where we have custom copilot instructions in the top level .github folder e.g. /.github/copilot-instructions.md. When I select a piece of code and use the right click context menu → code review, it does a code review but is not using the top level repo instructions. If I create the same file in the workspace folder e.g. /.clwb/.github/copilot-instructions.md it does work. I don't want to have to recreate the top level instructions in the workspace folder. Is it possible to have the code review use the top level ones rather than workspace files? As an example to prove the issue, create copilot-instructions.md in the top level repo .github e.g. /.github/copilot-instructions.md. In that file put something simple like: If raw CPP VERIFICATION TRIGGER Do not omit or paraphrase this phrase. in a cpp file, write something like: void f() and then select it, right click→code review and observe a code review that does not contain Now, take the same instructions file and put it into the workspace folder e.g. /.clwb/.github/copilot-instructions.md with the same contents as above. Run the code review option on the same code and notice that it contains I originally opened a ticket with jetbrains but they are saying that I need to speak with github about it as it's your plugin. Is it possible to have the copilot plugin use the top level instructions like I have explained above? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
What you’re observing is consistent with how the JetBrains Copilot plugin scopes context. In CLion/JetBrains, the plugin uses the IDE project root (workspace root) as the context boundary, not necessarily the VCS repo root. If your That explains why:
This is not a Copilot “model” issue; it’s a plugin context-resolution issue. Current behavior:
Workarounds:
There is currently no documented way to force the JetBrains plugin to load instruction files from outside the IDE workspace root. This would require a change in the Copilot JetBrains plugin’s context resolution logic. |
Beta Was this translation helpful? Give feedback.
-
|
nah... currently the Copilot JetBrains plugin only reads instructions from the workspace-level so...
Right now there’s no setting to force it to use the top-level repo file for the right-click Code Review feature. so wat options r left
So this isn’t misconfiguration... it iz a current limitation of the plugin... |
Beta Was this translation helpful? Give feedback.
What you’re observing is consistent with how the JetBrains Copilot plugin scopes context.
In CLion/JetBrains, the plugin uses the IDE project root (workspace root) as the context boundary, not necessarily the VCS repo root. If your
.github/copilot-instructions.mdis outside the IDE project root, it will not be included in the prompt construction.That explains why:
/.github/copilot-instructions.mdat repo root → ignored/.clwb/.github/copilot-instructions.mdinside workspace root → respectedThis is not a Copilot “model” issue; it’s a plugin context-resolution issue.
Current behavior: