PatcheryGitHub ActionnpmMITearly
When a dependency breaks your code, Patchery fixes it and proves the fix.
Your project runs on other people’s code. When they change how it works, your app stops working. Patchery finds what broke, rewrites the lines that need rewriting, and checks the result against your own tests before it shows you anything — and throws its own work away if that check goes badly.
- 1pull request it opened on its own
- $0.1213what that run cost, end to end
- 0users, customers, logos
- MITevery line of it public
Tell an AI to make the tests pass. It might just delete them. // 4 tests removed · suite green
Deleting the test is the cheapest way to satisfy the instruction, so it is the one an agent reaches for first. Failing that: soften the check, stub out the function, edit the very file that decides what working means. Every one of those makes a broken project look fixed.
Which means writing the fix was never the interesting problem. Everything that happens after it is. Patchery never reads the AI’s own account of what it did — it looks at the files themselves, throws the whole attempt away if anything off-limits moved, and re-runs your tests itself.
The libraries underneath modern software change faster than the teams using them can follow. Tools like Dependabot are good at telling you a newer version exists. They stop exactly where the work starts: the places in your code that used the old way.
That gap used to need a person. It stopped needing one somewhere in the last two years — but only if you can trust the result, which is the same problem again.
openai and
@google/generative-ai — both migrated by hand, both linked below.
In plain termsIt tries the fix, then spends four more steps trying to catch itself cheating.
It has to get
past itself first.
- 01Check it’s really brokenIf your tests already pass, stop here and charge nothing.
- 02Read the notes, fix the codeFind what changed, rewrite the lines that used the old way.
- 03Look at what changed on diskNot what the AI says it did — what the files say it did.
- 04Run your tests againMeasure it. Don’t ask it.
- 05Ask a human to approve itA change request you read and merge yourself. Never automatic.
$ npm test
> toy-project@1.0.0 test
> node app.test.js
node_modules/fake-lib/index.js:3
throw new TypeError("currency is required as of fake-lib@2.0.0");
^
TypeError: formatPrice(amount, currency): currency is required
at formatPrice (node_modules/fake-lib/index.js:3:11)
at renderCartTotal (app.js:4:20)
at Object.<anonymous> (app.test.js:4:16)
# fake-lib changelog
## 2.0.0 (breaking)
- Removed formatPrice(amount).
Returned a plain number and rounded
inconsistently across locales.
- Added formatPrice(amount, currency).
Now requires an explicit currency
code, e.g. "USD".
### Migration
formatPrice(19.9) // "19.90"
formatPrice(19.9,"USD") // "$19.90"
1 const { formatPrice } = require("fake-lib");
2
3 function renderCartTotal(amount) {
4 return `Total: ${formatPrice(amount)}`;
5 }
6
7 module.exports = { renderCartTotal };
changed on disk:
app.js allowed
checked, and untouched:
your tests off-limits
package-lock.json off-limits
node_modules/ off-limits
your CI configuration off-limits
→ nothing off-limits moved. carry on.
$ npm test
> toy-project@1.0.0 test
> node app.test.js
PASS: app.test.js
fix(deps): migrate fake-lib call sites
a change request, waiting for a human
app.js
function renderCartTotal(amount) {
− return `Total: ${formatPrice(amount)}`;
+ return `Total: ${formatPrice(amount, "USD")}`;
}
- 1 file
- +1 −1
- 11 turns
- $0.1213
Opened automatically. Never merged automatically.
In plain termsSome files are off-limits, and touching one throws away the whole attempt — including a fix that worked.
Try to
break it.
The off-limits list is short: your tests, the file that pins your versions, your build settings, and the installed libraries themselves. Those are the four ways an AI could make a broken project look fixed, so none of them may move. Two more rules sit alongside them — nothing may be deleted, and nothing outside the folder you pointed it at may be touched at all.
The box below runs the real check — the same few lines that run inside Patchery’s source, copied character for character, not a demo of it. Give it any file path and see what it decides.
or try one of these
Nothing here yet. Add a file and the verdict appears below.
Five rules on the off-limits list, in the order they run — installed libraries, test files, test folders, build settings, version-lock files — plus a ban on deletions and on anything outside the folder you pointed it at. All of it is covered by a test that runs on every change to Patchery itself: offline, in a second, with no AI and no key.
In plain termsEverything below is a link you can open and check for yourself, right now.
It has done this once,
with nobody watching.
One line, in one file, in a real repository
A library called fake-lib went from version 1 to version 2 and made an
argument required that used to be optional. Patchery ran the tests (they failed), read
what the library had changed, rewrote the one line that needed it, checked which files
it had touched, ran the tests again (they passed), and opened this pull request. The
first human to see it was the reviewer.
- files changed1
- lines+1 −1
- testsfailed → passed
- AI turns used11
- total cost$0.1213
And here is the same job done by hand, on two projects we don’t own. No AI was involved in either — they are here because doing this work manually is how we learned what the automated version has to survive.
An SDK that moved on without them
The project was still built on a three-year-old way of calling OpenAI, long since replaced. Three places in one file had to be rewritten, along with how errors and responses are read back.
OpenA library that reached its end of life
Their Gemini integration depended on a Google library that stopped being supported on 30 November 2025. Setting up the client and both ways of querying it had to move to the replacement.
OpenAll three are still open. None has been merged. We will change this sentence the day that changes.
In plain termsYou copy one file into your project, and nothing happens until you press a button.
One file in,
one workflow out.
Patchery is not a service you sign up for. It is a file you put in your own project, running on your own machines, with your own key — which is also why there is nothing for us to charge you for yet.
- 01Put your AI key in the repository’s secrets, as
ANTHROPIC_AUTH_TOKEN. - 02Save the file on the right as
.github/workflows/self-maintain.yml. - 03Start it from the Actions tab. You choose which library it works on.
No scheduler, no background scanning. Nothing runs unless you press the button — that is deliberate, and it is the next thing to change.
Full setup guidename: self-maintain
on:
workflow_dispatch:
inputs:
package: { required: true }
target-dir: { default: "." }
test-command: { default: "npm test" }
permissions:
contents: write
pull-requests: write
jobs:
fix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
working-directory: ${{ inputs.target-dir }}
- id: sma
uses: patchery-dev/Patchery@v0
with:
package: ${{ inputs.package }}
target-dir: ${{ inputs.target-dir }}
test-command: ${{ inputs.test-command }}
anthropic-auth-token: ${{ secrets.ANTHROPIC_AUTH_TOKEN }}
- if: steps.sma.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
with:
branch: self-maintain/${{ inputs.package }}
body-path: ${{ steps.sma.outputs.pr-body-file }}
add-paths: ${{ steps.sma.outputs.files }}
We’d rather you audit us
than trust us.
True today
- Anyone can install it right now, and read every line of it. MIT licensed.
- One pull request opened start to finish with no human in the loop.
- The off-limits check is tested on every change, offline, with no AI.
- Keys and passwords are stripped out before anything is written down.
- Works on JavaScript projects. You decide what counts as a passing test.
Not yet
- Nothing hosted. It runs on your machines, not ours.
- No revenue, no users, no logo wall. Nobody is paying for this.
- No open-source pull request accepted yet — the two below are waiting.
- One library at a time. It won’t untangle a chain of breakages.
- Other languages are plausible, but nobody has proven it.
So here is the page checking itself.
Everything below is written as something that can fail. They run against the real files and the real GitHub API, not against a recording. If one of them ever turns red on this page, the page is wrong — and it will be the first to say so.
Every number on this page comes from a run you can open and read for yourself. And one thing worth saying plainly: the AI reads your code. Check what your model provider does with it before you point this at anything private. The full list of limits →