Inspiration
AI coding agents can fix difficult bugs, but most of what they learn disappears when the task ends. The next agent encountering the same underlying mistake has to diagnose it and research the solution all over again.
Kintsugi was inspired by the Japanese art of repairing broken pottery with gold: a repair should not merely hide the break; it should leave the object stronger and make the history of the repair valuable. We applied that idea to software debugging. Every verified fix can become reusable knowledge for future agents.
What it does
Kintsugi is an autonomous bug-fixing agent that turns successful fixes into portable, cited Skills.
For each bug, Kintsugi:
- Creates a fresh, isolated Git worktree.
- Diagnoses the underlying Root Cause Class, not merely the error message.
- Asks a shared Skill Registry whether that class has been encountered before.
- Takes one of two paths:
- Research Path: consult primary sources and synthesize a cited strategy.
- Reuse Path: retrieve an existing Skill and apply its strategy without repeating the research.
- Applies a repository-specific fix and runs the original tests.
- Publishes a new Skill only after the tests pass.
A live dashboard makes the process inspectable. It shows the agent’s activity, stored Skills, reuse outcomes, and side-by-side comparisons of Research and Reuse Runs, including tokens, cost, time, and sources consulted.
How we built it
Kintsugi is composed of several deliberately separated modules:
- A Python agent runtime built with the Claude Agent SDK.
- A shared Skill Registry exposed as an MCP server.
- Portable Skills stored as human-readable
SKILL.mdfiles rather than database records. - Fresh Git worktrees created from an immutable baseline for every Run.
- An append-only JSONL event log recording factual events and metrics.
- A read-only Node.js HTTP server exposing Runs, events, and Skills.
- A responsive vanilla JavaScript dashboard that derives comparisons from the raw data.
We also built six controlled Seeded Bugs across three Root Cause Classes. Each pair looks different on the surface while sharing the same underlying programming mistake. This lets us demonstrate a Research Run that creates a Skill followed by a separate Reuse Run that benefits from it.
Safety and auditability are enforced in code. Runtime hooks prevent the agent from editing tests, researching before consulting the Registry, changing source code before recording a cited strategy, or publishing a Skill before verification succeeds. Tests are restored from Git immediately before verification as an additional integrity check.
Challenges we ran into
The hardest challenge was defining what should actually be reused. Matching stack traces or error strings is brittle because the same underlying mistake can surface in completely different ways. We introduced the Root Cause Class as the reusable unit and require the agent to form a one-sentence Root Cause Hypothesis before querying the Registry.
We also had to ensure that reusable Skills remained portable. A useful Skill should contain the general reasoning and citations behind a fix, not copied code from one repository. The Registry therefore validates Skill structure, provenance, citations, aliases, and possible source-code leakage before publishing.
Another challenge was making the evidence trustworthy. We separated the component doing the work from the component evaluating it: the agent writes only factual events, the server only exposes those facts, and the dashboard independently derives reuse counts and comparisons.
Finally, autonomous execution required careful guardrails. We had to close less-obvious bypasses involving shell commands, path traversal, modified tests, stale verification results, and publishing after unsuccessful fixes.
Accomplishments that we’re proud of
We are especially proud that Kintsugi goes beyond displaying an AI-generated patch. It implements a complete learning loop:
diagnose → research → fix → verify → publish → reuse
The Skill Registry uses an open MCP interface, so its knowledge is not limited to one agent implementation. Skills are also plain Markdown documents that people can inspect, version, install, and improve.
We are equally proud of the project’s transparency. Every meaningful action is recorded in an append-only event stream, every fix strategy must cite its sources, every Run remains isolated and inspectable, and the dashboard’s claims can be traced back to raw events.
What we learned
We learned that reusable debugging knowledge must live at the right level of abstraction. A patch is too specific, while generic advice is too vague. A strong Skill captures one Root Cause Class, explains how to recognize it, and provides a cited strategy without assuming a particular repository structure.
We also learned that prompts alone are not sufficient guardrails for autonomous agents. Important policies, such as protecting tests, requiring citations, isolating Runs, and publishing only verified knowledge, need to be enforced at tool and runtime boundaries.
Most importantly, we learned that evaluating an AI system is an architecture problem. If the agent calculates its own success claims, the results are difficult to trust. Recording raw facts and deriving conclusions in a separate component makes the system substantially easier to audit.
What’s next for Kintsugi
Next, we want to complete and publish the full six-Run benchmark demonstrating Research-to-Reuse behavior across all three Root Cause Classes. We also plan to expand the Seeded Bug suite, add more reusable Skills, and evaluate how well Skills transfer across unrelated repositories and programming languages.
Longer term, Kintsugi could become shared debugging memory for teams of coding agents: a versioned, inspectable knowledge layer where every verified repair makes future repairs faster, more consistent, and better grounded.
Built With
- agent
- ai
- css
- html5
- http
- javascript
- python
Log in or sign up for Devpost to join the conversation.