GitLab Duo Agentic Chat not following .gitlab/duo/chat-rules.md despite correct setup
Steps to Reproduce
-
Create the file .gitlab/duo/chat-rules.md in the project’s default branch (main).
-
Add valid markdown content containing clear rules, for example:
GitLab Duo Chat Rules & Best Practices
- Always confirm before modifying existing code.
- Always append My Name "XYZ" at the end of function docstrings.
- Never use
loguruinstead.
- Start a new Agentic Chat session using GitLab Duo (via the “+ New Chat” button or /new command).
- Ask a prompt that should trigger these rules (e.g. “Write a Python function with a docstring.”)
Expected Behavior
-
Duo Chat should acknowledge or follow the rules defined in .gitlab/duo/chat-rules.md.
-
Responses should comply with the constraints (e.g., append name, use loguru, avoid print).
Actual Behavior
-
Duo Chat ignores the custom rules and behaves as if no .gitlab/duo/chat-rules.md file is present.
-
No visible acknowledgment of rules being loaded.
-
Behavior remains unchanged even after restarting chat sessions.
Edited by Vikarsh Singh