Skip to main content

AutoDev 1.4 Scaling AI-Assisted Development

· 4 min read

Over the past two months, as Thoughtworks rolled out large-scale AI-assisted software delivery (AI4SoftwareDelivery) internally - involving thousands of Thoughtworkers across different roles and regions globally, along with dozens of internal sharing sessions.

We've incorporated more new features into AutoDev to continuously explore how to better assist teams in improving efficiency within IDEs. As the current best open-source AI-assisted programming tool in China, we've introduced several interesting features in AutoDev 1.4.0 to explore scalable AI-driven development efficiency improvements.

AutoDev GitHub: https://github.com/unit-mesh/auto-dev

Team Prompts: Codified Prompts for Team Dissemination

Responding to our colleagues' enthusiasm for TDD (Test-Driven Development), specifically the #49 issue requesting "Support TDD mode to generate implementations based on specified tests", we developed the Team Prompts feature. Now you can directly write prompts in your code repository, and AutoDev will read these prompts to enhance AI-assisted functionality.

Untitled

This means:

  • Share prompts across teams rather than maintaining personalized configurations
  • Different teams within your organization can share their AI experiences
  • No need for custom IDE requirements - just provide interface capabilities

Team Prompts Example

Let's look at a simple example. First create (or configure) a Prompt directory in your repository, then write your prompts. For TDD scenarios:

  • Tasking.vm: Split requirements into test cases
  • TDD-Red.vm: Write the first failing test based on generated test cases
  • TDD-Green.vm: Implement code to pass the test
  • TDD-Refactor.vm: Refactor the implementation

In these prompt files, simply use AutoDev's configuration to introduce context variables (reference: https://ide.unitmesh.cc/variables). Example:

---
priority: 2023
interaction: ChatPanel
---
```user```

You are a senior software engineer skilled in TDD. Improve existing implementations based on new test cases.

Original implementation code: $context.underTestFileCode($methodName)

New test code:

${selection}

Optimize the class under test based on new tests. Return method code using ``` to start your code block:

The YAML FrontMatter at the beginning provides simple configurations:

  • priority determines menu ordering
  • interaction controls output behavior:
    • ChatPanel displays in right-side chat window
    • AppendCursorStream streams output in current document with typewriter effect

Context provides built-in system functions for extended capabilities.

Team Prompts vs Custom Prompt

AutoDev 1.1 introduced Custom Prompt for personal configurations, while Team Prompts offers unified team configurations. This allows creating scenario-specific AI instructions for rapid team sharing.

We will continue evolving Team Prompts for better usability.

Custom Living Documentation: Continuously Supporting Legacy System Refactoring

Compared to conventional documentation generation, we find it more meaningful to generate code annotations that assist system refactoring.

AutoDev Documentation Generation

Inspired by JetBrains AI Assistant's documentation features, we added similar functionality in AutoDev. While initially considered symbolic, it proved valuable when documenting Chocolate Factory - simply select a class/method/variable, right-click or press Alt+Enter to generate documentation. Existing documentation will be updated based on current code (when AI permits).

For SDK development, we recommend adopting the Documentation Engineering approach described in Developer Experience: Exploration and Reshaping, as implemented in Chocolate Factory where tests and comments generate reliable documentation.

Custom Living Documentation Generation

Based on experience with legacy system refactoring tools and large insurance company cases, generating annotation-style documentation directly from code significantly reduces reading costs. Combining existing code with new documentation enables better RAG capabilities for extracting meaningful knowledge from code.

In AutoDev, simply add examples to guide LLM documentation generation:

"documentations": [
{
"title": "Living Documentation",
"prompt": "Generate Living Documentation in the following format:",
"start": "",
"end": "",
"type": "annotated",
"example": {
"question": "...",
"answer": "..."
}
}

Customize annotation formats for different scenarios, including Swagger annotations for API documentation.

Code Review

As discussed in our previous article AIGC Reshaping Software Engineering: Code Review, we combine AutoDev with DevOps platforms for code reviews.

IDE-Side Code Review Best Practices

For IDE-side reviews, we recommend focusing on business context understanding combined with syntax checks. Our design follows common workflows - reviewing multiple commits (e.g., all commits for a requirement) or historical changes of single files.

Requirement System-Integrated Code Review

For teams using AIGC efficiency tools, most already have mature DevOps practices like including requirement IDs in commit messages, e.g., feat(devops): init first review command #8.

AutoDev can retrieve requirement system information using this ID (8 in example) to supplement business context for LLM analysis.

Conclusion

As an open-source project, we still have many areas for improvement. Please submit issues on GitHub: https://github.com/unit-mesh/auto-dev if you encounter any problems.