4 ms·
Show HN: Patchwork – Open-source framework to automate development gruntwork
Hi HN! We’re Asankhaya and Rohan and we are building Patchwork.
Patchwork tackles development gruntwork—like reviews, docs, linting, and security fixes—through customizable, code-first 'patchflows' using LLMs and modular code management steps, all in Python. Here's a quick overview video: https://youtu.be/MLyn6B3bFMU https://youtu.be/MLyn6B3bFMU
From our time building DevSecOps tools, we experienced first-hand the frustrations our users faced as they built complex delivery pipelines. Almost a third of developer time is spent on code management tasks[1], yet backlogs remain.
Patchwork lets you combine well-defined prompts with effective workflow orchestration to automate as much as 80% of these gruntwork tasks using LLMs[2]. For instance, the AutoFix patchflow can resolve 82% of issues flagged by semgrep using gpt-4 (or 68% with llama-3.1-8B) without fine-tuning or providing specialized context [3]. Success rates are higher for text-based patchflows like PR Review and Generate Docstring, but lower for more complex tasks like Dependency Upgrades.
We are not a coding assistant or a black-box GitHub bot. Our automation workflows run outside your IDE via the CLI or CI scripts without your active involvement.
We are also not an ‘AI agent’ framework. In our experience, LLM agents struggle with planning and rarely identify the right execution path. Instead, Patchwork requires explicitly defined workflows that provide greater success and full control.
Patchwork is open-source so you can build your own patchflows, integrate your preferred LLM endpoints, and fully self-host, ensuring privacy and compliance for large teams.
As devs, we prefer to build our own ‘AI-enabled automation’ given how easy it is to consume LLM APIs. If you do, try patchwork via a simple 'pip install patchwork-cli' or find us on Github[4].
Sources:
[1] https://blog.tidelift.com/developers-spend-30-of-their-time-on-code-maintenance-our-latest-survey-results-part-3 https://blog.tidelift.com/developers-spend-30-of-their-time-...
[2] https://www.patched.codes/blog/patched-rtc-evaluating-llms-for-diverse-software-development-tasks https://www.patched.codes/blog/patched-rtc-evaluating-llms-f...
[3] https://www.patched.codes/blog/how-good-are-llms https://www.patched.codes/blog/how-good-are-llms
[4] https://github.com/patched-codes/patchwork https://github.com/patched-codes/patchwork
[Sample PRs] https://github.com/patched-demo/sample-injection/pulls https://github.com/patched-demo/sample-injection/pulls
- SOLAR_FIELDS 2y agoA feature comparison to https://github.com/paul-gauthier/aider https://github.com/paul-gauthier/aider would be great. Is this just a non interactive version of this kind of agent?
- rohansood15 2y agoAider is great, but the use case is different: 1. You use Aider to complete a novel task you're actively working on. Patchwork completes repetitive tasks passively without bothering you. For e.g. updating a function v/s fixing linting errors. 2. Aider is agentic, so it figures out how to do a task itself. This trades accuracy in favor of flexibility. With patchwork, you control exactly how the task is done by defining a patchflow. This limits the set of tasks to those that you have pre-defined but gives much higher accuracy for those tasks. While the demo shows CLI use, the ideal use case patchwork is as part of your CI or even a serverless deployment triggered via event webhooks. Hope this helps? :)
- danielhanchen 2y agoOh this is really cool and great name! Will definitely try this out!
- bsima 2y agoYall know there’s a popular oss project called patchwork right https://patchwork.readthedocs.io/en/latest/ https://patchwork.readthedocs.io/en/latest/
- rohansood15 2y agoThere are a few open source projects by the name and we were aware of https://github.com/ssbc/patchwork https://github.com/ssbc/patchwork which is archived. Didn't know of this though. It's a common noun which works really well for patch-based offerings I guess, and we chose it because we built a 'framework to patch code'. But we'll think more about this - thanks for bringing it up.
- 2y ago