Skip to content

AI debugging for CI/CD pipelines — search 6,800+ bugs instantly (980+ verified fixes). Everything is free. MCP Server + GitHub Action + REST API.

License

Notifications You must be signed in to change notification settings

sstklen/confucius-debug

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

🦞 Confucius Debug — AI Debugging That Never Repeats a Mistake

6,800+ scraped issues · 980+ imported solutions · Search instantly. No match? AI fixes it and saves to KB — next person gets it free.

GitHub Action MIT License MCP Server

6800+ Issues Search Free AI Fix Free 9/9 Confirmed

MCP Server →  ·  GitHub Action →  ·  OpenClaw Skill →  ·  REST API →  ·  Submit Bug →


The Philosophy

「不貳過」Never repeat a mistake. (Confucius on his student Yan Hui, Analects 6.3)

Yan Hui (顏回) was Confucius's favorite student — praised for never making the same mistake twice. We named our Knowledge Base after him: the YanHui KB (不貳過知識庫).

Confucius Debug is the system built on top of it: once a bug is solved, nobody has to solve it again.


How It Works

Your AI agent hits a bug
       │
       ▼
  Search YanHui KB ──── Found! → Instant fix (FREE, ~150ms)
       │
       Not found
       ▼
  Confucius AI analyzes (FREE, ~6s)
       │
       ├── High confidence → Fix saved to KB → Next person gets it FREE
       │
       └── Low confidence → "We don't know yet"
                │
                ▼
          debug_escalate → Agent sends environment + logs
                │
                ▼
          Queued for offline research → Solved → Added to KB

Your bugs help everyone. Everyone's bugs help you. Honest when unsure — Confucius never makes up answers.


What Makes It Different

Most debug tools wait for you to ask. Confucius Debug proactively hunts bugs — scraping 9 major AI repos daily, fixing them with AI, verifying fixes, and posting solutions on GitHub.

What we do Numbers
Daily automated scraping 9 repos (OpenClaw, Claude Code, MCP SDK, Anthropic SDK, Aider, Codex...)
Issues scraped 6,800+ from 4 shards
Imported solutions 980+ verified and searchable
Platform specialties 12 (MCP, Telegram, Docker, OpenAI, Ollama, Discord...)
Fix quality (A-rate) 79% overall (S+A grade)
GitHub replies posted 280
Confirmed correct 9/9 = 100% (0 corrections)
Notable OpenClaw creator verified our fix and closed the issue

By the time you hit a bug, there's a good chance we already have the fix.


Install

MCP Server (Recommended)

For Claude Code, Claude Desktop, or any MCP-compatible client:

claude mcp add confucius-debug --transport http https://api.washinmura.jp/mcp/debug -s user

Or add to your MCP config:

{
  "mcpServers": {
    "confucius-debug": {
      "url": "https://api.washinmura.jp/mcp/debug"
    }
  }
}

Then tell your AI: "Use debug_hello to set up" — imports your past bugs and gets you started.

GitHub Action

- name: Confucius Debug AI
  if: failure()
  uses: sstklen/confucius-debug@v2
  with:
    lobster-id: ${{ secrets.CONFUCIUS_LOBSTER_ID }}

4 lines. When CI fails, Confucius posts the fix on your PR.

OpenClaw Skill

"Help me install the Confucius Debug skill"

See skills/confucius-debug/SKILL.md for full details.

REST API

# Search (always free)
curl -X POST https://api.washinmura.jp/api/v2/debug-ai/search \
  -H "Content-Type: application/json" \
  -d '{"query": "Telegram bot 409 Conflict error", "limit": 5}'

# AI analysis (when search returns nothing, free)
curl -X POST https://api.washinmura.jp/api/v2/debug-ai \
  -H "Content-Type: application/json" \
  -d '{"error_description": "...", "lobster_id": "your-id"}'

5 Tools

Tool What it does Cost
debug_search Search YanHui KB for existing solutions Free
debug_analyze No match? AI solves it, saves to KB Free
debug_escalate Low confidence? Submit environment + logs for offline research Free
debug_contribute Share your own solutions back Free
debug_hello Scan your bug history, bulk-import to KB Free

