How AutoDev’s New MPP CLI Turns AI Agents into Self‑Testing, Multi‑Platform Tools
The article explains how the new AutoDev MPP architecture and its CLI, built on MPP Core, solve testing difficulties of previous IntelliJ‑based agents by tightly binding UI events, leveraging AI‑generated prompts, iteratively constructing a TUI/CLI, automating test framework generation, and integrating CI/CD for robust, portable AI‑driven development.
Background
AutoDev introduced a Multiplatform Paradigm (MPP) architecture and built a command‑line interface (CLI) on top of the MPP core. The goal is to replace the previous IntelliJ‑based agents, which were tightly coupled to IDE events and could not be exercised in CI/CD pipelines.
Problems with the previous generation
Agents were bound to UI events such as Action, ToolWindow and Editor.
Context objects (Project, Editor, Selection) depended on IDE core classes.
Complex dependencies such as ASTs and module graphs were not isolated.
The runtime required the IDE, making reproducible tests impossible in headless environments.
Two‑stage prompt for AI agents
The prompt follows the pattern used in the earlier Vibe Coding agents: first generate a list of tool calls from an error message, then produce the fixing code. The prompt defines the following built‑in tools that the LLM may invoke:
read‑file write‑file str‑replace list‑dirExample prompt fragments (original Chinese text retained for completeness):
我正在编写一个自动化的 xx 工具,采用“两阶段 AI 调用模式”。 第一阶段:根据错误信息生成工具调用,以决定需要读取哪些文件。 第二阶段:根据读取的文件内容和错误信息,生成实际的修复代码。CLI / TUI construction
The CLI is a terminal UI written in Node.js. It uses the ink library (GitHub: https://github.com/vadimdemedes/ink). The typical command line to build and run the CLI is:
cd mpp‑ui && npm run build:ts && node dist/index.js \
--path /Users/phodal/IdeaProjects/untitled \
--task "Create a hello world"This launches the AutoDev coding agent, which registers built‑in tools, discovers additional tools from the file system or remote repositories, and starts processing the task.
Iterative architecture
The CLI output is fed back as the next iteration’s input, allowing the agent to observe logs, modify code, and repeat until the desired state is reached or the process is aborted. Sample log lines illustrate tool registration and sub‑agent initialization:
INFO:[CodingAgent] Initializing ToolRegistry with configService: true INFO:[CodingAgent] Enabled builtin tools: read‑file, write‑file, edit‑file, grep, glob, shell, code‑agent, ask‑agent, web‑fetch INFO:[ToolRegistry] 🔧 Registered 8/8 built‑in tools 🤖 Registered SubAgent: code‑agentAutomated test‑framework generation
Using the same prompt logic, an AI‑driven test framework for the CLI itself is generated. The framework is a TypeScript project with the following structure:
autocrud-mpp
├── analyzers
│ ├── CodeChangeAnalyzer.ts
│ ├── PromptAnalyzer.ts
│ └── ToolCallAnalyzer.ts
├── cli.ts
├── core
│ ├── TestCase.ts
│ ├── TestEngine.ts
│ └── TestResult.ts
├── index.ts
├── reporters
│ └── ConsoleReporter.ts
├── scenarios
│ └── ScenarioBuilder.ts
└── validate‑framework.cjsTypical test scenarios include:
Adding a Redis cache to a Spring Boot project (expects at least one read‑file and two write‑file calls).
Extending a BlogPost entity with video fields (expects multiple reads and writes, modification of BlogPost.java).
Implementing a full JWT authentication system (modifies build.gradle.kts, creates User.java and JwtUtil).
CI/CD integration and quality gates
The CLI can be embedded in a GitHub Actions workflow. The workflow configures a DEEPSEEK_TOKEN secret and runs the CLI, validates the output, and produces a quality report. Example YAML fragment (attributes removed, only plain keys are kept):
active: my-deepseek
configs:
- name: my-deepseek
provider: deepseek
apiKey: sk‑xxx
model: deepseek‑chatWhen the workflow runs, the agent executes the task, checks the generated test results, and fails the job if the quality threshold (e.g., 80 %) is not met.
Conclusion
The new AutoDev MPP CLI demonstrates a shift from “AI writes code” to “AI verifies code” and finally to “AI generates tests for itself.” The architecture provides three core capabilities:
Verifiable generation : every AI action is logged with context, making the output traceable.
Evolving test framework : the framework is auto‑generated, self‑maintained, and continuously improved.
Portable validation pipeline : the same CLI runs on desktop, mobile, and other platforms, unifying the verification process.
Source code is available at https://github.com/unit-mesh/auto-dev.
phodal
A prolific open-source contributor who constantly starts new projects. Passionate about sharing software development insights to help developers improve their KPIs. Currently active in IDEs, graphics engines, and compiler technologies.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
