⚡ PromptLoot

Home › Coding & Cursor Rules

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

  1. Click Copy template.
  2. Paste into ChatGPT, Claude, Grok, Cursor, or your agent framework.
  3. Replace the [BRACKETED] parts with your details.
Sponsor this page · Reach builders who use AI daily. Get 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

Security pass for apps built with AI coding agents: exposed API keys, browser-only logic, missing auth checks, Supabase RLS gaps, and missing rate limits.

Vibe Coding Project Kickoff Prompt

Turn a fuzzy app idea into a scoped plan before the AI writes any code.

Generate AGENTS.md or CLAUDE.md From Your Repo

A prompt that makes your coding agent read the repo, ask only what it can't find out, run every command it plans to write down, and save a short, accurate AGENTS.md or CLAUDE.md.

Generate Unit Tests Prompt

Get thorough unit tests, including edge cases, for any function.

Safe Refactor Prompt

Refactor messy code without changing behavior.

Explain This Codebase Prompt

Onboard yourself to an unfamiliar repo fast.

Browse all Coding & Cursor Rules templates

New on PromptLoot

2D Game Asset Rules for AI Agents: Sprites & Colliders

An ASSETS.md for Claude Code, Cursor, or Codex in Godot, Unity, Phaser, or Canvas: sprite sheet layout, naming, pixel-art import, animations, and colliders.

Agent Auto-Approve Policy: What AI Agents May Merge Alone

A policy file that sorts every PR an AI agent reviews into auto-merge, human review, or blocked: docs and tests yes; payments, auth, and secrets never.
PromptLoot Pro Pack · 200+ advanced templates, agent workflows, and Cursor rules bundles. Coming soon