![]() |
VOOZH | about |
We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.
Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.
Follow TNS on your favorite social media networks.
Become a TNS follower on LinkedIn.
Check out the latest featured and trending stories while you wait for your first TNS newsletter.
Technical debt is often a key drag on innovation in many software development organizations, especially in the build and test processes. As a codebase grows and complexity rises, quick fixes and legacy systems pile up, creating inefficiencies that slow down builds, increase testing times, and introduce brittle dependencies.
What starts as minor trade-offs to meet immediate goals can snowball into significant bottlenecks, making it harder to scale and iterate. Addressing this debt is crucial for software organizations aiming to maintain agility, ensuring their CI/CD pipelines remain fast, reliable, and capable of supporting rapid feature delivery.
Yet, at the same time, it often seems an intractable problem. We know we should invest, and we try to make headway, but it feels like we’re swimming upstream. Despite our investments, technical debt continues to build up.
Some have offered AI as a way out. Wouldn’t it be great to point an AI at your infra, and it would magically start to get better? As a level-headed engineer with over 20 years of experience, I’ve learned to ignore vendor hype and silver-bullet pipedreams. But it turns out that, in this case, there may be something there.
Have you heard of Agentic Workflows? This new AI approach offers incredible promise, and it’s an area I’ve been investing in substantially over the past few months, as it may offer our best chance of tackling the vast amounts of technical debt we’ve all amassed.
Agentic workflows are ones where autonomous software agents take on tasks that traditionally require human decision-making or intervention.
Key desired characteristics:
Agentic workflows promise to transform how we test and build software, but we have to start somewhere. I decided to pick a low-hanging fruit plaguing my organization to demonstrate the potential power of AI in software development pipelines.
In many organizations, ensuring complete code coverage can be daunting. How much of our codebase should be tested by automated unit tests? Developers often must balance deadlines and quality, resulting in rushed code without sufficient tests. This lack of test coverage introduces risk, as untested parts of the code might contain bugs or incompatibilities.
Where can AI help?
Traditional build tooling, CI platforms, and container engines like Docker have their place but don’t provide the required capabilities to enable us to achieve what we need by ourselves. A few years ago, I started playing with Dagger, the new pipeline-focused container engine being developed by Solomon Hykes and the early technical team behind Docker. The more time I spend with Dagger, the more I see its potential to transform how we fundamentally manage our software pipelines.
Why do I love Dagger? Because it streamlines the creation and deployment of workflows by providing an abstraction layer over complex pipeline systems. Dagger allows developers to automate and distribute tasks across environments using containers. It is instrumental in managing dependencies, containerization, and CI/CD pipelines while also allowing developers to customize their workflows through modular design. In this case, Dagger is critical in managing the infrastructure behind the agentic workflow. The system uses Dagger to create, run, and manage Docker containers encapsulating the AI’s generated code. This ensures that the code is executed in a consistent environment.
But what about Docker? We still use it, but for what it’s designed for. The generated code runs in Docker containers, allowing consistent and isolated testing environments. Dagger integrates seamlessly with Docker, making it easier to manage containerized workflows without manual oversight.
Could I have done this without Dagger? Sure, but Dagger dramatically simplifies the process of handling the dependencies. In my initial design, managing various dependencies for the AI code generation tool was cumbersome. Dagger helped reduce complexity by automatically handling dependencies at runtime.
I started by building a pilot that creates a workflow using AI to generate unit tests. The AI analyzes coverage reports and generates test cases based on uncovered code. Here’s how the process works:
Integrating a workflow into a CI pipeline allows the generated unit tests to be automatically tested whenever new code is pushed to the repository. This ensures that every code submission is validated for quality and correctness, reducing the risk of introducing bugs into production.
The key innovation here is to create a self-corrective loop, where AI-generated code is refined in each iteration. The loop works as follows:
This loop makes the system increasingly accurate over time, solving the common issues of incomplete or incorrect code generation. This pilot’s loop was used to refine the AI’s ability to generate functional unit tests.
Initially, I built this as a VS Code extension that could generate unit tests. However, I quickly saw this would make it hard to scale the extension across different development environments. Since developers in large organizations use many editors, I would need to create multiple versions of the extension to support all my developers.
A more elegant version was to leverage Dagger to create a distributed CLI that could run the AI model and generate tests without relying on a specific editor. This allowed for a more flexible solution that could be used across different tools, removing the need to build editor-specific extensions.
The potential applications of this agentic workflow are vast. Beyond generating unit tests, I see the potential to expand the system to perform other code-related tasks, such as:
Kambui plans to develop plugins for Python and other programming languages to add support for multiple programming languages, enabling more widespread use of the workflow across different projects.
The integration of AI into software development has the potential to significantly reduce the time and effort required for manual tasks like writing unit tests and performing code reviews. My early explorations have demonstrated how we can leverage off-the-shelf AI tools together with the emerging Dagger open source framework to create scalable, distributed workflows that use AI to automate and improve these processes. Implementing systems with a self-corrective loop should lead to higher code quality while reducing the testing burden on developers.
This agentic workflow is a powerful tool for today’s development teams and a glimpse into the future of AI-augmented development. We sit in an exciting time. I expect AI will transform many common tasks in our workplaces. It’s exciting to see where it might significantly improve the building and testing of the software that is critical to our companies and lives.
If you’re interested in seeing a running instance of this, you can take a look at a demo of my pilot project here: