Copilot instructions in multi-root should apply per folder
Steps to Reproduce:
- be in a multi root workspace with several folders where each has a instructions file checked into the workspace
- do any agentic session
- note that every folders instructions is used as reference
I would argue that the instructions should be applied depending on which folder a file is generated in, similar to the applyTo pattern.
But I can be convinced otherwise if you have thought about it and feel the current behaviour is correct, but please then explain why.
//cc @digitarald @isidorn @alexdima
I would expect all to be included to give the AI an idea of what workspaces it has open; but I can see how it throws off tasks that only need to focus on one of the folders.
As we implement recursive instruction files, it might be worth exprimenting with how well this works.
I lean towards Ben's suggestion.
(not related to MR worksapce) In general we should just be inspired by claude code's approach https://www.anthropic.com/engineering/claude-code-best-practices - check out the "Create CLAUDE.md files" section.
@isidorn from the section, do you mean the recursive nature described in "You can place CLAUDE.md files in several locations"; which is also done by codex, gemini code, amp?
Yes.
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
I also think it has to be all. The agent can potentially write to all of the workspace folders.