Draft: docs: add AGENTS.md documentation
Relates to issue #584017
Created with Duo: Developer Flow in Session ID: 1404201
Changes
This MR implements comprehensive documentation for AGENTS.md custom instructions and creates a unified overview of all GitLab Duo customization options.
1. Updated Configuration Paths
- Updated
doc/user/gitlab_duo_chat/agentic_chat.mdto use new user configuration directory paths:- macOS/Linux:
~/.gitlab/duo/chat-rules.md(previouslyglab-cli) - Windows:
%APPDATA%\GitLab\duo\chat-rules.md(previously%LOCALAPPDATA%\glab-cli)
- macOS/Linux:
2. Added AGENTS.md Documentation
- Created comprehensive AGENTS.md section in
doc/user/gitlab_duo_chat/agentic_chat.mdincluding:- Introduction explaining IDE-only support
- Three levels of AGENTS.md files (user-level, workspace-level, subdirectory-level)
- Clear explanation of how Chat combines instructions from multiple files
- Supported environments subsection (VS Code, JetBrains, Visual Studio, Duo CLI)
- Version numbers marked as "TBD - to be confirmed with engineering team"
- Practical examples for 4 diverse use cases:
- Beginner-friendly explanations
- Team coding standards
- Monorepo-specific context
- Security-focused review guidelines
- Comparison table between AGENTS.md and chat-rules.md with precedence rules
3. Created Unified Customization Overview
- Created new file:
doc/user/gitlab_duo/customize_duo.mdwith:- Introduction to all customization options
- Decision matrix table comparing AGENTS.md vs chat-rules.md vs mr-review-instructions.yaml
- Precedence rules section (5-level hierarchy)
- Quick start guides for different use cases
- Best practices section
- Related topics links
- Proper metadata and history (introduced in GitLab 18.8)
4. Added Navigation and Cross-Links
- Added "Customizing GitLab Duo" section to
doc/user/gitlab_duo/_index.md - Added cross-reference links in
doc/user/gitlab_duo_chat/agentic_chat.md:- After "Create custom rules" section
- After "Create AGENTS.md instruction files" section
- Added cross-reference in
doc/user/project/merge_requests/duo_in_merge_requests.mdafter best practices
5. Documentation Structure
All documentation follows GitLab's established patterns:
- Proper metadata (stage, group, info, title)
- History sections with GitLab issue/MR links
- Consistent formatting and structure
- Cross-linking for discoverability
Notes
Tasks 12-13 regarding Duo CLI documentation were skipped as the GitLab CLI documentation has been moved to an external site (https://docs.gitlab.com/cli/) and is not available in this repository.
Edited by Falko Sieverding