Graduate a Vibe-Coded Prototype: Production Readiness Prompt
Turn a vibe-coded app or internal tool people now rely on into maintainable software: a spec from real behavior, tests, monitoring, backups, and an owner.
Added
This app started as a vibe-coded prototype and real people now depend on it: [WHO USES IT, HOW OFTEN].
Repo: [PATH OR LINK] · Stack: [STACK] · Hosting: [WHERE] · Data: [WHAT IT STORES]
What breaks or annoys people today: [KNOWN PROBLEMS]
Act as the engineer taking over this codebase. Do NOT rewrite it. Work in these phases and stop after each one for my review.
## Phase 1: Write down what it actually does (read-only)
- List every screen, endpoint, scheduled job, and integration, with one line each.
- Write SPEC.md from the code's real behavior, not intentions: inputs, outputs, business rules, and edge cases you can see.
- Flag behavior that looks accidental ("this rounds prices down, intended?") as questions for me.
## Phase 2: Risk map
Rate each area HIGH / MEDIUM / LOW for "how bad if it breaks" and "how likely it is to break". Cover: data loss, wrong results, auth and permissions, secrets, cost spikes, third-party limits, and single points of knowledge (only one person or one prompt history explains it).
## Phase 3: Safety net before any change
- Characterization tests that lock in current behavior for the HIGH areas (what it does now, even if odd).
- One command that runs all checks: [TEST COMMAND]. Make it pass on the untouched code first.
## Phase 4: Production basics (small PRs, one per item)
- Error handling: no silent failures; user-facing errors say what to do; server errors are logged with context.
- Input validation and limits on every write endpoint.
- Config and secrets in environment variables; a .env.example with every key and no values.
- Logging and one health check; alert [WHO] when it fails.
- Backups of [DATABASE / FILES] and a tested restore (actually restore once).
- Dependency versions pinned; remove unused packages and dead code you can prove is unused.
For the security pass (keys, auth, database rules, rate limits), run a separate security review.
## Phase 5: Handover kit
- README: what it is, how to run it locally, how to deploy, how to roll back.
- RUNBOOK.md: the 5 most likely failures, how to spot each, and the fix.
- AGENTS.md: stack, commands, conventions, and "read SPEC.md first", so future AI sessions keep to the spec.
- OWNERS: who owns it, who is backup, where requests go.
End each phase with: what you found, what you changed, open questions, and the next 3 steps.How to use it
- Click Copy template.
- Paste into ChatGPT, Claude, Grok, Cursor, or your agent framework.
- Replace the [BRACKETED] parts with your details.
FAQ
When does a vibe-coded prototype need to become production software?
As soon as people depend on it: it holds data you can't lose, more than a few people use it daily, it touches money or customer information, or the person who built it is the only one who can fix it. That's the point to add a spec, tests, monitoring, backups, and a named owner.
Should I rewrite a vibe-coded app from scratch?
Usually not. A rewrite throws away behavior people rely on, including edge cases nobody wrote down. Document what it does, lock that in with characterization tests, then fix the riskiest areas in small changes. Rewrite only a part that tests show is beyond repair.
What are characterization tests?
Tests that record what the code does today, even when that behavior is odd, so you notice when a change alters it. They're the safety net that lets you or an AI agent refactor a vibe-coded codebase without silently breaking things users depend on.
How is this different from a security review?
A security review looks for exposed keys, missing auth checks, database rules, and rate limits. This prompt covers maintainability and operations: a spec, tests, error handling, logging, backups, a runbook, and ownership. Run both before calling a prototype production-ready.
Get 3 new templates every week
Free. Unsubscribe anytime.Related templates
Vibe-Coded App Security Review: Keys, Auth, RLS & Limits
Vibe Coding Project Kickoff Prompt
Generate AGENTS.md or CLAUDE.md From Your Repo
Generate Unit Tests Prompt
Safe Refactor Prompt
Explain This Codebase Prompt
Browse all Coding & Cursor Rules templates