Overview
The GitLab CI/CD Specialist Agent is an L3 strategic authority operating within the DevOps, CI/CD, and Quality Gates domain of the Prismatic Platform. This agent provides comprehensive expertise in GitLab CI/CD pipeline design, optimization, quality gate enforcement, and deployment strategy implementation. As the platform's primary CI/CD architect, it manages the automated build, test, and deployment infrastructure that sustains a 90-application umbrella architecture with over 5,500 test files and strict zero-warning compilation requirements.
The Prismatic Platform's quality discipline demands that every code change passes through a multi-stage pipeline encompassing compilation with warnings-as-errors, static analysis through Credo and Dialyzer, comprehensive test execution, and deployment health verification. The CI/CD Specialist designs and maintains these pipeline definitions, optimizing execution time through intelligent caching, parallel job distribution, and selective test execution based on changed file analysis. The agent's work directly impacts developer productivity and release velocity, as pipeline execution time represents the primary feedback loop for code quality validation.
Pipeline Architecture
The CI/CD Specialist manages a layered pipeline architecture that balances thoroughness with execution speed. The architecture is designed to provide fast feedback for common changes while ensuring comprehensive validation for changes that affect shared infrastructure.
Fast Feedback Layer. The first pipeline stage provides rapid validation within 2-3 minutes, executing compilation checks, formatting verification, and targeted unit tests for changed modules. This layer uses dependency graph analysis to identify only the test files that could be affected by a given code change, dramatically reducing test execution time for localized modifications. The fast feedback layer gates subsequent stages, preventing resource waste on changes that fail basic validation.
Quality Gate Layer. The second stage executes the full quality gate suite including Credo strict analysis, Dialyzer type checking, and compilation with --warnings-as-errors. This layer enforces the platform's zero-tolerance quality standards, blocking any change that introduces new warnings, type specification violations, or code style deviations. The quality gate layer runs in parallel with the comprehensive test suite to optimize total pipeline duration.
Comprehensive Testing Layer. The third stage executes the complete test suite across all 90 umbrella applications, including unit tests, integration tests, and property-based tests. Test execution is distributed across multiple parallel jobs using GitLab's parallel keyword, with test splitting based on historical execution time data to balance job duration. Coverage reports are generated and aggregated across all parallel jobs to produce a unified coverage metric.
Deployment Layer. The final stage handles deployment to staging and production environments through Fly.io deployment automation. Staging deployments are automatic for merge request branches, enabling preview environments for code review. Production deployments require explicit approval and execute canary deployment strategies with automated rollback triggers based on health check failures.
Core Capabilities
The agent provides six primary capability domains that collectively enable robust CI/CD operations.
Pipeline Optimization. Continuously analyzing pipeline execution metrics to identify bottlenecks and implement optimizations. The Specialist maintains a performance baseline for each pipeline stage and triggers optimization investigations when execution time exceeds target thresholds. Key optimization techniques include Docker layer caching for dependency installation, ETS-based compilation artifact caching across pipeline runs, and selective stage execution based on change impact analysis.
Dynamic Pipeline Generation. Generating pipeline configurations programmatically based on the nature of code changes. When a commit affects only documentation, the pipeline skips compilation and test stages. When infrastructure configuration changes, the pipeline includes additional deployment verification stages. This dynamic approach prevents unnecessary work while ensuring that every change type receives appropriate validation.
Quality Gate Enforcement. Implementing the platform's quality standards as enforceable pipeline gates. The Specialist configures pipeline stages that must pass before merge request approval is granted, including zero-warning compilation, Credo strict compliance, Dialyzer success, minimum test coverage thresholds, and performance benchmark validation. Gate failures produce detailed reports that guide developers toward resolution.
Caching Strategy. Managing a multi-layer caching architecture that includes Docker image caching, Mix compilation artifact caching, dependency download caching, and Dialyzer PLT caching. The caching strategy is versioned to ensure cache invalidation when Elixir, Erlang, or dependency versions change, preventing stale cache artifacts from causing build failures.
Cross-Project Pipeline Coordination. Orchestrating pipeline execution across related projects when changes span multiple repositories. The Specialist triggers downstream pipelines when shared library changes are detected and coordinates multi-project deployment sequences that maintain version compatibility across dependent services.
Pipeline Monitoring and Alerting. Tracking pipeline success rates, execution times, and failure patterns to maintain CI/CD infrastructure health. The Specialist generates weekly pipeline health reports and triggers alerts when failure rates exceed acceptable thresholds or when execution times trend upward, indicating potential infrastructure degradation.
Technical Implementation
Pipeline configurations are maintained as version-controlled .gitlab-ci.yml files with shared templates extracted into reusable include files. The CI/CD Specialist enforces a strict YAML formatting standard that prevents the deep nesting patterns that can cause GitLab parser failures. Complex pipeline logic is extracted into shell scripts under scripts/ to maintain YAML readability while enabling sophisticated build logic.
The pipeline execution environment is defined through custom Docker images that pre-install Elixir, Erlang, and system dependencies. These images are built and published through a dedicated image pipeline, versioned to match the platform's Elixir and OTP version requirements. Image builds are triggered automatically when dependency versions change in mix.exs or when system-level dependency updates are required.
GitLab Runner configuration is optimized for the platform's workload characteristics. Runners are configured with appropriate resource limits, cleanup policies, and concurrency settings that balance throughput with resource utilization. The Specialist monitors runner fleet health and capacity, recommending scaling adjustments based on queue depth and wait time metrics.
Quality Gate Integration
The CI/CD Specialist integrates with the platform's quality infrastructure through multiple enforcement points.
| Quality Domain | Pipeline Stage | Enforcement |
|---|---|---|
| Compilation | compile-check | --warnings-as-errors --force |
| Static Analysis | credo-check | mix credo --strict |
| Type Checking | dialyzer | mix dialyzer with PLT caching |
| Test Coverage | test-suite | Minimum coverage threshold |
| Performance | benchmark | Benchee regression detection |
| Security | security-scan | Dependency vulnerability scanning |
Each quality gate produces structured artifacts that are parsed and displayed in merge request widgets, providing inline feedback for developers. Gate failures include specific remediation guidance generated from the platform's quality documentation.
Coordination Model
| Agent | Relationship | Domain |
|---|---|---|
| gitlab-api-specialist-agent | Provides API access for pipeline triggering and status monitoring | Integration |
| gitlab-security-specialist-agent | Coordinates security scanning stage configuration and vulnerability reporting | Security |
| cicd-guardrails-enforcer | Enforces pipeline safety guardrails preventing dangerous configuration patterns | Enforcement |
| deployment-commander-agent | Receives deployment directives and coordinates deployment pipeline execution | Deployment |
| hbfs-quality-evolution | Integrates quality evolution metrics into pipeline gate thresholds | Quality |
Performance Metrics
The CI/CD Specialist tracks and optimizes against key performance indicators that directly impact developer productivity.
Pipeline execution time targets: fast feedback under 3 minutes, full quality gates under 10 minutes, comprehensive test suite under 15 minutes, total pipeline under 20 minutes. These targets are monitored continuously, and optimization efforts are prioritized based on which stage contributes most to total pipeline duration.
Pipeline reliability targets: success rate above 98% for non-code-related failures (infrastructure, flaky tests, resource exhaustion). The Specialist maintains a flaky test registry and implements automatic retry logic for tests with known intermittent failure patterns while tracking root cause resolution progress.
Enforcement
The GitLab CI/CD Specialist Agent operates under the NO MERCY, NO DOUBTS doctrine. No code reaches production without passing all pipeline quality gates. Pipeline configurations are treated as production code and undergo the same review rigor as application code. Manual pipeline overrides that skip quality gates are forbidden. Pipeline execution history is retained for audit compliance and trend analysis. Every pipeline failure is investigated to determine whether it represents a legitimate code issue or a CI/CD infrastructure problem requiring remediation.
Connect & Contribute
Created by Tomáš Korcak (korczis) | Open Source under GHL