Enhance GitLab Duo + Q with full repository context for pipeline failure analysis and code assistance
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=570335) </details> <!--IssueSummary end--> ### Release notes GitLab Duo + Q now provides enhanced repository context access for pipeline failure analysis and code assistance, expanding beyond the previous 100kb limitations to deliver more accurate and actionable AI-powered suggestions. ### Problem to solve As a developer using GitLab CI/CD pipelines, I want GitLab Duo + Q to have access to my complete repository context when analyzing pipeline failures and providing code assistance, so I can receive more accurate and actionable suggestions without needing to copy errors to external AI tools. Currently, GitLab Duo + Q has significant context limitations: - Triage assistant for pipeline failures is limited to 100kb of job log context - Chat assistant is limited to the currently open file (100kb context) - No access to repository code/scripts for comprehensive analysis This forces users to copy errors to more context-aware AI tools (like Amazon Q in IDE) for effective troubleshooting. ### Intended users * [Sasha (Software Developer)](https://handbook.gitlab.com/handbook/product/personas/#sasha-software-developer) * [Delaney (Development Team Lead)](https://handbook.gitlab.com/handbook/product/personas/#delaney-development-team-lead) * [Priyanka (Platform Engineer)](https://handbook.gitlab.com/handbook/product/personas/#priyanka-platform-engineer) * [Simone (Software Engineer in Test)](https://handbook.gitlab.com/handbook/product/personas/#simone-software-engineer-in-test) ### User experience goal The user should be able to use GitLab Duo + Q to analyze pipeline failures and receive code assistance with full repository context, eliminating the need to switch to external AI tools for comprehensive analysis. ### Proposal Enhance GitLab Duo + Q to provide repository-wide context access: 1. **Pipeline Failure Analysis**: When a pipeline fails, GitLab Duo + Q should access relevant repository files (CI/CD configs, scripts, source code) to provide comprehensive failure analysis 2. **Code Chat Enhancement**: Expand chat context beyond single files to include related repository files and project structure 3. **Contextual Suggestions**: Leverage full repository understanding to provide more accurate suggestions and solutions User journey: 1. User encounters pipeline failure 2. GitLab Duo + Q analyzes failure with access to job logs, CI/CD configuration, and relevant source code 3. User receives comprehensive analysis and actionable suggestions 4. User can continue conversation with full repository context available ### Further details **Use cases:** - Pipeline fails due to configuration issues - AI can analyze .gitlab-ci.yml and related scripts - Build failures - AI can examine source code, dependencies, and build configurations - Test failures - AI can review test files, source code, and test configurations - Deployment issues - AI can analyze deployment scripts and infrastructure code **Benefits:** - Reduced context switching to external AI tools - More accurate failure analysis and suggestions - Improved developer productivity - Better adoption of GitLab's integrated AI features ### Permissions and Security Repository access should respect existing GitLab permissions: * [ ] Guest (10) members: No additional access beyond current file viewing permissions * [ ] Reporter (20) members: Access to repository files they can already view * [ ] Developer (30) members: Full repository context for projects they have access to * [ ] Maintainer (40) members: Full repository context for projects they maintain * [ ] Owner (50) members: Full repository context for owned projects Security considerations: - AI context should respect branch permissions and file access controls - Private repository content should remain within GitLab's security boundary - Consider data retention policies for AI context processing ### Documentation - Update GitLab Duo + Q documentation to reflect enhanced context capabilities - Document any new configuration options for repository context scope - Update troubleshooting guides to reference enhanced AI capabilities ### Availability & Testing **Test coverage needed:** - Unit tests for repository context retrieval and processing - Integration tests for AI analysis with expanded context - End-to-end tests for pipeline failure analysis workflows - Performance tests for context processing with large repositories **Quality considerations:** - Monitor AI response quality with expanded context - Ensure context processing doesn't impact GitLab performance - Test with various repository sizes and structures ### Available Tier * Ultimate ### Feature Usage Metrics - Number of GitLab Duo + Q interactions with expanded context - User satisfaction scores for AI suggestions - Reduction in external AI tool usage for GitLab-related queries - Pipeline failure resolution time improvements ### What does success look like, and how can we measure that? **Success metrics:** - Increased accuracy of AI suggestions for pipeline failures - Reduced user reports of needing external AI tools - Higher GitLab Duo + Q adoption rates - Improved user satisfaction scores **Acceptance criteria:** - GitLab Duo + Q can access repository files when analyzing pipeline failures - Chat interface provides repository-wide context for code assistance - Performance impact remains within acceptable limits - Security and permissions are properly maintained ### What is the type of buyer? Development teams and organizations using GitLab Ultimate who want enhanced AI assistance without external dependencies. This targets Ultimate tier customers who already have access to GitLab Duo + Q and value advanced AI capabilities. ### Is this a cross-stage feature? Yes, this feature spans multiple stages: - **Verify** (CI/CD pipeline analysis) - **Create** (code assistance and chat) - **AI-powered** (core AI functionality enhancement) ### What is the competitive advantage or differentiation for this feature? This feature would differentiate GitLab by providing truly integrated AI assistance that understands the complete project context, reducing the need for external AI tools and keeping the entire development workflow within GitLab. ### Links / references
issue