Claude Code Auto-Fix Meets API Governance
Delimit flags breaking changes in CI. Claude Code reads the structured error and fixes the code. A closed loop — no human in the middle.
Claude Code can now auto-fix CI failures. It reads the error, patches the code, and pushes a fix — all without you touching the keyboard. But what happens when the CI check IS the governance layer?
You get a closed loop: Delimit flags the breaking change, Claude Code reads the structured error, fixes the code, and the PR stays green. No human in the middle. No Slack thread asking "is this safe to merge?"
The loop
- Developer opens a PR that modifies an API endpoint — renames a field, removes a parameter, changes a response type.
- Delimit Action runs in CI. It diffs the OpenAPI spec against the base branch. It finds a breaking change:
response_field_removedonGET /users. CI fails. - Claude Code Action triggers on the failure. It reads Delimit's structured output — change type, severity, affected path, migration guidance.
- Claude fixes the code. It restores backward compatibility (adds the old field back as an alias, or marks it deprecated instead of removing it). Pushes the fix.
- Delimit runs again. No breaking changes. CI passes. PR is green.
Real example: PR #11
We tested this on our own repo. PR #11 introduced a breaking API change. Delimit caught it, posted a structured comment with the exact change type and migration path, and Claude Code resolved it — all in CI, no manual intervention.
Setup
Two actions in your workflow. That's it.
name: API Governance + Auto-Fix
on: pull_request
jobs:
check:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
# Step 1: Delimit catches breaking changes
- uses: delimit-ai/delimit-action@v1
with:
spec: api/openapi.yaml
# Step 2: Claude fixes what Delimit flags
- uses: anthropics/claude-code-action@beta
if: failure()
with:
claude_api_key: ${{ secrets.CLAUDE_API_KEY }}Why this matters
Auto-fix without governance is dangerous — the AI might "fix" a failing test by deleting the test. Auto-fix with governance is powerful — the AI knows exactly what broke, why it broke, and what backward-compatible fix to apply.
Delimit gives Claude Code the structured signal it needs. Not a vague error message. A typed change classification: response_field_removed, parameter_type_changed, endpoint_removed. 27 change types, each with severity and migration guidance.
Install Delimit. Let your AI fix what your governance catches. Keep building.
Try the GitHub Action
Add breaking change detection to any repo with an OpenAPI spec.
- uses: delimit-ai/delimit-action@v1
with:
spec: path/to/openapi.yamlView on Marketplace