# PHASE 8: UNIVERSAL CONTENT TYPES - TODO LIST **Timeline**: 2-3 weeks **Priority**: LOW **Dependencies**: Phase 1 (Content Model), Phase 4 (Linker & Optimizer) --- ## BACKEND TASKS ### 1. Content Model Extensions - [ ] **Task 1**: Extend Content model: Add `entity_type` field with choices (blog_post, article, product, service, taxonomy, page) - File: `backend/igny8_core/business/content/models.py` - Add CharField with max_length=50 and choices - Default: 'blog_post' - [ ] **Task 2**: Extend Content model: Add `json_blocks` JSONField for structured content blocks - File: `backend/igny8_core/business/content/models.py` - Default: empty list `[]` - [ ] **Task 3**: Extend Content model: Add `structure_data` JSONField for content structure data - File: `backend/igny8_core/business/content/models.py` - Default: empty dict `{}` - [ ] **Task 4**: Create migration for Content model extensions (entity_type, json_blocks, structure_data) - File: `backend/igny8_core/business/content/migrations/XXXX_add_universal_content_types.py` - Run: `python manage.py makemigrations` - [ ] **Task 5**: Update ContentSerializer to include new fields (entity_type, json_blocks, structure_data) - File: `backend/igny8_core/business/content/serializers.py` - Add fields to serializer fields list ### 2. Content Type Prompts - [ ] **Task 6**: Add Product Prompts: Create product generation prompts in AI prompts system - File: `backend/igny8_core/infrastructure/ai/prompts.py` (or appropriate location) - Create prompts for product content generation - Include product-specific instructions (features, pricing, specifications, etc.) - [ ] **Task 7**: Add Service Page Prompts: Create service page generation prompts in AI prompts system - File: `backend/igny8_core/infrastructure/ai/prompts.py` (or appropriate location) - Create prompts for service page generation - Include service-specific instructions (benefits, process, pricing, etc.) - [ ] **Task 8**: Add Taxonomy Prompts: Create taxonomy generation prompts in AI prompts system - File: `backend/igny8_core/infrastructure/ai/prompts.py` (or appropriate location) - Create prompts for taxonomy page generation - Include taxonomy-specific instructions (categories, tags, organization, etc.) ### 3. Content Service Extensions - [ ] **Task 9**: Extend ContentService: Add `generate_product_content()` method - File: `backend/igny8_core/business/content/services/content_generation_service.py` - Method should: - Accept product parameters (name, description, features, etc.) - Use product prompts - Set entity_type='product' - Generate structured content with json_blocks - Return generated content - [ ] **Task 10**: Extend ContentService: Add `generate_service_page()` method - File: `backend/igny8_core/business/content/services/content_generation_service.py` - Method should: - Accept service parameters (name, description, benefits, etc.) - Use service page prompts - Set entity_type='service' - Generate structured content with json_blocks - Return generated content - [ ] **Task 11**: Extend ContentService: Add `generate_taxonomy()` method - File: `backend/igny8_core/business/content/services/content_generation_service.py` - Method should: - Accept taxonomy parameters (name, description, items, etc.) - Use taxonomy prompts - Set entity_type='taxonomy' - Generate structured content with json_blocks - Return generated content ### 4. Linker & Optimizer Extensions - [ ] **Task 12**: Extend LinkerService: Add product linking logic - File: `backend/igny8_core/business/linking/services/linker_service.py` - Add logic to: - Identify products in content - Link products to related content - Handle product-specific linking rules - [ ] **Task 13**: Extend LinkerService: Add taxonomy linking logic - File: `backend/igny8_core/business/linking/services/linker_service.py` - Add logic to: - Identify taxonomies in content - Link taxonomies to related content - Handle taxonomy-specific linking rules - [ ] **Task 14**: Extend OptimizerService: Add product optimization logic - File: `backend/igny8_core/business/optimization/services/optimizer_service.py` - Add logic to: - Optimize product content for SEO - Optimize product structure - Handle product-specific optimization rules - [ ] **Task 15**: Extend OptimizerService: Add taxonomy optimization logic - File: `backend/igny8_core/business/optimization/services/optimizer_service.py` - Add logic to: - Optimize taxonomy content for SEO - Optimize taxonomy structure - Handle taxonomy-specific optimization rules ### 5. API Extensions - [ ] **Task 16**: Update Content ViewSet: Add endpoints for product/service/taxonomy generation - File: `backend/igny8_core/modules/content/views.py` (or appropriate location) - Add actions: - `generate_product` - POST endpoint for product generation - `generate_service` - POST endpoint for service page generation - `generate_taxonomy` - POST endpoint for taxonomy generation --- ## TESTING TASKS - [ ] **Task 17**: Test: Product content generates correctly - Create test case for product generation - Verify entity_type is set to 'product' - Verify json_blocks contain product structure - Verify content is properly saved - [ ] **Task 18**: Test: Service pages work correctly - Create test case for service page generation - Verify entity_type is set to 'service' - Verify json_blocks contain service structure - Verify content is properly saved - [ ] **Task 19**: Test: Taxonomy pages work correctly - Create test case for taxonomy generation - Verify entity_type is set to 'taxonomy' - Verify json_blocks contain taxonomy structure - Verify content is properly saved - [ ] **Task 20**: Test: Linking works for all content types (products, taxonomies) - Test product linking functionality - Test taxonomy linking functionality - Verify links are created correctly - Verify link relationships are accurate - [ ] **Task 21**: Test: Optimization works for all content types (products, taxonomies) - Test product optimization functionality - Test taxonomy optimization functionality - Verify optimization improves content quality - Verify SEO improvements are applied --- ## SUMMARY **Total Tasks**: 21 - **Backend Tasks**: 16 - **Testing Tasks**: 5 **Categories**: - Content Model Extensions: 5 tasks - Content Type Prompts: 3 tasks - Content Service Extensions: 3 tasks - Linker & Optimizer Extensions: 4 tasks - API Extensions: 1 task - Testing: 5 tasks --- ## IMPLEMENTATION ORDER 1. **Model Extensions** (Tasks 1-5): Foundation 2. **Prompts** (Tasks 6-8): AI configuration 3. **Service Extensions** (Tasks 9-11): Core functionality 4. **Linker & Optimizer** (Tasks 12-15): Extended features 5. **API Extensions** (Task 16): Expose functionality 6. **Testing** (Tasks 17-21): Validation --- **Status**: All tasks pending **Last Updated**: 2025-01-18