Workflow: debug_hello (once) → debug_search (always) → debug_analyze (if needed) → debug_escalate (if unsolved)


Platform Coverage

The YanHui KB specializes in AI agent bugs across 12 platforms:

Platform Solutions Quality (A-Rate)
Anthropic / Claude 392 80%
MCP (Model Context Protocol) 261 87%
Telegram 101 97%
Memory / RAG / Vector DB 94 87%
Browser / WebSocket 73 92%
OpenAI / GPT 54 87%
Docker / K8s 51 84%
Discord 40 93%
Cron / Scheduler 37 92%
WhatsApp 16 94%
Google / Gemini 15 100%
Ollama / Local LLM 14 93%

A-Rate = percentage of fixes independently verified as correct (S or A grade).


How the KB Grows

An automated pipeline runs daily:

scrape (GitHub Issues) → verify → fix (AI analysis)
    → import (vector KB) → reply (GitHub) → track → learn
Stage What happens
Scrape Pull new issues from 9 AI repos
Verify Grade existing solutions for quality
Fix AI generates fixes for unsolved bugs
Import Good fixes go into the YanHui KB (vector database)
Reply Post solutions on GitHub with smart filtering
Track Monitor community responses
Learn Extract lessons from corrections to improve

The KB grows by ~100 entries per day, automatically.


Pricing

Everything is free. Search, analyze, contribute — no cost.


Submit a Bug

Have a bug you can't solve? Three ways to submit:

Submit Bug   AI Assisted   For AI Agents

Option 1: Fill the form (for humans)

Tell us the error message, platform, and steps to reproduce → Open form

Option 2: AI-assisted (for humans using AI)

Copy the prompt below, paste into your AI (Claude/ChatGPT), answer its questions, then paste the output into our form.

Copy this prompt
I need you to help me create a structured bug report for Confucius Debug (https://github.com/sstklen/confucius-debug).

Ask me these questions one by one:
1. What error message or unexpected behavior did you see? (paste the exact error)
2. What were you trying to do when this happened?
3. What platform/tool is involved? (e.g., Claude Code, MCP, Telegram, Docker, OpenAI, Discord, etc.)
4. What's your environment? (OS, runtime version, tool version)
5. Can you reproduce it? If so, what are the steps?

Then format my answers into this markdown template:

### Error Message
[exact error]

### What I Was Doing
[context]

### Platform
[platform name]

### Environment
- OS: [os]
- Runtime: [version]
- Tool: [version]

### Steps to Reproduce
1. [step]
2. [step]

### Additional Context
[anything else relevant]

Option 3: For AI Agents (they find us on their own)

AI agents discover Confucius Debug organically and submit bugs without human involvement.

How AI agents find us:

GitHub Issues ─── We already reply on 9 major repos (280+ replies)
    │              → AI agents see our fixes → follow the link → connect
    │
OpenClaw ──────── Confucius Debug Skill in the Skill Library
    │              → Agents install the skill → start submitting
    │
MCP Directory ─── Listed as MCP Server
    │              → Claude Code / Desktop users add it → agent uses it
    │
AI Crawlers ───── GPTBot, ClaudeBot read our llms.txt + README
                   → When users ask "debug tools for CI" → we show up

Once connected, the agent works autonomously:

Agent hits a bug
    ↓
debug_search → KB has a fix? → Use it! (instant)
    ↓ no match
debug_analyze → AI generates a fix
    ├── High confidence → Saved to KB ✅
    └── Low confidence → status: "unsolved"
         ↓
    debug_escalate → Agent sends environment + logs
         ↓
    Queued for offline research → solved → added to KB
    ↓
Agent solves a bug on its own?
    ↓
debug_contribute → Shares fix back → KB grows

Every agent that connects makes the KB stronger. Every KB entry helps every other agent.

Connect via MCP (Claude Code / Claude Desktop)

{
  "mcpServers": {
    "confucius-debug": {
      "url": "https://api.washinmura.jp/mcp/debug"
    }
  }
}

Connect via REST API (any AI agent)

# Search KB (always try first)
curl -s -X POST https://api.washinmura.jp/api/v2/debug-ai/search \
  -H "Content-Type: application/json" \
  -d '{"query": "your error message here", "limit": 5}'

# AI analysis (if search found nothing)
curl -s -X POST https://api.washinmura.jp/api/v2/debug-ai \
  -H "Content-Type: application/json" \
  -d '{"error_description": "what happened", "error_message": "exact error", "lobster_id": "your-agent-name"}'

# Escalate (if analyze returned "unsolved" — provide environment info)
curl -s -X POST https://api.washinmura.jp/api/v2/debug-ai/escalate \
  -H "Content-Type: application/json" \
  -d '{"error_description": "the unsolved bug", "lobster_id": "your-agent-name",
       "environment": {"os": "macOS", "runtime": "bun 1.2"}, "logs": "error output...",
       "tried": ["restarted", "cleared cache"]}'

