File size: 6,281 Bytes
c5d7500
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
from __future__ import annotations

STAGE_SEQUENCE: list[tuple[str, str]] = [
    ("setup_inputs", "Setup & Inputs"),
    ("source_extraction_objective_mapping", "Source Extraction / Objective Mapping"),
    ("slide_outline_order", "Slide Outline & Order"),
    ("title_generation", "Title Generation"),
    ("text_generation", "Text Generation"),
    ("image_visual_asset_generation", "Image / Visual Asset Generation"),
    ("aesthetic_ordering_visual_composition", "Aesthetic Ordering / Visual Composition"),
    ("technical_review", "Technical Review"),
    ("pedagogical_review", "Pedagogical Review"),
    ("aesthetic_review", "Aesthetic Review"),
    ("final_render_export", "Final Render & Export"),
    ("audit_log_version_history", "Audit Log / Version History"),
]

STAGE_IDS = [stage_id for stage_id, _label in STAGE_SEQUENCE]
STAGE_LABELS = dict(STAGE_SEQUENCE)

APPROVAL_REQUIRED_STAGE_IDS = STAGE_IDS[:10]

STAGE_RUBRICS: dict[str, list[tuple[str, str, float]]] = {
    "setup_inputs": [
        ("required_inputs_present", "Required inputs present", 1.4),
        ("url_validity", "URL validity", 1.0),
        ("render_mode_safety", "Render mode safety", 1.0),
    ],
    "source_extraction_objective_mapping": [
        ("source_extraction_completeness", "Source extraction completeness", 1.0),
        ("objective_clarity", "Objective clarity", 1.1),
        ("objective_uniqueness", "Objective uniqueness", 0.8),
    ],
    "slide_outline_order": [
        ("objective_coverage", "Objective coverage", 1.4),
        ("logical_flow", "Logical flow", 1.0),
        ("appropriate_slide_count", "Appropriate slide count", 0.8),
        ("no_major_redundancy", "No major redundancy", 0.8),
    ],
    "title_generation": [
        ("title_clarity", "Title clarity", 1.1),
        ("title_specificity", "Title specificity", 1.0),
        ("objective_alignment", "Objective alignment", 1.2),
    ],
    "text_generation": [
        ("clarity", "Clarity", 1.0),
        ("text_density", "Text density", 1.3),
        ("source_grounding", "Source grounding", 1.3),
        ("speaker_notes_quality", "Speaker notes quality", 1.0),
    ],
    "image_visual_asset_generation": [
        ("visual_relevance", "Visual relevance", 1.0),
        ("asset_completeness", "Asset completeness", 1.3),
        ("alt_text_presence", "Alt text presence", 1.1),
        ("license_or_generation_metadata", "License or generation metadata", 1.0),
    ],
    "aesthetic_ordering_visual_composition": [
        ("layout_schema_validity", "Layout schema validity", 1.4),
        ("slot_compliance", "Slot compliance", 1.1),
        ("visual_hierarchy", "Visual hierarchy", 0.8),
        ("readability", "Readability", 1.0),
    ],
    "technical_review": [
        ("technical_accuracy", "Technical accuracy", 1.3),
        ("unsupported_claim_detection", "Unsupported claim detection", 1.5),
        ("terminology_consistency", "Terminology consistency", 0.8),
    ],
    "pedagogical_review": [
        ("objective_coverage", "Objective coverage", 1.4),
        ("learning_progression", "Learning progression", 1.0),
        ("examples_or_applications", "Examples or applications", 0.8),
        ("speaker_notes_teachability", "Speaker notes teachability", 1.1),
    ],
    "aesthetic_review": [
        ("layout_consistency", "Layout consistency", 1.1),
        ("readability", "Readability", 1.0),
        ("accessibility", "Accessibility", 1.3),
        ("brand_template_compliance", "Brand/template compliance", 1.0),
    ],
    "final_render_export": [
        ("preflight_passed", "Preflight passed", 1.6),
        ("all_required_approvals_valid", "All required approvals valid", 1.2),
        ("no_stale_stages", "No stale stages", 1.1),
        ("export_target_safety", "Export target safety", 1.0),
    ],
    "audit_log_version_history": [
        ("audit_events_present", "Audit events present", 1.0),
        ("artifact_versions_traceable", "Artifact versions traceable", 1.2),
        ("review_notes_traceable", "Reviewer notes traceable", 0.8),
    ],
}

TEXT_DENSITY_LIMITS: dict[str, dict[str, int]] = {
    "intro": {"max_visible_words": 35, "max_bullets": 0},
    "motivation": {"max_visible_words": 55, "max_bullets": 3},
    "concept": {"max_visible_words": 65, "max_bullets": 4},
    "worked_example": {"max_visible_words": 90, "max_bullets": 5},
    "procedure": {"max_visible_words": 90, "max_bullets": 6},
    "comparison": {"max_visible_words": 85, "max_bullets": 5},
    "common_misconception": {"max_visible_words": 75, "max_bullets": 4},
    "knowledge_check": {"max_visible_words": 100, "max_bullets": 6},
    "demo_setup": {"max_visible_words": 80, "max_bullets": 5},
    "demo_walkthrough": {"max_visible_words": 90, "max_bullets": 6},
    "summary": {"max_visible_words": 70, "max_bullets": 5},
    "transition": {"max_visible_words": 25, "max_bullets": 0},
    "unknown": {"max_visible_words": 65, "max_bullets": 4},
}

INSTRUCTIONAL_ROLES = {
    "concept",
    "worked_example",
    "procedure",
    "comparison",
    "common_misconception",
    "knowledge_check",
    "demo_setup",
    "demo_walkthrough",
    "summary",
}

APPROVED_LAYOUTS: dict[str, dict[str, object]] = {
    "title_only": {
        "required_slots": {"title"},
        "optional_slots": set(),
        "slot_word_limits": {"title": 14},
    },
    "title_body": {
        "required_slots": {"title", "body"},
        "optional_slots": {"subtitle"},
        "slot_word_limits": {"title": 14, "body": 80, "subtitle": 24},
    },
    "title_bullets_visual": {
        "required_slots": {"title", "bullets", "visual"},
        "optional_slots": {"caption"},
        "slot_word_limits": {"title": 14, "bullets": 90, "visual": 8, "caption": 18},
    },
    "worked_example": {
        "required_slots": {"title", "problem", "steps"},
        "optional_slots": {"visual", "answer"},
        "slot_word_limits": {"title": 14, "problem": 45, "steps": 100, "visual": 8, "answer": 30},
    },
    "knowledge_check": {
        "required_slots": {"title", "question", "options"},
        "optional_slots": {"answer"},
        "slot_word_limits": {"title": 14, "question": 55, "options": 70, "answer": 28},
    },
}

RAW_COORDINATE_KEYS = {"x", "y", "width", "height", "left", "top", "w", "h"}