DEV Community

Vojta Holeš
Vojta Holeš

Posted on

I Added AI Auto-Fix to My Breaking Change Detector — Here's How /fix Works

Last week I shipped a feature I've been wanting for months: type /fix in a GitHub PR comment and get a fix PR generated automatically.

Context
BreakShield CI is a GitHub App I built that detects breaking API changes in PRs using AST analysis. It catches removed fields, changed types, deleted endpoints — the stuff that slips through code review and breaks production.

But detection without a fix is just a fancy error message. So I added /fix.

How /fix works
When you comment /fix on a PR that has breaking changes:

BreakShield reacts with 👀 (acknowledged)
Fetches the affected file from the PR head
Sends it to your configured AI provider with:
The file content
What field/type was removed or changed
The before/after schema
AI generates the fixed file
BreakShield creates a new branch, commits the fix, opens a PR
Reacts with 🚀 (done)
Multi-provider support
You pick the AI:

Provider Free? Best model
Gemini ✅ 2.5 Flash
OpenAI ❌ GPT-5.4 mini
Claude ❌ Haiku 4.5
Groq ✅ Llama 3.3 70B
Perplexity ❌ Sonar Pro
Configure in the dashboard. BYOK — your key, your model, your choice.

Why not just use AI for detection too?
Because LLMs hallucinate. AST analysis doesn't.

Detection needs to be precise. 92% confidence means "I found this in the syntax tree, it's definitely gone." Not "I think maybe something changed."

AI is great for generating fixes. Terrible for detection where false positives erode trust.

Try it
Install: https://github.com/apps/breakshield-ci
Add an API key in settings (Groq is free)
Open a PR that removes a field from a TypeScript interface
Wait for BreakShield's comment
Reply with /fix
Watch the magic
Source: https://github.com/vojtisprime11/BreakShield

Top comments (1)

Collapse
 
holesvojta profile image
Vojta Holeš

Stop Shipping Broken APIs: How AST Analysis Catches What Code Review Misses