# Step Dependencies Logic

## Required Completion Order

**Step 0: User Input**
- No dependencies
- Must fill: Article Title (required)

**Step 1: Article Focus**
- Requires: Step 0 completed (Article Title filled)

**Step 2: Research Topic**
- Requires: Step 0 (Article Title) AND Step 1 Prompt Result filled

**Step 3: Community Intel**
- Requires: Step 0 (Article Title) AND Step 1 Prompt Result filled

**Step 4: SEO Questions**
- Requires: Step 0 (Article Title) AND Step 1 Prompt Result filled

**Step 5: Article Structure (Optional)**
- Requires: Steps 0, 1, 2, 3, AND 4 Prompt Results all filled
- This step is OPTIONAL - users can skip it
- Generates: Technical explanations, article structure, suggestions, and refined prompt

**Step 6: Generate Article**
- Requires: Steps 0, 1, 2, 3, AND 4 Prompt Results all filled (Step 5 is optional)
- If Step 5 result exists, it will be appended to the prompt automatically

**Step 7: Diagram Designer**
- Requires: Step 0 (Article Title) AND Step 6 Prompt Result filled

**Step 8: Featured Image**
- Requires: Step 0 (Article Title) AND Step 6 Prompt Result filled

**Step 9: SEO Meta Data**
- Requires: Step 0 (Article Title) AND Step 6 Prompt Result filled

## Error Message Rules

If user navigates to a step without required completions:
- Show light red background message instead of Generated Prompt
- Message format: "To show this prompt, you must first complete: [list missing items]"

Missing items can be:
- "User Input (Article Title)"
- "Step X Prompt Result"
