# X (Twitter) Thread Template
channel: x_twitter
priority: 5
language: [th, en]

# Thread structure
structure:
  thread_length:
    min_tweets: 5
    max_tweets: 10
    optimal_tweets: 7-8
    
  tweet_types:
    - hook_tweet:
        position: 1
        max_chars: 280
        purpose: "Grab attention, promise value"
        thai_note: "Thai may need more chars due to compound words"
        
    - context_tweet:
        position: 2
        max_chars: 280
        purpose: "Set context, explain why this matters"
        
    - body_tweets:
        position: "3 to (n-2)"
        count: "2-6"
        max_chars: 280
        purpose: "Deliver main content, one idea per tweet"
        
    - summary_tweet:
        position: "n-1"
        max_chars: 280
        purpose: "Summarize key points"
        
    - cta_tweet:
        position: n
        max_chars: 280
        purpose: "Call-to-action, engagement question"

# Tweet specifications
tweet:
  max_chars: 280
  thai_considerations:
    - "Thai characters count as 1 char each"
    - "No spaces between words - can pack more meaning"
    - "Recommended: 200-250 Thai chars for readability"
    
  hashtags:
    recommended_count: 2-3
    max_count: 5
    placement: "end_of_tweet"
    thai_english_mix: true
    
  emojis:
    recommended: true
    per_tweet: "1-3"
    purpose: "Visual break, emphasis"
    
  mentions:
    max_recommended: 2
    placement: "end_of_tweet"
    
  media:
    images:
      count: "1-4 per tweet"
      size: "1200x675 (16:9) or 1080x1080 (1:1)"
      
    video:
      max_duration: "2min 20sec"
      recommended: "30-90sec"
      size: "1280x720 or 1920x1080"
      
  thread_title:
    optional: true
    format: "image_with_text"
    purpose: "Hook before first tweet"

# Hook formulas
hooks:
  curiosity:
    - "I was wrong about [common belief]."
    - "The real reason [outcome] happens isn't what you think."
    - "[Impressive result] — and it only took [short time]."
    
  story:
    - "Last week, [unexpected thing] happened."
    - "3 years ago, I [past state]. Today, [current state]."
    
  value:
    - "How to [outcome] (without [pain]):"
    - "[Number] [things] that [result]:"
    - "Stop [mistake]. Do this instead:"
    
  contrarian:
    - "Unpopular opinion: [bold statement]"
    - "[Common advice] is wrong. Here's why:"

# Engagement optimization
engagement:
  best_posting_times:
    thailand:
      - "7:00-9:00 (morning commute)"
      - "12:00-13:00 (lunch break)"
      - "19:00-21:00 (evening)"
    global:
      - "9:00-12:00 EST"
      
  posting_frequency:
    threads_per_week: "2-4"
    replies_per_day: "10-20"
    
  follow_up:
    reply_to_comments: true
    pin_best_thread: true
    cross_promote: true

# Output configuration
output:
  variations: 3  # Complete thread variations
  format: json
  include_thread_title: true
  include_visual_suggestions: true
  
# Quality requirements
quality:
  min_score: 70
  checks:
    - hook_strength
    - value_density
    - clarity
    - engagement_potential
    - thai_language_quality
    - brand_voice_alignment

# API readiness (for future Twitter API v2 integration)
api_ready:
  platform: twitter
  api_version: "2.0"
  endpoint: "/2/tweets"
  method: POST
  
  field_mapping:
    text: tweet.text
    media: tweet.media.media_keys
    reply_settings: tweet.reply_settings
    thread: "use in_reply_to_user_id"
    
  future_integration_notes:
    - "Add media upload via POST /2/media"
    - "Use media_keys to attach to tweet"
    - "For threads: chain tweets with in_reply_to_user_id"
    - "Add poll creation support"
    - "Add quote_tweet support"
    - "Schedule tweets with scheduled_at"

# Thread templates
templates:
  how_to_thread:
    structure:
      - "Hook: How to [outcome] without [pain]"
      - "Context: Why this matters"
      - "Step 1"
      - "Step 2"
      - "Step 3"
      - "Step 4"
      - "Summary + CTA"
      
  list_thread:
    structure:
      - "Hook: [Number] [things] that [result]"
      - "Context: Why these matter"
      - "Item 1 + explanation"
      - "Item 2 + explanation"
      - "Item 3 + explanation"
      - "Item 4 + explanation"
      - "Item 5 + summary"
      
  story_thread:
    structure:
      - "Hook: Story setup"
      - "Background context"
      - "Challenge/problem"
      - "Action taken"
      - "Result"
      - "Lesson learned"
      - "CTA for engagement"
      
  contrarian_thread:
    structure:
      - "Hook: Unpopular opinion"
      - "Common belief"
      - "Why it's wrong"
      - "Better alternative"
      - "Evidence/examples"
      - "Actionable advice"
      - "Question for engagement"
