GitLab Well Architected
Cookbook navigation
Prompts / Code Review Discussion

Code Review Discussion

Code ReviewArchitectureCode-ReviewDiscussionReviewerVerifyBeginner

Understand design decisions and tradeoffs in MRs. Get context beyond just what changed.

For GitLab Duo

prompt

I'm reviewing MR ![MERGE_REQUEST_NUMBER] and have questions about the approach.

Can you help me understand:
1. Why was [SPECIFIC PATTERN/APPROACH] chosen?
2. What alternatives were considered?
3. Are there existing patterns in our codebase for [FUNCTIONALITY]?
4. What are the testing implications of this design?
5. How does this interact with [RELATED SYSTEM]?

Show me relevant code examples from our repository if available.

Use the prompt

Share the relevant diff and design discussion. Duo can explain the visible choices, but questions about why an author chose an approach may need their answer rather than an inference from the code.