Skip to content

Draft: Add GitLab Duo Chat rules for efficient code navigation

What does this MR do?

This MR adds a comprehensive .gitlab/duo/chat-rules.md file that provides GitLab Duo Chat with structured navigation patterns for the GitLab codebase. The goal is to minimize scanning time and improve response accuracy when working with the repository.

Why was this change made?

Currently, GitLab Duo Chat needs to scan the repository structure extensively to understand where different types of code are located. This document provides a roadmap that should help the AI assistant:

  • Navigate directly to relevant code locations
  • Understand the logical organization of the codebase
  • Find related files more efficiently (models, controllers, services, tests, etc.)
  • Distinguish between Community Edition (CE) and Enterprise Edition (EE) code

What are the relevant issue numbers?

This addresses the need for more efficient code navigation in GitLab Duo Chat interactions.

Documentation

The document itself serves as documentation for:

Repository Structure Overview

  • Core application structure (app/, ee/, lib/, config/, db/, spec/)
  • Enterprise Edition organization
  • Testing and QA structure

Navigation Patterns

  • Finding models, controllers, services, workers
  • Locating API endpoints (REST and GraphQL)
  • Frontend code organization
  • Configuration files

Search Strategies

  • By feature domain (Issues, Merge Requests, CI/CD, etc.)
  • By file patterns and naming conventions
  • Enterprise Edition priority handling

Key Architectural Files

  • Important base classes and configuration files
  • Dependencies and gem structure

Testing

This is a documentation-only change that doesn't require functional testing. The effectiveness can be measured by improved GitLab Duo Chat response times and accuracy when navigating the codebase.

Checklist

  • Added comprehensive navigation patterns
  • Covered both CE and EE code organization
  • Included search strategies by domain and file patterns
  • Documented key architectural files
  • Created as draft MR for review

Merge request reports

Loading