Chapter 5

AI-Driven Development: Automating Code Generation

AI assistants like Chat-GPT integrate well into developers' workflows and can significantly increase developer productivity. 

As more AI-powered coding assistants are embedded into development tools like GitHub Copilot it is important to understand the limitations in functionality and built-in limits for contextual understanding. Most AI assistants do not fully use platform capabilities, including the use of linters, compilers, or the execution of command-line operations. As a result, developers are often required to manually verify syntax, confirm the accuracy of AI-suggested code, execute the codebase, and review error logs, then copy and paste the code from one application environment.

Transformatic addresses these shortcomings by introducing autonomous AI agents capable of performing a range of actions directly within the code repository. These actions include editing and retrieving files, building, testing, and executing command-line interface (CLI) commands to accomplish user-defined goals. 

This integrated approach allows for the autonomous completion of complex tasks, bridging the gap between AI-assisted coding and the full utilization of platform capabilities.

Transformatic offers the following key features: 

  1. The Conversation Manager monitors and coordinates interactions between users and AI agents.
  2. The Tools Stack is designed to achieve a range of objectives related to coding and software engineering.
  3. The AI Agent Scheduler facilitates the coordination of multiple AI agents, allowing them to work in tandem towards a shared goal.
  4. The capacity to run tests and execute code via a Control Plane and Application Clusters.

AI Agent Configurations

Platform teams can utilize preset configurations or customize permissions granularly by turning specific actions on or off, tailoring Transformatic to meet their unique requirements. This customization allows users to manage the capabilities of AI agents accurately. 

During this customization phase, the platform team can determine the quantity and conduct of AI agents and outline their specific duties, permissions, and actions. For instance, a user might establish a "Developer" agent alongside a "Reviewer" agent, each designed to pursue a common goal collaboratively. After establishing the framework for rules and actions, users then articulate the specific software engineering tasks or processes to be executed by Transformatic. An example of such a task could be the generation and validation of test cases to ensure their syntactical accuracy, successful execution, and the absence of defects, which may include file editing, test suite execution, syntax verification, and bug detection.

Agent Scheduler

The Agent Scheduler is responsible for directing AI agents, each equipped with distinct personas and command capabilities, to work together towards accomplishing the goal set by the user. These agents engage in a variety of tasks through cooperative efforts. To effectively coordinate their contributions, the scheduler utilizes several collaborative strategies, including Round-Robin, Token-Based, or Priority-Based algorithms, to ascertain the sequence and method of agent participation in the task.

Specifically, scheduling algorithms include but are not limited to: 

  1. Round-robin collaboration invokes each agent sequentially, allowing each to execute a predetermined number of operations.
  2. Token-based collaboration enables an agent to undertake multiple operations until it issues a token signifying completion of its assigned tasks.
  3. Priority-based collaboration initiates agents per their prioritized order. 

The agent scheduler invokes a specific agent passing the current conversation.

Agents

Agents, including Large Language Models (LLMs) such as OpenAI's GPT-4 and more specialized Small Language Models (SLMs) designed for code generation, interact using text-based natural language. These agents are directed by the Agent Scheduler, which provides them with goals and a context of current interaction. In turn, they execute tasks defined within the Rules and Actions framework. The distinct setup of each agent plays a crucial role in collectively advancing toward the completion of the user's specified objectives.

Tools Stack

The Tools Stack within Transformatic provides a range of operators that empower Agents to perform diverse operations on the repository. These operators are designed to encapsulate complex actions, tools, and utilities into a simple command.