File size: 1,637 Bytes
6835659
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from __future__ import annotations

from enum import Enum
from typing import List

from pydantic import BaseModel, Field


class ComplexityLevel(str, Enum):
    low = "low"
    medium = "medium"
    high = "high"


class RiskFlag(str, Enum):
    ambiguity = "ambiguity"
    emotional_conflict = "emotional_conflict"
    conflicting_constraints = "conflicting_constraints"


class CoreSemantics(BaseModel):
    setting: str
    time_of_day: str
    weather: str
    main_subjects: List[str]
    actions: List[str]


class StyleControls(BaseModel):
    visual_style: List[str]
    color_palette: List[str]
    lighting: List[str]
    camera: List[str]
    mood_emotion: List[str]
    narrative_tone: List[str]


class ImageConstraints(BaseModel):
    must_include: List[str]
    must_avoid: List[str]
    objects: List[str]
    environment_details: List[str]
    composition: List[str]


class AudioConstraints(BaseModel):
    audio_intent: List[str]
    sound_sources: List[str]
    ambience: List[str]
    tempo: str
    must_include: List[str]
    must_avoid: List[str]


class TextConstraints(BaseModel):
    must_include: List[str]
    must_avoid: List[str]
    keywords: List[str]
    length: str


class UnifiedPlan(BaseModel):
    scene_summary: str
    domain: str
    core_semantics: CoreSemantics
    style_controls: StyleControls
    image_constraints: ImageConstraints
    audio_constraints: AudioConstraints
    text_constraints: TextConstraints
    complexity_level: ComplexityLevel = ComplexityLevel.low
    risk_flags: List[RiskFlag] = Field(default_factory=list)
    notes: str | None = None


SemanticPlan = UnifiedPlan