coding

Prototype to Production

The prototype works and the concept is validated — now harden it for production. This prompt walks through the unglamorous work of turning a vibe-coded draft into code you'd actually ship.

44 lines
1# Prototype to Production
2 
3We have a working prototype. The concept is validated. Now we need to turn this into production-quality code without losing what makes it work.
4 
5## The rules
6 
71. **Don't redesign.** The prototype captures hard-won design decisions. Preserve every interaction, layout choice, and flow exactly as they are unless I explicitly say otherwise.
82. **Harden, don't reimagine.** Your job is to make this code reliable, maintainable, and safe — not to improve the product. Resist the urge to "clean up" the UX.
9 
10## Audit first, then fix
11 
12Before changing anything, do a full audit. Organize findings into four categories:
13 
14### Security
15- Input validation and sanitization
16- Authentication/authorization gaps
17- XSS, injection, CSRF exposure
18- Secrets or credentials in code
19- Unsafe data handling
20 
21### Reliability
22- Error states that crash instead of recovering gracefully
23- Missing loading states
24- Race conditions and stale data
25- Unhandled edge cases from the prototype phase
26- Network failure handling
27 
28### Performance
29- Unnecessary re-renders or recomputation
30- Missing memoization on expensive operations
31- Bundle size concerns (lazy loading, code splitting)
32- Images and assets unoptimized
33 
34### Maintainability
35- Dead code and prototype scaffolding to remove
36- Types that are `any` or missing
37- Components that do too many things
38- Test coverage gaps for core flows
39 
40## How to proceed
41 
42Present the audit as a checklist with severity (critical / important / nice-to-have). Then fix them in that priority order, one category at a time. After each category, pause for my review.
43 
44Do not refactor code that works correctly and isn't a security or reliability risk. Ship the prototype's soul in a production-grade body.