Rescue vs rewrite
Rescue when the product surface works and the risk sits in security, auth, data, payments, or deploy. That can be a fixed scope. Rewrite when the structure, the tenancy model, or the number of defects means every patch makes the next one harder. We do not pick a side before we have read the code.
Rescue is the better bet when
- Users already validate the workflow or UI
- Core domain logic is understandable
- Failures cluster in secrets, auth, RLS, Stripe, deploy
- A senior engineer can map a 1–3 week fixed scope
A rewrite is the better bet when
- Nobody can explain data flow or tenancy
- Security issues are structural, not local
- Every AI edit causes regressions across the tree
- Diligence or regulation demands a clean provenance story
How we decide
The 48-hour diagnostic is a keep / harden / rebuild recommendation with the evidence ranked. It is not a script for a sales call. The tone of a write-up is in sample-audit.md.