[Agentic Chat] [Custom rules] - enhance rule resolution

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem

Once we release [Agentic Chat] Create custom rules - first iter... (#550743 - closed), we will include rules defined in .gitlab/rules/chat.md with every agentic chat session.

The single file for rules is a good first iteration but it doesn't give enough flexibility (e.g. user vs. team rules).

Solution

This issue is to explore more complex rule resolution like:

It would be cool if chat could also be a directory, in which case all md files inside are concatenated together and included. The reason being that a project could then create a chat/styleguide.md (or whatever) file that's managed by source control, and individual engineers could add their own (non git managed) chat/custom-talk-like-an-aussie.md rules.

(or instead of a directory, any chat*.md file could be included by convention, or explicitly allow a chat.custom.md or whatever)

By having only a single file it would mean individuals would need to juggle unstaged changes in that file if they want to add their own non-project managed custom instructions.

Suggested by @elwyn-gitlab

and

For example, linking to Chat Rules from the menu or auto adding the user's personal chat rules to .gitignore (if we don't want it committed to the repo)

Described in [VS Code] Add Duo Chat rules (gitlab-vscode-extension#1837 - closed) and recommended by @tvanderhelm

Edited by 🤖 GitLab Bot 🤖