Skip to content

Latest commit

Β 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ReproForge β€” From Bug Report to Verified Fix

An IBM Bob 2.0 Hackathon Project

Created by team 403Denied on September 27, 2026

Node.js 18+ TypeScript React Vite Express.js PRs Welcome

Technologies: Generative Agents β€’ Opus β€’ Claude Code β€’ ChatGPT β€’ GPT-4 β€’ Gemini 3 pro β€’ IBM

Categories: Developer Tools, Assistant, Automotive, Coding excellence, Productivity


ReproForge is an AI-powered software debugging and repair system built to close the gap between identifying a bug and proving that it has actually been fixed. A developer provides a bug report, stack trace, or error description, and ReproForge analyzes the repository using specialized AI agents. The agents investigate the codebase, examine relevant tests and Git history, identify potential root causes, and collaborate to determine the most likely explanation.

ReproForge then creates a minimal reproducible test case and runs it against the existing code to prove that the issue actually occurs. Once the failure is confirmed, the system generates a regression test, proposes and applies a minimal code fix, and executes the relevant test suites again.

The final result is an evidence-backed debugging report showing the complete journey:

Bug Report β†’ Investigation β†’ Root Cause β†’ Reproduction β†’ Regression Test β†’ Fix β†’ Verification

Instead of simply generating code or explaining an error, ReproForge focuses on proof. It does not claim a bug is fixed unless the generated reproduction and relevant tests demonstrate that the behavior has been corrected. The project uses IBM Bob 2.0's repository-level AI capabilities, agent workflows, parallel investigation, file and terminal operations, and iterative verification to demonstrate how AI can participate in a complete software engineering workflow.

πŸŽ₯ Demo

▢️ Watch the ReproForge Demo

The demo demonstrates the complete autonomous workflow: repository discovery β†’ test execution β†’ bug localization β†’ root-cause analysis β†’ patch generation β†’ verification.

πŸš€ How It Works

ReproForge executes a sophisticated multi-agent investigation flow:

1. Discovery & Setup

Code Investigator + History Investigator

  • Clones the repository into an isolated workspace.
  • Detects the project's technology stack.
  • Identifies the package manager and test runner.
  • Maps the project structure and relevant files.
  • Inspects repository history when useful for understanding the bug.

2. Test Execution

Test Investigator

  • Runs the project's test suite.
  • Establishes a baseline.
  • Captures failing tests, stack traces, assertion errors, and relevant output.
  • Identifies the specific failure that needs investigation.

3. Bug Localization

Reproduction Agent

  • Starts from the failing test.
  • Resolves local imports and dependencies.
  • Traces execution from the test into the relevant source files.
  • Narrows the investigation down to the specific function and faulty code.

4. Root Cause & Patch Generation

Fix Agent The relevant debugging context is minimized and provided to the AI provider:

  • Failing test
  • Test output
  • Stack trace
  • Relevant source code
  • Repository context

The AIProvider, powered by Gemini/OpenAI, determines:

  • The root cause of the failure.
  • The faulty code.
  • The required correction.
  • A minimal patch to fix the issue.

5. Verification

Verification Agent

  • Applies the proposed patch safely.
  • Re-runs the relevant tests.
  • Verifies that the original failure is resolved.
  • Checks for regressions by running the test suite again.

The goal is not simply to generate a plausible fix, but to prove that the fix works through automated verification.


πŸ“‹ Supported Repositories & Requirements

ReproForge is designed to autonomously clone, execute, reproduce, and verify bug fixes. To work seamlessly, target repositories must meet these requirements:

βœ… Repository Requirements:

  1. Standard Root Manifest: The repository root must contain the project's build and dependency manifest (e.g. package.json for Node.js, pom.xml or build.gradle for Java, or pyproject.toml / pytest.ini for Python).
  2. Runnable Test Suite: A configured test command (e.g. npm test or npm run test) that fails predictably when the bug is present.
  3. Single-Project Root (Not Polyglot Archives):

    ⚠️ Note on Polyglot Repositories (e.g. GildedRose-Refactoring-Kata): Repositories containing multiple language implementations in subdirectories (e.g., /Java, /JavaScript, /Python, /Cpp) without a top-level build file cannot be automatically executed. ReproForge targets single-project repositories or sub-projects with a defined root runner.

πŸ› οΈ Supported Runtimes & Test Runners:

  • Node.js / TypeScript: npm, yarn, pnpm with node --test (TAP 13), jest, or vitest.
  • Python: pytest (pytest -v, python -m pytest -v).
  • Java: Maven (mvn test -B) and Gradle (./gradlew test).

πŸ§ͺ Verified & Tested Example Repositories

Use any of these repositories directly in the ReproForge input box:

Repository URL Tech Stack Description Execution Time
https://github.com/PurveshShinde/calculator-bug Node.js (node:test) Minimal zero-dependency arithmetic bug test ~5 seconds ⚑
https://github.com/PurveshShinde/ReproForge-test Node.js (node:test) 4-agent bug suite: Auth, Response Transformer, Router, Payments ~30 seconds
demo-repo/ (Included in repo) Node.js (node:test) Local mock payment gateway and checkout service ~5 seconds

Quick 2-Minute Test Repo Setup:

If you want to test your own bug, create a minimal GitHub repository with:

  1. package.json:
    { "name": "bug-test", "type": "module", "scripts": { "test": "node --test" } }
  2. test/calculator.test.js:
    import test from 'node:test';
    import assert from 'node:assert';
    function divide(a, b) { return a * b; } // Bug: * instead of /
    test('divide 10 by 2 equals 5', () => { assert.strictEqual(divide(10, 2), 5); });

