
Hardening a vibe-coded MVP without a rewrite
The product has users, and every change breaks something nobody expected. This is the repair-in-place path: pin what the paths users depend on do today, then propose one small change at a time, each read and merged or sent back by a named reviewer on your side.
The short answer
You make a working AI-built MVP stable by repairing it in place.
First pin what the paths your users depend on do today with tests, then change the code in small proposed diffs, one at a time. A named reviewer on your side merges or sends back each diff, and the product keeps serving users throughout.
Why does every change seem to break something?
Your product has users and earns its keep. Each new change breaks something nobody expected, and nobody can say which parts are safe to touch, because the code grew faster than anyone's grasp of it. Starting over looks tempting. Meanwhile the product still has to serve those users every day, and a rebuild has to reproduce every behaviour they rely on, including the ones nobody ever wrote down.
Who is repair in place for?
A founder or a small team whose product was built mostly with AI, works, has users, and now has to survive the next round of changes. You may already hold a list of what is wrong from the assessment checklist page in this series, or you are about to get one. What you want next is the product fixed where it stands, with someone on your side approving each change.
What does repair in place touch, and what does it leave alone?
The work is confined to the code you already have, in pieces your owner put on the list. Everything else keeps running as it is.
| Part of the product | Before anything changes | What the agent proposes | Who decides |
|---|---|---|---|
| A path your users depend on | Its current behaviour is pinned by tests | A change only once the pinning tests pass on the current code | Your reviewer, diff by diff |
| A part named in an accepted finding | On the owner's list, in the owner's order | One small diff with its reason, the finding it closes and its test results | Owner sets the order; reviewer merges or sends back |
| Secrets sitting in the code | Recorded where they sit | A diff that moves them out of the code | Your reviewer |
| Working code no finding names | Left exactly as it is | Nothing | Your owner, by adding a finding |
| A part repair cannot make safe | Evidence gathered on why | A written flag and no diff | Your owner, part by part |
| Merging into your main code | Held | Never merges its own work | A named reviewer, every time |
How it works, step by step
Start from the accepted findings
Pin current behaviour first
Propose one small change at a time
Leave the rest running
Human gate: your reviewer merges or sends back
Record why each change was made
Flag what repair cannot fix
What limits does repair in place keep?
Proposals only
Every diff goes through code review by a person on your side, who merges it, with no exception for small or urgent diffs.
The accepted list is the scope. Scope grows only when your owner adds a finding to it.
No production access
The agent holds no production credentials, and access to the repository is whatever you grant.
No promise about every part
Where a part cannot be saved, the evidence goes to your owner, who decides.
Where this fits
Repair in place is the change path through Mercury's MVP-to-Stable service, meant for a product that works, has users and now needs to hold up under change. It picks up where the assessment checklist stops. Parts of the product that live outside your code, on systems nobody documented, are handled on a sibling page. Once the product holds, the question turns to which work around it agents could run. The use-case library covers that, starting with its readiness checklist for a workflow.
Repair in place or rewrite: how do the two compare?
A rewrite can be the right call for one part, and this comparison does not argue otherwise. Where a part does have to be replaced, that can happen gradually too: Strangler Fig is the name Martin Fowler gave to a gradual approach to legacy modernization.
| Question | Rewrite from scratch | Repair in place |
|---|---|---|
| What users run meanwhile | The existing product, while the new one is built alongside | The existing product, improving one reviewed diff at a time |
| Where current behaviour is recorded | Rediscovered and rebuilt | Pinned by tests before each change |
| Unit of review | The new system, at cutover | One small diff |
| Fits when | Your owner decides, on evidence, that a part cannot be made safe where it stands | The paths users depend on can be pinned and changed piece by piece |
Related reading
- Approval gates: how to decide which step needs a named person's sign-off.
- Proactive drafting: another case where the agent drafts and nothing takes effect until a person promotes it.
- Plans vs routines: why a finite job like hardening is run differently from a recurring process.
