<- All posts

Usero Journal

AI-Generated PRs From User Feedback: How It Works

Will Smith··8 min read

An AI-generated PR from user feedback is a draft GitHub pull request that a tool opens automatically after it collects a user request, clusters the duplicates into one signal, reads your connected repo, and drafts a first-pass code change to address it.

The pipeline is short and it is not magic. Feedback comes in through a widget. Similar messages get grouped into a single signal. That signal is translated into a small spec. The system reads your repo, finds the files that need to change, and opens a draft pull request with a first attempt. Then a human reviews and merges. The AI does the boring middle; you keep the judgment.

This guide walks the whole pipeline stage by stage, shows what the AI handles well versus what still needs a person, and stays honest about the limits. The honesty is the point: a tool that pretends to ship merge-ready features autonomously is lying, and you will find out the hard way on your first bad merge.

The Pipeline, Stage by Stage

Every “feedback to PR” system runs roughly these six stages. Once you can name them, you can tell the real thing from a demo that only works on a hand-picked example.

1. Collect feedback in context

A widget on your site captures the user’s message plus context: the URL they were on, their user ID, browser, and optionally a screenshot or short session replay. Context matters here for a reason most people miss. The richer the signal at collection time, the more precisely the later stages can scope a change. “The save button does nothing” with a URL and a replay is a fixable lead; the same words with no context are a guessing game.

2. Cluster duplicates into one signal

Ten users describe the same broken thing ten different ways. Before anything touches code, the system groups those into a single cluster so you are reasoning about one problem, not ten tickets. This is unglamorous and it is the step that makes the rest tractable. A PR should map to a problem, not to a single user’s phrasing, and clustering is what gives you that clean one-to-one.

3. Translate the cluster into a spec

The cluster gets turned into a short, concrete change description: what the user wants, where it likely lives, and what “done” looks like. This is the bridge between fuzzy human language and a code task. If a cluster cannot be reduced to a crisp spec (because it is vague or huge), an honest system stops here and leaves it as feedback rather than forcing a low-quality diff. A bad spec guarantees a bad PR.

4. Read the repo and locate the change

With a spec in hand, the system reads your connected GitHub repo and finds the files that actually need to change. It does not stuff your whole codebase into one prompt. It locates the handful of relevant files, reads the surrounding code, picks up your naming conventions and framework, and figures out where the edit belongs. This localization step is what separates a plausible diff from a diff that fits your project.

5. Draft the PR

The system writes a first-pass implementation and opens it as a draft pull request, with a title, a description that links back to the feedback, and a diff scoped to the files it identified. The word that matters is draft. It is a starting point that has already done the file-finding and scaffolding, not a finished, tested, edge-case-proof change. On a typo or a copy fix it is often nearly done. On anything bigger it is a head start, not the finish line.

6. Human review and merge

You read the diff, run your tests, and merge or close. Nothing ships automatically. This is the load-bearing stage, not a formality. Keeping a person at the merge button is exactly what makes the earlier automation safe to use: a wrong draft costs you a glance, not an incident, because you never handed the model the keys to production.

The AI does not replace your engineering judgment. It removes the cold start. You stop staring at a blank diff and start reviewing one.

What AI Does Well vs What Still Needs a Human

Confidence here is a rough read on how often the draft is close to mergeable as-is. The pattern is consistent: the more local and concrete the change, the better the AI does, and the less you have left to finish.

Task typeExample feedbackAI confidenceHuman effort to finish
Typo / copy fix“Button says Recieve”HighGlance and merge
Config / default change“Default page size should be 50”HighQuick sanity check
Small component / UI tweak“Add an empty state to the list”MediumReview, adjust styling
New feature“Let me export my data as CSV”Low to mediumReal implementation work
Architectural change“Make the whole app faster”Not a PRHuman owns it end to end

Why It Drafts Instead of Merging

