[UX - Duo Chat] Custom rules for Duo
Background
As part of &16938, we need to design an experience for users to create, manage, and apply custom rules. This feature will allow development teams to align Duo's outputs with team standards and best practices, reducing the need for manual corrections and modifications.
As the Code Review team is ready to consume these rules first, we will focus this iteration on project level rules that apply to Code Review to start. This will expand to other features in the future.
Problem to solve
Development teams report several key challenges:
- Individual preferences: Developers need to repeatedly correct or rephrase Duo outputs to match their personal coding style and current project needs
- Team standards: Teams struggle to ensure consistent adherence to coding standards and best practices across members when using AI assistance
Both challenges result in wasted time, diminished productivity, and reduced trust in AI-assisted development.
Intended users
- Project maintainers
- Developers
User experience goals
We need a clear way for users to do the following:
Maintainers:
- Create and edit custom rules for GitLab Duo at the project level
- Apply rules - specifically to code review contexts first, with expansion to other contexts later
- Enable/disable rules for specific contexts
- Delete and edit rules
Non-Maintainers:
- View rules
Proposal
Project-Level Rule Creation
- Provide users with an interface for creating and editing rules at the project level, with clear guidance on effective rule formulation.
- Include templates or examples in the docs to help users understand the appropriate level of detail.
More details can be found in the design tab:
- UI with existing rules: #532457[Existing_Rules_-_Custom_Rules.png]
- Deleting a rule: #532457[Delete_a_Rule_-_Custom_Rules.png]
- View only mode for non-maintainers: #532457[View_Only_Mode_-_Custom_Rules.png]
- UI with no rules: #532457[No_Rules_-_Custom_Rules.png]
Open Questions
- Do these rules live in GitLab Duo Settings or Under Merge Requests as the first iteration?
- More details here: #532457 (comment 2495200880)
Documentation
- Create documentation explaining how project-level rules work
- Provide examples or templates of effective rules
- Create guides for project administrators on implementing effective rule sets
Edited by Emily Bauman