# Editorial Content Generator

Generate complete, SEO-optimized HTML content from the provided outline.

---

## INPUT

**CONTENT IDEA:**
[IGNY8_IDEA]

Format provided:
- Title: The article title to use
- Description: Overview of what content should cover
- Content Type: post|page|product|taxonomy
- Content Structure: article|guide|comparison|review|listicle|landing_page|etc
- Primary Focus Keywords: 1-2 main target keywords (if available)
- Covered Keywords: 2-3 supporting keywords (if available)
- Estimated Word Count: Target word count from idea planning (if available)

**KEYWORD CLUSTER:**
[IGNY8_CLUSTER]

**KEYWORDS:**
[IGNY8_KEYWORDS]

---

## OUTPUT FORMAT


{
  "title": "string",
  "meta_title": "string (max 60 chars)",
  "meta_description": "string (max 160 chars)",
  "content": "string (HTML)",
  "word_count": integer,
  "primary_keyword": "string",
  "secondary_keywords": ["string"],
  "tags": ["string"],
  "categories": ["Parent > Child"]
}


---

## CRITICAL REQUIREMENTS

### 1. WORD COUNT AND SECTIONS

**Target word count:**
- If "Estimated Word Count" is provided in [IGNY8_IDEA], target that count (±100 words acceptable)
- Otherwise, default to 1000-1200 words

**Section count:**
- Base: 6 H2 sections (standard)
- For longer targets (1400+ words): Use 7-8 H2 sections
- For shorter targets (800-1000 words): Use 5-6 H2 sections
- Each H2 section: 150-180 words average

**Section breakdown:**
- Introduction: 100-150 words
- Each H2 section: 150-180 words
- Calculate total: (number of H2s × 170) + 125 ≈ target word count

### 2. SECTION FORMAT VARIETY

**Format distribution (scales with section count):**

**For 5-6 H2 sections:**
- 3 sections: Paragraphs ONLY
- 2 sections: Paragraphs + Lists
- 1 section: Paragraphs + Tables

**For 7-8 H2 sections:**
- 4-5 sections: Paragraphs ONLY
- 2 sections: Paragraphs + Lists
- 1-2 sections: Paragraphs + Tables

* Use block quote element randomly in sections where table is not used
* Provide the most insightful information within block quotes

**Rules:**
- Randomize which sections get which format
- Never use same pattern for consecutive sections
- Maximum 2-3 sections can have lists
- Maximum 1-2 sections can have tables
- Lists: 4-5 items, 15-20 words each
- Tables: 4-5 columns, 5-6 rows with real data

### 3. CONTENT DEPTH (NOT surface explanations)

**Every paragraph must:**
- Be 50-60 words 
- Explain HOW/WHY, not just WHAT
- Include specific numbers, examples, mechanisms
- Provide actionable insights

**Lists must contain:**
- 4-5 items maximum
- Each item: 15-20 words
- Specific details with real examples
- Technical specifics (measurements, ranges, capabilities)

**Tables must contain:**
- 4-5 columns
- 5-6 rows 
- Real comparative data (prices, specs, measurements)
- No vague terms (avoid "good", "quality", "effective")

---

## HTML STRUCTURE

### Introduction Format:

<p><em>[Hook: 40-50 words]</em></p>
<p>[Paragraph 1: 50-70 words with primary keyword]</p>
<p>[Paragraph 2: 50-60 words]</p>
<p>[Paragraph 3: 50-60 words]</p>


### H2 Section Format:

<h2>[Heading]</h2>
<p>[Opening: 50-70 words explaining core concept]</p>

<!-- Choose ONE format per section based on variety requirement -->

<!-- Option A: Paragraphs only (use for 2 sections) -->
<h3>[Subheading]</h3>
<p>[60-70 words of detailed explanation]</p>
<h3>[Subheading]</h3>
<p>[60-70 words of detailed explanation]</p>

<!-- Option B: Paragraph + List (use for 1-2 sections max) -->
<h3>[Subheading]</h3>
<p>[50-70 words introducing the list]</p>
<ul>
  <li>[15-20 word item with specific details]</li>
  <!-- 4-5 items total -->
</ul>

<!-- Option C: Paragraph + Table (use for 1-2 sections max) -->
<h3>[Subheading]</h3>
<p>[50-70 words introducing the table]</p>
<table>
<thead>
  <tr><th>Col1</th><th>Col2</th><th>Col3</th><th>Col4</th></tr>
</thead>
<tbody>
  <tr><td>Data</td><td>Data</td><td>Data</td><td>Data</td></tr>
  <!-- 5-6 rows total -->
</tbody>
</table>

<p>[Closing: 50-70 words synthesizing the section]</p>


**Valid HTML tags only:** `<h2>`, `<h3>`, `<p>`, `<em>`, `<strong>`, `<ul>`, `<ol>`, `<li>`, `<table>`, `<thead>`, `<tbody>`, `<tr>`, `<th>`, `<td>`

---

## WRITING RULES

### DO:
✓ Use specific examples, brands, models, numbers
✓ Explain mechanisms and technical details
✓ Include real data (prices, percentages, measurements)
✓ Write naturally with varied sentence length
✓ Use active voice
✓ Connect ideas logically between paragraphs

### DON'T:
✗ Generic openings ("In today's world...")
✗ Repeat H2/H3 in first sentence
✗ Robotic transitions ("First...", "Second...")
✗ Filler phrases ("It's important to note...")
✗ Placeholder content ("Brand A", "Model X", "Data 1")
✗ Paragraphs under 40 words or over 80 words
✗ Lists with more than 6 items or items over 25 words
✗ Tables with more than 5 columns or 6 rows
✗ Writing more than 1200 words total

---

## KEYWORD USAGE

**Primary focus keywords** (from [IGNY8_IDEA] if provided, otherwise identify from title):
- Use in title (already provided in [IGNY8_IDEA])
- Use in intro, meta title/description
- Include in 2-3 H2 headings naturally
- Mention 2-3 times in content (0.5-1% density)

**Covered keywords** (from [IGNY8_IDEA] if provided, otherwise select 3-4 from [IGNY8_KEYWORDS]):
- Distribute across H2 sections
- Use in H2/H3 headings where natural
- 2-3 mentions each (0.3-0.6% density)
- Include variations and related terms

**Total keyword target:** 3-5 keywords (1-2 primary + 2-3 covered)

---

## METADATA

**Meta Title:** Under 60 chars, primary keyword included, action-oriented
**Meta Description:** 140-160 chars, primary keyword, clear value proposition
**Tags:** 5 tags, 2-4 words each, lowercase, topically relevant
**Categories:** 1-2 in format "Parent > Child"

---

## VERIFICATION BEFORE OUTPUT

- [ ] Word count matches Estimated Word Count from [IGNY8_IDEA] (±100 words), or 1000-1200 if not provided
- [ ] Number of H2 sections: 5-8 based on target word count
- [ ] Format distribution scales with section count
- [ ] All paragraphs 50-80 words
- [ ] All lists 4-5 items, 15-20 words each
- [ ] All tables 4-5 columns, 5-6 rows, real data
- [ ] No placeholder content anywhere
- [ ] Primary focus keywords from [IGNY8_IDEA] used correctly (or identified from title)
- [ ] Covered keywords from [IGNY8_IDEA] distributed naturally (or selected from [IGNY8_KEYWORDS])
- [ ] Meta title <60 chars, description <160 chars
- [ ] Valid JSON with escaped quotes

---

## IMPORTANT

Return ONLY valid JSON. No explanatory text. Ensure word_count reflects actual content words.