Skip to content

lokumai/defect-solver-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Defect Solver 🪲

An AI-powered system for rapid bug localization in complex microservice architectures. This system uses a hierarchical understanding of codebases to intelligently route bug reports to the correct microservice and find the specific files causing the defect.

📖 Table of Contents

⚠️ Disclaimer: Some links in this guide point to private company repositories and are only accessible to authorized team members. External users may encounter restricted access or broken links. Please contact us for public resources or further information.

How to Use Defect Solver?

We offer a simple API to interact with the Defect Solver system. You can write your bug description in your natural language and the system will return a ranked list of microservices or files that are likely to contain the bug.

Example:

User: Why is the user profile not loading?

Defect Solver: The bug is likely in the user-service microservice, specifically in the UserProfileController.java file.

Note:

For now, the API is ONLY exposed via our MCP Server. This allows direct and easy integration with any AI development environment that supports Model-Context Protocol. This includes popular IDEs like VSCode, IntelliJ, Claude Desktop or any MCP-compatible Agent/LLM. For using our API through the MCP Server, you can either run the server locally OR use our hosted version.

Usage Flow:

Flowchart below is a high-level overview of how to use the Defect Solver API through the MCP Server:

flowchart LR
    subgraph IDE["IDE (VSCode, JetBrains, etc.)"]
        User["User"]
        Agent["Agent (e.g., Copilot)"]
    end
    MCPServer["MCP Server"]
    API["Defect Solver API"]

    User -->|Enters Prompt| Agent
    Agent -->|Uses Tool| MCPServer
    MCPServer -->|Calls API| API
    API -->|Results| Agent
Loading

🚀 Quick Start

  1. First deploy the MCP Server. You can either run it locally or use our hosted version.
    • For local deployment, follow the MCP Server Local Deployment Guide.
    • For hosted version, you can use our public MCP Server at https://mcp.defect-solver.com (Requires DEFECT SOLVER API Key).
  2. Install the MCP Server extension in your IDE (or any MCP-compatible environment):
  3. Once you are connected to the MCP Server, you can start using the Defect Solver API in your IDE using the provided tools and prompts as described in the Usage Guide.
  4. [Optional] If your IDE supports manual Agent/LLM instructions—such as Cursor Rules, Windsurf Rules, or chat-based interaction (e.g., chatmode in VSCode)—refer to the Chat Mode Guide for setup details.

🏛️ High-level Architecture

The defect solver system follows a two-phase pipeline to narrow down the search space and localize the bugs.

graph TD
    subgraph "Phase 1: Search Space"
        A[Bug Description] --> B{Search Space Router}
        C[Microservice Knowledge] --> B
        B -- Identifies Top-N Suspicious Microservices --> D["Selected Search Space"]
    end

    subgraph "Phase 2: Bug Localization"
        D --> E{Bug Localizer}
        E -- Identifies Top-M Suspicious Files within Selected Search Space --> K[Ranked List of Files]
        K --> L((Final Result))
    end
Loading

For a complete breakdown of the algorithmic logic, see the Algorithm Details Document.

📄 References

This project is inspired by the principles of hierarchical code understanding to overcome the limitations of standard LLM context windows in large-scale software projects. For more details on the underlying research, see our published paper: Repository-Level Code Understanding by LLMs via Hierarchical Summarization: Improving Code Search and Bug Localization

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •