Diary
The comfort of having a dedicated "AI thread for CI improvement" always running. A story of how a pipeline, often put off, was meticulously streamlined.

In daily development, there's a "subtle stress" that everyone has felt at least once: the CI (Continuous Integration) waiting time after creating a pull request.
After finishing writing code, you take a breath, submit a PR, and wait for review or merge. Meanwhile, tests and build pipelines run in the background. 1 minute, 3 minutes, 5 minutes, sometimes over 10 minutes... It's not uncommon to feel a sense of unease in the back of your mind: "It's a bit slow," "I feel like the cache isn't very effective," "Are we downloading the same dependencies from scratch every time?"
However, humans are strange creatures; when faced with a pile of new feature implementations or urgent bug fixes, they tend to put off CI improvements, thinking, "Well, it's working, so it's fine," or "It's not an unbearable wait, I'll fix it when I have time later."
But as an engineer, I want to state unequivocally:"Improving CI is the top priority task that should be done immediately."period.
Those few minutes of CI waiting are not just "waiting time." It's said that it takes over 15 minutes to regain an engineer's concentration (flow state) once it's broken. Every time a PR is submitted, thoughts are fragmented, context switching occurs, and the entire team's development rhythm is gradually eroded. It's like an organization continuously paying an "invisible, enormous tax (development friction)."
Let's try setting up a dedicated "thread for CI improvement."
To break that long-standing habit of procrastination, what I suddenly thought of and tried this morning was an experiment: "keeping an AI thread dedicated solely to CI improvement always running."
Separately from our usual development and design communications, we launched a new "CI improvement specialist" AI thread in a corner of our chat. Then, targeting all 8 repository groups, including our in-house business systems, legal domain, front-ends for local governments, data processing infrastructure, and infrastructure configurations, we prompted it with:
"Please inspect all CI settings across all repositories. Strictly ensure zero additional cost (0 yen), check if build caches are effective, if there are any unnecessary waiting times or bottlenecks, and tune them meticulously."
Furthermore, not content with a single suggestion, we repeatedly and thoroughly pressed the AI, asking, "Is there any more waste that can be eliminated?" and "Is there anything else we can do without increasing costs?"
Then, the AI in this dedicated thread, like a skilled craftsman in a workshop, meticulously examined the workflow definitions, build settings, and execution logs of each repository with astonishing resolution, drew up a WBS (Work Breakdown Structure), and autonomously began an intense improvement phase.
Dramatic Changes, Sharpened to Perfection, Seen in Numbers
The AI successively created patches, passed tests, launched pull requests, and merged them into the main branch. As a result,A total of 14 improvement PRs across all 8 repositorieswere all successfully merged into the main branch.
The resulting performance figures for the improvements far exceeded expectations.
| Evaluation/Improvement Metric | Before Improvement | After Improvement | Dramatic Change and Effect |
|---|---|---|---|
| ","CI/CD Overall Completion Score"," | ","55%"," | ","97% (Maximal Level)"," | Established uncompromising safety, speed, and automation across all repositories |
| ","CI/CD Related Incident Frequency"," | Several times a week | ","Zero"," | Fostered developer trust and peace of mind through stable operation |
| ","Developer Willingness to Contribute to CI/CD"," | Low | ","High"," | Increased willingness to participate in improvement activities, fostered ownership |
| ","Developer Stress with CI/CD"," | High | ","Low"," | CI/CD became a powerful ally for developers, not a burden |
| Test Verification with Remote Cache | Dozens of seconds | Only 0.4 seconds | All 14 tests pass instantly with Hermetic build introduction |
| Total Gate Verification Time for Data Infrastructure | Judgment only | 17 seconds | Fully automated verification of 6 inspection gates (schema/sensitive info, etc.) |
| PR Serialization Queue | 10-20 minutes | Completely eliminated (0 minutes) | Blocking waits eliminated by dynamic parallel control per PR |
| Job Timeout Protection | Up to 6 hours (unlimited) | Strictly cut off in 5-15 minutes | Eliminates risks of runaway processes due to external delays and late-night budget waste accidents |
The sight of green checkmarks instantly popping up on the screen is so satisfying it gives you goosebumps. The very sensation of "waiting" disappears, and the pleasure of moving to the next task without interrupting your thoughts is indescribable.
The "Blind Spots" Humans Missed and Why AI Was Able to Fix Them
Why such dramatic results? There were deep-seated blind spots that humans had overlooked for years, thinking "it just works somehow."
The Habit of Discarding Cache Themselves:
In one repository, despite having distributed caching, a clean command that completely deleted the cache before each build step habitually remained. Simply by AI discovering and correcting this, the true value of remote caching was unleashed.
Inertial OS Updates and Unnecessary Serial Execution:
Unnecessary
apt-get updatewas running, or multiple E2E tests that could run independently were dutifully executed one by one in series. Simply by splitting this into two logical parallel lanes, execution time was halved from 4 minutes to 2 minutes."False Green" and Absence of Timeouts:
Discovered blind spots where failed plan errors were suppressed and allowed to pass incorrectly, or backup scripts silently treated authentication failures as successes. Eradicated "false ALL GREEN" and established true quality assurance. Furthermore, by thoroughly deploying
timeout-minutes: 5〜15across all jobs, the fear of unlimited runner charges due to a process hang in an emergency was eliminated.Selective Testing Based on Change Differences (Predictive Test Selection):
"Cutting tests to make them faster" is putting the cart before the horse. So, AI leveraged Go's reverse dependency graph analysis and TypeScript's module dependency graph (Vitest native related) to build a mechanism that "runs only the tests affected by change differences" with pinpoint accuracy. Furthermore, when infrastructure settings (
go.modorpackage.json, CI definitions) are changed, a safety mechanism is incorporated to automatically fall back to full suite tests 100% of the time.
None of these cause fatal crashes. That's why humans overlook them and make excuses like "when I have time." However, these issues consistently eroded engineers' concentration in daily development and continuously harbored potential billing and quality risks.
Conclusion: Why We Should Improve CI Right Now
If we had tried to implement all 14 repository modifications by human hands alone, it would have taken days to weeks, or rather, it would have been eternally postponed with "let's do it next quarter." Grappling with vast YAMLs, fighting syntax errors, and sifting through mountains of logs is too mentally exhausting for humans.
But for AI, it's different.
The task of cross-comparing a large number of workflow definitions, identifying dependencies, assembling a safe patch with minimal effort, and merging it into main while clearing quality gates, is where AI shines brightest.
Let's divide the work between an "AI for feature development" and an "AI for meticulously refining environments and CI," and have the latter quietly sharpen its tools in a corner. This is the most luxurious, and**It is the most cost-effective development practice.**Indeed.
The "invisible tax of development friction" that you keep paying by neglecting CI is higher than you imagine.
If your team's CI takes several minutes, let's stop neglecting it with the thought, "It's working, so it's fine," starting today.
Set up a dedicated "AI thread for CI improvement" in a corner of your chat and tell it this:
"With zero additional cost, meticulously eliminate as much waste as possible. It should be faster and safer."
The overwhelming agility brought by a finely tuned pipeline will surely revolutionize tomorrow's development.