Generate all 8 docs from confirmed analysis. Wave 1: 5 technical docs. Wave 2: Q&A. Wave 3: 3 business docs.
Prerequisites
Read progress.txt — must show STATUS: analysis_complete. If not, redirect to vibe-coding-re-analyze.
Wave 1 — 5 Technical Docs from Code
Generate without questions. Delegate to the relevant doc skill for each:
- TECH_STACK.md → activate
vibe-coding-doc-techstackwith analysis data - BACKEND_STRUCTURE.md → activate
vibe-coding-doc-backendwith models + endpoints - FRONTEND_GUIDELINES.md → activate
vibe-coding-doc-frontendwith detected patterns (document ACTUAL patterns, not idealized) - DESIGN_SYSTEM.md (partial) → activate
vibe-coding-doc-designwith CSS vars + font names. Mark tokens as inferred vs. explicitly found. - APP_FLOW.md (partial) → activate
vibe-coding-doc-appflowwith route/page list
If a sub-skill fails: mark "FAILED — [reason]", continue with remaining docs, add to Q&A gap list.
After Wave 1:
WAVE 1 COMPLETE — 5 technical docs generated.
Generated: ✓ TECH_STACK.md | ✓ BACKEND_STRUCTURE.md | ✓ FRONTEND_GUIDELINES.md
✓ DESIGN_SYSTEM.md (partial) | ✓ APP_FLOW.md (partial)
Now I need ~[N] business context questions to complete the remaining 3 docs. Ready? (yes/no)
Wave 2 — Business Context Q&A
Ask ONE question at a time. Required questions:
- "What problem does this product solve? Who has this problem?"
- "Who are your target users? Describe the primary persona."
- "What are the 3 most important things this product does right now?"
- "What's the business model? (SaaS subscription, ecommerce, freemium, one-time purchase, etc.)"
- "What metrics define success for this product?"
Conditional (ask based on gaps from analysis):
- APP_FLOW low confidence: "Walk me through the main user journey from [entry] to [goal]."
- Auth roles unclear: "What user roles exist? What can each role do?"
- Complex logic purpose unclear: "What does [module] do from a business perspective?"
- Integrations purpose unclear: "I see [Stripe/etc] integrated — what features use it?"
- Incomplete features detected: "I see [TODO/incomplete]. Is this intentional or WIP?"
- Design system inconsistent: "Want to clean up the design system as part of this project?"
Wave 3 — 3 Business Docs
After Q&A completes, generate docs ONE AT A TIME with approval between each:
-
PRD.md → activate
vibe-coding-doc-prd. Flag features found in code not mentioned in Q&A — check if still needed. After generation: "PRD generated. Approve or request revisions?" -
Enhanced DESIGN_SYSTEM.md → fill Wave 1 partial doc with Q&A answers. After generation: "DESIGN_SYSTEM.md updated. Approve or request revisions?"
-
Enhanced APP_FLOW.md → fill Wave 1 partial doc with Q&A answers. After generation: "APP_FLOW.md updated. Approve or request revisions?"
-
IMPLEMENTATION_PLAN.md → activate
vibe-coding-doc-implplanwithmode: enhancement(plan WHAT'S NEXT, not rebuilding from scratch). After generation: "IMPLEMENTATION_PLAN.md generated. Approve or request revisions?" -
CLAUDE.md → activate
vibe-coding-doc-claudemd. After generation: "CLAUDE.md generated. Approve or request revisions?"
Wait for user approval at each step before proceeding to the next doc.
Completion
REVERSE-ENGINEERING COMPLETE — all 8 docs in ./docs/
What next?
1. Add new features → IDEATE phase
2. Improve existing code → BUILD phase
3. Fix design inconsistencies → vibe-coding-doc-design + vibe-coding-css-setup
4. Just keep the docs → Exit
Write to progress.txt:
PHASE: REVERSE-ENGINEER
STATUS: complete
docs_generated: 8
entry_point: [user's choice 1-4]