🧹 Workspace Isolation & Disk Space Protection

Because ReproForge clones repositories and installs dependencies at runtime, the backend incorporates multi-layered disk cleanup to ensure hosting environments (like Render's ephemeral storage) never run out of disk space:

  1. Immediate Workspace Teardown: As soon as an investigation completes (success, partial fix, or error), cleanupWorkspace() deletes the cloned workspace and all node_modules from /tmp/reproforge/.
  2. Automated Pre-Clone Pruning: Before every new git clone, pruneStaleWorkspaces() sweeps the temporary directory and purges any abandoned directories older than 10 minutes.
  3. Background Garbage Sweeper: A periodic timer runs every 10 minutes on the backend to guarantee zero disk accumulation even if a client disconnects unexpectedly or closes the browser tab.

πŸ“‚ Project Structure

The project is split into two main layers:

ReproForge/
β”œβ”€β”€ demo.mp4
β”œβ”€β”€ README.md
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   β”‚   └── investigationOrchestrator.ts
β”‚   β”‚   β”œβ”€β”€ events/
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   β”œβ”€β”€ aiProvider.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ gitService.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ sourceResolver.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ testRunner.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ patchService.ts
β”‚   β”‚   β”‚   └── verificationService.ts
β”‚   β”‚   └── server.ts
β”‚   └── package.json
β”‚
└── frontend/
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ components/
    β”‚   └── App.tsx
    └── package.json

πŸ› οΈ Getting Started

Prerequisites

  • Node.js 18+
  • npm
  • A GEMINI_API_KEY or OPENAI_API_KEY for dynamic AI patch generation

1. Clone ReproForge

git clone https://github.com/PurveshShinde/ReproForge.git
cd ReproForge

2. Start the Backend

cd backend
npm install
npm run dev

3. Start the Frontend

Open another terminal:

cd frontend
npm install
npm run dev

The frontend will be available at: http://localhost:5173

Enter a GitHub repository URL into the UI and start an investigation.


πŸ€– AI Provider & Fallback Logic

ReproForge is designed to remain functional even without an external AI API.

When GEMINI_API_KEY or OPENAI_API_KEY is configured, the AIProvider can use an LLM to perform root-cause analysis and generate patches.

If no API key is available, ReproForge falls back to its built-in mockAIPatch system.

The fallback uses dynamic string replacement and heuristic logic to simulate AI-assisted patch generation, allowing the investigation pipeline and demonstrations to run offline.

This makes the system useful for both:

  • Live AI-powered investigations
  • Offline demonstrations and testing

🧩 Core Components

Component Responsibility
Code Investigator Detects project structure, language, framework and test environment
History Investigator Examines repository history and previous changes
Test Investigator Executes tests and captures failures
Reproduction Agent Traces failing tests to relevant source code
Fix Agent Determines root cause and generates a patch
Verification Agent Applies the patch and validates the fix
AIProvider Interfaces with Gemini/OpenAI and fallback AI logic
Source Resolver Resolves imports and follows source dependencies
Test Runner Executes and analyzes test commands
Patch Service Handles patch application and fallback patching
Git Service Creates isolated repository workspaces

πŸ”„ Investigation Pipeline

                 GitHub Repository
                        β”‚
                        β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Code Investigator β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Test Investigator β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                 Failing Tests
                        β”‚
                        β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Reproduction Agentβ”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                  Faulty Code
                        β”‚
                        β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚     Fix Agent     β”‚
              β”‚   AIProvider      β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                    Patch
                        β”‚
                        β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Verification Agentβ”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                Tests Re-run
                   β”‚       β”‚
                PASS      FAIL
                  β”‚         β”‚
                  β–Ό         └──► Further Investigation
             Verified Fix

✨ Key Features

  • πŸ” Autonomous bug investigation
  • πŸ§ͺ Automated test execution
  • 🧭 Failure-to-source tracing
  • πŸ€– LLM-powered root-cause analysis
  • 🩹 Automatic patch generation
  • βœ… Automated patch verification
  • πŸ”„ Regression detection
  • πŸ“‘ Real-time investigation events
  • 🌐 GitHub repository support
  • πŸ”’ Isolated repository workspaces
  • πŸ“΄ Offline fallback AI simulation
  • πŸ“Š Visual investigation graph
  • πŸ’» Integrated code and terminal views

🧰 Tech Stack

Frontend

  • React
  • Vite
  • TypeScript
  • Tailwind CSS
  • React Flow
  • Monaco Editor
  • Framer Motion

Backend

  • Node.js
  • Express
  • TypeScript
  • WebSockets
  • Git
  • Gemini / OpenAI API

🎯 Project Goal

Traditional debugging often requires a developer to manually:

Read the failure β†’ reproduce the bug β†’ trace the code β†’ identify the root cause β†’ write a fix β†’ run tests β†’ verify the fix.

ReproForge aims to automate this entire workflow.

Input: Repository + failing tests

Output: Root cause β†’ Patch β†’ Verified fix

The system is designed around one core principle:

"Don't just suggest a fix β€” reproduce the failure, patch the code, and verify that the fix actually works."


πŸ‘₯ Contributors


πŸ“ About

ReproForge was built to tackle the repetitive and time-consuming process of debugging software bugs. This project serves as an open-source solution that leverages AI to act as a fully autonomous debugging engineer. It demonstrates the capabilities of multi-agent architectures and AI-driven code intelligence in resolving real-world programming issues efficiently. If you found this project helpful, please consider leaving a ⭐️ on the repository!

About

An AI-powered autonomous debugging pipeline that traces failing tests, identifies root causes, and generates verified code fixes. Built for the IBM Bob 2.0 Hackathon.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages