Skip to main content

What is DeputyDev?

Welcome to DeputyDev, your AI-powered assistant designed to enhance your development workflow, developer productivity and code quality. By integrating state-of-the-art AI technologies, DeputyDev offers context-aware code reviews, aligns with business logic, and ensures comprehensive code security. DeputyDev seamlessly integrates into your development process, offering insights and automated checks to help you maintain robust, maintainable, and secure codebases. By automating code reviews, DeputyDev reduces the need for manual checks and helps prevent issues related to poor code quality.

Features

DeputyDev offers a wide range of features including:

  • 📋 PR Summaries: Automatically generate concise and insightful summaries of pull requests, highlighting key changes and potential issues so that developers can quickly grasp context.

  • 📑 Context-Aware Developer Queries: Enable developers to make intelligent queries about the codebase, receiving contextually relevant answers.

  • 💼 Business Logic Alignment: Ensure that the code aligns with predefined business logic and organisational standards.

  • 🚧 Vulnerability Checks: Identify and address security vulnerabilities within the code.

  • ⚙️ Resource Optimisation: Optimise code for better performance and resource utilisation.

  • Code Quality Assurance: Enforce coding standards and best practices to maintain robust and maintainable code.

Why is it needed?

In today's fast-paced software development environment, ensuring code quality, security, and efficiency is more critical than ever. Traditional code review processes can be time-consuming, prone to human error, and often lack the broader context needed to make informed decisions. This is where DeputyDev steps in, leveraging advanced AI to transform and streamline the code review process.

DeputyDev automates and enhances code reviews, providing comprehensive, context-aware insights that help developers and managers ensure their code not only meets technical standards but also aligns with business objectives. By addressing the common bottlenecks in code reviews, DeputyDev helps teams maintain high standards of code quality, security, and efficiency.

For Developers:

  1. Efficient Code Reviews: DeputyDev automates and accelerates code reviews, reducing the need for extensive manual reviews.

  2. Context-Aware Insights: Receive context-aware answers to queries, alternate solutions for specific problems, targeted enhancements and recommendations, ensuring code consistency and effective code reuse.

  3. Enhanced Code Quality: Automatically check for coding standards, business logic alignment, and security vulnerabilities, ensuring robust and secure code.

For Managers:

  1. Comprehensive Oversight: Access detailed reports on code quality, security, and adherence to business logic, facilitating better project management and oversight.

  2. Productivity Metrics: Track developer productivity and progress with detailed metrics, identifying bottlenecks and optimising workflows.

  3. Cost and Time Efficiency: Save time and resources with automated reviews, leading to faster project delivery and reduced costs.

High-Level Architecture

DeputyDev is designed with a robust architecture to provide comprehensive, context-aware code reviews. This is achieved through a combination of code chunking, advanced search algorithms, and integration with large language models (LLMs). The architecture ensures that the tool can effectively handle large codebases, providing meaningful insights and suggestions that take into account the broader context of the code.

To address the challenge of providing complete code context within the limitations of large language models (LLMs), DeputyDev uses an algorithm we coined - RAGLoC (Retrieval-Augmented Generation with Logical Chunking) to fetch the most relevant context for code.

The problem: Attention Is All You Need

Traditional code review tools focus mainly on PR diffs, similar to an investigator examining only the immediate crime scene. This approach can often miss critical context outside the immediate changes, such as similar functions or methods elsewhere in the codebase. For example, if a new method is created in the PR, the tool might miss recommending an existing method that serves a similar purpose because it is outside the PR diff scope. Furthermore, due to security concerns and token limits, providing the entire codebase to the LLM is not feasible.

Our solution: RAGLoC

RAGLoC addresses this by breaking down the entire codebase into smaller, manageable chunks while preserving their structure (Abstract Syntax Trees). These chunks are then analysed using a combination of lexical and RAG-based searches. Think of the RAGLoC algorithm as an investigator who thoroughly analyses not just the scene of an incident but also collects and examines evidence from various related sources and analyses the relevance of the same.

This approach allows DeputyDev to provide contextually rich and accurate recommendations, ensuring that the code changes are not only technically sound but also aligned with the broader codebase and business logic.

The architecture diagram below illustrates the workflow and components of DeputyDev.

ragloc

Default Models and Flexibility:

DeputyDev utilises Anthropic's Claude 3.5 Sonnet as its default model due to its superior performance in Code HumanEval according to Anthropic's benchmark. Additionally, OpenAI's GPT-4o is also integrated to leverage its powerful capabilities. However, DeputyDev offers flexible hybrid-LLM integration, allowing you to use your own preferred model if desired. This flexibility ensures that you can tailor the tool to best fit your specific needs and preferences.