Bug Reproducer LangGraph
What it does
A triager reads the issue, establishes the expected and actual behavior, and looks up any unfamiliar API with web search. A coder writes the smallest program and test that should trigger the bug, and a verifier confirms the test fails for the reported reason rather than an unrelated setup error. The coder and verifier loop until the repro holds or the attempt budget is spent. A reporter then comments the working repro on the issue so a maintainer can run it immediately.
The cast Β· 4 agents
Write the smallest possible program and a test that should fail because of this bug. Keep dependencies minimal. If you received a verifier note, fix what it found and try again. Save the repro and test to files.
Read the issue and state the expected behavior, the actual behavior, and the smallest setup that should trigger it. If an API or error in the report is unfamiliar, look it up with web search before writing the brief.
Comment the working repro on the issue: the minimal test, how to run it, and what it proves. If the loop failed to reproduce, say so and summarize what was tried instead.
Read the repro and decide whether the test fails for the reason the issue describes, not an unrelated setup error. Return an object with a 'reproduced' boolean and, if false, exactly what went wrong. Be strict: a test that fails for the wrong reason is not a reproduction.
Flow
Interface
Depends on Β· 3 MCP servers
# Generated by @socketcat/compiler for target: langgraph
# blueprint: com.socketcat/bug-reproducer v1.0.0 schema: socketcat.dev/blueprint/v0
# This code is yours. Edit it freely. The socketcat_runtime helper is optional and can be vendored.
from typing import TypedDict
from langgraph.graph import StateGraph, START, END
import socketcat_runtime as _rt
class State(TypedDict, total=False):
issueRef: object
repro: object
brief: object
__loop_1: object
attempt: object
check: object
def node_AgentInvoke_0(state):
return _rt.run_agent("triager", state, {"issueRef":"issueRef"}, "brief")
def node_LoopHeader_1(state):
return {}
def node_LoopTick_2(state):
return {"__loop_1": state.get("__loop_1", 0) + 1}
def node_Nop_3(state):
return {}
def node_AgentInvoke_4(state):
return _rt.run_agent("coder", state, {"brief":"brief","check":"check"}, "attempt")
def node_AgentInvoke_5(state):
return _rt.run_agent("verifier", state, {"attempt":"attempt"}, "check")
def node_AgentInvoke_6(state):
return _rt.run_agent("reporter", state, {"check":"check","attempt":"attempt"}, "repro")
def route_LoopHeader_1(state):
count = state.get("__loop_1", 0)
return "exit" if (_rt.cond("check.reproduced == true", state) or count >= 4) else "loop"
def build():
b = StateGraph(State)
b.add_node("AgentInvoke_0", node_AgentInvoke_0)
b.add_node("LoopHeader_1", node_LoopHeader_1)
b.add_node("LoopTick_2", node_LoopTick_2)
b.add_node("Nop_3", node_Nop_3)
b.add_node("AgentInvoke_4", node_AgentInvoke_4)
b.add_node("AgentInvoke_5", node_AgentInvoke_5)
b.add_node("AgentInvoke_6", node_AgentInvoke_6)
b.add_edge(START, "AgentInvoke_0")
b.add_edge("AgentInvoke_0", "AgentInvoke_4")
b.add_conditional_edges("LoopHeader_1", route_LoopHeader_1, {"loop": "AgentInvoke_4", "exit": "Nop_3"})
b.add_edge("LoopTick_2", "LoopHeader_1")
b.add_edge("Nop_3", "AgentInvoke_6")
b.add_edge("AgentInvoke_4", "AgentInvoke_5")
b.add_edge("AgentInvoke_5", "LoopTick_2")
b.add_edge("AgentInvoke_6", END)
return b.compile()
INPUTS = ["issueRef"]
OUTPUTS = ["repro"]
if __name__ == "__main__":
_rt.main(build, INPUTS, OUTPUTS)
βΈblueprint.json (the portable format)
{
"id": "com.socketcat/bug-reproducer",
"flow": {
"type": "sequence",
"blocks": [
{
"in": {
"issueRef": "issueRef"
},
"out": "brief",
"use": "triager",
"type": "agent"
},
{
"max": 4,
"type": "loop",
"until": "check.reproduced == true",
"blocks": [
{
"in": {
"brief": "brief",
"check": "check"
},
"out": "attempt",
"use": "coder",
"type": "agent"
},
{
"in": {
"attempt": "attempt"
},
"out": "check",
"use": "verifier",
"type": "agent"
}
]
},
{
"in": {
"check": "check",
"attempt": "attempt"
},
"out": "repro",
"use": "reporter",
"type": "agent"
}
]
},
"tags": [
"debugging",
"testing",
"evaluator-optimizer",
"github"
],
"title": "Bug Reproducer",
"agents": {
"coder": {
"model": {
"hint": "coding"
},
"title": "Coder",
"tools": [
"fs.write_file"
],
"instructions": "Write the smallest possible program and a test that should fail because of this bug. Keep dependencies minimal. If you received a verifier note, fix what it found and try again. Save the repro and test to files."
},
"triager": {
"model": {
"hint": "reasoning"
},
"title": "Triager",
"tools": [
"code.get_issue",
"search.web"
],
"instructions": "Read the issue and state the expected behavior, the actual behavior, and the smallest setup that should trigger it. If an API or error in the report is unfamiliar, look it up with web search before writing the brief."
},
"reporter": {
"model": {
"hint": "fast"
},
"title": "Reporter",
"tools": [
"code.comment"
],
"instructions": "Comment the working repro on the issue: the minimal test, how to run it, and what it proves. If the loop failed to reproduce, say so and summarize what was tried instead."
},
"verifier": {
"model": {
"hint": "reasoning"
},
"title": "Verifier",
"tools": [
"fs.read_file"
],
"output": {
"type": "object",
"required": [
"reproduced"
],
"properties": {
"note": {
"type": "string"
},
"reproduced": {
"type": "boolean"
}
}
},
"instructions": "Read the repro and decide whether the test fails for the reason the issue describes, not an unrelated setup error. Return an object with a 'reproduced' boolean and, if false, exactly what went wrong. Be strict: a test that fails for the wrong reason is not a reproduction."
}
},
"estate": {
"brief": {
"type": "object",
"description": "The triager's expected-vs-actual reading of the bug."
},
"check": {
"type": "object",
"description": "The verifier's result, including a 'reproduced' flag."
},
"attempt": {
"type": "object",
"description": "The coder's current repro and failing test."
}
},
"$schema": "socketcat.dev/blueprint/v0",
"authors": [
{
"url": "https://socketcat.com",
"name": "SocketCat"
}
],
"license": "MIT",
"servers": [
{
"ref": "io.github.github/github-mcp",
"alias": "code"
},
{
"ref": "io.github.brave/brave-search-mcp",
"alias": "search"
},
{
"ref": "io.github.modelcontextprotocol/filesystem",
"alias": "fs"
}
],
"summary": "Turns a GitHub bug report into a minimal failing test, looping a coder against a verifier until the repro is genuine.",
"targets": [
"langgraph",
"crewai",
"*"
],
"version": "1.0.0",
"interface": {
"inputs": {
"issueRef": {
"type": "string",
"description": "The GitHub issue to reproduce, as owner/repo#number."
}
},
"outputs": {
"repro": {
"type": "string",
"description": "The minimal failing test and instructions, as posted to the issue."
}
}
},
"extensions": {
"dev.langgraph": {
"checkpointer": "memory"
}
},
"description": "A triager reads the issue, establishes the expected and actual behavior, and looks up any unfamiliar API with web search. A coder writes the smallest program and test that should trigger the bug, and a verifier confirms the test fails for the reported reason rather than an unrelated setup error. The coder and verifier loop until the repro holds or the attempt budget is spent. A reporter then comments the working repro on the issue so a maintainer can run it immediately."
}