The obvious question is why not just let the AI merge the easy ones. The answer is that the cost of a wrong merge and the cost of a wrong draft are wildly different, and the gap is the entire reason this approach is safe to use.

  • A wrong draft is free. You close it. Same cost as dismissing a bad suggestion in code review. No one notices.
  • A wrong merge is expensive. It ships to users, breaks something subtle, and you find out from the next round of feedback. The blast radius is real.
  • Review is where context lives. You know the edge case the model does not: the legacy customer on the old plan, the migration in flight, the test that is flaky for unrelated reasons. That context is hard to encode and easy to apply in a two-minute review.
  • Trust compounds the right way. After you have merged twenty clean typo PRs, you skim them faster. The human step gets cheaper as your confidence grows, which is the opposite of handing over the keys on day one.

Any vendor promising fully autonomous “feedback to production” with no review step is selling you a future bug report. The draft-plus-review shape is not a limitation to apologize for. It is the design.

Setting It Up In Practice

The plumbing is less work than it sounds. Three things have to be true before a piece of feedback can become a draft PR.

  1. Collect feedback with context. Drop the widget into your app so messages arrive with a URL, user ID, and ideally a replay. The open source SDK adds to a React app in three lines.
  2. Connect the GitHub repo. Authorize the repo you want PRs opened against. This is what lets the system read your files and open a draft, scoped to your conventions.
  3. Let clusters mature, then trigger a PR. When a cluster is concrete and well-described, turn it into a draft PR with one action, review the diff, and merge. Start with the small fixes to calibrate your trust before you point it at anything bigger.

Related Reading

If You Want To Try Usero

This is exactly what Usero does. Collect feedback through the widget, connect a GitHub repo, and watch the top clustered request become a draft pull request you review and merge. The SDK is open source on npm, the free tier is real, and setup takes a single afternoon. Connect a repo and turn your next user request into a draft PR this week.

Frequently Asked Questions

Can AI really write a pull request from user feedback?

Yes, but with a specific scope. The AI reads a clustered feedback signal, locates the relevant files in your connected repo, and opens a draft pull request with a first-pass implementation. It is genuinely useful for typo and copy fixes, config changes, and small self-contained components. It is not an autonomous engineer that ships features while you sleep.

Is AI-generated code safe to merge?

Not without review. The PR opens as a draft on purpose. You read the diff, run the tests, and decide. Treat it exactly like a pull request from a fast junior developer who has read the codebase but does not know the edge cases. The safety comes from the human-in-the-loop step, not from trusting the model blindly.

How does the AI know my codebase?

You connect a GitHub repo once. When a feedback cluster is ready to become a PR, the system pulls the relevant files, reads the surrounding code, your naming conventions, and your framework, then scopes the change to fit. It does not need your whole repo in one prompt; it locates the few files that matter and works from those.

What kinds of feedback can become a PR?

The best fits are concrete and local: a confusing label, a broken validation message, a missing empty state, a wrong default, a small UI tweak. Vague feedback (&ldquo;the app feels slow&rdquo;) and large architectural requests do not become clean PRs. The system is honest about this and will leave fuzzy clusters as feedback rather than forcing a bad diff.

Do I still review the code?

Always. Every PR is a draft and nothing merges automatically. You are the reviewer and the merge button. The value is that the boring 80 percent (finding the file, writing the scaffolding, matching your conventions) is already done, so you spend your time judging correctness instead of starting from a blank diff.

What does it cost?

There is a real free tier, not a countdown trial, so you can collect feedback and try a draft PR without paying. Paid plans start at 19 dollars a month and add volume, more repos, and faster turnaround. The SDK that collects the feedback is open source on npm.

What happens if the AI gets it wrong?

Nothing ships. A wrong draft PR is a draft you close, the same cost as ignoring a bad suggestion in code review. Because the change is scoped to a few files and opened as a draft, a miss is cheap. You lose a glance, not a production incident, which is the whole point of keeping the human at the merge step.

Build a feedback loop your team actually uses

Usero collects, clusters, and turns user feedback into shipped fixes.

Get started free