Implement-patch is used after independent validation confirms one bug claim. The agent checks that a repair scope exists, identifies the invariant that was broken, and searches inside its boundary for every other instance of the same violation.
It writes a regression test that fails on the baseline, makes the smallest reviewable fix, reruns the full suite, and records every variant as fixed or not fixed. The result is one local commit, two patch files and a patch record with a manifest.
What You Get
- A single local commit that carries the fix and its regression test
- fix.patch for production changes and tests.patch for test changes, taken from the baseline
- A patch.json with both commit SHAs, file and line counts, variants, suite results and the agent identity
- A manifest covering the whole attempt directory
Common Use Cases
- Repairing a bug that a validator has confirmed
- Finding sibling instances of the same invariant violation before closing a bug
- Retrying a repair after a prover rejected an earlier attempt
What Makes It Unique
The skill refuses to start when the record check fails and returns an inconclusive report with the errors. It asks for the invariant to be fixed, so every instance in the declared boundary is searched, and it requires the regression test to be seen failing before the fix. It stops at one local commit and never pushes or opens a pull request.
Under The Hood
The agent reads a short SKILL.md and a record contract shared with the other patching stages. It runs a bundled Python record validator through uv before editing and again to write a manifest. It runs the project’s own test suite before and after, edits source and test files, creates one Git commit and writes patch files and a JSON record. It makes no network calls and never pushes.