File size: 4,821 Bytes
6bdfadc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
FUNCTIONAL_ROLES = {
    "OPENING": {
        "Hook": "Grabs viewers' attention or interest; appears in first few seconds",
        "Establish Context": "Sets up the status quo—who, where, or when—before story progression"
    },
    "PROBLEM": {
        "Problem Setup": "Presents a problem, need, or pain point to resolve for the first time",
        "Problem Agitation": "Amplifies the problem to make it relatable or severe"
    },
    "PRODUCT": {
        "Feature Explanation": "Explains product features and why it delivers benefits; goes beyond just showing",
        "Product Highlight": "Presents key product attributes or benefits (surface-level showcasing)",
        "Demonstration": "Shows the product being used or tested to accomplish a task",
        "Comparison": "Contrasts product with competitors or previous states",
        "Social Proof": "Shows reviews or testimonials from other people",
        "Solution Reveal": "Presents product as solution to a problem"
    },
    "PERSUASIVE": {
        "Emotional Appeal": "Uses emotions to connect with and engage the audience",
        "Humor": "Uses comedic elements to entertain and make message relatable",
        "Aspirational Vision": "Depicts an ideal lifestyle or future enabled by the product",
        "Promotion": "Communicates offer mechanics: discount, bundle, code, pricing terms",
        "Urgency Trigger": "Adds time pressure to accelerate action",
        "Scarcity Trigger": "Highlights limited availability to create FOMO"
    },
    "CLOSURE": {
        "Call-to-Action": "Cues to act; drives immediate action",
        "Outcome": "Shows post-intervention payoff or transformation",
        "Branding Moment": "Displays brand identity (logo, tagline, slogans)",
        "Insight/Philosophy": "Expresses brand philosophy; leads viewers to discover something new"
    },
    "OTHER": {
        "Visual Filler": "Provides transitional pacing without narrative contribution"
    }
}

STORY_ARCS = {
    "Problem-Solution-Outcome": {
        "sequence": ["Problem Setup", "Solution Reveal", "Outcome"],
        "description": "Introduces a problem, offers a solution, and shows the outcome"
    },
    "Hook-Feature-Benefit-Action": {
        "sequence": ["Hook", "Feature Explanation", "Product Highlight", "Call-to-Action"],
        "abbreviation": "HFBA",
        "description": "Grabs attention, explains features, highlights benefits, drives action"
    },
    "AIDA": {
        "sequence": ["Hook", "Feature Explanation", "Aspirational Vision", "Call-to-Action"],
        "description": "Attention-Interest-Desire-Action classic marketing funnel"
    },
    "Social-Proof-Action": {
        "sequence": ["Social Proof", "Call-to-Action"],
        "abbreviation": "SPA",
        "description": "Shows testimonials/reviews then drives action"
    },
    "Problem-Agitate-Solution": {
        "sequence": ["Problem Setup", "Problem Agitation", "Solution Reveal"],
        "abbreviation": "PAS",
        "description": "Presents problem, amplifies pain, offers solution"
    },
    "Before-After-Bridge": {
        "sequence": ["Establish Context", "Outcome", "Solution Reveal"],
        "abbreviation": "BAB",
        "description": "Shows current situation, desired outcome, product as bridge"
    },
    "Hook-Problem-Solution": {
        "sequence": ["Hook", "Problem Setup", "Solution Reveal"],
        "abbreviation": "HPS",
        "description": "Grabs attention, presents problem, offers solution"
    },
    "Feature-Benefit-Action": {
        "sequence": ["Feature Explanation", "Product Highlight", "Call-to-Action"],
        "abbreviation": "FBA",
        "description": "Direct product-focused approach"
    }
}

STORY_DEFINITION = """
A story is an account of an event or a sequence of connected events
that leads to a transition from an initial state to a later stage or outcome.

Signals of STORY PRESENT:
- Dialogues between characters
- Sharing of personal experiences
- Inclusion of challenges/conflicts/problem solutions
- Character transformation or journey

Signals of STORY ABSENT:
- Announcer/narrator voiceover only
- Promotional language dominance
- Heavy focus on product features without context
- Visual mashups without narrative connection
"""


def get_taxonomy_formatted() -> str:
    """Return taxonomy as formatted string for prompts."""
    lines = []
    for category, roles in FUNCTIONAL_ROLES.items():
        lines.append(f"\n**{category}**")
        for role, description in roles.items():
            lines.append(f"- {role}: {description}")
    return "\n".join(lines)


def get_role_category(role_name: str) -> str:
    """Get category for a role name."""
    for category, roles in FUNCTIONAL_ROLES.items():
        if role_name in roles:
            return category
    return "OTHER"