This commit is contained in:
IGNY8 VPS (Salman)
2026-01-20 20:24:05 +00:00
parent f91af0744c
commit 3398130bff
4 changed files with 0 additions and 4682 deletions

View File

@@ -1,115 +0,0 @@
# Cleanup Summary - January 13, 2026
## ✅ Test Files Removed
### Test Directories Deleted:
- `igny8_core/modules/optimizer/tests/` - All optimizer test files
- `igny8_core/modules/linker/tests/` - All linker test files
- `igny8_core/ai/functions/tests/` - AI function tests
- `igny8_core/ai/tests/` - AI module tests
- `igny8_core/api/tests/` - API integration tests
- `igny8_core/business/publishing/tests/` - Publishing tests (including deprecated SiteBlueprint tests)
- `igny8_core/business/billing/tests/` - Billing tests
- `igny8_core/business/integration/tests/` - Integration tests
- `igny8_core/business/content/tests/` - Content pipeline tests
- `igny8_core/business/optimization/tests/` - Optimization tests
- `igny8_core/business/linking/tests/` - Linking tests
### Test Config Files Removed:
- `igny8_core/test_settings.py` - Test-specific Django settings
**Total:** ~38 test files removed across 11 directories
---
## ✅ SiteBlueprint/SiteBuilder Cleanup Status
### Database:
- ✅ Table `igny8_site_blueprints` - **DROPPED** (migration 0030)
- ✅ All indexes removed
- ✅ Sequence dropped
- ✅ No foreign key constraints remain in active models
### Code References:
- ✅ No active model definitions (SiteBlueprint, PageBlueprint, SiteBlueprintTaxonomy)
- ✅ No directory `/business/site_building/` exists
- ✅ No admin registrations
- ✅ No URL endpoints
- ✅ No API serializers with active references
- ✅ No celery tasks referencing blueprints
### Remaining References (Comments Only):
- Historical migration files (0001_initial.py, etc.) - **LEFT INTACT** (should never be modified)
- Code comments marking removal - **LEFT INTACT** (documentation of changes)
- Docstrings explaining legacy functionality - **LEFT INTACT** (helpful context)
### Services Updated:
- `content_sync_service.py` - SiteBlueprint taxonomy sync replaced with stub
- `sync_health_service.py` - Taxonomy mismatch detection replaced with stub
- `publisher_service.py` - Already had SiteBlueprint publishing removed
- `deployment_service.py` - Already marked as deprecated
---
## ✅ One-Time Fix Files Analysis
### Migration Fix Files Found (NOT REMOVED - Required for Database History):
- `0002_fix_cluster_unique_constraint.py` - Cluster model constraint fix
- `0012_fix_subscription_constraints.py` - Subscription model constraints
- `0020_fix_historical_account.py` - Historical tracking fix
- `0003_phase1b_fix_taxonomy_relation.py` - Taxonomy relation fix
- `0007_fix_cluster_unique_constraint.py` - Another cluster fix
- `0022_fix_historical_calculation_mode_null.py` - Billing calculation fix
- `0009_fix_variables_optional.py` - System variables fix
- `0006_fix_image_settings.py` - Image settings fix
- `0004_fix_global_settings_remove_override.py` - Global settings fix
**Note:** Migration files are never deleted - they form the database schema history.
---
## 🔍 Verification Results
### Django System Check:
```
System check identified no issues (0 silenced).
```
### Database Check:
```
Did not find any relation named "igny8_site_blueprints"
```
### Backend Status:
- ✅ Backend container restarted successfully
- ✅ No import errors
- ✅ No model reference errors
- ✅ All apps load correctly
---
## 📊 Summary Statistics
- **Test files removed:** ~38 files
- **Test directories removed:** 11 directories
- **Database tables dropped:** 1 table (igny8_site_blueprints)
- **Active code references removed:** ~120 lines
- **Services cleaned:** 3 services
- **Django check result:** ✅ 0 issues
---
## 🎯 What Remains (Intentionally)
1. **Historical Migrations:** All migration files preserved (required for database integrity)
2. **Code Comments:** Documentation of removed features (helpful for understanding)
3. **Migration Fix Files:** Database schema fixes (part of migration history)
4. **Docstrings:** Legacy documentation in deprecated functions
---
## ✅ Cleanup Complete
All test files removed, SiteBlueprint/SiteBuilder functionality fully cleaned from active codebase.
Database table dropped successfully. System verified and running without issues.

