Self-maintaining APIs

Your APIs break.
We open the PR that fixes them.

When an API provider ships a breaking change, Patchwork rewrites the affected call sites in your repo and opens a pull request — verified to compile. Not a version bump. The actual code.

ingestextractlocatemigrate verifypr

How it works

Detect. Locate. Fix.

A breaking change goes in. A reviewable pull request comes out. No agent wandering your codebase — a deterministic pipeline with a model at two tight steps.

01 · DETECT

Read the change

Point us at a migration guide, changelog, or diff. We extract the exact breaking changes — renames, moved symbols, new signatures, response-shape shifts — as structured data.

createChatCompletion → removed
02 · LOCATE

Find real usages

We clone your repo, grep candidates, then confirm each call site with a real AST parse. Strings and comments never match — only code that actually breaks.

src/chat.ts:11 · src/summarize.ts:6
03 · FIX

Rewrite & verify

We rewrite each site to the new API, bump the dependency, then run your typecheck in a clean checkout. Green means it compiles — then we open the PR.

- response.data.choices + response.choices

Why now

Agentic coding tools proved that developers will grant real access to their codebase when the payoff is real. That unlocked the hard part. Breaking-change migration is the obvious, painful, universally-shared job that no one wants to do by hand — and Patchwork is the missing layer: the service that watches for the break and ships the fix as a PR you just review and merge.

Proof

A real OSS repo. A green PR.

Not a toy — Patchwork migrated RomanHotsiy/commitgpt, a 1.6k★ CLI, from the OpenAI SDK v3 to v4, then confirmed it builds with npm run build in a clean checkout.

RomanHotsiy/commitgpt · 1.6k★ · PR #1✓ verified · builds
OpenAI SDK v3 → v4
2 files changed · +5 −6 · openai ^3.2.1 ^4.0.0
- import { Configuration, OpenAIApi } from "openai"; + import OpenAI from "openai"; - const configuration = new Configuration({ apiKey }); - const openai = new OpenAIApi(configuration); + const openai = new OpenAI({ apiKey }); - const result = await openai.createCompletion({...}); + const result = await openai.completions.create({...}); - return result.data.choices[0].text; + return result.choices[0].text;

Install

Turn it on once. Forget it.

Add the GitHub App to a repo and Patchwork watches your dependencies against npm on a schedule — opening a verified PR the moment one breaks. Nothing to trigger. PRs land on a patchwork/* branch, never your default.