array( 'label' => 'Short', 'description' => '2-3 paragraphs, quick overview', 'min_words' => 100, 'paragraphs' => '2-3', 'structure_hint' => 'Opening benefit → Key features (2-3) → Brief close. Get to the point fast.', ), 'medium' => array( 'label' => 'Medium', 'description' => '4-5 paragraphs with feature highlights', 'min_words' => 250, 'paragraphs' => '4-5', 'structure_hint' => 'Opening benefit → Feature highlights with benefits → Practical specs → Confident close.', ), 'long' => array( 'label' => 'Long', 'description' => '6-8 paragraphs with detailed sections', 'min_words' => 500, 'paragraphs' => '6-8', 'structure_hint' => 'Opening hook → Problem/solution → Detailed features → Specs/dimensions → Use cases → Strong close.', ), 'very_long' => array( 'label' => 'Very Long', 'description' => '10+ paragraphs, comprehensive content', 'min_words' => 800, 'paragraphs' => '10-12', 'structure_hint' => 'Complete guide: Opening → Problem → Solution → Feature deep-dive → Specs → Who it\'s for → Use cases → FAQ-style points → Close.', ), ); /** * Preset definitions for short descriptions * Simplified in v2.6.0 - removed over-prescriptive structures */ private const SHORT_PRESETS = array( 'brief' => array( 'label' => 'Brief', 'description' => '1-2 sentences, key highlight only', 'min_words' => 20, 'paragraphs' => '1', 'structure_hint' => 'One punchy sentence with the main benefit. Optional second sentence with proof point.', ), 'standard' => array( 'label' => 'Standard', 'description' => '2-3 sentences with features', 'min_words' => 40, 'paragraphs' => '1', 'structure_hint' => 'Lead with benefit → Support with 1-2 key features → Hook to read more.', ), 'detailed' => array( 'label' => 'Detailed', 'description' => '4-5 sentences, mini-description', 'min_words' => 70, 'paragraphs' => '1-2', 'structure_hint' => 'Mini description: benefit hook → 2-3 feature highlights → what makes it different.', ), ); /** * Get all available presets for full descriptions * * @return array */ public static function getFullPresets(): array { return self::FULL_PRESETS; } /** * Get all available presets for short descriptions * * @return array */ public static function getShortPresets(): array { return self::SHORT_PRESETS; } /** * Get a specific full description preset * * @param string $preset_key Preset key (short, medium, long, very_long) * @return array */ public static function getFullPreset( string $preset_key ): array { return self::FULL_PRESETS[ $preset_key ] ?? self::FULL_PRESETS['medium']; } /** * Get a specific short description preset * * @param string $preset_key Preset key (brief, standard, detailed) * @return array */ public static function getShortPreset( string $preset_key ): array { return self::SHORT_PRESETS[ $preset_key ] ?? self::SHORT_PRESETS['standard']; } /** * Build structural instructions for AI prompt (full description) * * @param string $preset_key Preset key * @param bool $for_plain_text Whether output should be plain text (no HTML) * @return string Instructions for the AI */ public static function buildFullInstructions( string $preset_key, bool $for_plain_text = false ): string { $preset = self::getFullPreset( $preset_key ); $format_line = $for_plain_text ? 'Separate paragraphs with blank lines. No HTML or markdown.' : 'HTML: Use
,