# Contribute back (if agent solved it)
curl -s -X POST https://api.washinmura.jp/api/v2/debug-ai/onboard \
  -H "Content-Type: application/json" \
  -d '{"lobster_id": "your-agent-name", "entries": [{"error_description": "the bug", "fix_description": "how you fixed it"}]}'

Connect via OpenClaw Skill

"Help me install the Confucius Debug skill"

The flywheel: We post fixes on GitHub → AI agents see them → agents connect → agents contribute bugs → KB grows → we post more fixes → more agents find us → repeat.


GitHub Action — Full Setup Guide

Quick Start (2 minutes)

1. Get a free Lobster ID

claude mcp add confucius-debug --transport http https://api.washinmura.jp/mcp/debug -s user

Tell Claude: "Use debug_hello to onboard" — it scans your past bugs and imports them.

2. Add to GitHub Secrets

Repo → SettingsSecrets → Add CONFUCIUS_LOBSTER_ID

3. Add to workflow

name: CI
on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Build
        id: build
        run: npm run build 2>&1 | tee /tmp/build-error.log
        continue-on-error: true

      - name: Confucius Debug AI
        if: steps.build.outcome == 'failure'
        uses: sstklen/confucius-debug@v2
        with:
          lobster-id: ${{ secrets.CONFUCIUS_LOBSTER_ID }}

      - name: Fail if build failed
        if: steps.build.outcome == 'failure'
        run: exit 1

Inputs

Input Required Default Description
lobster-id Yes - Your Lobster ID
error-log No auto-capture Custom error text
comment No true Post fix as PR comment
language No en Response language (en/zh/ja)

Outputs

Output Description
status knowledge_hit, analyzed, unsolved, or error
fix Full JSON response with fix details
source knowledge_base, sonnet, or opus
cost Cost in USD (always 0 — everything is free)
Security & Privacy

What leaves your machine

Only the error description and error message you provide. The GitHub Action also sends CI metadata (repo name, branch, runner OS) for context. No source code, no file contents, no secret environment variables.

What's stored

Error descriptions and fixes in the YanHui KB. No PII beyond your chosen lobster-id.

Automatic redaction

API keys, tokens, and passwords are filtered before sending.

Data retention

Contributions are permanent — that's the point. Never repeat a mistake.


Maintainer Note

Hi, I'm tkman — the creator of Confucius Debug. I'm not an engineer. I built this entire project with AI, and I'll do my best to maintain it. If you find a bug, please report it — I'll try my hardest to fix it. If you're an engineer and know how to help, PRs are very welcome. Let's make Confucius better together. 🙏


Related Projects

Project What it does
112 Claude Code Skills Battle-tested coding patterns
Zero Engineer How a non-engineer built all of this with AI

「不遷怒,不貳過。」
"Never redirect anger, never repeat a mistake."

Built at Washin Village (和心村) — an animal sanctuary in Japan, 28 cats & dogs 🐾
Powered by Claude (Anthropic) + the Confucius philosophy.

🦞 The bigger the Knowledge Base, the stronger Confucius becomes.

About

AI debugging for CI/CD pipelines — search 6,800+ bugs instantly (980+ verified fixes). Everything is free. MCP Server + GitHub Action + REST API.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors