CIprompt onlyMedium

Pipeline Speed Optimizer

This loop automates the optimization of CI pipelines by continuously analyzing build metrics, identifying performance bottlenecks, and applying targeted optimizations to reduce overall pipeline duration.

← all loops
CIoptimizationperformanceautomationbuildpipeline

Goal

Reduce CI duration by optimizing pipeline steps through iterative analysis and improvements

How to Run

Run this loop in your preferred AI coding agent to automatically optimize CI pipeline performance through iterative metric analysis and targeted optimizations

  1. 01

    Start Loop

    Initiate the loop by providing the kickoff prompt to your AI coding agent

  2. 02

    Analyze Metrics

    Review current pipeline performance metrics including step durations, resource usage, and bottlenecks

  3. 03

    Apply Optimizations

    Implement identified optimizations such as caching, parallelization, or step reordering

  4. 04

    Validate Changes

    Ensure optimizations don't break existing functionality while measuring actual performance gains

  5. 05

    Iterate Until Complete

    Repeat the process up to 10 times or until build time meets target threshold

Workflow Steps

  1. 01

    Analyze Current Pipeline Metrics

    Examine build logs, step timings, and resource utilization to identify the longest-running or most resource-heavy pipeline stages

  2. 02

    Identify Optimization Opportunities

    Locate specific areas for improvement such as redundant steps, missing caching, sequential operations that could be parallelized, or unnecessarily heavy dependencies

  3. 03

    Implement Targeted Optimizations

    Apply changes like adding build caches, splitting/combining steps, reducing dependencies, or restructuring pipeline logic to improve performance

  4. 04

    Run Pipeline Check

    Execute the 'pipeline metrics' command to measure the impact of applied optimizations on overall build duration

  5. 05

    Assess Results and Iterate

    Compare new metrics against previous runs and target threshold, then decide whether to continue optimizing or exit the loop

Kickoff Prompt

Start the "Pipeline Speed Optimizer" loop.

Goal: Reduce CI duration by optimizing pipeline steps through iterative analysis and improvements
Max iterations: 10
Between iterations run: pipeline metrics
Exit when: Build time below target duration threshold


Create a Pipeline Speed Optimizer loop to reduce CI duration. Analyze current pipeline metrics, identify performance bottlenecks, and apply optimizations such as caching, parallelization, and step reordering. Run 'pipeline metrics' to measure progress and continue iterating up to 10 times until build time is below target threshold.

Self-pace this loop. After each iteration, run `pipeline metrics` and evaluate the output, and only continue if the exit condition is not met (Build time below target duration threshold). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.

Guardrails

hardcoded
  • ·Maintain test coverage and passing status throughout optimizations
  • ·Use small, focused changes to isolate performance impacts
  • ·Validate each optimization change individually before proceeding
  • ·Include rollback plan for any changes that cause performance degradation
  • ·Ensure changes work across all supported environments/platforms

Flow Diagram

rendering…

Related loops — CI