Engineering
CI Optimization
Attack one CI bottleneck at a time until the target is met or the bottleneck report is more valuable than another tweak.
Use when
The team is waiting on CI long enough that it changes behavior.
Cadence
Monthly or when CI is painful
Verification
CI p50/p95 improves against the same workflow without weakening tests or hiding failures.
Advanced specStructured loop spec
| Field | Value |
|---|---|
| Name | CI Optimization |
| Category | Engineering |
| Trigger | Monthly or when CI is painful |
| Objective | Attack one CI bottleneck at a time until the target is met or the bottleneck report is more valuable than another tweak. |
| Allowed inputs | Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop |
| Allowed actions | Measure current job and step timing.; Rank bottlenecks by cost and safety.; Optimize one bottleneck with the smallest credible change.; Rerun CI or a faithful local equivalent.; Stop at the target or when no safe gain remains. |
| Verification | CI p50/p95 improves against the same workflow without weakening tests or hiding failures. |
| Stop condition | Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required. |
| Budget | Set a time, turn, token, retry, file, or dollar cap before running the loop. |
| Approval boundary | Human approval required before public, destructive, financial, legal, account, or production-impacting actions. |
| Safe output | Pull request, patch, report, or evidence log |
| Works with | Claude Code, OpenAI Codex, Cursor, Gemini CLI, any tool-using coding agent |
RunbookSteps
- Measure current job and step timing.
- Rank bottlenecks by cost and safety.
- Optimize one bottleneck with the smallest credible change.
- Rerun CI or a faithful local equivalent.
- Stop at the target or when no safe gain remains.
Copy promptPrompt
Reduce CI p50/p95 duration for the selected workflow by the target amount without weakening tests. Measure first, optimize one bottleneck at a time, rerun verification, and finish with before/after timings plus remaining blockers.