Content Strategy Framework (12-Step)
Relevant source files
The following files were used as context for generating this wiki page:
- backend/services/calendar_generation_datasource_framework/README.md
- backend/services/calendar_generation_datasource_framework/prompt_chaining/steps/phase3/README.md
- backend/services/calendar_generation_datasource_framework/data_processing/README.md
- backend/services/calendar_generation_datasource_framework/prompt_chaining/steps/phase3/step9_content_recommendations/README.md
- backend/services/calendar_generation_datasource_framework/prompt_chaining/steps/phase3/step8_daily_content_planning/README.md
- backend/services/calendar_generation_datasource_framework/prompt_chaining/steps/phase4/step12_final_calendar_assembly/README.md
- backend/services/calendar_generation_datasource_framework/test_12_step_calendar_generation.md
The Content Strategy Framework (12-Step) is a modular, AI-powered architecture within ALwrity designed to generate comprehensive content calendars. It utilizes a prompt-chaining methodology that transforms high-level business goals into actionable daily content schedules. By breaking the content planning process into twelve distinct steps, the system ensures strategic alignment, quality validation, and data-driven optimization at every stage of the lifecycle.
Sources: backend/services/calendar_generation_datasource_framework/README.md, backend/services/calendar_generation_datasource_framework/test_12_step_calendar_generation.md
Framework Phases and Step Overview
The 12-step process is divided into four logical phases, each focusing on a specific aspect of content development.
| Phase | Steps | Focus Area | Key Data Sources |
|---|---|---|---|
| Phase 1: Foundation | 1-3 | Strategy, Gaps, & Audience | Content Strategy Source, Gap Analysis Source |
| Phase 2: Structure | 4-6 | Framework & Platforms | Content Pillars, Platform Strategies |
| Phase 3: Content | 7-9 | Generation & Optimization | Weekly Themes, Daily Planning, Recommendations |
| Phase 4: Optimization | 10-12 | Validation & Assembly | Quality Gates, Performance Source |
Sources: backend/services/calendar_generation_datasource_framework/README.md, backend/services/calendar_generation_datasource_framework/data_processing/README.md
Phase 1: Foundation
This phase establishes the baseline by analyzing the user's business objectives and identifying market opportunities.
- Step 1: Content Strategy Analysis: Analyzes business goals, target audience, and brand voice.
- Step 2: Gap Analysis Integration: Identifies content gaps and competitor opportunities.
- Step 3: Audience and Platform Strategy: Refines audience personas and timing strategies.
Sources: backend/services/calendar_generation_datasource_framework/data_processing/README.md
Phase 2: Structure
This phase translates the foundation into a structural roadmap.
- Step 4: Calendar Framework: Defines the timeline and posting frequency.
- Step 5: Content Pillar Distribution: Allocates themes based on established pillars.
- Step 6: Platform-Specific Strategy: Adapts content guidelines for specific social networks.
Sources: backend/services/calendar_generation_datasource_framework/data_processing/README.md
Phase 3: Content Generation
Focuses on creating the actual content schedule and recommendations.
- Step 7: Weekly Theme Development: Generates overarching themes based on pillars.
- Step 8: Daily Content Planning: Creates a detailed daily schedule with platform-specific optimizations.
- Step 9: Content Recommendations: Provides AI-generated ideas to fill identified gaps.
Sources: backend/services/calendar_generation_datasource_framework/prompt_chaining/steps/phase3/README.md, backend/services/calendar_generation_datasource_framework/prompt_chaining/steps/phase3/step8_daily_content_planning/README.md
Phase 4: Validation and Assembly
The final phase ensures the generated content meets enterprise standards.
- Step 10: Performance Optimization: Suggests improvements based on predictive analytics.
- Step 11: Strategy Alignment: Validates that the calendar still meets Step 1 objectives.
- Step 12: Final Calendar Assembly: Integrates all previous outputs into a cohesive final product.
Architectural Components
The framework relies on a modular architecture to manage evolving data sources and AI interactions.
This diagram illustrates the flow from raw data sources through the prompt builder and quality gates to the final calendar assembly.
Sources: backend/services/calendar_generation_datasource_framework/README.md
Strategy-Aware Prompt Builder
The StrategyAwarePromptBuilder is responsible for generating step-specific prompts. It integrates context from the DataSourceRegistry to ensure that AI responses are grounded in the user's specific strategy.
Sources: backend/services/calendar_generation_datasource_framework/README.md
Quality Gate System
The framework employs six critical quality gate categories to validate the content during generation:
- Content Uniqueness Gate: Prevents topic duplication and keyword cannibalization (Threshold: 0.9).
- Content Mix Gate: Ensures balanced distribution of themes and types (Threshold: 0.8).
- Chain Context Gate: Validates that context is preserved between steps (Threshold: 0.85).
- Calendar Structure Gate: Validates duration and completeness.
- Enterprise Standards Gate: Ensures professional quality and brand compliance.
- KPI Integration Gate: Confirms alignment with business goals.
Sources: backend/services/calendar_generation_datasource_framework/README.md
Data Flow and Step Execution
Each step follows a standard execution pattern: Input retrieval from previous steps, AI processing via AIEngineService, and validation via quality gates.
Step 8: Daily Content Planning Detail
Step 8 transforms weekly themes into specific content pieces. It utilizes a PlatformOptimizer and TimelineCoordinator to resolve conflicts and optimize posting times.
The sequence shows the internal orchestration of Step 8, highlighting the dependency on Step 7 themes and the uniqueness validation check.
Sources: backend/services/calendar_generation_datasource_framework/prompt_chaining/steps/phase3/step8_daily_content_planning/README.md
Step 12: Final Assembly
Step 12 acts as the CalendarAssemblyEngine. It aggregates data from all 11 previous steps to generate the final calendar_structure.
# Illustrative Output Structure from Step 12
{
"calendar_id": "calendar_20250121_143022",
"quality_score": 0.87,
"strategy_alignment_score": 0.89,
"calendar_structure": {
"content_schedule": [...],
"integration_metadata": {...}
}
}
Validation and Testing Framework
The system includes a Step1Validator and IntegrationTestSuite to monitor the performance of the chain. These tools trace data flow from source retrieval in strategy_data.py to final AI output.
Quality Thresholds
Testing ensures that each step meets specific benchmarks:
- Data Utilization: >80% of available data must be utilized in AI prompts.
- Execution Time: Each step should ideally complete in <5 seconds.
- Quality Score: Target >0.85 overall quality.
Sources: backend/services/calendar_generation_datasource_framework/test_validation/README.md, backend/services/calendar_generation_datasource_framework/test_12_step_calendar_generation.md
The Content Strategy Framework (12-Step) provides a highly structured approach to content planning, ensuring that AI-generated calendars are not just creative, but strategically sound and data-driven. By leveraging modular data sources and multi-phase validation, the framework maintains high standards of content uniqueness and business goal alignment throughout the generation process.