Create Stage Trigger Expansion for GitLab Duo Agent Platform
### Release notes Expand GitLab Duo Agent Platform trigger coverage across Code Review and Source Code Management workflows to drive AI adoption, increase credit consumption, and establish competitive differentiation through autonomous workflow automation. This initiative delivers systematic trigger development across merge request and repository lifecycle events, enabling organizations to automate review assignment, conflict resolution, project setup, and compliance enforcement. ### Problem to solve As a **Development Team Lead**, I need comprehensive AI workflow automation across the software development lifecycle, so I can reduce manual overhead, accelerate delivery velocity, and maintain quality standards while maximizing value from our GitLab Duo Agent Platform investment. **Current gap**: GitLab Duo Agent Platform currently supports only 4 trigger types (mention, assign, assign reviewer, pipeline events), limiting DAP adoption and credit consumption to basic interactions. This creates a strategic opportunity for GitLab to enable more comprehensive workflow automation powered by DAP across the entire development lifecycle. **Business impact**: Each new trigger represents additional credit consumption touchpoints and strengthens GitLab's platform differentiation against coding-only AI assistants. ### Intended users Primary: * [Delaney (Development Team Lead)](https://handbook.gitlab.com/handbook/product/personas/#delaney-development-team-lead) - Needs workflow automation to scale team productivity * [Sasha (Software Developer)](https://handbook.gitlab.com/handbook/product/personas/#sasha-software-developer) - Benefits from intelligent assignment and automated setup * [Priyanka (Platform Engineer)](https://handbook.gitlab.com/handbook/product/personas/#priyanka-platform-engineer) - Requires automated compliance and governance * [Dakota (Application Development Director)](https://handbook.gitlab.com/handbook/product/personas/#dakota-application-development-director) - Seeks ROI from AI platform investments Secondary: * [Amy (Application Security Engineer)](https://handbook.gitlab.com/handbook/product/personas/#amy-application-security-engineer) - Benefits from automated policy enforcement * [Cameron (Compliance Manager)](https://handbook.gitlab.com/handbook/product/personas/#cameron-compliance-manager) - Needs automated governance validation ### User experience goal Users should be able to configure intelligent automation across their entire development workflow through simple DAP trigger configuration, experiencing autonomous problem-solving (conflict resolution, reviewer assignment, project setup) rather than just notifications, while consuming credits proportional to automation value delivered. ### Proposal **Phase 1: Highest-Value Triggers (Q1-Q2 2026)** _Code Review:_ - **Merge Conflict Detected**: Agent autonomously resolves conflicts, posts explanation, requests human review for complex cases - **Code Pushed**: Incremental review on new changes with security scanning and optimization suggestions _Source Code Management:_ - **Project Created**: Zero-touch project setup with security policies, branch protection, CI/CD templates - **Default Branch Changed**: Update configurations across CI/CD, documentation, and integrations **Phase 2: Expanded Automation Coverage (Q2-Q3 2026)** _Code Review:_ - **MR Created**: Auto-populate descriptions, assign optimal reviewers, validate standards compliance - **Draft Ready**: Intelligent reviewer assignment with workload balancing and timezone optimization _Source Code Management:_ - **Branch Rules Configured**: Validate against organizational security policies, suggest enhancements - **Repository Analysis**: Multi-branch push analysis, sensitive data detection, quality metrics **Future Iterations:** - Release Management: Auto-generate release notes, validate semantic versioning, deployment readiness - Governance Events: Project transfer validation, settings compliance, archival coordination - Advanced review triggers: Approval removed, discussions resolved, mergeable status changes **Technical Approach:** 1. Extend `EVENT_TYPES` enum in `ee/app/models/ai/flow_trigger.rb` 2. Add EventStore subscriptions for existing events (conflicts, branch changes) 3. Create service hooks for new trigger points (project creation, protection changes) 4. Develop specialized agents: Conflict Resolution Agent, Project Setup Agent, Policy Enforcement Agent 5. Build credit consumption tracking and telemetry for trigger effectiveness measurement **Acceptance Criteria:** - All proposed triggers successfully execute with \<5% failure rate - Agent actions respect existing permissions and approval workflows - Credit consumption tracking accurately reflects trigger usage - Trigger telemetry enables data-driven optimization decisions ### Documentation - Update DAP triggers documentation with new event types and agent capabilities - Create setup guides for intelligent reviewer assignment and conflict resolution workflows - Document credit consumption patterns for budget planning - Add troubleshooting guides for common trigger configuration issues - Update permissions documentation for trigger-specific access controls ### Availability & Testing **Risk Assessment**: Medium - New trigger points increase system load and require careful error handling for failed agent executions. **Test Coverage**: - **Unit tests**: New event type validation, trigger condition logic, agent invocation paths - **Integration tests**: End-to-end trigger execution with mock agent responses, EventStore event handling - **End-to-end tests**: Complete workflow scenarios including credit consumption and audit trails **Performance Considerations**: - Rate limiting for high-frequency triggers (code pushed, repository analysis) - Async agent execution to prevent blocking user workflows - Circuit breaker patterns for external LLM service failures ### Feature Usage Metrics **Adoption & Configuration:** - Trigger Configuration Rate: % of eligible projects with each trigger type enabled - Target: Achieve 30% trigger adoption rate across eligible Ultimate tier projects within 6 months **Automation Effectiveness:** - Agent Success Rate: % of trigger invocations resulting in successful autonomous actions vs. human escalation - Target: 60% of merge conflicts resolved automatically without human intervention - Target: 40% reduction in time from MR creation to first review assignment **Platform Value & Consumption:** - Credit Consumption Pattern: Average credits consumed per trigger type, utilization against allocated budgets - Target: 25% increase in DAP credit consumption within 6 months of GA - Workflow Completion: Full automation rate vs. partial assistance for complex scenarios **Time to Value:** - Reduction in manual task completion time (reviewer assignment, conflict resolution, project setup) - User satisfaction scores with automated workflow assistance ### What does success look like, and how can we measure that? Success means DAP becomes essential to daily development workflows through autonomous problem-solving rather than just assistance. We measure this through increased trigger adoption, higher credit consumption from valuable automation, and measurable time savings that justify continued Ultimate tier investment. ### What is the competitive advantage or differentiation for this feature? **Platform Integration**: GitLab's triggers leverage full SDLC context (issues, pipelines, security findings) for intelligent decision-making across the entire development lifecycle. **Autonomous Problem-Solving**: Competitors provide coding assistance; GitLab delivers workflow automation that solves bottlenecks (conflict resolution, reviewer assignment) beyond code generation. **Enterprise-Grade Governance**: Trigger automation respects existing approval rules, branch protections, and compliance requirements - critical for enterprise adoption and regulatory compliance. **Unified Platform Value**: Each new trigger reinforces GitLab's "one application" positioning by demonstrating AI value across planning, coding, testing, security, and deployment rather than isolated point solutions. ### Links / references **Technical Documentation**: - [Source Code GitLab Duo Agent Platform Triggers Analysis](https://docs.google.com/document/d/1lnQXwqwKp8_xWh-mjS6fOeK0I_UDgRiSTu8xUFaqJGw/edit) - [Code Review GitLab Duo Agent Platform Triggers Analysis](https://docs.google.com/document/d/1SQefDD3b651iJNp0qDLErlFxZqeNquRGhdgxTYfqDok/edit)
epic