View File

@@ -1,232 +0,0 @@
# 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.

View File

@@ -1,267 +0,0 @@
# SEO Content Idea Generator
You are a content strategist. Generate content ideas and simple outlines for keyword clusters. The actual content will be written by a separate system.
---
## INPUT FORMAT
**Clusters to analyze:**
[IGNY8_CLUSTERS]
**Keywords in each cluster:**
[IGNY8_CLUSTER_KEYWORDS]
---
## OUTPUT REQUIREMENTS
Generate **3-7 content ideas per cluster** based on the number of unique major topics within the cluster:
- Analyze the cluster keywords to identify distinct major topics
- Generate one idea per major topic (not for minor keyword variations)
- Each idea must target completely different major topics/angles
**Important**:
- Focus on **major topic differences**, not minor keyword variations
- Each idea must cover **completely different keywords** from the cluster
- Generate fewer ideas for focused clusters, more for broad clusters
---
## OUTPUT JSON OBJECT STRUCTURE
{
"ideas": [
{
"title": "[Compelling title with primary focus keyword]",
"description": {
"overview": "[2-3 sentence description of what this content covers and its unique angle]",
"outline": {
"intro_focus": "[What the introduction should establish]",
"main_sections": [
{
"h2_topic": "[Section topic/angle]",
"coverage": "[What this section should cover - 1 sentence]"
}
]
}
},
"primary_focus_keywords": "[1-2 main keywords this content targets, comma-separated]",
"covered_keywords": "[2-3 additional supporting keywords, comma-separated]",
"content_type": "post|page",
"content_structure": "guide_tutorial|how_to|comparison|review|top_listicle|question",
"cluster_id": "[Cluster ID number]",
"estimated_word_count": "[AI determined based on sections and keyword coverage]"
}
]
}
---
## KEYWORD REQUIREMENTS
### Primary Focus Keywords (1-2 per idea)
The main keywords this content primarily targets:
- **MUST appear in the title**
- **MUST appear in at least 2 different H2 section headings**
- These drive the content's core topic
- These have the highest search priority
### Covered Keywords (2-3 per idea)
Additional supporting keywords from the cluster:
- Include related search terms from cluster
- Include natural variations and long-tail keywords
- Should also appear in H2 section headings where natural
**Total Keywords Per Idea**: 3-5 maximum (1-2 primary + 2-3 covered)
### Keyword Distribution Strategy
- **Each of the ideas must cover completely different keywords**
- **Focus on major topic differences, not minor variations**
- Minimize overlap between ideas in the same cluster
- Each idea should target a distinct subtopic within the cluster
**Example for "Email Marketing" cluster:**
**Idea 1**: "How to Build an Email List from Scratch"
- primary_focus_keywords: "email list building"
- covered_keywords: "subscriber acquisition, lead magnets"
- Total: 3 keywords covering list growth subtopic
**Idea 2**: "Best Email Marketing Platforms Compared"
- primary_focus_keywords: "email marketing platforms"
- covered_keywords: "email software, automation tools"
- Total: 3 keywords covering platform selection subtopic
**Idea 3**: "Email Campaign Strategy Guide"
- primary_focus_keywords: "email campaigns"
- covered_keywords: "campaign optimization, conversion tactics"
- Total: 3 keywords covering campaign execution subtopic
---
## CONTENT STRUCTURE TYPES
### Guide/Tutorial
- **Purpose**: Step-by-step educational content
- **Coverage**: Process-oriented, actionable steps
- **Sections**: AI determines based on content depth and keywords
### How-To
- **Purpose**: Solve a specific problem
- **Coverage**: Problem → solution framework
- **Sections**: AI determines based on complexity
### Comparison
- **Purpose**: Compare options/alternatives
- **Coverage**: Feature analysis, pros/cons, recommendations
- **Sections**: AI determines based on items compared
### Review
- **Purpose**: Evaluate specific products/services
- **Coverage**: Features, testing, verdict
- **Sections**: AI determines based on review depth
### Top Listicle
- **Purpose**: Curated ranked list
- **Coverage**: Criteria, ranked items, selection guide
- **Sections**: AI determines based on list size
### Question
- **Purpose**: Answer specific query
- **Coverage**: Question → context → answer → implications
- **Sections**: AI determines based on answer complexity
---
## WORD COUNT DETERMINATION
**AI must determine estimated_word_count based on:**
- Number of H2 sections outlined
- Number of keywords to be covered (3-5 total)
- Content structure complexity
- Topic depth requirements
**Guideline**: More sections + more keywords = higher word count
**Range**: Typically 1200-1800 words, but AI decides the optimal length
---
## OUTLINE REQUIREMENTS
For each idea, provide:
1. **Intro Focus**: What angle/hook the introduction should take (1 sentence)
2. **Main Sections**: Variable number of H2 topics based on content needs
- **CRITICAL**: Primary focus keywords must appear in at least 2 different H2 section headings
- Each covered keyword should appear in H2 headings where natural
- Integrate keywords naturally into section titles
- 1 sentence on what each section should cover
- AI determines optimal section count for topic coverage
- No need for H3 breakdown (content generator will handle)
- No formatting details (content generator will handle)
3. **Section approach**:
- Foundation/basics sections (if needed)
- Core concept sections (main body)
- Application/implementation sections
- Advanced/future sections (if appropriate)
- AI determines which sections are necessary
---
## SECTION COUNT DETERMINATION
**Must contain 6 - 10 H2 sections based on:**
- Content structure type requirements
- Number of keywords to cover (3-5 total)
- Topic complexity and depth
- Natural content flow
**evaluate each idea independently**
---
## TITLE GUIDELINES
- **MUST include primary focus keywords (1-2 keywords)**
- 50-65 characters ideal
- Compelling and specific
- Match content structure type:
- How-to: "How to [Action] [Object/Goal]"
- Comparison: "[X] vs [Y]: Which Is Better?"
- Review: "[Product/Service] Review: [Key Benefit]"
- Listicle: "[Number] Best [Items] for [Purpose]"
- Question: "[Question Using Primary Keyword]?"
- Guide: "[Complete/Ultimate] Guide to [Topic]"
---
## CONTENT ANGLE REQUIREMENTS
Each idea must have a **unique angle**:
✓ Different content structure types across ideas
✓ Different major topics (not just minor keyword variations)
✓ Different target intents (informational, commercial, navigational)
✓ Different depth levels (overview vs deep-dive)
✓ No duplicate section topics across ideas in same cluster
**Completely different keyword sets targeting distinct subtopics**
---
## GENERATING 3-7 IDEAS
**Decision criteria for idea count:**
- **3 ideas**: Narrow, focused cluster with 1-3 major subtopics
- **4-5 ideas**: Moderate cluster with 4-5 major subtopics
- **6-7 ideas**: Broad cluster with 6+ distinct major subtopics
**What counts as a major topic difference:**
✓ List building vs Platform selection vs Campaign strategy (MAJOR - generate separate ideas)
✓ "Best tools" vs "Top platforms" (MINOR variation - combine into one idea)
✓ Email automation vs Email design vs Email analytics (MAJOR - generate separate ideas)
✓ "How to write emails" vs "Email writing tips" (MINOR variation - combine into one idea)
---
## QUALITY CHECKS
Before finalizing, verify:
- ✓ 3-7 ideas per cluster (based on major topic count)
- ✓ Each idea targets a distinct major topic
- ✓ Each idea has unique content_structure type
- ✓ Title includes 1-2 primary focus keywords
- ✓ 1-2 primary_focus_keywords listed per idea
- ✓ 2-3 covered_keywords listed per idea (3-5 total keywords maximum)
-**Primary focus keywords appear in title AND at least 2 H2 headings**
-**Each idea covers completely different keywords from cluster**
- ✓ Content angles represent major topic differences
- ✓ AI determined optimal section count for each idea
- ✓ AI determined word count based on sections and keywords
- ✓ Valid JSON format
---
## OUTPUT FORMAT
Return ONLY valid JSON with no comments or explanations.
The "outline" object should be simple and high-level - just enough to guide the content generator. The actual detailed structure, formatting, H3 subsections, lists, tables, etc. will be handled by the content generation system.
---
## WHAT NOT TO INCLUDE
❌ Detailed H3 subsections (content generator handles this)
❌ Specific formatting instructions (paragraph/list/table details)
❌ Word count per section (content generator calculates)
❌ Detailed content descriptions (keep coverage notes brief)
❌ HTML structure (content generator outputs HTML)
❌ Introduction hook text (content generator writes this)
❌ Hardcoded section counts (AI determines optimal count)
❌ Hardcoded word count ranges (AI determines based on content needs)
Keep outlines strategic and high-level. Let the content generation system handle tactical execution.

File diff suppressed because it is too large Load Diff